@softeria/ms-365-mcp-server 0.11.4 → 0.12.0
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/.releaserc.json +12 -0
- package/README.md +2 -1
- package/bin/modules/simplified-openapi.mjs +465 -274
- package/dist/auth-tools.js +181 -173
- package/dist/auth.js +402 -415
- package/dist/cli.js +35 -36
- package/dist/generated/client.js +6976 -14312
- package/dist/generated/endpoint-types.js +0 -1
- package/dist/generated/hack.js +39 -33
- package/dist/graph-client.js +426 -473
- package/dist/graph-tools.js +217 -228
- package/dist/index.js +76 -79
- package/dist/lib/microsoft-auth.js +62 -72
- package/dist/logger.js +36 -27
- package/dist/oauth-provider.js +48 -47
- package/dist/server.js +277 -264
- package/dist/version.js +9 -6
- package/package.json +13 -3
- package/tsup.config.ts +30 -0
- package/bin/release.mjs +0 -69
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/generated/hack.js
CHANGED
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
function makeApi(endpoints) {
|
|
3
|
+
return endpoints;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
this.endpoints = baseUrlOrEndpoints.map((endpoint) => {
|
|
11
|
-
endpoint.parameters = endpoint.parameters || [];
|
|
12
|
-
for (const parameter of endpoint.parameters) {
|
|
13
|
-
parameter.name = parameter.name.replace(/[$_]+/g, '');
|
|
14
|
-
}
|
|
15
|
-
const pathParamRegex = /:([a-zA-Z0-9]+)/g;
|
|
16
|
-
const pathParams = [];
|
|
17
|
-
let match;
|
|
18
|
-
while ((match = pathParamRegex.exec(endpoint.path)) !== null) {
|
|
19
|
-
pathParams.push(match[1]);
|
|
20
|
-
}
|
|
21
|
-
for (const pathParam of pathParams) {
|
|
22
|
-
const paramExists = endpoint.parameters.some((param) => param.name === pathParam || param.name === pathParam.replace(/[$_]+/g, ''));
|
|
23
|
-
if (!paramExists) {
|
|
24
|
-
const newParam = {
|
|
25
|
-
name: pathParam,
|
|
26
|
-
type: 'Path',
|
|
27
|
-
schema: z.string().describe(`Path parameter: ${pathParam}`),
|
|
28
|
-
description: `Path parameter: ${pathParam}`,
|
|
29
|
-
};
|
|
30
|
-
endpoint.parameters.push(newParam);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return endpoint;
|
|
34
|
-
});
|
|
5
|
+
class Zodios {
|
|
6
|
+
constructor(baseUrlOrEndpoints, endpoints, options) {
|
|
7
|
+
if (typeof baseUrlOrEndpoints === "string") {
|
|
8
|
+
throw new Error("No such hack");
|
|
35
9
|
}
|
|
10
|
+
this.endpoints = baseUrlOrEndpoints.map((endpoint) => {
|
|
11
|
+
endpoint.parameters = endpoint.parameters || [];
|
|
12
|
+
for (const parameter of endpoint.parameters) {
|
|
13
|
+
parameter.name = parameter.name.replace(/[$_]+/g, "");
|
|
14
|
+
}
|
|
15
|
+
const pathParamRegex = /:([a-zA-Z0-9]+)/g;
|
|
16
|
+
const pathParams = [];
|
|
17
|
+
let match;
|
|
18
|
+
while ((match = pathParamRegex.exec(endpoint.path)) !== null) {
|
|
19
|
+
pathParams.push(match[1]);
|
|
20
|
+
}
|
|
21
|
+
for (const pathParam of pathParams) {
|
|
22
|
+
const paramExists = endpoint.parameters.some(
|
|
23
|
+
(param) => param.name === pathParam || param.name === pathParam.replace(/[$_]+/g, "")
|
|
24
|
+
);
|
|
25
|
+
if (!paramExists) {
|
|
26
|
+
const newParam = {
|
|
27
|
+
name: pathParam,
|
|
28
|
+
type: "Path",
|
|
29
|
+
schema: z.string().describe(`Path parameter: ${pathParam}`),
|
|
30
|
+
description: `Path parameter: ${pathParam}`
|
|
31
|
+
};
|
|
32
|
+
endpoint.parameters.push(newParam);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return endpoint;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
36
38
|
}
|
|
39
|
+
export {
|
|
40
|
+
Zodios,
|
|
41
|
+
makeApi
|
|
42
|
+
};
|