@postmcp/types 0.1.17 → 0.1.18
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/index.d.mts +49 -24
- package/dist/index.d.ts +49 -24
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4,19 +4,39 @@ type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'head' | 'option
|
|
|
4
4
|
type RiskTier = 'READ_ONLY' | 'MUTATION' | 'CRITICAL';
|
|
5
5
|
interface JSONSchemaObject {
|
|
6
6
|
type?: string | string[];
|
|
7
|
+
title?: string;
|
|
7
8
|
description?: string;
|
|
8
9
|
properties?: Record<string, JSONSchemaObject>;
|
|
9
10
|
required?: string[];
|
|
10
11
|
items?: JSONSchemaObject;
|
|
11
|
-
enum?:
|
|
12
|
-
default?:
|
|
12
|
+
enum?: unknown[];
|
|
13
|
+
default?: unknown;
|
|
13
14
|
oneOf?: JSONSchemaObject[];
|
|
14
15
|
anyOf?: JSONSchemaObject[];
|
|
15
16
|
allOf?: JSONSchemaObject[];
|
|
16
17
|
$ref?: string;
|
|
17
18
|
additionalProperties?: boolean | JSONSchemaObject;
|
|
18
19
|
format?: string;
|
|
19
|
-
|
|
20
|
+
minLength?: number;
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
pattern?: string;
|
|
23
|
+
minimum?: number;
|
|
24
|
+
maximum?: number;
|
|
25
|
+
exclusiveMinimum?: boolean | number;
|
|
26
|
+
exclusiveMaximum?: boolean | number;
|
|
27
|
+
multipleOf?: number;
|
|
28
|
+
minItems?: number;
|
|
29
|
+
maxItems?: number;
|
|
30
|
+
uniqueItems?: boolean;
|
|
31
|
+
minProperties?: number;
|
|
32
|
+
maxProperties?: number;
|
|
33
|
+
nullable?: boolean;
|
|
34
|
+
readOnly?: boolean;
|
|
35
|
+
writeOnly?: boolean;
|
|
36
|
+
example?: unknown;
|
|
37
|
+
examples?: unknown[];
|
|
38
|
+
deprecated?: boolean;
|
|
39
|
+
[key: string]: unknown;
|
|
20
40
|
}
|
|
21
41
|
interface NormalizedParameter {
|
|
22
42
|
name: string;
|
|
@@ -41,7 +61,7 @@ interface NormalizedOperation {
|
|
|
41
61
|
security?: Array<Record<string, string[]>>;
|
|
42
62
|
isDeprecated?: boolean;
|
|
43
63
|
contentType?: string;
|
|
44
|
-
extensions?: Record<string,
|
|
64
|
+
extensions?: Record<string, unknown>;
|
|
45
65
|
}
|
|
46
66
|
interface SecurityScheme {
|
|
47
67
|
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
@@ -54,7 +74,7 @@ interface SecurityScheme {
|
|
|
54
74
|
interface MacroStep {
|
|
55
75
|
id: string;
|
|
56
76
|
action: string;
|
|
57
|
-
body?: Record<string,
|
|
77
|
+
body?: Record<string, unknown>;
|
|
58
78
|
export?: Record<string, string>;
|
|
59
79
|
}
|
|
60
80
|
interface MacroDefinition {
|
|
@@ -94,7 +114,7 @@ interface TokenDietOptions {
|
|
|
94
114
|
}
|
|
95
115
|
interface TokenDietResult {
|
|
96
116
|
text: string;
|
|
97
|
-
structured:
|
|
117
|
+
structured: unknown;
|
|
98
118
|
rawEstimatedTokens: number;
|
|
99
119
|
dietEstimatedTokens: number;
|
|
100
120
|
savingsPercentage: number;
|
|
@@ -111,9 +131,9 @@ interface DryRunResult {
|
|
|
111
131
|
operationId: string;
|
|
112
132
|
method: string;
|
|
113
133
|
targetUrl: string;
|
|
114
|
-
queryParams?: Record<string,
|
|
134
|
+
queryParams?: Record<string, unknown>;
|
|
115
135
|
headers: Record<string, string>;
|
|
116
|
-
body?:
|
|
136
|
+
body?: unknown;
|
|
117
137
|
message: string;
|
|
118
138
|
}
|
|
119
139
|
|
|
@@ -125,9 +145,9 @@ interface MacroExecutionResult {
|
|
|
125
145
|
stepId: string;
|
|
126
146
|
action: string;
|
|
127
147
|
status: number;
|
|
128
|
-
data:
|
|
148
|
+
data: unknown;
|
|
129
149
|
}>;
|
|
130
|
-
finalData:
|
|
150
|
+
finalData: unknown;
|
|
131
151
|
errorMessage?: string;
|
|
132
152
|
}
|
|
133
153
|
|
|
@@ -137,6 +157,16 @@ interface McpImageContent {
|
|
|
137
157
|
mimeType: string;
|
|
138
158
|
}
|
|
139
159
|
|
|
160
|
+
type SecuritySchemeConfig = string | {
|
|
161
|
+
token?: string;
|
|
162
|
+
value?: string;
|
|
163
|
+
username?: string;
|
|
164
|
+
password?: string;
|
|
165
|
+
header?: string;
|
|
166
|
+
query?: string;
|
|
167
|
+
cookie?: string;
|
|
168
|
+
[key: string]: unknown;
|
|
169
|
+
};
|
|
140
170
|
interface AuthConfig {
|
|
141
171
|
headers?: Record<string, string>;
|
|
142
172
|
bearerToken?: string;
|
|
@@ -149,7 +179,7 @@ interface AuthConfig {
|
|
|
149
179
|
username?: string;
|
|
150
180
|
password?: string;
|
|
151
181
|
} | string;
|
|
152
|
-
securitySchemes?: Record<string,
|
|
182
|
+
securitySchemes?: Record<string, SecuritySchemeConfig>;
|
|
153
183
|
allowedExternalHosts?: string[];
|
|
154
184
|
allowCrossOriginAuth?: boolean;
|
|
155
185
|
}
|
|
@@ -185,8 +215,8 @@ interface HttpRequestConfig extends AxiosRequestConfig {
|
|
|
185
215
|
interface HttpResponseResult {
|
|
186
216
|
status: number;
|
|
187
217
|
statusText: string;
|
|
188
|
-
headers: Record<string,
|
|
189
|
-
data:
|
|
218
|
+
headers: Record<string, unknown>;
|
|
219
|
+
data: unknown;
|
|
190
220
|
contentType?: string;
|
|
191
221
|
isError: boolean;
|
|
192
222
|
errorMessage?: string;
|
|
@@ -194,7 +224,7 @@ interface HttpResponseResult {
|
|
|
194
224
|
}
|
|
195
225
|
interface SerializedRequestParameters {
|
|
196
226
|
path: string;
|
|
197
|
-
queryParams: Record<string,
|
|
227
|
+
queryParams: Record<string, unknown>;
|
|
198
228
|
headerParams: Record<string, string>;
|
|
199
229
|
cookieParams: Record<string, string>;
|
|
200
230
|
}
|
|
@@ -232,15 +262,10 @@ interface PresetMacro {
|
|
|
232
262
|
description: string;
|
|
233
263
|
parameters: {
|
|
234
264
|
type: 'object';
|
|
235
|
-
properties: Record<string,
|
|
265
|
+
properties: Record<string, JSONSchemaObject>;
|
|
236
266
|
required?: string[];
|
|
237
267
|
};
|
|
238
|
-
steps:
|
|
239
|
-
id: string;
|
|
240
|
-
action: string;
|
|
241
|
-
body?: any;
|
|
242
|
-
export?: Record<string, string>;
|
|
243
|
-
}>;
|
|
268
|
+
steps: MacroStep[];
|
|
244
269
|
}
|
|
245
270
|
interface Preset {
|
|
246
271
|
id: string;
|
|
@@ -269,7 +294,7 @@ interface EndpointDef {
|
|
|
269
294
|
schema: {
|
|
270
295
|
type: string;
|
|
271
296
|
format?: string;
|
|
272
|
-
default?:
|
|
297
|
+
default?: unknown;
|
|
273
298
|
};
|
|
274
299
|
description?: string;
|
|
275
300
|
}>;
|
|
@@ -281,7 +306,7 @@ interface EndpointDef {
|
|
|
281
306
|
required?: boolean;
|
|
282
307
|
}>;
|
|
283
308
|
};
|
|
284
|
-
responseSchema?: Record<string,
|
|
309
|
+
responseSchema?: Record<string, unknown>;
|
|
285
310
|
}
|
|
286
311
|
|
|
287
312
|
interface PostMcpCliConfig {
|
|
@@ -346,4 +371,4 @@ interface StudioCommandOptions {
|
|
|
346
371
|
noOpen?: boolean;
|
|
347
372
|
}
|
|
348
373
|
|
|
349
|
-
export type { AsyncPollResult, AuthConfig, DryRunResult, EndpointDef, ExportCommandOptions, GenerateCommandOptions, GeneratedProject, HttpMethod, HttpRequestConfig, HttpResponseResult, HttpServerOptions, InspectCommandOptions, JSONSchemaObject, MacroDefinition, MacroExecutionResult, MacroStep, McpImageContent, NormalizedOperation, NormalizedParameter, NormalizedSpec, PostMcpCliConfig, PostMcpServerOptions, Preset, PresetCategory, PresetFieldMask, PresetMacro, ResilientHttpClientOptions, RiskTier, RunCommandOptions, SandboxAuthConfig, SecurityScheme, SerializedRequestParameters, StudioCommandOptions, TokenDietConfig, TokenDietOptions, TokenDietResult, ToolAnnotations, ToolRegistryOptions };
|
|
374
|
+
export type { AsyncPollResult, AuthConfig, DryRunResult, EndpointDef, ExportCommandOptions, GenerateCommandOptions, GeneratedProject, HttpMethod, HttpRequestConfig, HttpResponseResult, HttpServerOptions, InspectCommandOptions, JSONSchemaObject, MacroDefinition, MacroExecutionResult, MacroStep, McpImageContent, NormalizedOperation, NormalizedParameter, NormalizedSpec, PostMcpCliConfig, PostMcpServerOptions, Preset, PresetCategory, PresetFieldMask, PresetMacro, ResilientHttpClientOptions, RiskTier, RunCommandOptions, SandboxAuthConfig, SecurityScheme, SecuritySchemeConfig, SerializedRequestParameters, StudioCommandOptions, TokenDietConfig, TokenDietOptions, TokenDietResult, ToolAnnotations, ToolRegistryOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,19 +4,39 @@ type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'head' | 'option
|
|
|
4
4
|
type RiskTier = 'READ_ONLY' | 'MUTATION' | 'CRITICAL';
|
|
5
5
|
interface JSONSchemaObject {
|
|
6
6
|
type?: string | string[];
|
|
7
|
+
title?: string;
|
|
7
8
|
description?: string;
|
|
8
9
|
properties?: Record<string, JSONSchemaObject>;
|
|
9
10
|
required?: string[];
|
|
10
11
|
items?: JSONSchemaObject;
|
|
11
|
-
enum?:
|
|
12
|
-
default?:
|
|
12
|
+
enum?: unknown[];
|
|
13
|
+
default?: unknown;
|
|
13
14
|
oneOf?: JSONSchemaObject[];
|
|
14
15
|
anyOf?: JSONSchemaObject[];
|
|
15
16
|
allOf?: JSONSchemaObject[];
|
|
16
17
|
$ref?: string;
|
|
17
18
|
additionalProperties?: boolean | JSONSchemaObject;
|
|
18
19
|
format?: string;
|
|
19
|
-
|
|
20
|
+
minLength?: number;
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
pattern?: string;
|
|
23
|
+
minimum?: number;
|
|
24
|
+
maximum?: number;
|
|
25
|
+
exclusiveMinimum?: boolean | number;
|
|
26
|
+
exclusiveMaximum?: boolean | number;
|
|
27
|
+
multipleOf?: number;
|
|
28
|
+
minItems?: number;
|
|
29
|
+
maxItems?: number;
|
|
30
|
+
uniqueItems?: boolean;
|
|
31
|
+
minProperties?: number;
|
|
32
|
+
maxProperties?: number;
|
|
33
|
+
nullable?: boolean;
|
|
34
|
+
readOnly?: boolean;
|
|
35
|
+
writeOnly?: boolean;
|
|
36
|
+
example?: unknown;
|
|
37
|
+
examples?: unknown[];
|
|
38
|
+
deprecated?: boolean;
|
|
39
|
+
[key: string]: unknown;
|
|
20
40
|
}
|
|
21
41
|
interface NormalizedParameter {
|
|
22
42
|
name: string;
|
|
@@ -41,7 +61,7 @@ interface NormalizedOperation {
|
|
|
41
61
|
security?: Array<Record<string, string[]>>;
|
|
42
62
|
isDeprecated?: boolean;
|
|
43
63
|
contentType?: string;
|
|
44
|
-
extensions?: Record<string,
|
|
64
|
+
extensions?: Record<string, unknown>;
|
|
45
65
|
}
|
|
46
66
|
interface SecurityScheme {
|
|
47
67
|
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
@@ -54,7 +74,7 @@ interface SecurityScheme {
|
|
|
54
74
|
interface MacroStep {
|
|
55
75
|
id: string;
|
|
56
76
|
action: string;
|
|
57
|
-
body?: Record<string,
|
|
77
|
+
body?: Record<string, unknown>;
|
|
58
78
|
export?: Record<string, string>;
|
|
59
79
|
}
|
|
60
80
|
interface MacroDefinition {
|
|
@@ -94,7 +114,7 @@ interface TokenDietOptions {
|
|
|
94
114
|
}
|
|
95
115
|
interface TokenDietResult {
|
|
96
116
|
text: string;
|
|
97
|
-
structured:
|
|
117
|
+
structured: unknown;
|
|
98
118
|
rawEstimatedTokens: number;
|
|
99
119
|
dietEstimatedTokens: number;
|
|
100
120
|
savingsPercentage: number;
|
|
@@ -111,9 +131,9 @@ interface DryRunResult {
|
|
|
111
131
|
operationId: string;
|
|
112
132
|
method: string;
|
|
113
133
|
targetUrl: string;
|
|
114
|
-
queryParams?: Record<string,
|
|
134
|
+
queryParams?: Record<string, unknown>;
|
|
115
135
|
headers: Record<string, string>;
|
|
116
|
-
body?:
|
|
136
|
+
body?: unknown;
|
|
117
137
|
message: string;
|
|
118
138
|
}
|
|
119
139
|
|
|
@@ -125,9 +145,9 @@ interface MacroExecutionResult {
|
|
|
125
145
|
stepId: string;
|
|
126
146
|
action: string;
|
|
127
147
|
status: number;
|
|
128
|
-
data:
|
|
148
|
+
data: unknown;
|
|
129
149
|
}>;
|
|
130
|
-
finalData:
|
|
150
|
+
finalData: unknown;
|
|
131
151
|
errorMessage?: string;
|
|
132
152
|
}
|
|
133
153
|
|
|
@@ -137,6 +157,16 @@ interface McpImageContent {
|
|
|
137
157
|
mimeType: string;
|
|
138
158
|
}
|
|
139
159
|
|
|
160
|
+
type SecuritySchemeConfig = string | {
|
|
161
|
+
token?: string;
|
|
162
|
+
value?: string;
|
|
163
|
+
username?: string;
|
|
164
|
+
password?: string;
|
|
165
|
+
header?: string;
|
|
166
|
+
query?: string;
|
|
167
|
+
cookie?: string;
|
|
168
|
+
[key: string]: unknown;
|
|
169
|
+
};
|
|
140
170
|
interface AuthConfig {
|
|
141
171
|
headers?: Record<string, string>;
|
|
142
172
|
bearerToken?: string;
|
|
@@ -149,7 +179,7 @@ interface AuthConfig {
|
|
|
149
179
|
username?: string;
|
|
150
180
|
password?: string;
|
|
151
181
|
} | string;
|
|
152
|
-
securitySchemes?: Record<string,
|
|
182
|
+
securitySchemes?: Record<string, SecuritySchemeConfig>;
|
|
153
183
|
allowedExternalHosts?: string[];
|
|
154
184
|
allowCrossOriginAuth?: boolean;
|
|
155
185
|
}
|
|
@@ -185,8 +215,8 @@ interface HttpRequestConfig extends AxiosRequestConfig {
|
|
|
185
215
|
interface HttpResponseResult {
|
|
186
216
|
status: number;
|
|
187
217
|
statusText: string;
|
|
188
|
-
headers: Record<string,
|
|
189
|
-
data:
|
|
218
|
+
headers: Record<string, unknown>;
|
|
219
|
+
data: unknown;
|
|
190
220
|
contentType?: string;
|
|
191
221
|
isError: boolean;
|
|
192
222
|
errorMessage?: string;
|
|
@@ -194,7 +224,7 @@ interface HttpResponseResult {
|
|
|
194
224
|
}
|
|
195
225
|
interface SerializedRequestParameters {
|
|
196
226
|
path: string;
|
|
197
|
-
queryParams: Record<string,
|
|
227
|
+
queryParams: Record<string, unknown>;
|
|
198
228
|
headerParams: Record<string, string>;
|
|
199
229
|
cookieParams: Record<string, string>;
|
|
200
230
|
}
|
|
@@ -232,15 +262,10 @@ interface PresetMacro {
|
|
|
232
262
|
description: string;
|
|
233
263
|
parameters: {
|
|
234
264
|
type: 'object';
|
|
235
|
-
properties: Record<string,
|
|
265
|
+
properties: Record<string, JSONSchemaObject>;
|
|
236
266
|
required?: string[];
|
|
237
267
|
};
|
|
238
|
-
steps:
|
|
239
|
-
id: string;
|
|
240
|
-
action: string;
|
|
241
|
-
body?: any;
|
|
242
|
-
export?: Record<string, string>;
|
|
243
|
-
}>;
|
|
268
|
+
steps: MacroStep[];
|
|
244
269
|
}
|
|
245
270
|
interface Preset {
|
|
246
271
|
id: string;
|
|
@@ -269,7 +294,7 @@ interface EndpointDef {
|
|
|
269
294
|
schema: {
|
|
270
295
|
type: string;
|
|
271
296
|
format?: string;
|
|
272
|
-
default?:
|
|
297
|
+
default?: unknown;
|
|
273
298
|
};
|
|
274
299
|
description?: string;
|
|
275
300
|
}>;
|
|
@@ -281,7 +306,7 @@ interface EndpointDef {
|
|
|
281
306
|
required?: boolean;
|
|
282
307
|
}>;
|
|
283
308
|
};
|
|
284
|
-
responseSchema?: Record<string,
|
|
309
|
+
responseSchema?: Record<string, unknown>;
|
|
285
310
|
}
|
|
286
311
|
|
|
287
312
|
interface PostMcpCliConfig {
|
|
@@ -346,4 +371,4 @@ interface StudioCommandOptions {
|
|
|
346
371
|
noOpen?: boolean;
|
|
347
372
|
}
|
|
348
373
|
|
|
349
|
-
export type { AsyncPollResult, AuthConfig, DryRunResult, EndpointDef, ExportCommandOptions, GenerateCommandOptions, GeneratedProject, HttpMethod, HttpRequestConfig, HttpResponseResult, HttpServerOptions, InspectCommandOptions, JSONSchemaObject, MacroDefinition, MacroExecutionResult, MacroStep, McpImageContent, NormalizedOperation, NormalizedParameter, NormalizedSpec, PostMcpCliConfig, PostMcpServerOptions, Preset, PresetCategory, PresetFieldMask, PresetMacro, ResilientHttpClientOptions, RiskTier, RunCommandOptions, SandboxAuthConfig, SecurityScheme, SerializedRequestParameters, StudioCommandOptions, TokenDietConfig, TokenDietOptions, TokenDietResult, ToolAnnotations, ToolRegistryOptions };
|
|
374
|
+
export type { AsyncPollResult, AuthConfig, DryRunResult, EndpointDef, ExportCommandOptions, GenerateCommandOptions, GeneratedProject, HttpMethod, HttpRequestConfig, HttpResponseResult, HttpServerOptions, InspectCommandOptions, JSONSchemaObject, MacroDefinition, MacroExecutionResult, MacroStep, McpImageContent, NormalizedOperation, NormalizedParameter, NormalizedSpec, PostMcpCliConfig, PostMcpServerOptions, Preset, PresetCategory, PresetFieldMask, PresetMacro, ResilientHttpClientOptions, RiskTier, RunCommandOptions, SandboxAuthConfig, SecurityScheme, SecuritySchemeConfig, SerializedRequestParameters, StudioCommandOptions, TokenDietConfig, TokenDietOptions, TokenDietResult, ToolAnnotations, ToolRegistryOptions };
|