@postman/postman-mcp-server 2.7.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +6 -4
- package/dist/src/clients/postman.js +2 -0
- package/dist/src/enabledResources.js +7 -5
- package/dist/src/index.js +29 -1
- package/dist/src/tools/addWorkspaceToPrivateNetwork.js +47 -0
- package/dist/src/tools/createCollectionRequest.js +9 -12
- package/dist/src/tools/createCollectionResponse.js +109 -398
- package/dist/src/tools/createWorkspace.js +2 -2
- package/dist/src/tools/deleteWorkspace.js +1 -1
- package/dist/src/tools/getAnalyticsData.js +107 -0
- package/dist/src/tools/getAnalyticsMetadata.js +55 -0
- package/dist/src/tools/getWorkspace.js +1 -1
- package/dist/src/tools/{getAllPanAddElementRequests.js → listPrivateNetworkAddRequests.js} +9 -16
- package/dist/src/tools/{getAllElementsAndFolders.js → listPrivateNetworkWorkspaces.js} +27 -34
- package/dist/src/tools/publishDocumentation.js +1 -1
- package/dist/src/tools/putCollection.js +1 -1
- package/dist/src/tools/removeWorkspaceFromPrivateNetwork.js +36 -0
- package/dist/src/tools/resolveCommentThread.js +1 -1
- package/dist/src/tools/respondPrivateNetworkAddRequest.js +56 -0
- package/dist/src/tools/updateCollectionRequest.js +6 -12
- package/dist/src/tools/updateCollectionResponse.js +113 -0
- package/dist/src/tools/updateWorkspace.js +1 -1
- package/dist/src/tools/utils/errorTemplateRenderer.js +23 -0
- package/dist/src/views/errors/getCollectionFolder.404.njk +5 -0
- package/dist/src/views/errors/getCollectionRequest.404.njk +5 -0
- package/dist/src/views/errors/getCollectionResponse.404.njk +5 -0
- package/dist/src/views/errors/getEnvironment.404.njk +5 -0
- package/dist/src/views/errors/getMock.404.njk +5 -0
- package/dist/src/views/errors/getMonitor.404.njk +5 -0
- package/dist/src/views/errors/getSpec.404.njk +5 -0
- package/dist/src/views/errors/getWorkspace.404.njk +5 -0
- package/package.json +15 -15
- package/dist/src/tools/deletePanElementOrFolder.js +0 -41
- package/dist/src/tools/postPanElementOrFolder.js +0 -84
- package/dist/src/tools/updatePanElementOrFolder.js +0 -100
|
@@ -10,401 +10,96 @@ export const parameters = z.object({
|
|
|
10
10
|
.string()
|
|
11
11
|
.describe("The response's name. It is recommended that you pass the `name` property in the request body. If you do not, the system uses a null value. As a result, this creates a response with a blank name.")
|
|
12
12
|
.optional(),
|
|
13
|
-
|
|
13
|
+
description: z.string().nullable().describe("The response's description.").optional(),
|
|
14
|
+
url: z.string().nullable().describe("The associated request's URL.").optional(),
|
|
15
|
+
method: z
|
|
16
|
+
.enum([
|
|
17
|
+
'GET',
|
|
18
|
+
'PUT',
|
|
19
|
+
'POST',
|
|
20
|
+
'PATCH',
|
|
21
|
+
'DELETE',
|
|
22
|
+
'COPY',
|
|
23
|
+
'HEAD',
|
|
24
|
+
'OPTIONS',
|
|
25
|
+
'LINK',
|
|
26
|
+
'UNLINK',
|
|
27
|
+
'PURGE',
|
|
28
|
+
'LOCK',
|
|
29
|
+
'UNLOCK',
|
|
30
|
+
'PROPFIND',
|
|
31
|
+
'VIEW',
|
|
32
|
+
])
|
|
33
|
+
.describe("The request's HTTP method.")
|
|
34
|
+
.optional(),
|
|
35
|
+
headers: z
|
|
36
|
+
.array(z
|
|
14
37
|
.object({
|
|
15
|
-
|
|
16
|
-
.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
.optional(),
|
|
43
|
-
}),
|
|
44
|
-
])
|
|
45
|
-
.describe('Information about the URL.')
|
|
38
|
+
key: z
|
|
39
|
+
.string()
|
|
40
|
+
.describe("The header's key, such as `Content-Type` or `X-Custom-Header`."),
|
|
41
|
+
value: z.string().describe("The header key's value."),
|
|
42
|
+
description: z.string().nullable().describe("The header's description.").optional(),
|
|
43
|
+
})
|
|
44
|
+
.describe('Information about the header.'))
|
|
45
|
+
.describe('A list of headers.')
|
|
46
|
+
.optional(),
|
|
47
|
+
dataMode: z
|
|
48
|
+
.enum(['raw', 'urlencoded', 'formdata', 'binary', 'graphql'])
|
|
49
|
+
.describe("The associated request body's data mode.")
|
|
50
|
+
.optional(),
|
|
51
|
+
rawModeData: z
|
|
52
|
+
.string()
|
|
53
|
+
.nullable()
|
|
54
|
+
.describe("The associated request body's raw mode data.")
|
|
55
|
+
.optional(),
|
|
56
|
+
dataOptions: z
|
|
57
|
+
.object({
|
|
58
|
+
raw: z
|
|
59
|
+
.object({ language: z.string().describe("The raw mode data's language type.").optional() })
|
|
60
|
+
.describe('Options for the `raw` data mode.')
|
|
61
|
+
.optional(),
|
|
62
|
+
urlencoded: z
|
|
63
|
+
.record(z.string(), z.unknown())
|
|
64
|
+
.describe('Options for the `urlencoded` data mode.')
|
|
46
65
|
.optional(),
|
|
47
|
-
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
.enum([
|
|
51
|
-
'basic',
|
|
52
|
-
'bearer',
|
|
53
|
-
'apikey',
|
|
54
|
-
'digest',
|
|
55
|
-
'oauth1',
|
|
56
|
-
'oauth2',
|
|
57
|
-
'hawk',
|
|
58
|
-
'awsv4',
|
|
59
|
-
'ntlm',
|
|
60
|
-
'edgegrid',
|
|
61
|
-
'jwt',
|
|
62
|
-
'asap',
|
|
63
|
-
])
|
|
64
|
-
.describe('The authorization type.'),
|
|
65
|
-
apikey: z
|
|
66
|
-
.array(z
|
|
67
|
-
.object({
|
|
68
|
-
key: z.string().describe("The auth method's key value."),
|
|
69
|
-
value: z
|
|
70
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
71
|
-
.describe("The key's value.")
|
|
72
|
-
.optional(),
|
|
73
|
-
type: z
|
|
74
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
75
|
-
.describe("The value's type.")
|
|
76
|
-
.optional(),
|
|
77
|
-
})
|
|
78
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
79
|
-
.describe("The API key's authentication information.")
|
|
80
|
-
.optional(),
|
|
81
|
-
awsv4: z
|
|
82
|
-
.array(z
|
|
83
|
-
.object({
|
|
84
|
-
key: z.string().describe("The auth method's key value."),
|
|
85
|
-
value: z
|
|
86
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
87
|
-
.describe("The key's value.")
|
|
88
|
-
.optional(),
|
|
89
|
-
type: z
|
|
90
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
91
|
-
.describe("The value's type.")
|
|
92
|
-
.optional(),
|
|
93
|
-
})
|
|
94
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
95
|
-
.describe('The attributes for [AWS Signature](https://learning.postman.com/docs/sending-requests/authorization/aws-signature/) authentication.')
|
|
96
|
-
.optional(),
|
|
97
|
-
basic: z
|
|
98
|
-
.array(z
|
|
99
|
-
.object({
|
|
100
|
-
key: z.string().describe("The auth method's key value."),
|
|
101
|
-
value: z
|
|
102
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
103
|
-
.describe("The key's value.")
|
|
104
|
-
.optional(),
|
|
105
|
-
type: z
|
|
106
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
107
|
-
.describe("The value's type.")
|
|
108
|
-
.optional(),
|
|
109
|
-
})
|
|
110
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
111
|
-
.describe('The attributes for [Basic Auth](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/#basic-auth).')
|
|
112
|
-
.optional(),
|
|
113
|
-
bearer: z
|
|
114
|
-
.array(z
|
|
115
|
-
.object({
|
|
116
|
-
key: z.string().describe("The auth method's key value."),
|
|
117
|
-
value: z
|
|
118
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
119
|
-
.describe("The key's value.")
|
|
120
|
-
.optional(),
|
|
121
|
-
type: z
|
|
122
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
123
|
-
.describe("The value's type.")
|
|
124
|
-
.optional(),
|
|
125
|
-
})
|
|
126
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
127
|
-
.describe('The attributes for [Bearer Token](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/#bearer-token) authentication.')
|
|
128
|
-
.optional(),
|
|
129
|
-
digest: z
|
|
130
|
-
.array(z
|
|
131
|
-
.object({
|
|
132
|
-
key: z.string().describe("The auth method's key value."),
|
|
133
|
-
value: z
|
|
134
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
135
|
-
.describe("The key's value.")
|
|
136
|
-
.optional(),
|
|
137
|
-
type: z
|
|
138
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
139
|
-
.describe("The value's type.")
|
|
140
|
-
.optional(),
|
|
141
|
-
})
|
|
142
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
143
|
-
.describe('The attributes for [Digest](https://learning.postman.com/docs/sending-requests/authorization/digest-auth/) access authentication.')
|
|
144
|
-
.optional(),
|
|
145
|
-
edgegrid: z
|
|
146
|
-
.array(z
|
|
147
|
-
.object({
|
|
148
|
-
key: z.string().describe("The auth method's key value."),
|
|
149
|
-
value: z
|
|
150
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
151
|
-
.describe("The key's value.")
|
|
152
|
-
.optional(),
|
|
153
|
-
type: z
|
|
154
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
155
|
-
.describe("The value's type.")
|
|
156
|
-
.optional(),
|
|
157
|
-
})
|
|
158
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
159
|
-
.describe('The attributes for [Akamai Edgegrid](https://learning.postman.com/docs/sending-requests/authorization/akamai-edgegrid/) authentication.')
|
|
160
|
-
.optional(),
|
|
161
|
-
hawk: z
|
|
162
|
-
.array(z
|
|
163
|
-
.object({
|
|
164
|
-
key: z.string().describe("The auth method's key value."),
|
|
165
|
-
value: z
|
|
166
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
167
|
-
.describe("The key's value.")
|
|
168
|
-
.optional(),
|
|
169
|
-
type: z
|
|
170
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
171
|
-
.describe("The value's type.")
|
|
172
|
-
.optional(),
|
|
173
|
-
})
|
|
174
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
175
|
-
.describe('The attributes for [Hawk](https://learning.postman.com/docs/sending-requests/authorization/hawk-authentication/) authentication.')
|
|
176
|
-
.optional(),
|
|
177
|
-
ntlm: z
|
|
178
|
-
.array(z
|
|
179
|
-
.object({
|
|
180
|
-
key: z.string().describe("The auth method's key value."),
|
|
181
|
-
value: z
|
|
182
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
183
|
-
.describe("The key's value.")
|
|
184
|
-
.optional(),
|
|
185
|
-
type: z
|
|
186
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
187
|
-
.describe("The value's type.")
|
|
188
|
-
.optional(),
|
|
189
|
-
})
|
|
190
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
191
|
-
.describe('The attributes for [NTLM](https://learning.postman.com/docs/sending-requests/authorization/ntlm-authentication/) authentication.')
|
|
192
|
-
.optional(),
|
|
193
|
-
oauth1: z
|
|
194
|
-
.array(z
|
|
195
|
-
.object({
|
|
196
|
-
key: z.string().describe("The auth method's key value."),
|
|
197
|
-
value: z
|
|
198
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
199
|
-
.describe("The key's value.")
|
|
200
|
-
.optional(),
|
|
201
|
-
type: z
|
|
202
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
203
|
-
.describe("The value's type.")
|
|
204
|
-
.optional(),
|
|
205
|
-
})
|
|
206
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
207
|
-
.describe('The attributes for [OAuth1](https://learning.postman.com/docs/sending-requests/authorization/oauth-10/) authentication.')
|
|
208
|
-
.optional(),
|
|
209
|
-
oauth2: z
|
|
210
|
-
.array(z
|
|
211
|
-
.object({
|
|
212
|
-
key: z.string().describe("The auth method's key value."),
|
|
213
|
-
value: z
|
|
214
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
215
|
-
.describe("The key's value.")
|
|
216
|
-
.optional(),
|
|
217
|
-
type: z
|
|
218
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
219
|
-
.describe("The value's type.")
|
|
220
|
-
.optional(),
|
|
221
|
-
})
|
|
222
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
223
|
-
.describe('The attributes for [OAuth2](https://learning.postman.com/docs/sending-requests/authorization/oauth-20/) authentication.')
|
|
224
|
-
.optional(),
|
|
225
|
-
jwt: z
|
|
226
|
-
.array(z
|
|
227
|
-
.object({
|
|
228
|
-
key: z.string().describe("The auth method's key value."),
|
|
229
|
-
value: z
|
|
230
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
231
|
-
.describe("The key's value.")
|
|
232
|
-
.optional(),
|
|
233
|
-
type: z
|
|
234
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
235
|
-
.describe("The value's type.")
|
|
236
|
-
.optional(),
|
|
237
|
-
})
|
|
238
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
239
|
-
.describe('The attributes for JWT (JSON Web Token). Includes the `payload`, `secret`, `algorithm`, `addTokenTo`, and `headerPrefix` properties.')
|
|
240
|
-
.optional(),
|
|
241
|
-
asap: z
|
|
242
|
-
.array(z
|
|
243
|
-
.object({
|
|
244
|
-
key: z.string().describe("The auth method's key value."),
|
|
245
|
-
value: z
|
|
246
|
-
.union([z.string(), z.array(z.record(z.string(), z.unknown()))])
|
|
247
|
-
.describe("The key's value.")
|
|
248
|
-
.optional(),
|
|
249
|
-
type: z
|
|
250
|
-
.enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
|
|
251
|
-
.describe("The value's type.")
|
|
252
|
-
.optional(),
|
|
253
|
-
})
|
|
254
|
-
.describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
|
|
255
|
-
.describe('The attributes for ASAP (Atlassian S2S Authentication Protocol). Includes the `kid`, `aud`, `iss`, `alg`, `privateKey`, and `claims` properties.')
|
|
256
|
-
.optional(),
|
|
257
|
-
})
|
|
258
|
-
.describe('The [authorization type supported by Postman](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).')
|
|
66
|
+
params: z
|
|
67
|
+
.record(z.string(), z.unknown())
|
|
68
|
+
.describe('Options for the `params` data mode.')
|
|
259
69
|
.optional(),
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
.array(z
|
|
264
|
-
.object({
|
|
265
|
-
key: z
|
|
266
|
-
.string()
|
|
267
|
-
.describe("The header's key, such as `Content-Type` or `X-Custom-Header`."),
|
|
268
|
-
value: z.string().describe("The header key's value."),
|
|
269
|
-
description: z.string().nullable().describe("The header's description.").optional(),
|
|
270
|
-
})
|
|
271
|
-
.describe('Information about the header.'))
|
|
272
|
-
.describe('A list of headers.')
|
|
70
|
+
binary: z
|
|
71
|
+
.record(z.string(), z.unknown())
|
|
72
|
+
.describe('Options for the `binary` data mode.')
|
|
273
73
|
.optional(),
|
|
274
|
-
|
|
275
|
-
.
|
|
276
|
-
mode
|
|
277
|
-
.enum(['raw', 'urlencoded', 'formdata', 'file', 'graphql'])
|
|
278
|
-
.describe('The data associated with the request.')
|
|
279
|
-
.optional(),
|
|
280
|
-
raw: z
|
|
281
|
-
.string()
|
|
282
|
-
.describe('If the `mode` value is `raw`, the raw content of the request body.')
|
|
283
|
-
.optional(),
|
|
284
|
-
urlencoded: z
|
|
285
|
-
.array(z.object({
|
|
286
|
-
key: z.string().describe('The key value.'),
|
|
287
|
-
value: z.string().describe("The key's value.").optional(),
|
|
288
|
-
description: z.string().nullable().describe("The key's description.").optional(),
|
|
289
|
-
}))
|
|
290
|
-
.describe('A list of x-www-form-encoded key/value pairs.')
|
|
291
|
-
.optional(),
|
|
292
|
-
formdata: z
|
|
293
|
-
.array(z.record(z.string(), z.unknown()).and(z.union([
|
|
294
|
-
z.object({
|
|
295
|
-
key: z.string().describe('The key value.').optional(),
|
|
296
|
-
value: z.string().describe("The key's value.").optional(),
|
|
297
|
-
type: z.literal('text').describe('The `text` value.').optional(),
|
|
298
|
-
contentType: z
|
|
299
|
-
.string()
|
|
300
|
-
.describe('The form-data Content-Type header.')
|
|
301
|
-
.optional(),
|
|
302
|
-
description: z
|
|
303
|
-
.string()
|
|
304
|
-
.nullable()
|
|
305
|
-
.describe("The key's description.")
|
|
306
|
-
.optional(),
|
|
307
|
-
}),
|
|
308
|
-
z.object({
|
|
309
|
-
key: z.string().describe('The key value.').optional(),
|
|
310
|
-
src: z
|
|
311
|
-
.unknown()
|
|
312
|
-
.superRefine((x, ctx) => {
|
|
313
|
-
const schemas = [z.string().nullable(), z.array(z.string())];
|
|
314
|
-
const errors = schemas.reduce((errors, schema) => ((result) => (result.error ? [...errors, result.error] : errors))(schema.safeParse(x)), []);
|
|
315
|
-
if (schemas.length - errors.length !== 1) {
|
|
316
|
-
ctx.addIssue({
|
|
317
|
-
path: ctx.path,
|
|
318
|
-
code: 'invalid_union',
|
|
319
|
-
unionErrors: errors,
|
|
320
|
-
message: 'Invalid input: Should pass single schema',
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
})
|
|
324
|
-
.optional(),
|
|
325
|
-
type: z.literal('file').describe('The `file` value.').optional(),
|
|
326
|
-
contentType: z
|
|
327
|
-
.string()
|
|
328
|
-
.describe('The form-data Content-Type header.')
|
|
329
|
-
.optional(),
|
|
330
|
-
description: z
|
|
331
|
-
.string()
|
|
332
|
-
.nullable()
|
|
333
|
-
.describe("The key's description.")
|
|
334
|
-
.optional(),
|
|
335
|
-
}),
|
|
336
|
-
])))
|
|
337
|
-
.describe('If the `mode` value is `formdata`, then a list of form-data key/pair values.')
|
|
338
|
-
.optional(),
|
|
339
|
-
file: z
|
|
340
|
-
.object({
|
|
341
|
-
src: z
|
|
342
|
-
.string()
|
|
343
|
-
.nullable()
|
|
344
|
-
.describe('The name of the file to upload (not its path). A null value indicates that no file is selected as a part of the request body.')
|
|
345
|
-
.optional(),
|
|
346
|
-
})
|
|
347
|
-
.describe('If the `mode` value is `file`, an object containing the file request information.')
|
|
348
|
-
.optional(),
|
|
349
|
-
graphql: z
|
|
350
|
-
.object({
|
|
351
|
-
query: z.string().describe('The GraphQL query.').optional(),
|
|
352
|
-
variables: z
|
|
353
|
-
.string()
|
|
354
|
-
.nullable()
|
|
355
|
-
.describe('The GraphQL query variables, in JSON format.')
|
|
356
|
-
.optional(),
|
|
357
|
-
})
|
|
358
|
-
.describe('If the `mode` value is `graphql`, an object containing the GraphQL request information.')
|
|
359
|
-
.optional(),
|
|
360
|
-
options: z
|
|
361
|
-
.record(z.string(), z.unknown())
|
|
362
|
-
.describe('Additional configurations and options set for various modes.')
|
|
363
|
-
.optional(),
|
|
364
|
-
})
|
|
365
|
-
.describe("Information about the collection's request body.")
|
|
74
|
+
graphql: z
|
|
75
|
+
.record(z.string(), z.unknown())
|
|
76
|
+
.describe('Options for the `graphql` data mode.')
|
|
366
77
|
.optional(),
|
|
367
78
|
})
|
|
368
|
-
.describe('Information about the collection request.')
|
|
369
|
-
.optional(),
|
|
370
|
-
responseTime: z
|
|
371
|
-
.number()
|
|
372
|
-
.nullable()
|
|
373
|
-
.describe('The time taken by the request to complete. The unit is milliseconds.')
|
|
374
|
-
.optional(),
|
|
375
|
-
timings: z
|
|
376
|
-
.record(z.string(), z.unknown())
|
|
377
79
|
.nullable()
|
|
378
|
-
.describe(
|
|
379
|
-
.optional(),
|
|
380
|
-
header: z
|
|
381
|
-
.union([
|
|
382
|
-
z.string().nullable(),
|
|
383
|
-
z
|
|
384
|
-
.array(z
|
|
385
|
-
.object({
|
|
386
|
-
key: z
|
|
387
|
-
.string()
|
|
388
|
-
.describe("The header's key, such as `Content-Type` or `X-Custom-Header`."),
|
|
389
|
-
value: z.string().describe("The header key's value."),
|
|
390
|
-
description: z.string().nullable().describe("The header's description.").optional(),
|
|
391
|
-
})
|
|
392
|
-
.describe('Information about the header.'))
|
|
393
|
-
.describe("A list of the response's headers."),
|
|
394
|
-
])
|
|
80
|
+
.describe("Additional configurations and options set for the request body's various data modes.")
|
|
395
81
|
.optional(),
|
|
396
|
-
|
|
397
|
-
.array(z
|
|
82
|
+
responseCode: z
|
|
398
83
|
.object({
|
|
399
|
-
|
|
400
|
-
|
|
84
|
+
code: z.number().describe("The response's HTTP response status code.").optional(),
|
|
85
|
+
name: z.string().describe('The name of the status code.').optional(),
|
|
401
86
|
})
|
|
402
|
-
.
|
|
403
|
-
.
|
|
87
|
+
.describe("The response's HTTP response code information.")
|
|
88
|
+
.optional(),
|
|
89
|
+
status: z.string().nullable().describe("The response's HTTP status text.").optional(),
|
|
90
|
+
time: z
|
|
91
|
+
.string()
|
|
92
|
+
.describe('The time taken by the request to complete, in milliseconds.')
|
|
93
|
+
.optional(),
|
|
94
|
+
cookies: z.string().nullable().describe("The response's cookie data.").optional(),
|
|
95
|
+
mime: z.string().nullable().describe("The response's MIME type.").optional(),
|
|
96
|
+
text: z.string().describe('The raw text of the response body.').optional(),
|
|
97
|
+
language: z.string().describe("The response body's language type.").optional(),
|
|
98
|
+
rawDataType: z.string().nullable().describe("The response's raw data type.").optional(),
|
|
99
|
+
requestObject: z
|
|
100
|
+
.string()
|
|
101
|
+
.describe('A JSON-stringified representation of the associated request.')
|
|
404
102
|
.optional(),
|
|
405
|
-
body: z.string().nullable().describe('The raw text of the response body.').optional(),
|
|
406
|
-
status: z.string().describe("The response's HTTP status.").optional(),
|
|
407
|
-
code: z.number().int().describe("The response's HTTP status code.").optional(),
|
|
408
103
|
});
|
|
409
104
|
export const annotations = {
|
|
410
105
|
title: 'Creates a request response in a collection. For a complete list of request body properties, refer to the **Response** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).',
|
|
@@ -422,22 +117,38 @@ export async function handler(args, extra) {
|
|
|
422
117
|
const bodyPayload = {};
|
|
423
118
|
if (args.name !== undefined)
|
|
424
119
|
bodyPayload.name = args.name;
|
|
425
|
-
if (args.
|
|
426
|
-
bodyPayload.
|
|
427
|
-
if (args.
|
|
428
|
-
bodyPayload.
|
|
429
|
-
if (args.
|
|
430
|
-
bodyPayload.
|
|
431
|
-
if (args.
|
|
432
|
-
bodyPayload.
|
|
433
|
-
if (args.
|
|
434
|
-
bodyPayload.
|
|
435
|
-
if (args.
|
|
436
|
-
bodyPayload.
|
|
120
|
+
if (args.description !== undefined)
|
|
121
|
+
bodyPayload.description = args.description;
|
|
122
|
+
if (args.url !== undefined)
|
|
123
|
+
bodyPayload.url = args.url;
|
|
124
|
+
if (args.method !== undefined)
|
|
125
|
+
bodyPayload.method = args.method;
|
|
126
|
+
if (args.headers !== undefined)
|
|
127
|
+
bodyPayload.headers = args.headers;
|
|
128
|
+
if (args.dataMode !== undefined)
|
|
129
|
+
bodyPayload.dataMode = args.dataMode;
|
|
130
|
+
if (args.rawModeData !== undefined)
|
|
131
|
+
bodyPayload.rawModeData = args.rawModeData;
|
|
132
|
+
if (args.dataOptions !== undefined)
|
|
133
|
+
bodyPayload.dataOptions = args.dataOptions;
|
|
134
|
+
if (args.responseCode !== undefined)
|
|
135
|
+
bodyPayload.responseCode = args.responseCode;
|
|
437
136
|
if (args.status !== undefined)
|
|
438
137
|
bodyPayload.status = args.status;
|
|
439
|
-
if (args.
|
|
440
|
-
bodyPayload.
|
|
138
|
+
if (args.time !== undefined)
|
|
139
|
+
bodyPayload.time = args.time;
|
|
140
|
+
if (args.cookies !== undefined)
|
|
141
|
+
bodyPayload.cookies = args.cookies;
|
|
142
|
+
if (args.mime !== undefined)
|
|
143
|
+
bodyPayload.mime = args.mime;
|
|
144
|
+
if (args.text !== undefined)
|
|
145
|
+
bodyPayload.text = args.text;
|
|
146
|
+
if (args.language !== undefined)
|
|
147
|
+
bodyPayload.language = args.language;
|
|
148
|
+
if (args.rawDataType !== undefined)
|
|
149
|
+
bodyPayload.rawDataType = args.rawDataType;
|
|
150
|
+
if (args.requestObject !== undefined)
|
|
151
|
+
bodyPayload.requestObject = args.requestObject;
|
|
441
152
|
const options = {
|
|
442
153
|
body: JSON.stringify(bodyPayload),
|
|
443
154
|
contentType: ContentType.Json,
|
|
@@ -2,14 +2,14 @@ import { z } from 'zod';
|
|
|
2
2
|
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { asMcpError, McpError } from './utils/toolHelpers.js';
|
|
4
4
|
export const method = 'createWorkspace';
|
|
5
|
-
export const description = 'Creates a new [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/).\n\n**Note:**\n\n- This endpoint returns a 403 \\`Forbidden\\` response if the user does not have permission to create workspaces. [Admins and Super Admins](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles) can configure workspace permissions to restrict users and/or user groups from creating workspaces or require approvals for the creation of team workspaces.\n- There are rate limits when publishing public workspaces.\n- Public team workspace names must be unique.\n- The \\`teamId\\` property must be passed in the request body if [Postman Organizations](https://learning.postman.com/docs/administration/onboarding-checklist) is enabled.\n';
|
|
5
|
+
export const description = 'Creates a new [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/).\n\n**Note:**\n\n- This endpoint returns a 403 \\`Forbidden\\` response if the user does not have permission to create workspaces. [Admins and Super Admins](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles) can configure workspace permissions to restrict users and/or user groups from creating workspaces or require approvals for the creation of team workspaces.\n- Private and [Partner Workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) are available on Postman [**Team** and **Enterprise** plans](https://www.postman.com/pricing).\n- There are rate limits when publishing public workspaces.\n- Public team workspace names must be unique.\n- The \\`teamId\\` property must be passed in the request body if [Postman Organizations](https://learning.postman.com/docs/administration/onboarding-checklist) is enabled.\n';
|
|
6
6
|
export const parameters = z.object({
|
|
7
7
|
workspace: z
|
|
8
8
|
.object({
|
|
9
9
|
name: z.string().describe("The workspace's name."),
|
|
10
10
|
type: z
|
|
11
11
|
.enum(['personal', 'private', 'public', 'team', 'partner'])
|
|
12
|
-
.describe('The type of workspace:\n- `personal`\n- `private` — Private workspaces are available on Postman [**
|
|
12
|
+
.describe('The type of workspace:\n- `personal`\n- `private` — Private workspaces are available on Postman [**Team** and **Enterprise** plans](https://www.postman.com/pricing).\n- `public`\n- `team`\n- `partner` — [Partner Workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) are available on Postman [**Team** and **Enterprise** plans](https://www.postman.com/pricing)).\n'),
|
|
13
13
|
description: z.string().describe("The workspace's description.").optional(),
|
|
14
14
|
about: z.string().describe('A brief summary about the workspace.').optional(),
|
|
15
15
|
teamId: z
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { asMcpError, McpError } from './utils/toolHelpers.js';
|
|
3
3
|
export const method = 'deleteWorkspace';
|
|
4
|
-
export const description = 'Deletes an existing workspace
|
|
4
|
+
export const description = 'Deletes an existing workspace.';
|
|
5
5
|
export const parameters = z.object({ workspaceId: z.string().describe("The workspace's ID.") });
|
|
6
6
|
export const annotations = {
|
|
7
7
|
title: 'Deletes an existing workspace.',
|