pulsemcp-cms-admin-mcp-server 0.9.13 → 0.9.15
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/README.md +15 -8
- package/build/shared/src/pulsemcp-admin-client/lib/add-official-mirror-to-regular-queue.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/admin-fetch.js +33 -0
- package/build/shared/src/pulsemcp-admin-client/lib/approve-official-mirror-queue-item-without-modifying.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/approve-official-mirror-queue-item.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/cleanup-good-jobs.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/create-api-key.js +51 -0
- package/build/shared/src/pulsemcp-admin-client/lib/create-mcp-implementation.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/create-mcp-json.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/create-post.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/create-redirect.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/create-tenant.js +35 -0
- package/build/shared/src/pulsemcp-admin-client/lib/create-unofficial-mirror.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/delete-mcp-json.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/delete-redirect.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/delete-unofficial-mirror.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/discard-good-job.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/force-trigger-good-job-cron.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-author-by-id.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-author-by-slug.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-authors.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-discovered-url-stats.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-discovered-urls.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-draft-mcp-implementations.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-good-job-cron-schedules.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-good-job-processes.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-good-job-statistics.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-good-job.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-good-jobs.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-mcp-client-by-id.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-mcp-client-by-slug.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-mcp-implementation-by-id.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-mcp-json.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-mcp-jsons.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-mcp-server-by-id.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-mcp-server-by-slug.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-moz-backlinks.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-moz-metrics.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-moz-stored-metrics.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-official-mirror-queue-item.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-official-mirror-queue-items.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-official-mirror.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-official-mirrors.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-post.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-posts.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-proctor-metadata.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-proctor-runs.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-provider-by-id.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-redirect.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-redirects.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-tenant.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-tenants.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-unified-mcp-server.js +3 -2
- package/build/shared/src/pulsemcp-admin-client/lib/get-unified-mcp-servers.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-unofficial-mirror.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/get-unofficial-mirrors.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/mark-discovered-url-processed.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/recache-mcp-server.js +24 -0
- package/build/shared/src/pulsemcp-admin-client/lib/reject-official-mirror-queue-item.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/reschedule-good-job.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/retry-good-job.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/run-exam-for-mirror.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/save-mcp-implementation.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/save-results-for-mirror.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/search-mcp-implementations.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/search-providers.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/send-email.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/unlink-official-mirror-queue-item.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/update-mcp-json.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/update-post.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/update-redirect.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/update-unofficial-mirror.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/lib/upload-image.js +2 -1
- package/build/shared/src/pulsemcp-admin-client/pulsemcp-admin-client.integration-mock.js +27 -0
- package/build/shared/src/server.js +13 -1
- package/build/shared/src/tools/create-api-key.js +78 -0
- package/build/shared/src/tools/create-tenant.js +58 -0
- package/build/shared/src/tools/recache-mcp-server.js +49 -0
- package/build/shared/src/tools.js +13 -2
- package/package.json +2 -2
- package/shared/pulsemcp-admin-client/lib/add-official-mirror-to-regular-queue.js +2 -1
- package/shared/pulsemcp-admin-client/lib/admin-fetch.d.ts +6 -0
- package/shared/pulsemcp-admin-client/lib/admin-fetch.js +33 -0
- package/shared/pulsemcp-admin-client/lib/approve-official-mirror-queue-item-without-modifying.js +2 -1
- package/shared/pulsemcp-admin-client/lib/approve-official-mirror-queue-item.js +2 -1
- package/shared/pulsemcp-admin-client/lib/cleanup-good-jobs.js +2 -1
- package/shared/pulsemcp-admin-client/lib/create-api-key.d.ts +3 -0
- package/shared/pulsemcp-admin-client/lib/create-api-key.js +51 -0
- package/shared/pulsemcp-admin-client/lib/create-mcp-implementation.js +2 -1
- package/shared/pulsemcp-admin-client/lib/create-mcp-json.js +2 -1
- package/shared/pulsemcp-admin-client/lib/create-post.js +2 -1
- package/shared/pulsemcp-admin-client/lib/create-redirect.js +2 -1
- package/shared/pulsemcp-admin-client/lib/create-tenant.d.ts +3 -0
- package/shared/pulsemcp-admin-client/lib/create-tenant.js +35 -0
- package/shared/pulsemcp-admin-client/lib/create-unofficial-mirror.js +2 -1
- package/shared/pulsemcp-admin-client/lib/delete-mcp-json.js +2 -1
- package/shared/pulsemcp-admin-client/lib/delete-redirect.js +2 -1
- package/shared/pulsemcp-admin-client/lib/delete-unofficial-mirror.js +2 -1
- package/shared/pulsemcp-admin-client/lib/discard-good-job.js +2 -1
- package/shared/pulsemcp-admin-client/lib/force-trigger-good-job-cron.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-author-by-id.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-author-by-slug.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-authors.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-discovered-url-stats.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-discovered-urls.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-draft-mcp-implementations.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-good-job-cron-schedules.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-good-job-processes.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-good-job-statistics.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-good-job.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-good-jobs.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-mcp-client-by-id.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-mcp-client-by-slug.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-mcp-implementation-by-id.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-mcp-json.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-mcp-jsons.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-mcp-server-by-id.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-mcp-server-by-slug.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-moz-backlinks.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-moz-metrics.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-moz-stored-metrics.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-official-mirror-queue-item.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-official-mirror-queue-items.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-official-mirror.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-official-mirrors.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-post.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-posts.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-proctor-metadata.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-proctor-runs.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-provider-by-id.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-redirect.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-redirects.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-tenant.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-tenants.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-unified-mcp-server.js +3 -2
- package/shared/pulsemcp-admin-client/lib/get-unified-mcp-servers.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-unofficial-mirror.js +2 -1
- package/shared/pulsemcp-admin-client/lib/get-unofficial-mirrors.js +2 -1
- package/shared/pulsemcp-admin-client/lib/mark-discovered-url-processed.js +2 -1
- package/shared/pulsemcp-admin-client/lib/recache-mcp-server.d.ts +3 -0
- package/shared/pulsemcp-admin-client/lib/recache-mcp-server.js +24 -0
- package/shared/pulsemcp-admin-client/lib/reject-official-mirror-queue-item.js +2 -1
- package/shared/pulsemcp-admin-client/lib/reschedule-good-job.js +2 -1
- package/shared/pulsemcp-admin-client/lib/retry-good-job.js +2 -1
- package/shared/pulsemcp-admin-client/lib/run-exam-for-mirror.js +2 -1
- package/shared/pulsemcp-admin-client/lib/save-mcp-implementation.js +2 -1
- package/shared/pulsemcp-admin-client/lib/save-results-for-mirror.js +2 -1
- package/shared/pulsemcp-admin-client/lib/search-mcp-implementations.js +2 -1
- package/shared/pulsemcp-admin-client/lib/search-providers.js +2 -1
- package/shared/pulsemcp-admin-client/lib/send-email.js +2 -1
- package/shared/pulsemcp-admin-client/lib/unlink-official-mirror-queue-item.js +2 -1
- package/shared/pulsemcp-admin-client/lib/update-mcp-json.js +2 -1
- package/shared/pulsemcp-admin-client/lib/update-post.js +2 -1
- package/shared/pulsemcp-admin-client/lib/update-redirect.js +2 -1
- package/shared/pulsemcp-admin-client/lib/update-unofficial-mirror.js +2 -1
- package/shared/pulsemcp-admin-client/lib/upload-image.js +2 -1
- package/shared/pulsemcp-admin-client/pulsemcp-admin-client.integration-mock.js +27 -0
- package/shared/server.d.ts +18 -1
- package/shared/server.js +13 -1
- package/shared/tools/create-api-key.d.ts +39 -0
- package/shared/tools/create-api-key.js +78 -0
- package/shared/tools/create-tenant.d.ts +30 -0
- package/shared/tools/create-tenant.js +58 -0
- package/shared/tools/recache-mcp-server.d.ts +30 -0
- package/shared/tools/recache-mcp-server.js +49 -0
- package/shared/tools.d.ts +2 -1
- package/shared/tools.js +13 -2
- package/shared/types.d.ts +22 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapServerTags(tags) {
|
|
2
3
|
if (!tags)
|
|
3
4
|
return undefined;
|
|
@@ -58,7 +59,7 @@ export async function getDraftMCPImplementations(apiKey, baseUrl, params) {
|
|
|
58
59
|
if (params?.search) {
|
|
59
60
|
url.searchParams.append('search', params.search);
|
|
60
61
|
}
|
|
61
|
-
const response = await
|
|
62
|
+
const response = await adminFetch(url.toString(), {
|
|
62
63
|
method: 'GET',
|
|
63
64
|
headers: {
|
|
64
65
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getGoodJobCronSchedules(apiKey, baseUrl) {
|
|
2
3
|
const url = new URL('/api/good_jobs/cron_schedules', baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getGoodJobProcesses(apiKey, baseUrl) {
|
|
2
3
|
const url = new URL('/api/good_jobs/processes', baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getGoodJobStatistics(apiKey, baseUrl) {
|
|
2
3
|
const url = new URL('/api/good_jobs/statistics', baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getGoodJob(apiKey, baseUrl, id) {
|
|
2
3
|
const url = new URL(`/api/good_jobs/${id}`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapGoodJob(job) {
|
|
2
3
|
return {
|
|
3
4
|
id: job.id,
|
|
@@ -36,7 +37,7 @@ export async function getGoodJobs(apiKey, baseUrl, params) {
|
|
|
36
37
|
if (params?.offset) {
|
|
37
38
|
url.searchParams.append('offset', params.offset.toString());
|
|
38
39
|
}
|
|
39
|
-
const response = await
|
|
40
|
+
const response = await adminFetch(url.toString(), {
|
|
40
41
|
method: 'GET',
|
|
41
42
|
headers: {
|
|
42
43
|
'X-API-Key': apiKey,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getMCPClientById(apiKey, baseUrl, id) {
|
|
2
3
|
// The API doesn't have a direct endpoint to get MCP client by ID,
|
|
3
4
|
// so we need to fetch all clients and find the one with matching ID
|
|
4
5
|
const url = new URL('/supervisor/mcp_clients', baseUrl);
|
|
5
|
-
const response = await
|
|
6
|
+
const response = await adminFetch(url.toString(), {
|
|
6
7
|
method: 'GET',
|
|
7
8
|
headers: {
|
|
8
9
|
'X-API-Key': apiKey,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getMCPClientBySlug(apiKey, baseUrl, slug) {
|
|
2
3
|
// Use the supervisor endpoint which supports JSON
|
|
3
4
|
const url = new URL(`/supervisor/mcp_clients/${slug}`, baseUrl);
|
|
4
|
-
const response = await
|
|
5
|
+
const response = await adminFetch(url.toString(), {
|
|
5
6
|
method: 'GET',
|
|
6
7
|
headers: {
|
|
7
8
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getMCPImplementationById(apiKey, baseUrl, id) {
|
|
2
3
|
const url = new URL(`/api/implementations/${id}`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getMcpJson(apiKey, baseUrl, id) {
|
|
2
3
|
const url = new URL(`/api/mcp_jsons/${id}`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapMcpJson(mcpJson) {
|
|
2
3
|
return {
|
|
3
4
|
id: mcpJson.id,
|
|
@@ -26,7 +27,7 @@ export async function getMcpJsons(apiKey, baseUrl, params) {
|
|
|
26
27
|
if (params?.offset) {
|
|
27
28
|
url.searchParams.append('offset', params.offset.toString());
|
|
28
29
|
}
|
|
29
|
-
const response = await
|
|
30
|
+
const response = await adminFetch(url.toString(), {
|
|
30
31
|
method: 'GET',
|
|
31
32
|
headers: {
|
|
32
33
|
'X-API-Key': apiKey,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getMCPServerById(apiKey, baseUrl, id) {
|
|
2
3
|
// The API doesn't have a direct endpoint to get MCP server by ID,
|
|
3
4
|
// so we need to fetch all servers and find the one with matching ID
|
|
4
5
|
const url = new URL('/supervisor/mcp_servers', baseUrl);
|
|
5
|
-
const response = await
|
|
6
|
+
const response = await adminFetch(url.toString(), {
|
|
6
7
|
method: 'GET',
|
|
7
8
|
headers: {
|
|
8
9
|
'X-API-Key': apiKey,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getMCPServerBySlug(apiKey, baseUrl, slug) {
|
|
2
3
|
// Use the supervisor endpoint which supports JSON
|
|
3
4
|
const url = new URL(`/supervisor/mcp_servers/${slug}`, baseUrl);
|
|
4
|
-
const response = await
|
|
5
|
+
const response = await adminFetch(url.toString(), {
|
|
5
6
|
method: 'GET',
|
|
6
7
|
headers: {
|
|
7
8
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getMozBacklinks(apiKey, baseUrl, params) {
|
|
2
3
|
const apiUrl = new URL('/api/moz/backlinks', baseUrl);
|
|
3
4
|
apiUrl.searchParams.append('url', params.url);
|
|
@@ -7,7 +8,7 @@ export async function getMozBacklinks(apiKey, baseUrl, params) {
|
|
|
7
8
|
if (params.limit !== undefined) {
|
|
8
9
|
apiUrl.searchParams.append('limit', params.limit.toString());
|
|
9
10
|
}
|
|
10
|
-
const response = await
|
|
11
|
+
const response = await adminFetch(apiUrl.toString(), {
|
|
11
12
|
method: 'GET',
|
|
12
13
|
headers: {
|
|
13
14
|
'X-API-Key': apiKey,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getMozMetrics(apiKey, baseUrl, params) {
|
|
2
3
|
const apiUrl = new URL('/api/moz/metrics', baseUrl);
|
|
3
4
|
apiUrl.searchParams.append('url', params.url);
|
|
4
5
|
if (params.scope) {
|
|
5
6
|
apiUrl.searchParams.append('scope', params.scope);
|
|
6
7
|
}
|
|
7
|
-
const response = await
|
|
8
|
+
const response = await adminFetch(apiUrl.toString(), {
|
|
8
9
|
method: 'GET',
|
|
9
10
|
headers: {
|
|
10
11
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getMozStoredMetrics(apiKey, baseUrl, params) {
|
|
2
3
|
const apiUrl = new URL('/api/moz/stored_metrics', baseUrl);
|
|
3
4
|
apiUrl.searchParams.append('server_id', params.server_id);
|
|
@@ -10,7 +11,7 @@ export async function getMozStoredMetrics(apiKey, baseUrl, params) {
|
|
|
10
11
|
if (params.offset !== undefined) {
|
|
11
12
|
apiUrl.searchParams.append('offset', params.offset.toString());
|
|
12
13
|
}
|
|
13
|
-
const response = await
|
|
14
|
+
const response = await adminFetch(apiUrl.toString(), {
|
|
14
15
|
method: 'GET',
|
|
15
16
|
headers: {
|
|
16
17
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapMirror(mirror) {
|
|
2
3
|
return {
|
|
3
4
|
id: mirror.id,
|
|
@@ -34,7 +35,7 @@ function mapLinkedServer(server) {
|
|
|
34
35
|
}
|
|
35
36
|
export async function getOfficialMirrorQueueItem(apiKey, baseUrl, id) {
|
|
36
37
|
const url = new URL(`/api/official_mirror_queues/${id}`, baseUrl);
|
|
37
|
-
const response = await
|
|
38
|
+
const response = await adminFetch(url.toString(), {
|
|
38
39
|
method: 'GET',
|
|
39
40
|
headers: {
|
|
40
41
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapMirrorSummary(mirror) {
|
|
2
3
|
if (!mirror)
|
|
3
4
|
return null;
|
|
@@ -39,7 +40,7 @@ export async function getOfficialMirrorQueueItems(apiKey, baseUrl, params) {
|
|
|
39
40
|
if (params?.offset) {
|
|
40
41
|
url.searchParams.append('offset', params.offset.toString());
|
|
41
42
|
}
|
|
42
|
-
const response = await
|
|
43
|
+
const response = await adminFetch(url.toString(), {
|
|
43
44
|
method: 'GET',
|
|
44
45
|
headers: {
|
|
45
46
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getOfficialMirror(apiKey, baseUrl, id) {
|
|
2
3
|
const url = new URL(`/api/official_mirrors/${id}`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapMirror(mirror) {
|
|
2
3
|
return {
|
|
3
4
|
id: mirror.id,
|
|
@@ -36,7 +37,7 @@ export async function getOfficialMirrors(apiKey, baseUrl, params) {
|
|
|
36
37
|
if (params?.offset) {
|
|
37
38
|
url.searchParams.append('offset', params.offset.toString());
|
|
38
39
|
}
|
|
39
|
-
const response = await
|
|
40
|
+
const response = await adminFetch(url.toString(), {
|
|
40
41
|
method: 'GET',
|
|
41
42
|
headers: {
|
|
42
43
|
'X-API-Key': apiKey,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getPost(apiKey, baseUrl, slug) {
|
|
2
3
|
// Use the supervisor endpoint which supports JSON and returns full post data including body
|
|
3
4
|
const url = new URL(`/supervisor/posts/${slug}`, baseUrl);
|
|
4
|
-
const response = await
|
|
5
|
+
const response = await adminFetch(url.toString(), {
|
|
5
6
|
method: 'GET',
|
|
6
7
|
headers: {
|
|
7
8
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getPosts(apiKey, baseUrl, params) {
|
|
2
3
|
const url = new URL('/posts', baseUrl);
|
|
3
4
|
// Add query parameters if provided
|
|
@@ -13,7 +14,7 @@ export async function getPosts(apiKey, baseUrl, params) {
|
|
|
13
14
|
if (params?.page) {
|
|
14
15
|
url.searchParams.append('page', params.page.toString());
|
|
15
16
|
}
|
|
16
|
-
const response = await
|
|
17
|
+
const response = await adminFetch(url.toString(), {
|
|
17
18
|
method: 'GET',
|
|
18
19
|
headers: {
|
|
19
20
|
'X-API-Key': apiKey,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
/**
|
|
2
3
|
* Get available runtimes and exams from the Proctor API
|
|
3
4
|
*/
|
|
4
5
|
export async function getProctorMetadata(apiKey, baseUrl) {
|
|
5
6
|
const url = new URL('/api/proctor/metadata', baseUrl);
|
|
6
|
-
const response = await
|
|
7
|
+
const response = await adminFetch(url.toString(), {
|
|
7
8
|
method: 'GET',
|
|
8
9
|
headers: {
|
|
9
10
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getProctorRuns(apiKey, baseUrl, params) {
|
|
2
3
|
const url = new URL('/api/proctor_runs', baseUrl);
|
|
3
4
|
if (params?.q) {
|
|
@@ -21,7 +22,7 @@ export async function getProctorRuns(apiKey, baseUrl, params) {
|
|
|
21
22
|
if (params?.offset !== undefined && params.offset > 0) {
|
|
22
23
|
url.searchParams.append('offset', params.offset.toString());
|
|
23
24
|
}
|
|
24
|
-
const response = await
|
|
25
|
+
const response = await adminFetch(url.toString(), {
|
|
25
26
|
method: 'GET',
|
|
26
27
|
headers: {
|
|
27
28
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getProviderById(apiKey, baseUrl, id) {
|
|
2
3
|
const url = new URL(`/api/providers/${id}`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getRedirect(apiKey, baseUrl, id) {
|
|
2
3
|
const url = new URL(`/api/redirects/${id}`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapRedirect(redirect) {
|
|
2
3
|
return {
|
|
3
4
|
id: redirect.id,
|
|
@@ -22,7 +23,7 @@ export async function getRedirects(apiKey, baseUrl, params) {
|
|
|
22
23
|
if (params?.offset) {
|
|
23
24
|
url.searchParams.append('offset', params.offset.toString());
|
|
24
25
|
}
|
|
25
|
-
const response = await
|
|
26
|
+
const response = await adminFetch(url.toString(), {
|
|
26
27
|
method: 'GET',
|
|
27
28
|
headers: {
|
|
28
29
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getTenant(apiKey, baseUrl, idOrSlug) {
|
|
2
3
|
const url = new URL(`/api/tenants/${idOrSlug}`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapTenant(tenant) {
|
|
2
3
|
return {
|
|
3
4
|
id: tenant.id,
|
|
@@ -22,7 +23,7 @@ export async function getTenants(apiKey, baseUrl, params) {
|
|
|
22
23
|
if (params?.offset) {
|
|
23
24
|
url.searchParams.append('offset', params.offset.toString());
|
|
24
25
|
}
|
|
25
|
-
const response = await
|
|
26
|
+
const response = await adminFetch(url.toString(), {
|
|
26
27
|
method: 'GET',
|
|
27
28
|
headers: {
|
|
28
29
|
'X-API-Key': apiKey,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { mapToUnifiedServer } from './unified-mcp-server-mapper.js';
|
|
2
|
+
import { adminFetch } from './admin-fetch.js';
|
|
2
3
|
/**
|
|
3
4
|
* Get a unified MCP server by its slug.
|
|
4
5
|
* This fetches the MCPServer and its associated MCPImplementation data.
|
|
@@ -6,7 +7,7 @@ import { mapToUnifiedServer } from './unified-mcp-server-mapper.js';
|
|
|
6
7
|
export async function getUnifiedMCPServer(apiKey, baseUrl, slug) {
|
|
7
8
|
// First, get the MCPServer to get its ID
|
|
8
9
|
const serverUrl = new URL(`/supervisor/mcp_servers/${slug}`, baseUrl);
|
|
9
|
-
const serverResponse = await
|
|
10
|
+
const serverResponse = await adminFetch(serverUrl.toString(), {
|
|
10
11
|
method: 'GET',
|
|
11
12
|
headers: {
|
|
12
13
|
'X-API-Key': apiKey,
|
|
@@ -33,7 +34,7 @@ export async function getUnifiedMCPServer(apiKey, baseUrl, slug) {
|
|
|
33
34
|
searchUrl.searchParams.append('q', slug);
|
|
34
35
|
searchUrl.searchParams.append('type', 'server');
|
|
35
36
|
searchUrl.searchParams.append('limit', '50');
|
|
36
|
-
const searchResponse = await
|
|
37
|
+
const searchResponse = await adminFetch(searchUrl.toString(), {
|
|
37
38
|
method: 'GET',
|
|
38
39
|
headers: {
|
|
39
40
|
'X-API-Key': apiKey,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { mapToUnifiedServer } from './unified-mcp-server-mapper.js';
|
|
2
|
+
import { adminFetch } from './admin-fetch.js';
|
|
2
3
|
export async function getUnifiedMCPServers(apiKey, baseUrl, params) {
|
|
3
4
|
const url = new URL('/api/implementations/search', baseUrl);
|
|
4
5
|
// Always filter to servers only
|
|
@@ -17,7 +18,7 @@ export async function getUnifiedMCPServers(apiKey, baseUrl, params) {
|
|
|
17
18
|
if (params?.offset) {
|
|
18
19
|
url.searchParams.append('offset', params.offset.toString());
|
|
19
20
|
}
|
|
20
|
-
const response = await
|
|
21
|
+
const response = await adminFetch(url.toString(), {
|
|
21
22
|
method: 'GET',
|
|
22
23
|
headers: {
|
|
23
24
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function getUnofficialMirror(apiKey, baseUrl, id) {
|
|
2
3
|
const url = new URL(`/api/unofficial_mirrors/${id}`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'GET',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapMirror(mirror) {
|
|
2
3
|
return {
|
|
3
4
|
id: mirror.id,
|
|
@@ -29,7 +30,7 @@ export async function getUnofficialMirrors(apiKey, baseUrl, params) {
|
|
|
29
30
|
if (params?.offset) {
|
|
30
31
|
url.searchParams.append('offset', params.offset.toString());
|
|
31
32
|
}
|
|
32
|
-
const response = await
|
|
33
|
+
const response = await adminFetch(url.toString(), {
|
|
33
34
|
method: 'GET',
|
|
34
35
|
headers: {
|
|
35
36
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function markDiscoveredUrlProcessed(apiKey, baseUrl, params) {
|
|
2
3
|
const url = new URL(`/api/discovered_urls/${params.id}/mark_processed`, baseUrl);
|
|
3
4
|
const body = {
|
|
@@ -9,7 +10,7 @@ export async function markDiscoveredUrlProcessed(apiKey, baseUrl, params) {
|
|
|
9
10
|
if (params.mcp_implementation_id !== undefined) {
|
|
10
11
|
body.mcp_implementation_id = params.mcp_implementation_id;
|
|
11
12
|
}
|
|
12
|
-
const response = await
|
|
13
|
+
const response = await adminFetch(url.toString(), {
|
|
13
14
|
method: 'POST',
|
|
14
15
|
headers: {
|
|
15
16
|
'X-API-Key': apiKey,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
2
|
+
export async function recacheMCPServer(apiKey, baseUrl, slug) {
|
|
3
|
+
const url = new URL(`/api/mcp_servers/${encodeURIComponent(slug)}/recache`, baseUrl);
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
5
|
+
method: 'POST',
|
|
6
|
+
headers: {
|
|
7
|
+
'X-API-Key': apiKey,
|
|
8
|
+
Accept: 'application/json',
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
if (!response.ok) {
|
|
12
|
+
if (response.status === 401) {
|
|
13
|
+
throw new Error('Invalid API key');
|
|
14
|
+
}
|
|
15
|
+
if (response.status === 403) {
|
|
16
|
+
throw new Error('User lacks write privileges');
|
|
17
|
+
}
|
|
18
|
+
if (response.status === 404) {
|
|
19
|
+
throw new Error(`MCP server not found: ${slug}`);
|
|
20
|
+
}
|
|
21
|
+
throw new Error(`Failed to recache MCP server: ${response.status} ${response.statusText}`);
|
|
22
|
+
}
|
|
23
|
+
return (await response.json());
|
|
24
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapQueueItem(item) {
|
|
2
3
|
return {
|
|
3
4
|
id: item.id,
|
|
@@ -23,7 +24,7 @@ function mapQueueItem(item) {
|
|
|
23
24
|
}
|
|
24
25
|
export async function rejectOfficialMirrorQueueItem(apiKey, baseUrl, id) {
|
|
25
26
|
const url = new URL(`/api/official_mirror_queues/${id}/reject`, baseUrl);
|
|
26
|
-
const response = await
|
|
27
|
+
const response = await adminFetch(url.toString(), {
|
|
27
28
|
method: 'POST',
|
|
28
29
|
headers: {
|
|
29
30
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function rescheduleGoodJob(apiKey, baseUrl, id, scheduledAt) {
|
|
2
3
|
const url = new URL(`/api/good_jobs/${id}/reschedule`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'POST',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function retryGoodJob(apiKey, baseUrl, id) {
|
|
2
3
|
const url = new URL(`/api/good_jobs/${id}/retry`, baseUrl);
|
|
3
|
-
const response = await
|
|
4
|
+
const response = await adminFetch(url.toString(), {
|
|
4
5
|
method: 'POST',
|
|
5
6
|
headers: {
|
|
6
7
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function runExamForMirror(apiKey, baseUrl, params) {
|
|
2
3
|
const url = new URL('/api/proctor/run_exam_for_mirror', baseUrl);
|
|
3
4
|
const body = {
|
|
@@ -8,7 +9,7 @@ export async function runExamForMirror(apiKey, baseUrl, params) {
|
|
|
8
9
|
if (params.max_retries !== undefined) {
|
|
9
10
|
body.max_retries = params.max_retries;
|
|
10
11
|
}
|
|
11
|
-
const response = await
|
|
12
|
+
const response = await adminFetch(url.toString(), {
|
|
12
13
|
method: 'POST',
|
|
13
14
|
headers: {
|
|
14
15
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function saveMCPImplementation(apiKey, baseUrl, id, params) {
|
|
2
3
|
const url = new URL(`/api/implementations/${id}`, baseUrl);
|
|
3
4
|
// Build form data for the PUT request
|
|
@@ -163,7 +164,7 @@ export async function saveMCPImplementation(apiKey, baseUrl, id, params) {
|
|
|
163
164
|
formData.append('mcp_implementation[canonical_attributes]', '[]');
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
|
-
const response = await
|
|
167
|
+
const response = await adminFetch(url.toString(), {
|
|
167
168
|
method: 'PUT',
|
|
168
169
|
headers: {
|
|
169
170
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function saveResultsForMirror(apiKey, baseUrl, params) {
|
|
2
3
|
const url = new URL('/api/proctor/save_results_for_mirror', baseUrl);
|
|
3
4
|
const body = {
|
|
@@ -11,7 +12,7 @@ export async function saveResultsForMirror(apiKey, baseUrl, params) {
|
|
|
11
12
|
},
|
|
12
13
|
})),
|
|
13
14
|
};
|
|
14
|
-
const response = await
|
|
15
|
+
const response = await adminFetch(url.toString(), {
|
|
15
16
|
method: 'POST',
|
|
16
17
|
headers: {
|
|
17
18
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function searchMCPImplementations(apiKey, baseUrl, params) {
|
|
2
3
|
// Endpoint implemented at: /api/implementations/search
|
|
3
4
|
// Requires admin authentication via X-API-Key header
|
|
@@ -16,7 +17,7 @@ export async function searchMCPImplementations(apiKey, baseUrl, params) {
|
|
|
16
17
|
if (params.offset) {
|
|
17
18
|
url.searchParams.append('offset', params.offset.toString());
|
|
18
19
|
}
|
|
19
|
-
const response = await
|
|
20
|
+
const response = await adminFetch(url.toString(), {
|
|
20
21
|
method: 'GET',
|
|
21
22
|
headers: {
|
|
22
23
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function searchProviders(apiKey, baseUrl, params) {
|
|
2
3
|
// Endpoint implemented at: /api/providers/search
|
|
3
4
|
// Requires admin authentication via X-API-Key header
|
|
@@ -10,7 +11,7 @@ export async function searchProviders(apiKey, baseUrl, params) {
|
|
|
10
11
|
if (params.offset) {
|
|
11
12
|
url.searchParams.append('offset', params.offset.toString());
|
|
12
13
|
}
|
|
13
|
-
const response = await
|
|
14
|
+
const response = await adminFetch(url.toString(), {
|
|
14
15
|
method: 'GET',
|
|
15
16
|
headers: {
|
|
16
17
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
/**
|
|
2
3
|
* Send an email via the PulseMCP Admin API
|
|
3
4
|
*/
|
|
@@ -11,7 +12,7 @@ export async function sendEmail(apiKey, baseUrl, params) {
|
|
|
11
12
|
formData.append('email[to_email_address]', params.to_email_address);
|
|
12
13
|
formData.append('email[subject]', params.subject);
|
|
13
14
|
formData.append('email[content]', params.content);
|
|
14
|
-
const response = await
|
|
15
|
+
const response = await adminFetch(url.toString(), {
|
|
15
16
|
method: 'POST',
|
|
16
17
|
headers: {
|
|
17
18
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
function mapQueueItem(item) {
|
|
2
3
|
return {
|
|
3
4
|
id: item.id,
|
|
@@ -23,7 +24,7 @@ function mapQueueItem(item) {
|
|
|
23
24
|
}
|
|
24
25
|
export async function unlinkOfficialMirrorQueueItem(apiKey, baseUrl, id) {
|
|
25
26
|
const url = new URL(`/api/official_mirror_queues/${id}/unlink`, baseUrl);
|
|
26
|
-
const response = await
|
|
27
|
+
const response = await adminFetch(url.toString(), {
|
|
27
28
|
method: 'POST',
|
|
28
29
|
headers: {
|
|
29
30
|
'X-API-Key': apiKey,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { adminFetch } from './admin-fetch.js';
|
|
1
2
|
export async function updateMcpJson(apiKey, baseUrl, id, params) {
|
|
2
3
|
const url = new URL(`/api/mcp_jsons/${id}`, baseUrl);
|
|
3
4
|
const body = {};
|
|
@@ -13,7 +14,7 @@ export async function updateMcpJson(apiKey, baseUrl, id, params) {
|
|
|
13
14
|
if (params.description !== undefined) {
|
|
14
15
|
body.description = params.description;
|
|
15
16
|
}
|
|
16
|
-
const response = await
|
|
17
|
+
const response = await adminFetch(url.toString(), {
|
|
17
18
|
method: 'PUT',
|
|
18
19
|
headers: {
|
|
19
20
|
'X-API-Key': apiKey,
|