From 9ceae48b044132173a9a9e05d088d6faea26d962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Thu, 11 Sep 2025 22:44:52 +0200 Subject: [PATCH 01/10] chore: v2.2.1 --- manifest-full.json | 2 +- manifest-minimal.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest-full.json b/manifest-full.json index 296f5d4..52acd8a 100644 --- a/manifest-full.json +++ b/manifest-full.json @@ -1,6 +1,6 @@ { "dxt_version": "0.2", - "version": "2.2.0", + "version": "2.2.1", "name": "postman-mcp-server-full", "display_name": "Postman MCP Server (Full)", "description": "A comprehensive MCP server with all available Postman API tools (106+ tools).", diff --git a/manifest-minimal.json b/manifest-minimal.json index fd9f260..143eff9 100644 --- a/manifest-minimal.json +++ b/manifest-minimal.json @@ -1,6 +1,6 @@ { "dxt_version": "0.2", - "version": "2.2.0", + "version": "2.2.1", "name": "postman-mcp-server-minimal", "display_name": "Postman MCP Server (Minimal)", "description": "A minimal MCP server with essential Postman API tools (37 tools).", diff --git a/package-lock.json b/package-lock.json index de2e8af..3f07858 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@postman/postman-mcp-server", - "version": "2.2.0", + "version": "2.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@postman/postman-mcp-server", - "version": "2.2.0", + "version": "2.2.1", "license": "Apache-2.0", "dependencies": { "@apidevtools/swagger-parser": "^11.0.0", diff --git a/package.json b/package.json index 6db99f9..7a03a01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.2.0", + "version": "2.2.1", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", From a185966f5ca01c2771406b6766298b27aa87fca7 Mon Sep 17 00:00:00 2001 From: "mcpopenapibot[bot]" <219997244+mcpopenapibot[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 12:57:36 +0200 Subject: [PATCH 02/10] chore: sync tools and stdio/tests from postman-mcp-server (#47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: sync tools, entrypoint, and tests from postman-mcp-server * fix: tests --------- Co-authored-by: postman-distribution-bot[bot] <124679000+postman-distribution-bot[bot]@users.noreply.github.com> Co-authored-by: Diego García --- .github/workflows/test.yml | 1 + dist/package.json | 2 +- dist/src/clients/postman.js | 40 +- dist/src/index.js | 88 ++-- dist/src/tools/createCollection.js | 30 +- dist/src/tools/createCollectionComment.js | 18 +- dist/src/tools/createCollectionFolder.js | 14 +- dist/src/tools/createCollectionFork.js | 14 +- dist/src/tools/createCollectionRequest.js | 14 +- dist/src/tools/createCollectionResponse.js | 14 +- dist/src/tools/createEnvironment.js | 12 +- dist/src/tools/createFolderComment.js | 18 +- dist/src/tools/createMock.js | 16 +- dist/src/tools/createMonitor.js | 12 +- dist/src/tools/createRequestComment.js | 18 +- dist/src/tools/createResponseComment.js | 18 +- dist/src/tools/createSpec.js | 20 +- dist/src/tools/createSpecFile.js | 14 +- dist/src/tools/createWorkspace.js | 8 +- dist/src/tools/deleteApiCollectionComment.js | 6 +- dist/src/tools/deleteCollection.js | 6 +- dist/src/tools/deleteCollectionComment.js | 6 +- dist/src/tools/deleteCollectionFolder.js | 6 +- dist/src/tools/deleteCollectionRequest.js | 6 +- dist/src/tools/deleteCollectionResponse.js | 6 +- dist/src/tools/deleteEnvironment.js | 6 +- dist/src/tools/deleteFolderComment.js | 6 +- dist/src/tools/deleteMock.js | 10 +- dist/src/tools/deleteMonitor.js | 6 +- dist/src/tools/deletePanElementOrFolder.js | 6 +- dist/src/tools/deleteRequestComment.js | 6 +- dist/src/tools/deleteResponseComment.js | 6 +- dist/src/tools/deleteSpec.js | 6 +- dist/src/tools/deleteSpecFile.js | 6 +- dist/src/tools/deleteWorkspace.js | 6 +- dist/src/tools/duplicateCollection.js | 14 +- dist/src/tools/generateCollection.js | 22 +- dist/src/tools/generateSpecFromCollection.js | 18 +- dist/src/tools/getAllElementsAndFolders.js | 56 +- dist/src/tools/getAllPanAddElementRequests.js | 44 +- dist/src/tools/getAllSpecs.js | 16 +- dist/src/tools/getAsyncSpecTaskStatus.js | 6 +- dist/src/tools/getAuthenticatedUser.js | 8 +- dist/src/tools/getCollection.js | 14 +- dist/src/tools/getCollectionComments.js | 6 +- dist/src/tools/getCollectionFolder.js | 18 +- dist/src/tools/getCollectionForks.js | 18 +- dist/src/tools/getCollectionRequest.js | 18 +- dist/src/tools/getCollectionResponse.js | 18 +- dist/src/tools/getCollectionTags.js | 6 +- dist/src/tools/getCollectionUpdatesTasks.js | 6 +- dist/src/tools/getCollections.js | 20 +- dist/src/tools/getCollectionsForkedByUser.js | 16 +- .../tools/getDuplicateCollectionTaskStatus.js | 6 +- dist/src/tools/getEnvironment.js | 6 +- dist/src/tools/getEnvironments.js | 8 +- dist/src/tools/getFolderComments.js | 6 +- dist/src/tools/getGeneratedCollectionSpecs.js | 6 +- dist/src/tools/getMock.js | 10 +- dist/src/tools/getMocks.js | 26 +- dist/src/tools/getMonitor.js | 6 +- dist/src/tools/getMonitors.js | 32 +- dist/src/tools/getRequestComments.js | 6 +- dist/src/tools/getResponseComments.js | 6 +- dist/src/tools/getSourceCollectionStatus.js | 6 +- dist/src/tools/getSpec.js | 6 +- dist/src/tools/getSpecCollections.js | 14 +- dist/src/tools/getSpecDefinition.js | 6 +- dist/src/tools/getSpecFile.js | 6 +- dist/src/tools/getSpecFiles.js | 6 +- dist/src/tools/getStatusOfAnAsyncApiTask.js | 6 +- dist/src/tools/getTaggedEntities.js | 22 +- dist/src/tools/getWorkspace.js | 10 +- dist/src/tools/getWorkspaceGlobalVariables.js | 6 +- dist/src/tools/getWorkspaceTags.js | 6 +- dist/src/tools/getWorkspaces.js | 24 +- dist/src/tools/mergeCollectionFork.js | 16 +- dist/src/tools/patchCollection.js | 10 +- dist/src/tools/patchEnvironment.js | 54 +- dist/src/tools/postPanElementOrFolder.js | 54 +- dist/src/tools/publishDocumentation.js | 22 +- dist/src/tools/publishMock.js | 6 +- dist/src/tools/pullCollectionChanges.js | 6 +- dist/src/tools/putCollection.js | 30 +- dist/src/tools/putEnvironment.js | 10 +- dist/src/tools/resolveCommentThread.js | 6 +- dist/src/tools/runMonitor.js | 10 +- dist/src/tools/syncCollectionWithSpec.js | 10 +- dist/src/tools/syncSpecWithCollection.js | 10 +- dist/src/tools/transferCollectionFolders.js | 20 +- dist/src/tools/transferCollectionRequests.js | 20 +- dist/src/tools/transferCollectionResponses.js | 20 +- dist/src/tools/unpublishDocumentation.js | 6 +- dist/src/tools/unpublishMock.js | 6 +- dist/src/tools/updateApiCollectionComment.js | 14 +- dist/src/tools/updateCollectionComment.js | 14 +- dist/src/tools/updateCollectionFolder.js | 14 +- dist/src/tools/updateCollectionRequest.js | 14 +- dist/src/tools/updateCollectionResponse.js | 14 +- dist/src/tools/updateCollectionTags.js | 10 +- dist/src/tools/updateFolderComment.js | 14 +- dist/src/tools/updateMock.js | 14 +- dist/src/tools/updateMonitor.js | 10 +- dist/src/tools/updatePanElementOrFolder.js | 65 ++- dist/src/tools/updateRequestComment.js | 14 +- dist/src/tools/updateResponseComment.js | 14 +- dist/src/tools/updateSpecFile.js | 18 +- dist/src/tools/updateSpecProperties.js | 10 +- dist/src/tools/updateWorkspace.js | 10 +- .../tools/updateWorkspaceGlobalVariables.js | 10 +- dist/src/tools/updateWorkspaceTags.js | 10 +- src/clients/postman.ts | 64 ++- src/index.ts | 134 +++-- src/tests/integration/direct.test.ts | 491 ++++++++++++++---- src/tools/createCollection.ts | 38 +- src/tools/createCollectionComment.ts | 19 +- src/tools/createCollectionFolder.ts | 17 +- src/tools/createCollectionFork.ts | 17 +- src/tools/createCollectionRequest.ts | 17 +- src/tools/createCollectionResponse.ts | 17 +- src/tools/createEnvironment.ts | 15 +- src/tools/createFolderComment.ts | 19 +- src/tools/createMock.ts | 19 +- src/tools/createMonitor.ts | 15 +- src/tools/createRequestComment.ts | 19 +- src/tools/createResponseComment.ts | 19 +- src/tools/createSpec.ts | 19 +- src/tools/createSpecFile.ts | 17 +- src/tools/createWorkspace.ts | 13 +- src/tools/deleteApiCollectionComment.ts | 13 +- src/tools/deleteCollection.ts | 13 +- src/tools/deleteCollectionComment.ts | 13 +- src/tools/deleteCollectionFolder.ts | 13 +- src/tools/deleteCollectionRequest.ts | 13 +- src/tools/deleteCollectionResponse.ts | 13 +- src/tools/deleteEnvironment.ts | 13 +- src/tools/deleteFolderComment.ts | 13 +- src/tools/deleteMock.ts | 19 +- src/tools/deleteMonitor.ts | 13 +- src/tools/deletePanElementOrFolder.ts | 13 +- src/tools/deleteRequestComment.ts | 13 +- src/tools/deleteResponseComment.ts | 13 +- src/tools/deleteSpec.ts | 13 +- src/tools/deleteSpecFile.ts | 13 +- src/tools/deleteWorkspace.ts | 13 +- src/tools/duplicateCollection.ts | 17 +- src/tools/generateCollection.ts | 25 +- src/tools/generateSpecFromCollection.ts | 19 +- src/tools/getAllElementsAndFolders.ts | 38 +- src/tools/getAllPanAddElementRequests.ts | 31 +- src/tools/getAllSpecs.ts | 17 +- src/tools/getAsyncSpecTaskStatus.ts | 13 +- src/tools/getAuthenticatedUser.ts | 15 +- src/tools/getCollection.ts | 17 +- src/tools/getCollectionComments.ts | 13 +- src/tools/getCollectionFolder.ts | 19 +- src/tools/getCollectionForks.ts | 19 +- src/tools/getCollectionRequest.ts | 19 +- src/tools/getCollectionResponse.ts | 19 +- src/tools/getCollectionTags.ts | 13 +- src/tools/getCollectionUpdatesTasks.ts | 13 +- src/tools/getCollections.ts | 19 +- src/tools/getCollectionsForkedByUser.ts | 17 +- src/tools/getDuplicateCollectionTaskStatus.ts | 13 +- src/tools/getEnvironment.ts | 13 +- src/tools/getEnvironments.ts | 13 +- src/tools/getFolderComments.ts | 13 +- src/tools/getGeneratedCollectionSpecs.ts | 13 +- src/tools/getMock.ts | 19 +- src/tools/getMocks.ts | 33 +- src/tools/getMonitor.ts | 13 +- src/tools/getMonitors.ts | 27 +- src/tools/getRequestComments.ts | 13 +- src/tools/getResponseComments.ts | 13 +- src/tools/getSourceCollectionStatus.ts | 13 +- src/tools/getSpec.ts | 13 +- src/tools/getSpecCollections.ts | 17 +- src/tools/getSpecDefinition.ts | 13 +- src/tools/getSpecFile.ts | 13 +- src/tools/getSpecFiles.ts | 13 +- src/tools/getStatusOfAnAsyncApiTask.ts | 13 +- src/tools/getTaggedEntities.ts | 21 +- src/tools/getWorkspace.ts | 15 +- src/tools/getWorkspaceGlobalVariables.ts | 13 +- src/tools/getWorkspaceTags.ts | 13 +- src/tools/getWorkspaces.ts | 27 +- src/tools/mergeCollectionFork.ts | 17 +- src/tools/patchCollection.ts | 15 +- src/tools/patchEnvironment.ts | 78 ++- src/tools/postPanElementOrFolder.ts | 66 ++- src/tools/publishDocumentation.ts | 23 +- src/tools/publishMock.ts | 13 +- src/tools/pullCollectionChanges.ts | 13 +- src/tools/putCollection.ts | 34 +- src/tools/putEnvironment.ts | 15 +- src/tools/resolveCommentThread.ts | 13 +- src/tools/runMonitor.ts | 15 +- src/tools/syncCollectionWithSpec.ts | 15 +- src/tools/syncSpecWithCollection.ts | 16 +- src/tools/transferCollectionFolders.ts | 19 +- src/tools/transferCollectionRequests.ts | 19 +- src/tools/transferCollectionResponses.ts | 19 +- src/tools/unpublishDocumentation.ts | 13 +- src/tools/unpublishMock.ts | 13 +- src/tools/updateApiCollectionComment.ts | 17 +- src/tools/updateCollectionComment.ts | 17 +- src/tools/updateCollectionFolder.ts | 17 +- src/tools/updateCollectionRequest.ts | 17 +- src/tools/updateCollectionResponse.ts | 17 +- src/tools/updateCollectionTags.ts | 15 +- src/tools/updateFolderComment.ts | 17 +- src/tools/updateMock.ts | 21 +- src/tools/updateMonitor.ts | 15 +- src/tools/updatePanElementOrFolder.ts | 73 ++- src/tools/updateRequestComment.ts | 17 +- src/tools/updateResponseComment.ts | 17 +- src/tools/updateSpecFile.ts | 19 +- src/tools/updateSpecProperties.ts | 15 +- src/tools/updateWorkspace.ts | 15 +- src/tools/updateWorkspaceGlobalVariables.ts | 15 +- src/tools/updateWorkspaceTags.ts | 15 +- vitest.config.ts | 12 + 222 files changed, 2706 insertions(+), 1570 deletions(-) create mode 100644 vitest.config.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb43993..bf1d238 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] node-version: [20.x] + fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/dist/package.json b/dist/package.json index 40e7fe9..aa5d733 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.2.0", + "version": "2.2.1", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", diff --git a/dist/src/clients/postman.js b/dist/src/clients/postman.js index 27788e2..eae9a5b 100644 --- a/dist/src/clients/postman.js +++ b/dist/src/clients/postman.js @@ -10,19 +10,12 @@ export class PostmanAPIClient { apiKey; static instance = null; constructor(apiKey, baseUrl = process.env.POSTMAN_API_BASE_URL || 'https://api.postman.com') { - if (!apiKey && !process.env.POSTMAN_API_KEY) { - throw new Error('API key is required. Provide it as parameter or set POSTMAN_API_KEY environment variable.'); - } - this.apiKey = apiKey || process.env.POSTMAN_API_KEY; + this.apiKey = apiKey; this.baseUrl = baseUrl; } static getInstance(apiKey, baseUrl) { if (!PostmanAPIClient.instance) { - const key = apiKey || process.env.POSTMAN_API_KEY; - if (!key) { - throw new Error('API key is required. Provide it as parameter or set POSTMAN_API_KEY environment variable.'); - } - PostmanAPIClient.instance = new PostmanAPIClient(key, baseUrl); + PostmanAPIClient.instance = new PostmanAPIClient(apiKey, baseUrl); } return PostmanAPIClient.instance; } @@ -45,20 +38,37 @@ export class PostmanAPIClient { return this.request(endpoint, { ...options, method: 'DELETE' }); } async request(endpoint, options) { + const currentApiKey = this.apiKey || process.env.POSTMAN_API_KEY; + if (!currentApiKey) { + throw new Error('API key is required for requests. Provide it via constructor parameter or set POSTMAN_API_KEY environment variable.'); + } const contentType = options.contentType || ContentType.Json; - const userAgentHeader = options.headers && 'user-agent' in options.headers - ? `${options.headers['user-agent']}/${packageJson.name}/${packageJson.version}` + const userAgentKey = Object.keys(options.headers ?? {}).find((key) => key.toLowerCase() === 'user-agent'); + const userAgentValue = userAgentKey ? options.headers?.[userAgentKey] : undefined; + const userAgentHeader = userAgentValue + ? `${userAgentValue}/${packageJson.name}/${packageJson.version}` : `${packageJson.name}/${packageJson.version}`; + const disallowed = new Set([ + 'content-length', + 'transfer-encoding', + 'connection', + 'host', + 'accept-encoding', + 'keep-alive', + ]); + const extra = Object.fromEntries(Object.entries(options.headers ?? {}).filter(([k]) => !disallowed.has(k.toLowerCase()))); + const hasBody = options.body !== undefined && options.body !== null; const headers = { - 'content-type': contentType, - 'x-api-key': this.apiKey, + ...(hasBody ? { 'content-type': contentType } : {}), + ...extra, + 'x-api-key': currentApiKey, 'user-agent': userAgentHeader, - ...options.headers, }; - const { headers: _, ...optionsWithoutHeaders } = options; + const { headers: _ignored, ...optionsWithoutHeaders } = options; const response = await fetch(`${this.baseUrl}${endpoint}`, { ...optionsWithoutHeaders, headers, + signal: AbortSignal.timeout(300000), }); if (!response.ok) { await this.handleErrorResponse(response); diff --git a/dist/src/index.js b/dist/src/index.js index 83a1689..1c7e714 100755 --- a/dist/src/index.js +++ b/dist/src/index.js @@ -1,9 +1,8 @@ #!/usr/bin/env node import dotenv from 'dotenv'; -import { Server } from '@modelcontextprotocol/sdk/server/index.js'; +import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; -import { CallToolRequestSchema, ErrorCode, isInitializeRequest, ListToolsRequestSchema, McpError, } from '@modelcontextprotocol/sdk/types.js'; -import zodToJsonSchema from 'zod-to-json-schema'; +import { ErrorCode, isInitializeRequest, McpError, } from '@modelcontextprotocol/sdk/types.js'; import packageJson from '../package.json' with { type: 'json' }; import { readdir } from 'node:fs/promises'; import { join, dirname } from 'node:path'; @@ -108,7 +107,11 @@ async function run() { process.exit(1); } } - const client = PostmanAPIClient.getInstance(); + const apiKey = process.env.POSTMAN_API_KEY; + if (!apiKey) { + log('error', 'POSTMAN_API_KEY environment variable is required for STDIO mode'); + process.exit(1); + } const allGeneratedTools = await loadAllTools(); log('info', 'Server initialization starting', { serverName: SERVER_NAME, @@ -118,7 +121,7 @@ async function run() { const fullTools = allGeneratedTools.filter((t) => enabledResources.full.includes(t.method)); const minimalTools = allGeneratedTools.filter((t) => enabledResources.minimal.includes(t.method)); const tools = useFull ? fullTools : minimalTools; - const server = new Server({ name: SERVER_NAME, version: APP_VERSION }, { capabilities: { tools: {}, logging: {} } }); + const server = new McpServer({ name: SERVER_NAME, version: APP_VERSION }); server.onerror = (error) => { const msg = String(error?.message || error); logBoth(server, 'error', `MCP server error: ${msg}`, { error: msg }); @@ -128,52 +131,37 @@ async function run() { await server.close(); process.exit(0); }); - log('info', 'Setting up request handlers'); - server.setRequestHandler(CallToolRequestSchema, async (request, extra) => { - const toolName = request.params.name; - const tool = tools.find((t) => t.method === toolName); - log('info', `Tool invocation started: ${toolName}`, { toolName }); - if (!tool) { - log('warn', `Unknown tool requested: ${toolName}`, { toolName }); - throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${toolName}`); - } - const args = request.params.arguments || {}; - try { - const start = Date.now(); - const result = await tool.handler(args, { - client, - headers: { - ...extra.requestInfo?.headers, - 'user-agent': clientInfo?.name, - }, - }); - const durationMs = Date.now() - start; - log('info', `Tool invocation completed: ${toolName} (${durationMs}ms)`, { - toolName, - durationMs, - }); - return result; - } - catch (error) { - const errMsg = String(error?.message || error); - logBoth(server, 'error', `Tool invocation failed: ${toolName}: ${errMsg}`, { toolName }); - if (error instanceof McpError) - throw error; - throw new McpError(ErrorCode.InternalError, `API error: ${error.message}`); - } - }); - server.setRequestHandler(ListToolsRequestSchema, async () => { - log('debug', `Tools list requested; ${tools.length} tools available`, { - toolCount: tools.length, + const client = new PostmanAPIClient(apiKey); + log('info', 'Registering tools with McpServer'); + for (const tool of tools) { + server.tool(tool.method, tool.description, tool.parameters.shape, tool.annotations || {}, async (args, extra) => { + const toolName = tool.method; + log('info', `Tool invocation started: ${toolName}`, { toolName }); + try { + const start = Date.now(); + const result = await tool.handler(args, { + client, + headers: { + ...extra?.requestInfo?.headers, + 'user-agent': clientInfo?.name, + }, + }); + const durationMs = Date.now() - start; + log('info', `Tool invocation completed: ${toolName} (${durationMs}ms)`, { + toolName, + durationMs, + }); + return result; + } + catch (error) { + const errMsg = String(error?.message || error); + logBoth(server, 'error', `Tool invocation failed: ${toolName}: ${errMsg}`, { toolName }); + if (error instanceof McpError) + throw error; + throw new McpError(ErrorCode.InternalError, `API error: ${error.message}`); + } }); - const transformedTools = tools.map((tool) => ({ - name: tool.method, - description: tool.description, - inputSchema: zodToJsonSchema(tool.parameters), - annotations: tool.annotations, - })); - return { tools: transformedTools }; - }); + } log('info', 'Starting stdio transport'); const transport = new StdioServerTransport(); transport.onmessage = (message) => { diff --git a/dist/src/tools/createCollection.js b/dist/src/tools/createCollection.js index 6e31d91..48f973c 100644 --- a/dist/src/tools/createCollection.js +++ b/dist/src/tools/createCollection.js @@ -6,7 +6,7 @@ function asMcpError(error) { return new McpError(ErrorCode.InternalError, cause); } export const method = 'createCollection'; -export const description = 'Creates a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\n- If you do not include the \\`workspace\\` query parameter, the system creates the collection in the oldest personal Internal workspace you own.\n- For a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n - \\`info\\` object — Refer to the **Information** entry.\n - \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n'; +export const description = 'Creates a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\nIf you do not include the \\`workspace\\` query parameter, the system creates the collection in the oldest personal Internal workspace you own.\n'; export const parameters = z.object({ workspace: z.string().describe("The workspace's ID."), collection: z @@ -28,18 +28,18 @@ export const parameters = z.object({ .array(z .object({ key: z.string().describe("The variable's key (name).").optional(), - value: z.string().describe("The key's value.").optional(), - type: z - .enum(['string', 'boolean', 'integer']) - .describe("The variable's type.") + value: z + .union([z.string(), z.boolean(), z.number().int()]) + .describe("The key's value.") .optional(), description: z .string() - .describe("The variable's description. Doesn't apply to collection-level variables.") + .max(512) + .describe("The variable's description.") .optional(), disabled: z .boolean() - .describe('If true, the variable is not enabled.') + .describe("If true, the variable is not enabled. Doesn't apply to path parameter variables.") .default(false), }) .describe('Information about the variable.')) @@ -514,18 +514,14 @@ export const parameters = z.object({ .array(z .object({ key: z.string().describe("The variable's key (name).").optional(), - value: z.string().describe("The key's value.").optional(), - type: z - .enum(['string', 'boolean', 'integer']) - .describe("The variable's type.") - .optional(), - description: z - .string() - .describe("The variable's description. Doesn't apply to collection-level variables.") + value: z + .union([z.string(), z.boolean(), z.number().int()]) + .describe("The key's value.") .optional(), + description: z.string().max(512).describe("The variable's description.").optional(), disabled: z .boolean() - .describe('If true, the variable is not enabled.') + .describe("If true, the variable is not enabled. Doesn't apply to path parameter variables.") .default(false), }) .describe('Information about the variable.')) @@ -782,7 +778,7 @@ export const parameters = z.object({ .optional(), }); export const annotations = { - title: 'Creates a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\n- If you do not include the \\`workspace\\` query parameter, the system creates the collection in the oldest personal Internal workspace you own.\n- For a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n - \\`info\\` object — Refer to the **Information** entry.\n - \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n', + title: 'Creates a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\nIf you do not include the \\`workspace\\` query parameter, the system creates the collection in the oldest personal Internal workspace you own.\n', readOnlyHint: false, destructiveHint: false, idempotentHint: false, diff --git a/dist/src/tools/createCollectionComment.js b/dist/src/tools/createCollectionComment.js index eabaeca..6df5bf1 100644 --- a/dist/src/tools/createCollectionComment.js +++ b/dist/src/tools/createCollectionComment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -34,18 +34,18 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/comments`; + const endpoint = `/collections/${args.collectionId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.body !== undefined) - bodyPayload.body = params.body; - if (params.threadId !== undefined) - bodyPayload.threadId = params.threadId; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.body !== undefined) + bodyPayload.body = args.body; + if (args.threadId !== undefined) + bodyPayload.threadId = args.threadId; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createCollectionFolder.js b/dist/src/tools/createCollectionFolder.js index 3f346d5..46e586d 100644 --- a/dist/src/tools/createCollectionFolder.js +++ b/dist/src/tools/createCollectionFolder.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -21,16 +21,16 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/folders`; + const endpoint = `/collections/${args.collectionId}/folders`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; - if (params.folder !== undefined) - bodyPayload.folder = params.folder; + if (args.name !== undefined) + bodyPayload.name = args.name; + if (args.folder !== undefined) + bodyPayload.folder = args.folder; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createCollectionFork.js b/dist/src/tools/createCollectionFork.js index 288bf15..440c180 100644 --- a/dist/src/tools/createCollectionFork.js +++ b/dist/src/tools/createCollectionFork.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -18,16 +18,16 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/fork/${params.collectionId}`; + const endpoint = `/collections/fork/${args.collectionId}`; const query = new URLSearchParams(); - if (params.workspace !== undefined) - query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) + query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.label !== undefined) - bodyPayload.label = params.label; + if (args.label !== undefined) + bodyPayload.label = args.label; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createCollectionRequest.js b/dist/src/tools/createCollectionRequest.js index f0cac56..9a6ccaf 100644 --- a/dist/src/tools/createCollectionRequest.js +++ b/dist/src/tools/createCollectionRequest.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -24,16 +24,16 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/requests`; + const endpoint = `/collections/${args.collectionId}/requests`; const query = new URLSearchParams(); - if (params.folderId !== undefined) - query.set('folderId', String(params.folderId)); + if (args.folderId !== undefined) + query.set('folderId', String(args.folderId)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; + if (args.name !== undefined) + bodyPayload.name = args.name; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createCollectionResponse.js b/dist/src/tools/createCollectionResponse.js index 223ab1f..1477483 100644 --- a/dist/src/tools/createCollectionResponse.js +++ b/dist/src/tools/createCollectionResponse.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -21,16 +21,16 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/responses`; + const endpoint = `/collections/${args.collectionId}/responses`; const query = new URLSearchParams(); - if (params.requestId !== undefined) - query.set('requestId', String(params.requestId)); + if (args.requestId !== undefined) + query.set('requestId', String(args.requestId)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; + if (args.name !== undefined) + bodyPayload.name = args.name; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createEnvironment.js b/dist/src/tools/createEnvironment.js index 2dfa207..e3ded37 100644 --- a/dist/src/tools/createEnvironment.js +++ b/dist/src/tools/createEnvironment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -37,16 +37,16 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/environments`; const query = new URLSearchParams(); - if (params.workspace !== undefined) - query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) + query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.environment !== undefined) - bodyPayload.environment = params.environment; + if (args.environment !== undefined) + bodyPayload.environment = args.environment; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createFolderComment.js b/dist/src/tools/createFolderComment.js index 3d8cd3e..1cbf53f 100644 --- a/dist/src/tools/createFolderComment.js +++ b/dist/src/tools/createFolderComment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -35,18 +35,18 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.body !== undefined) - bodyPayload.body = params.body; - if (params.threadId !== undefined) - bodyPayload.threadId = params.threadId; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.body !== undefined) + bodyPayload.body = args.body; + if (args.threadId !== undefined) + bodyPayload.threadId = args.threadId; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createMock.js b/dist/src/tools/createMock.js index 219ac0e..b9865cb 100644 --- a/dist/src/tools/createMock.js +++ b/dist/src/tools/createMock.js @@ -1,12 +1,12 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'createMock'; -export const description = 'Creates a mock server in a collection.\n\n**Note:**\n\n- You cannot create mocks for collections added to an API definition.\n- If you do not include the \\`workspaceId\\` query parameter, the system creates the mock server in the oldest personal Internal workspace you own.\n'; +export const description = 'Creates a mock server in a collection.\n\n- Pass the collection UID (ownerId-collectionId), not the bare collection ID.\n- If you only have a \\`collectionId\\`, resolve the UID first:\n 1) Prefer GET \\`/collections/{collectionId}\\` and read \\`uid\\`, or\n 2) Construct \\`{ownerId}-{collectionId}\\` using ownerId from GET \\`/me\\`:\n - For team-owned collections: \\`ownerId = me.teamId\\`\n - For personal collections: \\`ownerId = me.user.id\\`\n- Use the \\`workspace\\` query to place the mock in a specific workspace. Prefer explicit workspace scoping.\n'; export const parameters = z.object({ workspace: z.string().describe("The workspace's ID."), mock: z @@ -25,21 +25,21 @@ export const parameters = z.object({ .optional(), }); export const annotations = { - title: 'Creates a mock server in a collection.\n\n**Note:**\n\n- You cannot create mocks for collections added to an API definition.\n- If you do not include the \\`workspaceId\\` query parameter, the system creates the mock server in the oldest personal Internal workspace you own.\n', + title: 'Creates a mock server in a collection.\n\n- Pass the collection UID (ownerId-collectionId), not the bare collection ID.\n- If you only have a \\`collectionId\\`, resolve the UID first:\n 1) Prefer GET \\`/collections/{collectionId}\\` and read \\`uid\\`, or\n 2) Construct \\`{ownerId}-{collectionId}\\` using ownerId from GET \\`/me\\`:\n - For team-owned collections: \\`ownerId = me.teamId\\`\n - For personal collections: \\`ownerId = me.user.id\\`\n- Use the \\`workspace\\` query to place the mock in a specific workspace. Prefer explicit workspace scoping.\n', readOnlyHint: false, destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/mocks`; const query = new URLSearchParams(); - if (params.workspace !== undefined) - query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) + query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.mock !== undefined) - bodyPayload.mock = params.mock; + if (args.mock !== undefined) + bodyPayload.mock = args.mock; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createMonitor.js b/dist/src/tools/createMonitor.js index 5bb95cc..a79f6ee 100644 --- a/dist/src/tools/createMonitor.js +++ b/dist/src/tools/createMonitor.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -121,16 +121,16 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/monitors`; const query = new URLSearchParams(); - if (params.workspace !== undefined) - query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) + query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.monitor !== undefined) - bodyPayload.monitor = params.monitor; + if (args.monitor !== undefined) + bodyPayload.monitor = args.monitor; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createRequestComment.js b/dist/src/tools/createRequestComment.js index 8058e7c..0c91a6b 100644 --- a/dist/src/tools/createRequestComment.js +++ b/dist/src/tools/createRequestComment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -37,18 +37,18 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}/comments`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.body !== undefined) - bodyPayload.body = params.body; - if (params.threadId !== undefined) - bodyPayload.threadId = params.threadId; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.body !== undefined) + bodyPayload.body = args.body; + if (args.threadId !== undefined) + bodyPayload.threadId = args.threadId; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createResponseComment.js b/dist/src/tools/createResponseComment.js index 5c119d6..e367ce4 100644 --- a/dist/src/tools/createResponseComment.js +++ b/dist/src/tools/createResponseComment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -35,18 +35,18 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.body !== undefined) - bodyPayload.body = params.body; - if (params.threadId !== undefined) - bodyPayload.threadId = params.threadId; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.body !== undefined) + bodyPayload.body = args.body; + if (args.threadId !== undefined) + bodyPayload.threadId = args.threadId; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createSpec.js b/dist/src/tools/createSpec.js index 701dc7c..e9a9738 100644 --- a/dist/src/tools/createSpec.js +++ b/dist/src/tools/createSpec.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -33,20 +33,20 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/specs`; const query = new URLSearchParams(); - if (params.workspaceId !== undefined) - query.set('workspaceId', String(params.workspaceId)); + if (args.workspaceId !== undefined) + query.set('workspaceId', String(args.workspaceId)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; - if (params.type !== undefined) - bodyPayload.type = params.type; - if (params.files !== undefined) - bodyPayload.files = params.files; + if (args.name !== undefined) + bodyPayload.name = args.name; + if (args.type !== undefined) + bodyPayload.type = args.type; + if (args.files !== undefined) + bodyPayload.files = args.files; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createSpecFile.js b/dist/src/tools/createSpecFile.js index eafa9fc..4ff65bc 100644 --- a/dist/src/tools/createSpecFile.js +++ b/dist/src/tools/createSpecFile.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -18,16 +18,16 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}/files`; + const endpoint = `/specs/${args.specId}/files`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.path !== undefined) - bodyPayload.path = params.path; - if (params.content !== undefined) - bodyPayload.content = params.content; + if (args.path !== undefined) + bodyPayload.path = args.path; + if (args.content !== undefined) + bodyPayload.content = args.content; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/createWorkspace.js b/dist/src/tools/createWorkspace.js index 789b415..f305f9a 100644 --- a/dist/src/tools/createWorkspace.js +++ b/dist/src/tools/createWorkspace.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -26,14 +26,14 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/workspaces`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.workspace !== undefined) - bodyPayload.workspace = params.workspace; + if (args.workspace !== undefined) + bodyPayload.workspace = args.workspace; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/deleteApiCollectionComment.js b/dist/src/tools/deleteApiCollectionComment.js index a01b17d..ace59c0 100644 --- a/dist/src/tools/deleteApiCollectionComment.js +++ b/dist/src/tools/deleteApiCollectionComment.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -17,9 +17,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/apis/${params.apiId}/collections/${params.collectionId}/comments/${params.commentId}`; + const endpoint = `/apis/${args.apiId}/collections/${args.collectionId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteCollection.js b/dist/src/tools/deleteCollection.js index 39065b2..db944f3 100644 --- a/dist/src/tools/deleteCollection.js +++ b/dist/src/tools/deleteCollection.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -17,9 +17,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}`; + const endpoint = `/collections/${args.collectionId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteCollectionComment.js b/dist/src/tools/deleteCollectionComment.js index f944247..64399a4 100644 --- a/dist/src/tools/deleteCollectionComment.js +++ b/dist/src/tools/deleteCollectionComment.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,9 +16,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteCollectionFolder.js b/dist/src/tools/deleteCollectionFolder.js index ea60315..84b9004 100644 --- a/dist/src/tools/deleteCollectionFolder.js +++ b/dist/src/tools/deleteCollectionFolder.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,9 +16,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteCollectionRequest.js b/dist/src/tools/deleteCollectionRequest.js index 5509a21..e291f74 100644 --- a/dist/src/tools/deleteCollectionRequest.js +++ b/dist/src/tools/deleteCollectionRequest.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,9 +16,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteCollectionResponse.js b/dist/src/tools/deleteCollectionResponse.js index a768f98..51e8a02 100644 --- a/dist/src/tools/deleteCollectionResponse.js +++ b/dist/src/tools/deleteCollectionResponse.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,9 +16,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteEnvironment.js b/dist/src/tools/deleteEnvironment.js index 341a862..f09ffb3 100644 --- a/dist/src/tools/deleteEnvironment.js +++ b/dist/src/tools/deleteEnvironment.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/environments/${params.environmentId}`; + const endpoint = `/environments/${args.environmentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteFolderComment.js b/dist/src/tools/deleteFolderComment.js index b8db80b..7391f5e 100644 --- a/dist/src/tools/deleteFolderComment.js +++ b/dist/src/tools/deleteFolderComment.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -17,9 +17,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteMock.js b/dist/src/tools/deleteMock.js index fbf9d1c..864d2ff 100644 --- a/dist/src/tools/deleteMock.js +++ b/dist/src/tools/deleteMock.js @@ -1,21 +1,21 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'deleteMock'; -export const description = 'Deletes a mock server.'; +export const description = 'Deletes a mock server.\n- Resource: Mock server entity. This is destructive.\n- Ensure you are targeting the correct mock ID.\n'; export const parameters = z.object({ mockId: z.string().describe("The mock's ID.") }); export const annotations = { - title: 'Deletes a mock server.', + title: 'Deletes a mock server.\n- Resource: Mock server entity. This is destructive.\n- Ensure you are targeting the correct mock ID.\n', readOnlyHint: false, destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/mocks/${params.mockId}`; + const endpoint = `/mocks/${args.mockId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteMonitor.js b/dist/src/tools/deleteMonitor.js index 4ac19d4..3c361da 100644 --- a/dist/src/tools/deleteMonitor.js +++ b/dist/src/tools/deleteMonitor.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/monitors/${params.monitorId}`; + const endpoint = `/monitors/${args.monitorId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deletePanElementOrFolder.js b/dist/src/tools/deletePanElementOrFolder.js index 0c201aa..c90cf2f 100644 --- a/dist/src/tools/deletePanElementOrFolder.js +++ b/dist/src/tools/deletePanElementOrFolder.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -18,9 +18,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/network/private/${params.elementType}/${params.elementId}`; + const endpoint = `/network/private/${args.elementType}/${args.elementId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteRequestComment.js b/dist/src/tools/deleteRequestComment.js index d5cd9b6..b1e9ed6 100644 --- a/dist/src/tools/deleteRequestComment.js +++ b/dist/src/tools/deleteRequestComment.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -17,9 +17,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteResponseComment.js b/dist/src/tools/deleteResponseComment.js index f042440..c666690 100644 --- a/dist/src/tools/deleteResponseComment.js +++ b/dist/src/tools/deleteResponseComment.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -17,9 +17,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteSpec.js b/dist/src/tools/deleteSpec.js index 2607474..b4a3bdd 100644 --- a/dist/src/tools/deleteSpec.js +++ b/dist/src/tools/deleteSpec.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}`; + const endpoint = `/specs/${args.specId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteSpecFile.js b/dist/src/tools/deleteSpecFile.js index 3e67ffc..0d439b5 100644 --- a/dist/src/tools/deleteSpecFile.js +++ b/dist/src/tools/deleteSpecFile.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,9 +16,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}/files/${params.filePath}`; + const endpoint = `/specs/${args.specId}/files/${args.filePath}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/deleteWorkspace.js b/dist/src/tools/deleteWorkspace.js index 5b27ecd..b986548 100644 --- a/dist/src/tools/deleteWorkspace.js +++ b/dist/src/tools/deleteWorkspace.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/workspaces/${params.workspaceId}`; + const endpoint = `/workspaces/${args.workspaceId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/duplicateCollection.js b/dist/src/tools/duplicateCollection.js index 9b8897f..80a73c2 100644 --- a/dist/src/tools/duplicateCollection.js +++ b/dist/src/tools/duplicateCollection.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -21,16 +21,16 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/duplicates`; + const endpoint = `/collections/${args.collectionId}/duplicates`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.workspace !== undefined) - bodyPayload.workspace = params.workspace; - if (params.suffix !== undefined) - bodyPayload.suffix = params.suffix; + if (args.workspace !== undefined) + bodyPayload.workspace = args.workspace; + if (args.suffix !== undefined) + bodyPayload.suffix = args.suffix; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/generateCollection.js b/dist/src/tools/generateCollection.js index 91cbc88..6268615 100644 --- a/dist/src/tools/generateCollection.js +++ b/dist/src/tools/generateCollection.js @@ -1,16 +1,16 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'generateCollection'; -export const description = 'Creates a collection from the given API specification. The response contains a polling link to the task status.'; +export const description = 'Creates a collection from the given API specification.\nThe specification must already exist or be created before it can be used to generate a collection.\nThe response contains a polling link to the task status.\n'; export const parameters = z.object({ specId: z.string().describe("The spec's ID."), elementType: z.literal('collection').describe('The `collection` element type.'), - name: z.string().describe("The generated collection's name.").optional(), + name: z.string().describe("The generated collection's name."), options: z .object({ requestNameSource: z @@ -55,24 +55,24 @@ export const parameters = z.object({ .default(false), }) .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.") - .optional(), + .default({ enableOptionalParameters: true, folderStrategy: 'Paths' }), }); export const annotations = { - title: 'Creates a collection from the given API specification. The response contains a polling link to the task status.', + title: 'Creates a collection from the given API specification.\nThe specification must already exist or be created before it can be used to generate a collection.\nThe response contains a polling link to the task status.\n', readOnlyHint: false, destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}/generations/${params.elementType}`; + const endpoint = `/specs/${args.specId}/generations/${args.elementType}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; - if (params.options !== undefined) - bodyPayload.options = params.options; + if (args.name !== undefined) + bodyPayload.name = args.name; + if (args.options !== undefined) + bodyPayload.options = args.options; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/generateSpecFromCollection.js b/dist/src/tools/generateSpecFromCollection.js index 4099bbe..ac4a34b 100644 --- a/dist/src/tools/generateSpecFromCollection.js +++ b/dist/src/tools/generateSpecFromCollection.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -20,18 +20,18 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionUid}/generations/${params.elementType}`; + const endpoint = `/collections/${args.collectionUid}/generations/${args.elementType}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; - if (params.type !== undefined) - bodyPayload.type = params.type; - if (params.format !== undefined) - bodyPayload.format = params.format; + if (args.name !== undefined) + bodyPayload.name = args.name; + if (args.type !== undefined) + bodyPayload.type = args.type; + if (args.format !== undefined) + bodyPayload.format = args.format; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/getAllElementsAndFolders.js b/dist/src/tools/getAllElementsAndFolders.js index a7e6469..d328ff9 100644 --- a/dist/src/tools/getAllElementsAndFolders.js +++ b/dist/src/tools/getAllElementsAndFolders.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -73,36 +73,36 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/network/private`; const query = new URLSearchParams(); - if (params.since !== undefined) - query.set('since', String(params.since)); - if (params.until !== undefined) - query.set('until', String(params.until)); - if (params.addedBy !== undefined) - query.set('addedBy', String(params.addedBy)); - if (params.name !== undefined) - query.set('name', String(params.name)); - if (params.summary !== undefined) - query.set('summary', String(params.summary)); - if (params.description !== undefined) - query.set('description', String(params.description)); - if (params.sort !== undefined) - query.set('sort', String(params.sort)); - if (params.direction !== undefined) - query.set('direction', String(params.direction)); - if (params.createdBy !== undefined) - query.set('createdBy', String(params.createdBy)); - if (params.offset !== undefined) - query.set('offset', String(params.offset)); - if (params.limit !== undefined) - query.set('limit', String(params.limit)); - if (params.parentFolderId !== undefined) - query.set('parentFolderId', String(params.parentFolderId)); - if (params.type !== undefined) - query.set('type', String(params.type)); + if (args.since !== undefined) + query.set('since', String(args.since)); + if (args.until !== undefined) + query.set('until', String(args.until)); + if (args.addedBy !== undefined) + query.set('addedBy', String(args.addedBy)); + if (args.name !== undefined) + query.set('name', String(args.name)); + if (args.summary !== undefined) + query.set('summary', String(args.summary)); + if (args.description !== undefined) + query.set('description', String(args.description)); + if (args.sort !== undefined) + query.set('sort', String(args.sort)); + if (args.direction !== undefined) + query.set('direction', String(args.direction)); + if (args.createdBy !== undefined) + query.set('createdBy', String(args.createdBy)); + if (args.offset !== undefined) + query.set('offset', String(args.offset)); + if (args.limit !== undefined) + query.set('limit', String(args.limit)); + if (args.parentFolderId !== undefined) + query.set('parentFolderId', String(args.parentFolderId)); + if (args.type !== undefined) + query.set('type', String(args.type)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getAllPanAddElementRequests.js b/dist/src/tools/getAllPanAddElementRequests.js index 4727086..6e65632 100644 --- a/dist/src/tools/getAllPanAddElementRequests.js +++ b/dist/src/tools/getAllPanAddElementRequests.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -56,30 +56,30 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/network/private/network-entity/request/all`; const query = new URLSearchParams(); - if (params.since !== undefined) - query.set('since', String(params.since)); - if (params.until !== undefined) - query.set('until', String(params.until)); - if (params.requestedBy !== undefined) - query.set('requestedBy', String(params.requestedBy)); - if (params.type !== undefined) - query.set('type', String(params.type)); - if (params.status !== undefined) - query.set('status', String(params.status)); - if (params.name !== undefined) - query.set('name', String(params.name)); - if (params.sort !== undefined) - query.set('sort', String(params.sort)); - if (params.direction !== undefined) - query.set('direction', String(params.direction)); - if (params.offset !== undefined) - query.set('offset', String(params.offset)); - if (params.limit !== undefined) - query.set('limit', String(params.limit)); + if (args.since !== undefined) + query.set('since', String(args.since)); + if (args.until !== undefined) + query.set('until', String(args.until)); + if (args.requestedBy !== undefined) + query.set('requestedBy', String(args.requestedBy)); + if (args.type !== undefined) + query.set('type', String(args.type)); + if (args.status !== undefined) + query.set('status', String(args.status)); + if (args.name !== undefined) + query.set('name', String(args.name)); + if (args.sort !== undefined) + query.set('sort', String(args.sort)); + if (args.direction !== undefined) + query.set('direction', String(args.direction)); + if (args.offset !== undefined) + query.set('offset', String(args.offset)); + if (args.limit !== undefined) + query.set('limit', String(args.limit)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getAllSpecs.js b/dist/src/tools/getAllSpecs.js index 3fe0d5c..037089a 100644 --- a/dist/src/tools/getAllSpecs.js +++ b/dist/src/tools/getAllSpecs.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -24,16 +24,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/specs`; const query = new URLSearchParams(); - if (params.workspaceId !== undefined) - query.set('workspaceId', String(params.workspaceId)); - if (params.cursor !== undefined) - query.set('cursor', String(params.cursor)); - if (params.limit !== undefined) - query.set('limit', String(params.limit)); + if (args.workspaceId !== undefined) + query.set('workspaceId', String(args.workspaceId)); + if (args.cursor !== undefined) + query.set('cursor', String(args.cursor)); + if (args.limit !== undefined) + query.set('limit', String(args.limit)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getAsyncSpecTaskStatus.js b/dist/src/tools/getAsyncSpecTaskStatus.js index 2375bbc..8ad0e56 100644 --- a/dist/src/tools/getAsyncSpecTaskStatus.js +++ b/dist/src/tools/getAsyncSpecTaskStatus.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -17,9 +17,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/${params.elementType}/${params.elementId}/tasks/${params.taskId}`; + const endpoint = `/${args.elementType}/${args.elementId}/tasks/${args.taskId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getAuthenticatedUser.js b/dist/src/tools/getAuthenticatedUser.js index 1cf8aaa..89d1b6e 100644 --- a/dist/src/tools/getAuthenticatedUser.js +++ b/dist/src/tools/getAuthenticatedUser.js @@ -1,19 +1,19 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'getAuthenticatedUser'; -export const description = 'Gets information about the authenticated user.\n\n**Note:**\n\n- This API returns a different response for users with the [Guest and Partner roles](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles).\n- The \\`flow_count\\` response only returns for users on [Free plans](https://www.postman.com/pricing/).\n'; +export const description = 'Gets information about the authenticated user.\n- This endpoint provides “current user” context (\\`user.id\\`, \\`username\\`, \\`teamId\\`, roles).\n- When a user asks for “my …” (e.g., “my workspaces, my information, etc.”), call this first to resolve the user ID.\n'; export const parameters = z.object({}); export const annotations = { - title: 'Gets information about the authenticated user.\n\n**Note:**\n\n- This API returns a different response for users with the [Guest and Partner roles](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles).\n- The \\`flow_count\\` response only returns for users on [Free plans](https://www.postman.com/pricing/).\n', + title: 'Gets information about the authenticated user.\n- This endpoint provides “current user” context (\\`user.id\\`, \\`username\\`, \\`teamId\\`, roles).\n- When a user asks for “my …” (e.g., “my workspaces, my information, etc.”), call this first to resolve the user ID.\n', readOnlyHint: true, destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/me`; const query = new URLSearchParams(); diff --git a/dist/src/tools/getCollection.js b/dist/src/tools/getCollection.js index e27a4e3..e12f004 100644 --- a/dist/src/tools/getCollection.js +++ b/dist/src/tools/getCollection.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -25,14 +25,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}`; + const endpoint = `/collections/${args.collectionId}`; const query = new URLSearchParams(); - if (params.access_key !== undefined) - query.set('access_key', String(params.access_key)); - if (params.model !== undefined) - query.set('model', String(params.model)); + if (args.access_key !== undefined) + query.set('access_key', String(args.access_key)); + if (args.model !== undefined) + query.set('model', String(args.model)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getCollectionComments.js b/dist/src/tools/getCollectionComments.js index 6b51be2..f1ea692 100644 --- a/dist/src/tools/getCollectionComments.js +++ b/dist/src/tools/getCollectionComments.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -15,9 +15,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/comments`; + const endpoint = `/collections/${args.collectionId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getCollectionFolder.js b/dist/src/tools/getCollectionFolder.js index aa8fbde..5dc4c1f 100644 --- a/dist/src/tools/getCollectionFolder.js +++ b/dist/src/tools/getCollectionFolder.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -25,16 +25,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}`; const query = new URLSearchParams(); - if (params.ids !== undefined) - query.set('ids', String(params.ids)); - if (params.uid !== undefined) - query.set('uid', String(params.uid)); - if (params.populate !== undefined) - query.set('populate', String(params.populate)); + if (args.ids !== undefined) + query.set('ids', String(args.ids)); + if (args.uid !== undefined) + query.set('uid', String(args.uid)); + if (args.populate !== undefined) + query.set('populate', String(args.populate)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getCollectionForks.js b/dist/src/tools/getCollectionForks.js index c3b31e3..48943a1 100644 --- a/dist/src/tools/getCollectionForks.js +++ b/dist/src/tools/getCollectionForks.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -28,16 +28,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/forks`; + const endpoint = `/collections/${args.collectionId}/forks`; const query = new URLSearchParams(); - if (params.cursor !== undefined) - query.set('cursor', String(params.cursor)); - if (params.limit !== undefined) - query.set('limit', String(params.limit)); - if (params.direction !== undefined) - query.set('direction', String(params.direction)); + if (args.cursor !== undefined) + query.set('cursor', String(args.cursor)); + if (args.limit !== undefined) + query.set('limit', String(args.limit)); + if (args.direction !== undefined) + query.set('direction', String(args.direction)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getCollectionRequest.js b/dist/src/tools/getCollectionRequest.js index dfcd181..6ce2622 100644 --- a/dist/src/tools/getCollectionRequest.js +++ b/dist/src/tools/getCollectionRequest.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -25,16 +25,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}`; const query = new URLSearchParams(); - if (params.ids !== undefined) - query.set('ids', String(params.ids)); - if (params.uid !== undefined) - query.set('uid', String(params.uid)); - if (params.populate !== undefined) - query.set('populate', String(params.populate)); + if (args.ids !== undefined) + query.set('ids', String(args.ids)); + if (args.uid !== undefined) + query.set('uid', String(args.uid)); + if (args.populate !== undefined) + query.set('populate', String(args.populate)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getCollectionResponse.js b/dist/src/tools/getCollectionResponse.js index f2b15e7..f266664 100644 --- a/dist/src/tools/getCollectionResponse.js +++ b/dist/src/tools/getCollectionResponse.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -25,16 +25,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}`; const query = new URLSearchParams(); - if (params.ids !== undefined) - query.set('ids', String(params.ids)); - if (params.uid !== undefined) - query.set('uid', String(params.uid)); - if (params.populate !== undefined) - query.set('populate', String(params.populate)); + if (args.ids !== undefined) + query.set('ids', String(args.ids)); + if (args.uid !== undefined) + query.set('uid', String(args.uid)); + if (args.populate !== undefined) + query.set('populate', String(args.populate)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getCollectionTags.js b/dist/src/tools/getCollectionTags.js index 489da1d..d31b47c 100644 --- a/dist/src/tools/getCollectionTags.js +++ b/dist/src/tools/getCollectionTags.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -15,9 +15,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/tags`; + const endpoint = `/collections/${args.collectionId}/tags`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getCollectionUpdatesTasks.js b/dist/src/tools/getCollectionUpdatesTasks.js index 351a2a9..59af186 100644 --- a/dist/src/tools/getCollectionUpdatesTasks.js +++ b/dist/src/tools/getCollectionUpdatesTasks.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collection-updates-tasks/${params.taskId}`; + const endpoint = `/collection-updates-tasks/${args.taskId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getCollections.js b/dist/src/tools/getCollections.js index d98cc6b..896df18 100644 --- a/dist/src/tools/getCollections.js +++ b/dist/src/tools/getCollections.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -26,18 +26,18 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/collections`; const query = new URLSearchParams(); - if (params.workspace !== undefined) - query.set('workspace', String(params.workspace)); - if (params.name !== undefined) - query.set('name', String(params.name)); - if (params.limit !== undefined) - query.set('limit', String(params.limit)); - if (params.offset !== undefined) - query.set('offset', String(params.offset)); + if (args.workspace !== undefined) + query.set('workspace', String(args.workspace)); + if (args.name !== undefined) + query.set('name', String(args.name)); + if (args.limit !== undefined) + query.set('limit', String(args.limit)); + if (args.offset !== undefined) + query.set('offset', String(args.offset)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getCollectionsForkedByUser.js b/dist/src/tools/getCollectionsForkedByUser.js index d429679..a40b679 100644 --- a/dist/src/tools/getCollectionsForkedByUser.js +++ b/dist/src/tools/getCollectionsForkedByUser.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -27,16 +27,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/collections/collection-forks`; const query = new URLSearchParams(); - if (params.cursor !== undefined) - query.set('cursor', String(params.cursor)); - if (params.limit !== undefined) - query.set('limit', String(params.limit)); - if (params.direction !== undefined) - query.set('direction', String(params.direction)); + if (args.cursor !== undefined) + query.set('cursor', String(args.cursor)); + if (args.limit !== undefined) + query.set('limit', String(args.limit)); + if (args.direction !== undefined) + query.set('direction', String(args.direction)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getDuplicateCollectionTaskStatus.js b/dist/src/tools/getDuplicateCollectionTaskStatus.js index f5b7ecc..2902e36 100644 --- a/dist/src/tools/getDuplicateCollectionTaskStatus.js +++ b/dist/src/tools/getDuplicateCollectionTaskStatus.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collection-duplicate-tasks/${params.taskId}`; + const endpoint = `/collection-duplicate-tasks/${args.taskId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getEnvironment.js b/dist/src/tools/getEnvironment.js index e0a9236..f8bbec3 100644 --- a/dist/src/tools/getEnvironment.js +++ b/dist/src/tools/getEnvironment.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/environments/${params.environmentId}`; + const endpoint = `/environments/${args.environmentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getEnvironments.js b/dist/src/tools/getEnvironments.js index 7736c86..b5f174d 100644 --- a/dist/src/tools/getEnvironments.js +++ b/dist/src/tools/getEnvironments.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -15,12 +15,12 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/environments`; const query = new URLSearchParams(); - if (params.workspace !== undefined) - query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) + query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getFolderComments.js b/dist/src/tools/getFolderComments.js index 6de1d4c..175e202 100644 --- a/dist/src/tools/getFolderComments.js +++ b/dist/src/tools/getFolderComments.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,9 +16,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getGeneratedCollectionSpecs.js b/dist/src/tools/getGeneratedCollectionSpecs.js index 748076d..2256ce0 100644 --- a/dist/src/tools/getGeneratedCollectionSpecs.js +++ b/dist/src/tools/getGeneratedCollectionSpecs.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,9 +16,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionUid}/generations/${params.elementType}`; + const endpoint = `/collections/${args.collectionUid}/generations/${args.elementType}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getMock.js b/dist/src/tools/getMock.js index b0a7d1d..518cde9 100644 --- a/dist/src/tools/getMock.js +++ b/dist/src/tools/getMock.js @@ -1,21 +1,21 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'getMock'; -export const description = 'Gets information about a mock server.'; +export const description = 'Gets information about a mock server.\n- Resource: Mock server entity. Response includes the associated \\`collection\\` UID and \\`mockUrl\\`.\n- Use the \\`collection\\` UID to navigate back to the source collection.\n'; export const parameters = z.object({ mockId: z.string().describe("The mock's ID.") }); export const annotations = { - title: 'Gets information about a mock server.', + title: 'Gets information about a mock server.\n- Resource: Mock server entity. Response includes the associated \\`collection\\` UID and \\`mockUrl\\`.\n- Use the \\`collection\\` UID to navigate back to the source collection.\n', readOnlyHint: true, destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/mocks/${params.mockId}`; + const endpoint = `/mocks/${args.mockId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getMocks.js b/dist/src/tools/getMocks.js index dc2ec47..f637603 100644 --- a/dist/src/tools/getMocks.js +++ b/dist/src/tools/getMocks.js @@ -1,29 +1,35 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'getMocks'; -export const description = 'Gets all active mock servers. By default, this endpoint returns only mock servers you created across all workspaces.\n\n**Note:**\n\nIf you pass both the \\`teamId\\` and \\`workspace\\` query parameters, this endpoint only accepts the \\`workspace\\` query.\n'; +export const description = 'Gets all active mock servers. By default, returns only mock servers you created across all workspaces.\n\n- Always pass either the \\`workspace\\` or \\`teamId\\` query to scope results. Prefer \\`workspace\\` when known.\n- If you need team-scoped results, set \\`teamId\\` from the current user: call GET \\`/me\\` and use \\`me.teamId\\`.\n- If both \\`teamId\\` and \\`workspace\\` are passed, only \\`workspace\\` is used.\n'; export const parameters = z.object({ - teamId: z.string().describe('Return only results that belong to the given team ID.').optional(), - workspace: z.string().describe('Return only results found in the given workspace ID.').optional(), + teamId: z + .string() + .describe('Return only results that belong to the given team ID.\n- For team-scoped requests, set this from GET `/me` (`me.teamId`).\n') + .optional(), + workspace: z + .string() + .describe('Return only results found in the given workspace ID.\n- Prefer this parameter when the user mentions a specific workspace.\n') + .optional(), }); export const annotations = { - title: 'Gets all active mock servers. By default, this endpoint returns only mock servers you created across all workspaces.\n\n**Note:**\n\nIf you pass both the \\`teamId\\` and \\`workspace\\` query parameters, this endpoint only accepts the \\`workspace\\` query.\n', + title: 'Gets all active mock servers. By default, returns only mock servers you created across all workspaces.\n\n- Always pass either the \\`workspace\\` or \\`teamId\\` query to scope results. Prefer \\`workspace\\` when known.\n- If you need team-scoped results, set \\`teamId\\` from the current user: call GET \\`/me\\` and use \\`me.teamId\\`.\n- If both \\`teamId\\` and \\`workspace\\` are passed, only \\`workspace\\` is used.\n', readOnlyHint: true, destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/mocks`; const query = new URLSearchParams(); - if (params.teamId !== undefined) - query.set('teamId', String(params.teamId)); - if (params.workspace !== undefined) - query.set('workspace', String(params.workspace)); + if (args.teamId !== undefined) + query.set('teamId', String(args.teamId)); + if (args.workspace !== undefined) + query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getMonitor.js b/dist/src/tools/getMonitor.js index 2c1137f..a948472 100644 --- a/dist/src/tools/getMonitor.js +++ b/dist/src/tools/getMonitor.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/monitors/${params.monitorId}`; + const endpoint = `/monitors/${args.monitorId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getMonitors.js b/dist/src/tools/getMonitors.js index ee02f07..f8688d8 100644 --- a/dist/src/tools/getMonitors.js +++ b/dist/src/tools/getMonitors.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -35,24 +35,24 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/monitors`; const query = new URLSearchParams(); - if (params.workspace !== undefined) - query.set('workspace', String(params.workspace)); - if (params.active !== undefined) - query.set('active', String(params.active)); - if (params.owner !== undefined) - query.set('owner', String(params.owner)); - if (params.collectionUid !== undefined) - query.set('collectionUid', String(params.collectionUid)); - if (params.environmentUid !== undefined) - query.set('environmentUid', String(params.environmentUid)); - if (params.cursor !== undefined) - query.set('cursor', String(params.cursor)); - if (params.limit !== undefined) - query.set('limit', String(params.limit)); + if (args.workspace !== undefined) + query.set('workspace', String(args.workspace)); + if (args.active !== undefined) + query.set('active', String(args.active)); + if (args.owner !== undefined) + query.set('owner', String(args.owner)); + if (args.collectionUid !== undefined) + query.set('collectionUid', String(args.collectionUid)); + if (args.environmentUid !== undefined) + query.set('environmentUid', String(args.environmentUid)); + if (args.cursor !== undefined) + query.set('cursor', String(args.cursor)); + if (args.limit !== undefined) + query.set('limit', String(args.limit)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getRequestComments.js b/dist/src/tools/getRequestComments.js index 6e80a69..0e6c430 100644 --- a/dist/src/tools/getRequestComments.js +++ b/dist/src/tools/getRequestComments.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -18,9 +18,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}/comments`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getResponseComments.js b/dist/src/tools/getResponseComments.js index 00047c5..153a172 100644 --- a/dist/src/tools/getResponseComments.js +++ b/dist/src/tools/getResponseComments.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,9 +16,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getSourceCollectionStatus.js b/dist/src/tools/getSourceCollectionStatus.js index 9ed2485..330baa0 100644 --- a/dist/src/tools/getSourceCollectionStatus.js +++ b/dist/src/tools/getSourceCollectionStatus.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/source-status`; + const endpoint = `/collections/${args.collectionId}/source-status`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getSpec.js b/dist/src/tools/getSpec.js index 0a9d336..20d650f 100644 --- a/dist/src/tools/getSpec.js +++ b/dist/src/tools/getSpec.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}`; + const endpoint = `/specs/${args.specId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getSpecCollections.js b/dist/src/tools/getSpecCollections.js index 777b22b..fa9b7fa 100644 --- a/dist/src/tools/getSpecCollections.js +++ b/dist/src/tools/getSpecCollections.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -25,14 +25,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}/generations/${params.elementType}`; + const endpoint = `/specs/${args.specId}/generations/${args.elementType}`; const query = new URLSearchParams(); - if (params.limit !== undefined) - query.set('limit', String(params.limit)); - if (params.cursor !== undefined) - query.set('cursor', String(params.cursor)); + if (args.limit !== undefined) + query.set('limit', String(args.limit)); + if (args.cursor !== undefined) + query.set('cursor', String(args.cursor)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getSpecDefinition.js b/dist/src/tools/getSpecDefinition.js index 230461f..cc65ebe 100644 --- a/dist/src/tools/getSpecDefinition.js +++ b/dist/src/tools/getSpecDefinition.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}/definitions`; + const endpoint = `/specs/${args.specId}/definitions`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getSpecFile.js b/dist/src/tools/getSpecFile.js index 8231ab5..f7a3870 100644 --- a/dist/src/tools/getSpecFile.js +++ b/dist/src/tools/getSpecFile.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,9 +16,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}/files/${params.filePath}`; + const endpoint = `/specs/${args.specId}/files/${args.filePath}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getSpecFiles.js b/dist/src/tools/getSpecFiles.js index a65cca2..72c11a0 100644 --- a/dist/src/tools/getSpecFiles.js +++ b/dist/src/tools/getSpecFiles.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}/files`; + const endpoint = `/specs/${args.specId}/files`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getStatusOfAnAsyncApiTask.js b/dist/src/tools/getStatusOfAnAsyncApiTask.js index 4a12554..b44356b 100644 --- a/dist/src/tools/getStatusOfAnAsyncApiTask.js +++ b/dist/src/tools/getStatusOfAnAsyncApiTask.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -19,9 +19,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/apis/${params.apiId}/tasks/${params.taskId}`; + const endpoint = `/apis/${args.apiId}/tasks/${args.taskId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getTaggedEntities.js b/dist/src/tools/getTaggedEntities.js index 305983d..c3d46b5 100644 --- a/dist/src/tools/getTaggedEntities.js +++ b/dist/src/tools/getTaggedEntities.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -38,18 +38,18 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/tags/${params.slug}/entities`; + const endpoint = `/tags/${args.slug}/entities`; const query = new URLSearchParams(); - if (params.limit !== undefined) - query.set('limit', String(params.limit)); - if (params.direction !== undefined) - query.set('direction', String(params.direction)); - if (params.cursor !== undefined) - query.set('cursor', String(params.cursor)); - if (params.entityType !== undefined) - query.set('entityType', String(params.entityType)); + if (args.limit !== undefined) + query.set('limit', String(args.limit)); + if (args.direction !== undefined) + query.set('direction', String(args.direction)); + if (args.cursor !== undefined) + query.set('cursor', String(args.cursor)); + if (args.entityType !== undefined) + query.set('entityType', String(args.entityType)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getWorkspace.js b/dist/src/tools/getWorkspace.js index e450cd3..bc3eacd 100644 --- a/dist/src/tools/getWorkspace.js +++ b/dist/src/tools/getWorkspace.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -19,12 +19,12 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/workspaces/${params.workspaceId}`; + const endpoint = `/workspaces/${args.workspaceId}`; const query = new URLSearchParams(); - if (params.include !== undefined) - query.set('include', String(params.include)); + if (args.include !== undefined) + query.set('include', String(args.include)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/getWorkspaceGlobalVariables.js b/dist/src/tools/getWorkspaceGlobalVariables.js index 10fe0db..473f53e 100644 --- a/dist/src/tools/getWorkspaceGlobalVariables.js +++ b/dist/src/tools/getWorkspaceGlobalVariables.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/workspaces/${params.workspaceId}/global-variables`; + const endpoint = `/workspaces/${args.workspaceId}/global-variables`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getWorkspaceTags.js b/dist/src/tools/getWorkspaceTags.js index 569cd83..4cf844d 100644 --- a/dist/src/tools/getWorkspaceTags.js +++ b/dist/src/tools/getWorkspaceTags.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/workspaces/${params.workspaceId}/tags`; + const endpoint = `/workspaces/${args.workspaceId}/tags`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/getWorkspaces.js b/dist/src/tools/getWorkspaces.js index d7b85b1..caea1f6 100644 --- a/dist/src/tools/getWorkspaces.js +++ b/dist/src/tools/getWorkspaces.js @@ -1,20 +1,20 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'getWorkspaces'; -export const description = "Gets all [workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/). The response includes your workspaces and any workspaces that you have access to.\n\n**Note:**\n\nThis endpoint's response contains the visibility field. Visibility determines who can access the workspace:\n- \\`personal\\` — Only you can access the workspace.\n- \\`team\\` — All team members can access the workspace.\n- \\`private\\` — Only invited team members can access the workspace ([**Professional** and **Enterprise** plans only](https://www.postman.com/pricing)).\n- \\`public\\` — Everyone can access the workspace.\n- \\`partner\\` — Only invited team members and [partners](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) can access the workspace ([**Professional** and **Enterprise** plans only](https://www.postman.com/pricing)).\n"; +export const description = "Gets all workspaces you have access to.\n- For “my …” requests, first call GET \\`/me\\` and pass \\`createdBy={me.user.id}\\`.\n- This endpoint's response contains the visibility field. Visibility determines who can access the workspace:\n - \\`personal\\` — Only you can access the workspace.\n - \\`team\\` — All team members can access the workspace.\n - \\`private\\` — Only invited team members can access the workspace (Professional and Enterprise).\n - \\`public\\` — Everyone can access the workspace.\n - \\`partner\\` — Invited team members and partners (Professional and Enterprise).\n- For tools that require the workspace ID, and no workspace ID is provided, ask the user to provide the workspace ID. If the user does not provide the workspace ID, call this first with the createdBy parameter to use the first workspace.\n- Examples:\n - “List my workspaces” → GET \\`/me\\`, then GET \\`/workspaces?createdBy={me.user.id}\\`\n - “List my personal workspaces” → GET \\`/me\\`, then GET \\`/workspaces?type=personal&createdBy={me.user.id}\\`\n - “List all public workspaces” → GET \\`/workspaces?type=public\\`\n"; export const parameters = z.object({ type: z .enum(['personal', 'team', 'private', 'public', 'partner']) - .describe('The type of workspace to filter the response by.') + .describe('The type of workspace to filter the response by. One of: `personal`, `team`, `private`, `public`, `partner`.\n- For “my …” requests, this can be combined with `createdBy`. If type is not specified, it will search across all types for that user.\n') .optional(), createdBy: z .number() .int() - .describe('Return only workspaces created by a specific user ID. For multiple users, pass this value as a comma-separated list of user IDs. The response only returns workspaces that you have access to.') + .describe("Return only workspaces created by the specified Postman user ID.\n- For “my …” requests, set `createdBy` to the current user’s ID from GET `/me` (`me.user.id`).\n- If the user's ID is not known, first call GET `/me`, then retry with `createdBy`.\n") .optional(), include: z .enum(['mocks:deactivated', 'scim']) @@ -22,21 +22,21 @@ export const parameters = z.object({ .optional(), }); export const annotations = { - title: "Gets all [workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/). The response includes your workspaces and any workspaces that you have access to.\n\n**Note:**\n\nThis endpoint's response contains the visibility field. Visibility determines who can access the workspace:\n- \\`personal\\` — Only you can access the workspace.\n- \\`team\\` — All team members can access the workspace.\n- \\`private\\` — Only invited team members can access the workspace ([**Professional** and **Enterprise** plans only](https://www.postman.com/pricing)).\n- \\`public\\` — Everyone can access the workspace.\n- \\`partner\\` — Only invited team members and [partners](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) can access the workspace ([**Professional** and **Enterprise** plans only](https://www.postman.com/pricing)).\n", + title: "Gets all workspaces you have access to.\n- For “my …” requests, first call GET \\`/me\\` and pass \\`createdBy={me.user.id}\\`.\n- This endpoint's response contains the visibility field. Visibility determines who can access the workspace:\n - \\`personal\\` — Only you can access the workspace.\n - \\`team\\` — All team members can access the workspace.\n - \\`private\\` — Only invited team members can access the workspace (Professional and Enterprise).\n - \\`public\\` — Everyone can access the workspace.\n - \\`partner\\` — Invited team members and partners (Professional and Enterprise).\n- For tools that require the workspace ID, and no workspace ID is provided, ask the user to provide the workspace ID. If the user does not provide the workspace ID, call this first with the createdBy parameter to use the first workspace.\n- Examples:\n - “List my workspaces” → GET \\`/me\\`, then GET \\`/workspaces?createdBy={me.user.id}\\`\n - “List my personal workspaces” → GET \\`/me\\`, then GET \\`/workspaces?type=personal&createdBy={me.user.id}\\`\n - “List all public workspaces” → GET \\`/workspaces?type=public\\`\n", readOnlyHint: true, destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/workspaces`; const query = new URLSearchParams(); - if (params.type !== undefined) - query.set('type', String(params.type)); - if (params.createdBy !== undefined) - query.set('createdBy', String(params.createdBy)); - if (params.include !== undefined) - query.set('include', String(params.include)); + if (args.type !== undefined) + query.set('type', String(args.type)); + if (args.createdBy !== undefined) + query.set('createdBy', String(args.createdBy)); + if (args.include !== undefined) + query.set('include', String(args.include)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/mergeCollectionFork.js b/dist/src/tools/mergeCollectionFork.js index 6abbf4b..59cf83e 100644 --- a/dist/src/tools/mergeCollectionFork.js +++ b/dist/src/tools/mergeCollectionFork.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -21,18 +21,18 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/collections/merge`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.destination !== undefined) - bodyPayload.destination = params.destination; - if (params.source !== undefined) - bodyPayload.source = params.source; - if (params.strategy !== undefined) - bodyPayload.strategy = params.strategy; + if (args.destination !== undefined) + bodyPayload.destination = args.destination; + if (args.source !== undefined) + bodyPayload.source = args.source; + if (args.strategy !== undefined) + bodyPayload.strategy = args.strategy; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/patchCollection.js b/dist/src/tools/patchCollection.js index 6705bcd..e911b2f 100644 --- a/dist/src/tools/patchCollection.js +++ b/dist/src/tools/patchCollection.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -288,14 +288,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}`; + const endpoint = `/collections/${args.collectionId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.collection !== undefined) - bodyPayload.collection = params.collection; + if (args.collection !== undefined) + bodyPayload.collection = args.collection; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/patchEnvironment.js b/dist/src/tools/patchEnvironment.js index bf22701..be54466 100644 --- a/dist/src/tools/patchEnvironment.js +++ b/dist/src/tools/patchEnvironment.js @@ -1,24 +1,70 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { ContentType } from '../clients/postman.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'patchEnvironment'; export const description = 'Updates specific environment properties, such as its name and variables.\n\n**Note:**\n\n- You can only perform one type of operation at a time. For example, you cannot perform an \\`add\\` and \\`replace\\` operation in the same call.\n- The request body size cannot exceed the maximum allowed size of 30MB.\n- If you receive an HTTP \\`411 Length Required\\` error response, manually pass the \\`Content-Length\\` header and its value in the request header.\n- To add a description to an existing variable, use the \\`add\\` operation.\n'; -export const parameters = z.object({ environmentId: z.string().describe("The environment's ID.") }); +export const parameters = z.object({ + environmentId: z.string().describe("The environment's ID."), + body: z.union([ + z.array(z.object({ + op: z.string().describe('The `add` operation.'), + path: z + .string() + .describe('The [JSON Pointer syntax](https://datatracker.ietf.org/doc/html/rfc6901) that indicates the entry to update, in `/values/#` format, where `#` is the entry ID. The first record begins at the `0` value.'), + value: z + .object({ + enabled: z.boolean().describe('If true, the variable is enabled.').optional(), + key: z.string().describe("The variable's name.").optional(), + value: z.string().describe("The variable's value.").optional(), + type: z + .enum(['secret', 'default']) + .describe("The variable's type:\n- `secret` — The variable value is masked.\n- `default` — The variable value is visible in plain text.\n") + .optional(), + description: z.string().max(512).describe("The variable's description.").optional(), + }) + .describe("Information about the environment's variables."), + })), + z.array(z + .object({ + op: z.string().describe('The `replace` operation.'), + path: z.string().describe('The `/name` value.'), + value: z.string().describe("The environment's updated name."), + }) + .describe('Information about the environment.')), + z.array(z.object({ + op: z.string().describe('The `replace` operation.'), + path: z + .string() + .describe('The [JSON Pointer syntax](https://datatracker.ietf.org/doc/html/rfc6901) that indicates the entry to update, in `/values/#/{value}` format, where:\n- `#` — The entry ID. The first record begins at the `0` value.\n- `{value}` — The variable property to update. Accepts `key`, `value`, `type`, and `enable`.\n'), + value: z.string().describe("The variable's value."), + })), + z.array(z.object({ + op: z.string().describe('The `remove` operation.'), + path: z + .string() + .describe('The [JSON Pointer syntax](https://datatracker.ietf.org/doc/html/rfc6901) that indicates the entry to update, in `/values/#` format, where `#` is the entry ID. The first record begins at the `0` value.'), + })), + ]), +}); export const annotations = { title: 'Updates specific environment properties, such as its name and variables.\n\n**Note:**\n\n- You can only perform one type of operation at a time. For example, you cannot perform an \\`add\\` and \\`replace\\` operation in the same call.\n- The request body size cannot exceed the maximum allowed size of 30MB.\n- If you receive an HTTP \\`411 Length Required\\` error response, manually pass the \\`Content-Length\\` header and its value in the request header.\n- To add a description to an existing variable, use the \\`add\\` operation.\n', readOnlyHint: false, destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/environments/${params.environmentId}`; + const endpoint = `/environments/${args.environmentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; + const bodyPayload = args.body; const options = { + body: JSON.stringify(bodyPayload), + contentType: ContentType.Json, headers: extra.headers, }; const result = await extra.client.patch(url, options); diff --git a/dist/src/tools/postPanElementOrFolder.js b/dist/src/tools/postPanElementOrFolder.js index 76b0d8a..3038bbb 100644 --- a/dist/src/tools/postPanElementOrFolder.js +++ b/dist/src/tools/postPanElementOrFolder.js @@ -1,24 +1,72 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { ContentType } from '../clients/postman.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'postPanElementOrFolder'; export const description = "Publishes a element or creates a folder in your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/). An element is a Postman API, collection, or workspace.\n\n**Note:**\n\nYou can only pass one element object type per call. For example, you cannot pass both \\`api\\` and \\`collection\\` in a single request.\n"; -export const parameters = z.object({}); +export const parameters = z.object({ + body: z.union([ + z.object({ + api: z + .object({ + id: z.string().describe("The API's ID."), + parentFolderId: z.number().int().describe("The API's parent folder ID."), + }) + .optional(), + }), + z.object({ + collection: z + .object({ + id: z.string().describe("The collection's ID."), + parentFolderId: z.number().int().describe("The collection's parent folder ID."), + environments: z + .array(z.string().describe("An environment's UID.")) + .describe('A list of environment UIDs (`userId`-`environmentId`) to add to the collection.') + .optional(), + }) + .optional(), + }), + z.object({ + workspace: z + .object({ + id: z.string().describe("The workspace's ID."), + parentFolderId: z.number().int().describe("The workspace's parent folder ID."), + }) + .optional(), + }), + z.object({ + folder: z + .object({ + name: z.string().describe("The folder's name."), + description: z.string().describe("The folder's description.").optional(), + parentFolderId: z + .number() + .int() + .describe("The folder's parent folder ID. This value defaults to `0`. To create a folder at the root level, omit this property.") + .default(0), + }) + .optional(), + }), + ]), +}); export const annotations = { title: "Publishes a element or creates a folder in your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/). An element is a Postman API, collection, or workspace.\n\n**Note:**\n\nYou can only pass one element object type per call. For example, you cannot pass both \\`api\\` and \\`collection\\` in a single request.\n", readOnlyHint: false, destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/network/private`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; + const bodyPayload = args.body; const options = { + body: JSON.stringify(bodyPayload), + contentType: ContentType.Json, headers: extra.headers, }; const result = await extra.client.post(url, options); diff --git a/dist/src/tools/publishDocumentation.js b/dist/src/tools/publishDocumentation.js index ffc86ee..7c6e7c8 100644 --- a/dist/src/tools/publishDocumentation.js +++ b/dist/src/tools/publishDocumentation.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -90,20 +90,20 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/public-documentations`; + const endpoint = `/collections/${args.collectionId}/public-documentations`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.environmentUid !== undefined) - bodyPayload.environmentUid = params.environmentUid; - if (params.customColor !== undefined) - bodyPayload.customColor = params.customColor; - if (params.documentationLayout !== undefined) - bodyPayload.documentationLayout = params.documentationLayout; - if (params.customization !== undefined) - bodyPayload.customization = params.customization; + if (args.environmentUid !== undefined) + bodyPayload.environmentUid = args.environmentUid; + if (args.customColor !== undefined) + bodyPayload.customColor = args.customColor; + if (args.documentationLayout !== undefined) + bodyPayload.documentationLayout = args.documentationLayout; + if (args.customization !== undefined) + bodyPayload.customization = args.customization; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/publishMock.js b/dist/src/tools/publishMock.js index 723a8ec..7110c87 100644 --- a/dist/src/tools/publishMock.js +++ b/dist/src/tools/publishMock.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/mocks/${params.mockId}/publish`; + const endpoint = `/mocks/${args.mockId}/publish`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/pullCollectionChanges.js b/dist/src/tools/pullCollectionChanges.js index 02af56d..b1bb131 100644 --- a/dist/src/tools/pullCollectionChanges.js +++ b/dist/src/tools/pullCollectionChanges.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/pulls`; + const endpoint = `/collections/${args.collectionId}/pulls`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/putCollection.js b/dist/src/tools/putCollection.js index a2d911b..6e71887 100644 --- a/dist/src/tools/putCollection.js +++ b/dist/src/tools/putCollection.js @@ -6,7 +6,7 @@ function asMcpError(error) { return new McpError(ErrorCode.InternalError, cause); } export const method = 'putCollection'; -export const description = "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n> The maximum collection size this endpoint accepts cannot exceed 100 MB.\n\nFor a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n- \\`info\\` object — Refer to the **Information** entry.\n- \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n\n**Note:**\n\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n"; +export const description = "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n**Note:**\n\n- The maximum collection size this endpoint accepts cannot exceed 100 MB.\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n"; export const parameters = z.object({ collectionId: z .string() @@ -60,16 +60,16 @@ export const parameters = z.object({ key: z.string().describe("The variable's key (name).").optional(), description: z .string() - .describe("The variable's description. Doesn't apply to collection-level variables.") + .max(512) + .describe("The variable's description.") .optional(), - value: z.string().describe("The key's value.").optional(), - type: z - .enum(['string', 'boolean', 'integer']) - .describe("The variable's type.") + value: z + .union([z.string(), z.boolean(), z.number().int()]) + .describe("The key's value.") .optional(), disabled: z .boolean() - .describe('If true, the variable is not enabled. Applies only to query parameter variables.') + .describe("If true, the variable is not enabled. Doesn't apply to path parameter variables.") .default(false), }) .describe('Information about the variable.')) @@ -581,18 +581,14 @@ export const parameters = z.object({ .describe("The variable's ID. Doesn't apply to collection-level variables.") .optional(), key: z.string().describe("The variable's key (name).").optional(), - description: z - .string() - .describe("The variable's description. Doesn't apply to collection-level variables.") - .optional(), - value: z.string().describe("The key's value.").optional(), - type: z - .enum(['string', 'boolean', 'integer']) - .describe("The variable's type.") + description: z.string().max(512).describe("The variable's description.").optional(), + value: z + .union([z.string(), z.boolean(), z.number().int()]) + .describe("The key's value.") .optional(), disabled: z .boolean() - .describe('If true, the variable is not enabled. Applies only to query parameter variables.') + .describe("If true, the variable is not enabled. Doesn't apply to path parameter variables.") .default(false), }) .describe('Information about the variable.')) @@ -881,7 +877,7 @@ export const parameters = z.object({ .optional(), }); export const annotations = { - title: "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n> The maximum collection size this endpoint accepts cannot exceed 100 MB.\n\nFor a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n- \\`info\\` object — Refer to the **Information** entry.\n- \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n\n**Note:**\n\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n", + title: "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n**Note:**\n\n- The maximum collection size this endpoint accepts cannot exceed 100 MB.\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n", readOnlyHint: false, destructiveHint: false, idempotentHint: true, diff --git a/dist/src/tools/putEnvironment.js b/dist/src/tools/putEnvironment.js index 97d801c..69acdc4 100644 --- a/dist/src/tools/putEnvironment.js +++ b/dist/src/tools/putEnvironment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -37,14 +37,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/environments/${params.environmentId}`; + const endpoint = `/environments/${args.environmentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.environment !== undefined) - bodyPayload.environment = params.environment; + if (args.environment !== undefined) + bodyPayload.environment = args.environment; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/resolveCommentThread.js b/dist/src/tools/resolveCommentThread.js index 67256e6..cd2baf0 100644 --- a/dist/src/tools/resolveCommentThread.js +++ b/dist/src/tools/resolveCommentThread.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -15,9 +15,9 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/comments-resolutions/${params.threadId}`; + const endpoint = `/comments-resolutions/${args.threadId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/runMonitor.js b/dist/src/tools/runMonitor.js index 0e8fcae..f30df28 100644 --- a/dist/src/tools/runMonitor.js +++ b/dist/src/tools/runMonitor.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -19,12 +19,12 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/monitors/${params.monitorId}/run`; + const endpoint = `/monitors/${args.monitorId}/run`; const query = new URLSearchParams(); - if (params.async !== undefined) - query.set('async', String(params.async)); + if (args.async !== undefined) + query.set('async', String(args.async)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/syncCollectionWithSpec.js b/dist/src/tools/syncCollectionWithSpec.js index ea2c052..de2dae5 100644 --- a/dist/src/tools/syncCollectionWithSpec.js +++ b/dist/src/tools/syncCollectionWithSpec.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,12 +16,12 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionUid}/synchronizations`; + const endpoint = `/collections/${args.collectionUid}/synchronizations`; const query = new URLSearchParams(); - if (params.specId !== undefined) - query.set('specId', String(params.specId)); + if (args.specId !== undefined) + query.set('specId', String(args.specId)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/syncSpecWithCollection.js b/dist/src/tools/syncSpecWithCollection.js index dd943df..d8ac942 100644 --- a/dist/src/tools/syncSpecWithCollection.js +++ b/dist/src/tools/syncSpecWithCollection.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -16,12 +16,12 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}/synchronizations`; + const endpoint = `/specs/${args.specId}/synchronizations`; const query = new URLSearchParams(); - if (params.collectionUid !== undefined) - query.set('collectionUid', String(params.collectionUid)); + if (args.collectionUid !== undefined) + query.set('collectionUid', String(args.collectionUid)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { headers: extra.headers, diff --git a/dist/src/tools/transferCollectionFolders.js b/dist/src/tools/transferCollectionFolders.js index f008a1a..b8bcdbb 100644 --- a/dist/src/tools/transferCollectionFolders.js +++ b/dist/src/tools/transferCollectionFolders.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -45,20 +45,20 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/collection-folders-transfers`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.ids !== undefined) - bodyPayload.ids = params.ids; - if (params.mode !== undefined) - bodyPayload.mode = params.mode; - if (params.target !== undefined) - bodyPayload.target = params.target; - if (params.location !== undefined) - bodyPayload.location = params.location; + if (args.ids !== undefined) + bodyPayload.ids = args.ids; + if (args.mode !== undefined) + bodyPayload.mode = args.mode; + if (args.target !== undefined) + bodyPayload.target = args.target; + if (args.location !== undefined) + bodyPayload.location = args.location; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/transferCollectionRequests.js b/dist/src/tools/transferCollectionRequests.js index 013f57a..adec36e 100644 --- a/dist/src/tools/transferCollectionRequests.js +++ b/dist/src/tools/transferCollectionRequests.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -45,20 +45,20 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/collection-requests-transfers`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.ids !== undefined) - bodyPayload.ids = params.ids; - if (params.mode !== undefined) - bodyPayload.mode = params.mode; - if (params.target !== undefined) - bodyPayload.target = params.target; - if (params.location !== undefined) - bodyPayload.location = params.location; + if (args.ids !== undefined) + bodyPayload.ids = args.ids; + if (args.mode !== undefined) + bodyPayload.mode = args.mode; + if (args.target !== undefined) + bodyPayload.target = args.target; + if (args.location !== undefined) + bodyPayload.location = args.location; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/transferCollectionResponses.js b/dist/src/tools/transferCollectionResponses.js index 7922c5e..3edd677 100644 --- a/dist/src/tools/transferCollectionResponses.js +++ b/dist/src/tools/transferCollectionResponses.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -45,20 +45,20 @@ export const annotations = { destructiveHint: false, idempotentHint: false, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { const endpoint = `/collection-responses-transfers`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.ids !== undefined) - bodyPayload.ids = params.ids; - if (params.mode !== undefined) - bodyPayload.mode = params.mode; - if (params.target !== undefined) - bodyPayload.target = params.target; - if (params.location !== undefined) - bodyPayload.location = params.location; + if (args.ids !== undefined) + bodyPayload.ids = args.ids; + if (args.mode !== undefined) + bodyPayload.mode = args.mode; + if (args.target !== undefined) + bodyPayload.target = args.target; + if (args.location !== undefined) + bodyPayload.location = args.location; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/unpublishDocumentation.js b/dist/src/tools/unpublishDocumentation.js index c76e317..995e6b9 100644 --- a/dist/src/tools/unpublishDocumentation.js +++ b/dist/src/tools/unpublishDocumentation.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -15,9 +15,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/public-documentations`; + const endpoint = `/collections/${args.collectionId}/public-documentations`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/unpublishMock.js b/dist/src/tools/unpublishMock.js index 3e37725..9d75ffd 100644 --- a/dist/src/tools/unpublishMock.js +++ b/dist/src/tools/unpublishMock.js @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -13,9 +13,9 @@ export const annotations = { destructiveHint: true, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/mocks/${params.mockId}/unpublish`; + const endpoint = `/mocks/${args.mockId}/unpublish`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options = { diff --git a/dist/src/tools/updateApiCollectionComment.js b/dist/src/tools/updateApiCollectionComment.js index a039a0f..e958cb0 100644 --- a/dist/src/tools/updateApiCollectionComment.js +++ b/dist/src/tools/updateApiCollectionComment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -31,16 +31,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/apis/${params.apiId}/collections/${params.collectionId}/comments/${params.commentId}`; + const endpoint = `/apis/${args.apiId}/collections/${args.collectionId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.body !== undefined) - bodyPayload.body = params.body; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.body !== undefined) + bodyPayload.body = args.body; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateCollectionComment.js b/dist/src/tools/updateCollectionComment.js index 258f301..deb221c 100644 --- a/dist/src/tools/updateCollectionComment.js +++ b/dist/src/tools/updateCollectionComment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -30,16 +30,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.body !== undefined) - bodyPayload.body = params.body; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.body !== undefined) + bodyPayload.body = args.body; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateCollectionFolder.js b/dist/src/tools/updateCollectionFolder.js index 9658c18..30b4865 100644 --- a/dist/src/tools/updateCollectionFolder.js +++ b/dist/src/tools/updateCollectionFolder.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -19,16 +19,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; - if (params.description !== undefined) - bodyPayload.description = params.description; + if (args.name !== undefined) + bodyPayload.name = args.name; + if (args.description !== undefined) + bodyPayload.description = args.description; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateCollectionRequest.js b/dist/src/tools/updateCollectionRequest.js index 6d62019..53f69d1 100644 --- a/dist/src/tools/updateCollectionRequest.js +++ b/dist/src/tools/updateCollectionRequest.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -38,16 +38,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; - if (params.method !== undefined) - bodyPayload.method = params.method; + if (args.name !== undefined) + bodyPayload.name = args.name; + if (args.method !== undefined) + bodyPayload.method = args.method; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateCollectionResponse.js b/dist/src/tools/updateCollectionResponse.js index 8700360..ea21648 100644 --- a/dist/src/tools/updateCollectionResponse.js +++ b/dist/src/tools/updateCollectionResponse.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -25,16 +25,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; - if (params.responseCode !== undefined) - bodyPayload.responseCode = params.responseCode; + if (args.name !== undefined) + bodyPayload.name = args.name; + if (args.responseCode !== undefined) + bodyPayload.responseCode = args.responseCode; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateCollectionTags.js b/dist/src/tools/updateCollectionTags.js index 74c723a..67f81f6 100644 --- a/dist/src/tools/updateCollectionTags.js +++ b/dist/src/tools/updateCollectionTags.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -30,14 +30,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/tags`; + const endpoint = `/collections/${args.collectionId}/tags`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateFolderComment.js b/dist/src/tools/updateFolderComment.js index 3d2e6d6..54650a6 100644 --- a/dist/src/tools/updateFolderComment.js +++ b/dist/src/tools/updateFolderComment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -31,16 +31,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.body !== undefined) - bodyPayload.body = params.body; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.body !== undefined) + bodyPayload.body = args.body; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateMock.js b/dist/src/tools/updateMock.js index ff5fe9c..ae27d7f 100644 --- a/dist/src/tools/updateMock.js +++ b/dist/src/tools/updateMock.js @@ -1,12 +1,12 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); } export const method = 'updateMock'; -export const description = 'Updates a mock server.'; +export const description = 'Updates a mock server.\n- Resource: Mock server entity associated with a collection UID.\n- Use this to change name, environment, privacy, or default server response.\n'; export const parameters = z.object({ mockId: z.string().describe("The mock's ID."), mock: z @@ -33,19 +33,19 @@ export const parameters = z.object({ .optional(), }); export const annotations = { - title: 'Updates a mock server.', + title: 'Updates a mock server.\n- Resource: Mock server entity associated with a collection UID.\n- Use this to change name, environment, privacy, or default server response.\n', readOnlyHint: false, destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/mocks/${params.mockId}`; + const endpoint = `/mocks/${args.mockId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.mock !== undefined) - bodyPayload.mock = params.mock; + if (args.mock !== undefined) + bodyPayload.mock = args.mock; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateMonitor.js b/dist/src/tools/updateMonitor.js index 2f48e99..1feeb3b 100644 --- a/dist/src/tools/updateMonitor.js +++ b/dist/src/tools/updateMonitor.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -117,14 +117,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/monitors/${params.monitorId}`; + const endpoint = `/monitors/${args.monitorId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.monitor !== undefined) - bodyPayload.monitor = params.monitor; + if (args.monitor !== undefined) + bodyPayload.monitor = args.monitor; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updatePanElementOrFolder.js b/dist/src/tools/updatePanElementOrFolder.js index e3fc3a3..59510fd 100644 --- a/dist/src/tools/updatePanElementOrFolder.js +++ b/dist/src/tools/updatePanElementOrFolder.js @@ -1,5 +1,6 @@ import { z } from 'zod'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { ContentType } from '../clients/postman.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -11,6 +12,61 @@ export const parameters = z.object({ .string() .describe("The element's ID or UUID. For Postman Collections you must pass the collection's UID (`userId`-`collectionId`) value."), elementType: z.enum(['api', 'folder', 'collection', 'workspace']).describe('The element type.'), + body: z.union([ + z.object({ + api: z + .object({ + parentFolderId: z.number().int().describe("The API's new parent folder ID.").optional(), + }) + .optional(), + }), + z.object({ + collection: z + .object({ + parentFolderId: z + .number() + .int() + .describe("The collection's new parent folder ID.") + .optional(), + environments: z + .object({ + $add: z + .array(z.string().describe('The ID of environment to add to the collection.')) + .optional(), + $remove: z + .array(z.string().describe('The ID of environment to remove from the collection.')) + .optional(), + }) + .describe("The collection's updated environments.") + .optional(), + }) + .optional(), + }), + z.object({ + workspace: z + .object({ + parentFolderId: z + .number() + .int() + .describe("The workspace's new parent folder ID.") + .optional(), + }) + .optional(), + }), + z.object({ + folder: z + .object({ + name: z.string().describe("The folder's new name.").optional(), + description: z.string().describe("The folder's updated description.").optional(), + parentFolderId: z + .number() + .int() + .describe("The folder's new parent folder ID.") + .optional(), + }) + .optional(), + }), + ]), }); export const annotations = { title: "Updates an element or folder in your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/).\n\n**Note:**\n\nYou can only pass one element object type per call. For example, you cannot pass both \\`api\\` and \\`collection\\` in a single request.\n", @@ -18,12 +74,15 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/network/private/${params.elementType}/${params.elementId}`; + const endpoint = `/network/private/${args.elementType}/${args.elementId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; + const bodyPayload = args.body; const options = { + body: JSON.stringify(bodyPayload), + contentType: ContentType.Json, headers: extra.headers, }; const result = await extra.client.put(url, options); diff --git a/dist/src/tools/updateRequestComment.js b/dist/src/tools/updateRequestComment.js index b7c9ef9..05b26bc 100644 --- a/dist/src/tools/updateRequestComment.js +++ b/dist/src/tools/updateRequestComment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -31,16 +31,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.body !== undefined) - bodyPayload.body = params.body; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.body !== undefined) + bodyPayload.body = args.body; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateResponseComment.js b/dist/src/tools/updateResponseComment.js index 7e1b8cd..4dd2b30 100644 --- a/dist/src/tools/updateResponseComment.js +++ b/dist/src/tools/updateResponseComment.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -31,16 +31,16 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.body !== undefined) - bodyPayload.body = params.body; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.body !== undefined) + bodyPayload.body = args.body; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateSpecFile.js b/dist/src/tools/updateSpecFile.js index 4d33112..4a8f9b2 100644 --- a/dist/src/tools/updateSpecFile.js +++ b/dist/src/tools/updateSpecFile.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -23,18 +23,18 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}/files/${params.filePath}`; + const endpoint = `/specs/${args.specId}/files/${args.filePath}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; - if (params.type !== undefined) - bodyPayload.type = params.type; - if (params.content !== undefined) - bodyPayload.content = params.content; + if (args.name !== undefined) + bodyPayload.name = args.name; + if (args.type !== undefined) + bodyPayload.type = args.type; + if (args.content !== undefined) + bodyPayload.content = args.content; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateSpecProperties.js b/dist/src/tools/updateSpecProperties.js index 2d64b67..36b190e 100644 --- a/dist/src/tools/updateSpecProperties.js +++ b/dist/src/tools/updateSpecProperties.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -17,14 +17,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/specs/${params.specId}`; + const endpoint = `/specs/${args.specId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.name !== undefined) - bodyPayload.name = params.name; + if (args.name !== undefined) + bodyPayload.name = args.name; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateWorkspace.js b/dist/src/tools/updateWorkspace.js index 8c45e04..16113d7 100644 --- a/dist/src/tools/updateWorkspace.js +++ b/dist/src/tools/updateWorkspace.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -27,14 +27,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/workspaces/${params.workspaceId}`; + const endpoint = `/workspaces/${args.workspaceId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.workspace !== undefined) - bodyPayload.workspace = params.workspace; + if (args.workspace !== undefined) + bodyPayload.workspace = args.workspace; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateWorkspaceGlobalVariables.js b/dist/src/tools/updateWorkspaceGlobalVariables.js index 7157db3..f87b035 100644 --- a/dist/src/tools/updateWorkspaceGlobalVariables.js +++ b/dist/src/tools/updateWorkspaceGlobalVariables.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -31,14 +31,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/workspaces/${params.workspaceId}/global-variables`; + const endpoint = `/workspaces/${args.workspaceId}/global-variables`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.values !== undefined) - bodyPayload.values = params.values; + if (args.values !== undefined) + bodyPayload.values = args.values; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/dist/src/tools/updateWorkspaceTags.js b/dist/src/tools/updateWorkspaceTags.js index 214740e..2b51901 100644 --- a/dist/src/tools/updateWorkspaceTags.js +++ b/dist/src/tools/updateWorkspaceTags.js @@ -1,6 +1,6 @@ import { z } from 'zod'; import { ContentType } from '../clients/postman.js'; -import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error) { const cause = error?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); @@ -30,14 +30,14 @@ export const annotations = { destructiveHint: false, idempotentHint: true, }; -export async function handler(params, extra) { +export async function handler(args, extra) { try { - const endpoint = `/workspaces/${params.workspaceId}/tags`; + const endpoint = `/workspaces/${args.workspaceId}/tags`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload = {}; - if (params.tags !== undefined) - bodyPayload.tags = params.tags; + if (args.tags !== undefined) + bodyPayload.tags = args.tags; const options = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/clients/postman.ts b/src/clients/postman.ts index 7038379..79913e2 100644 --- a/src/clients/postman.ts +++ b/src/clients/postman.ts @@ -35,19 +35,14 @@ export interface IPostmanAPIClient { */ export class PostmanAPIClient implements IPostmanAPIClient { private readonly baseUrl: string; - private readonly apiKey: string; + private readonly apiKey?: string; private static instance: PostmanAPIClient | null = null; constructor( - apiKey: string, + apiKey?: string, baseUrl: string = process.env.POSTMAN_API_BASE_URL || 'https://api.postman.com' ) { - if (!apiKey && !process.env.POSTMAN_API_KEY) { - throw new Error( - 'API key is required. Provide it as parameter or set POSTMAN_API_KEY environment variable.' - ); - } - this.apiKey = apiKey || process.env.POSTMAN_API_KEY!; + this.apiKey = apiKey; this.baseUrl = baseUrl; } @@ -57,13 +52,7 @@ export class PostmanAPIClient implements IPostmanAPIClient { */ static getInstance(apiKey?: string, baseUrl?: string): PostmanAPIClient { if (!PostmanAPIClient.instance) { - const key = apiKey || process.env.POSTMAN_API_KEY; - if (!key) { - throw new Error( - 'API key is required. Provide it as parameter or set POSTMAN_API_KEY environment variable.' - ); - } - PostmanAPIClient.instance = new PostmanAPIClient(key, baseUrl); + PostmanAPIClient.instance = new PostmanAPIClient(apiKey, baseUrl); } return PostmanAPIClient.instance; } @@ -105,24 +94,52 @@ export class PostmanAPIClient implements IPostmanAPIClient { endpoint: string, options: PostmanAPIRequestOptions & { method: string } ): Promise { + // Get API key at request time - check instance, then environment + const currentApiKey = this.apiKey || process.env.POSTMAN_API_KEY; + if (!currentApiKey) { + throw new Error( + 'API key is required for requests. Provide it via constructor parameter or set POSTMAN_API_KEY environment variable.' + ); + } + const contentType = options.contentType || ContentType.Json; - const userAgentHeader = - options.headers && 'user-agent' in options.headers - ? `${options.headers['user-agent']}/${packageJson.name}/${packageJson.version}` - : `${packageJson.name}/${packageJson.version}`; + const userAgentKey = Object.keys(options.headers ?? {}).find( + (key) => key.toLowerCase() === 'user-agent' + ); + const userAgentValue = userAgentKey ? options.headers?.[userAgentKey] : undefined; + + const userAgentHeader = userAgentValue + ? `${userAgentValue}/${packageJson.name}/${packageJson.version}` + : `${packageJson.name}/${packageJson.version}`; + + const disallowed = new Set([ + 'content-length', + 'transfer-encoding', + 'connection', + 'host', + 'accept-encoding', + 'keep-alive', + ]); + const extra = Object.fromEntries( + Object.entries(options.headers ?? {}).filter(([k]) => !disallowed.has(k.toLowerCase())) + ); + + const hasBody = options.body !== undefined && options.body !== null; const headers = { - 'content-type': contentType, - 'x-api-key': this.apiKey, + ...(hasBody ? { 'content-type': contentType } : {}), + ...extra, + 'x-api-key': currentApiKey, 'user-agent': userAgentHeader, - ...options.headers, }; - const { headers: _, ...optionsWithoutHeaders } = options; + const { headers: _ignored, ...optionsWithoutHeaders } = options; + const response = await fetch(`${this.baseUrl}${endpoint}`, { ...optionsWithoutHeaders, headers, + signal: AbortSignal.timeout(300000), }); if (!response.ok) { @@ -135,7 +152,6 @@ export class PostmanAPIClient implements IPostmanAPIClient { if (responseContentType.includes('application/json')) { return response.json(); } - return response.text() as T; } diff --git a/src/index.ts b/src/index.ts index 232bf6c..2aaa187 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,19 +1,17 @@ #!/usr/bin/env node import dotenv from 'dotenv'; -import { Server } from '@modelcontextprotocol/sdk/server/index.js'; +import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { InitializeRequest } from '@modelcontextprotocol/sdk/types.js'; import { - CallToolRequestSchema, ErrorCode, isInitializeRequest, IsomorphicHeaders, - ListToolsRequestSchema, McpError, + CallToolResult, } from '@modelcontextprotocol/sdk/types.js'; -import zodToJsonSchema from 'zod-to-json-schema'; import packageJson from '../package.json' with { type: 'json' }; import { readdir } from 'node:fs/promises'; import { join, dirname } from 'node:path'; @@ -46,7 +44,7 @@ function log(level: LogLevel, message: string, context?: Record console.error(`[${timestamp}] [${level.toUpperCase()}] ${message}${suffix}`); } -function sendClientLog(server: Server, level: LogLevel, data: string) { +function sendClientLog(server: McpServer, level: LogLevel, data: string) { try { (server as any).sendLoggingMessage?.({ level, data }); } catch { @@ -55,7 +53,7 @@ function sendClientLog(server: Server, level: LogLevel, data: string) { } function logBoth( - server: Server | null | undefined, + server: McpServer | null | undefined, level: LogLevel, message: string, context?: Record @@ -71,7 +69,7 @@ type EnabledResourceMethod = FullResourceMethod; interface ToolModule { method: EnabledResourceMethod; description: string; - parameters: z.ZodSchema; + parameters: z.ZodObject; annotations?: { title?: string; readOnlyHint?: boolean; @@ -79,14 +77,12 @@ interface ToolModule { idempotentHint?: boolean; }; handler: ( - params: any, + args: any, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders; } - ) => Promise<{ - content: Array<{ type: string; text: string } & Record>; - }>; + ) => Promise; } async function loadAllTools(): Promise { @@ -167,8 +163,12 @@ async function run() { } } - // Create singleton client with selected base URL - const client = PostmanAPIClient.getInstance(); + // For STDIO mode, validate API key is available in environment + const apiKey = process.env.POSTMAN_API_KEY; + if (!apiKey) { + log('error', 'POSTMAN_API_KEY environment variable is required for STDIO mode'); + process.exit(1); + } const allGeneratedTools = await loadAllTools(); log('info', 'Server initialization starting', { @@ -183,10 +183,8 @@ async function run() { ); const tools = useFull ? fullTools : minimalTools; - const server = new Server( - { name: SERVER_NAME, version: APP_VERSION }, - { capabilities: { tools: {}, logging: {} } } - ); + // Create McpServer instance + const server = new McpServer({ name: SERVER_NAME, version: APP_VERSION }); // Surface MCP server errors to stderr and notify client if possible (server as any).onerror = (error: unknown) => { @@ -200,63 +198,51 @@ async function run() { process.exit(0); }); - log('info', 'Setting up request handlers'); - - server.setRequestHandler(CallToolRequestSchema, async (request, extra) => { - const toolName = request.params.name; - const tool = tools.find((t) => t.method === toolName); - - // Keep start event on stderr only to reduce client noise - log('info', `Tool invocation started: ${toolName}`, { toolName }); - - if (!tool) { - // Unknown tool: log to stderr; error response is sufficient for client - log('warn', `Unknown tool requested: ${toolName}`, { toolName }); - throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${toolName}`); - } - - const args = request.params.arguments || {}; - - try { - const start = Date.now(); - - const result = await tool.handler(args as any, { - client, - headers: { - ...extra.requestInfo?.headers, - 'user-agent': clientInfo?.name, - }, - }); - - const durationMs = Date.now() - start; - // Completion: stderr only to avoid spamming client logs - log('info', `Tool invocation completed: ${toolName} (${durationMs}ms)`, { - toolName, - durationMs, - }); - return result; - } catch (error: any) { - const errMsg = String(error?.message || error); - // Failures: notify both server stderr and client - logBoth(server, 'error', `Tool invocation failed: ${toolName}: ${errMsg}`, { toolName }); - if (error instanceof McpError) throw error; - throw new McpError(ErrorCode.InternalError, `API error: ${error.message}`); - } - }); - - server.setRequestHandler(ListToolsRequestSchema, async () => { - // Debug-only on stderr; avoid client notification noise - log('debug', `Tools list requested; ${tools.length} tools available`, { - toolCount: tools.length, - }); - const transformedTools = tools.map((tool) => ({ - name: tool.method, - description: tool.description, - inputSchema: zodToJsonSchema(tool.parameters), - annotations: tool.annotations, - })); - return { tools: transformedTools }; - }); + // Create a client instance with the API key for STDIO mode + const client = new PostmanAPIClient(apiKey); + + log('info', 'Registering tools with McpServer'); + + // Register all tools using the McpServer .tool() method + for (const tool of tools) { + server.tool( + tool.method, + tool.description, + tool.parameters.shape, + tool.annotations || {}, + async (args, extra) => { + const toolName = tool.method; + // Keep start event on stderr only to reduce client noise + log('info', `Tool invocation started: ${toolName}`, { toolName }); + + try { + const start = Date.now(); + + const result = await tool.handler(args, { + client, + headers: { + ...extra?.requestInfo?.headers, + 'user-agent': clientInfo?.name, + }, + }); + + const durationMs = Date.now() - start; + // Completion: stderr only to avoid spamming client logs + log('info', `Tool invocation completed: ${toolName} (${durationMs}ms)`, { + toolName, + durationMs, + }); + return result; + } catch (error: any) { + const errMsg = String(error?.message || error); + // Failures: notify both server stderr and client + logBoth(server, 'error', `Tool invocation failed: ${toolName}: ${errMsg}`, { toolName }); + if (error instanceof McpError) throw error; + throw new McpError(ErrorCode.InternalError, `API error: ${error.message}`); + } + } + ); + } // API key validation is handled by the singleton client log('info', 'Starting stdio transport'); diff --git a/src/tests/integration/direct.test.ts b/src/tests/integration/direct.test.ts index 4ceda73..6b2b62c 100644 --- a/src/tests/integration/direct.test.ts +++ b/src/tests/integration/direct.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, beforeAll, afterAll, beforeEach, afterEach } from 'vitest'; +import { describe, it, expect, beforeAll, afterAll, beforeEach, afterEach, vi } from 'vitest'; import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'; import { spawn, ChildProcess } from 'child_process'; @@ -10,6 +10,8 @@ import { SpecDataFactory, TestSpec, } from './factories/dataFactory.js'; +import { PostmanAPIClient } from '../../clients/postman.js'; +import packageJson from '../../../package.json' assert { type: 'json' }; describe('Postman MCP - Direct Integration Tests', () => { let client: Client; @@ -84,6 +86,183 @@ describe('Postman MCP - Direct Integration Tests', () => { createdSpecIds = []; }); + describe('User-Agent Header Tests', () => { + it('should include client name in user-agent header for stdio transport', async () => { + const testClientName = 'test-integration-client'; + + const clientWithName = new Client( + { + name: testClientName, + version: '1.0.0', + }, + { + capabilities: { + tools: {}, + }, + } + ); + + const transport = new StdioClientTransport({ + command: 'node', + args: ['dist/src/index.js', '--full'], + env: { + ...process.env, + NODE_ENV: 'test', + }, + }); + + await clientWithName.connect(transport); + + try { + const result = await clientWithName.callTool( + { + name: 'getWorkspaces', + arguments: {}, + }, + undefined, + { timeout: 100000 } + ); + + expect(result.content).toBeDefined(); + expect(Array.isArray(result.content)).toBe(true); + + const content = result.content[0]; + expect(content).toBeDefined(); + expect(content.type).toBe('text'); + } finally { + await clientWithName.close(); + } + }); + + it('should handle HTTP transport user-agent headers', async () => { + const testUserAgent = 'test-http-client/2.0.0'; + + const httpClient = new Client( + { + name: testUserAgent, + version: '1.0.0', + }, + { + capabilities: { + tools: {}, + }, + } + ); + + expect(httpClient).toBeDefined(); + expect(typeof httpClient.callTool).toBe('function'); + }); + + it('should properly track client information in server', async () => { + const testClientName = 'client-info-test'; + + const clientWithInfo = new Client( + { + name: testClientName, + version: '2.0.0', + }, + { + capabilities: { + tools: {}, + }, + } + ); + + const transport = new StdioClientTransport({ + command: 'node', + args: ['dist/src/index.js', '--full'], + env: { + ...process.env, + NODE_ENV: 'test', + }, + }); + + await clientWithInfo.connect(transport); + + try { + const result = await clientWithInfo.callTool( + { + name: 'getWorkspaces', + arguments: {}, + }, + undefined, + { timeout: 100000 } + ); + + expect(result).toBeDefined(); + expect(result.content).toBeDefined(); + } finally { + await clientWithInfo.close(); + } + }); + }); + + describe('PostmanAPIClient User-Agent Tests', () => { + const expectedPackageName = packageJson.name; + const expectedPackageVersion = packageJson.version; + + it('should construct user-agent headers correctly', async () => { + const client = new PostmanAPIClient('test-api-key'); + + const originalFetch = global.fetch; + let capturedHeaders: Record = {}; + + global.fetch = vi.fn().mockImplementation(async (_url: string, options: any) => { + capturedHeaders = options.headers || {}; + return { + ok: true, + status: 200, + headers: { + get: vi.fn().mockReturnValue('application/json'), + }, + json: async () => ({ test: 'data' }), + text: async () => 'test response', + } as any; + }); + + try { + await client.get('/test-endpoint', { + headers: { 'user-agent': 'custom-client/1.0.0' }, + }); + + expect(capturedHeaders['user-agent']).toBe( + `custom-client/1.0.0/${expectedPackageName}/${expectedPackageVersion}` + ); + expect(capturedHeaders['x-api-key']).toBe('test-api-key'); + } finally { + global.fetch = originalFetch; + } + }); + + it('should handle missing user-agent header gracefully', async () => { + const client = new PostmanAPIClient('test-api-key'); + + const originalFetch = global.fetch; + let capturedHeaders: Record = {}; + + global.fetch = vi.fn().mockImplementation(async (_url: string, options: any) => { + capturedHeaders = options.headers || {}; + return { + ok: true, + status: 200, + headers: { + get: vi.fn().mockReturnValue('application/json'), + }, + json: async () => ({ test: 'data' }), + } as any; + }); + + try { + await client.get('/test-endpoint'); + + expect(capturedHeaders['user-agent']).toBe(`${expectedPackageName}/${expectedPackageVersion}`); + expect(capturedHeaders['x-api-key']).toBe('test-api-key'); + } finally { + global.fetch = originalFetch; + } + }); + }); + describe('Workspace Workflow', () => { it('should create, list, search, update, and delete a single workspace', async () => { const workspaceData = WorkspaceDataFactory.createWorkspace(); @@ -93,36 +272,52 @@ describe('Postman MCP - Direct Integration Tests', () => { expect(createdWorkspaceIds).toHaveLength(1); expect(createdWorkspaceIds[0]).toBe(workspaceId); - const listResult = await client.callTool({ - name: 'getWorkspaces', - arguments: {}, - }); + const listResult = await client.callTool( + { + name: 'getWorkspaces', + arguments: {}, + }, + undefined, + { timeout: 100000 } + ); expect(WorkspaceDataFactory.validateResponse(listResult)).toBe(true); expect((listResult.content as any)[0].text).toContain(workspaceId); - const searchResult = await client.callTool({ - name: 'getWorkspace', - arguments: { workspaceId }, - }); + const searchResult = await client.callTool( + { + name: 'getWorkspace', + arguments: { workspaceId }, + }, + undefined, + { timeout: 100000 } + ); expect(WorkspaceDataFactory.validateResponse(searchResult)).toBe(true); expect((searchResult.content as any)[0].text).toContain(workspaceData.name); const updatedName = '[Integration Test] Updated Workspace'; - const updateResult = await client.callTool({ - name: 'updateWorkspace', - arguments: { - workspaceId, - workspace: { name: updatedName, type: 'personal' }, + const updateResult = await client.callTool( + { + name: 'updateWorkspace', + arguments: { + workspaceId, + workspace: { name: updatedName, type: 'personal' }, + }, }, - }); + undefined, + { timeout: 100000 } + ); expect(WorkspaceDataFactory.validateResponse(updateResult)).toBe(true); - const verifyUpdateResult = await client.callTool({ - name: 'getWorkspace', - arguments: { - workspaceId, + const verifyUpdateResult = await client.callTool( + { + name: 'getWorkspace', + arguments: { + workspaceId, + }, }, - }); + undefined, + { timeout: 100000 } + ); expect(WorkspaceDataFactory.validateResponse(verifyUpdateResult)).toBe(true); expect((verifyUpdateResult.content as any)[0].text).toContain(updatedName); }); @@ -130,24 +325,38 @@ describe('Postman MCP - Direct Integration Tests', () => { describe('Environment Workflow', () => { it('should create, list, search, update, and delete a single environment', async () => { + const workspace = WorkspaceDataFactory.createWorkspace({ + name: '[Integration Test] Environment Workspace', + }); + const workspaceId = await createWorkspace(workspace); + createdWorkspaceIds.push(workspaceId); + const environmentData = EnvironmentDataFactory.createEnvironment(); - const environmentId = await createEnvironment(environmentData); + const environmentId = await createEnvironment(environmentData, workspaceId); createdEnvironmentIds.push(environmentId); expect(createdEnvironmentIds).toHaveLength(1); expect(createdEnvironmentIds[0]).toBe(environmentId); - const listResult = await client.callTool({ - name: 'getEnvironments', - arguments: {}, - }); + const listResult = await client.callTool( + { + name: 'getEnvironments', + arguments: {}, + }, + undefined, + { timeout: 100000 } + ); expect(EnvironmentDataFactory.validateResponse(listResult)).toBe(true); expect((listResult.content as any)[0].text).toContain(environmentId); - const getResult = await client.callTool({ - name: 'getEnvironment', - arguments: { environmentId }, - }); + const getResult = await client.callTool( + { + name: 'getEnvironment', + arguments: { environmentId }, + }, + undefined, + { timeout: 100000 } + ); expect(EnvironmentDataFactory.validateResponse(getResult)).toBe(true); expect((getResult.content as any)[0].text).toContain(environmentData.name); @@ -164,35 +373,53 @@ describe('Postman MCP - Direct Integration Tests', () => { ], }; - const updateResult = await client.callTool({ - name: 'putEnvironment', - arguments: { - environmentId, - environment: updatedEnvironment, + const updateResult = await client.callTool( + { + name: 'putEnvironment', + arguments: { + environmentId, + environment: updatedEnvironment, + }, }, - }); + undefined, + { timeout: 100000 } + ); expect(EnvironmentDataFactory.validateResponse(updateResult)).toBe(true); - const verifyUpdateResult = await client.callTool({ - name: 'getEnvironment', - arguments: { - environmentId, + const verifyUpdateResult = await client.callTool( + { + name: 'getEnvironment', + arguments: { + environmentId, + }, }, - }); + undefined, + { timeout: 100000 } + ); expect(EnvironmentDataFactory.validateResponse(verifyUpdateResult)).toBe(true); expect((verifyUpdateResult.content as any)[0].text).toContain(updatedName); expect((verifyUpdateResult.content as any)[0].text).toContain('updated_var'); }); it('should create and delete a minimal environment', async () => { + const workspace = WorkspaceDataFactory.createWorkspace({ + name: '[Integration Test] Minimal Environment Workspace', + }); + const workspaceId = await createWorkspace(workspace); + createdWorkspaceIds.push(workspaceId); + const environmentData = EnvironmentDataFactory.createMinimalEnvironment(); - const environmentId = await createEnvironment(environmentData); + const environmentId = await createEnvironment(environmentData, workspaceId); createdEnvironmentIds.push(environmentId); - const getResult = await client.callTool({ - name: 'getEnvironment', - arguments: { environmentId }, - }); + const getResult = await client.callTool( + { + name: 'getEnvironment', + arguments: { environmentId }, + }, + undefined, + { timeout: 100000 } + ); expect(EnvironmentDataFactory.validateResponse(getResult)).toBe(true); expect((getResult.content as any)[0].text).toContain(environmentData.name); }); @@ -213,35 +440,47 @@ describe('Postman MCP - Direct Integration Tests', () => { path: 'test.json', content: '{ "hello": "world" }', }); - const createResult = await client.callTool({ - name: 'createSpecFile', - arguments: { - specId: specId, - ...specFileData, + const createResult = await client.callTool( + { + name: 'createSpecFile', + arguments: { + specId: specId, + ...specFileData, + }, }, - }); + undefined, + { timeout: 100000 } + ); expect(SpecDataFactory.validateResponse(createResult)).toBe(true); const createdFile = SpecDataFactory.extractSpecFileFromResponse(createResult); expect(createdFile).toBeDefined(); - const getFilesResult = await client.callTool({ - name: 'getSpecFiles', - arguments: { specId: specId }, - }); + const getFilesResult = await client.callTool( + { + name: 'getSpecFiles', + arguments: { specId: specId }, + }, + undefined, + { timeout: 100000 } + ); expect(SpecDataFactory.validateResponse(getFilesResult)).toBe(true); const files = SpecDataFactory.extractSpecFilesFromResponse(getFilesResult); expect(files).toBeInstanceOf(Array); expect(files.length).toBe(2); - const getFileResult = await client.callTool({ - name: 'getSpecFile', - arguments: { - specId: specId, - filePath: specFileData.path, + const getFileResult = await client.callTool( + { + name: 'getSpecFile', + arguments: { + specId: specId, + filePath: specFileData.path, + }, }, - }); + undefined, + { timeout: 100000 } + ); expect(SpecDataFactory.validateResponse(getFileResult)).toBe(true); const retrievedFile = SpecDataFactory.extractSpecFileFromResponse(getFileResult); @@ -249,38 +488,50 @@ describe('Postman MCP - Direct Integration Tests', () => { expect(retrievedFile.path).toEqual(specFileData.path); const updatedContent = '{ "hello": "world_updated" }'; - const updateResult = await client.callTool({ - name: 'updateSpecFile', - arguments: { - specId: specId, - filePath: specFileData.path, - content: updatedContent, + const updateResult = await client.callTool( + { + name: 'updateSpecFile', + arguments: { + specId: specId, + filePath: specFileData.path, + content: updatedContent, + }, }, - }); + undefined, + { timeout: 100000 } + ); expect(SpecDataFactory.validateResponse(updateResult)).toBe(true); const updatedFile = SpecDataFactory.extractSpecFileFromResponse(updateResult); expect(updatedFile.id).toEqual(createdFile?.id); - const deleteResult = await client.callTool({ - name: 'deleteSpecFile', - arguments: { - specId: specId, - filePath: specFileData.path, + const deleteResult = await client.callTool( + { + name: 'deleteSpecFile', + arguments: { + specId: specId, + filePath: specFileData.path, + }, }, - }); + undefined, + { timeout: 100000 } + ); expect(SpecDataFactory.validateResponse(deleteResult)).toBe(true); }); }); async function createWorkspace(workspaceData: TestWorkspace): Promise { - const result = await client.callTool({ - name: 'createWorkspace', - arguments: { - workspace: workspaceData, + const result = await client.callTool( + { + name: 'createWorkspace', + arguments: { + workspace: workspaceData, + }, }, - }); + undefined, + { timeout: 100000 } + ); if (result.isError) { throw new Error((result.content as any)[0].text); } @@ -292,13 +543,21 @@ describe('Postman MCP - Direct Integration Tests', () => { return workspaceId!; } - async function createEnvironment(environmentData: TestEnvironment): Promise { - const result = await client.callTool({ - name: 'createEnvironment', - arguments: { - environment: environmentData, + async function createEnvironment( + environmentData: TestEnvironment, + workspaceId: string + ): Promise { + const result = await client.callTool( + { + name: 'createEnvironment', + arguments: { + workspace: workspaceId, + environment: environmentData, + }, }, - }); + undefined, + { timeout: 100000 } + ); if (result.isError) { throw new Error((result.content as any)[0].text); } @@ -311,15 +570,19 @@ describe('Postman MCP - Direct Integration Tests', () => { } async function createSpec(specData: TestSpec, workspaceId: string): Promise { - const result = await client.callTool({ - name: 'createSpec', - arguments: { - workspaceId, - name: specData.name, - type: specData.type, - files: specData.files, + const result = await client.callTool( + { + name: 'createSpec', + arguments: { + workspaceId, + name: specData.name, + type: specData.type, + files: specData.files, + }, }, - }); + undefined, + { timeout: 100000 } + ); if (result.isError) { throw new Error((result.content as any)[0].text); @@ -335,12 +598,16 @@ describe('Postman MCP - Direct Integration Tests', () => { async function cleanupTestWorkspaces(workspaceIds: string[]): Promise { for (const workspaceId of workspaceIds) { try { - await client.callTool({ - name: 'deleteWorkspace', - arguments: { - workspaceId, + await client.callTool( + { + name: 'deleteWorkspace', + arguments: { + workspaceId, + }, }, - }); + undefined, + { timeout: 100000 } + ); } catch (error) { console.warn(`Failed to cleanup workspace ${workspaceId}:`, String(error)); } @@ -350,12 +617,16 @@ describe('Postman MCP - Direct Integration Tests', () => { async function cleanupTestEnvironments(environmentIds: string[]): Promise { for (const environmentId of environmentIds) { try { - await client.callTool({ - name: 'deleteEnvironment', - arguments: { - environmentId, + await client.callTool( + { + name: 'deleteEnvironment', + arguments: { + environmentId, + }, }, - }); + undefined, + { timeout: 100000 } + ); } catch (error) { console.warn(`Failed to cleanup environment ${environmentId}:`, String(error)); } @@ -365,12 +636,16 @@ describe('Postman MCP - Direct Integration Tests', () => { async function cleanupTestSpecs(specIds: string[]): Promise { for (const specId of specIds) { try { - await client.callTool({ - name: 'deleteSpec', - arguments: { - specId, + await client.callTool( + { + name: 'deleteSpec', + arguments: { + specId, + }, }, - }); + undefined, + { timeout: 100000 } + ); } catch (error) { console.warn(`Failed to cleanup spec ${specId}:`, String(error)); } diff --git a/src/tools/createCollection.ts b/src/tools/createCollection.ts index a61d4f4..7cdd714 100644 --- a/src/tools/createCollection.ts +++ b/src/tools/createCollection.ts @@ -9,7 +9,7 @@ function asMcpError(error: unknown): McpError { export const method = 'createCollection'; export const description = - 'Creates a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\n- If you do not include the \\`workspace\\` query parameter, the system creates the collection in the oldest personal Internal workspace you own.\n- For a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n - \\`info\\` object — Refer to the **Information** entry.\n - \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n'; + 'Creates a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\nIf you do not include the \\`workspace\\` query parameter, the system creates the collection in the oldest personal Internal workspace you own.\n'; export const parameters = z.object({ workspace: z.string().describe("The workspace's ID."), collection: z @@ -35,20 +35,20 @@ export const parameters = z.object({ z .object({ key: z.string().describe("The variable's key (name).").optional(), - value: z.string().describe("The key's value.").optional(), - type: z - .enum(['string', 'boolean', 'integer']) - .describe("The variable's type.") + value: z + .union([z.string(), z.boolean(), z.number().int()]) + .describe("The key's value.") .optional(), description: z .string() - .describe( - "The variable's description. Doesn't apply to collection-level variables." - ) + .max(512) + .describe("The variable's description.") .optional(), disabled: z .boolean() - .describe('If true, the variable is not enabled.') + .describe( + "If true, the variable is not enabled. Doesn't apply to path parameter variables." + ) .default(false), }) .describe('Information about the variable.') @@ -661,20 +661,16 @@ export const parameters = z.object({ z .object({ key: z.string().describe("The variable's key (name).").optional(), - value: z.string().describe("The key's value.").optional(), - type: z - .enum(['string', 'boolean', 'integer']) - .describe("The variable's type.") - .optional(), - description: z - .string() - .describe( - "The variable's description. Doesn't apply to collection-level variables." - ) + value: z + .union([z.string(), z.boolean(), z.number().int()]) + .describe("The key's value.") .optional(), + description: z.string().max(512).describe("The variable's description.").optional(), disabled: z .boolean() - .describe('If true, the variable is not enabled.') + .describe( + "If true, the variable is not enabled. Doesn't apply to path parameter variables." + ) .default(false), }) .describe('Information about the variable.') @@ -1011,7 +1007,7 @@ export const parameters = z.object({ }); export const annotations = { title: - 'Creates a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\n- If you do not include the \\`workspace\\` query parameter, the system creates the collection in the oldest personal Internal workspace you own.\n- For a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n - \\`info\\` object — Refer to the **Information** entry.\n - \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n', + 'Creates a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\nIf you do not include the \\`workspace\\` query parameter, the system creates the collection in the oldest personal Internal workspace you own.\n', readOnlyHint: false, destructiveHint: false, idempotentHint: false, diff --git a/src/tools/createCollectionComment.ts b/src/tools/createCollectionComment.ts index 2f94eb9..2db0eb4 100644 --- a/src/tools/createCollectionComment.ts +++ b/src/tools/createCollectionComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -44,17 +49,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/comments`; + const endpoint = `/collections/${args.collectionId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.body !== undefined) bodyPayload.body = params.body; - if (params.threadId !== undefined) bodyPayload.threadId = params.threadId; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.body !== undefined) bodyPayload.body = args.body; + if (args.threadId !== undefined) bodyPayload.threadId = args.threadId; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createCollectionFolder.ts b/src/tools/createCollectionFolder.ts index 1d65fe8..e26e91f 100644 --- a/src/tools/createCollectionFolder.ts +++ b/src/tools/createCollectionFolder.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -29,16 +34,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/folders`; + const endpoint = `/collections/${args.collectionId}/folders`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; - if (params.folder !== undefined) bodyPayload.folder = params.folder; + if (args.name !== undefined) bodyPayload.name = args.name; + if (args.folder !== undefined) bodyPayload.folder = args.folder; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createCollectionFork.ts b/src/tools/createCollectionFork.ts index 092e0d1..efa72d2 100644 --- a/src/tools/createCollectionFork.ts +++ b/src/tools/createCollectionFork.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -24,16 +29,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/fork/${params.collectionId}`; + const endpoint = `/collections/fork/${args.collectionId}`; const query = new URLSearchParams(); - if (params.workspace !== undefined) query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.label !== undefined) bodyPayload.label = params.label; + if (args.label !== undefined) bodyPayload.label = args.label; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createCollectionRequest.ts b/src/tools/createCollectionRequest.ts index 14c8ff1..bd31c49 100644 --- a/src/tools/createCollectionRequest.ts +++ b/src/tools/createCollectionRequest.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -34,16 +39,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/requests`; + const endpoint = `/collections/${args.collectionId}/requests`; const query = new URLSearchParams(); - if (params.folderId !== undefined) query.set('folderId', String(params.folderId)); + if (args.folderId !== undefined) query.set('folderId', String(args.folderId)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; + if (args.name !== undefined) bodyPayload.name = args.name; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createCollectionResponse.ts b/src/tools/createCollectionResponse.ts index 9ef7559..890f3d6 100644 --- a/src/tools/createCollectionResponse.ts +++ b/src/tools/createCollectionResponse.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -29,16 +34,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/responses`; + const endpoint = `/collections/${args.collectionId}/responses`; const query = new URLSearchParams(); - if (params.requestId !== undefined) query.set('requestId', String(params.requestId)); + if (args.requestId !== undefined) query.set('requestId', String(args.requestId)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; + if (args.name !== undefined) bodyPayload.name = args.name; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createEnvironment.ts b/src/tools/createEnvironment.ts index 036c657..03e9282 100644 --- a/src/tools/createEnvironment.ts +++ b/src/tools/createEnvironment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -47,16 +52,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/environments`; const query = new URLSearchParams(); - if (params.workspace !== undefined) query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.environment !== undefined) bodyPayload.environment = params.environment; + if (args.environment !== undefined) bodyPayload.environment = args.environment; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createFolderComment.ts b/src/tools/createFolderComment.ts index 1663166..10c06ca 100644 --- a/src/tools/createFolderComment.ts +++ b/src/tools/createFolderComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -45,17 +50,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.body !== undefined) bodyPayload.body = params.body; - if (params.threadId !== undefined) bodyPayload.threadId = params.threadId; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.body !== undefined) bodyPayload.body = args.body; + if (args.threadId !== undefined) bodyPayload.threadId = args.threadId; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createMock.ts b/src/tools/createMock.ts index 169a589..c3655bc 100644 --- a/src/tools/createMock.ts +++ b/src/tools/createMock.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -9,7 +14,7 @@ function asMcpError(error: unknown): McpError { export const method = 'createMock'; export const description = - 'Creates a mock server in a collection.\n\n**Note:**\n\n- You cannot create mocks for collections added to an API definition.\n- If you do not include the \\`workspaceId\\` query parameter, the system creates the mock server in the oldest personal Internal workspace you own.\n'; + 'Creates a mock server in a collection.\n\n- Pass the collection UID (ownerId-collectionId), not the bare collection ID.\n- If you only have a \\`collectionId\\`, resolve the UID first:\n 1) Prefer GET \\`/collections/{collectionId}\\` and read \\`uid\\`, or\n 2) Construct \\`{ownerId}-{collectionId}\\` using ownerId from GET \\`/me\\`:\n - For team-owned collections: \\`ownerId = me.teamId\\`\n - For personal collections: \\`ownerId = me.user.id\\`\n- Use the \\`workspace\\` query to place the mock in a specific workspace. Prefer explicit workspace scoping.\n'; export const parameters = z.object({ workspace: z.string().describe("The workspace's ID."), mock: z @@ -31,23 +36,23 @@ export const parameters = z.object({ }); export const annotations = { title: - 'Creates a mock server in a collection.\n\n**Note:**\n\n- You cannot create mocks for collections added to an API definition.\n- If you do not include the \\`workspaceId\\` query parameter, the system creates the mock server in the oldest personal Internal workspace you own.\n', + 'Creates a mock server in a collection.\n\n- Pass the collection UID (ownerId-collectionId), not the bare collection ID.\n- If you only have a \\`collectionId\\`, resolve the UID first:\n 1) Prefer GET \\`/collections/{collectionId}\\` and read \\`uid\\`, or\n 2) Construct \\`{ownerId}-{collectionId}\\` using ownerId from GET \\`/me\\`:\n - For team-owned collections: \\`ownerId = me.teamId\\`\n - For personal collections: \\`ownerId = me.user.id\\`\n- Use the \\`workspace\\` query to place the mock in a specific workspace. Prefer explicit workspace scoping.\n', readOnlyHint: false, destructiveHint: false, idempotentHint: false, }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/mocks`; const query = new URLSearchParams(); - if (params.workspace !== undefined) query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.mock !== undefined) bodyPayload.mock = params.mock; + if (args.mock !== undefined) bodyPayload.mock = args.mock; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createMonitor.ts b/src/tools/createMonitor.ts index 99982c1..5f8aa02 100644 --- a/src/tools/createMonitor.ts +++ b/src/tools/createMonitor.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -141,16 +146,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/monitors`; const query = new URLSearchParams(); - if (params.workspace !== undefined) query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.monitor !== undefined) bodyPayload.monitor = params.monitor; + if (args.monitor !== undefined) bodyPayload.monitor = args.monitor; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createRequestComment.ts b/src/tools/createRequestComment.ts index 8198b0a..cca4be4 100644 --- a/src/tools/createRequestComment.ts +++ b/src/tools/createRequestComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -49,17 +54,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}/comments`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.body !== undefined) bodyPayload.body = params.body; - if (params.threadId !== undefined) bodyPayload.threadId = params.threadId; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.body !== undefined) bodyPayload.body = args.body; + if (args.threadId !== undefined) bodyPayload.threadId = args.threadId; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createResponseComment.ts b/src/tools/createResponseComment.ts index f23c2f1..e6ba571 100644 --- a/src/tools/createResponseComment.ts +++ b/src/tools/createResponseComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -45,17 +50,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.body !== undefined) bodyPayload.body = params.body; - if (params.threadId !== undefined) bodyPayload.threadId = params.threadId; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.body !== undefined) bodyPayload.body = args.body; + if (args.threadId !== undefined) bodyPayload.threadId = args.threadId; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createSpec.ts b/src/tools/createSpec.ts index fcac726..179c7fa 100644 --- a/src/tools/createSpec.ts +++ b/src/tools/createSpec.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -43,18 +48,18 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/specs`; const query = new URLSearchParams(); - if (params.workspaceId !== undefined) query.set('workspaceId', String(params.workspaceId)); + if (args.workspaceId !== undefined) query.set('workspaceId', String(args.workspaceId)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; - if (params.type !== undefined) bodyPayload.type = params.type; - if (params.files !== undefined) bodyPayload.files = params.files; + if (args.name !== undefined) bodyPayload.name = args.name; + if (args.type !== undefined) bodyPayload.type = args.type; + if (args.files !== undefined) bodyPayload.files = args.files; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createSpecFile.ts b/src/tools/createSpecFile.ts index 9420fe4..b9071fa 100644 --- a/src/tools/createSpecFile.ts +++ b/src/tools/createSpecFile.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -24,16 +29,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}/files`; + const endpoint = `/specs/${args.specId}/files`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.path !== undefined) bodyPayload.path = params.path; - if (params.content !== undefined) bodyPayload.content = params.content; + if (args.path !== undefined) bodyPayload.path = args.path; + if (args.content !== undefined) bodyPayload.content = args.content; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/createWorkspace.ts b/src/tools/createWorkspace.ts index efdefd0..74cc0d5 100644 --- a/src/tools/createWorkspace.ts +++ b/src/tools/createWorkspace.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -34,15 +39,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/workspaces`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.workspace !== undefined) bodyPayload.workspace = params.workspace; + if (args.workspace !== undefined) bodyPayload.workspace = args.workspace; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/deleteApiCollectionComment.ts b/src/tools/deleteApiCollectionComment.ts index 8d11bc1..eccfb80 100644 --- a/src/tools/deleteApiCollectionComment.ts +++ b/src/tools/deleteApiCollectionComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -24,11 +29,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/apis/${params.apiId}/collections/${params.collectionId}/comments/${params.commentId}`; + const endpoint = `/apis/${args.apiId}/collections/${args.collectionId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteCollection.ts b/src/tools/deleteCollection.ts index 0e38ac6..fb5af2b 100644 --- a/src/tools/deleteCollection.ts +++ b/src/tools/deleteCollection.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -24,11 +29,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}`; + const endpoint = `/collections/${args.collectionId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteCollectionComment.ts b/src/tools/deleteCollectionComment.ts index f5ea07e..df282f8 100644 --- a/src/tools/deleteCollectionComment.ts +++ b/src/tools/deleteCollectionComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -23,11 +28,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteCollectionFolder.ts b/src/tools/deleteCollectionFolder.ts index cbfa605..3de3561 100644 --- a/src/tools/deleteCollectionFolder.ts +++ b/src/tools/deleteCollectionFolder.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -21,11 +26,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteCollectionRequest.ts b/src/tools/deleteCollectionRequest.ts index b5584b6..b78e0e5 100644 --- a/src/tools/deleteCollectionRequest.ts +++ b/src/tools/deleteCollectionRequest.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -21,11 +26,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteCollectionResponse.ts b/src/tools/deleteCollectionResponse.ts index 2d6fe9f..bfd2beb 100644 --- a/src/tools/deleteCollectionResponse.ts +++ b/src/tools/deleteCollectionResponse.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -21,11 +26,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteEnvironment.ts b/src/tools/deleteEnvironment.ts index ab87143..d054f21 100644 --- a/src/tools/deleteEnvironment.ts +++ b/src/tools/deleteEnvironment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/environments/${params.environmentId}`; + const endpoint = `/environments/${args.environmentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteFolderComment.ts b/src/tools/deleteFolderComment.ts index 47bcba2..13e2119 100644 --- a/src/tools/deleteFolderComment.ts +++ b/src/tools/deleteFolderComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -24,11 +29,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteMock.ts b/src/tools/deleteMock.ts index fb22bad..8692cb8 100644 --- a/src/tools/deleteMock.ts +++ b/src/tools/deleteMock.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -8,21 +13,23 @@ function asMcpError(error: unknown): McpError { } export const method = 'deleteMock'; -export const description = 'Deletes a mock server.'; +export const description = + 'Deletes a mock server.\n- Resource: Mock server entity. This is destructive.\n- Ensure you are targeting the correct mock ID.\n'; export const parameters = z.object({ mockId: z.string().describe("The mock's ID.") }); export const annotations = { - title: 'Deletes a mock server.', + title: + 'Deletes a mock server.\n- Resource: Mock server entity. This is destructive.\n- Ensure you are targeting the correct mock ID.\n', readOnlyHint: false, destructiveHint: true, idempotentHint: true, }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/mocks/${params.mockId}`; + const endpoint = `/mocks/${args.mockId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteMonitor.ts b/src/tools/deleteMonitor.ts index 971802e..49a6f1e 100644 --- a/src/tools/deleteMonitor.ts +++ b/src/tools/deleteMonitor.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/monitors/${params.monitorId}`; + const endpoint = `/monitors/${args.monitorId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deletePanElementOrFolder.ts b/src/tools/deletePanElementOrFolder.ts index c7b6781..ebe17b4 100644 --- a/src/tools/deletePanElementOrFolder.ts +++ b/src/tools/deletePanElementOrFolder.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -27,11 +32,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/network/private/${params.elementType}/${params.elementId}`; + const endpoint = `/network/private/${args.elementType}/${args.elementId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteRequestComment.ts b/src/tools/deleteRequestComment.ts index 1c9fb4f..88fae2f 100644 --- a/src/tools/deleteRequestComment.ts +++ b/src/tools/deleteRequestComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -24,11 +29,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteResponseComment.ts b/src/tools/deleteResponseComment.ts index c30b9f3..069995c 100644 --- a/src/tools/deleteResponseComment.ts +++ b/src/tools/deleteResponseComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -24,11 +29,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteSpec.ts b/src/tools/deleteSpec.ts index 0632b58..9580a12 100644 --- a/src/tools/deleteSpec.ts +++ b/src/tools/deleteSpec.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -20,11 +25,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}`; + const endpoint = `/specs/${args.specId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteSpecFile.ts b/src/tools/deleteSpecFile.ts index 1acb9e1..5c04d23 100644 --- a/src/tools/deleteSpecFile.ts +++ b/src/tools/deleteSpecFile.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -23,11 +28,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}/files/${params.filePath}`; + const endpoint = `/specs/${args.specId}/files/${args.filePath}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/deleteWorkspace.ts b/src/tools/deleteWorkspace.ts index e45be60..6f71b1a 100644 --- a/src/tools/deleteWorkspace.ts +++ b/src/tools/deleteWorkspace.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -20,11 +25,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/workspaces/${params.workspaceId}`; + const endpoint = `/workspaces/${args.workspaceId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/duplicateCollection.ts b/src/tools/duplicateCollection.ts index cb6fabc..b028eac 100644 --- a/src/tools/duplicateCollection.ts +++ b/src/tools/duplicateCollection.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -27,16 +32,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/duplicates`; + const endpoint = `/collections/${args.collectionId}/duplicates`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.workspace !== undefined) bodyPayload.workspace = params.workspace; - if (params.suffix !== undefined) bodyPayload.suffix = params.suffix; + if (args.workspace !== undefined) bodyPayload.workspace = args.workspace; + if (args.suffix !== undefined) bodyPayload.suffix = args.suffix; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/generateCollection.ts b/src/tools/generateCollection.ts index dc27150..ff04884 100644 --- a/src/tools/generateCollection.ts +++ b/src/tools/generateCollection.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -9,11 +14,11 @@ function asMcpError(error: unknown): McpError { export const method = 'generateCollection'; export const description = - 'Creates a collection from the given API specification. The response contains a polling link to the task status.'; + 'Creates a collection from the given API specification.\nThe specification must already exist or be created before it can be used to generate a collection.\nThe response contains a polling link to the task status.\n'; export const parameters = z.object({ specId: z.string().describe("The spec's ID."), elementType: z.literal('collection').describe('The `collection` element type.'), - name: z.string().describe("The generated collection's name.").optional(), + name: z.string().describe("The generated collection's name."), options: z .object({ requestNameSource: z @@ -74,27 +79,27 @@ export const parameters = z.object({ .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." ) - .optional(), + .default({ enableOptionalParameters: true, folderStrategy: 'Paths' }), }); export const annotations = { title: - 'Creates a collection from the given API specification. The response contains a polling link to the task status.', + 'Creates a collection from the given API specification.\nThe specification must already exist or be created before it can be used to generate a collection.\nThe response contains a polling link to the task status.\n', readOnlyHint: false, destructiveHint: false, idempotentHint: false, }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}/generations/${params.elementType}`; + const endpoint = `/specs/${args.specId}/generations/${args.elementType}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; - if (params.options !== undefined) bodyPayload.options = params.options; + if (args.name !== undefined) bodyPayload.name = args.name; + if (args.options !== undefined) bodyPayload.options = args.options; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/generateSpecFromCollection.ts b/src/tools/generateSpecFromCollection.ts index 3c77e45..4150672 100644 --- a/src/tools/generateSpecFromCollection.ts +++ b/src/tools/generateSpecFromCollection.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -26,17 +31,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionUid}/generations/${params.elementType}`; + const endpoint = `/collections/${args.collectionUid}/generations/${args.elementType}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; - if (params.type !== undefined) bodyPayload.type = params.type; - if (params.format !== undefined) bodyPayload.format = params.format; + if (args.name !== undefined) bodyPayload.name = args.name; + if (args.type !== undefined) bodyPayload.type = args.type; + if (args.format !== undefined) bodyPayload.format = args.format; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/getAllElementsAndFolders.ts b/src/tools/getAllElementsAndFolders.ts index ca82f4f..24137c2 100644 --- a/src/tools/getAllElementsAndFolders.ts +++ b/src/tools/getAllElementsAndFolders.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -98,26 +103,25 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/network/private`; const query = new URLSearchParams(); - if (params.since !== undefined) query.set('since', String(params.since)); - if (params.until !== undefined) query.set('until', String(params.until)); - if (params.addedBy !== undefined) query.set('addedBy', String(params.addedBy)); - if (params.name !== undefined) query.set('name', String(params.name)); - if (params.summary !== undefined) query.set('summary', String(params.summary)); - if (params.description !== undefined) query.set('description', String(params.description)); - if (params.sort !== undefined) query.set('sort', String(params.sort)); - if (params.direction !== undefined) query.set('direction', String(params.direction)); - if (params.createdBy !== undefined) query.set('createdBy', String(params.createdBy)); - if (params.offset !== undefined) query.set('offset', String(params.offset)); - if (params.limit !== undefined) query.set('limit', String(params.limit)); - if (params.parentFolderId !== undefined) - query.set('parentFolderId', String(params.parentFolderId)); - if (params.type !== undefined) query.set('type', String(params.type)); + if (args.since !== undefined) query.set('since', String(args.since)); + if (args.until !== undefined) query.set('until', String(args.until)); + if (args.addedBy !== undefined) query.set('addedBy', String(args.addedBy)); + if (args.name !== undefined) query.set('name', String(args.name)); + if (args.summary !== undefined) query.set('summary', String(args.summary)); + if (args.description !== undefined) query.set('description', String(args.description)); + if (args.sort !== undefined) query.set('sort', String(args.sort)); + if (args.direction !== undefined) query.set('direction', String(args.direction)); + if (args.createdBy !== undefined) query.set('createdBy', String(args.createdBy)); + if (args.offset !== undefined) query.set('offset', String(args.offset)); + if (args.limit !== undefined) query.set('limit', String(args.limit)); + if (args.parentFolderId !== undefined) query.set('parentFolderId', String(args.parentFolderId)); + if (args.type !== undefined) query.set('type', String(args.type)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getAllPanAddElementRequests.ts b/src/tools/getAllPanAddElementRequests.ts index a553d94..a0e686f 100644 --- a/src/tools/getAllPanAddElementRequests.ts +++ b/src/tools/getAllPanAddElementRequests.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -75,22 +80,22 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/network/private/network-entity/request/all`; const query = new URLSearchParams(); - if (params.since !== undefined) query.set('since', String(params.since)); - if (params.until !== undefined) query.set('until', String(params.until)); - if (params.requestedBy !== undefined) query.set('requestedBy', String(params.requestedBy)); - if (params.type !== undefined) query.set('type', String(params.type)); - if (params.status !== undefined) query.set('status', String(params.status)); - if (params.name !== undefined) query.set('name', String(params.name)); - if (params.sort !== undefined) query.set('sort', String(params.sort)); - if (params.direction !== undefined) query.set('direction', String(params.direction)); - if (params.offset !== undefined) query.set('offset', String(params.offset)); - if (params.limit !== undefined) query.set('limit', String(params.limit)); + if (args.since !== undefined) query.set('since', String(args.since)); + if (args.until !== undefined) query.set('until', String(args.until)); + if (args.requestedBy !== undefined) query.set('requestedBy', String(args.requestedBy)); + if (args.type !== undefined) query.set('type', String(args.type)); + if (args.status !== undefined) query.set('status', String(args.status)); + if (args.name !== undefined) query.set('name', String(args.name)); + if (args.sort !== undefined) query.set('sort', String(args.sort)); + if (args.direction !== undefined) query.set('direction', String(args.direction)); + if (args.offset !== undefined) query.set('offset', String(args.offset)); + if (args.limit !== undefined) query.set('limit', String(args.limit)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getAllSpecs.ts b/src/tools/getAllSpecs.ts index ba9b1ae..3f0a127 100644 --- a/src/tools/getAllSpecs.ts +++ b/src/tools/getAllSpecs.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -31,15 +36,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/specs`; const query = new URLSearchParams(); - if (params.workspaceId !== undefined) query.set('workspaceId', String(params.workspaceId)); - if (params.cursor !== undefined) query.set('cursor', String(params.cursor)); - if (params.limit !== undefined) query.set('limit', String(params.limit)); + if (args.workspaceId !== undefined) query.set('workspaceId', String(args.workspaceId)); + if (args.cursor !== undefined) query.set('cursor', String(args.cursor)); + if (args.limit !== undefined) query.set('limit', String(args.limit)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getAsyncSpecTaskStatus.ts b/src/tools/getAsyncSpecTaskStatus.ts index 2e5b1ed..f2c40ab 100644 --- a/src/tools/getAsyncSpecTaskStatus.ts +++ b/src/tools/getAsyncSpecTaskStatus.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -22,11 +27,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/${params.elementType}/${params.elementId}/tasks/${params.taskId}`; + const endpoint = `/${args.elementType}/${args.elementId}/tasks/${args.taskId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getAuthenticatedUser.ts b/src/tools/getAuthenticatedUser.ts index 47d992d..ad91e23 100644 --- a/src/tools/getAuthenticatedUser.ts +++ b/src/tools/getAuthenticatedUser.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -9,20 +14,20 @@ function asMcpError(error: unknown): McpError { export const method = 'getAuthenticatedUser'; export const description = - 'Gets information about the authenticated user.\n\n**Note:**\n\n- This API returns a different response for users with the [Guest and Partner roles](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles).\n- The \\`flow_count\\` response only returns for users on [Free plans](https://www.postman.com/pricing/).\n'; + 'Gets information about the authenticated user.\n- This endpoint provides “current user” context (\\`user.id\\`, \\`username\\`, \\`teamId\\`, roles).\n- When a user asks for “my …” (e.g., “my workspaces, my information, etc.”), call this first to resolve the user ID.\n'; export const parameters = z.object({}); export const annotations = { title: - 'Gets information about the authenticated user.\n\n**Note:**\n\n- This API returns a different response for users with the [Guest and Partner roles](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles).\n- The \\`flow_count\\` response only returns for users on [Free plans](https://www.postman.com/pricing/).\n', + 'Gets information about the authenticated user.\n- This endpoint provides “current user” context (\\`user.id\\`, \\`username\\`, \\`teamId\\`, roles).\n- When a user asks for “my …” (e.g., “my workspaces, my information, etc.”), call this first to resolve the user ID.\n', readOnlyHint: true, destructiveHint: false, idempotentHint: true, }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/me`; const query = new URLSearchParams(); diff --git a/src/tools/getCollection.ts b/src/tools/getCollection.ts index e8bc9ec..e9a3651 100644 --- a/src/tools/getCollection.ts +++ b/src/tools/getCollection.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -38,14 +43,14 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}`; + const endpoint = `/collections/${args.collectionId}`; const query = new URLSearchParams(); - if (params.access_key !== undefined) query.set('access_key', String(params.access_key)); - if (params.model !== undefined) query.set('model', String(params.model)); + if (args.access_key !== undefined) query.set('access_key', String(args.access_key)); + if (args.model !== undefined) query.set('model', String(args.model)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getCollectionComments.ts b/src/tools/getCollectionComments.ts index 6dafe50..1c0a4f1 100644 --- a/src/tools/getCollectionComments.ts +++ b/src/tools/getCollectionComments.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -20,11 +25,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/comments`; + const endpoint = `/collections/${args.collectionId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getCollectionFolder.ts b/src/tools/getCollectionFolder.ts index 2392c2c..8dec8bf 100644 --- a/src/tools/getCollectionFolder.ts +++ b/src/tools/getCollectionFolder.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -30,15 +35,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}`; const query = new URLSearchParams(); - if (params.ids !== undefined) query.set('ids', String(params.ids)); - if (params.uid !== undefined) query.set('uid', String(params.uid)); - if (params.populate !== undefined) query.set('populate', String(params.populate)); + if (args.ids !== undefined) query.set('ids', String(args.ids)); + if (args.uid !== undefined) query.set('uid', String(args.uid)); + if (args.populate !== undefined) query.set('populate', String(args.populate)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getCollectionForks.ts b/src/tools/getCollectionForks.ts index 9e1009a..60b876a 100644 --- a/src/tools/getCollectionForks.ts +++ b/src/tools/getCollectionForks.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -39,15 +44,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/forks`; + const endpoint = `/collections/${args.collectionId}/forks`; const query = new URLSearchParams(); - if (params.cursor !== undefined) query.set('cursor', String(params.cursor)); - if (params.limit !== undefined) query.set('limit', String(params.limit)); - if (params.direction !== undefined) query.set('direction', String(params.direction)); + if (args.cursor !== undefined) query.set('cursor', String(args.cursor)); + if (args.limit !== undefined) query.set('limit', String(args.limit)); + if (args.direction !== undefined) query.set('direction', String(args.direction)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getCollectionRequest.ts b/src/tools/getCollectionRequest.ts index 1d6019f..16cc677 100644 --- a/src/tools/getCollectionRequest.ts +++ b/src/tools/getCollectionRequest.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -30,15 +35,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}`; const query = new URLSearchParams(); - if (params.ids !== undefined) query.set('ids', String(params.ids)); - if (params.uid !== undefined) query.set('uid', String(params.uid)); - if (params.populate !== undefined) query.set('populate', String(params.populate)); + if (args.ids !== undefined) query.set('ids', String(args.ids)); + if (args.uid !== undefined) query.set('uid', String(args.uid)); + if (args.populate !== undefined) query.set('populate', String(args.populate)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getCollectionResponse.ts b/src/tools/getCollectionResponse.ts index a6e044c..bf711b7 100644 --- a/src/tools/getCollectionResponse.ts +++ b/src/tools/getCollectionResponse.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -30,15 +35,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}`; const query = new URLSearchParams(); - if (params.ids !== undefined) query.set('ids', String(params.ids)); - if (params.uid !== undefined) query.set('uid', String(params.uid)); - if (params.populate !== undefined) query.set('populate', String(params.populate)); + if (args.ids !== undefined) query.set('ids', String(args.ids)); + if (args.uid !== undefined) query.set('uid', String(args.uid)); + if (args.populate !== undefined) query.set('populate', String(args.populate)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getCollectionTags.ts b/src/tools/getCollectionTags.ts index d0dcbc2..3415abf 100644 --- a/src/tools/getCollectionTags.ts +++ b/src/tools/getCollectionTags.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -20,11 +25,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/tags`; + const endpoint = `/collections/${args.collectionId}/tags`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getCollectionUpdatesTasks.ts b/src/tools/getCollectionUpdatesTasks.ts index 1bcc48b..8988c5e 100644 --- a/src/tools/getCollectionUpdatesTasks.ts +++ b/src/tools/getCollectionUpdatesTasks.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collection-updates-tasks/${params.taskId}`; + const endpoint = `/collection-updates-tasks/${args.taskId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getCollections.ts b/src/tools/getCollections.ts index 164c135..48c4824 100644 --- a/src/tools/getCollections.ts +++ b/src/tools/getCollections.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -33,16 +38,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/collections`; const query = new URLSearchParams(); - if (params.workspace !== undefined) query.set('workspace', String(params.workspace)); - if (params.name !== undefined) query.set('name', String(params.name)); - if (params.limit !== undefined) query.set('limit', String(params.limit)); - if (params.offset !== undefined) query.set('offset', String(params.offset)); + if (args.workspace !== undefined) query.set('workspace', String(args.workspace)); + if (args.name !== undefined) query.set('name', String(args.name)); + if (args.limit !== undefined) query.set('limit', String(args.limit)); + if (args.offset !== undefined) query.set('offset', String(args.offset)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getCollectionsForkedByUser.ts b/src/tools/getCollectionsForkedByUser.ts index c077dd5..006b77e 100644 --- a/src/tools/getCollectionsForkedByUser.ts +++ b/src/tools/getCollectionsForkedByUser.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -36,15 +41,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/collections/collection-forks`; const query = new URLSearchParams(); - if (params.cursor !== undefined) query.set('cursor', String(params.cursor)); - if (params.limit !== undefined) query.set('limit', String(params.limit)); - if (params.direction !== undefined) query.set('direction', String(params.direction)); + if (args.cursor !== undefined) query.set('cursor', String(args.cursor)); + if (args.limit !== undefined) query.set('limit', String(args.limit)); + if (args.direction !== undefined) query.set('direction', String(args.direction)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getDuplicateCollectionTaskStatus.ts b/src/tools/getDuplicateCollectionTaskStatus.ts index 45caea2..aefc06c 100644 --- a/src/tools/getDuplicateCollectionTaskStatus.ts +++ b/src/tools/getDuplicateCollectionTaskStatus.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collection-duplicate-tasks/${params.taskId}`; + const endpoint = `/collection-duplicate-tasks/${args.taskId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getEnvironment.ts b/src/tools/getEnvironment.ts index 726956c..77c36c6 100644 --- a/src/tools/getEnvironment.ts +++ b/src/tools/getEnvironment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/environments/${params.environmentId}`; + const endpoint = `/environments/${args.environmentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getEnvironments.ts b/src/tools/getEnvironments.ts index f6f8b46..1ba9485 100644 --- a/src/tools/getEnvironments.ts +++ b/src/tools/getEnvironments.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -22,13 +27,13 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/environments`; const query = new URLSearchParams(); - if (params.workspace !== undefined) query.set('workspace', String(params.workspace)); + if (args.workspace !== undefined) query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getFolderComments.ts b/src/tools/getFolderComments.ts index df70002..56a8d3c 100644 --- a/src/tools/getFolderComments.ts +++ b/src/tools/getFolderComments.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -21,11 +26,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getGeneratedCollectionSpecs.ts b/src/tools/getGeneratedCollectionSpecs.ts index 416c533..3a41abb 100644 --- a/src/tools/getGeneratedCollectionSpecs.ts +++ b/src/tools/getGeneratedCollectionSpecs.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -21,11 +26,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionUid}/generations/${params.elementType}`; + const endpoint = `/collections/${args.collectionUid}/generations/${args.elementType}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getMock.ts b/src/tools/getMock.ts index 810147e..26a9e48 100644 --- a/src/tools/getMock.ts +++ b/src/tools/getMock.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -8,21 +13,23 @@ function asMcpError(error: unknown): McpError { } export const method = 'getMock'; -export const description = 'Gets information about a mock server.'; +export const description = + 'Gets information about a mock server.\n- Resource: Mock server entity. Response includes the associated \\`collection\\` UID and \\`mockUrl\\`.\n- Use the \\`collection\\` UID to navigate back to the source collection.\n'; export const parameters = z.object({ mockId: z.string().describe("The mock's ID.") }); export const annotations = { - title: 'Gets information about a mock server.', + title: + 'Gets information about a mock server.\n- Resource: Mock server entity. Response includes the associated \\`collection\\` UID and \\`mockUrl\\`.\n- Use the \\`collection\\` UID to navigate back to the source collection.\n', readOnlyHint: true, destructiveHint: false, idempotentHint: true, }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/mocks/${params.mockId}`; + const endpoint = `/mocks/${args.mockId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getMocks.ts b/src/tools/getMocks.ts index ada963d..64b76c7 100644 --- a/src/tools/getMocks.ts +++ b/src/tools/getMocks.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -9,28 +14,38 @@ function asMcpError(error: unknown): McpError { export const method = 'getMocks'; export const description = - 'Gets all active mock servers. By default, this endpoint returns only mock servers you created across all workspaces.\n\n**Note:**\n\nIf you pass both the \\`teamId\\` and \\`workspace\\` query parameters, this endpoint only accepts the \\`workspace\\` query.\n'; + 'Gets all active mock servers. By default, returns only mock servers you created across all workspaces.\n\n- Always pass either the \\`workspace\\` or \\`teamId\\` query to scope results. Prefer \\`workspace\\` when known.\n- If you need team-scoped results, set \\`teamId\\` from the current user: call GET \\`/me\\` and use \\`me.teamId\\`.\n- If both \\`teamId\\` and \\`workspace\\` are passed, only \\`workspace\\` is used.\n'; export const parameters = z.object({ - teamId: z.string().describe('Return only results that belong to the given team ID.').optional(), - workspace: z.string().describe('Return only results found in the given workspace ID.').optional(), + teamId: z + .string() + .describe( + 'Return only results that belong to the given team ID.\n- For team-scoped requests, set this from GET `/me` (`me.teamId`).\n' + ) + .optional(), + workspace: z + .string() + .describe( + 'Return only results found in the given workspace ID.\n- Prefer this parameter when the user mentions a specific workspace.\n' + ) + .optional(), }); export const annotations = { title: - 'Gets all active mock servers. By default, this endpoint returns only mock servers you created across all workspaces.\n\n**Note:**\n\nIf you pass both the \\`teamId\\` and \\`workspace\\` query parameters, this endpoint only accepts the \\`workspace\\` query.\n', + 'Gets all active mock servers. By default, returns only mock servers you created across all workspaces.\n\n- Always pass either the \\`workspace\\` or \\`teamId\\` query to scope results. Prefer \\`workspace\\` when known.\n- If you need team-scoped results, set \\`teamId\\` from the current user: call GET \\`/me\\` and use \\`me.teamId\\`.\n- If both \\`teamId\\` and \\`workspace\\` are passed, only \\`workspace\\` is used.\n', readOnlyHint: true, destructiveHint: false, idempotentHint: true, }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/mocks`; const query = new URLSearchParams(); - if (params.teamId !== undefined) query.set('teamId', String(params.teamId)); - if (params.workspace !== undefined) query.set('workspace', String(params.workspace)); + if (args.teamId !== undefined) query.set('teamId', String(args.teamId)); + if (args.workspace !== undefined) query.set('workspace', String(args.workspace)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getMonitor.ts b/src/tools/getMonitor.ts index 3f12f25..4132a9f 100644 --- a/src/tools/getMonitor.ts +++ b/src/tools/getMonitor.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/monitors/${params.monitorId}`; + const endpoint = `/monitors/${args.monitorId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getMonitors.ts b/src/tools/getMonitors.ts index 5e93276..751f4f9 100644 --- a/src/tools/getMonitors.ts +++ b/src/tools/getMonitors.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -44,21 +49,19 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/monitors`; const query = new URLSearchParams(); - if (params.workspace !== undefined) query.set('workspace', String(params.workspace)); - if (params.active !== undefined) query.set('active', String(params.active)); - if (params.owner !== undefined) query.set('owner', String(params.owner)); - if (params.collectionUid !== undefined) - query.set('collectionUid', String(params.collectionUid)); - if (params.environmentUid !== undefined) - query.set('environmentUid', String(params.environmentUid)); - if (params.cursor !== undefined) query.set('cursor', String(params.cursor)); - if (params.limit !== undefined) query.set('limit', String(params.limit)); + if (args.workspace !== undefined) query.set('workspace', String(args.workspace)); + if (args.active !== undefined) query.set('active', String(args.active)); + if (args.owner !== undefined) query.set('owner', String(args.owner)); + if (args.collectionUid !== undefined) query.set('collectionUid', String(args.collectionUid)); + if (args.environmentUid !== undefined) query.set('environmentUid', String(args.environmentUid)); + if (args.cursor !== undefined) query.set('cursor', String(args.cursor)); + if (args.limit !== undefined) query.set('limit', String(args.limit)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getRequestComments.ts b/src/tools/getRequestComments.ts index f20cb6c..3e29099 100644 --- a/src/tools/getRequestComments.ts +++ b/src/tools/getRequestComments.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -25,11 +30,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}/comments`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getResponseComments.ts b/src/tools/getResponseComments.ts index 3d450da..d404472 100644 --- a/src/tools/getResponseComments.ts +++ b/src/tools/getResponseComments.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -21,11 +26,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}/comments`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getSourceCollectionStatus.ts b/src/tools/getSourceCollectionStatus.ts index f5a6a3e..f43ba28 100644 --- a/src/tools/getSourceCollectionStatus.ts +++ b/src/tools/getSourceCollectionStatus.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -20,11 +25,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/source-status`; + const endpoint = `/collections/${args.collectionId}/source-status`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getSpec.ts b/src/tools/getSpec.ts index 4b11a34..2cb8741 100644 --- a/src/tools/getSpec.ts +++ b/src/tools/getSpec.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}`; + const endpoint = `/specs/${args.specId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getSpecCollections.ts b/src/tools/getSpecCollections.ts index e0f1cdd..9857da7 100644 --- a/src/tools/getSpecCollections.ts +++ b/src/tools/getSpecCollections.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -32,14 +37,14 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}/generations/${params.elementType}`; + const endpoint = `/specs/${args.specId}/generations/${args.elementType}`; const query = new URLSearchParams(); - if (params.limit !== undefined) query.set('limit', String(params.limit)); - if (params.cursor !== undefined) query.set('cursor', String(params.cursor)); + if (args.limit !== undefined) query.set('limit', String(args.limit)); + if (args.cursor !== undefined) query.set('cursor', String(args.cursor)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getSpecDefinition.ts b/src/tools/getSpecDefinition.ts index 2818043..d410554 100644 --- a/src/tools/getSpecDefinition.ts +++ b/src/tools/getSpecDefinition.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}/definitions`; + const endpoint = `/specs/${args.specId}/definitions`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getSpecFile.ts b/src/tools/getSpecFile.ts index 96796f6..33ad4d1 100644 --- a/src/tools/getSpecFile.ts +++ b/src/tools/getSpecFile.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -21,11 +26,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}/files/${params.filePath}`; + const endpoint = `/specs/${args.specId}/files/${args.filePath}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getSpecFiles.ts b/src/tools/getSpecFiles.ts index b0b0ce5..c6c2dec 100644 --- a/src/tools/getSpecFiles.ts +++ b/src/tools/getSpecFiles.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}/files`; + const endpoint = `/specs/${args.specId}/files`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getStatusOfAnAsyncApiTask.ts b/src/tools/getStatusOfAnAsyncApiTask.ts index 39f1298..2307cc4 100644 --- a/src/tools/getStatusOfAnAsyncApiTask.ts +++ b/src/tools/getStatusOfAnAsyncApiTask.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -24,11 +29,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/apis/${params.apiId}/tasks/${params.taskId}`; + const endpoint = `/apis/${args.apiId}/tasks/${args.taskId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getTaggedEntities.ts b/src/tools/getTaggedEntities.ts index e3996da..f373734 100644 --- a/src/tools/getTaggedEntities.ts +++ b/src/tools/getTaggedEntities.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -49,16 +54,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/tags/${params.slug}/entities`; + const endpoint = `/tags/${args.slug}/entities`; const query = new URLSearchParams(); - if (params.limit !== undefined) query.set('limit', String(params.limit)); - if (params.direction !== undefined) query.set('direction', String(params.direction)); - if (params.cursor !== undefined) query.set('cursor', String(params.cursor)); - if (params.entityType !== undefined) query.set('entityType', String(params.entityType)); + if (args.limit !== undefined) query.set('limit', String(args.limit)); + if (args.direction !== undefined) query.set('direction', String(args.direction)); + if (args.cursor !== undefined) query.set('cursor', String(args.cursor)); + if (args.entityType !== undefined) query.set('entityType', String(args.entityType)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getWorkspace.ts b/src/tools/getWorkspace.ts index 2a4a922..4aabe2d 100644 --- a/src/tools/getWorkspace.ts +++ b/src/tools/getWorkspace.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -28,13 +33,13 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/workspaces/${params.workspaceId}`; + const endpoint = `/workspaces/${args.workspaceId}`; const query = new URLSearchParams(); - if (params.include !== undefined) query.set('include', String(params.include)); + if (args.include !== undefined) query.set('include', String(args.include)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/getWorkspaceGlobalVariables.ts b/src/tools/getWorkspaceGlobalVariables.ts index 2e74239..f1a7b64 100644 --- a/src/tools/getWorkspaceGlobalVariables.ts +++ b/src/tools/getWorkspaceGlobalVariables.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -20,11 +25,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/workspaces/${params.workspaceId}/global-variables`; + const endpoint = `/workspaces/${args.workspaceId}/global-variables`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getWorkspaceTags.ts b/src/tools/getWorkspaceTags.ts index 727db2d..d782d8b 100644 --- a/src/tools/getWorkspaceTags.ts +++ b/src/tools/getWorkspaceTags.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -18,11 +23,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/workspaces/${params.workspaceId}/tags`; + const endpoint = `/workspaces/${args.workspaceId}/tags`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/getWorkspaces.ts b/src/tools/getWorkspaces.ts index 7a95c6a..0747db8 100644 --- a/src/tools/getWorkspaces.ts +++ b/src/tools/getWorkspaces.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -9,17 +14,19 @@ function asMcpError(error: unknown): McpError { export const method = 'getWorkspaces'; export const description = - "Gets all [workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/). The response includes your workspaces and any workspaces that you have access to.\n\n**Note:**\n\nThis endpoint's response contains the visibility field. Visibility determines who can access the workspace:\n- \\`personal\\` — Only you can access the workspace.\n- \\`team\\` — All team members can access the workspace.\n- \\`private\\` — Only invited team members can access the workspace ([**Professional** and **Enterprise** plans only](https://www.postman.com/pricing)).\n- \\`public\\` — Everyone can access the workspace.\n- \\`partner\\` — Only invited team members and [partners](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) can access the workspace ([**Professional** and **Enterprise** plans only](https://www.postman.com/pricing)).\n"; + "Gets all workspaces you have access to.\n- For “my …” requests, first call GET \\`/me\\` and pass \\`createdBy={me.user.id}\\`.\n- This endpoint's response contains the visibility field. Visibility determines who can access the workspace:\n - \\`personal\\` — Only you can access the workspace.\n - \\`team\\` — All team members can access the workspace.\n - \\`private\\` — Only invited team members can access the workspace (Professional and Enterprise).\n - \\`public\\` — Everyone can access the workspace.\n - \\`partner\\` — Invited team members and partners (Professional and Enterprise).\n- For tools that require the workspace ID, and no workspace ID is provided, ask the user to provide the workspace ID. If the user does not provide the workspace ID, call this first with the createdBy parameter to use the first workspace.\n- Examples:\n - “List my workspaces” → GET \\`/me\\`, then GET \\`/workspaces?createdBy={me.user.id}\\`\n - “List my personal workspaces” → GET \\`/me\\`, then GET \\`/workspaces?type=personal&createdBy={me.user.id}\\`\n - “List all public workspaces” → GET \\`/workspaces?type=public\\`\n"; export const parameters = z.object({ type: z .enum(['personal', 'team', 'private', 'public', 'partner']) - .describe('The type of workspace to filter the response by.') + .describe( + 'The type of workspace to filter the response by. One of: `personal`, `team`, `private`, `public`, `partner`.\n- For “my …” requests, this can be combined with `createdBy`. If type is not specified, it will search across all types for that user.\n' + ) .optional(), createdBy: z .number() .int() .describe( - 'Return only workspaces created by a specific user ID. For multiple users, pass this value as a comma-separated list of user IDs. The response only returns workspaces that you have access to.' + "Return only workspaces created by the specified Postman user ID.\n- For “my …” requests, set `createdBy` to the current user’s ID from GET `/me` (`me.user.id`).\n- If the user's ID is not known, first call GET `/me`, then retry with `createdBy`.\n" ) .optional(), include: z @@ -31,22 +38,22 @@ export const parameters = z.object({ }); export const annotations = { title: - "Gets all [workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/). The response includes your workspaces and any workspaces that you have access to.\n\n**Note:**\n\nThis endpoint's response contains the visibility field. Visibility determines who can access the workspace:\n- \\`personal\\` — Only you can access the workspace.\n- \\`team\\` — All team members can access the workspace.\n- \\`private\\` — Only invited team members can access the workspace ([**Professional** and **Enterprise** plans only](https://www.postman.com/pricing)).\n- \\`public\\` — Everyone can access the workspace.\n- \\`partner\\` — Only invited team members and [partners](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) can access the workspace ([**Professional** and **Enterprise** plans only](https://www.postman.com/pricing)).\n", + "Gets all workspaces you have access to.\n- For “my …” requests, first call GET \\`/me\\` and pass \\`createdBy={me.user.id}\\`.\n- This endpoint's response contains the visibility field. Visibility determines who can access the workspace:\n - \\`personal\\` — Only you can access the workspace.\n - \\`team\\` — All team members can access the workspace.\n - \\`private\\` — Only invited team members can access the workspace (Professional and Enterprise).\n - \\`public\\` — Everyone can access the workspace.\n - \\`partner\\` — Invited team members and partners (Professional and Enterprise).\n- For tools that require the workspace ID, and no workspace ID is provided, ask the user to provide the workspace ID. If the user does not provide the workspace ID, call this first with the createdBy parameter to use the first workspace.\n- Examples:\n - “List my workspaces” → GET \\`/me\\`, then GET \\`/workspaces?createdBy={me.user.id}\\`\n - “List my personal workspaces” → GET \\`/me\\`, then GET \\`/workspaces?type=personal&createdBy={me.user.id}\\`\n - “List all public workspaces” → GET \\`/workspaces?type=public\\`\n", readOnlyHint: true, destructiveHint: false, idempotentHint: true, }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/workspaces`; const query = new URLSearchParams(); - if (params.type !== undefined) query.set('type', String(params.type)); - if (params.createdBy !== undefined) query.set('createdBy', String(params.createdBy)); - if (params.include !== undefined) query.set('include', String(params.include)); + if (args.type !== undefined) query.set('type', String(args.type)); + if (args.createdBy !== undefined) query.set('createdBy', String(args.createdBy)); + if (args.include !== undefined) query.set('include', String(args.include)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/mergeCollectionFork.ts b/src/tools/mergeCollectionFork.ts index e003942..2b61172 100644 --- a/src/tools/mergeCollectionFork.ts +++ b/src/tools/mergeCollectionFork.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -29,17 +34,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/collections/merge`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.destination !== undefined) bodyPayload.destination = params.destination; - if (params.source !== undefined) bodyPayload.source = params.source; - if (params.strategy !== undefined) bodyPayload.strategy = params.strategy; + if (args.destination !== undefined) bodyPayload.destination = args.destination; + if (args.source !== undefined) bodyPayload.source = args.source; + if (args.strategy !== undefined) bodyPayload.strategy = args.strategy; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/patchCollection.ts b/src/tools/patchCollection.ts index d74254e..84ecf6c 100644 --- a/src/tools/patchCollection.ts +++ b/src/tools/patchCollection.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -382,15 +387,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}`; + const endpoint = `/collections/${args.collectionId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.collection !== undefined) bodyPayload.collection = params.collection; + if (args.collection !== undefined) bodyPayload.collection = args.collection; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/patchEnvironment.ts b/src/tools/patchEnvironment.ts index d962aaf..23e37eb 100644 --- a/src/tools/patchEnvironment.ts +++ b/src/tools/patchEnvironment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; -import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { PostmanAPIClient, ContentType } from '../clients/postman.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -10,7 +15,65 @@ function asMcpError(error: unknown): McpError { export const method = 'patchEnvironment'; export const description = 'Updates specific environment properties, such as its name and variables.\n\n**Note:**\n\n- You can only perform one type of operation at a time. For example, you cannot perform an \\`add\\` and \\`replace\\` operation in the same call.\n- The request body size cannot exceed the maximum allowed size of 30MB.\n- If you receive an HTTP \\`411 Length Required\\` error response, manually pass the \\`Content-Length\\` header and its value in the request header.\n- To add a description to an existing variable, use the \\`add\\` operation.\n'; -export const parameters = z.object({ environmentId: z.string().describe("The environment's ID.") }); +export const parameters = z.object({ + environmentId: z.string().describe("The environment's ID."), + body: z.union([ + z.array( + z.object({ + op: z.string().describe('The `add` operation.'), + path: z + .string() + .describe( + 'The [JSON Pointer syntax](https://datatracker.ietf.org/doc/html/rfc6901) that indicates the entry to update, in `/values/#` format, where `#` is the entry ID. The first record begins at the `0` value.' + ), + value: z + .object({ + enabled: z.boolean().describe('If true, the variable is enabled.').optional(), + key: z.string().describe("The variable's name.").optional(), + value: z.string().describe("The variable's value.").optional(), + type: z + .enum(['secret', 'default']) + .describe( + "The variable's type:\n- `secret` — The variable value is masked.\n- `default` — The variable value is visible in plain text.\n" + ) + .optional(), + description: z.string().max(512).describe("The variable's description.").optional(), + }) + .describe("Information about the environment's variables."), + }) + ), + z.array( + z + .object({ + op: z.string().describe('The `replace` operation.'), + path: z.string().describe('The `/name` value.'), + value: z.string().describe("The environment's updated name."), + }) + .describe('Information about the environment.') + ), + z.array( + z.object({ + op: z.string().describe('The `replace` operation.'), + path: z + .string() + .describe( + 'The [JSON Pointer syntax](https://datatracker.ietf.org/doc/html/rfc6901) that indicates the entry to update, in `/values/#/{value}` format, where:\n- `#` — The entry ID. The first record begins at the `0` value.\n- `{value}` — The variable property to update. Accepts `key`, `value`, `type`, and `enable`.\n' + ), + value: z.string().describe("The variable's value."), + }) + ), + z.array( + z.object({ + op: z.string().describe('The `remove` operation.'), + path: z + .string() + .describe( + 'The [JSON Pointer syntax](https://datatracker.ietf.org/doc/html/rfc6901) that indicates the entry to update, in `/values/#` format, where `#` is the entry ID. The first record begins at the `0` value.' + ), + }) + ), + ]), +}); export const annotations = { title: 'Updates specific environment properties, such as its name and variables.\n\n**Note:**\n\n- You can only perform one type of operation at a time. For example, you cannot perform an \\`add\\` and \\`replace\\` operation in the same call.\n- The request body size cannot exceed the maximum allowed size of 30MB.\n- If you receive an HTTP \\`411 Length Required\\` error response, manually pass the \\`Content-Length\\` header and its value in the request header.\n- To add a description to an existing variable, use the \\`add\\` operation.\n', @@ -20,14 +83,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/environments/${params.environmentId}`; + const endpoint = `/environments/${args.environmentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; + const bodyPayload = args.body; const options: any = { + body: JSON.stringify(bodyPayload), + contentType: ContentType.Json, headers: extra.headers, }; const result = await extra.client.patch(url, options); diff --git a/src/tools/postPanElementOrFolder.ts b/src/tools/postPanElementOrFolder.ts index a72320a..2521258 100644 --- a/src/tools/postPanElementOrFolder.ts +++ b/src/tools/postPanElementOrFolder.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; -import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { PostmanAPIClient, ContentType } from '../clients/postman.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -10,7 +15,55 @@ function asMcpError(error: unknown): McpError { export const method = 'postPanElementOrFolder'; export const description = "Publishes a element or creates a folder in your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/). An element is a Postman API, collection, or workspace.\n\n**Note:**\n\nYou can only pass one element object type per call. For example, you cannot pass both \\`api\\` and \\`collection\\` in a single request.\n"; -export const parameters = z.object({}); +export const parameters = z.object({ + body: z.union([ + z.object({ + api: z + .object({ + id: z.string().describe("The API's ID."), + parentFolderId: z.number().int().describe("The API's parent folder ID."), + }) + .optional(), + }), + z.object({ + collection: z + .object({ + id: z.string().describe("The collection's ID."), + parentFolderId: z.number().int().describe("The collection's parent folder ID."), + environments: z + .array(z.string().describe("An environment's UID.")) + .describe( + 'A list of environment UIDs (`userId`-`environmentId`) to add to the collection.' + ) + .optional(), + }) + .optional(), + }), + z.object({ + workspace: z + .object({ + id: z.string().describe("The workspace's ID."), + parentFolderId: z.number().int().describe("The workspace's parent folder ID."), + }) + .optional(), + }), + z.object({ + folder: z + .object({ + name: z.string().describe("The folder's name."), + description: z.string().describe("The folder's description.").optional(), + parentFolderId: z + .number() + .int() + .describe( + "The folder's parent folder ID. This value defaults to `0`. To create a folder at the root level, omit this property." + ) + .default(0), + }) + .optional(), + }), + ]), +}); export const annotations = { title: "Publishes a element or creates a folder in your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/). An element is a Postman API, collection, or workspace.\n\n**Note:**\n\nYou can only pass one element object type per call. For example, you cannot pass both \\`api\\` and \\`collection\\` in a single request.\n", @@ -20,14 +73,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/network/private`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; + const bodyPayload = args.body; const options: any = { + body: JSON.stringify(bodyPayload), + contentType: ContentType.Json, headers: extra.headers, }; const result = await extra.client.post(url, options); diff --git a/src/tools/publishDocumentation.ts b/src/tools/publishDocumentation.ts index ea1b4bc..9224d80 100644 --- a/src/tools/publishDocumentation.ts +++ b/src/tools/publishDocumentation.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -118,19 +123,19 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/public-documentations`; + const endpoint = `/collections/${args.collectionId}/public-documentations`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.environmentUid !== undefined) bodyPayload.environmentUid = params.environmentUid; - if (params.customColor !== undefined) bodyPayload.customColor = params.customColor; - if (params.documentationLayout !== undefined) - bodyPayload.documentationLayout = params.documentationLayout; - if (params.customization !== undefined) bodyPayload.customization = params.customization; + if (args.environmentUid !== undefined) bodyPayload.environmentUid = args.environmentUid; + if (args.customColor !== undefined) bodyPayload.customColor = args.customColor; + if (args.documentationLayout !== undefined) + bodyPayload.documentationLayout = args.documentationLayout; + if (args.customization !== undefined) bodyPayload.customization = args.customization; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/publishMock.ts b/src/tools/publishMock.ts index 87c25ef..e9f1c87 100644 --- a/src/tools/publishMock.ts +++ b/src/tools/publishMock.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -20,11 +25,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/mocks/${params.mockId}/publish`; + const endpoint = `/mocks/${args.mockId}/publish`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/pullCollectionChanges.ts b/src/tools/pullCollectionChanges.ts index 68b4ff3..e9d114f 100644 --- a/src/tools/pullCollectionChanges.ts +++ b/src/tools/pullCollectionChanges.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -20,11 +25,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/pulls`; + const endpoint = `/collections/${args.collectionId}/pulls`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/putCollection.ts b/src/tools/putCollection.ts index 2ea5549..e14f7e1 100644 --- a/src/tools/putCollection.ts +++ b/src/tools/putCollection.ts @@ -9,7 +9,7 @@ function asMcpError(error: unknown): McpError { export const method = 'putCollection'; export const description = - "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n> The maximum collection size this endpoint accepts cannot exceed 100 MB.\n\nFor a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n- \\`info\\` object — Refer to the **Information** entry.\n- \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n\n**Note:**\n\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n"; + "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n**Note:**\n\n- The maximum collection size this endpoint accepts cannot exceed 100 MB.\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n"; export const parameters = z.object({ collectionId: z .string() @@ -71,19 +71,17 @@ export const parameters = z.object({ key: z.string().describe("The variable's key (name).").optional(), description: z .string() - .describe( - "The variable's description. Doesn't apply to collection-level variables." - ) + .max(512) + .describe("The variable's description.") .optional(), - value: z.string().describe("The key's value.").optional(), - type: z - .enum(['string', 'boolean', 'integer']) - .describe("The variable's type.") + value: z + .union([z.string(), z.boolean(), z.number().int()]) + .describe("The key's value.") .optional(), disabled: z .boolean() .describe( - 'If true, the variable is not enabled. Applies only to query parameter variables.' + "If true, the variable is not enabled. Doesn't apply to path parameter variables." ) .default(false), }) @@ -744,21 +742,15 @@ export const parameters = z.object({ .describe("The variable's ID. Doesn't apply to collection-level variables.") .optional(), key: z.string().describe("The variable's key (name).").optional(), - description: z - .string() - .describe( - "The variable's description. Doesn't apply to collection-level variables." - ) - .optional(), - value: z.string().describe("The key's value.").optional(), - type: z - .enum(['string', 'boolean', 'integer']) - .describe("The variable's type.") + description: z.string().max(512).describe("The variable's description.").optional(), + value: z + .union([z.string(), z.boolean(), z.number().int()]) + .describe("The key's value.") .optional(), disabled: z .boolean() .describe( - 'If true, the variable is not enabled. Applies only to query parameter variables.' + "If true, the variable is not enabled. Doesn't apply to path parameter variables." ) .default(false), }) @@ -1140,7 +1132,7 @@ export const parameters = z.object({ }); export const annotations = { title: - "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n> The maximum collection size this endpoint accepts cannot exceed 100 MB.\n\nFor a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n- \\`info\\` object — Refer to the **Information** entry.\n- \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n\n**Note:**\n\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n", + "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n**Note:**\n\n- The maximum collection size this endpoint accepts cannot exceed 100 MB.\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n", readOnlyHint: false, destructiveHint: false, idempotentHint: true, diff --git a/src/tools/putEnvironment.ts b/src/tools/putEnvironment.ts index 4b7d0e1..cc67771 100644 --- a/src/tools/putEnvironment.ts +++ b/src/tools/putEnvironment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -47,15 +52,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/environments/${params.environmentId}`; + const endpoint = `/environments/${args.environmentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.environment !== undefined) bodyPayload.environment = params.environment; + if (args.environment !== undefined) bodyPayload.environment = args.environment; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/resolveCommentThread.ts b/src/tools/resolveCommentThread.ts index 87f02c8..969119f 100644 --- a/src/tools/resolveCommentThread.ts +++ b/src/tools/resolveCommentThread.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -22,11 +27,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/comments-resolutions/${params.threadId}`; + const endpoint = `/comments-resolutions/${args.threadId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/runMonitor.ts b/src/tools/runMonitor.ts index beea4c1..1074659 100644 --- a/src/tools/runMonitor.ts +++ b/src/tools/runMonitor.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -28,13 +33,13 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/monitors/${params.monitorId}/run`; + const endpoint = `/monitors/${args.monitorId}/run`; const query = new URLSearchParams(); - if (params.async !== undefined) query.set('async', String(params.async)); + if (args.async !== undefined) query.set('async', String(args.async)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/syncCollectionWithSpec.ts b/src/tools/syncCollectionWithSpec.ts index b97e38e..be56b42 100644 --- a/src/tools/syncCollectionWithSpec.ts +++ b/src/tools/syncCollectionWithSpec.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -23,13 +28,13 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionUid}/synchronizations`; + const endpoint = `/collections/${args.collectionUid}/synchronizations`; const query = new URLSearchParams(); - if (params.specId !== undefined) query.set('specId', String(params.specId)); + if (args.specId !== undefined) query.set('specId', String(args.specId)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/syncSpecWithCollection.ts b/src/tools/syncSpecWithCollection.ts index d35d447..55455e6 100644 --- a/src/tools/syncSpecWithCollection.ts +++ b/src/tools/syncSpecWithCollection.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -23,14 +28,13 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}/synchronizations`; + const endpoint = `/specs/${args.specId}/synchronizations`; const query = new URLSearchParams(); - if (params.collectionUid !== undefined) - query.set('collectionUid', String(params.collectionUid)); + if (args.collectionUid !== undefined) query.set('collectionUid', String(args.collectionUid)); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { headers: extra.headers, diff --git a/src/tools/transferCollectionFolders.ts b/src/tools/transferCollectionFolders.ts index 6a82f69..ecfa201 100644 --- a/src/tools/transferCollectionFolders.ts +++ b/src/tools/transferCollectionFolders.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -55,18 +60,18 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/collection-folders-transfers`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.ids !== undefined) bodyPayload.ids = params.ids; - if (params.mode !== undefined) bodyPayload.mode = params.mode; - if (params.target !== undefined) bodyPayload.target = params.target; - if (params.location !== undefined) bodyPayload.location = params.location; + if (args.ids !== undefined) bodyPayload.ids = args.ids; + if (args.mode !== undefined) bodyPayload.mode = args.mode; + if (args.target !== undefined) bodyPayload.target = args.target; + if (args.location !== undefined) bodyPayload.location = args.location; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/transferCollectionRequests.ts b/src/tools/transferCollectionRequests.ts index 0f88131..deb87c0 100644 --- a/src/tools/transferCollectionRequests.ts +++ b/src/tools/transferCollectionRequests.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -55,18 +60,18 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/collection-requests-transfers`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.ids !== undefined) bodyPayload.ids = params.ids; - if (params.mode !== undefined) bodyPayload.mode = params.mode; - if (params.target !== undefined) bodyPayload.target = params.target; - if (params.location !== undefined) bodyPayload.location = params.location; + if (args.ids !== undefined) bodyPayload.ids = args.ids; + if (args.mode !== undefined) bodyPayload.mode = args.mode; + if (args.target !== undefined) bodyPayload.target = args.target; + if (args.location !== undefined) bodyPayload.location = args.location; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/transferCollectionResponses.ts b/src/tools/transferCollectionResponses.ts index 88e98a9..f5ee01f 100644 --- a/src/tools/transferCollectionResponses.ts +++ b/src/tools/transferCollectionResponses.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -55,18 +60,18 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { const endpoint = `/collection-responses-transfers`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.ids !== undefined) bodyPayload.ids = params.ids; - if (params.mode !== undefined) bodyPayload.mode = params.mode; - if (params.target !== undefined) bodyPayload.target = params.target; - if (params.location !== undefined) bodyPayload.location = params.location; + if (args.ids !== undefined) bodyPayload.ids = args.ids; + if (args.mode !== undefined) bodyPayload.mode = args.mode; + if (args.target !== undefined) bodyPayload.target = args.target; + if (args.location !== undefined) bodyPayload.location = args.location; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/unpublishDocumentation.ts b/src/tools/unpublishDocumentation.ts index 06571a0..ec3d128 100644 --- a/src/tools/unpublishDocumentation.ts +++ b/src/tools/unpublishDocumentation.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -22,11 +27,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/public-documentations`; + const endpoint = `/collections/${args.collectionId}/public-documentations`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/unpublishMock.ts b/src/tools/unpublishMock.ts index 3c0feb2..d83ec50 100644 --- a/src/tools/unpublishMock.ts +++ b/src/tools/unpublishMock.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -20,11 +25,11 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/mocks/${params.mockId}/unpublish`; + const endpoint = `/mocks/${args.mockId}/unpublish`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const options: any = { diff --git a/src/tools/updateApiCollectionComment.ts b/src/tools/updateApiCollectionComment.ts index 6c40ae6..2912607 100644 --- a/src/tools/updateApiCollectionComment.ts +++ b/src/tools/updateApiCollectionComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -39,16 +44,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/apis/${params.apiId}/collections/${params.collectionId}/comments/${params.commentId}`; + const endpoint = `/apis/${args.apiId}/collections/${args.collectionId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.body !== undefined) bodyPayload.body = params.body; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.body !== undefined) bodyPayload.body = args.body; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateCollectionComment.ts b/src/tools/updateCollectionComment.ts index 914d1c5..852c22b 100644 --- a/src/tools/updateCollectionComment.ts +++ b/src/tools/updateCollectionComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -38,16 +43,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.body !== undefined) bodyPayload.body = params.body; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.body !== undefined) bodyPayload.body = args.body; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateCollectionFolder.ts b/src/tools/updateCollectionFolder.ts index a04843c..088a35c 100644 --- a/src/tools/updateCollectionFolder.ts +++ b/src/tools/updateCollectionFolder.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -25,16 +30,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; - if (params.description !== undefined) bodyPayload.description = params.description; + if (args.name !== undefined) bodyPayload.name = args.name; + if (args.description !== undefined) bodyPayload.description = args.description; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateCollectionRequest.ts b/src/tools/updateCollectionRequest.ts index fa67949..1830a6f 100644 --- a/src/tools/updateCollectionRequest.ts +++ b/src/tools/updateCollectionRequest.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -44,16 +49,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; - if (params.method !== undefined) bodyPayload.method = params.method; + if (args.name !== undefined) bodyPayload.name = args.name; + if (args.method !== undefined) bodyPayload.method = args.method; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateCollectionResponse.ts b/src/tools/updateCollectionResponse.ts index 1bc867b..30dada7 100644 --- a/src/tools/updateCollectionResponse.ts +++ b/src/tools/updateCollectionResponse.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -31,16 +36,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; - if (params.responseCode !== undefined) bodyPayload.responseCode = params.responseCode; + if (args.name !== undefined) bodyPayload.name = args.name; + if (args.responseCode !== undefined) bodyPayload.responseCode = args.responseCode; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateCollectionTags.ts b/src/tools/updateCollectionTags.ts index 9d9815a..0b04c55 100644 --- a/src/tools/updateCollectionTags.ts +++ b/src/tools/updateCollectionTags.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -38,15 +43,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/tags`; + const endpoint = `/collections/${args.collectionId}/tags`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateFolderComment.ts b/src/tools/updateFolderComment.ts index b99293d..dd3a442 100644 --- a/src/tools/updateFolderComment.ts +++ b/src/tools/updateFolderComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -39,16 +44,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.body !== undefined) bodyPayload.body = params.body; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.body !== undefined) bodyPayload.body = args.body; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateMock.ts b/src/tools/updateMock.ts index 566737a..92a8f32 100644 --- a/src/tools/updateMock.ts +++ b/src/tools/updateMock.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -8,7 +13,8 @@ function asMcpError(error: unknown): McpError { } export const method = 'updateMock'; -export const description = 'Updates a mock server.'; +export const description = + 'Updates a mock server.\n- Resource: Mock server entity associated with a collection UID.\n- Use this to change name, environment, privacy, or default server response.\n'; export const parameters = z.object({ mockId: z.string().describe("The mock's ID."), mock: z @@ -39,22 +45,23 @@ export const parameters = z.object({ .optional(), }); export const annotations = { - title: 'Updates a mock server.', + title: + 'Updates a mock server.\n- Resource: Mock server entity associated with a collection UID.\n- Use this to change name, environment, privacy, or default server response.\n', readOnlyHint: false, destructiveHint: false, idempotentHint: true, }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/mocks/${params.mockId}`; + const endpoint = `/mocks/${args.mockId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.mock !== undefined) bodyPayload.mock = params.mock; + if (args.mock !== undefined) bodyPayload.mock = args.mock; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateMonitor.ts b/src/tools/updateMonitor.ts index 93bc209..4437304 100644 --- a/src/tools/updateMonitor.ts +++ b/src/tools/updateMonitor.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -137,15 +142,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/monitors/${params.monitorId}`; + const endpoint = `/monitors/${args.monitorId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.monitor !== undefined) bodyPayload.monitor = params.monitor; + if (args.monitor !== undefined) bodyPayload.monitor = args.monitor; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updatePanElementOrFolder.ts b/src/tools/updatePanElementOrFolder.ts index 78e91bf..1ddd2b7 100644 --- a/src/tools/updatePanElementOrFolder.ts +++ b/src/tools/updatePanElementOrFolder.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; -import { PostmanAPIClient } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { PostmanAPIClient, ContentType } from '../clients/postman.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -17,6 +22,61 @@ export const parameters = z.object({ "The element's ID or UUID. For Postman Collections you must pass the collection's UID (`userId`-`collectionId`) value." ), elementType: z.enum(['api', 'folder', 'collection', 'workspace']).describe('The element type.'), + body: z.union([ + z.object({ + api: z + .object({ + parentFolderId: z.number().int().describe("The API's new parent folder ID.").optional(), + }) + .optional(), + }), + z.object({ + collection: z + .object({ + parentFolderId: z + .number() + .int() + .describe("The collection's new parent folder ID.") + .optional(), + environments: z + .object({ + $add: z + .array(z.string().describe('The ID of environment to add to the collection.')) + .optional(), + $remove: z + .array(z.string().describe('The ID of environment to remove from the collection.')) + .optional(), + }) + .describe("The collection's updated environments.") + .optional(), + }) + .optional(), + }), + z.object({ + workspace: z + .object({ + parentFolderId: z + .number() + .int() + .describe("The workspace's new parent folder ID.") + .optional(), + }) + .optional(), + }), + z.object({ + folder: z + .object({ + name: z.string().describe("The folder's new name.").optional(), + description: z.string().describe("The folder's updated description.").optional(), + parentFolderId: z + .number() + .int() + .describe("The folder's new parent folder ID.") + .optional(), + }) + .optional(), + }), + ]), }); export const annotations = { title: @@ -27,14 +87,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/network/private/${params.elementType}/${params.elementId}`; + const endpoint = `/network/private/${args.elementType}/${args.elementId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; + const bodyPayload = args.body; const options: any = { + body: JSON.stringify(bodyPayload), + contentType: ContentType.Json, headers: extra.headers, }; const result = await extra.client.put(url, options); diff --git a/src/tools/updateRequestComment.ts b/src/tools/updateRequestComment.ts index a8cf850..54dcd4c 100644 --- a/src/tools/updateRequestComment.ts +++ b/src/tools/updateRequestComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -39,16 +44,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.body !== undefined) bodyPayload.body = params.body; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.body !== undefined) bodyPayload.body = args.body; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateResponseComment.ts b/src/tools/updateResponseComment.ts index f295702..97099aa 100644 --- a/src/tools/updateResponseComment.ts +++ b/src/tools/updateResponseComment.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -39,16 +44,16 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments/${params.commentId}`; + const endpoint = `/collections/${args.collectionId}/responses/${args.responseId}/comments/${args.commentId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.body !== undefined) bodyPayload.body = params.body; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.body !== undefined) bodyPayload.body = args.body; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateSpecFile.ts b/src/tools/updateSpecFile.ts index 9546700..25381ab 100644 --- a/src/tools/updateSpecFile.ts +++ b/src/tools/updateSpecFile.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -31,17 +36,17 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}/files/${params.filePath}`; + const endpoint = `/specs/${args.specId}/files/${args.filePath}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; - if (params.type !== undefined) bodyPayload.type = params.type; - if (params.content !== undefined) bodyPayload.content = params.content; + if (args.name !== undefined) bodyPayload.name = args.name; + if (args.type !== undefined) bodyPayload.type = args.type; + if (args.content !== undefined) bodyPayload.content = args.content; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateSpecProperties.ts b/src/tools/updateSpecProperties.ts index fc44785..3b00b34 100644 --- a/src/tools/updateSpecProperties.ts +++ b/src/tools/updateSpecProperties.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -21,15 +26,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/specs/${params.specId}`; + const endpoint = `/specs/${args.specId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.name !== undefined) bodyPayload.name = params.name; + if (args.name !== undefined) bodyPayload.name = args.name; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateWorkspace.ts b/src/tools/updateWorkspace.ts index 5b4ad85..d6db549 100644 --- a/src/tools/updateWorkspace.ts +++ b/src/tools/updateWorkspace.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -35,15 +40,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/workspaces/${params.workspaceId}`; + const endpoint = `/workspaces/${args.workspaceId}`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.workspace !== undefined) bodyPayload.workspace = params.workspace; + if (args.workspace !== undefined) bodyPayload.workspace = args.workspace; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateWorkspaceGlobalVariables.ts b/src/tools/updateWorkspaceGlobalVariables.ts index c6f6274..523e132 100644 --- a/src/tools/updateWorkspaceGlobalVariables.ts +++ b/src/tools/updateWorkspaceGlobalVariables.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -41,15 +46,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/workspaces/${params.workspaceId}/global-variables`; + const endpoint = `/workspaces/${args.workspaceId}/global-variables`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.values !== undefined) bodyPayload.values = params.values; + if (args.values !== undefined) bodyPayload.values = args.values; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/src/tools/updateWorkspaceTags.ts b/src/tools/updateWorkspaceTags.ts index 9b3ffcd..efc228c 100644 --- a/src/tools/updateWorkspaceTags.ts +++ b/src/tools/updateWorkspaceTags.ts @@ -1,6 +1,11 @@ import { z } from 'zod'; import { PostmanAPIClient, ContentType } from '../clients/postman.js'; -import { IsomorphicHeaders, McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; +import { + IsomorphicHeaders, + McpError, + ErrorCode, + CallToolResult, +} from '@modelcontextprotocol/sdk/types.js'; function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); @@ -38,15 +43,15 @@ export const annotations = { }; export async function handler( - params: z.infer, + args: z.infer, extra: { client: PostmanAPIClient; headers?: IsomorphicHeaders } -): Promise<{ content: Array<{ type: string; text: string } & Record> }> { +): Promise { try { - const endpoint = `/workspaces/${params.workspaceId}/tags`; + const endpoint = `/workspaces/${args.workspaceId}/tags`; const query = new URLSearchParams(); const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint; const bodyPayload: any = {}; - if (params.tags !== undefined) bodyPayload.tags = params.tags; + if (args.tags !== undefined) bodyPayload.tags = args.tags; const options: any = { body: JSON.stringify(bodyPayload), contentType: ContentType.Json, diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..34fb67f --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + include: ['src/tests/**/*.test.ts'], + globals: true, + setupFiles: [], + testTimeout: 180000, // 2 minutes + hookTimeout: 180000, // 1 minute for hooks (beforeAll, afterAll) + teardownTimeout: 180000, // 100 seconds for cleanup + }, +}); From 4f4b7c486d98cc4bbde07bafb9263b67783a06c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 16:12:57 +0200 Subject: [PATCH 03/10] chore: update deps (#49) * chore: update docs * refactor: move to .mcpb --- .../{dxt-pack.yaml => mcpb-pack.yaml} | 26 +- manifest-full.json | 2 +- manifest-minimal.json | 2 +- package-lock.json | 2936 +++++++++++------ package.json | 34 +- src/tests/integration/direct.test.ts | 4 +- 6 files changed, 1876 insertions(+), 1128 deletions(-) rename .github/workflows/{dxt-pack.yaml => mcpb-pack.yaml} (74%) diff --git a/.github/workflows/dxt-pack.yaml b/.github/workflows/mcpb-pack.yaml similarity index 74% rename from .github/workflows/dxt-pack.yaml rename to .github/workflows/mcpb-pack.yaml index fe4138b..5e8e47d 100644 --- a/.github/workflows/dxt-pack.yaml +++ b/.github/workflows/mcpb-pack.yaml @@ -1,4 +1,4 @@ -name: Release DXT +name: Release MCPB on: push: @@ -35,8 +35,8 @@ jobs: - name: Install dependencies for packaging run: npm ci --omit=dev - - name: Install DXT - run: npm install -g @anthropic-ai/dxt + - name: Install MCPB + run: npm install -g @anthropics/mcpb - name: Package extensions run: | @@ -44,24 +44,24 @@ jobs: # Package minimal version cp manifest-minimal.json manifest.json - dxt pack - mv "${current_dir}.dxt" "${current_dir}-minimal.dxt" + mcpb pack + mv "${current_dir}.mcpb" "${current_dir}-minimal.mcpb" # Package full version cp manifest-full.json manifest.json - dxt pack - mv "${current_dir}.dxt" "${current_dir}-full.dxt" + mcpb pack + mv "${current_dir}.mcpb" "${current_dir}-full.mcpb" # Set environment variables - echo "DXT_MINIMAL_FILENAME=${current_dir}-minimal.dxt" >> $GITHUB_ENV - echo "DXT_FULL_FILENAME=${current_dir}-full.dxt" >> $GITHUB_ENV + echo "MCPB_MINIMAL_FILENAME=${current_dir}-minimal.mcpb" >> $GITHUB_ENV + echo "MCPB_FULL_FILENAME=${current_dir}-full.mcpb" >> $GITHUB_ENV - name: Upload minimal release asset uses: svenstaro/upload-release-action@7027b7670c56b9473901daad1fb8a09ab534688e with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.DXT_MINIMAL_FILENAME }} - asset_name: ${{ env.DXT_MINIMAL_FILENAME }} + file: ${{ env.MCPB_MINIMAL_FILENAME }} + asset_name: ${{ env.MCPB_MINIMAL_FILENAME }} tag: ${{ github.ref }} overwrite: true @@ -69,7 +69,7 @@ jobs: uses: svenstaro/upload-release-action@7027b7670c56b9473901daad1fb8a09ab534688e with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.DXT_FULL_FILENAME }} - asset_name: ${{ env.DXT_FULL_FILENAME }} + file: ${{ env.MCPB_FULL_FILENAME }} + asset_name: ${{ env.MCPB_FULL_FILENAME }} tag: ${{ github.ref }} overwrite: true diff --git a/manifest-full.json b/manifest-full.json index 52acd8a..51e145d 100644 --- a/manifest-full.json +++ b/manifest-full.json @@ -1,5 +1,5 @@ { - "dxt_version": "0.2", + "mcpb_version": "0.1", "version": "2.2.1", "name": "postman-mcp-server-full", "display_name": "Postman MCP Server (Full)", diff --git a/manifest-minimal.json b/manifest-minimal.json index 143eff9..50e4468 100644 --- a/manifest-minimal.json +++ b/manifest-minimal.json @@ -1,5 +1,5 @@ { - "dxt_version": "0.2", + "mcpb_version": "0.1", "version": "2.2.1", "name": "postman-mcp-server-minimal", "display_name": "Postman MCP Server (Minimal)", diff --git a/package-lock.json b/package-lock.json index 3f07858..d243d49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,55 +9,41 @@ "version": "2.2.1", "license": "Apache-2.0", "dependencies": { - "@apidevtools/swagger-parser": "^11.0.0", - "@modelcontextprotocol/sdk": "^1.17.0", - "dotenv": "^16.5.0", - "es-toolkit": "^1.37.2", + "@apidevtools/swagger-parser": "^12.0.0", + "@modelcontextprotocol/sdk": "^1.18.1", + "dotenv": "^17.2.2", + "es-toolkit": "^1.39.10", "express": "^5.1.0" }, "bin": { "postman-mcp-server": "dist/src/index.js" }, "devDependencies": { - "@eslint/js": "^9.26.0", - "@types/express": "^5.0.1", - "@types/node": "^22", - "eslint": "^9.26.0", - "eslint-config-prettier": "^10.1.5", - "eslint-plugin-prettier": "^5.4.0", - "eslint-plugin-unused-imports": "^4.1.4", - "fs-extra": "^11.3.0", - "jest": "^29.7.0", + "@eslint/js": "^9.35.0", + "@types/express": "^5.0.3", + "@types/node": "^24", + "eslint": "^9.35.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-unused-imports": "^4.2.0", + "fs-extra": "^11.3.2", + "jest": "^30.1.3", "json-schema-to-zod": "^2.6.1", "openapi-types": "^12.1.3", - "prettier": "^3.5.3", - "tsx": "^4.19.4", - "typescript": "^5.8.3", - "typescript-eslint": "^8.32.1", + "prettier": "^3.6.2", + "tsx": "^4.20.5", + "typescript": "^5.9.2", + "typescript-eslint": "^8.44.0", "vitest": "^3.2.4" }, "engines": { "node": ">=20.0.0" } }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-13.0.2.tgz", - "integrity": "sha512-ThpknSFmb1zJXU16ba8cFbDRL3WRs6WETW323gOhj7Gwdj9GUqNpA5JFhdAINxINyAz03gqgF5Y4UydAjE3Pdg==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-14.0.1.tgz", + "integrity": "sha512-Oc96zvmxx1fqoSEdUmfmvvb59/KDOnUoJ7s2t7bISyAn0XEz57LCCw8k2Y4Pf3mwKaZLMciESALORLgfe2frCw==", "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.15", @@ -86,12 +72,12 @@ "license": "MIT" }, "node_modules/@apidevtools/swagger-parser": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-11.0.1.tgz", - "integrity": "sha512-0OzWjKPUr7dvXOgQi6hsNLpwgQRtPgyQoYMuaIB+Zj50Qjbwxph/nu4BndwOA446FtQUTwkR3BxLnORpVYLHYw==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-12.0.0.tgz", + "integrity": "sha512-WLJIWcfOXrSKlZEM+yhA2Xzatgl488qr1FoOxixYmtWapBzwSC0gVGq4WObr4hHClMIiFFdOBdixNkvWqkWIWA==", "license": "MIT", "dependencies": { - "@apidevtools/json-schema-ref-parser": "13.0.2", + "@apidevtools/json-schema-ref-parser": "14.0.1", "@apidevtools/openapi-schemas": "^2.1.0", "@apidevtools/swagger-methods": "^3.0.2", "ajv": "^8.17.1", @@ -118,9 +104,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.5.tgz", - "integrity": "sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", + "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", "dev": true, "license": "MIT", "engines": { @@ -128,22 +114,22 @@ } }, "node_modules/@babel/core": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.4.tgz", - "integrity": "sha512-bXYxrXFubeYdvB0NhD/NBB3Qi6aZeV20GOWVI47t2dkecCEoneR4NPVcb7abpXDEvejgrUfFtG6vG/zxAKmg+g==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", + "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", "dev": true, "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.3", + "@babel/generator": "^7.28.3", "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.27.3", - "@babel/helpers": "^7.27.4", - "@babel/parser": "^7.27.4", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.4", "@babel/template": "^7.27.2", - "@babel/traverse": "^7.27.4", - "@babel/types": "^7.27.3", + "@babel/traverse": "^7.28.4", + "@babel/types": "^7.28.4", + "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -159,16 +145,16 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", - "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.5", - "@babel/types": "^7.27.3", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -192,6 +178,16 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-module-imports": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", @@ -207,15 +203,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", - "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.3" + "@babel/traverse": "^7.28.3" }, "engines": { "node": ">=6.9.0" @@ -265,27 +261,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", - "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.27.6" + "@babel/types": "^7.28.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz", - "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.3" + "@babel/types": "^7.28.4" }, "bin": { "parser": "bin/babel-parser.js" @@ -549,38 +545,28 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz", - "integrity": "sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", + "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.3", - "@babel/parser": "^7.27.4", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.4", "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3", - "debug": "^4.3.1", - "globals": "^11.1.0" + "@babel/types": "^7.28.4", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/types": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz", - "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "dev": true, "license": "MIT", "dependencies": { @@ -598,6 +584,40 @@ "dev": true, "license": "MIT" }, + "node_modules/@emnapi/core": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz", + "integrity": "sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.1.0", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz", + "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", + "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", @@ -1024,9 +1044,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "license": "MIT", "dependencies": { @@ -1066,9 +1086,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", - "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1081,9 +1101,9 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", - "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1091,9 +1111,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", - "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1152,9 +1172,9 @@ "license": "MIT" }, "node_modules/@eslint/js": { - "version": "9.28.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", - "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", + "version": "9.35.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.35.0.tgz", + "integrity": "sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw==", "dev": true, "license": "MIT", "engines": { @@ -1175,32 +1195,19 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.4.tgz", - "integrity": "sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.15.1", + "@eslint/core": "^0.15.2", "levn": "^0.4.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", - "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", @@ -1267,6 +1274,24 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1385,61 +1410,61 @@ } }, "node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.1.2.tgz", + "integrity": "sha512-BGMAxj8VRmoD0MoA/jo9alMXSRoqW8KPeqOfEo1ncxnRLatTBCpRoOwlwlEMdudp68Q6WSGwYrrLtTGOh8fLzw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", + "@jest/types": "30.0.5", "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", + "chalk": "^4.1.2", + "jest-message-util": "30.1.0", + "jest-util": "30.0.5", "slash": "^3.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.1.3.tgz", + "integrity": "sha512-LIQz7NEDDO1+eyOA2ZmkiAyYvZuo6s1UxD/e2IHldR6D7UYogVq3arTmli07MkENLq6/3JEQjp0mA8rrHHJ8KQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/console": "30.1.2", + "@jest/pattern": "30.0.1", + "@jest/reporters": "30.1.3", + "@jest/test-result": "30.1.3", + "@jest/transform": "30.1.2", + "@jest/types": "30.0.5", "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "exit-x": "^0.2.2", + "graceful-fs": "^4.2.11", + "jest-changed-files": "30.0.5", + "jest-config": "30.1.3", + "jest-haste-map": "30.1.0", + "jest-message-util": "30.1.0", + "jest-regex-util": "30.0.1", + "jest-resolve": "30.1.3", + "jest-resolve-dependencies": "30.1.3", + "jest-runner": "30.1.3", + "jest-runtime": "30.1.3", + "jest-snapshot": "30.1.2", + "jest-util": "30.0.5", + "jest-validate": "30.1.0", + "jest-watcher": "30.1.3", + "micromatch": "^4.0.8", + "pretty-format": "30.0.5", + "slash": "^3.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1450,117 +1475,150 @@ } } }, + "node_modules/@jest/diff-sequences": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz", + "integrity": "sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.1.2.tgz", + "integrity": "sha512-N8t1Ytw4/mr9uN28OnVf0SYE2dGhaIxOVYcwsf9IInBKjvofAjbFRvedvBBlyTYk2knbJTiEjEJ2PyyDIBnd9w==", "dev": true, "license": "MIT", "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/fake-timers": "30.1.2", + "@jest/types": "30.0.5", "@types/node": "*", - "jest-mock": "^29.7.0" + "jest-mock": "30.0.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.1.2.tgz", + "integrity": "sha512-tyaIExOwQRCxPCGNC05lIjWJztDwk2gPDNSDGg1zitXJJ8dC3++G/CRjE5mb2wQsf89+lsgAgqxxNpDLiCViTA==", "dev": true, "license": "MIT", "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" + "expect": "30.1.2", + "jest-snapshot": "30.1.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.1.2.tgz", + "integrity": "sha512-HXy1qT/bfdjCv7iC336ExbqqYtZvljrV8odNdso7dWK9bSeHtLlvwWWC3YSybSPL03Gg5rug6WLCZAZFH72m0A==", "dev": true, "license": "MIT", "dependencies": { - "jest-get-type": "^29.6.3" + "@jest/get-type": "30.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.1.2.tgz", + "integrity": "sha512-Beljfv9AYkr9K+ETX9tvV61rJTY706BhBUtiaepQHeEGfe0DbpvUA5Z3fomwc5Xkhns6NWrcFDZn+72fLieUnA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", + "@jest/types": "30.0.5", + "@sinonjs/fake-timers": "^13.0.0", "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "jest-message-util": "30.1.0", + "jest-mock": "30.0.5", + "jest-util": "30.0.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/get-type": { + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", + "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.1.2.tgz", + "integrity": "sha512-teNTPZ8yZe3ahbYnvnVRDeOjr+3pu2uiAtNtrEsiMjVPPj+cXd5E/fr8BL7v/T7F31vYdEHrI5cC/2OoO/vM9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.1.2", + "@jest/expect": "30.1.2", + "@jest/types": "30.0.5", + "jest-mock": "30.0.5" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/pattern": { + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.0.1.tgz", + "integrity": "sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" + "@types/node": "*", + "jest-regex-util": "30.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.1.3.tgz", + "integrity": "sha512-VWEQmJWfXMOrzdFEOyGjUEOuVXllgZsoPtEHZzfdNz18RmzJ5nlR6kp8hDdY8dDS1yGOXAY7DHT+AOHIPSBV0w==", "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", + "@jest/console": "30.1.2", + "@jest/test-result": "30.1.3", + "@jest/transform": "30.1.2", + "@jest/types": "30.0.5", + "@jridgewell/trace-mapping": "^0.3.25", "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", + "chalk": "^4.1.2", + "collect-v8-coverage": "^1.0.2", + "exit-x": "^0.2.2", + "glob": "^10.3.10", + "graceful-fs": "^4.2.11", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", + "istanbul-lib-source-maps": "^5.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", + "jest-message-util": "30.1.0", + "jest-util": "30.0.5", + "jest-worker": "30.1.0", "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", + "string-length": "^4.0.2", "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1572,139 +1630,153 @@ } }, "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", + "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.34.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/snapshot-utils": { + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.1.2.tgz", + "integrity": "sha512-vHoMTpimcPSR7OxS2S0V1Cpg8eKDRxucHjoWl5u4RQcnxqQrV3avETiFpl8etn4dqxEGarBeHbIBety/f8mLXw==", "dev": true, "license": "MIT", "dependencies": { - "@sinclair/typebox": "^0.27.8" + "@jest/types": "30.0.5", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "natural-compare": "^1.4.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.0.1.tgz", + "integrity": "sha512-MIRWMUUR3sdbP36oyNyhbThLHyJ2eEDClPCiHVbrYAe5g3CHRArIVpBw7cdSB5fr+ofSfIb2Tnsw8iEHL0PYQg==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" + "@jridgewell/trace-mapping": "^0.3.25", + "callsites": "^3.1.0", + "graceful-fs": "^4.2.11" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.1.3.tgz", + "integrity": "sha512-P9IV8T24D43cNRANPPokn7tZh0FAFnYS2HIfi5vK18CjRkTDR9Y3e1BoEcAJnl4ghZZF4Ecda4M/k41QkvurEQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "@jest/console": "30.1.2", + "@jest/types": "30.0.5", + "@types/istanbul-lib-coverage": "^2.0.6", + "collect-v8-coverage": "^1.0.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.1.3.tgz", + "integrity": "sha512-82J+hzC0qeQIiiZDThh+YUadvshdBswi5nuyXlEmXzrhw5ZQSRHeQ5LpVMD/xc8B3wPePvs6VMzHnntxL+4E3w==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", + "@jest/test-result": "30.1.3", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.1.0", "slash": "^3.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.1.2.tgz", + "integrity": "sha512-UYYFGifSgfjujf1Cbd3iU/IQoSd6uwsj8XHj5DSDf5ERDcWMdJOPTkHWXj4U+Z/uMagyOQZ6Vne8C4nRIrCxqA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", + "@babel/core": "^7.27.4", + "@jest/types": "30.0.5", + "@jridgewell/trace-mapping": "^0.3.25", + "babel-plugin-istanbul": "^7.0.0", + "chalk": "^4.1.2", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.1.0", + "jest-regex-util": "30.0.1", + "jest-util": "30.0.5", + "micromatch": "^4.0.8", + "pirates": "^4.0.7", "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" + "write-file-atomic": "^5.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.0.5.tgz", + "integrity": "sha512-aREYa3aku9SSnea4aX6bhKn4bgv3AXkgijoQgbYV3yvbiGt6z+MQ85+6mIhx9DsKW2BuB/cLR/A+tcMThx+KLQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", + "@jest/pattern": "30.0.1", + "@jest/schemas": "30.0.5", + "@types/istanbul-lib-coverage": "^2.0.6", + "@types/istanbul-reports": "^3.0.4", "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" + "@types/yargs": "^17.0.33", + "chalk": "^4.1.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=6.0.0" + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", "engines": { @@ -1719,9 +1791,9 @@ "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -1730,9 +1802,9 @@ } }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.17.0.tgz", - "integrity": "sha512-qFfbWFA7r1Sd8D697L7GkTd36yqDuTkvz0KfOGkgXR8EUhQn3/EDNIR/qUdQNMT8IjmasBvHWuXeisxtXTQT2g==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.18.1.tgz", + "integrity": "sha512-d//GE8/Yh7aC3e7p+kZG8JqqEAwwDUmAfvH1quogtbk+ksS6E0RR6toKKESPYYZVre0meqkJb27zb+dhqE9Sgw==", "license": "MIT", "dependencies": { "ajv": "^6.12.6", @@ -1774,6 +1846,19 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "license": "MIT" }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", + "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.10.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1812,6 +1897,17 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@pkgr/core": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.7.tgz", @@ -2106,9 +2202,9 @@ ] }, "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "version": "0.34.41", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", + "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", "dev": true, "license": "MIT" }, @@ -2123,13 +2219,24 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", + "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^3.0.0" + "@sinonjs/commons": "^3.0.1" + } + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" } }, "node_modules/@types/babel__core": { @@ -2168,13 +2275,13 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", - "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.20.7" + "@babel/types": "^7.28.2" } }, "node_modules/@types/body-parser": { @@ -2247,16 +2354,6 @@ "@types/send": "*" } }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/http-errors": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", @@ -2305,13 +2402,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.31.tgz", - "integrity": "sha512-jnVe5ULKl6tijxUhvQeNbQG/84fHfg+yMak02cT8QVhBx/F05rAVxCGBYYTh2EKz22D6JF5ktXuNwdx7b9iEGw==", + "version": "24.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.5.2.tgz", + "integrity": "sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.21.0" + "undici-types": "~7.12.0" } }, "node_modules/@types/qs": { @@ -2376,17 +2473,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.34.0.tgz", - "integrity": "sha512-QXwAlHlbcAwNlEEMKQS2RCgJsgXrTJdjXT08xEgbPFa2yYQgVjBymxP5DrfrE7X7iodSzd9qBUHUycdyVJTW1w==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.44.0.tgz", + "integrity": "sha512-EGDAOGX+uwwekcS0iyxVDmRV9HX6FLSM5kzrAToLTsr9OWCIKG/y3lQheCq18yZ5Xh78rRKJiEpP0ZaCs4ryOQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.34.0", - "@typescript-eslint/type-utils": "8.34.0", - "@typescript-eslint/utils": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0", + "@typescript-eslint/scope-manager": "8.44.0", + "@typescript-eslint/type-utils": "8.44.0", + "@typescript-eslint/utils": "8.44.0", + "@typescript-eslint/visitor-keys": "8.44.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -2400,9 +2497,9 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.34.0", + "@typescript-eslint/parser": "^8.44.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { @@ -2416,16 +2513,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.34.0.tgz", - "integrity": "sha512-vxXJV1hVFx3IXz/oy2sICsJukaBrtDEQSBiV48/YIV5KWjX1dO+bcIr/kCPrW6weKXvsaGKFNlwH0v2eYdRRbA==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.44.0.tgz", + "integrity": "sha512-VGMpFQGUQWYT9LfnPcX8ouFojyrZ/2w3K5BucvxL/spdNehccKhB4jUyB1yBCXpr2XFm0jkECxgrpXBW2ipoAw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.34.0", - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/typescript-estree": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0", + "@typescript-eslint/scope-manager": "8.44.0", + "@typescript-eslint/types": "8.44.0", + "@typescript-eslint/typescript-estree": "8.44.0", + "@typescript-eslint/visitor-keys": "8.44.0", "debug": "^4.3.4" }, "engines": { @@ -2437,18 +2534,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.0.tgz", - "integrity": "sha512-iEgDALRf970/B2YExmtPMPF54NenZUf4xpL3wsCRx/lgjz6ul/l13R81ozP/ZNuXfnLCS+oPmG7JIxfdNYKELw==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.44.0.tgz", + "integrity": "sha512-ZeaGNraRsq10GuEohKTo4295Z/SuGcSq2LzfGlqiuEvfArzo/VRrT0ZaJsVPuKZ55lVbNk8U6FcL+ZMH8CoyVA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.34.0", - "@typescript-eslint/types": "^8.34.0", + "@typescript-eslint/tsconfig-utils": "^8.44.0", + "@typescript-eslint/types": "^8.44.0", "debug": "^4.3.4" }, "engines": { @@ -2459,18 +2556,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.0.tgz", - "integrity": "sha512-9Ac0X8WiLykl0aj1oYQNcLZjHgBojT6cW68yAgZ19letYu+Hxd0rE0veI1XznSSst1X5lwnxhPbVdwjDRIomRw==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.44.0.tgz", + "integrity": "sha512-87Jv3E+al8wpD+rIdVJm/ItDBe/Im09zXIjFoipOjr5gHUhJmTzfFLuTJ/nPTMc2Srsroy4IBXwcTCHyRR7KzA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0" + "@typescript-eslint/types": "8.44.0", + "@typescript-eslint/visitor-keys": "8.44.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2481,9 +2578,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.0.tgz", - "integrity": "sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.44.0.tgz", + "integrity": "sha512-x5Y0+AuEPqAInc6yd0n5DAcvtoQ/vyaGwuX5HE9n6qAefk1GaedqrLQF8kQGylLUb9pnZyLf+iEiL9fr8APDtQ==", "dev": true, "license": "MIT", "engines": { @@ -2494,18 +2591,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.34.0.tgz", - "integrity": "sha512-n7zSmOcUVhcRYC75W2pnPpbO1iwhJY3NLoHEtbJwJSNlVAZuwqu05zY3f3s2SDWWDSo9FdN5szqc73DCtDObAg==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.44.0.tgz", + "integrity": "sha512-9cwsoSxJ8Sak67Be/hD2RNt/fsqmWnNE1iHohG8lxqLSNY8xNfyY7wloo5zpW3Nu9hxVgURevqfcH6vvKCt6yg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.34.0", - "@typescript-eslint/utils": "8.34.0", + "@typescript-eslint/types": "8.44.0", + "@typescript-eslint/typescript-estree": "8.44.0", + "@typescript-eslint/utils": "8.44.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -2518,13 +2616,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.0.tgz", - "integrity": "sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.44.0.tgz", + "integrity": "sha512-ZSl2efn44VsYM0MfDQe68RKzBz75NPgLQXuGypmym6QVOWL5kegTZuZ02xRAT9T+onqvM6T8CdQk0OwYMB6ZvA==", "dev": true, "license": "MIT", "engines": { @@ -2536,16 +2634,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.0.tgz", - "integrity": "sha512-rOi4KZxI7E0+BMqG7emPSK1bB4RICCpF7QD3KCLXn9ZvWoESsOMlHyZPAHyG04ujVplPaHbmEvs34m+wjgtVtg==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.44.0.tgz", + "integrity": "sha512-lqNj6SgnGcQZwL4/SBJ3xdPEfcBuhCG8zdcwCPgYcmiPLgokiNDKlbPzCwEwu7m279J/lBYWtDYL+87OEfn8Jw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.34.0", - "@typescript-eslint/tsconfig-utils": "8.34.0", - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0", + "@typescript-eslint/project-service": "8.44.0", + "@typescript-eslint/tsconfig-utils": "8.44.0", + "@typescript-eslint/types": "8.44.0", + "@typescript-eslint/visitor-keys": "8.44.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2561,7 +2659,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { @@ -2604,16 +2702,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.0.tgz", - "integrity": "sha512-8L4tWatGchV9A1cKbjaavS6mwYwp39jql8xUmIIKJdm+qiaeHy5KMKlBrf30akXAWBzn2SqKsNOtSENWUwg7XQ==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.44.0.tgz", + "integrity": "sha512-nktOlVcg3ALo0mYlV+L7sWUD58KG4CMj1rb2HUVOO4aL3K/6wcD+NERqd0rrA5Vg06b42YhF6cFxeixsp9Riqg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.34.0", - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/typescript-estree": "8.34.0" + "@typescript-eslint/scope-manager": "8.44.0", + "@typescript-eslint/types": "8.44.0", + "@typescript-eslint/typescript-estree": "8.44.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2624,18 +2722,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.0.tgz", - "integrity": "sha512-qHV7pW7E85A0x6qyrFn+O+q1k1p3tQCsqIZ1KZ5ESLXY57aTvUd3/a4rdPTeXisvhXn2VQG0VSKUqs8KHF2zcA==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.44.0.tgz", + "integrity": "sha512-zaz9u8EJ4GBmnehlrpoKvj/E3dNbuQ7q0ucyZImm3cLqJ8INTc970B1qEqDX/Rzq65r3TvVTN7kHWPBoyW7DWw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.34.0", - "eslint-visitor-keys": "^4.2.0" + "@typescript-eslint/types": "8.44.0", + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2645,99 +2743,375 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@vitest/expect": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", - "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } + "license": "ISC" }, - "node_modules/@vitest/mocker": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", - "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", + "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "@vitest/spy": "3.2.4", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.17" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/@vitest/pretty-format": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", - "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz", + "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/@vitest/runner": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", - "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz", + "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@vitest/utils": "3.2.4", - "pathe": "^2.0.3", - "strip-literal": "^3.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@vitest/snapshot": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", - "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz", + "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.2.4", - "magic-string": "^0.30.17", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/@vitest/spy": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", - "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", - "dev": true, - "license": "MIT", + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz", + "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz", + "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz", + "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz", + "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz", + "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz", + "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz", + "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz", + "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz", + "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz", + "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz", + "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz", + "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.11" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", + "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", + "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", + "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@vitest/expect": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", + "dev": true, + "license": "MIT", "dependencies": { "tinyspy": "^4.0.3" }, @@ -2843,13 +3217,16 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { @@ -2899,81 +3276,66 @@ } }, "node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.1.2.tgz", + "integrity": "sha512-IQCus1rt9kaSh7PQxLYRY5NmkNrNlU2TpabzwV7T2jljnpdHOcmnYYv8QmE04Li4S3a2Lj8/yXyET5pBarPr6g==", "dev": true, "license": "MIT", "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", + "@jest/transform": "30.1.2", + "@types/babel__core": "^7.20.5", + "babel-plugin-istanbul": "^7.0.0", + "babel-preset-jest": "30.0.1", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", "slash": "^3.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { - "@babel/core": "^7.8.0" + "@babel/core": "^7.11.0" } }, "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz", + "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==", "dev": true, "license": "BSD-3-Clause", + "workspaces": [ + "test/babel-8" + ], "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-instrument": "^6.0.2", "test-exclude": "^6.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.0.1.tgz", + "integrity": "sha512-zTPME3pI50NsFW8ZBaVIOeAxzEY7XHlmWeXXu9srI+9kNfzCUTy8MFan46xOGZY8NZThMqq+e3qZUKsvXbasnQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3", + "@types/babel__core": "^7.20.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", "dev": true, "license": "MIT", "dependencies": { @@ -2994,24 +3356,24 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0 || ^8.0.0-0" } }, "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.0.1.tgz", + "integrity": "sha512-+YHejD5iTWI46cZmcc/YtX4gaKBtdqCHCVfuVinizVpbmyjO3zYmeuyFdfA8duRqQZfgCAMlsfmkVbJ+e2MAJw==", "dev": true, "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" + "babel-plugin-jest-hoist": "30.0.1", + "babel-preset-current-node-syntax": "^1.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.11.0" } }, "node_modules/balanced-match": { @@ -3021,6 +3383,16 @@ "dev": true, "license": "MIT" }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.6.tgz", + "integrity": "sha512-wrH5NNqren/QMtKUEEJf7z86YjfqW/2uw3IL3/xpqZUC95SSVIFXYQeeGjL6FT/X68IROu6RMehZQS5foy2BXw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, "node_modules/body-parser": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", @@ -3066,9 +3438,9 @@ } }, "node_modules/browserslist": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", - "integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==", + "version": "4.26.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.2.tgz", + "integrity": "sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A==", "dev": true, "funding": [ { @@ -3086,9 +3458,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001718", - "electron-to-chromium": "^1.5.160", - "node-releases": "^2.0.19", + "baseline-browser-mapping": "^2.8.3", + "caniuse-lite": "^1.0.30001741", + "electron-to-chromium": "^1.5.218", + "node-releases": "^2.0.21", "update-browserslist-db": "^1.1.3" }, "bin": { @@ -3190,9 +3563,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001722", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001722.tgz", - "integrity": "sha512-DCQHBBZtiK6JVkAGw7drvAMK0Q0POD/xZvEmDp6baiMMP6QXXk9HpD6mNYBZWhOPG6LvIDb82ITqtWjhDckHCA==", + "version": "1.0.30001743", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001743.tgz", + "integrity": "sha512-e6Ojr7RV14Un7dz6ASD0aZDmQPT/A+eZU+nuTNfjqmRrmkmQlnTNWH0SKmqagx9PeW87UVqapSurtAXifmtdmw==", "dev": true, "funding": [ { @@ -3265,9 +3638,9 @@ } }, "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.0.tgz", + "integrity": "sha512-l+2bNRMiQgcfILUi33labAZYIWlH1kWDp+ecNo5iisRKrbm0xcRyCww71/YU0Fkw0mAFpz9bJayXPjey6vkmaQ==", "dev": true, "funding": [ { @@ -3280,26 +3653,89 @@ "node": ">=8" } }, - "node_modules/cjs-module-lexer": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", - "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "node_modules/cjs-module-lexer": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.1.0.tgz", + "integrity": "sha512-UX0OwmYRYQQetfrLEZeewIFFI+wSTofC+pMBLNuH3RUuu/xzG1oz84UCEDOSoQlN3fZ4+AzmV50ZYvGqkMh9yA==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=12" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/co": { @@ -3406,28 +3842,6 @@ "node": ">= 0.10" } }, - "node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -3460,9 +3874,9 @@ } }, "node_modules/dedent": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", - "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", "dev": true, "license": "MIT", "peerDependencies": { @@ -3520,20 +3934,10 @@ "node": ">=8" } }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/dotenv": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", - "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", + "version": "17.2.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.2.tgz", + "integrity": "sha512-Sf2LSQP+bOlhKWWyhFsn0UsfdK/kCWRv1iuA2gXAwt3dyNabr6QSj00I2V10pidqz69soatm9ZwZvpQMTIOd5Q==", "license": "BSD-2-Clause", "engines": { "node": ">=12" @@ -3556,6 +3960,13 @@ "node": ">= 0.4" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3563,9 +3974,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.166", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.166.tgz", - "integrity": "sha512-QPWqHL0BglzPYyJJ1zSSmwFFL6MFXhbACOCcsCdUMCkzPdS9/OIBVxg516X/Ado2qwAq8k0nJJ7phQPCqiaFAw==", + "version": "1.5.222", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.222.tgz", + "integrity": "sha512-gA7psSwSwQRE60CEoLz6JBCQPIxNeuzB2nL8vE03GK/OHxlvykbLyeiumQy1iH5C2f3YbRAZpGCMT12a/9ih9w==", "dev": true, "license": "ISC" }, @@ -3583,9 +3994,9 @@ } }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT" }, @@ -3599,9 +4010,9 @@ } }, "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3646,9 +4057,9 @@ } }, "node_modules/es-toolkit": { - "version": "1.39.3", - "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.39.3.tgz", - "integrity": "sha512-Qb/TCFCldgOy8lZ5uC7nLGdqJwSabkQiYQShmw4jyiPk1pZzaYWTwaYKYP7EgLccWYgZocMrtItrwh683voaww==", + "version": "1.39.10", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.39.10.tgz", + "integrity": "sha512-E0iGnTtbDhkeczB0T+mxmoVlT4YNweEKBLq7oaU4p11mecdsZpNWOglI4895Vh4usbQ+LsJiuLuI2L0Vdmfm2w==", "license": "MIT", "workspaces": [ "docs", @@ -3726,20 +4137,20 @@ } }, "node_modules/eslint": { - "version": "9.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.28.0.tgz", - "integrity": "sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==", + "version": "9.35.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.35.0.tgz", + "integrity": "sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.20.0", - "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.14.0", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.28.0", - "@eslint/plugin-kit": "^0.3.1", + "@eslint/js": "9.35.0", + "@eslint/plugin-kit": "^0.3.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -3750,9 +4161,9 @@ "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.3.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -3787,9 +4198,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "10.1.5", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.5.tgz", - "integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==", + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", "dev": true, "license": "MIT", "bin": { @@ -3803,9 +4214,9 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.1.tgz", - "integrity": "sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", + "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", "dev": true, "license": "MIT", "dependencies": { @@ -3834,9 +4245,9 @@ } }, "node_modules/eslint-plugin-unused-imports": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", - "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.2.0.tgz", + "integrity": "sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==", "dev": true, "license": "MIT", "peerDependencies": { @@ -4045,30 +4456,39 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/exit-x": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/exit-x/-/exit-x-0.2.2.tgz", + "integrity": "sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.1.2.tgz", + "integrity": "sha512-xvHszRavo28ejws8FpemjhwswGj4w/BetHIL8cU49u4sGyXDw2+p3YbeDbj6xzlxi6kWTjIRSTJ+9sNXPnF0Zg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" + "@jest/expect-utils": "30.1.2", + "@jest/get-type": "30.1.0", + "jest-matcher-utils": "30.1.2", + "jest-message-util": "30.1.0", + "jest-mock": "30.0.5", + "jest-util": "30.0.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/expect-type": { @@ -4311,6 +4731,23 @@ "dev": true, "license": "ISC" }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -4330,9 +4767,9 @@ } }, "node_modules/fs-extra": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", - "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", "dev": true, "license": "MIT", "dependencies": { @@ -4469,22 +4906,21 @@ } }, "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "license": "ISC", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": "*" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -4503,6 +4939,32 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/globals": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", @@ -4721,22 +5183,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4871,24 +5317,24 @@ } }, "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", "dev": true, "license": "BSD-3-Clause", "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "istanbul-lib-coverage": "^3.0.0" }, "engines": { "node": ">=10" } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -4899,23 +5345,39 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-30.1.3.tgz", + "integrity": "sha512-Ry+p2+NLk6u8Agh5yVqELfUJvRfV51hhVBRIB5yZPY7mU0DGBmOuFG5GebZbMbm86cdQNK0fhJuDX8/1YorISQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" + "@jest/core": "30.1.3", + "@jest/types": "30.0.5", + "import-local": "^3.2.0", + "jest-cli": "30.1.3" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -4927,76 +5389,75 @@ } }, "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.0.5.tgz", + "integrity": "sha512-bGl2Ntdx0eAwXuGpdLdVYVr5YQHnSZlQ0y9HVDu565lCUAe9sj6JOtBbMmBBikGIegne9piDDIOeiLVoqTkz4A==", "dev": true, "license": "MIT", "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", + "execa": "^5.1.1", + "jest-util": "30.0.5", "p-limit": "^3.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.1.3.tgz", + "integrity": "sha512-Yf3dnhRON2GJT4RYzM89t/EXIWNxKTpWTL9BfF3+geFetWP4XSvJjiU1vrWplOiUkmq8cHLiwuhz+XuUp9DscA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/environment": "30.1.2", + "@jest/expect": "30.1.2", + "@jest/test-result": "30.1.3", + "@jest/types": "30.0.5", "@types/node": "*", - "chalk": "^4.0.0", + "chalk": "^4.1.2", "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", + "dedent": "^1.6.0", + "is-generator-fn": "^2.1.0", + "jest-each": "30.1.0", + "jest-matcher-utils": "30.1.2", + "jest-message-util": "30.1.0", + "jest-runtime": "30.1.3", + "jest-snapshot": "30.1.2", + "jest-util": "30.0.5", "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", + "pretty-format": "30.0.5", + "pure-rand": "^7.0.0", "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "stack-utils": "^2.0.6" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.1.3.tgz", + "integrity": "sha512-G8E2Ol3OKch1DEeIBl41NP7OiC6LBhfg25Btv+idcusmoUSpqUkbrneMqbW9lVpI/rCKb/uETidb7DNteheuAQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" + "@jest/core": "30.1.3", + "@jest/test-result": "30.1.3", + "@jest/types": "30.0.5", + "chalk": "^4.1.2", + "exit-x": "^0.2.2", + "import-local": "^3.2.0", + "jest-config": "30.1.3", + "jest-util": "30.0.5", + "jest-validate": "30.1.0", + "yargs": "^17.7.2" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -5008,215 +5469,211 @@ } }, "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.1.3.tgz", + "integrity": "sha512-M/f7gqdQEPgZNA181Myz+GXCe8jXcJsGjCMXUzRj22FIXsZOyHNte84e0exntOvdPaeh9tA0w+B8qlP2fAezfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.27.4", + "@jest/get-type": "30.1.0", + "@jest/pattern": "30.0.1", + "@jest/test-sequencer": "30.1.3", + "@jest/types": "30.0.5", + "babel-jest": "30.1.2", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "deepmerge": "^4.3.1", + "glob": "^10.3.10", + "graceful-fs": "^4.2.11", + "jest-circus": "30.1.3", + "jest-docblock": "30.0.1", + "jest-environment-node": "30.1.2", + "jest-regex-util": "30.0.1", + "jest-resolve": "30.1.3", + "jest-runner": "30.1.3", + "jest-util": "30.0.5", + "jest-validate": "30.1.0", + "micromatch": "^4.0.8", "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", + "pretty-format": "30.0.5", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { "@types/node": "*", + "esbuild-register": ">=3.4.0", "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, + "esbuild-register": { + "optional": true + }, "ts-node": { "optional": true } } }, "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.1.2.tgz", + "integrity": "sha512-4+prq+9J61mOVXCa4Qp8ZjavdxzrWQXrI80GNxP8f4tkI2syPuPrJgdRPZRrfUTRvIoUwcmNLbqEJy9W800+NQ==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "@jest/diff-sequences": "30.0.1", + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "pretty-format": "30.0.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.0.1.tgz", + "integrity": "sha512-/vF78qn3DYphAaIc3jy4gA7XSAz167n9Bm/wn/1XhTLW7tTBIzXtCJpb/vcmc73NIIeeohCbdL94JasyXUZsGA==", "dev": true, "license": "MIT", "dependencies": { - "detect-newline": "^3.0.0" + "detect-newline": "^3.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.1.0.tgz", + "integrity": "sha512-A+9FKzxPluqogNahpCv04UJvcZ9B3HamqpDNWNKDjtxVRYB8xbZLFuCr8JAJFpNp83CA0anGQFlpQna9Me+/tQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" + "@jest/get-type": "30.1.0", + "@jest/types": "30.0.5", + "chalk": "^4.1.2", + "jest-util": "30.0.5", + "pretty-format": "30.0.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.1.2.tgz", + "integrity": "sha512-w8qBiXtqGWJ9xpJIA98M0EIoq079GOQRQUyse5qg1plShUCQ0Ek1VTTcczqKrn3f24TFAgFtT+4q3aOXvjbsuA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/environment": "30.1.2", + "@jest/fake-timers": "30.1.2", + "@jest/types": "30.0.5", "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" + "jest-mock": "30.0.5", + "jest-util": "30.0.5", + "jest-validate": "30.1.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.1.0.tgz", + "integrity": "sha512-JLeM84kNjpRkggcGpQLsV7B8W4LNUWz7oDNVnY1Vjj22b5/fAb3kk3htiD+4Na8bmJmjJR7rBtS2Rmq/NEcADg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", + "@jest/types": "30.0.5", "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", + "anymatch": "^3.1.3", + "fb-watchman": "^2.0.2", + "graceful-fs": "^4.2.11", + "jest-regex-util": "30.0.1", + "jest-util": "30.0.5", + "jest-worker": "30.1.0", + "micromatch": "^4.0.8", "walker": "^1.0.8" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "optionalDependencies": { - "fsevents": "^2.3.2" + "fsevents": "^2.3.3" } }, "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.1.0.tgz", + "integrity": "sha512-AoFvJzwxK+4KohH60vRuHaqXfWmeBATFZpzpmzNmYTtmRMiyGPVhkXpBqxUQunw+dQB48bDf4NpUs6ivVbRv1g==", "dev": true, "license": "MIT", "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "@jest/get-type": "30.1.0", + "pretty-format": "30.0.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.1.2.tgz", + "integrity": "sha512-7ai16hy4rSbDjvPTuUhuV8nyPBd6EX34HkBsBcBX2lENCuAQ0qKCPb/+lt8OSWUa9WWmGYLy41PrEzkwRwoGZQ==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "@jest/get-type": "30.1.0", + "chalk": "^4.1.2", + "jest-diff": "30.1.2", + "pretty-format": "30.0.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.1.0.tgz", + "integrity": "sha512-HizKDGG98cYkWmaLUHChq4iN+oCENohQLb7Z5guBPumYs+/etonmNFlg1Ps6yN9LTPyZn+M+b/9BbnHx3WTMDg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", + "@babel/code-frame": "^7.27.1", + "@jest/types": "30.0.5", + "@types/stack-utils": "^2.0.3", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "micromatch": "^4.0.8", + "pretty-format": "30.0.5", "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "stack-utils": "^2.0.6" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.5.tgz", + "integrity": "sha512-Od7TyasAAQX/6S+QCbN6vZoWOMwlTtzzGuxJku1GhGanAjz9y+QsQkpScDmETvdc9aSXyJ/Op4rhpMYBWW91wQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", + "@jest/types": "30.0.5", "@types/node": "*", - "jest-util": "^29.7.0" + "jest-util": "30.0.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-pnp-resolver": { @@ -5238,147 +5695,148 @@ } }, "node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "version": "30.0.1", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.0.1.tgz", + "integrity": "sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==", "dev": true, "license": "MIT", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.1.3.tgz", + "integrity": "sha512-DI4PtTqzw9GwELFS41sdMK32Ajp3XZQ8iygeDMWkxlRhm7uUTOFSZFVZABFuxr0jvspn8MAYy54NxZCsuCTSOw==", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.1.0", + "jest-pnp-resolver": "^1.2.3", + "jest-util": "30.0.5", + "jest-validate": "30.1.0", + "slash": "^3.0.0", + "unrs-resolver": "^1.7.11" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.1.3.tgz", + "integrity": "sha512-DNfq3WGmuRyHRHfEet+Zm3QOmVFtIarUOQHHryKPc0YL9ROfgWZxl4+aZq/VAzok2SS3gZdniP+dO4zgo59hBg==", "dev": true, "license": "MIT", "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" + "jest-regex-util": "30.0.1", + "jest-snapshot": "30.1.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.1.3.tgz", + "integrity": "sha512-dd1ORcxQraW44Uz029TtXj85W11yvLpDuIzNOlofrC8GN+SgDlgY4BvyxJiVeuabA1t6idjNbX59jLd2oplOGQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/console": "30.1.2", + "@jest/environment": "30.1.2", + "@jest/test-result": "30.1.3", + "@jest/transform": "30.1.2", + "@jest/types": "30.0.5", "@types/node": "*", - "chalk": "^4.0.0", + "chalk": "^4.1.2", "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", + "exit-x": "^0.2.2", + "graceful-fs": "^4.2.11", + "jest-docblock": "30.0.1", + "jest-environment-node": "30.1.2", + "jest-haste-map": "30.1.0", + "jest-leak-detector": "30.1.0", + "jest-message-util": "30.1.0", + "jest-resolve": "30.1.3", + "jest-runtime": "30.1.3", + "jest-util": "30.0.5", + "jest-watcher": "30.1.3", + "jest-worker": "30.1.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.1.3.tgz", + "integrity": "sha512-WS8xgjuNSphdIGnleQcJ3AKE4tBKOVP+tKhCD0u+Tb2sBmsU8DxfbBpZX7//+XOz81zVs4eFpJQwBNji2Y07DA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/environment": "30.1.2", + "@jest/fake-timers": "30.1.2", + "@jest/globals": "30.1.2", + "@jest/source-map": "30.0.1", + "@jest/test-result": "30.1.3", + "@jest/transform": "30.1.2", + "@jest/types": "30.0.5", "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", + "chalk": "^4.1.2", + "cjs-module-lexer": "^2.1.0", + "collect-v8-coverage": "^1.0.2", + "glob": "^10.3.10", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.1.0", + "jest-message-util": "30.1.0", + "jest-mock": "30.0.5", + "jest-regex-util": "30.0.1", + "jest-resolve": "30.1.3", + "jest-snapshot": "30.1.2", + "jest-util": "30.0.5", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "version": "30.1.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.1.2.tgz", + "integrity": "sha512-4q4+6+1c8B6Cy5pGgFvjDy/Pa6VYRiGu0yQafKkJ9u6wQx4G5PqI2QR6nxTl43yy7IWsINwz6oT4o6tD12a8Dg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "@babel/core": "^7.27.4", + "@babel/generator": "^7.27.5", + "@babel/plugin-syntax-jsx": "^7.27.1", + "@babel/plugin-syntax-typescript": "^7.27.1", + "@babel/types": "^7.27.3", + "@jest/expect-utils": "30.1.2", + "@jest/get-type": "30.1.0", + "@jest/snapshot-utils": "30.1.2", + "@jest/transform": "30.1.2", + "@jest/types": "30.0.5", + "babel-preset-current-node-syntax": "^1.1.0", + "chalk": "^4.1.2", + "expect": "30.1.2", + "graceful-fs": "^4.2.11", + "jest-diff": "30.1.2", + "jest-matcher-utils": "30.1.2", + "jest-message-util": "30.1.0", + "jest-util": "30.0.5", + "pretty-format": "30.0.5", + "semver": "^7.7.2", + "synckit": "^0.11.8" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-snapshot/node_modules/semver": { @@ -5395,39 +5853,52 @@ } }, "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.5.tgz", + "integrity": "sha512-pvyPWssDZR0FlfMxCBoc0tvM8iUEskaRFALUtGQYzVEAqisAztmy+R8LnU14KT4XA0H/a5HMVTXat1jLne010g==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", + "@jest/types": "30.0.5", "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "graceful-fs": "^4.2.11", + "picomatch": "^4.0.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-util/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.1.0.tgz", + "integrity": "sha512-7P3ZlCFW/vhfQ8pE7zW6Oi4EzvuB4sgR72Q1INfW9m0FGo0GADYlPwIkf4CyPq7wq85g+kPMtPOHNAdWHeBOaA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", + "@jest/get-type": "30.1.0", + "@jest/types": "30.0.5", + "camelcase": "^6.3.0", + "chalk": "^4.1.2", "leven": "^3.1.0", - "pretty-format": "^29.7.0" + "pretty-format": "30.0.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-validate/node_modules/camelcase": { @@ -5444,39 +5915,40 @@ } }, "node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.1.3.tgz", + "integrity": "sha512-6jQUZCP1BTL2gvG9E4YF06Ytq4yMb4If6YoQGRR6PpjtqOXSP3sKe2kqwB6SQ+H9DezOfZaSLnmka1NtGm3fCQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", + "@jest/test-result": "30.1.3", + "@jest/types": "30.0.5", "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" + "jest-util": "30.0.5", + "string-length": "^4.0.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.1.0.tgz", + "integrity": "sha512-uvWcSjlwAAgIu133Tt77A05H7RIk3Ho8tZL50bQM2AkvLdluw9NG48lRCl3Dt+MOH719n/0nnb5YxUwcuJiKRA==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", - "jest-util": "^29.7.0", + "@ungap/structured-clone": "^1.3.0", + "jest-util": "30.0.5", "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "supports-color": "^8.1.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-worker/node_modules/supports-color": { @@ -5600,16 +6072,6 @@ "json-buffer": "3.0.1" } }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -5835,6 +6297,16 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -5860,6 +6332,22 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/napi-postinstall": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.3.tgz", + "integrity": "sha512-uTp172LLXSxuSYHv/kou+f6KW3SMppU9ivthaVTXian9sOt3XM/zHYHpRZiLgQoxeWfYUnslNWQHF1+G71xcow==", + "dev": true, + "license": "MIT", + "bin": { + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -5884,9 +6372,9 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.21.tgz", + "integrity": "sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==", "dev": true, "license": "MIT" }, @@ -6037,6 +6525,13 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -6107,12 +6602,29 @@ "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, - "license": "MIT" + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" }, "node_modules/path-to-regexp": { "version": "8.2.0", @@ -6288,9 +6800,9 @@ } }, "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, "license": "MIT", "bin": { @@ -6317,18 +6829,18 @@ } }, "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.5.tgz", + "integrity": "sha512-D1tKtYvByrBkFLe2wHJl2bwMJIiT8rW+XA+TiataH79/FszLQMrpGEvzUVkzPau7OCO0Qnrhpe87PqtOAIB8Yw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" + "@jest/schemas": "30.0.5", + "ansi-styles": "^5.2.0", + "react-is": "^18.3.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { @@ -6344,20 +6856,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -6381,9 +6879,9 @@ } }, "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz", + "integrity": "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==", "dev": true, "funding": [ { @@ -6483,27 +6981,6 @@ "node": ">=0.10.0" } }, - "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -6539,22 +7016,12 @@ }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", - "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", "dev": true, "license": "MIT", - "engines": { - "node": ">=10" + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, "node_modules/reusify": { @@ -6828,18 +7295,17 @@ "license": "ISC" }, "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "license": "MIT" + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/slash": { "version": "3.0.0", @@ -6949,7 +7415,49 @@ "node": ">=10" } }, + "node_modules/string-length/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-length/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", @@ -6964,7 +7472,54 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -6977,6 +7532,16 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -7043,19 +7608,6 @@ "node": ">=8" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/synckit": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.8.tgz", @@ -7087,6 +7639,28 @@ "node": ">=8" } }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/tinybench": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", @@ -7102,14 +7676,14 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", - "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" + "fdir": "^6.5.0", + "picomatch": "^4.0.3" }, "engines": { "node": ">=12.0.0" @@ -7119,11 +7693,14 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -7218,10 +7795,18 @@ "typescript": ">=4.8.4" } }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, "node_modules/tsx": { - "version": "4.20.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.1.tgz", - "integrity": "sha512-JsFUnMHIE+g8KllOvWTrSOwCKM10xLcsesvUQR61znsbrcwZ4U/QaqdymmvTqG5GMD7k2VFv9UG35C4dRy34Ag==", + "version": "4.20.5", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.5.tgz", + "integrity": "sha512-+wKjMNU9w/EaQayHXb7WA7ZaHY6hN8WgfvHNQ3t1PnU91/7O8TcTnIhCDYTZwnt8JsO9IBqZ30Ln1r7pPF52Aw==", "dev": true, "license": "MIT", "dependencies": { @@ -7289,9 +7874,9 @@ } }, "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "dev": true, "license": "Apache-2.0", "bin": { @@ -7303,15 +7888,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.34.0.tgz", - "integrity": "sha512-MRpfN7uYjTrTGigFCt8sRyNqJFhjN0WwZecldaqhWm+wy0gaRt8Edb/3cuUy0zdq2opJWT6iXINKAtewnDOltQ==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.44.0.tgz", + "integrity": "sha512-ib7mCkYuIzYonCq9XWF5XNw+fkj2zg629PSa9KNIQ47RXFF763S5BIX4wqz1+FLPogTZoiw8KmCiRPRa8bL3qw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.34.0", - "@typescript-eslint/parser": "8.34.0", - "@typescript-eslint/utils": "8.34.0" + "@typescript-eslint/eslint-plugin": "8.44.0", + "@typescript-eslint/parser": "8.44.0", + "@typescript-eslint/typescript-estree": "8.44.0", + "@typescript-eslint/utils": "8.44.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7322,13 +7908,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "version": "7.12.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz", + "integrity": "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ==", "dev": true, "license": "MIT" }, @@ -7351,6 +7937,41 @@ "node": ">= 0.8" } }, + "node_modules/unrs-resolver": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", + "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "napi-postinstall": "^0.3.0" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-android-arm-eabi": "1.11.1", + "@unrs/resolver-binding-android-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-x64": "1.11.1", + "@unrs/resolver-binding-freebsd-x64": "1.11.1", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-arm64-musl": "1.11.1", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1", + "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-musl": "1.11.1", + "@unrs/resolver-binding-wasm32-wasi": "1.11.1", + "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1", + "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1", + "@unrs/resolver-binding-win32-x64-msvc": "1.11.1" + } + }, "node_modules/update-browserslist-db": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", @@ -7416,18 +8037,18 @@ } }, "node_modules/vite": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.0.6.tgz", - "integrity": "sha512-MHFiOENNBd+Bd9uvc8GEsIzdkn1JxMmEeYX35tI3fv0sJBUTfW5tQsoaOwuY4KhBI09A3dUJ/DXf2yxPVPUceg==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.6.tgz", + "integrity": "sha512-SRYIB8t/isTwNn8vMB3MR6E+EQZM/WG1aKmmIUCfDXfVvKfc20ZpamngWHKzAmmu9ppsgxsg4b2I7c90JZudIQ==", "dev": true, "license": "MIT", "dependencies": { "esbuild": "^0.25.0", - "fdir": "^6.4.6", + "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", - "rollup": "^4.40.0", - "tinyglobby": "^0.2.14" + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" }, "bin": { "vite": "bin/vite.js" @@ -7514,11 +8135,14 @@ } }, "node_modules/vite/node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -7680,6 +8304,25 @@ } }, "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", @@ -7697,6 +8340,64 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -7704,17 +8405,17 @@ "license": "ISC" }, "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" + "signal-exit": "^4.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/y18n": { @@ -7763,6 +8464,51 @@ "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 7a03a01..697524d 100644 --- a/package.json +++ b/package.json @@ -22,28 +22,28 @@ "access": "public" }, "dependencies": { - "@apidevtools/swagger-parser": "^11.0.0", - "@modelcontextprotocol/sdk": "^1.17.0", - "dotenv": "^16.5.0", - "es-toolkit": "^1.37.2", + "@apidevtools/swagger-parser": "^12.0.0", + "@modelcontextprotocol/sdk": "^1.18.1", + "dotenv": "^17.2.2", + "es-toolkit": "^1.39.10", "express": "^5.1.0" }, "devDependencies": { - "@eslint/js": "^9.26.0", - "@types/express": "^5.0.1", - "@types/node": "^22", - "eslint": "^9.26.0", - "eslint-config-prettier": "^10.1.5", - "eslint-plugin-prettier": "^5.4.0", - "eslint-plugin-unused-imports": "^4.1.4", - "fs-extra": "^11.3.0", - "jest": "^29.7.0", + "@eslint/js": "^9.35.0", + "@types/express": "^5.0.3", + "@types/node": "^24", + "eslint": "^9.35.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-unused-imports": "^4.2.0", + "fs-extra": "^11.3.2", + "jest": "^30.1.3", "json-schema-to-zod": "^2.6.1", "openapi-types": "^12.1.3", - "prettier": "^3.5.3", - "tsx": "^4.19.4", - "typescript": "^5.8.3", - "typescript-eslint": "^8.32.1", + "prettier": "^3.6.2", + "tsx": "^4.20.5", + "typescript": "^5.9.2", + "typescript-eslint": "^8.44.0", "vitest": "^3.2.4" }, "engines": { diff --git a/src/tests/integration/direct.test.ts b/src/tests/integration/direct.test.ts index 6b2b62c..337217b 100644 --- a/src/tests/integration/direct.test.ts +++ b/src/tests/integration/direct.test.ts @@ -255,7 +255,9 @@ describe('Postman MCP - Direct Integration Tests', () => { try { await client.get('/test-endpoint'); - expect(capturedHeaders['user-agent']).toBe(`${expectedPackageName}/${expectedPackageVersion}`); + expect(capturedHeaders['user-agent']).toBe( + `${expectedPackageName}/${expectedPackageVersion}` + ); expect(capturedHeaders['x-api-key']).toBe('test-api-key'); } finally { global.fetch = originalFetch; From 05035ec5c728b9ab85c41467c0c6559fb2035d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 16:17:51 +0200 Subject: [PATCH 04/10] chore: v2.3.0 --- dist/package.json | 36 ++++++++++++++++++------------------ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dist/package.json b/dist/package.json index aa5d733..b57c239 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.2.1", + "version": "2.3.0", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", @@ -22,28 +22,28 @@ "access": "public" }, "dependencies": { - "@apidevtools/swagger-parser": "^11.0.0", - "@modelcontextprotocol/sdk": "^1.17.0", - "dotenv": "^16.5.0", - "es-toolkit": "^1.37.2", + "@apidevtools/swagger-parser": "^12.0.0", + "@modelcontextprotocol/sdk": "^1.18.1", + "dotenv": "^17.2.2", + "es-toolkit": "^1.39.10", "express": "^5.1.0" }, "devDependencies": { - "@eslint/js": "^9.26.0", - "@types/express": "^5.0.1", - "@types/node": "^22", - "eslint": "^9.26.0", - "eslint-config-prettier": "^10.1.5", - "eslint-plugin-prettier": "^5.4.0", - "eslint-plugin-unused-imports": "^4.1.4", - "fs-extra": "^11.3.0", - "jest": "^29.7.0", + "@eslint/js": "^9.35.0", + "@types/express": "^5.0.3", + "@types/node": "^24", + "eslint": "^9.35.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-unused-imports": "^4.2.0", + "fs-extra": "^11.3.2", + "jest": "^30.1.3", "json-schema-to-zod": "^2.6.1", "openapi-types": "^12.1.3", - "prettier": "^3.5.3", - "tsx": "^4.19.4", - "typescript": "^5.8.3", - "typescript-eslint": "^8.32.1", + "prettier": "^3.6.2", + "tsx": "^4.20.5", + "typescript": "^5.9.2", + "typescript-eslint": "^8.44.0", "vitest": "^3.2.4" }, "engines": { diff --git a/package-lock.json b/package-lock.json index d243d49..69566c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@postman/postman-mcp-server", - "version": "2.2.1", + "version": "2.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@postman/postman-mcp-server", - "version": "2.2.1", + "version": "2.3.0", "license": "Apache-2.0", "dependencies": { "@apidevtools/swagger-parser": "^12.0.0", diff --git a/package.json b/package.json index 697524d..b2b104d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.2.1", + "version": "2.3.0", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", From 4b255b043c265d5b24ff18d59f76e1b38ec45ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 16:23:24 +0200 Subject: [PATCH 05/10] fix: mcpb installation --- .github/workflows/mcpb-pack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mcpb-pack.yaml b/.github/workflows/mcpb-pack.yaml index 5e8e47d..ce07ea8 100644 --- a/.github/workflows/mcpb-pack.yaml +++ b/.github/workflows/mcpb-pack.yaml @@ -36,7 +36,7 @@ jobs: run: npm ci --omit=dev - name: Install MCPB - run: npm install -g @anthropics/mcpb + run: npm install -g @anthropics-ai/mcpb - name: Package extensions run: | From 72379a470efda11d8a5066a1e46a2940b07a3c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 16:23:51 +0200 Subject: [PATCH 06/10] chore: v2.3.1 --- dist/package.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/package.json b/dist/package.json index b57c239..964b8cc 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.3.0", + "version": "2.3.1", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", diff --git a/package-lock.json b/package-lock.json index 69566c1..f0301a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@postman/postman-mcp-server", - "version": "2.3.0", + "version": "2.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@postman/postman-mcp-server", - "version": "2.3.0", + "version": "2.3.1", "license": "Apache-2.0", "dependencies": { "@apidevtools/swagger-parser": "^12.0.0", diff --git a/package.json b/package.json index b2b104d..9aa8ccb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.3.0", + "version": "2.3.1", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", From 620dd47e898a0cac72ae6fe5e827922b079c2ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 16:26:34 +0200 Subject: [PATCH 07/10] fix: mcpb installation --- .github/workflows/mcpb-pack.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mcpb-pack.yaml b/.github/workflows/mcpb-pack.yaml index ce07ea8..d7eab0c 100644 --- a/.github/workflows/mcpb-pack.yaml +++ b/.github/workflows/mcpb-pack.yaml @@ -4,6 +4,7 @@ on: push: tags: - '*' + workflow_dispatch: jobs: build-and-release: @@ -36,7 +37,7 @@ jobs: run: npm ci --omit=dev - name: Install MCPB - run: npm install -g @anthropics-ai/mcpb + run: npm install -g @anthropic-ai/mcpb - name: Package extensions run: | From 3370095ba928e95cfc77426e86e629955be7af35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 16:27:43 +0200 Subject: [PATCH 08/10] chore: v2.3.2 --- dist/package.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/package.json b/dist/package.json index 964b8cc..7f1ae57 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.3.1", + "version": "2.3.2", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", diff --git a/package-lock.json b/package-lock.json index f0301a2..80939dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@postman/postman-mcp-server", - "version": "2.3.1", + "version": "2.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@postman/postman-mcp-server", - "version": "2.3.1", + "version": "2.3.2", "license": "Apache-2.0", "dependencies": { "@apidevtools/swagger-parser": "^12.0.0", diff --git a/package.json b/package.json index 9aa8ccb..fd8edfe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.3.1", + "version": "2.3.2", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", From 2a507b840b66673c136c4f5e8b68a6b9da3051d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 16:44:05 +0200 Subject: [PATCH 09/10] feat: add release script --- manifest-full.json | 4 +- manifest-minimal.json | 4 +- package.json | 6 ++- scripts/release.js | 93 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 102 insertions(+), 5 deletions(-) create mode 100644 scripts/release.js diff --git a/manifest-full.json b/manifest-full.json index 51e145d..91cd71f 100644 --- a/manifest-full.json +++ b/manifest-full.json @@ -1,6 +1,6 @@ { - "mcpb_version": "0.1", - "version": "2.2.1", + "manifest_version": "0.1", + "version": "2.3.3", "name": "postman-mcp-server-full", "display_name": "Postman MCP Server (Full)", "description": "A comprehensive MCP server with all available Postman API tools (106+ tools).", diff --git a/manifest-minimal.json b/manifest-minimal.json index 50e4468..028078b 100644 --- a/manifest-minimal.json +++ b/manifest-minimal.json @@ -1,6 +1,6 @@ { - "mcpb_version": "0.1", - "version": "2.2.1", + "manifest_version": "0.1", + "version": "2.3.3", "name": "postman-mcp-server-minimal", "display_name": "Postman MCP Server (Minimal)", "description": "A minimal MCP server with essential Postman API tools (37 tools).", diff --git a/package.json b/package.json index fd8edfe..8359075 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,11 @@ "prepack": "npm run build", "test": "vitest", "lint": "eslint", - "lint:fix": "eslint --fix" + "lint:fix": "eslint --fix", + "preversion": "npm run build", + "version": "git add dist/", + "release": "npm version", + "release-custom": "node scripts/release.js" }, "bin": "dist/src/index.js", "files": [ diff --git a/scripts/release.js b/scripts/release.js new file mode 100644 index 0000000..9796622 --- /dev/null +++ b/scripts/release.js @@ -0,0 +1,93 @@ +#!/usr/bin/env node + +import { execSync } from 'child_process'; +import { readFileSync, writeFileSync } from 'fs'; + +const versionType = process.argv[2]; +if (!versionType) { + console.error('Usage: npm run release-custom '); + console.error('Examples:'); + console.error(' npm run release-custom patch'); + console.error(' npm run release-custom minor'); + console.error(' npm run release-custom 2.3.3'); + process.exit(1); +} + +function incrementVersion(currentVersion, type) { + // Clean the version string and split + const cleanVersion = currentVersion.replace(/^v/, ''); // Remove 'v' prefix if present + const parts = cleanVersion.split('.'); + + if (parts.length !== 3) { + throw new Error(`Invalid version format: ${currentVersion}. Expected format: x.y.z`); + } + + const [major, minor, patch] = parts.map(part => { + const num = parseInt(part, 10); + if (isNaN(num)) { + throw new Error(`Invalid version part: ${part} in version ${currentVersion}`); + } + return num; + }); + + console.log(`🔍 Current version parts: major=${major}, minor=${minor}, patch=${patch}`); + + switch (type) { + case 'major': + return `${major + 1}.0.0`; + case 'minor': + return `${major}.${minor + 1}.0`; + case 'patch': + return `${major}.${minor}.${patch + 1}`; + default: + // Validate specific version format + if (!/^\d+\.\d+\.\d+$/.test(type)) { + throw new Error(`Invalid version format: ${type}. Use 'major', 'minor', 'patch', or a version like '1.2.3'`); + } + return type; + } +} + +try { + // Read current version + const pkg = JSON.parse(readFileSync('package.json', 'utf8')); + const currentVersion = pkg.version; + const newVersion = incrementVersion(currentVersion, versionType); + + console.log(`📦 Updating version from ${currentVersion} to ${newVersion}`); + + // Update package.json version + pkg.version = newVersion; + writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); + + // Update package-lock.json version + console.log('🔒 Updating package-lock.json...'); + execSync('npm install --package-lock-only', { stdio: 'inherit' }); + + // Build project + console.log('🔨 Building project...'); + execSync('npm run build', { stdio: 'inherit' }); + + // Update manifest versions + console.log('📝 Updating manifest files...'); + const updateManifest = (file) => { + const manifest = JSON.parse(readFileSync(file, 'utf8')); + manifest.version = newVersion; + writeFileSync(file, JSON.stringify(manifest, null, 2) + '\n'); + }; + + updateManifest('manifest-full.json'); + updateManifest('manifest-minimal.json'); + + // Commit and tag + console.log('📤 Committing and tagging...'); + execSync('git add .', { stdio: 'inherit' }); + execSync(`git commit -m "chore: v${newVersion}"`, { stdio: 'inherit' }); + execSync(`git tag v${newVersion}`, { stdio: 'inherit' }); + + console.log(`✅ Released version ${newVersion}`); + console.log(`🚀 Push with: git push origin main --tags`); +} catch (error) { + console.error('❌ Release failed:', error.message); + process.exit(1); +} \ No newline at end of file From bd79a1b0c1dc1b9dfd3851d1eb1bf11ae2730e7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Fri, 19 Sep 2025 16:44:13 +0200 Subject: [PATCH 10/10] chore: v2.3.3 --- dist/package.json | 8 ++++++-- manifest-full.json | 2 +- manifest-minimal.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dist/package.json b/dist/package.json index 7f1ae57..bd9c0f4 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.3.2", + "version": "2.3.3", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", @@ -10,7 +10,11 @@ "prepack": "npm run build", "test": "vitest", "lint": "eslint", - "lint:fix": "eslint --fix" + "lint:fix": "eslint --fix", + "preversion": "npm run build", + "version": "git add dist/", + "release": "npm version", + "release-custom": "node scripts/release.js" }, "bin": "dist/src/index.js", "files": [ diff --git a/manifest-full.json b/manifest-full.json index 91cd71f..0e343a6 100644 --- a/manifest-full.json +++ b/manifest-full.json @@ -65,4 +65,4 @@ } }, "tools_generated": true -} \ No newline at end of file +} diff --git a/manifest-minimal.json b/manifest-minimal.json index 028078b..913b033 100644 --- a/manifest-minimal.json +++ b/manifest-minimal.json @@ -63,4 +63,4 @@ } }, "tools_generated": true -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 80939dd..aaeec49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@postman/postman-mcp-server", - "version": "2.3.2", + "version": "2.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@postman/postman-mcp-server", - "version": "2.3.2", + "version": "2.3.3", "license": "Apache-2.0", "dependencies": { "@apidevtools/swagger-parser": "^12.0.0", diff --git a/package.json b/package.json index 8359075..260a31c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.3.2", + "version": "2.3.3", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module",