@ductape/mcp 0.1.0 → 0.1.1

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.
@@ -28,13 +28,26 @@ export async function executeViaProxy(publishable_key, module, method, params =
28
28
  }
29
29
  return body.data?.data;
30
30
  }
31
+ export async function getAssetSchemas(module) {
32
+ const path = module ? `/proxy/v1/schema/${encodeURIComponent(module)}` : '/proxy/v1/schema';
33
+ const url = `${API_BASE_URL.replace(/\/$/, '')}${path}`;
34
+ const res = await fetch(url);
35
+ const body = (await res.json());
36
+ if (!res.ok) {
37
+ throw new Error(body.message ?? `Schema request failed: ${res.status}`);
38
+ }
39
+ if (typeof body.status === 'boolean' && !body.status) {
40
+ throw new Error(body.message ?? 'Schema fetch failed');
41
+ }
42
+ return body.data;
43
+ }
31
44
  export async function generateExecutablePayload(request) {
32
45
  const url = `${API_BASE_URL.replace(/\/$/, '')}/integrations/v1/payloads/generate`;
33
46
  const res = await fetch(url, {
34
47
  method: 'POST',
35
48
  headers: {
36
49
  'Content-Type': 'application/json',
37
- 'x-access-key': request.public_key,
50
+ 'x-access-key': request.publishable_key,
38
51
  },
39
52
  body: JSON.stringify(request),
40
53
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server that exposes Ductape SDK operations via the backend proxy",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",