@softeria/ms-365-mcp-server 0.124.1 ā 0.125.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/bin/generate-graph-client.mjs +44 -23
- package/bin/modules/download-openapi.mjs +5 -0
- package/bin/modules/generate-mcp-tools.mjs +10 -7
- package/bin/modules/simplified-openapi.mjs +11 -2
- package/dist/__tests__/graph-tools.test.js +1 -0
- package/dist/auth.js +16 -1
- package/dist/endpoints.json +9 -0
- package/dist/generated/client-beta.js +776 -0
- package/dist/graph-client.js +2 -1
- package/dist/graph-tools.js +19 -5
- package/package.json +1 -1
- package/src/endpoints.json +9 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
|
-
import { downloadGraphOpenAPI } from './modules/download-openapi.mjs';
|
|
5
|
+
import { downloadGraphOpenAPI, BETA_OPENAPI_URL } from './modules/download-openapi.mjs';
|
|
6
6
|
import { generateMcpTools } from './modules/generate-mcp-tools.mjs';
|
|
7
7
|
import { createAndSaveSimplifiedOpenAPI } from './modules/simplified-openapi.mjs';
|
|
8
8
|
|
|
@@ -12,12 +12,29 @@ const rootDir = path.resolve(__dirname, '..');
|
|
|
12
12
|
const openapiDir = path.join(rootDir, 'openapi');
|
|
13
13
|
const srcDir = path.join(rootDir, 'src');
|
|
14
14
|
|
|
15
|
-
const openapiFile = path.join(openapiDir, 'openapi.yaml');
|
|
16
|
-
const openapiTrimmedFile = path.join(openapiDir, 'openapi-trimmed.yaml');
|
|
17
15
|
const endpointsFile = path.join(srcDir, 'endpoints.json');
|
|
18
|
-
|
|
19
16
|
const generatedDir = path.join(srcDir, 'generated');
|
|
20
17
|
|
|
18
|
+
// One generation target per Graph API version. Each downloads its own spec, trims it
|
|
19
|
+
// against the endpoints declaring that version, and emits its own client module. The
|
|
20
|
+
// runtime selects the URL prefix per endpoint, so the clients stay independent.
|
|
21
|
+
const targets = [
|
|
22
|
+
{
|
|
23
|
+
version: 'v1.0',
|
|
24
|
+
url: undefined, // download-openapi defaults to the v1.0 spec
|
|
25
|
+
specFile: path.join(openapiDir, 'openapi.yaml'),
|
|
26
|
+
trimmedFile: path.join(openapiDir, 'openapi-trimmed.yaml'),
|
|
27
|
+
clientFile: path.join(generatedDir, 'client.ts'),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
version: 'beta',
|
|
31
|
+
url: BETA_OPENAPI_URL,
|
|
32
|
+
specFile: path.join(openapiDir, 'openapi-beta.yaml'),
|
|
33
|
+
trimmedFile: path.join(openapiDir, 'openapi-trimmed-beta.yaml'),
|
|
34
|
+
clientFile: path.join(generatedDir, 'client-beta.ts'),
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
|
|
21
38
|
const args = process.argv.slice(2);
|
|
22
39
|
const forceDownload = args.includes('--force');
|
|
23
40
|
|
|
@@ -26,27 +43,31 @@ async function main() {
|
|
|
26
43
|
console.log('------------------------------------');
|
|
27
44
|
|
|
28
45
|
try {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
openapiDir,
|
|
32
|
-
openapiFile,
|
|
33
|
-
undefined,
|
|
34
|
-
forceDownload
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
if (downloaded) {
|
|
38
|
-
console.log('\nā
OpenAPI specification successfully downloaded');
|
|
39
|
-
} else {
|
|
40
|
-
console.log('\nāļø Download skipped (file exists)');
|
|
41
|
-
}
|
|
46
|
+
for (const target of targets) {
|
|
47
|
+
console.log(`\n=== Graph ${target.version} ===`);
|
|
42
48
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
console.log(`š„ Step 1: Downloading ${target.version} OpenAPI specification`);
|
|
50
|
+
const downloaded = await downloadGraphOpenAPI(
|
|
51
|
+
openapiDir,
|
|
52
|
+
target.specFile,
|
|
53
|
+
target.url,
|
|
54
|
+
forceDownload
|
|
55
|
+
);
|
|
56
|
+
console.log(downloaded ? 'ā
Downloaded' : 'āļø Download skipped (file exists)');
|
|
46
57
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
console.log('š§ Step 2: Creating simplified OpenAPI specification');
|
|
59
|
+
createAndSaveSimplifiedOpenAPI(
|
|
60
|
+
endpointsFile,
|
|
61
|
+
target.specFile,
|
|
62
|
+
target.trimmedFile,
|
|
63
|
+
target.version
|
|
64
|
+
);
|
|
65
|
+
console.log('ā
Successfully created simplified OpenAPI specification');
|
|
66
|
+
|
|
67
|
+
console.log('š Step 3: Generating client code using openapi-zod-client');
|
|
68
|
+
generateMcpTools(target.trimmedFile, target.clientFile);
|
|
69
|
+
console.log('ā
Successfully generated client code');
|
|
70
|
+
}
|
|
50
71
|
} catch (error) {
|
|
51
72
|
console.error('\nā Error processing OpenAPI specification:', error.message);
|
|
52
73
|
process.exit(1);
|
|
@@ -3,6 +3,11 @@ import fs from 'fs';
|
|
|
3
3
|
const DEFAULT_OPENAPI_URL =
|
|
4
4
|
'https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/refs/heads/master/openapi/v1.0/openapi.yaml';
|
|
5
5
|
|
|
6
|
+
// Microsoft publishes a parallel /beta OpenAPI spec at the same path root. Endpoints
|
|
7
|
+
// flagged "apiVersion": "beta" in endpoints.json are generated from this spec instead.
|
|
8
|
+
export const BETA_OPENAPI_URL =
|
|
9
|
+
'https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/refs/heads/master/openapi/beta/openapi.yaml';
|
|
10
|
+
|
|
6
11
|
export async function downloadGraphOpenAPI(
|
|
7
12
|
targetDir,
|
|
8
13
|
targetFile,
|
|
@@ -2,20 +2,18 @@ import fs from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { execSync } from 'child_process';
|
|
4
4
|
|
|
5
|
-
export function generateMcpTools(
|
|
5
|
+
export function generateMcpTools(openapiTrimmedFile, clientFilePath) {
|
|
6
6
|
try {
|
|
7
|
-
console.log(
|
|
7
|
+
console.log(
|
|
8
|
+
`Generating ${path.basename(clientFilePath)} from ${path.basename(openapiTrimmedFile)} using openapi-zod-client...`
|
|
9
|
+
);
|
|
8
10
|
|
|
11
|
+
const outputDir = path.dirname(clientFilePath);
|
|
9
12
|
if (!fs.existsSync(outputDir)) {
|
|
10
13
|
fs.mkdirSync(outputDir, { recursive: true });
|
|
11
14
|
console.log(`Created directory: ${outputDir}`);
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
const rootDir = path.resolve(outputDir, '../..');
|
|
15
|
-
const openapiDir = path.join(rootDir, 'openapi');
|
|
16
|
-
const openapiTrimmedFile = path.join(openapiDir, 'openapi-trimmed.yaml');
|
|
17
|
-
|
|
18
|
-
const clientFilePath = path.join(outputDir, 'client.ts');
|
|
19
17
|
execSync(
|
|
20
18
|
`npx -y openapi-zod-client "${openapiTrimmedFile}" -o "${clientFilePath}" --with-description --strict-objects --additional-props-default-value=false`,
|
|
21
19
|
{
|
|
@@ -60,6 +58,11 @@ export function generateMcpTools(openApiSpec, outputDir) {
|
|
|
60
58
|
|
|
61
59
|
fs.writeFileSync(clientFilePath, clientCode);
|
|
62
60
|
|
|
61
|
+
// Format the generated client so `npm run generate` output is prettier-stable and
|
|
62
|
+
// the format:check step in `npm run verify` passes deterministically across versions.
|
|
63
|
+
console.log('Formatting generated client with Prettier...');
|
|
64
|
+
execSync(`npx prettier --write "${clientFilePath}"`, { stdio: 'inherit' });
|
|
65
|
+
|
|
63
66
|
return true;
|
|
64
67
|
} catch (error) {
|
|
65
68
|
throw new Error(`Error generating client code: ${error.message}`);
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import yaml from 'js-yaml';
|
|
3
3
|
|
|
4
|
-
export function createAndSaveSimplifiedOpenAPI(
|
|
4
|
+
export function createAndSaveSimplifiedOpenAPI(
|
|
5
|
+
endpointsFile,
|
|
6
|
+
openapiFile,
|
|
7
|
+
openapiTrimmedFile,
|
|
8
|
+
apiVersion = 'v1.0'
|
|
9
|
+
) {
|
|
5
10
|
const allEndpoints = JSON.parse(fs.readFileSync(endpointsFile, 'utf8'));
|
|
6
|
-
|
|
11
|
+
// Each spec is trimmed against only the endpoints targeting its version. Entries
|
|
12
|
+
// without an explicit apiVersion default to v1.0, so existing endpoints are unchanged.
|
|
13
|
+
const endpoints = allEndpoints.filter(
|
|
14
|
+
(endpoint) => !endpoint.disabled && (endpoint.apiVersion ?? 'v1.0') === apiVersion
|
|
15
|
+
);
|
|
7
16
|
|
|
8
17
|
const spec = fs.readFileSync(openapiFile, 'utf8');
|
|
9
18
|
const openApiSpec = yaml.load(spec);
|
package/dist/auth.js
CHANGED
|
@@ -91,6 +91,19 @@ function getMissingAllowedScopesForGroups(scopeGroups, allowedScopes) {
|
|
|
91
91
|
}
|
|
92
92
|
return closest ?? [];
|
|
93
93
|
}
|
|
94
|
+
function getEndpointEffectiveLoginScopes(scopeGroups, allowedScopes) {
|
|
95
|
+
if (scopeGroups.length === 0) {
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
if (allowedScopes === void 0) {
|
|
99
|
+
return scopeGroups[0];
|
|
100
|
+
}
|
|
101
|
+
const coveredAllowedScopes = new Set(collapseScopeHierarchy(allowedScopes));
|
|
102
|
+
const satisfied = scopeGroups.find(
|
|
103
|
+
(group) => group.every((scope) => coveredAllowedScopes.has(scope))
|
|
104
|
+
);
|
|
105
|
+
return satisfied ?? [];
|
|
106
|
+
}
|
|
94
107
|
function collapseRedundantScopes(scopes) {
|
|
95
108
|
const scopesSet = new Set(scopes);
|
|
96
109
|
Object.entries(SCOPE_HIERARCHY).forEach(([higherScope, lowerScopes]) => {
|
|
@@ -231,7 +244,9 @@ function buildAllowedScopeDiagnostics(options = {}) {
|
|
|
231
244
|
});
|
|
232
245
|
continue;
|
|
233
246
|
}
|
|
234
|
-
|
|
247
|
+
getEndpointEffectiveLoginScopes(scopeGroups, allowedScopes).forEach(
|
|
248
|
+
(scope) => effectiveToolScopes.add(scope)
|
|
249
|
+
);
|
|
235
250
|
allScopes.forEach((scope) => effectiveToolScopesAllGroups.add(scope));
|
|
236
251
|
}
|
|
237
252
|
const toolPermissions = collapseRedundantScopes(Array.from(normalToolScopes)).sort(
|
package/dist/endpoints.json
CHANGED
|
@@ -1211,6 +1211,15 @@
|
|
|
1211
1211
|
"presets": ["personal", "users", "work"],
|
|
1212
1212
|
"scopes": ["User.Read"]
|
|
1213
1213
|
},
|
|
1214
|
+
{
|
|
1215
|
+
"pathPattern": "/me/profile",
|
|
1216
|
+
"method": "get",
|
|
1217
|
+
"toolName": "get-my-profile",
|
|
1218
|
+
"apiVersion": "beta",
|
|
1219
|
+
"presets": ["personal", "users", "work"],
|
|
1220
|
+
"scopes": ["User.Read"],
|
|
1221
|
+
"llmTip": "Retrieves the signed-in user's rich profile - a richer object than get-current-user, exposing relationships like skills, projects, languages, education and work positions. Use $expand to pull related collections (e.g. $expand=skills,projects)."
|
|
1222
|
+
},
|
|
1214
1223
|
{
|
|
1215
1224
|
"pathPattern": "/me/mailboxSettings",
|
|
1216
1225
|
"method": "get",
|
|
@@ -0,0 +1,776 @@
|
|
|
1
|
+
import { makeApi, Zodios } from "./hack.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const microsoft_graph_allowedAudiences = z.enum([
|
|
4
|
+
"me",
|
|
5
|
+
"family",
|
|
6
|
+
"contacts",
|
|
7
|
+
"groupMembers",
|
|
8
|
+
"organization",
|
|
9
|
+
"federatedOrganizations",
|
|
10
|
+
"everyone",
|
|
11
|
+
"unknownFutureValue"
|
|
12
|
+
]);
|
|
13
|
+
const microsoft_graph_identity = z.object({
|
|
14
|
+
displayName: z.string().describe(
|
|
15
|
+
"The display name of the identity. For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta."
|
|
16
|
+
).nullish(),
|
|
17
|
+
id: z.string().describe(
|
|
18
|
+
"Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review."
|
|
19
|
+
).nullish()
|
|
20
|
+
}).passthrough();
|
|
21
|
+
const microsoft_graph_identitySet = z.object({
|
|
22
|
+
application: microsoft_graph_identity.optional(),
|
|
23
|
+
device: microsoft_graph_identity.optional(),
|
|
24
|
+
user: microsoft_graph_identity.optional()
|
|
25
|
+
}).passthrough();
|
|
26
|
+
const microsoft_graph_inferenceData = z.object({
|
|
27
|
+
confidenceScore: z.number().describe(
|
|
28
|
+
"Confidence score reflecting the accuracy of the data inferred about the user. [Simplified from 3 options]"
|
|
29
|
+
).nullish(),
|
|
30
|
+
userHasVerifiedAccuracy: z.boolean().describe("Records if the user has confirmed this inference as being True or False.").nullish()
|
|
31
|
+
}).passthrough();
|
|
32
|
+
const microsoft_graph_personDataSources = z.object({ type: z.array(z.string().nullable()).optional() }).passthrough();
|
|
33
|
+
const microsoft_graph_profileSourceAnnotation = z.object({
|
|
34
|
+
isDefaultSource: z.boolean().describe("Indicates whether the source is the default one.").nullish(),
|
|
35
|
+
properties: z.array(z.string().nullable()).describe("Names of properties that have data from this source.").optional(),
|
|
36
|
+
sourceId: z.string().nullish()
|
|
37
|
+
}).passthrough();
|
|
38
|
+
const microsoft_graph_originTenantInfo = z.object({
|
|
39
|
+
originTenantId: z.string().describe("The identifier of the tenant where the user account was originally provisioned.").nullish(),
|
|
40
|
+
originUserId: z.string().describe("The identifier of the user in the origin tenant.").nullish()
|
|
41
|
+
}).passthrough();
|
|
42
|
+
const microsoft_graph_localeInfo = z.object({
|
|
43
|
+
displayName: z.string().describe(
|
|
44
|
+
"A name representing the user's locale in natural language, for example, 'English (United States)'."
|
|
45
|
+
).nullish(),
|
|
46
|
+
locale: z.string().describe(
|
|
47
|
+
"A locale representation for the user, which includes the user's preferred language and country/region. For example, 'en-us'. The language component follows 2-letter codes as defined in ISO 639-1, and the country component follows 2-letter codes as defined in ISO 3166-1 alpha-2."
|
|
48
|
+
).nullish()
|
|
49
|
+
}).passthrough();
|
|
50
|
+
const microsoft_graph_userPersona = z.enum([
|
|
51
|
+
"unknown",
|
|
52
|
+
"externalMember",
|
|
53
|
+
"externalGuest",
|
|
54
|
+
"internalMember",
|
|
55
|
+
"internalGuest",
|
|
56
|
+
"unknownFutureValue"
|
|
57
|
+
]);
|
|
58
|
+
const microsoft_graph_userAccountInformation = z.object({
|
|
59
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
60
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
61
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
62
|
+
createdDateTime: z.string().regex(
|
|
63
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
64
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
65
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
66
|
+
isSearchable: z.boolean().nullish(),
|
|
67
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
68
|
+
lastModifiedDateTime: z.string().regex(
|
|
69
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
70
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
71
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
72
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
73
|
+
ageGroup: z.string().describe(
|
|
74
|
+
"Shows the age group of user. Allowed values null, minor, notAdult and adult are generated by the directory and can't be changed."
|
|
75
|
+
).nullish(),
|
|
76
|
+
countryCode: z.string().describe("Contains the two-character country code associated with the users' account.").nullish(),
|
|
77
|
+
originTenantInfo: microsoft_graph_originTenantInfo.optional(),
|
|
78
|
+
preferredLanguageTag: microsoft_graph_localeInfo.optional(),
|
|
79
|
+
userPersona: microsoft_graph_userPersona.optional(),
|
|
80
|
+
userPrincipalName: z.string().describe("The user principal name (UPN) of the user associated with the account.").nullish()
|
|
81
|
+
}).passthrough();
|
|
82
|
+
const microsoft_graph_physicalAddressType = z.enum(["unknown", "home", "business", "other"]);
|
|
83
|
+
const microsoft_graph_physicalAddress = z.object({
|
|
84
|
+
city: z.string().describe("The city.").nullish(),
|
|
85
|
+
countryOrRegion: z.string().describe(
|
|
86
|
+
"The country or region. It's a free-format string value, for example, 'United States'."
|
|
87
|
+
).nullish(),
|
|
88
|
+
postalCode: z.string().describe("The postal code.").nullish(),
|
|
89
|
+
postOfficeBox: z.string().describe("The post office box number.").nullish(),
|
|
90
|
+
state: z.string().describe("The state.").nullish(),
|
|
91
|
+
street: z.string().describe("The street.").nullish(),
|
|
92
|
+
type: microsoft_graph_physicalAddressType.optional()
|
|
93
|
+
}).passthrough();
|
|
94
|
+
const microsoft_graph_geoCoordinates = z.object({
|
|
95
|
+
altitude: z.number().describe(
|
|
96
|
+
"Optional. The altitude (height), in feet, above sea level for the item. Read-only. [Simplified from 3 options]"
|
|
97
|
+
).nullish(),
|
|
98
|
+
latitude: z.number().describe(
|
|
99
|
+
"Optional. The latitude, in decimal, for the item. Writable on OneDrive Personal. [Simplified from 3 options]"
|
|
100
|
+
).nullish(),
|
|
101
|
+
longitude: z.number().describe(
|
|
102
|
+
"Optional. The longitude, in decimal, for the item. Writable on OneDrive Personal. [Simplified from 3 options]"
|
|
103
|
+
).nullish()
|
|
104
|
+
}).passthrough();
|
|
105
|
+
const microsoft_graph_itemAddress = z.object({
|
|
106
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
107
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
108
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
109
|
+
createdDateTime: z.string().regex(
|
|
110
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
111
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
112
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
113
|
+
isSearchable: z.boolean().nullish(),
|
|
114
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
115
|
+
lastModifiedDateTime: z.string().regex(
|
|
116
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
117
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
118
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
119
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
120
|
+
detail: microsoft_graph_physicalAddress.optional(),
|
|
121
|
+
displayName: z.string().describe("Friendly name the user has assigned to this address.").nullish(),
|
|
122
|
+
geoCoordinates: microsoft_graph_geoCoordinates.optional()
|
|
123
|
+
}).passthrough();
|
|
124
|
+
const microsoft_graph_personAnnualEventType = z.enum([
|
|
125
|
+
"birthday",
|
|
126
|
+
"wedding",
|
|
127
|
+
"work",
|
|
128
|
+
"other",
|
|
129
|
+
"unknownFutureValue"
|
|
130
|
+
]);
|
|
131
|
+
const microsoft_graph_personAnnualEvent = z.object({
|
|
132
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
133
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
134
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
135
|
+
createdDateTime: z.string().regex(
|
|
136
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
137
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
138
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
139
|
+
isSearchable: z.boolean().nullish(),
|
|
140
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
141
|
+
lastModifiedDateTime: z.string().regex(
|
|
142
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
143
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
144
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
145
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
146
|
+
date: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).nullish(),
|
|
147
|
+
displayName: z.string().nullish(),
|
|
148
|
+
type: microsoft_graph_personAnnualEventType.optional()
|
|
149
|
+
}).passthrough();
|
|
150
|
+
const microsoft_graph_personAward = z.object({
|
|
151
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
152
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
153
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
154
|
+
createdDateTime: z.string().regex(
|
|
155
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
156
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
157
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
158
|
+
isSearchable: z.boolean().nullish(),
|
|
159
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
160
|
+
lastModifiedDateTime: z.string().regex(
|
|
161
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
162
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
163
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
164
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
165
|
+
description: z.string().describe("Descpription of the award or honor.").nullish(),
|
|
166
|
+
displayName: z.string().describe("Name of the award or honor.").nullish(),
|
|
167
|
+
issuedDate: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The date that the award or honor was granted.").nullish(),
|
|
168
|
+
issuingAuthority: z.string().describe("Authority which granted the award or honor.").nullish(),
|
|
169
|
+
thumbnailUrl: z.string().describe("URL referencing a thumbnail of the award or honor.").nullish(),
|
|
170
|
+
webUrl: z.string().describe("URL referencing the award or honor.").nullish()
|
|
171
|
+
}).passthrough();
|
|
172
|
+
const microsoft_graph_personCertification = z.object({
|
|
173
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
174
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
175
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
176
|
+
createdDateTime: z.string().regex(
|
|
177
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
178
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
179
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
180
|
+
isSearchable: z.boolean().nullish(),
|
|
181
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
182
|
+
lastModifiedDateTime: z.string().regex(
|
|
183
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
184
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
185
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
186
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
187
|
+
certificationId: z.string().describe("The referenceable identifier for the certification.").nullish(),
|
|
188
|
+
description: z.string().describe("Description of the certification.").nullish(),
|
|
189
|
+
displayName: z.string().describe("Title of the certification.").nullish(),
|
|
190
|
+
endDate: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The date that the certification expires.").nullish(),
|
|
191
|
+
issuedDate: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The date that the certification was issued.").nullish(),
|
|
192
|
+
issuingAuthority: z.string().describe("Authority which granted the certification.").nullish(),
|
|
193
|
+
issuingCompany: z.string().describe("Company which granted the certification.").nullish(),
|
|
194
|
+
startDate: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The date that the certification became valid.").nullish(),
|
|
195
|
+
thumbnailUrl: z.string().describe("URL referencing a thumbnail of the certification.").nullish(),
|
|
196
|
+
webUrl: z.string().describe("URL referencing the certification.").nullish()
|
|
197
|
+
}).passthrough();
|
|
198
|
+
const microsoft_graph_institutionData = z.object({
|
|
199
|
+
description: z.string().describe("Short description of the institution the user studied at.").nullish(),
|
|
200
|
+
displayName: z.string().describe("Name of the institution the user studied at.").nullish(),
|
|
201
|
+
location: microsoft_graph_physicalAddress.optional(),
|
|
202
|
+
webUrl: z.string().describe("Link to the institution or department homepage.").nullish()
|
|
203
|
+
}).passthrough();
|
|
204
|
+
const microsoft_graph_educationalActivityDetail = z.object({
|
|
205
|
+
abbreviation: z.string().describe("Shortened name of the degree or program, for example, PhD and MBA.").nullish(),
|
|
206
|
+
activities: z.array(z.string().nullable()).describe("Extracurricular activities undertaken alongside the program.").optional(),
|
|
207
|
+
awards: z.array(z.string().nullable()).describe("Any awards or honors associated with the program.").optional(),
|
|
208
|
+
description: z.string().describe("Short description of the program provided by the user.").nullish(),
|
|
209
|
+
displayName: z.string().describe("Long-form name of the program that the user provided.").nullish(),
|
|
210
|
+
fieldsOfStudy: z.array(z.string().nullable()).describe("Majors and minors associated with the program, if applicable.").optional(),
|
|
211
|
+
grade: z.string().describe("The final grade, class, grade point average (GPA), or score.").nullish(),
|
|
212
|
+
notes: z.string().describe("More notes provided by the user.").nullish(),
|
|
213
|
+
webUrl: z.string().describe("Link to the degree or program page.").nullish()
|
|
214
|
+
}).passthrough();
|
|
215
|
+
const microsoft_graph_educationalActivity = z.object({
|
|
216
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
217
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
218
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
219
|
+
createdDateTime: z.string().regex(
|
|
220
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
221
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
222
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
223
|
+
isSearchable: z.boolean().nullish(),
|
|
224
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
225
|
+
lastModifiedDateTime: z.string().regex(
|
|
226
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
227
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
228
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
229
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
230
|
+
completionMonthYear: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The month and year the user graduated or completed the activity.").nullish(),
|
|
231
|
+
endMonthYear: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The month and year the user completed the educational activity referenced.").nullish(),
|
|
232
|
+
institution: microsoft_graph_institutionData.optional(),
|
|
233
|
+
program: microsoft_graph_educationalActivityDetail.optional(),
|
|
234
|
+
startMonthYear: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The month and year the user commenced the activity referenced.").nullish()
|
|
235
|
+
}).passthrough();
|
|
236
|
+
const microsoft_graph_emailType = z.enum(["unknown", "work", "personal", "main", "other"]);
|
|
237
|
+
const microsoft_graph_itemEmail = z.object({
|
|
238
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
239
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
240
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
241
|
+
createdDateTime: z.string().regex(
|
|
242
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
243
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
244
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
245
|
+
isSearchable: z.boolean().nullish(),
|
|
246
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
247
|
+
lastModifiedDateTime: z.string().regex(
|
|
248
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
249
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
250
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
251
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
252
|
+
address: z.string().describe("The email address itself.").nullish(),
|
|
253
|
+
displayName: z.string().describe("The name or label a user has associated with a particular email address.").nullish(),
|
|
254
|
+
type: microsoft_graph_emailType.optional()
|
|
255
|
+
}).passthrough();
|
|
256
|
+
const microsoft_graph_personInterest = z.object({
|
|
257
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
258
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
259
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
260
|
+
createdDateTime: z.string().regex(
|
|
261
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
262
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
263
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
264
|
+
isSearchable: z.boolean().nullish(),
|
|
265
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
266
|
+
lastModifiedDateTime: z.string().regex(
|
|
267
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
268
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
269
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
270
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
271
|
+
categories: z.array(z.string().nullable()).describe(
|
|
272
|
+
"Contains categories a user has associated with the interest (for example, personal, recipies)."
|
|
273
|
+
).optional(),
|
|
274
|
+
collaborationTags: z.array(z.string().nullable()).describe(
|
|
275
|
+
"Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove."
|
|
276
|
+
).optional(),
|
|
277
|
+
description: z.string().describe("Contains a description of the interest.").nullish(),
|
|
278
|
+
displayName: z.string().describe("Contains a friendly name for the interest.").nullish(),
|
|
279
|
+
thumbnailUrl: z.string().nullish(),
|
|
280
|
+
webUrl: z.string().describe("Contains a link to a web page or resource about the interest.").nullish()
|
|
281
|
+
}).passthrough();
|
|
282
|
+
const microsoft_graph_languageProficiencyLevel = z.enum([
|
|
283
|
+
"elementary",
|
|
284
|
+
"conversational",
|
|
285
|
+
"limitedWorking",
|
|
286
|
+
"professionalWorking",
|
|
287
|
+
"fullProfessional",
|
|
288
|
+
"nativeOrBilingual",
|
|
289
|
+
"unknownFutureValue"
|
|
290
|
+
]);
|
|
291
|
+
const microsoft_graph_languageProficiency = z.object({
|
|
292
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
293
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
294
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
295
|
+
createdDateTime: z.string().regex(
|
|
296
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
297
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
298
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
299
|
+
isSearchable: z.boolean().nullish(),
|
|
300
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
301
|
+
lastModifiedDateTime: z.string().regex(
|
|
302
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
303
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
304
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
305
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
306
|
+
displayName: z.string().describe("Contains the long-form name for the language.").nullish(),
|
|
307
|
+
proficiency: microsoft_graph_languageProficiencyLevel.optional(),
|
|
308
|
+
reading: microsoft_graph_languageProficiencyLevel.optional(),
|
|
309
|
+
spoken: microsoft_graph_languageProficiencyLevel.optional(),
|
|
310
|
+
tag: z.string().describe("Contains the four-character BCP47 name for the language (en-US, no-NB, en-AU).").nullish(),
|
|
311
|
+
thumbnailUrl: z.string().nullish(),
|
|
312
|
+
written: microsoft_graph_languageProficiencyLevel.optional()
|
|
313
|
+
}).passthrough();
|
|
314
|
+
const microsoft_graph_personNamePronounciation = z.object({
|
|
315
|
+
displayName: z.string().nullish(),
|
|
316
|
+
first: z.string().nullish(),
|
|
317
|
+
last: z.string().nullish(),
|
|
318
|
+
maiden: z.string().nullish(),
|
|
319
|
+
middle: z.string().nullish()
|
|
320
|
+
}).passthrough();
|
|
321
|
+
const microsoft_graph_personName = z.object({
|
|
322
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
323
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
324
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
325
|
+
createdDateTime: z.string().regex(
|
|
326
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
327
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
328
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
329
|
+
isSearchable: z.boolean().nullish(),
|
|
330
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
331
|
+
lastModifiedDateTime: z.string().regex(
|
|
332
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
333
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
334
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
335
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
336
|
+
displayName: z.string().describe(
|
|
337
|
+
"Provides an ordered rendering of firstName and lastName depending on the locale of the user or their device."
|
|
338
|
+
).nullish(),
|
|
339
|
+
first: z.string().describe("First name of the user.").nullish(),
|
|
340
|
+
initials: z.string().describe("Initials of the user.").nullish(),
|
|
341
|
+
languageTag: z.string().describe(
|
|
342
|
+
"Contains the name for the language (en-US, no-NB, en-AU) following IETF BCP47 format."
|
|
343
|
+
).nullish(),
|
|
344
|
+
last: z.string().describe("Last name of the user.").nullish(),
|
|
345
|
+
maiden: z.string().describe("Maiden name of the user.").nullish(),
|
|
346
|
+
middle: z.string().describe("Middle name of the user.").nullish(),
|
|
347
|
+
nickname: z.string().describe("Nickname of the user.").nullish(),
|
|
348
|
+
pronunciation: microsoft_graph_personNamePronounciation.optional(),
|
|
349
|
+
suffix: z.string().describe("Designators used after the users name (eg: PhD.)").nullish(),
|
|
350
|
+
title: z.string().describe("Honorifics used to prefix a users name (eg: Dr, Sir, Madam, Mrs.)").nullish()
|
|
351
|
+
}).passthrough();
|
|
352
|
+
const microsoft_graph_bodyType = z.enum(["text", "html"]);
|
|
353
|
+
const microsoft_graph_itemBody = z.object({
|
|
354
|
+
content: z.string().describe("The content of the item.").nullish(),
|
|
355
|
+
contentType: microsoft_graph_bodyType.optional()
|
|
356
|
+
}).passthrough();
|
|
357
|
+
const microsoft_graph_personAnnotation = z.object({
|
|
358
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
359
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
360
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
361
|
+
createdDateTime: z.string().regex(
|
|
362
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
363
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
364
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
365
|
+
isSearchable: z.boolean().nullish(),
|
|
366
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
367
|
+
lastModifiedDateTime: z.string().regex(
|
|
368
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
369
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
370
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
371
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
372
|
+
detail: microsoft_graph_itemBody.optional(),
|
|
373
|
+
displayName: z.string().describe("Contains a friendly name for the note.").nullish(),
|
|
374
|
+
thumbnailUrl: z.string().nullish()
|
|
375
|
+
}).passthrough();
|
|
376
|
+
const microsoft_graph_itemPatent = z.object({
|
|
377
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
378
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
379
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
380
|
+
createdDateTime: z.string().regex(
|
|
381
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
382
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
383
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
384
|
+
isSearchable: z.boolean().nullish(),
|
|
385
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
386
|
+
lastModifiedDateTime: z.string().regex(
|
|
387
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
388
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
389
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
390
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
391
|
+
description: z.string().describe("Descpription of the patent or filing.").nullish(),
|
|
392
|
+
displayName: z.string().describe("Title of the patent or filing.").nullish(),
|
|
393
|
+
isPending: z.boolean().describe("Indicates the patent is pending.").nullish(),
|
|
394
|
+
issuedDate: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The date that the patent was granted.").nullish(),
|
|
395
|
+
issuingAuthority: z.string().describe("Authority that granted the patent.").nullish(),
|
|
396
|
+
number: z.string().describe("The patent number.").nullish(),
|
|
397
|
+
webUrl: z.string().describe("URL referencing the patent or filing.").nullish()
|
|
398
|
+
}).passthrough();
|
|
399
|
+
const microsoft_graph_phoneType = z.enum([
|
|
400
|
+
"home",
|
|
401
|
+
"business",
|
|
402
|
+
"mobile",
|
|
403
|
+
"other",
|
|
404
|
+
"assistant",
|
|
405
|
+
"homeFax",
|
|
406
|
+
"businessFax",
|
|
407
|
+
"otherFax",
|
|
408
|
+
"pager",
|
|
409
|
+
"radio"
|
|
410
|
+
]);
|
|
411
|
+
const microsoft_graph_itemPhone = z.object({
|
|
412
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
413
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
414
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
415
|
+
createdDateTime: z.string().regex(
|
|
416
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
417
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
418
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
419
|
+
isSearchable: z.boolean().nullish(),
|
|
420
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
421
|
+
lastModifiedDateTime: z.string().regex(
|
|
422
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
423
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
424
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
425
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
426
|
+
displayName: z.string().describe("Friendly name the user has assigned this phone number.").nullish(),
|
|
427
|
+
number: z.string().describe("Phone number provided by the user.").nullish(),
|
|
428
|
+
type: microsoft_graph_phoneType.optional()
|
|
429
|
+
}).passthrough();
|
|
430
|
+
const microsoft_graph_personRelationship = z.enum([
|
|
431
|
+
"manager",
|
|
432
|
+
"colleague",
|
|
433
|
+
"directReport",
|
|
434
|
+
"dotLineReport",
|
|
435
|
+
"assistant",
|
|
436
|
+
"dotLineManager",
|
|
437
|
+
"alternateContact",
|
|
438
|
+
"friend",
|
|
439
|
+
"spouse",
|
|
440
|
+
"sibling",
|
|
441
|
+
"child",
|
|
442
|
+
"parent",
|
|
443
|
+
"sponsor",
|
|
444
|
+
"emergencyContact",
|
|
445
|
+
"other",
|
|
446
|
+
"unknownFutureValue"
|
|
447
|
+
]);
|
|
448
|
+
const microsoft_graph_relatedPerson = z.object({
|
|
449
|
+
displayName: z.string().describe("Name of the person.").nullish(),
|
|
450
|
+
relationship: microsoft_graph_personRelationship.optional(),
|
|
451
|
+
userId: z.string().describe("The user's directory object ID (Microsoft Entra ID or CID).").nullish(),
|
|
452
|
+
userPrincipalName: z.string().describe("Email address or reference to person within the organization.").nullish()
|
|
453
|
+
}).passthrough();
|
|
454
|
+
const microsoft_graph_companyDetail = z.object({
|
|
455
|
+
address: microsoft_graph_physicalAddress.optional(),
|
|
456
|
+
companyCode: z.string().describe(
|
|
457
|
+
"Legal entity number of the company or its subdivision. For information on how to set the value for the companyCode, see profileSourceAnnotation."
|
|
458
|
+
).nullish(),
|
|
459
|
+
costCenter: z.string().describe("The cost center associated with the company or department.").nullish(),
|
|
460
|
+
department: z.string().describe("Department Name within a company.").nullish(),
|
|
461
|
+
displayName: z.string().describe("Company name.").nullish(),
|
|
462
|
+
division: z.string().describe("The division within the company.").nullish(),
|
|
463
|
+
officeLocation: z.string().describe("Office Location of the person referred to.").nullish(),
|
|
464
|
+
pronunciation: z.string().describe("Pronunciation guide for the company name.").nullish(),
|
|
465
|
+
secondaryDepartment: z.string().describe("Secondary Department Name within a company.").nullish(),
|
|
466
|
+
webUrl: z.string().describe("Link to the company home page.").nullish()
|
|
467
|
+
}).passthrough();
|
|
468
|
+
const microsoft_graph_positionDetail = z.object({
|
|
469
|
+
company: microsoft_graph_companyDetail.optional(),
|
|
470
|
+
description: z.string().describe("A description for the position in question.").nullish(),
|
|
471
|
+
employeeId: z.string().describe("The identifier assigned to the employee.").nullish(),
|
|
472
|
+
employeeType: z.string().describe("The type of employment for the position.").nullish(),
|
|
473
|
+
endMonthYear: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The date when the position ended.").nullish(),
|
|
474
|
+
jobTitle: z.string().describe("The title of the position.").nullish(),
|
|
475
|
+
layer: z.number().gte(-2147483648).lte(2147483647).describe("The place where the employee is within the organizational hierarchy.").nullish(),
|
|
476
|
+
level: z.string().describe("The employee\u2019s experience or management level.").nullish(),
|
|
477
|
+
role: z.string().describe("The role the position entailed.").nullish(),
|
|
478
|
+
secondaryJobTitle: z.string().describe("An optional job title for the position.").nullish(),
|
|
479
|
+
secondaryRole: z.string().describe("An optional role for the position entailed.").nullish(),
|
|
480
|
+
startMonthYear: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The start date of the position.").nullish(),
|
|
481
|
+
summary: z.string().describe("The summary of the position.").nullish()
|
|
482
|
+
}).passthrough();
|
|
483
|
+
const microsoft_graph_workPosition = z.object({
|
|
484
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
485
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
486
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
487
|
+
createdDateTime: z.string().regex(
|
|
488
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
489
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
490
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
491
|
+
isSearchable: z.boolean().nullish(),
|
|
492
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
493
|
+
lastModifiedDateTime: z.string().regex(
|
|
494
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
495
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
496
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
497
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
498
|
+
categories: z.array(z.string().nullable()).describe("Categories that the user has associated with this position.").optional(),
|
|
499
|
+
colleagues: z.array(microsoft_graph_relatedPerson).describe("Colleagues that are associated with this position.").optional(),
|
|
500
|
+
detail: microsoft_graph_positionDetail.optional(),
|
|
501
|
+
isCurrent: z.boolean().describe("Denotes whether or not the position is current.").nullish(),
|
|
502
|
+
manager: microsoft_graph_relatedPerson.optional()
|
|
503
|
+
}).passthrough();
|
|
504
|
+
const microsoft_graph_projectParticipation = z.object({
|
|
505
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
506
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
507
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
508
|
+
createdDateTime: z.string().regex(
|
|
509
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
510
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
511
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
512
|
+
isSearchable: z.boolean().nullish(),
|
|
513
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
514
|
+
lastModifiedDateTime: z.string().regex(
|
|
515
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
516
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
517
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
518
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
519
|
+
categories: z.array(z.string().nullable()).describe(
|
|
520
|
+
"Contains categories a user has associated with the project (for example, digital transformation, oil rig)."
|
|
521
|
+
).optional(),
|
|
522
|
+
client: microsoft_graph_companyDetail.optional(),
|
|
523
|
+
collaborationTags: z.array(z.string().nullable()).describe(
|
|
524
|
+
"Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove."
|
|
525
|
+
).optional(),
|
|
526
|
+
colleagues: z.array(microsoft_graph_relatedPerson).describe("Lists people that also worked on the project.").optional(),
|
|
527
|
+
detail: microsoft_graph_positionDetail.optional(),
|
|
528
|
+
displayName: z.string().describe("Contains a friendly name for the project.").nullish(),
|
|
529
|
+
sponsors: z.array(microsoft_graph_relatedPerson).describe("The Person or people who sponsored the project.").optional(),
|
|
530
|
+
thumbnailUrl: z.string().nullish()
|
|
531
|
+
}).passthrough();
|
|
532
|
+
const microsoft_graph_itemPublication = z.object({
|
|
533
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
534
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
535
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
536
|
+
createdDateTime: z.string().regex(
|
|
537
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
538
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
539
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
540
|
+
isSearchable: z.boolean().nullish(),
|
|
541
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
542
|
+
lastModifiedDateTime: z.string().regex(
|
|
543
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
544
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
545
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
546
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
547
|
+
description: z.string().describe("Description of the publication.").nullish(),
|
|
548
|
+
displayName: z.string().describe("Title of the publication.").nullish(),
|
|
549
|
+
publishedDate: z.string().regex(/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/).describe("The date that the publication was published.").nullish(),
|
|
550
|
+
publisher: z.string().describe("Publication or publisher for the publication.").nullish(),
|
|
551
|
+
thumbnailUrl: z.string().describe("URL referencing a thumbnail of the publication.").nullish(),
|
|
552
|
+
webUrl: z.string().describe("URL referencing the publication.").nullish()
|
|
553
|
+
}).passthrough();
|
|
554
|
+
const microsoft_graph_skillProficiencyLevel = z.enum([
|
|
555
|
+
"elementary",
|
|
556
|
+
"limitedWorking",
|
|
557
|
+
"generalProfessional",
|
|
558
|
+
"advancedProfessional",
|
|
559
|
+
"expert",
|
|
560
|
+
"unknownFutureValue"
|
|
561
|
+
]);
|
|
562
|
+
const microsoft_graph_skillProficiency = z.object({
|
|
563
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
564
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
565
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
566
|
+
createdDateTime: z.string().regex(
|
|
567
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
568
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
569
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
570
|
+
isSearchable: z.boolean().nullish(),
|
|
571
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
572
|
+
lastModifiedDateTime: z.string().regex(
|
|
573
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
574
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
575
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
576
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
577
|
+
categories: z.array(z.string().nullable()).describe(
|
|
578
|
+
"Contains categories a user has associated with the skill (for example, personal, professional, hobby)."
|
|
579
|
+
).optional(),
|
|
580
|
+
collaborationTags: z.array(z.string().nullable()).describe(
|
|
581
|
+
"Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove."
|
|
582
|
+
).optional(),
|
|
583
|
+
displayName: z.string().describe("Contains a friendly name for the skill.").nullish(),
|
|
584
|
+
proficiency: microsoft_graph_skillProficiencyLevel.optional(),
|
|
585
|
+
thumbnailUrl: z.string().nullish(),
|
|
586
|
+
webUrl: z.string().describe("Contains a link to an information source about the skill.").nullish()
|
|
587
|
+
}).passthrough();
|
|
588
|
+
const microsoft_graph_serviceInformation = z.object({
|
|
589
|
+
name: z.string().describe("The name of the cloud service (for example, Twitter, Instagram).").nullish(),
|
|
590
|
+
webUrl: z.string().describe("Contains the URL for the service being referenced.").nullish()
|
|
591
|
+
}).passthrough();
|
|
592
|
+
const microsoft_graph_webAccount = z.object({
|
|
593
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
594
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
595
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
596
|
+
createdDateTime: z.string().regex(
|
|
597
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
598
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
599
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
600
|
+
isSearchable: z.boolean().nullish(),
|
|
601
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
602
|
+
lastModifiedDateTime: z.string().regex(
|
|
603
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
604
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
605
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
606
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
607
|
+
description: z.string().describe(
|
|
608
|
+
"Contains the description the user has provided for the account on the service being referenced."
|
|
609
|
+
).nullish(),
|
|
610
|
+
service: microsoft_graph_serviceInformation.optional(),
|
|
611
|
+
statusMessage: z.string().describe("Contains a status message from the cloud service if provided or synchronized.").nullish(),
|
|
612
|
+
thumbnailUrl: z.string().nullish(),
|
|
613
|
+
userId: z.string().describe("The user name displayed for the webaccount.").nullish(),
|
|
614
|
+
webUrl: z.string().describe("Contains a link to the user's profile on the cloud service if one exists.").nullish()
|
|
615
|
+
}).passthrough();
|
|
616
|
+
const microsoft_graph_personWebsite = z.object({
|
|
617
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
618
|
+
allowedAudiences: microsoft_graph_allowedAudiences.optional(),
|
|
619
|
+
createdBy: microsoft_graph_identitySet.optional(),
|
|
620
|
+
createdDateTime: z.string().regex(
|
|
621
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
622
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
623
|
+
inference: microsoft_graph_inferenceData.optional(),
|
|
624
|
+
isSearchable: z.boolean().nullish(),
|
|
625
|
+
lastModifiedBy: microsoft_graph_identitySet.optional(),
|
|
626
|
+
lastModifiedDateTime: z.string().regex(
|
|
627
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
628
|
+
).datetime({ offset: true }).describe("Provides the dateTimeOffset for when the entity was created.").nullish(),
|
|
629
|
+
source: microsoft_graph_personDataSources.optional(),
|
|
630
|
+
sources: z.array(microsoft_graph_profileSourceAnnotation).describe("Where the values within an entity originated if synced from another source.").optional(),
|
|
631
|
+
categories: z.array(z.string().nullable()).describe(
|
|
632
|
+
"Contains categories a user has associated with the website (for example, personal, recipes)."
|
|
633
|
+
).optional(),
|
|
634
|
+
description: z.string().describe("Contains a description of the website.").nullish(),
|
|
635
|
+
displayName: z.string().describe("Contains a friendly name for the website.").nullish(),
|
|
636
|
+
thumbnailUrl: z.string().nullish(),
|
|
637
|
+
webUrl: z.string().describe("Contains a link to the website itself.").nullish()
|
|
638
|
+
}).passthrough();
|
|
639
|
+
const microsoft_graph_profile = z.object({
|
|
640
|
+
id: z.string().describe("The unique identifier for an entity. Read-only.").optional(),
|
|
641
|
+
account: z.array(microsoft_graph_userAccountInformation).optional(),
|
|
642
|
+
addresses: z.array(microsoft_graph_itemAddress).describe("Represents details of addresses associated with the user.").optional(),
|
|
643
|
+
anniversaries: z.array(microsoft_graph_personAnnualEvent).describe("Represents the details of meaningful dates associated with a person.").optional(),
|
|
644
|
+
awards: z.array(microsoft_graph_personAward).describe("Represents the details of awards or honors associated with a person.").optional(),
|
|
645
|
+
certifications: z.array(microsoft_graph_personCertification).describe("Represents the details of certifications associated with a person.").optional(),
|
|
646
|
+
educationalActivities: z.array(microsoft_graph_educationalActivity).describe(
|
|
647
|
+
"Represents data that a user has supplied related to undergraduate, graduate, postgraduate or other educational activities."
|
|
648
|
+
).optional(),
|
|
649
|
+
emails: z.array(microsoft_graph_itemEmail).describe("Represents detailed information about email addresses associated with the user.").optional(),
|
|
650
|
+
interests: z.array(microsoft_graph_personInterest).describe(
|
|
651
|
+
"Provides detailed information about interests the user has associated with themselves in various services."
|
|
652
|
+
).optional(),
|
|
653
|
+
languages: z.array(microsoft_graph_languageProficiency).describe(
|
|
654
|
+
"Represents detailed information about languages that a user has added to their profile."
|
|
655
|
+
).optional(),
|
|
656
|
+
names: z.array(microsoft_graph_personName).describe("Represents the names a user has added to their profile.").optional(),
|
|
657
|
+
notes: z.array(microsoft_graph_personAnnotation).describe("Represents notes that a user has added to their profile.").optional(),
|
|
658
|
+
patents: z.array(microsoft_graph_itemPatent).describe("Represents patents that a user has added to their profile.").optional(),
|
|
659
|
+
phones: z.array(microsoft_graph_itemPhone).describe(
|
|
660
|
+
"Represents detailed information about phone numbers associated with a user in various services."
|
|
661
|
+
).optional(),
|
|
662
|
+
positions: z.array(microsoft_graph_workPosition).describe(
|
|
663
|
+
"Represents detailed information about work positions associated with a user's profile."
|
|
664
|
+
).optional(),
|
|
665
|
+
projects: z.array(microsoft_graph_projectParticipation).describe("Represents detailed information about projects associated with a user.").optional(),
|
|
666
|
+
publications: z.array(microsoft_graph_itemPublication).describe("Represents details of any publications a user has added to their profile.").optional(),
|
|
667
|
+
skills: z.array(microsoft_graph_skillProficiency).describe(
|
|
668
|
+
"Represents detailed information about skills associated with a user in various services."
|
|
669
|
+
).optional(),
|
|
670
|
+
webAccounts: z.array(microsoft_graph_webAccount).describe(
|
|
671
|
+
"Represents web accounts the user has indicated they use or has added to their user profile."
|
|
672
|
+
).optional(),
|
|
673
|
+
websites: z.array(microsoft_graph_personWebsite).describe(
|
|
674
|
+
"Represents detailed information about websites associated with a user in various services."
|
|
675
|
+
).optional()
|
|
676
|
+
}).passthrough();
|
|
677
|
+
const microsoft_graph_ODataErrors_ErrorDetails = z.object({ code: z.string(), message: z.string(), target: z.string().nullish() }).passthrough();
|
|
678
|
+
const microsoft_graph_ODataErrors_InnerError = z.object({
|
|
679
|
+
"request-id": z.string().describe("Request Id as tracked internally by the service").nullish(),
|
|
680
|
+
"client-request-id": z.string().describe("Client request Id as sent by the client application.").nullish(),
|
|
681
|
+
date: z.string().regex(
|
|
682
|
+
/^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$/
|
|
683
|
+
).datetime({ offset: true }).describe("Date when the error occured.").nullish()
|
|
684
|
+
}).passthrough();
|
|
685
|
+
const microsoft_graph_ODataErrors_MainError = z.object({
|
|
686
|
+
code: z.string(),
|
|
687
|
+
message: z.string(),
|
|
688
|
+
target: z.string().nullish(),
|
|
689
|
+
details: z.array(microsoft_graph_ODataErrors_ErrorDetails).optional(),
|
|
690
|
+
innerError: microsoft_graph_ODataErrors_InnerError.optional()
|
|
691
|
+
}).passthrough();
|
|
692
|
+
const microsoft_graph_ODataErrors_ODataError = z.object({ error: microsoft_graph_ODataErrors_MainError }).passthrough();
|
|
693
|
+
const schemas = {
|
|
694
|
+
microsoft_graph_allowedAudiences,
|
|
695
|
+
microsoft_graph_identity,
|
|
696
|
+
microsoft_graph_identitySet,
|
|
697
|
+
microsoft_graph_inferenceData,
|
|
698
|
+
microsoft_graph_personDataSources,
|
|
699
|
+
microsoft_graph_profileSourceAnnotation,
|
|
700
|
+
microsoft_graph_originTenantInfo,
|
|
701
|
+
microsoft_graph_localeInfo,
|
|
702
|
+
microsoft_graph_userPersona,
|
|
703
|
+
microsoft_graph_userAccountInformation,
|
|
704
|
+
microsoft_graph_physicalAddressType,
|
|
705
|
+
microsoft_graph_physicalAddress,
|
|
706
|
+
microsoft_graph_geoCoordinates,
|
|
707
|
+
microsoft_graph_itemAddress,
|
|
708
|
+
microsoft_graph_personAnnualEventType,
|
|
709
|
+
microsoft_graph_personAnnualEvent,
|
|
710
|
+
microsoft_graph_personAward,
|
|
711
|
+
microsoft_graph_personCertification,
|
|
712
|
+
microsoft_graph_institutionData,
|
|
713
|
+
microsoft_graph_educationalActivityDetail,
|
|
714
|
+
microsoft_graph_educationalActivity,
|
|
715
|
+
microsoft_graph_emailType,
|
|
716
|
+
microsoft_graph_itemEmail,
|
|
717
|
+
microsoft_graph_personInterest,
|
|
718
|
+
microsoft_graph_languageProficiencyLevel,
|
|
719
|
+
microsoft_graph_languageProficiency,
|
|
720
|
+
microsoft_graph_personNamePronounciation,
|
|
721
|
+
microsoft_graph_personName,
|
|
722
|
+
microsoft_graph_bodyType,
|
|
723
|
+
microsoft_graph_itemBody,
|
|
724
|
+
microsoft_graph_personAnnotation,
|
|
725
|
+
microsoft_graph_itemPatent,
|
|
726
|
+
microsoft_graph_phoneType,
|
|
727
|
+
microsoft_graph_itemPhone,
|
|
728
|
+
microsoft_graph_personRelationship,
|
|
729
|
+
microsoft_graph_relatedPerson,
|
|
730
|
+
microsoft_graph_companyDetail,
|
|
731
|
+
microsoft_graph_positionDetail,
|
|
732
|
+
microsoft_graph_workPosition,
|
|
733
|
+
microsoft_graph_projectParticipation,
|
|
734
|
+
microsoft_graph_itemPublication,
|
|
735
|
+
microsoft_graph_skillProficiencyLevel,
|
|
736
|
+
microsoft_graph_skillProficiency,
|
|
737
|
+
microsoft_graph_serviceInformation,
|
|
738
|
+
microsoft_graph_webAccount,
|
|
739
|
+
microsoft_graph_personWebsite,
|
|
740
|
+
microsoft_graph_profile,
|
|
741
|
+
microsoft_graph_ODataErrors_ErrorDetails,
|
|
742
|
+
microsoft_graph_ODataErrors_InnerError,
|
|
743
|
+
microsoft_graph_ODataErrors_MainError,
|
|
744
|
+
microsoft_graph_ODataErrors_ODataError
|
|
745
|
+
};
|
|
746
|
+
const endpoints = makeApi([
|
|
747
|
+
{
|
|
748
|
+
method: "get",
|
|
749
|
+
path: "/me/profile",
|
|
750
|
+
alias: "get-my-profile",
|
|
751
|
+
description: `Retrieve the properties and relationships of a profile object for a given user. The profile resource exposes various rich properties that are descriptive of the user as relationships, for example, anniversaries and education activities. To get one of these navigation properties, use the corresponding GET method on that property. See the methods exposed by profile.`,
|
|
752
|
+
requestFormat: "json",
|
|
753
|
+
parameters: [
|
|
754
|
+
{
|
|
755
|
+
name: "$select",
|
|
756
|
+
type: "Query",
|
|
757
|
+
schema: z.array(z.string()).describe("Select properties to be returned").optional()
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
name: "$expand",
|
|
761
|
+
type: "Query",
|
|
762
|
+
schema: z.array(z.string()).describe("Expand related entities").optional()
|
|
763
|
+
}
|
|
764
|
+
],
|
|
765
|
+
response: z.void()
|
|
766
|
+
}
|
|
767
|
+
]);
|
|
768
|
+
const api = new Zodios(endpoints);
|
|
769
|
+
function createApiClient(baseUrl, options) {
|
|
770
|
+
return new Zodios(baseUrl, endpoints, options);
|
|
771
|
+
}
|
|
772
|
+
export {
|
|
773
|
+
api,
|
|
774
|
+
createApiClient,
|
|
775
|
+
schemas
|
|
776
|
+
};
|
package/dist/graph-client.js
CHANGED
|
@@ -100,7 +100,8 @@ class GraphClient {
|
|
|
100
100
|
}
|
|
101
101
|
async performRequest(endpoint, accessToken, options) {
|
|
102
102
|
const cloudEndpoints = getCloudEndpoints(this.secrets.cloudType);
|
|
103
|
-
const
|
|
103
|
+
const apiVersion = options.apiVersion || "v1.0";
|
|
104
|
+
const url = `${cloudEndpoints.graphApi}/${apiVersion}${endpoint}`;
|
|
104
105
|
logger.info(`[GRAPH CLIENT] Final URL being sent to Microsoft: ${url}`);
|
|
105
106
|
const headers = {
|
|
106
107
|
Authorization: `Bearer ${accessToken}`,
|
package/dist/graph-tools.js
CHANGED
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
parseAllowedScopes
|
|
8
8
|
} from "./auth.js";
|
|
9
9
|
import { api } from "./generated/client.js";
|
|
10
|
+
import { api as betaApi } from "./generated/client-beta.js";
|
|
11
|
+
const allEndpoints = [...api.endpoints, ...betaApi.endpoints];
|
|
10
12
|
import { z } from "zod";
|
|
11
13
|
import { readFileSync } from "fs";
|
|
12
14
|
import path from "path";
|
|
@@ -21,6 +23,9 @@ const __dirname = path.dirname(__filename);
|
|
|
21
23
|
const endpointsData = JSON.parse(
|
|
22
24
|
readFileSync(path.join(__dirname, "endpoints.json"), "utf8")
|
|
23
25
|
);
|
|
26
|
+
function withApiVersionPrefix(description, config) {
|
|
27
|
+
return config?.apiVersion === "beta" ? `[beta] ${description}` : description;
|
|
28
|
+
}
|
|
24
29
|
function maxTopFromEnv() {
|
|
25
30
|
const raw = process.env.MS365_MCP_MAX_TOP;
|
|
26
31
|
if (raw === void 0 || raw === "") return void 0;
|
|
@@ -337,6 +342,9 @@ async function executeGraphTool(tool, config, graphClient, params, authManager)
|
|
|
337
342
|
method: tool.method.toUpperCase(),
|
|
338
343
|
headers
|
|
339
344
|
};
|
|
345
|
+
if (config?.apiVersion) {
|
|
346
|
+
options.apiVersion = config.apiVersion;
|
|
347
|
+
}
|
|
340
348
|
if (options.method !== "GET" && body) {
|
|
341
349
|
if (tool.requestFormat === "binary" && typeof body === "string") {
|
|
342
350
|
options.body = Buffer.from(body, "base64");
|
|
@@ -396,7 +404,7 @@ async function executeGraphTool(tool, config, graphClient, params, authManager)
|
|
|
396
404
|
while (nextLink && pageCount < maxPages && allItems.length < maxItems) {
|
|
397
405
|
logger.info(`Fetching page ${pageCount + 1} from: ${nextLink}`);
|
|
398
406
|
const url = new URL(nextLink);
|
|
399
|
-
const nextPath = url.pathname.replace(
|
|
407
|
+
const nextPath = url.pathname.replace(/^\/(v1\.0|beta)/, "") + url.search;
|
|
400
408
|
const nextOptions = { ...options };
|
|
401
409
|
const nextResponse = await graphClient.graphRequest(nextPath, nextOptions);
|
|
402
410
|
if (nextResponse?.content?.[0]?.text) {
|
|
@@ -505,7 +513,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
|
|
|
505
513
|
let failedCount = 0;
|
|
506
514
|
const allowedScopes = parseAllowedScopes(allowedScopesValue);
|
|
507
515
|
const disabledByAllowedScopes = [];
|
|
508
|
-
for (const tool of
|
|
516
|
+
for (const tool of allEndpoints) {
|
|
509
517
|
const endpointConfig = endpointsData.find((e) => e.toolName === tool.alias);
|
|
510
518
|
if (!orgMode && endpointConfig && !endpointConfig.scopes && endpointConfig.workScopes) {
|
|
511
519
|
logger.info(`Skipping work account tool ${tool.alias} - not in org mode`);
|
|
@@ -605,7 +613,10 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
|
|
|
605
613
|
"When true, expands singleValueExtendedProperties on each event. Use this to retrieve custom extended properties (e.g., sync metadata) stored on calendar events."
|
|
606
614
|
).optional();
|
|
607
615
|
}
|
|
608
|
-
let toolDescription =
|
|
616
|
+
let toolDescription = withApiVersionPrefix(
|
|
617
|
+
tool.description || `Execute ${tool.method.toUpperCase()} request to ${tool.path}`,
|
|
618
|
+
endpointConfig
|
|
619
|
+
);
|
|
609
620
|
if (endpointConfig?.llmTip) {
|
|
610
621
|
toolDescription += `
|
|
611
622
|
|
|
@@ -665,7 +676,7 @@ function registerGraphTools(server, graphClient, readOnly = false, enabledToolsP
|
|
|
665
676
|
function buildToolsRegistry(readOnly, orgMode, enabledToolsRegex, allowedScopesValue, disabledByAllowedScopes = []) {
|
|
666
677
|
const toolsMap = /* @__PURE__ */ new Map();
|
|
667
678
|
const allowedScopes = parseAllowedScopes(allowedScopesValue);
|
|
668
|
-
for (const tool of
|
|
679
|
+
for (const tool of allEndpoints) {
|
|
669
680
|
const endpointConfig = endpointsData.find((e) => e.toolName === tool.alias);
|
|
670
681
|
if (!orgMode && endpointConfig && !endpointConfig.scopes && endpointConfig.workScopes) {
|
|
671
682
|
continue;
|
|
@@ -799,7 +810,10 @@ function registerDiscoveryTools(server, graphClient, readOnly = false, orgMode =
|
|
|
799
810
|
name,
|
|
800
811
|
method: tool.method.toUpperCase(),
|
|
801
812
|
path: tool.path,
|
|
802
|
-
description:
|
|
813
|
+
description: withApiVersionPrefix(
|
|
814
|
+
tool.description || `${tool.method.toUpperCase()} ${tool.path}`,
|
|
815
|
+
config
|
|
816
|
+
),
|
|
803
817
|
...config?.llmTip ? { llmTip: config.llmTip } : {}
|
|
804
818
|
};
|
|
805
819
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softeria/ms-365-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.125.0",
|
|
4
4
|
"description": " A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/src/endpoints.json
CHANGED
|
@@ -1211,6 +1211,15 @@
|
|
|
1211
1211
|
"presets": ["personal", "users", "work"],
|
|
1212
1212
|
"scopes": ["User.Read"]
|
|
1213
1213
|
},
|
|
1214
|
+
{
|
|
1215
|
+
"pathPattern": "/me/profile",
|
|
1216
|
+
"method": "get",
|
|
1217
|
+
"toolName": "get-my-profile",
|
|
1218
|
+
"apiVersion": "beta",
|
|
1219
|
+
"presets": ["personal", "users", "work"],
|
|
1220
|
+
"scopes": ["User.Read"],
|
|
1221
|
+
"llmTip": "Retrieves the signed-in user's rich profile - a richer object than get-current-user, exposing relationships like skills, projects, languages, education and work positions. Use $expand to pull related collections (e.g. $expand=skills,projects)."
|
|
1222
|
+
},
|
|
1214
1223
|
{
|
|
1215
1224
|
"pathPattern": "/me/mailboxSettings",
|
|
1216
1225
|
"method": "get",
|