@snokam/mcp-api 0.111.0 → 0.111.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.
- package/dist/index.js +2 -2
- package/dist/openapi-loader.d.ts +5 -4
- package/dist/openapi-loader.js +7 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -111,13 +111,13 @@ const resetUrlToolDef = {
|
|
|
111
111
|
const SWITCH_DOMAIN_TOOL_NAME = "SwitchDomain";
|
|
112
112
|
const switchDomainToolDef = {
|
|
113
113
|
name: SWITCH_DOMAIN_TOOL_NAME,
|
|
114
|
-
description: "Point all Snokam API calls at a specific business's API domain, so the same MCP can serve any tenant. Pass the business's API domain (custom, e.g. api.acme.com, or its snosky fallback, e.g. api.acme.snosky.no); calls then go to {service}.{domain}. Pass an empty string to reset to the
|
|
114
|
+
description: "Point all Snokam API calls at a specific business's API domain, so the same MCP can serve any tenant. Pass the business's API domain (custom, e.g. api.acme.com, or its snosky fallback, e.g. api.acme.snosky.no); calls then go to {service}.{domain}. Pass an empty string to reset to the platform-wide snosky default.",
|
|
115
115
|
inputSchema: {
|
|
116
116
|
type: "object",
|
|
117
117
|
properties: {
|
|
118
118
|
domain: {
|
|
119
119
|
type: "string",
|
|
120
|
-
description: "The business's API base domain (e.g. api.acme.com). Empty string resets to the
|
|
120
|
+
description: "The business's API base domain (e.g. api.acme.com). Empty string resets to the platform-wide snosky default.",
|
|
121
121
|
},
|
|
122
122
|
},
|
|
123
123
|
required: ["domain"],
|
package/dist/openapi-loader.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fetch OpenAPI specs from live Snokam APIs and produce tool definitions.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Backends are reached on the platform-wide snosky domain, which is uniform
|
|
5
|
+
* across every business (no per-customer hostname): `{service}.api.snosky.no`
|
|
6
|
+
* (prod) or `{service}.api.test.snosky.no` (test). A specific business domain
|
|
7
|
+
* can still be targeted at runtime via the SwitchDomain tool. The loader
|
|
8
|
+
* extracts endpoints, parameters, and OAuth scopes for MCP tool metadata.
|
|
8
9
|
*/
|
|
9
10
|
export interface ApiEndpoint {
|
|
10
11
|
service: string;
|
package/dist/openapi-loader.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fetch OpenAPI specs from live Snokam APIs and produce tool definitions.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Backends are reached on the platform-wide snosky domain, which is uniform
|
|
5
|
+
* across every business (no per-customer hostname): `{service}.api.snosky.no`
|
|
6
|
+
* (prod) or `{service}.api.test.snosky.no` (test). A specific business domain
|
|
7
|
+
* can still be targeted at runtime via the SwitchDomain tool. The loader
|
|
8
|
+
* extracts endpoints, parameters, and OAuth scopes for MCP tool metadata.
|
|
8
9
|
*/
|
|
9
10
|
// ---------------------------------------------------------------------------
|
|
10
11
|
// Service discovery - reads from bundled specs directory at runtime
|
|
@@ -30,8 +31,8 @@ async function discoverServices(environment) {
|
|
|
30
31
|
// ---------------------------------------------------------------------------
|
|
31
32
|
// Environment-aware URL resolution
|
|
32
33
|
// ---------------------------------------------------------------------------
|
|
33
|
-
const PROD_DOMAIN = "api.
|
|
34
|
-
const TEST_DOMAIN = "api.test.
|
|
34
|
+
const PROD_DOMAIN = "api.snosky.no";
|
|
35
|
+
const TEST_DOMAIN = "api.test.snosky.no";
|
|
35
36
|
function getBaseDomain(environment) {
|
|
36
37
|
return environment === "test" ? TEST_DOMAIN : PROD_DOMAIN;
|
|
37
38
|
}
|