@mcp-consultant-tools/rest-api 27.0.0 → 28.0.0-beta.5
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/build/index.d.ts +6 -18
- package/build/index.d.ts.map +1 -1
- package/build/index.js +21 -376
- package/build/index.js.map +1 -1
- package/build/models/api-types.d.ts +133 -0
- package/build/models/api-types.d.ts.map +1 -0
- package/build/models/api-types.js +5 -0
- package/build/models/api-types.js.map +1 -0
- package/build/models/index.d.ts +5 -0
- package/build/models/index.d.ts.map +1 -0
- package/build/models/index.js +2 -0
- package/build/models/index.js.map +1 -0
- package/build/prompts/index.d.ts +2 -0
- package/build/prompts/index.d.ts.map +1 -0
- package/build/prompts/index.js +24 -0
- package/build/prompts/index.js.map +1 -0
- package/build/prompts/templates.d.ts +6 -0
- package/build/prompts/templates.d.ts.map +1 -0
- package/build/prompts/templates.js +169 -0
- package/build/prompts/templates.js.map +1 -0
- package/build/services/index.d.ts +5 -0
- package/build/services/index.d.ts.map +1 -0
- package/build/services/index.js +5 -0
- package/build/services/index.js.map +1 -0
- package/build/services/openapi-parser.d.ts +69 -0
- package/build/services/openapi-parser.d.ts.map +1 -0
- package/build/services/openapi-parser.js +151 -0
- package/build/services/openapi-parser.js.map +1 -0
- package/build/services/rest-api-service.d.ts +90 -0
- package/build/services/rest-api-service.d.ts.map +1 -0
- package/build/services/rest-api-service.js +403 -0
- package/build/services/rest-api-service.js.map +1 -0
- package/build/tools/index.d.ts +7 -0
- package/build/tools/index.d.ts.map +1 -0
- package/build/tools/index.js +6 -0
- package/build/tools/index.js.map +1 -0
- package/build/tools/rest-tools.d.ts +3 -0
- package/build/tools/rest-tools.d.ts.map +1 -0
- package/build/tools/rest-tools.js +165 -0
- package/build/tools/rest-tools.js.map +1 -0
- package/build/types.d.ts +9 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAKA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CA8BpD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompts barrel export + combined registration
|
|
3
|
+
*/
|
|
4
|
+
import { getRestApiGuidePrompt, getRestApiTroubleshootPrompt } from './templates.js';
|
|
5
|
+
export function registerAllPrompts(server) {
|
|
6
|
+
server.prompt("rest-api-guide", "Comprehensive guide for using the REST API testing tools", {}, async () => ({
|
|
7
|
+
messages: [
|
|
8
|
+
{
|
|
9
|
+
role: "user",
|
|
10
|
+
content: { type: "text", text: getRestApiGuidePrompt() },
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
}));
|
|
14
|
+
server.prompt("rest-api-troubleshoot", "Troubleshooting guide for common REST API testing issues", {}, async () => ({
|
|
15
|
+
messages: [
|
|
16
|
+
{
|
|
17
|
+
role: "user",
|
|
18
|
+
content: { type: "text", text: getRestApiTroubleshootPrompt() },
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
}));
|
|
22
|
+
console.error("rest-api prompts registered: 2 prompts");
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAErF,MAAM,UAAU,kBAAkB,CAAC,MAAW;IAC5C,MAAM,CAAC,MAAM,CACX,gBAAgB,EAChB,0DAA0D,EAC1D,EAAE,EACF,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,EAAE;aACzD;SACF;KACF,CAAC,CACH,CAAC;IAEF,MAAM,CAAC,MAAM,CACX,uBAAuB,EACvB,0DAA0D,EAC1D,EAAE,EACF,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,EAAE,EAAE;aAChE;SACF;KACF,CAAC,CACH,CAAC;IAEF,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/prompts/templates.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,wBAAgB,qBAAqB,IAAI,MAAM,CA8E9C;AAED,wBAAgB,4BAA4B,IAAI,MAAM,CAqFrD"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* REST API prompt templates
|
|
3
|
+
*/
|
|
4
|
+
export function getRestApiGuidePrompt() {
|
|
5
|
+
return `# REST API Testing Guide
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This MCP server enables testing REST API endpoints with comprehensive authentication support, including automatic JWT token generation via OAuth2 client credentials flow.
|
|
10
|
+
|
|
11
|
+
## Available Tools
|
|
12
|
+
|
|
13
|
+
### 1. rest-request
|
|
14
|
+
Execute a single HTTP request to any REST endpoint.
|
|
15
|
+
|
|
16
|
+
**Parameters:**
|
|
17
|
+
- \`method\`: HTTP method (GET, POST, PUT, DELETE, PATCH)
|
|
18
|
+
- \`endpoint\`: API path (e.g., "/users", "/api/v1/orders")
|
|
19
|
+
- \`body\`: Request body for POST/PUT/PATCH (optional)
|
|
20
|
+
- \`headers\`: Additional headers (optional)
|
|
21
|
+
- \`host\`: Override base URL (optional)
|
|
22
|
+
|
|
23
|
+
**Example:**
|
|
24
|
+
\`\`\`json
|
|
25
|
+
{
|
|
26
|
+
"method": "POST",
|
|
27
|
+
"endpoint": "/api/users",
|
|
28
|
+
"body": { "name": "John", "email": "john@example.com" }
|
|
29
|
+
}
|
|
30
|
+
\`\`\`
|
|
31
|
+
|
|
32
|
+
### 2. rest-config
|
|
33
|
+
Get current service configuration summary.
|
|
34
|
+
|
|
35
|
+
### 3. rest-refresh-token
|
|
36
|
+
Force refresh OAuth2 token (clears cache).
|
|
37
|
+
|
|
38
|
+
### 4. rest-batch-request
|
|
39
|
+
Execute multiple requests sequentially.
|
|
40
|
+
|
|
41
|
+
## Authentication Methods
|
|
42
|
+
|
|
43
|
+
### OAuth2 Client Credentials (Recommended for APIs)
|
|
44
|
+
Automatically acquires and caches JWT tokens. Tokens are refreshed when expired.
|
|
45
|
+
|
|
46
|
+
Required environment variables:
|
|
47
|
+
- \`OAUTH2_TOKEN_URL\`: Token endpoint URL
|
|
48
|
+
- \`OAUTH2_CLIENT_ID\`: Client ID
|
|
49
|
+
- \`OAUTH2_CLIENT_SECRET\`: Client secret
|
|
50
|
+
- \`OAUTH2_SCOPE\`: OAuth2 scope
|
|
51
|
+
|
|
52
|
+
### Static Bearer Token
|
|
53
|
+
For pre-acquired tokens:
|
|
54
|
+
- \`AUTH_BEARER\`: The bearer token value
|
|
55
|
+
|
|
56
|
+
### Basic Authentication
|
|
57
|
+
- \`AUTH_BASIC_USERNAME\`: Username
|
|
58
|
+
- \`AUTH_BASIC_PASSWORD\`: Password
|
|
59
|
+
|
|
60
|
+
### API Key
|
|
61
|
+
- \`AUTH_APIKEY_HEADER_NAME\`: Header name
|
|
62
|
+
- \`AUTH_APIKEY_VALUE\`: API key value
|
|
63
|
+
|
|
64
|
+
## Configuration
|
|
65
|
+
|
|
66
|
+
### Required
|
|
67
|
+
- \`REST_BASE_URL\`: Base URL for all requests
|
|
68
|
+
|
|
69
|
+
### Optional
|
|
70
|
+
- \`REST_RESPONSE_SIZE_LIMIT\`: Max response size in bytes (default: 10000)
|
|
71
|
+
- \`REST_ENABLE_SSL_VERIFY\`: SSL verification (default: true)
|
|
72
|
+
- \`REST_TIMEOUT\`: Request timeout in ms (default: 30000)
|
|
73
|
+
- \`HEADER_*\`: Custom headers (e.g., HEADER_Accept=application/json)
|
|
74
|
+
|
|
75
|
+
## Best Practices
|
|
76
|
+
|
|
77
|
+
1. **Use OAuth2 for production APIs** - Automatic token management
|
|
78
|
+
2. **Set appropriate response limits** - Prevent memory issues
|
|
79
|
+
3. **Use custom headers wisely** - Don't put secrets in headers
|
|
80
|
+
4. **Enable SSL verification** - Only disable for development
|
|
81
|
+
`;
|
|
82
|
+
}
|
|
83
|
+
export function getRestApiTroubleshootPrompt() {
|
|
84
|
+
return `# REST API Troubleshooting Guide
|
|
85
|
+
|
|
86
|
+
## Common Issues and Solutions
|
|
87
|
+
|
|
88
|
+
### 1. Authentication Failures
|
|
89
|
+
|
|
90
|
+
**Symptom:** 401 Unauthorized or 403 Forbidden responses
|
|
91
|
+
|
|
92
|
+
**Solutions:**
|
|
93
|
+
- For OAuth2: Check token URL, client ID, client secret, and scope
|
|
94
|
+
- Use \`rest-refresh-token\` to force a new token
|
|
95
|
+
- Verify scope matches API requirements
|
|
96
|
+
- Check if credentials have expired
|
|
97
|
+
|
|
98
|
+
### 2. Connection Issues
|
|
99
|
+
|
|
100
|
+
**Symptom:** ECONNREFUSED, ETIMEDOUT, or network errors
|
|
101
|
+
|
|
102
|
+
**Solutions:**
|
|
103
|
+
- Verify REST_BASE_URL is correct
|
|
104
|
+
- Check if API is accessible from your network
|
|
105
|
+
- For self-signed certs, set REST_ENABLE_SSL_VERIFY=false (dev only)
|
|
106
|
+
- Increase REST_TIMEOUT for slow APIs
|
|
107
|
+
|
|
108
|
+
### 3. Response Truncation
|
|
109
|
+
|
|
110
|
+
**Symptom:** Response body appears cut off
|
|
111
|
+
|
|
112
|
+
**Solution:** Increase REST_RESPONSE_SIZE_LIMIT environment variable
|
|
113
|
+
|
|
114
|
+
### 4. Token Expiration
|
|
115
|
+
|
|
116
|
+
**Symptom:** Requests work initially then fail with 401
|
|
117
|
+
|
|
118
|
+
**Solution:**
|
|
119
|
+
- OAuth2 tokens are auto-refreshed, but you can force with rest-refresh-token
|
|
120
|
+
- For static bearer tokens, manually update AUTH_BEARER
|
|
121
|
+
|
|
122
|
+
### 5. CORS Issues
|
|
123
|
+
|
|
124
|
+
**Note:** MCP servers run server-side, so CORS doesn't apply.
|
|
125
|
+
If you see CORS-related errors, the issue is elsewhere.
|
|
126
|
+
|
|
127
|
+
## Debugging Steps
|
|
128
|
+
|
|
129
|
+
1. Use \`rest-config\` to verify current configuration
|
|
130
|
+
2. Try a simple GET request first
|
|
131
|
+
3. Check response timing for network issues
|
|
132
|
+
4. Examine response headers for error details
|
|
133
|
+
5. Use \`rest-refresh-token\` if auth seems stale
|
|
134
|
+
|
|
135
|
+
## Environment Variable Reference
|
|
136
|
+
|
|
137
|
+
\`\`\`bash
|
|
138
|
+
# Required
|
|
139
|
+
REST_BASE_URL=https://api.example.com
|
|
140
|
+
|
|
141
|
+
# OAuth2 (recommended)
|
|
142
|
+
OAUTH2_TOKEN_URL=https://login.example.com/oauth2/token
|
|
143
|
+
OAUTH2_CLIENT_ID=your-client-id
|
|
144
|
+
OAUTH2_CLIENT_SECRET=your-secret
|
|
145
|
+
OAUTH2_SCOPE=api://your-app/.default
|
|
146
|
+
|
|
147
|
+
# Alternative: Static bearer
|
|
148
|
+
AUTH_BEARER=your-token
|
|
149
|
+
|
|
150
|
+
# Alternative: Basic auth
|
|
151
|
+
AUTH_BASIC_USERNAME=user
|
|
152
|
+
AUTH_BASIC_PASSWORD=pass
|
|
153
|
+
|
|
154
|
+
# Alternative: API key
|
|
155
|
+
AUTH_APIKEY_HEADER_NAME=X-Api-Key
|
|
156
|
+
AUTH_APIKEY_VALUE=your-key
|
|
157
|
+
|
|
158
|
+
# Optional settings
|
|
159
|
+
REST_RESPONSE_SIZE_LIMIT=50000
|
|
160
|
+
REST_ENABLE_SSL_VERIFY=true
|
|
161
|
+
REST_TIMEOUT=60000
|
|
162
|
+
|
|
163
|
+
# Custom headers
|
|
164
|
+
HEADER_Accept=application/json
|
|
165
|
+
HEADER_X-Custom=value
|
|
166
|
+
\`\`\`
|
|
167
|
+
`;
|
|
168
|
+
}
|
|
169
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/prompts/templates.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,UAAU,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ER,CAAC;AACF,CAAC;AAED,MAAM,UAAU,4BAA4B;IAC1C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFR,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAPI/Swagger spec parsing utilities
|
|
3
|
+
*/
|
|
4
|
+
import type { EndpointDefinition, EntitySchema } from '../models/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Cached OpenAPI spec with parsed endpoints and schemas
|
|
7
|
+
*/
|
|
8
|
+
export interface CachedOpenApiSpec {
|
|
9
|
+
endpoints: EndpointDefinition[];
|
|
10
|
+
schemas: Record<string, EntitySchema>;
|
|
11
|
+
fetchedAt: number;
|
|
12
|
+
source: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* OpenAPI 3.x types (simplified for our needs)
|
|
16
|
+
*/
|
|
17
|
+
export interface OpenApiSpec {
|
|
18
|
+
openapi?: string;
|
|
19
|
+
info?: {
|
|
20
|
+
title?: string;
|
|
21
|
+
version?: string;
|
|
22
|
+
};
|
|
23
|
+
paths?: Record<string, OpenApiPathItem | undefined>;
|
|
24
|
+
components?: {
|
|
25
|
+
schemas?: Record<string, OpenApiSchema | undefined>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface OpenApiPathItem {
|
|
29
|
+
get?: OpenApiOperation;
|
|
30
|
+
post?: OpenApiOperation;
|
|
31
|
+
put?: OpenApiOperation;
|
|
32
|
+
delete?: OpenApiOperation;
|
|
33
|
+
patch?: OpenApiOperation;
|
|
34
|
+
}
|
|
35
|
+
export interface OpenApiOperation {
|
|
36
|
+
summary?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
operationId?: string;
|
|
39
|
+
tags?: string[];
|
|
40
|
+
requestBody?: any;
|
|
41
|
+
responses?: any;
|
|
42
|
+
}
|
|
43
|
+
export interface OpenApiSchema {
|
|
44
|
+
type?: string;
|
|
45
|
+
properties?: Record<string, OpenApiProperty>;
|
|
46
|
+
required?: string[];
|
|
47
|
+
description?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface OpenApiProperty {
|
|
50
|
+
type?: string;
|
|
51
|
+
format?: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
nullable?: boolean;
|
|
54
|
+
maxLength?: number;
|
|
55
|
+
enum?: string[];
|
|
56
|
+
$ref?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Map OpenAPI type to simplified type string
|
|
60
|
+
*/
|
|
61
|
+
export declare function mapOpenApiType(propObj: OpenApiProperty): string;
|
|
62
|
+
/**
|
|
63
|
+
* Parse OpenAPI 3.x spec into our internal format
|
|
64
|
+
*/
|
|
65
|
+
export declare function parseOpenApiSpec(spec: OpenApiSpec): {
|
|
66
|
+
endpoints: EndpointDefinition[];
|
|
67
|
+
schemas: Record<string, EntitySchema>;
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=openapi-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-parser.d.ts","sourceRoot":"","sources":["../../src/services/openapi-parser.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAmB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE5F;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC,CAAC;KACrD,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,GAAG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ApiType(propObj) {
|
|
5
|
+
if (propObj.$ref) {
|
|
6
|
+
const refParts = propObj.$ref.split("/");
|
|
7
|
+
return refParts[refParts.length - 1];
|
|
8
|
+
}
|
|
9
|
+
const type = propObj.type || "any";
|
|
10
|
+
const format = propObj.format;
|
|
11
|
+
if (type === "string") {
|
|
12
|
+
if (format === "uuid")
|
|
13
|
+
return "Guid";
|
|
14
|
+
if (format === "date-time")
|
|
15
|
+
return "datetime";
|
|
16
|
+
if (format === "date")
|
|
17
|
+
return "date";
|
|
18
|
+
return "string";
|
|
19
|
+
}
|
|
20
|
+
if (type === "integer") {
|
|
21
|
+
if (format === "int64")
|
|
22
|
+
return "long";
|
|
23
|
+
return "int";
|
|
24
|
+
}
|
|
25
|
+
if (type === "number") {
|
|
26
|
+
if (format === "decimal")
|
|
27
|
+
return "decimal";
|
|
28
|
+
if (format === "double")
|
|
29
|
+
return "double";
|
|
30
|
+
if (format === "float")
|
|
31
|
+
return "float";
|
|
32
|
+
return "number";
|
|
33
|
+
}
|
|
34
|
+
if (type === "boolean")
|
|
35
|
+
return "boolean";
|
|
36
|
+
if (type === "array")
|
|
37
|
+
return "array";
|
|
38
|
+
if (type === "object")
|
|
39
|
+
return "object";
|
|
40
|
+
return type;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Parse OpenAPI 3.x spec into our internal format
|
|
44
|
+
*/
|
|
45
|
+
export function parseOpenApiSpec(spec) {
|
|
46
|
+
const endpoints = [];
|
|
47
|
+
const schemas = {};
|
|
48
|
+
// Parse paths into endpoints
|
|
49
|
+
if (spec.paths) {
|
|
50
|
+
const pathMethods = {};
|
|
51
|
+
for (const [path, pathItem] of Object.entries(spec.paths)) {
|
|
52
|
+
if (!pathItem)
|
|
53
|
+
continue;
|
|
54
|
+
const methods = [];
|
|
55
|
+
if (pathItem.get)
|
|
56
|
+
methods.push("GET");
|
|
57
|
+
if (pathItem.post)
|
|
58
|
+
methods.push("POST");
|
|
59
|
+
if (pathItem.put)
|
|
60
|
+
methods.push("PUT");
|
|
61
|
+
if (pathItem.delete)
|
|
62
|
+
methods.push("DELETE");
|
|
63
|
+
if (pathItem.patch)
|
|
64
|
+
methods.push("PATCH");
|
|
65
|
+
if (methods.length > 0) {
|
|
66
|
+
const basePath = path.replace(/\/\{[^}]+\}$/, "");
|
|
67
|
+
if (!pathMethods[basePath]) {
|
|
68
|
+
pathMethods[basePath] = [];
|
|
69
|
+
}
|
|
70
|
+
for (const method of methods) {
|
|
71
|
+
if (!pathMethods[basePath].includes(method)) {
|
|
72
|
+
pathMethods[basePath].push(method);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
for (const [path, methods] of Object.entries(pathMethods)) {
|
|
78
|
+
const pathSegments = path.split("/").filter(Boolean);
|
|
79
|
+
const lastSegment = pathSegments[pathSegments.length - 1] || "";
|
|
80
|
+
const entityName = lastSegment.endsWith("s")
|
|
81
|
+
? lastSegment.slice(0, -1)
|
|
82
|
+
: lastSegment;
|
|
83
|
+
let description;
|
|
84
|
+
const fullPath = spec.paths[path];
|
|
85
|
+
if (fullPath) {
|
|
86
|
+
description =
|
|
87
|
+
fullPath.get?.summary ||
|
|
88
|
+
fullPath.post?.summary ||
|
|
89
|
+
fullPath.get?.description ||
|
|
90
|
+
fullPath.post?.description;
|
|
91
|
+
}
|
|
92
|
+
endpoints.push({
|
|
93
|
+
path,
|
|
94
|
+
methods: methods.sort(),
|
|
95
|
+
entityName: entityName || undefined,
|
|
96
|
+
description,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// Parse schemas
|
|
101
|
+
if (spec.components?.schemas) {
|
|
102
|
+
for (const [schemaName, schemaObj] of Object.entries(spec.components.schemas)) {
|
|
103
|
+
if (!schemaObj || typeof schemaObj !== "object")
|
|
104
|
+
continue;
|
|
105
|
+
if (schemaName.endsWith("_input") || schemaName.endsWith("_output")) {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const fields = [];
|
|
109
|
+
let primaryKey = "id";
|
|
110
|
+
if (schemaObj.properties) {
|
|
111
|
+
const required = new Set(schemaObj.required || []);
|
|
112
|
+
for (const [propName, propObj] of Object.entries(schemaObj.properties)) {
|
|
113
|
+
if (!propObj || typeof propObj !== "object")
|
|
114
|
+
continue;
|
|
115
|
+
if (propName === "id" ||
|
|
116
|
+
propName.endsWith("id") ||
|
|
117
|
+
propName.endsWith("Id")) {
|
|
118
|
+
primaryKey = propName;
|
|
119
|
+
}
|
|
120
|
+
const field = {
|
|
121
|
+
name: propName,
|
|
122
|
+
type: mapOpenApiType(propObj),
|
|
123
|
+
required: required.has(propName),
|
|
124
|
+
nullable: propObj.nullable === true,
|
|
125
|
+
};
|
|
126
|
+
if (propObj.maxLength) {
|
|
127
|
+
field.maxLength = propObj.maxLength;
|
|
128
|
+
}
|
|
129
|
+
if (propObj.description) {
|
|
130
|
+
field.description = propObj.description;
|
|
131
|
+
}
|
|
132
|
+
if (propObj.enum) {
|
|
133
|
+
field.enumValues = propObj.enum;
|
|
134
|
+
}
|
|
135
|
+
fields.push(field);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const pluralName = schemaName.endsWith("s") ? schemaName : `${schemaName}s`;
|
|
139
|
+
const endpoint = `/${pluralName.toLowerCase()}`;
|
|
140
|
+
schemas[schemaName.toLowerCase()] = {
|
|
141
|
+
entityName: schemaName,
|
|
142
|
+
pluralName,
|
|
143
|
+
endpoint,
|
|
144
|
+
primaryKey,
|
|
145
|
+
fields,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return { endpoints, schemas };
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=openapi-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi-parser.js","sourceRoot":"","sources":["../../src/services/openapi-parser.ts"],"names":[],"mappings":"AAgEA;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OA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AC;oBAED,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACrB,CAAC;YACH,CAAC;YAED,MAAM,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,GAAG,CAAC;YAC5E,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC;YAEhD,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,GAAG;gBAClC,UAAU,EAAE,UAAU;gBACtB,UAAU;gBACV,QAAQ;gBACR,UAAU;gBACV,MAAM;aACP,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* REST API Service
|
|
3
|
+
*
|
|
4
|
+
* Provides HTTP request functionality with multiple authentication methods:
|
|
5
|
+
* - Static Bearer Token
|
|
6
|
+
* - Basic Authentication
|
|
7
|
+
* - API Key (custom header)
|
|
8
|
+
* - OAuth2 Client Credentials Flow (JWT generation)
|
|
9
|
+
*/
|
|
10
|
+
import type { RestApiConfig, RequestOptions, RequestResult, EndpointDefinition, EntitySchema } from '../models/index.js';
|
|
11
|
+
export declare class RestApiService {
|
|
12
|
+
private config;
|
|
13
|
+
private cachedToken;
|
|
14
|
+
private httpsAgent;
|
|
15
|
+
private cachedOpenApi;
|
|
16
|
+
private openApiFetchPromise;
|
|
17
|
+
/** OpenAPI cache TTL in milliseconds (default: 5 minutes) */
|
|
18
|
+
private static readonly OPENAPI_CACHE_TTL;
|
|
19
|
+
constructor(config: RestApiConfig);
|
|
20
|
+
/**
|
|
21
|
+
* Get the current authentication method name
|
|
22
|
+
*/
|
|
23
|
+
getAuthMethod(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Get OAuth2 access token using client credentials flow
|
|
26
|
+
* Caches token and refreshes when expired
|
|
27
|
+
*/
|
|
28
|
+
private getOAuth2Token;
|
|
29
|
+
/**
|
|
30
|
+
* Get the Authorization header value based on configured auth method
|
|
31
|
+
*/
|
|
32
|
+
private getAuthHeader;
|
|
33
|
+
/**
|
|
34
|
+
* Sanitize headers for display (redact sensitive values)
|
|
35
|
+
*/
|
|
36
|
+
private sanitizeHeaders;
|
|
37
|
+
/**
|
|
38
|
+
* Execute an HTTP request
|
|
39
|
+
*/
|
|
40
|
+
request(options: RequestOptions): Promise<RequestResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Force refresh the OAuth2 token (clears cache)
|
|
43
|
+
*/
|
|
44
|
+
clearTokenCache(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Get configuration summary (safe to display)
|
|
47
|
+
*/
|
|
48
|
+
getConfigSummary(): {
|
|
49
|
+
baseUrl: string;
|
|
50
|
+
authMethod: string;
|
|
51
|
+
sslVerification: boolean;
|
|
52
|
+
responseSizeLimit: number;
|
|
53
|
+
customHeaderCount: number;
|
|
54
|
+
oauth2TokenUrl?: string;
|
|
55
|
+
openApiUrl?: string;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Check if OpenAPI URL is configured
|
|
59
|
+
*/
|
|
60
|
+
hasOpenApiConfig(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Fetch and parse OpenAPI spec from configured URL
|
|
63
|
+
* Results are cached for OPENAPI_CACHE_TTL
|
|
64
|
+
*/
|
|
65
|
+
private fetchOpenApiSpec;
|
|
66
|
+
/**
|
|
67
|
+
* Actually fetch and parse the OpenAPI spec
|
|
68
|
+
*/
|
|
69
|
+
private doFetchOpenApiSpec;
|
|
70
|
+
/**
|
|
71
|
+
* Clear OpenAPI cache (forces re-fetch on next call)
|
|
72
|
+
*/
|
|
73
|
+
clearOpenApiCache(): void;
|
|
74
|
+
/**
|
|
75
|
+
* List all available API endpoints from OpenAPI spec
|
|
76
|
+
* @param filter Optional filter to match endpoint paths (case-insensitive contains match)
|
|
77
|
+
*/
|
|
78
|
+
listEndpointsAsync(filter?: string): Promise<{
|
|
79
|
+
baseUrl: string;
|
|
80
|
+
endpointCount: number;
|
|
81
|
+
endpoints: EndpointDefinition[];
|
|
82
|
+
source: string;
|
|
83
|
+
}>;
|
|
84
|
+
/**
|
|
85
|
+
* Get schema for a specific entity from OpenAPI spec
|
|
86
|
+
* @param entity Entity name (singular or plural)
|
|
87
|
+
*/
|
|
88
|
+
getSchemaAsync(entity: string): Promise<EntitySchema | null>;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=rest-api-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rest-api-service.d.ts","sourceRoot":"","sources":["../../src/services/rest-api-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,YAAY,EACb,MAAM,oBAAoB,CAAC;AAS5B,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,aAAa,CAAkC;IACvD,OAAO,CAAC,mBAAmB,CAA2C;IAEtE,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAiB;gBAE9C,MAAM,EAAE,aAAa;IA+BjC;;OAEG;IACH,aAAa,IAAI,MAAM;IAQvB;;;OAGG;YACW,cAAc;IAgE5B;;OAEG;YACW,aAAa;IAuB3B;;OAEG;IACH,OAAO,CAAC,eAAe;IAgDvB;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAmH9D;;OAEG;IACH,eAAe,IAAI,IAAI;IAKvB;;OAEG;IACH,gBAAgB,IAAI;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QAC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