ask-marcel-office-cli 2.0.0 → 2.1.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/CHANGELOG.md +66 -0
- package/README.md +7 -6
- package/dist/cli.js +785 -604
- package/dist/commands.json +75 -22
- package/dist/index.js +723 -576
- package/dist/infra/auth.d.ts +31 -1
- package/dist/infra/browser-auth.d.ts +3 -1
- package/dist/infra/graph-client.d.ts +26 -0
- package/dist/use-cases/commands/convert-local-file.d.ts +4 -0
- package/dist/use-cases/commands/create-forward-draft.d.ts +12 -0
- package/dist/use-cases/commands/create-reply-draft.d.ts +0 -4
- package/dist/use-cases/commands/image-extraction.d.ts +2 -1
- package/dist/use-cases/commands/login-status.d.ts +31 -0
- package/dist/use-cases/commands/login.d.ts +3 -1
- package/dist/use-cases/commands/parse-recipients.d.ts +14 -0
- package/dist/use-cases/commands/zip-archive-to-markdown.d.ts +3 -1
- package/docs/COMMANDS.md +5 -4
- package/docs/USAGE.md +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -448,7 +448,7 @@ var createBrowserAuthFromApi = (api, config) => {
|
|
|
448
448
|
logger.info("elevated_token_capture_timeout");
|
|
449
449
|
return { ok: false, reason: "sso_timeout" };
|
|
450
450
|
};
|
|
451
|
-
const acquireBothTokens = async (teamsUrl) => {
|
|
451
|
+
const acquireBothTokens = async (teamsUrl, options) => {
|
|
452
452
|
const elevatedUrl = M365_CLOUD_URL;
|
|
453
453
|
trace(`[DEBUG] acquireBothTokens: ENTER
|
|
454
454
|
`);
|
|
@@ -631,7 +631,7 @@ var createBrowserAuthFromApi = (api, config) => {
|
|
|
631
631
|
const teamsDeadline = Date.now() + pollDeadlineMs;
|
|
632
632
|
let pollCount = 0;
|
|
633
633
|
while (Date.now() < teamsDeadline && !capturedAccess) {
|
|
634
|
-
const concurrent = await freshCachedToken();
|
|
634
|
+
const concurrent = options?.skipCacheProbe === true ? null : await freshCachedToken();
|
|
635
635
|
if (concurrent !== null) {
|
|
636
636
|
const validated = accessToken(concurrent);
|
|
637
637
|
if (validated.ok) {
|
|
@@ -960,9 +960,20 @@ var createAuthManagerFromApi = (browserAuth, cachePath, browserProfileDir, logge
|
|
|
960
960
|
};
|
|
961
961
|
let lastElevatedOutcome = null;
|
|
962
962
|
let lastChatsvcaggOutcome = null;
|
|
963
|
-
const
|
|
963
|
+
const redeemMissedSubstrateAtLogin = async (chatsvcaggCaptured, ic3Captured) => {
|
|
964
|
+
if (chatsvcaggCaptured && ic3Captured)
|
|
965
|
+
return;
|
|
966
|
+
const fresh = await readCache();
|
|
967
|
+
if (!fresh?.refresh_token)
|
|
968
|
+
return;
|
|
969
|
+
if (!chatsvcaggCaptured)
|
|
970
|
+
await refreshSubstrateToken(fresh, CHATSVCAGG_RESOURCE, persistChatsvcagg, "auth.chatsvcagg.login_rt_redeem");
|
|
971
|
+
if (!ic3Captured)
|
|
972
|
+
await refreshSubstrateToken(fresh, IC3_RESOURCE, persistIc3, "auth.ic3.login_rt_redeem");
|
|
973
|
+
};
|
|
974
|
+
const acquireViaBrowser = async (force = false) => {
|
|
964
975
|
try {
|
|
965
|
-
const { teams: result, elevated, chatsvcagg, ic3, fromCache } = await browserAuth.acquireBothTokens(TEAMS_URL);
|
|
976
|
+
const { teams: result, elevated, chatsvcagg, ic3, fromCache } = await browserAuth.acquireBothTokens(TEAMS_URL, { skipCacheProbe: force });
|
|
966
977
|
if (!result)
|
|
967
978
|
return err({ type: "auth_cancelled" });
|
|
968
979
|
if (fromCache === true) {
|
|
@@ -992,6 +1003,8 @@ var createAuthManagerFromApi = (browserAuth, cachePath, browserProfileDir, logge
|
|
|
992
1003
|
} else {
|
|
993
1004
|
logger.info("auth.ic3.skipped_at_login", { reason: ic3.reason });
|
|
994
1005
|
}
|
|
1006
|
+
if (force)
|
|
1007
|
+
await redeemMissedSubstrateAtLogin(chatsvcagg.ok, ic3.ok);
|
|
995
1008
|
logger.info("auth.ladder.rung", { rung: "browser" });
|
|
996
1009
|
return ok(result.accessToken);
|
|
997
1010
|
} catch (e) {
|
|
@@ -1000,32 +1013,34 @@ var createAuthManagerFromApi = (browserAuth, cachePath, browserProfileDir, logge
|
|
|
1000
1013
|
}
|
|
1001
1014
|
};
|
|
1002
1015
|
let inFlightBrowserAcquire = null;
|
|
1003
|
-
const acquireViaBrowserShared = () => {
|
|
1016
|
+
const acquireViaBrowserShared = (force = false) => {
|
|
1004
1017
|
if (inFlightBrowserAcquire !== null) {
|
|
1005
1018
|
logger.info("auth.ladder.rung", { rung: "browser_shared_in_flight" });
|
|
1006
1019
|
return inFlightBrowserAcquire;
|
|
1007
1020
|
}
|
|
1008
|
-
const launched = acquireViaBrowser();
|
|
1021
|
+
const launched = acquireViaBrowser(force);
|
|
1009
1022
|
inFlightBrowserAcquire = launched.finally(() => {
|
|
1010
1023
|
inFlightBrowserAcquire = null;
|
|
1011
1024
|
});
|
|
1012
1025
|
return inFlightBrowserAcquire;
|
|
1013
1026
|
};
|
|
1014
|
-
const getAccessToken = async () => {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1027
|
+
const getAccessToken = async (options) => {
|
|
1028
|
+
if (!options?.force) {
|
|
1029
|
+
const cached = await readCache();
|
|
1030
|
+
if (cached) {
|
|
1031
|
+
const validated = accessToken(cached.access_token);
|
|
1032
|
+
if (validated.ok) {
|
|
1033
|
+
logger.info("auth.ladder.rung", { rung: "cache" });
|
|
1034
|
+
return ok(validated.value);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
if (cached?.refresh_token) {
|
|
1038
|
+
const refreshed = await refreshToken(cached);
|
|
1039
|
+
if (refreshed.ok)
|
|
1040
|
+
return refreshed;
|
|
1021
1041
|
}
|
|
1022
1042
|
}
|
|
1023
|
-
|
|
1024
|
-
const refreshed = await refreshToken(cached);
|
|
1025
|
-
if (refreshed.ok)
|
|
1026
|
-
return refreshed;
|
|
1027
|
-
}
|
|
1028
|
-
return acquireViaBrowserShared();
|
|
1043
|
+
return acquireViaBrowserShared(options?.force ?? false);
|
|
1029
1044
|
};
|
|
1030
1045
|
const ELEVATED_BUFFER_SECONDS = 300;
|
|
1031
1046
|
const freshElevatedToken = (cached) => {
|
|
@@ -1035,6 +1050,12 @@ var createAuthManagerFromApi = (browserAuth, cachePath, browserProfileDir, logge
|
|
|
1035
1050
|
return;
|
|
1036
1051
|
return cached.elevated_access_token;
|
|
1037
1052
|
};
|
|
1053
|
+
const getCachedElevatedInfo = async () => {
|
|
1054
|
+
const cached = await readCache();
|
|
1055
|
+
const exp = cached?.elevated_expires_on;
|
|
1056
|
+
const expiresInSeconds = typeof exp === "number" ? Math.floor(exp - Date.now() / 1000) : undefined;
|
|
1057
|
+
return { available: freshElevatedToken(cached) !== undefined, expiresInSeconds };
|
|
1058
|
+
};
|
|
1038
1059
|
const recoverableElevatedFailureMessage = (reason) => {
|
|
1039
1060
|
if (reason === "launch_timeout") {
|
|
1040
1061
|
return "elevated browser launch timed out (15s) — likely a corrupt persistent profile or filesystem lock. Run `ask-marcel-office logout && ask-marcel-office login` to wipe the profile and retry. (Commands that need this token: list-chats, get-chat, the historical-version download / convert commands.)";
|
|
@@ -1092,6 +1113,12 @@ var createAuthManagerFromApi = (browserAuth, cachePath, browserProfileDir, logge
|
|
|
1092
1113
|
return;
|
|
1093
1114
|
return cached.chatsvcagg_access_token;
|
|
1094
1115
|
};
|
|
1116
|
+
const getCachedChatsvcaggInfo = async () => {
|
|
1117
|
+
const cached = await readCache();
|
|
1118
|
+
const exp = cached?.chatsvcagg_expires_on;
|
|
1119
|
+
const expiresInSeconds = typeof exp === "number" ? Math.floor(exp - Date.now() / 1000) : undefined;
|
|
1120
|
+
return { available: freshChatsvcaggToken(cached) !== undefined, expiresInSeconds };
|
|
1121
|
+
};
|
|
1095
1122
|
const recoverableChatsvcaggFailureMessage = (reason) => {
|
|
1096
1123
|
if (reason === "launch_timeout") {
|
|
1097
1124
|
return "chatsvcagg browser launch timed out (15s) — likely a corrupt persistent profile or filesystem lock. Run `ask-marcel-office logout && ask-marcel-office login` to wipe the profile and retry. (Commands that need this token: list-teams-chats-with-messages, list-teams-chat-messages, get-teams-chat-message, find-chats-with-user.)";
|
|
@@ -1160,6 +1187,12 @@ var createAuthManagerFromApi = (browserAuth, cachePath, browserProfileDir, logge
|
|
|
1160
1187
|
return;
|
|
1161
1188
|
return cached.ic3_access_token;
|
|
1162
1189
|
};
|
|
1190
|
+
const getCachedIc3Info = async () => {
|
|
1191
|
+
const cached = await readCache();
|
|
1192
|
+
const exp = cached?.ic3_expires_on;
|
|
1193
|
+
const expiresInSeconds = typeof exp === "number" ? Math.floor(exp - Date.now() / 1000) : undefined;
|
|
1194
|
+
return { available: freshIc3Token(cached) !== undefined, expiresInSeconds };
|
|
1195
|
+
};
|
|
1163
1196
|
const recoverableIc3FailureMessage = (reason) => {
|
|
1164
1197
|
if (reason === "launch_timeout") {
|
|
1165
1198
|
return "ic3 browser launch timed out (15s) — likely a corrupt persistent profile or filesystem lock. Run `ask-marcel-office logout && ask-marcel-office login` to wipe the profile and retry. (Commands that need this token: list-teams-chat-history.)";
|
|
@@ -1234,7 +1267,10 @@ var createAuthManagerFromApi = (browserAuth, cachePath, browserProfileDir, logge
|
|
|
1234
1267
|
getIc3AccessToken,
|
|
1235
1268
|
logout,
|
|
1236
1269
|
getLastElevatedOutcome,
|
|
1237
|
-
getLastChatsvcaggOutcome
|
|
1270
|
+
getLastChatsvcaggOutcome,
|
|
1271
|
+
getCachedElevatedInfo,
|
|
1272
|
+
getCachedChatsvcaggInfo,
|
|
1273
|
+
getCachedIc3Info
|
|
1238
1274
|
};
|
|
1239
1275
|
};
|
|
1240
1276
|
var defaultFileSystem2 = () => typeof globalThis.Bun !== "undefined" ? createBunFileSystem() : createNodeFileSystem();
|
|
@@ -1647,7 +1683,10 @@ var createGraphClient = (auth, fetchFn = globalThis.fetch) => {
|
|
|
1647
1683
|
const expRaw = claims["exp"];
|
|
1648
1684
|
const expiresAt = typeof expRaw === "number" ? new Date(expRaw * 1000).toISOString() : undefined;
|
|
1649
1685
|
const expiresInSeconds = typeof expRaw === "number" ? Math.floor(expRaw - Date.now() / 1000) : undefined;
|
|
1650
|
-
|
|
1686
|
+
const elevated = auth.getCachedElevatedInfo ? await auth.getCachedElevatedInfo() : { available: false, expiresInSeconds: undefined };
|
|
1687
|
+
const chatsvcagg = auth.getCachedChatsvcaggInfo ? await auth.getCachedChatsvcaggInfo() : { available: false, expiresInSeconds: undefined };
|
|
1688
|
+
const ic3 = auth.getCachedIc3Info ? await auth.getCachedIc3Info() : { available: false, expiresInSeconds: undefined };
|
|
1689
|
+
return ok({ scopes, audience, expiresAt, expiresInSeconds, elevated, chatsvcagg, ic3 });
|
|
1651
1690
|
};
|
|
1652
1691
|
return {
|
|
1653
1692
|
get: (path, extraHeaders) => request("GET", path, undefined, extraHeaders),
|
|
@@ -16859,17 +16898,17 @@ var bytesToMarkdown = async (bytes, filename, opts, hints) => {
|
|
|
16859
16898
|
if (ext === "doc")
|
|
16860
16899
|
return docToMarkdown(bytes);
|
|
16861
16900
|
if (ext === "ppt")
|
|
16862
|
-
return err({ type: "api_error", status: 415, message: hints.legacyPpt });
|
|
16901
|
+
return err({ type: "api_error", status: 415, code: "unsupported_legacy_office", message: hints.legacyPpt });
|
|
16863
16902
|
if (ext === "msg") {
|
|
16864
16903
|
const depth = opts.depth ?? 0;
|
|
16865
16904
|
return msgToMarkdown(bytes, { depth }, (childBytes, childName) => bytesToMarkdown(childBytes, childName, { ...opts, depth: depth + 1 }, NESTED_HINTS));
|
|
16866
16905
|
}
|
|
16867
16906
|
if (IMAGE_EXTENSIONS.has(ext))
|
|
16868
|
-
return err({ type: "api_error", status: 415, message: hints.image(ext) });
|
|
16907
|
+
return err({ type: "api_error", status: 415, code: "unsupported_image", message: hints.image(ext) });
|
|
16869
16908
|
const text = decodeUtf8Text(bytes);
|
|
16870
16909
|
if (text !== undefined)
|
|
16871
16910
|
return ok({ contentType: "text/plain", size: bytes.byteLength, text });
|
|
16872
|
-
return err({ type: "api_error", status: 415, message: hints.generic(ext === "" ? "<no-extension>" : ext) });
|
|
16911
|
+
return err({ type: "api_error", status: 415, code: "unsupported_format", message: hints.generic(ext === "" ? "<no-extension>" : ext) });
|
|
16873
16912
|
};
|
|
16874
16913
|
|
|
16875
16914
|
// src/use-cases/commands/inline-image-embedder.ts
|
|
@@ -17143,6 +17182,7 @@ var extractImagesFromBytes = async (bytes, name, fetchHint) => {
|
|
|
17143
17182
|
return err({
|
|
17144
17183
|
type: "api_error",
|
|
17145
17184
|
status: 415,
|
|
17185
|
+
code: "unsupported_document",
|
|
17146
17186
|
message: `${ext === "" ? "<no-extension>" : ext} is not a supported document — image extraction supports pdf and docx / xlsx / pptx (and their macro-enabled / template variants). ${fetchHint}`
|
|
17147
17187
|
});
|
|
17148
17188
|
}
|
|
@@ -21294,19 +21334,27 @@ var openZipEntries = async (bytes) => {
|
|
|
21294
21334
|
|
|
21295
21335
|
// src/use-cases/commands/zip-archive-to-markdown.ts
|
|
21296
21336
|
var MAX_ENTRIES = 100;
|
|
21297
|
-
var
|
|
21337
|
+
var entryImages = async (entry) => {
|
|
21338
|
+
const r = await extractImagesFromBytes(entry.bytes, entry.path, "");
|
|
21339
|
+
return r.ok ? r.value.media : [];
|
|
21340
|
+
};
|
|
21341
|
+
var convertEntry = async (entry, includeMetadata, includeImages) => {
|
|
21298
21342
|
const r = await bytesToMarkdown(entry.bytes, entry.path, { includeMetadata }, NESTED_HINTS);
|
|
21299
21343
|
if (!r.ok)
|
|
21300
21344
|
return { path: entry.path, note: r.error.message };
|
|
21301
21345
|
const env = r.value;
|
|
21302
|
-
|
|
21346
|
+
const base = { path: entry.path, contentType: env.contentType, size: env.size, text: env.text };
|
|
21347
|
+
if (!includeImages)
|
|
21348
|
+
return base;
|
|
21349
|
+
const images = await entryImages(entry);
|
|
21350
|
+
return images.length > 0 ? { ...base, images } : base;
|
|
21303
21351
|
};
|
|
21304
|
-
var convertZipArchive = async (bytes, includeMetadata) => {
|
|
21352
|
+
var convertZipArchive = async (bytes, includeMetadata, includeImages = false) => {
|
|
21305
21353
|
const entries = await openZipEntries(bytes);
|
|
21306
21354
|
if (!entries.ok)
|
|
21307
21355
|
return entries;
|
|
21308
21356
|
const capped = entries.value.slice(0, MAX_ENTRIES);
|
|
21309
|
-
const files = await Promise.all(capped.map((entry) => convertEntry(entry, includeMetadata)));
|
|
21357
|
+
const files = await Promise.all(capped.map((entry) => convertEntry(entry, includeMetadata, includeImages)));
|
|
21310
21358
|
if (entries.value.length > MAX_ENTRIES) {
|
|
21311
21359
|
return ok({ count: files.length, totalEntries: entries.value.length, truncated: true, files });
|
|
21312
21360
|
}
|
|
@@ -21972,14 +22020,112 @@ var meta91 = {
|
|
|
21972
22020
|
producesBytes: true
|
|
21973
22021
|
};
|
|
21974
22022
|
|
|
21975
|
-
// src/use-cases/commands/create-
|
|
21976
|
-
var
|
|
21977
|
-
__export(
|
|
22023
|
+
// src/use-cases/commands/create-forward-draft.ts
|
|
22024
|
+
var exports_create_forward_draft = {};
|
|
22025
|
+
__export(exports_create_forward_draft, {
|
|
21978
22026
|
schema: () => schema90,
|
|
21979
22027
|
meta: () => meta92,
|
|
21980
22028
|
execute: () => execute90
|
|
21981
22029
|
});
|
|
22030
|
+
|
|
22031
|
+
// src/use-cases/commands/parse-recipients.ts
|
|
22032
|
+
var parseRecipients = (csv) => csv.split(",").map((s) => s.trim()).filter((s) => s.length > 0).map((address) => ({ emailAddress: { address } }));
|
|
22033
|
+
|
|
22034
|
+
// src/use-cases/commands/create-forward-draft.ts
|
|
21982
22035
|
var schema90 = exports_external.object({
|
|
22036
|
+
forwardMessageId: exports_external.string().min(1),
|
|
22037
|
+
toRecipients: exports_external.string().min(1),
|
|
22038
|
+
ccRecipients: exports_external.string().optional(),
|
|
22039
|
+
bodyContent: exports_external.string().min(1),
|
|
22040
|
+
subject: exports_external.string().optional()
|
|
22041
|
+
});
|
|
22042
|
+
var isUnsentDraft = (value) => typeof value === "object" && value !== null && ("id" in value) && typeof value.id === "string" && ("isDraft" in value) && value.isDraft === true;
|
|
22043
|
+
var execute90 = async (graph, params) => {
|
|
22044
|
+
const parsed = schema90.safeParse(params);
|
|
22045
|
+
if (!parsed.success)
|
|
22046
|
+
return err({
|
|
22047
|
+
type: "validation_error",
|
|
22048
|
+
message: formatZodError(parsed.error)
|
|
22049
|
+
});
|
|
22050
|
+
const { forwardMessageId, toRecipients, ccRecipients, bodyContent, subject } = parsed.data;
|
|
22051
|
+
const created = await graph.post(`/me/messages/${forwardMessageId}/createForward`, {
|
|
22052
|
+
comment: bodyContent,
|
|
22053
|
+
toRecipients: parseRecipients(toRecipients)
|
|
22054
|
+
});
|
|
22055
|
+
if (!created.ok)
|
|
22056
|
+
return created;
|
|
22057
|
+
if (!isUnsentDraft(created.value)) {
|
|
22058
|
+
return err({
|
|
22059
|
+
type: "api_error",
|
|
22060
|
+
status: 500,
|
|
22061
|
+
code: "not_an_unsent_draft",
|
|
22062
|
+
message: `createForward did not return an unsent draft for message ${forwardMessageId} - refusing to patch. Inspect the message id and retry.`
|
|
22063
|
+
});
|
|
22064
|
+
}
|
|
22065
|
+
const patch = {};
|
|
22066
|
+
if (ccRecipients)
|
|
22067
|
+
patch.ccRecipients = parseRecipients(ccRecipients);
|
|
22068
|
+
if (subject)
|
|
22069
|
+
patch.subject = subject;
|
|
22070
|
+
if (Object.keys(patch).length === 0)
|
|
22071
|
+
return created;
|
|
22072
|
+
return graph.patch(`/me/messages/${created.value.id}`, patch);
|
|
22073
|
+
};
|
|
22074
|
+
var meta92 = {
|
|
22075
|
+
summary: "Create an UNSENT forward draft of an existing message. POST /me/messages/{id}/createForward mints the draft (FW: subject, quoted original) with your comment placed above the quote and the recipients set, in one call. Redirects a thread to the right owner without leaving the CLI. The draft is saved in Drafts and can be reviewed, edited, and sent from any Outlook client; the CLI still cannot send.",
|
|
22076
|
+
category: "mail",
|
|
22077
|
+
graphMethod: "POST",
|
|
22078
|
+
graphPathTemplate: "/me/messages/{forward-message-id}/createForward (+ optional body-free PATCH for cc / subject)",
|
|
22079
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/message-createforward",
|
|
22080
|
+
options: [
|
|
22081
|
+
{
|
|
22082
|
+
name: "forward-message-id",
|
|
22083
|
+
key: "forwardMessageId",
|
|
22084
|
+
required: true,
|
|
22085
|
+
aliases: [{ name: "id", key: "id" }],
|
|
22086
|
+
description: "The message being forwarded. Source from list-mail-folder-messages or search-mail-messages. Accepts `--id` as an alias.",
|
|
22087
|
+
argumentHint: { kind: "idOrName" }
|
|
22088
|
+
},
|
|
22089
|
+
{
|
|
22090
|
+
name: "to-recipients",
|
|
22091
|
+
key: "toRecipients",
|
|
22092
|
+
required: true,
|
|
22093
|
+
description: 'Comma-separated list of recipient email addresses to forward to (e.g. "alice@example.com,bob@example.com"). Required: a forward without a recipient is not actionable.'
|
|
22094
|
+
},
|
|
22095
|
+
{
|
|
22096
|
+
name: "cc-recipients",
|
|
22097
|
+
key: "ccRecipients",
|
|
22098
|
+
required: false,
|
|
22099
|
+
description: "Comma-separated list of CC recipient email addresses."
|
|
22100
|
+
},
|
|
22101
|
+
{
|
|
22102
|
+
name: "body-content",
|
|
22103
|
+
key: "bodyContent",
|
|
22104
|
+
required: true,
|
|
22105
|
+
description: "The comment text, placed above the quoted forwarded message by Graph."
|
|
22106
|
+
},
|
|
22107
|
+
{
|
|
22108
|
+
name: "subject",
|
|
22109
|
+
key: "subject",
|
|
22110
|
+
required: false,
|
|
22111
|
+
description: 'Optional subject override. Omit to keep the inherited "FW: ..." subject.'
|
|
22112
|
+
}
|
|
22113
|
+
],
|
|
22114
|
+
example: 'ask-marcel-office create-forward-draft --forward-message-id "AAMkAD..." --to-recipients "bob@example.com" --body-content "Bob owns this now, forwarding for your action."',
|
|
22115
|
+
bodyTemplate: "POST { comment: '{body-content}', toRecipients: '{to-recipients}' } then optional PATCH { ccRecipients?: '{cc-recipients}', subject?: '{subject}' }",
|
|
22116
|
+
mutates: true,
|
|
22117
|
+
scopesRequired: ["Mail.ReadWrite"],
|
|
22118
|
+
responseShape: "The updated draft message object (or `{ ok: true }` when Graph answers 204): `{ id, subject, body, toRecipients, ccRecipients, isDraft: true, … }`. The `id` is the draft - update further with update-mail-draft, or open Outlook Drafts to review and send."
|
|
22119
|
+
};
|
|
22120
|
+
|
|
22121
|
+
// src/use-cases/commands/create-mail-draft.ts
|
|
22122
|
+
var exports_create_mail_draft = {};
|
|
22123
|
+
__export(exports_create_mail_draft, {
|
|
22124
|
+
schema: () => schema91,
|
|
22125
|
+
meta: () => meta93,
|
|
22126
|
+
execute: () => execute91
|
|
22127
|
+
});
|
|
22128
|
+
var schema91 = exports_external.object({
|
|
21983
22129
|
subject: exports_external.string().min(1),
|
|
21984
22130
|
bodyContent: exports_external.string().min(1),
|
|
21985
22131
|
bodyContentType: exports_external.enum(["Text", "HTML"]).optional(),
|
|
@@ -21989,9 +22135,8 @@ var schema90 = exports_external.object({
|
|
|
21989
22135
|
importance: exports_external.enum(["Low", "Normal", "High"]).optional(),
|
|
21990
22136
|
mailFolderId: exports_external.string().optional()
|
|
21991
22137
|
});
|
|
21992
|
-
var
|
|
21993
|
-
|
|
21994
|
-
const parsed = schema90.safeParse(params);
|
|
22138
|
+
var execute91 = async (graph, params) => {
|
|
22139
|
+
const parsed = schema91.safeParse(params);
|
|
21995
22140
|
if (!parsed.success)
|
|
21996
22141
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
21997
22142
|
const { subject, bodyContent, bodyContentType, toRecipients, ccRecipients, bccRecipients, importance, mailFolderId } = parsed.data;
|
|
@@ -22012,7 +22157,7 @@ var execute90 = async (graph, params) => {
|
|
|
22012
22157
|
const path = mailFolderId ? `/me/mailFolders/${mailFolderId}/messages` : "/me/messages";
|
|
22013
22158
|
return graph.post(path, body);
|
|
22014
22159
|
};
|
|
22015
|
-
var
|
|
22160
|
+
var meta93 = {
|
|
22016
22161
|
summary: "Create a new mail draft. POST /me/messages (or /me/mailFolders/{id}/messages when --mail-folder-id is set). The draft is saved in the Drafts folder (or the specified folder) and can be sent later via the Outlook client or Graph sendMail. Recipients are comma-separated email addresses. Returns the created message object with its id — use this id with update-mail-draft to modify the draft before sending.",
|
|
22017
22162
|
category: "mail",
|
|
22018
22163
|
graphMethod: "POST",
|
|
@@ -22081,44 +22226,44 @@ var meta92 = {
|
|
|
22081
22226
|
// src/use-cases/commands/create-reply-draft.ts
|
|
22082
22227
|
var exports_create_reply_draft = {};
|
|
22083
22228
|
__export(exports_create_reply_draft, {
|
|
22084
|
-
schema: () =>
|
|
22085
|
-
meta: () =>
|
|
22086
|
-
execute: () =>
|
|
22229
|
+
schema: () => schema92,
|
|
22230
|
+
meta: () => meta94,
|
|
22231
|
+
execute: () => execute92
|
|
22087
22232
|
});
|
|
22088
|
-
var
|
|
22233
|
+
var schema92 = exports_external.object({
|
|
22089
22234
|
replyToMessageId: exports_external.string().min(1),
|
|
22090
22235
|
bodyContent: exports_external.string().min(1),
|
|
22091
|
-
bodyContentType: exports_external.enum(["Text", "HTML"]).optional(),
|
|
22092
22236
|
subject: exports_external.string().optional()
|
|
22093
22237
|
});
|
|
22094
|
-
var
|
|
22095
|
-
var
|
|
22096
|
-
const parsed =
|
|
22238
|
+
var isUnsentDraft2 = (value) => typeof value === "object" && value !== null && ("id" in value) && typeof value.id === "string" && ("isDraft" in value) && value.isDraft === true;
|
|
22239
|
+
var execute92 = async (graph, params) => {
|
|
22240
|
+
const parsed = schema92.safeParse(params);
|
|
22097
22241
|
if (!parsed.success)
|
|
22098
22242
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22099
|
-
const { replyToMessageId, bodyContent,
|
|
22100
|
-
const created = await graph.post(`/me/messages/${replyToMessageId}/createReplyAll`, {});
|
|
22243
|
+
const { replyToMessageId, bodyContent, subject } = parsed.data;
|
|
22244
|
+
const created = await graph.post(`/me/messages/${replyToMessageId}/createReplyAll`, { comment: bodyContent });
|
|
22101
22245
|
if (!created.ok)
|
|
22102
22246
|
return created;
|
|
22103
|
-
if (!
|
|
22247
|
+
if (!isUnsentDraft2(created.value)) {
|
|
22104
22248
|
return err({
|
|
22105
22249
|
type: "api_error",
|
|
22106
22250
|
status: 500,
|
|
22251
|
+
code: "not_an_unsent_draft",
|
|
22107
22252
|
message: `createReplyAll did not return an unsent draft for message ${replyToMessageId} - refusing to patch. Inspect the message id and retry.`
|
|
22108
22253
|
});
|
|
22109
22254
|
}
|
|
22110
|
-
const patch = {
|
|
22111
|
-
body: { contentType: bodyContentType ?? "Text", content: bodyContent }
|
|
22112
|
-
};
|
|
22255
|
+
const patch = {};
|
|
22113
22256
|
if (subject)
|
|
22114
22257
|
patch.subject = subject;
|
|
22258
|
+
if (Object.keys(patch).length === 0)
|
|
22259
|
+
return created;
|
|
22115
22260
|
return graph.patch(`/me/messages/${created.value.id}`, patch);
|
|
22116
22261
|
};
|
|
22117
|
-
var
|
|
22118
|
-
summary: "Create an UNSENT reply-all draft threaded on an existing message. POST /me/messages/{id}/createReplyAll mints the draft (inherited recipients, RE: subject, quoted history)
|
|
22262
|
+
var meta94 = {
|
|
22263
|
+
summary: "Create an UNSENT reply-all draft threaded on an existing message. POST /me/messages/{id}/createReplyAll mints the draft (inherited recipients, RE: subject, quoted history) with your reply text placed above the quote, in one call. Reply-all by design - dropping recipients is a deliberate act for the human in Outlook, not a default. The draft is saved in Drafts and can be reviewed, edited, and sent from any Outlook client; the CLI still cannot send.",
|
|
22119
22264
|
category: "mail",
|
|
22120
22265
|
graphMethod: "POST",
|
|
22121
|
-
graphPathTemplate: "/me/messages/{reply-to-message-id}/createReplyAll (
|
|
22266
|
+
graphPathTemplate: "/me/messages/{reply-to-message-id}/createReplyAll (+ optional body-free PATCH for subject)",
|
|
22122
22267
|
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/message-createreplyall",
|
|
22123
22268
|
options: [
|
|
22124
22269
|
{
|
|
@@ -22133,14 +22278,7 @@ var meta93 = {
|
|
|
22133
22278
|
name: "body-content",
|
|
22134
22279
|
key: "bodyContent",
|
|
22135
22280
|
required: true,
|
|
22136
|
-
description: "The reply text, placed above the quoted history
|
|
22137
|
-
},
|
|
22138
|
-
{
|
|
22139
|
-
name: "body-content-type",
|
|
22140
|
-
key: "bodyContentType",
|
|
22141
|
-
required: false,
|
|
22142
|
-
description: "Reply body format: Text (default) or HTML.",
|
|
22143
|
-
argumentHint: { kind: "magicValue", values: ["Text", "HTML"] }
|
|
22281
|
+
description: "The reply text, placed above the quoted history by Graph."
|
|
22144
22282
|
},
|
|
22145
22283
|
{
|
|
22146
22284
|
name: "subject",
|
|
@@ -22150,7 +22288,7 @@ var meta93 = {
|
|
|
22150
22288
|
}
|
|
22151
22289
|
],
|
|
22152
22290
|
example: 'ask-marcel-office create-reply-draft --reply-to-message-id "AAMkAD..." --body-content "Confirmed for Concur, aligned with the group choice."',
|
|
22153
|
-
bodyTemplate: "POST {
|
|
22291
|
+
bodyTemplate: "POST { comment: '{body-content}' } then optional PATCH { subject?: '{subject}' }",
|
|
22154
22292
|
mutates: true,
|
|
22155
22293
|
scopesRequired: ["Mail.ReadWrite"],
|
|
22156
22294
|
responseShape: "The updated draft message object (or `{ ok: true }` when Graph answers 204): `{ id, subject, body, toRecipients, ccRecipients, isDraft: true, … }`. The `id` is the draft - update further with update-mail-draft, or open Outlook Drafts to review and send."
|
|
@@ -22159,11 +22297,11 @@ var meta93 = {
|
|
|
22159
22297
|
// src/use-cases/commands/update-mail-draft.ts
|
|
22160
22298
|
var exports_update_mail_draft = {};
|
|
22161
22299
|
__export(exports_update_mail_draft, {
|
|
22162
|
-
schema: () =>
|
|
22163
|
-
meta: () =>
|
|
22164
|
-
execute: () =>
|
|
22300
|
+
schema: () => schema93,
|
|
22301
|
+
meta: () => meta95,
|
|
22302
|
+
execute: () => execute93
|
|
22165
22303
|
});
|
|
22166
|
-
var
|
|
22304
|
+
var schema93 = exports_external.object({
|
|
22167
22305
|
messageId: exports_external.string().min(1),
|
|
22168
22306
|
subject: exports_external.string().optional(),
|
|
22169
22307
|
bodyContent: exports_external.string().optional(),
|
|
@@ -22173,9 +22311,8 @@ var schema92 = exports_external.object({
|
|
|
22173
22311
|
bccRecipients: exports_external.string().optional(),
|
|
22174
22312
|
importance: exports_external.enum(["Low", "Normal", "High"]).optional()
|
|
22175
22313
|
});
|
|
22176
|
-
var
|
|
22177
|
-
|
|
22178
|
-
const parsed = schema92.safeParse(params);
|
|
22314
|
+
var execute93 = async (graph, params) => {
|
|
22315
|
+
const parsed = schema93.safeParse(params);
|
|
22179
22316
|
if (!parsed.success)
|
|
22180
22317
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22181
22318
|
const { messageId, subject, bodyContent, bodyContentType, toRecipients, ccRecipients, bccRecipients, importance } = parsed.data;
|
|
@@ -22191,16 +22328,16 @@ var execute92 = async (graph, params) => {
|
|
|
22191
22328
|
if (bodyContent !== undefined)
|
|
22192
22329
|
body.body = { contentType: bodyContentType ?? "Text", content: bodyContent };
|
|
22193
22330
|
if (toRecipients)
|
|
22194
|
-
body.toRecipients =
|
|
22331
|
+
body.toRecipients = parseRecipients(toRecipients);
|
|
22195
22332
|
if (ccRecipients)
|
|
22196
|
-
body.ccRecipients =
|
|
22333
|
+
body.ccRecipients = parseRecipients(ccRecipients);
|
|
22197
22334
|
if (bccRecipients)
|
|
22198
|
-
body.bccRecipients =
|
|
22335
|
+
body.bccRecipients = parseRecipients(bccRecipients);
|
|
22199
22336
|
if (importance)
|
|
22200
22337
|
body.importance = importance;
|
|
22201
22338
|
return graph.patch(`/me/messages/${messageId}`, body);
|
|
22202
22339
|
};
|
|
22203
|
-
var
|
|
22340
|
+
var meta95 = {
|
|
22204
22341
|
summary: "Update an existing mail draft. PATCH /me/messages/{id} — modifies a draft created by create-mail-draft (or any existing draft in the Drafts folder). Only the fields you pass are updated; omitted fields are left unchanged. At least one field must be provided. Returns the updated message object. Use get-mail-message to verify the final state before sending.",
|
|
22205
22342
|
category: "mail",
|
|
22206
22343
|
graphMethod: "PATCH",
|
|
@@ -22270,17 +22407,17 @@ var meta94 = {
|
|
|
22270
22407
|
// src/use-cases/commands/convert-drive-item-zip.ts
|
|
22271
22408
|
var exports_convert_drive_item_zip = {};
|
|
22272
22409
|
__export(exports_convert_drive_item_zip, {
|
|
22273
|
-
schema: () =>
|
|
22274
|
-
meta: () =>
|
|
22275
|
-
execute: () =>
|
|
22410
|
+
schema: () => schema94,
|
|
22411
|
+
meta: () => meta96,
|
|
22412
|
+
execute: () => execute94
|
|
22276
22413
|
});
|
|
22277
|
-
var
|
|
22414
|
+
var schema94 = exports_external.object({
|
|
22278
22415
|
driveId: exports_external.string().min(1),
|
|
22279
22416
|
itemId: exports_external.string().min(1),
|
|
22280
22417
|
includeMetadata: exports_external.enum(["true", "false"]).optional()
|
|
22281
22418
|
});
|
|
22282
|
-
var
|
|
22283
|
-
const parsed =
|
|
22419
|
+
var execute94 = async (graph, params) => {
|
|
22420
|
+
const parsed = schema94.safeParse(params);
|
|
22284
22421
|
if (!parsed.success)
|
|
22285
22422
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22286
22423
|
const { driveId, itemId } = parsed.data;
|
|
@@ -22290,7 +22427,7 @@ var execute93 = async (graph, params) => {
|
|
|
22290
22427
|
return bytes;
|
|
22291
22428
|
return convertZipArchive(bytes.value, includeMetadata);
|
|
22292
22429
|
};
|
|
22293
|
-
var
|
|
22430
|
+
var meta96 = {
|
|
22294
22431
|
summary: "Unzip a `.zip` from a OneDrive / SharePoint item and convert every contained file in one call — so \"read the handover archive\" doesn't need a separate unzip + per-file conversion. Office files (docx/xlsx/pptx/odt/ods/odp and their macro-enabled / template variants) are converted to markdown via the local pipelines; plain-text entries (txt/md/csv/json/yaml/…) are decoded inline; legacy OLE .xls (sheetjs) and .doc (word-extractor, text only) are extracted; an Outlook .msg entry is rendered to markdown (headers + body, with its own attachments converted recursively); PDFs have their text layer extracted (text/plain); images, binaries, nested archives, legacy .ppt, and scanned/image-only PDFs (no text layer) are listed with a note (not unpacked) so one unsupported entry never fails the whole archive. Pass `--include-metadata true` to append each Office file's side-channel metadata block. Capped at 100 entries (the archive is buffered in memory); beyond that the response is flagged `truncated`.",
|
|
22295
22432
|
category: "drive",
|
|
22296
22433
|
graphMethod: "GET",
|
|
@@ -22319,16 +22456,17 @@ var meta95 = {
|
|
|
22319
22456
|
// src/use-cases/commands/convert-local-file.ts
|
|
22320
22457
|
var exports_convert_local_file = {};
|
|
22321
22458
|
__export(exports_convert_local_file, {
|
|
22322
|
-
schema: () =>
|
|
22323
|
-
meta: () =>
|
|
22459
|
+
schema: () => schema95,
|
|
22460
|
+
meta: () => meta97,
|
|
22324
22461
|
executeLocal: () => executeLocal,
|
|
22325
|
-
execute: () =>
|
|
22462
|
+
execute: () => execute95
|
|
22326
22463
|
});
|
|
22327
22464
|
import { basename } from "node:path";
|
|
22328
|
-
var
|
|
22465
|
+
var schema95 = exports_external.object({
|
|
22329
22466
|
path: exports_external.string().min(1),
|
|
22330
22467
|
includeMetadata: exports_external.enum(["true", "false"]).optional(),
|
|
22331
22468
|
inlineImages: exports_external.enum(["true", "false"]).optional(),
|
|
22469
|
+
includeImages: exports_external.enum(["true", "false"]).optional(),
|
|
22332
22470
|
maxCells: exports_external.string().regex(/^[1-9]\d*$/, "must be a positive integer").optional()
|
|
22333
22471
|
});
|
|
22334
22472
|
var LOCAL_HINTS = {
|
|
@@ -22338,12 +22476,13 @@ var LOCAL_HINTS = {
|
|
|
22338
22476
|
generic: (ext) => `${ext} is not a convertible Office/text format. For formats Graph can render (rtf, …), upload the file to OneDrive and use \`download-drive-item-as-pdf\`.`
|
|
22339
22477
|
};
|
|
22340
22478
|
var executeLocal = async (fs, params) => {
|
|
22341
|
-
const parsed =
|
|
22479
|
+
const parsed = schema95.safeParse(params);
|
|
22342
22480
|
if (!parsed.success)
|
|
22343
22481
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22344
22482
|
const { path } = parsed.data;
|
|
22345
22483
|
const includeMetadata = parsed.data.includeMetadata === "true";
|
|
22346
22484
|
const inlineImages = parsed.data.inlineImages === "true";
|
|
22485
|
+
const includeImages = parsed.data.includeImages === "true";
|
|
22347
22486
|
const maxCells = parsed.data.maxCells === undefined ? undefined : Number(parsed.data.maxCells);
|
|
22348
22487
|
const bytes = await fs.readBytes(path);
|
|
22349
22488
|
if (!bytes.ok) {
|
|
@@ -22353,15 +22492,15 @@ var executeLocal = async (fs, params) => {
|
|
|
22353
22492
|
}
|
|
22354
22493
|
const name = basename(path);
|
|
22355
22494
|
if (extensionOf(name) === "zip")
|
|
22356
|
-
return convertZipArchive(bytes.value, includeMetadata);
|
|
22495
|
+
return convertZipArchive(bytes.value, includeMetadata, includeImages);
|
|
22357
22496
|
return bytesToMarkdown(bytes.value, name, { includeMetadata, inlineImages, maxCells }, LOCAL_HINTS);
|
|
22358
22497
|
};
|
|
22359
|
-
var
|
|
22498
|
+
var execute95 = async (_graph, _params) => err({
|
|
22360
22499
|
type: "api_error",
|
|
22361
22500
|
status: 400,
|
|
22362
22501
|
message: "convert-local-file reads the local filesystem, not Graph — call executeLocal(fs, params) with a FileSystem (the CLI wires this automatically)."
|
|
22363
22502
|
});
|
|
22364
|
-
var
|
|
22503
|
+
var meta97 = {
|
|
22365
22504
|
summary: "Convert a file ON DISK to markdown — the only command that never calls Microsoft Graph (works offline, no login). Runs the same local pipelines as `download-drive-item-as-markdown`: docx (mammoth → turndown), xlsx (sheetjs tables, `--max-cells` OOM cap), pptx (per-slide text), odt/ods/odp, csv, pdf (text layer via unpdf), legacy OLE .xls / .doc, Outlook .msg (headers + body, attachments converted recursively), plain-text passthrough — and a `.zip` is unpacked with every contained file converted in one call (legacy GBK / CP437 entry names decoded, not mojibaked). What it canNOT do locally: convert TO pdf, and Loop/Fluid/Whiteboard sources — both need a Graph server round-trip (upload to OneDrive and use the drive-item siblings). Pass `--include-metadata true` for the Office side-channel metadata blocks; `--inline-images true` to embed docx images as base64 data URIs.",
|
|
22366
22505
|
category: "meta",
|
|
22367
22506
|
graphMethod: "GET",
|
|
@@ -22388,6 +22527,13 @@ var meta96 = {
|
|
|
22388
22527
|
description: "Pass `--inline-images true` to embed a docx's images as base64 `data:` URIs. Default `false` — each image becomes an `[image: <alt>]` placeholder. No-op on non-docx sources.",
|
|
22389
22528
|
argumentHint: { kind: "magicValue", values: ["true", "false"] }
|
|
22390
22529
|
},
|
|
22530
|
+
{
|
|
22531
|
+
name: "include-images",
|
|
22532
|
+
key: "includeImages",
|
|
22533
|
+
required: false,
|
|
22534
|
+
description: "Pass `--include-images true` (a `.zip` only) to also extract each archive entry’s embedded images (docx/xlsx/pptx OOXML media parts, pdf page images) — every entry gains an `images: [{ path, contentType, sizeBytes, base64 }]` array (the same shape `extract-*-images` returns). Best-effort: an entry that carries no extractable images has no `images` key. Default `false`. Lets a caller OCR a secret pasted as a screenshot inside a zipped document.",
|
|
22535
|
+
argumentHint: { kind: "magicValue", values: ["true", "false"] }
|
|
22536
|
+
},
|
|
22391
22537
|
{
|
|
22392
22538
|
name: "max-cells",
|
|
22393
22539
|
key: "maxCells",
|
|
@@ -22396,23 +22542,23 @@ var meta96 = {
|
|
|
22396
22542
|
}
|
|
22397
22543
|
],
|
|
22398
22544
|
example: "ask-marcel-office convert-local-file --path ./report.docx",
|
|
22399
|
-
responseShape: '`{ contentType: "text/markdown" | "text/plain", size, text }` for a single file; `{ count, files: [{ path, contentType, size, text } | { path, note }] }` for a `.zip` (one entry per contained file, unsupported entries noted). A missing file returns api_error 404 with the path. Pair with the global `--output-path` to land the markdown on disk.',
|
|
22545
|
+
responseShape: '`{ contentType: "text/markdown" | "text/plain", size, text }` for a single file; `{ count, files: [{ path, contentType, size, text } | { path, note }] }` for a `.zip` (one entry per contained file, unsupported entries noted). With `--include-images true` each `.zip` entry also carries `images: [{ path, contentType, sizeBytes, base64 }]` when it has extractable embedded images. A missing file returns api_error 404 with the path. Pair with the global `--output-path` to land the markdown on disk.',
|
|
22400
22546
|
producesBytes: true
|
|
22401
22547
|
};
|
|
22402
22548
|
|
|
22403
22549
|
// src/use-cases/commands/extract-local-file-images.ts
|
|
22404
22550
|
var exports_extract_local_file_images = {};
|
|
22405
22551
|
__export(exports_extract_local_file_images, {
|
|
22406
|
-
schema: () =>
|
|
22407
|
-
meta: () =>
|
|
22552
|
+
schema: () => schema96,
|
|
22553
|
+
meta: () => meta98,
|
|
22408
22554
|
executeLocal: () => executeLocal2,
|
|
22409
|
-
execute: () =>
|
|
22555
|
+
execute: () => execute96
|
|
22410
22556
|
});
|
|
22411
22557
|
import { basename as basename2 } from "node:path";
|
|
22412
|
-
var
|
|
22558
|
+
var schema96 = exports_external.object({ path: exports_external.string().min(1) });
|
|
22413
22559
|
var FETCH_HINT3 = "The file is already on disk — read it directly with a vision-capable model, or convert its body with `convert-local-file`.";
|
|
22414
22560
|
var executeLocal2 = async (fs, params) => {
|
|
22415
|
-
const parsed =
|
|
22561
|
+
const parsed = schema96.safeParse(params);
|
|
22416
22562
|
if (!parsed.success)
|
|
22417
22563
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22418
22564
|
const { path } = parsed.data;
|
|
@@ -22424,12 +22570,12 @@ var executeLocal2 = async (fs, params) => {
|
|
|
22424
22570
|
}
|
|
22425
22571
|
return extractImagesFromBytes(bytes.value, basename2(path), FETCH_HINT3);
|
|
22426
22572
|
};
|
|
22427
|
-
var
|
|
22573
|
+
var execute96 = async (_graph, _params) => err({
|
|
22428
22574
|
type: "api_error",
|
|
22429
22575
|
status: 400,
|
|
22430
22576
|
message: "extract-local-file-images reads the local filesystem, not Graph — call executeLocal(fs, params) with a FileSystem (the CLI wires this automatically)."
|
|
22431
22577
|
});
|
|
22432
|
-
var
|
|
22578
|
+
var meta98 = {
|
|
22433
22579
|
summary: "Extract the embedded images from a file ON DISK — the local sibling of `extract-drive-item-images`, and like `convert-local-file` it never calls Microsoft Graph (works offline, no login). Same per-extension dispatch: docx / xlsx / pptx (and their macro-enabled / template variants) have their OOXML media parts read directly (png/jpg/gif/bmp/tiff/webp/svg — full-resolution originals, including images on hidden slides); a pdf is walked page by page via unpdf with each painted image re-encoded as PNG. Two flows only this command completes: a Graph-rendered PDF saved locally (legacy `.ppt` → `download-drive-item-as-pdf` with the global output-path flag → this command pulls the slide images for OCR), and Office files unpacked from a local archive. Pair with the global output-dir flag to write every image to a folder; otherwise the bytes ride back base64-encoded. Any other extension returns a 415 naming the local ways out.",
|
|
22434
22580
|
category: "meta",
|
|
22435
22581
|
graphMethod: "GET",
|
|
@@ -22451,17 +22597,17 @@ var meta97 = {
|
|
|
22451
22597
|
// src/use-cases/commands/convert-mail-attachment-zip.ts
|
|
22452
22598
|
var exports_convert_mail_attachment_zip = {};
|
|
22453
22599
|
__export(exports_convert_mail_attachment_zip, {
|
|
22454
|
-
schema: () =>
|
|
22455
|
-
meta: () =>
|
|
22456
|
-
execute: () =>
|
|
22600
|
+
schema: () => schema97,
|
|
22601
|
+
meta: () => meta99,
|
|
22602
|
+
execute: () => execute97
|
|
22457
22603
|
});
|
|
22458
|
-
var
|
|
22604
|
+
var schema97 = exports_external.object({
|
|
22459
22605
|
messageId: exports_external.string().min(1),
|
|
22460
22606
|
attachmentId: exports_external.string().min(1),
|
|
22461
22607
|
includeMetadata: exports_external.enum(["true", "false"]).optional()
|
|
22462
22608
|
});
|
|
22463
|
-
var
|
|
22464
|
-
const parsed =
|
|
22609
|
+
var execute97 = async (graph, params) => {
|
|
22610
|
+
const parsed = schema97.safeParse(params);
|
|
22465
22611
|
if (!parsed.success)
|
|
22466
22612
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22467
22613
|
const { messageId, attachmentId } = parsed.data;
|
|
@@ -22484,7 +22630,7 @@ var execute96 = async (graph, params) => {
|
|
|
22484
22630
|
}
|
|
22485
22631
|
return convertZipArchive(base64ToBytes(contentBytes), includeMetadata);
|
|
22486
22632
|
};
|
|
22487
|
-
var
|
|
22633
|
+
var meta99 = {
|
|
22488
22634
|
summary: "Unzip a `.zip` Outlook mail attachment and convert every contained file in one call — the mail-side mirror of `convert-drive-item-zip`, so reading a zipped vendor deck doesn't need `get-mail-attachment` + manual `unzip` + per-file conversion. Pulls the fileAttachment bytes, unzips them (legacy GBK / CP437 entry names — Chinese vendor archives written by WinRAR / Windows Explorer — are decoded correctly, not mojibaked), and runs each file through the local pipelines: Office files (docx/xlsx/pptx/odt/ods/odp and macro-enabled / template variants) → markdown; plain-text entries decoded inline; legacy OLE .xls (sheetjs) and .doc (word-extractor, text only) extracted; an inner Outlook .msg rendered; PDFs have their text layer extracted; images, binaries, nested archives, legacy .ppt, and scanned/image-only PDFs are listed with a note (not unpacked) so one unsupported entry never fails the whole archive. Pass `--include-metadata true` to append each Office file's side-channel metadata block. Capped at 100 entries; beyond that the response is flagged `truncated`. itemAttachment / referenceAttachment are rejected (no inline zip payload).",
|
|
22489
22635
|
category: "mail",
|
|
22490
22636
|
graphMethod: "GET",
|
|
@@ -22508,13 +22654,13 @@ var meta98 = {
|
|
|
22508
22654
|
// src/use-cases/commands/extract-sharepoint-links-in-documents.ts
|
|
22509
22655
|
var exports_extract_sharepoint_links_in_documents = {};
|
|
22510
22656
|
__export(exports_extract_sharepoint_links_in_documents, {
|
|
22511
|
-
schema: () =>
|
|
22512
|
-
meta: () =>
|
|
22513
|
-
execute: () =>
|
|
22657
|
+
schema: () => schema98,
|
|
22658
|
+
meta: () => meta100,
|
|
22659
|
+
execute: () => execute98
|
|
22514
22660
|
});
|
|
22515
|
-
var
|
|
22516
|
-
var
|
|
22517
|
-
const parsed =
|
|
22661
|
+
var schema98 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
22662
|
+
var execute98 = async (graph, params) => {
|
|
22663
|
+
const parsed = schema98.safeParse(params);
|
|
22518
22664
|
if (!parsed.success)
|
|
22519
22665
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22520
22666
|
const { driveId, itemId } = parsed.data;
|
|
@@ -22536,7 +22682,7 @@ var execute97 = async (graph, params) => {
|
|
|
22536
22682
|
const { links, truncated, skippedCount } = await resolveSharepointUrls(graph, extractSharepointUrls(haystack));
|
|
22537
22683
|
return ok({ driveId, itemId, links, truncated, skippedCount });
|
|
22538
22684
|
};
|
|
22539
|
-
var
|
|
22685
|
+
var meta100 = {
|
|
22540
22686
|
summary: 'Find every `*.sharepoint.com` URL embedded in a Word / Excel / PowerPoint or OpenDocument file on OneDrive or SharePoint and resolve each one to its driveItem (driveId, itemId, name, webUrl) so the agent can feed those into `download-drive-item-as-pdf` / `-as-markdown` etc. The document sibling of `extract-sharepoint-links-in-mail`. For OOXML (.docx/.xlsx/.pptx) it reads external hyperlinks from the package’s relationship parts (`_rels/*.rels`, `TargetMode="External"`); for OpenDocument (.odt/.ods/.odp) it reads the inline `xlink:href` links in content.xml / styles.xml — either way it catches links wherever they live (body text, headers/footers, cell formulas, slide shapes). Read-only — no conversion happens here. Capped at 25 unique URLs per call (returns `truncated: true` and `skippedCount` when there are more); duplicates are deduplicated; per-link errors are captured inside each entry instead of failing the whole call. Non-zip inputs (pdf/images) return an api_error.',
|
|
22541
22687
|
category: "drive",
|
|
22542
22688
|
graphMethod: "GET",
|
|
@@ -22563,13 +22709,13 @@ var meta99 = {
|
|
|
22563
22709
|
// src/use-cases/commands/extract-sharepoint-links-in-mail.ts
|
|
22564
22710
|
var exports_extract_sharepoint_links_in_mail = {};
|
|
22565
22711
|
__export(exports_extract_sharepoint_links_in_mail, {
|
|
22566
|
-
schema: () =>
|
|
22567
|
-
meta: () =>
|
|
22568
|
-
execute: () =>
|
|
22712
|
+
schema: () => schema99,
|
|
22713
|
+
meta: () => meta101,
|
|
22714
|
+
execute: () => execute99
|
|
22569
22715
|
});
|
|
22570
|
-
var
|
|
22571
|
-
var
|
|
22572
|
-
const parsed =
|
|
22716
|
+
var schema99 = exports_external.object({ messageId: exports_external.string().min(1) });
|
|
22717
|
+
var execute99 = async (graph, params) => {
|
|
22718
|
+
const parsed = schema99.safeParse(params);
|
|
22573
22719
|
if (!parsed.success)
|
|
22574
22720
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22575
22721
|
const { messageId } = parsed.data;
|
|
@@ -22587,7 +22733,7 @@ var execute98 = async (graph, params) => {
|
|
|
22587
22733
|
skippedCount
|
|
22588
22734
|
});
|
|
22589
22735
|
};
|
|
22590
|
-
var
|
|
22736
|
+
var meta101 = {
|
|
22591
22737
|
summary: "Find every `*.sharepoint.com` URL in the body of a single Outlook email and resolve each one to its driveItem (driveId, itemId, name, webUrl) so the agent can feed those into `download-drive-item-as-pdf` / `-as-markdown` etc. Read-only — no conversion happens here. Capped at 25 unique URLs per call to bound fan-out (returns `truncated: true` and `skippedCount` when the body has more); duplicate URLs are deduplicated. Per-link errors are captured inside each entry instead of failing the whole call.",
|
|
22592
22738
|
category: "mail",
|
|
22593
22739
|
graphMethod: "GET",
|
|
@@ -22609,15 +22755,15 @@ var meta100 = {
|
|
|
22609
22755
|
// src/use-cases/commands/list-chats.ts
|
|
22610
22756
|
var exports_list_chats = {};
|
|
22611
22757
|
__export(exports_list_chats, {
|
|
22612
|
-
schema: () =>
|
|
22613
|
-
meta: () =>
|
|
22614
|
-
execute: () =>
|
|
22758
|
+
schema: () => schema100,
|
|
22759
|
+
meta: () => meta102,
|
|
22760
|
+
execute: () => execute100
|
|
22615
22761
|
});
|
|
22616
22762
|
var DEFAULT_SELECT7 = "id,topic,chatType,createdDateTime,lastUpdatedDateTime";
|
|
22617
22763
|
var baseSchema49 = exports_external.object({}).strict();
|
|
22618
22764
|
var CHATS_ODATA_KEYS = ["top", "skip", "select", "filter"];
|
|
22619
|
-
var { execute:
|
|
22620
|
-
var
|
|
22765
|
+
var { execute: execute100, schema: schema100 } = buildElevatedPickODataListCommand(() => "/me/chats", baseSchema49, CHATS_ODATA_KEYS, { defaultSelect: DEFAULT_SELECT7 });
|
|
22766
|
+
var meta102 = {
|
|
22621
22767
|
summary: "List the signed-in user's Microsoft Teams chats (1:1, group, and meeting chats). The CLI ships a slim default `--select=id,topic,chatType,createdDateTime,lastUpdatedDateTime`; pass `--select id,topic,webUrl,...` to widen. Returns chat metadata only — reading chat *messages* needs `Chat.Read*` which neither token grants. Requires the M365ChatClient elevated token captured at login (the basic Teams web client token lacks `Chat.ReadBasic`). Graph rejects `$orderby` and hangs on `$expand` for this endpoint, so the CLI advertises only the subset Graph honours (`--top`, `--skip`, `--select`, `--filter`).",
|
|
22622
22768
|
category: "chats",
|
|
22623
22769
|
graphMethod: "GET",
|
|
@@ -22633,14 +22779,14 @@ var meta101 = {
|
|
|
22633
22779
|
// src/use-cases/commands/get-chat.ts
|
|
22634
22780
|
var exports_get_chat = {};
|
|
22635
22781
|
__export(exports_get_chat, {
|
|
22636
|
-
schema: () =>
|
|
22637
|
-
meta: () =>
|
|
22638
|
-
execute: () =>
|
|
22782
|
+
schema: () => schema101,
|
|
22783
|
+
meta: () => meta103,
|
|
22784
|
+
execute: () => execute101
|
|
22639
22785
|
});
|
|
22640
22786
|
var DEFAULT_SELECT8 = "id,topic,chatType,createdDateTime,lastUpdatedDateTime";
|
|
22641
22787
|
var baseSchema50 = exports_external.object({ chatId: exports_external.string().min(1) });
|
|
22642
|
-
var { execute:
|
|
22643
|
-
var
|
|
22788
|
+
var { execute: execute101, schema: schema101 } = buildElevatedSelectableCommand((p) => `/chats/${p.chatId}`, baseSchema50, { defaultSelect: DEFAULT_SELECT8 });
|
|
22789
|
+
var meta103 = {
|
|
22644
22790
|
summary: "Return metadata for a single Microsoft Teams chat (1:1, group, or meeting). The CLI ships a slim default `--select=id,topic,chatType,createdDateTime,lastUpdatedDateTime`; pass `--select id,topic,webUrl,onlineMeetingInfo` (or any other comma-separated field list) to widen. Pass `--expand members` to inline membership. Returns metadata only — not the messages (which need `Chat.Read*`). Requires the M365ChatClient elevated token captured at login (the basic Teams web client token lacks `Chat.ReadBasic`).",
|
|
22645
22791
|
category: "chats",
|
|
22646
22792
|
graphMethod: "GET",
|
|
@@ -22664,17 +22810,17 @@ var meta102 = {
|
|
|
22664
22810
|
// src/use-cases/commands/list-teams-chats-with-messages.ts
|
|
22665
22811
|
var exports_list_teams_chats_with_messages = {};
|
|
22666
22812
|
__export(exports_list_teams_chats_with_messages, {
|
|
22667
|
-
schema: () =>
|
|
22668
|
-
meta: () =>
|
|
22669
|
-
execute: () =>
|
|
22813
|
+
schema: () => schema102,
|
|
22814
|
+
meta: () => meta104,
|
|
22815
|
+
execute: () => execute102
|
|
22670
22816
|
});
|
|
22671
|
-
var
|
|
22817
|
+
var schema102 = exports_external.object({
|
|
22672
22818
|
pageSize: exports_external.string().regex(/^[1-9]\d*$/, "must be a positive integer").optional(),
|
|
22673
22819
|
continuationToken: exports_external.string().min(1).optional()
|
|
22674
22820
|
});
|
|
22675
22821
|
var QUERY_BASE = "enableMembershipSummary=true&supportsAdditionalSystemGeneratedFolders=true&supportsSliceItems=true&enableEngageCommunities=false";
|
|
22676
|
-
var
|
|
22677
|
-
const parsed =
|
|
22822
|
+
var execute102 = async (graph, params) => {
|
|
22823
|
+
const parsed = schema102.safeParse(params);
|
|
22678
22824
|
if (!parsed.success)
|
|
22679
22825
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22680
22826
|
const pageSize = parsed.data.pageSize ?? "100";
|
|
@@ -22683,7 +22829,7 @@ var execute101 = async (graph, params) => {
|
|
|
22683
22829
|
qs.set("continuationToken", parsed.data.continuationToken);
|
|
22684
22830
|
return graph.teamsChat(`/api/v3/teams/users/me/chats?${qs.toString()}&${QUERY_BASE}`);
|
|
22685
22831
|
};
|
|
22686
|
-
var
|
|
22832
|
+
var meta104 = {
|
|
22687
22833
|
summary: "List the signed-in user's Microsoft Teams chats with the last message body inlined per chat. Uses the chatsvcagg-audience bearer captured at login. Paginated via `continuationToken` (default page size 100; pass the response's `continuationToken` back as `--continuation-token` while `hasMoreData: true`). **Best-effort, may break on Microsoft client updates**: the chat substrate is not part of the public Microsoft Graph API; Microsoft can change route shapes without notice. Caller Graph scopes do NOT matter here; the substrate server gates access on the appid + identity, not on Graph scopes.",
|
|
22688
22834
|
category: "chats",
|
|
22689
22835
|
needsSubstrateToken: true,
|
|
@@ -22712,21 +22858,21 @@ var meta103 = {
|
|
|
22712
22858
|
// src/use-cases/commands/list-teams-chat-messages.ts
|
|
22713
22859
|
var exports_list_teams_chat_messages = {};
|
|
22714
22860
|
__export(exports_list_teams_chat_messages, {
|
|
22715
|
-
schema: () =>
|
|
22716
|
-
meta: () =>
|
|
22717
|
-
execute: () =>
|
|
22861
|
+
schema: () => schema103,
|
|
22862
|
+
meta: () => meta105,
|
|
22863
|
+
execute: () => execute103
|
|
22718
22864
|
});
|
|
22719
|
-
var
|
|
22865
|
+
var schema103 = exports_external.object({
|
|
22720
22866
|
chatId: exports_external.string().min(1)
|
|
22721
22867
|
});
|
|
22722
|
-
var
|
|
22723
|
-
const parsed =
|
|
22868
|
+
var execute103 = async (graph, params) => {
|
|
22869
|
+
const parsed = schema103.safeParse(params);
|
|
22724
22870
|
if (!parsed.success)
|
|
22725
22871
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22726
22872
|
const { chatId } = parsed.data;
|
|
22727
22873
|
return graph.teamsChat(`/api/v1/chats/${encodeURIComponent(chatId)}/messages`);
|
|
22728
22874
|
};
|
|
22729
|
-
var
|
|
22875
|
+
var meta105 = {
|
|
22730
22876
|
summary: "List the most recent messages in a single Microsoft Teams chat via the chat substrate. Companion to `list-teams-chats-with-messages` when the inlined `lastMessage` isn't deep enough. Uses the chatsvcagg-audience bearer captured at login. **Best-effort, may break on Microsoft client updates** — the chat substrate is not in the public Microsoft Graph API. **No pagination**: the route caps at the 200 most recent messages per chat and the CLI cannot reach older history (Teams web itself uses WebSockets for scrollback, and the official `Chat.Read` Graph scope that would enable paginated reads is outside the appid's scope ceiling).",
|
|
22731
22877
|
category: "chats",
|
|
22732
22878
|
needsSubstrateToken: true,
|
|
@@ -22750,11 +22896,11 @@ var meta104 = {
|
|
|
22750
22896
|
// src/use-cases/commands/list-teams-chat-history.ts
|
|
22751
22897
|
var exports_list_teams_chat_history = {};
|
|
22752
22898
|
__export(exports_list_teams_chat_history, {
|
|
22753
|
-
schema: () =>
|
|
22754
|
-
meta: () =>
|
|
22755
|
-
execute: () =>
|
|
22899
|
+
schema: () => schema104,
|
|
22900
|
+
meta: () => meta106,
|
|
22901
|
+
execute: () => execute104
|
|
22756
22902
|
});
|
|
22757
|
-
var
|
|
22903
|
+
var schema104 = exports_external.object({
|
|
22758
22904
|
chatId: exports_external.string().min(1),
|
|
22759
22905
|
syncState: exports_external.url().optional(),
|
|
22760
22906
|
pageSize: exports_external.string().regex(/^[1-9]\d*$/, "must be a positive integer").optional(),
|
|
@@ -22786,8 +22932,8 @@ var toRelativePath = (absoluteUrl) => {
|
|
|
22786
22932
|
throw new Error(`unexpected syncState URL shape: ${absoluteUrl}`);
|
|
22787
22933
|
return m[1];
|
|
22788
22934
|
};
|
|
22789
|
-
var
|
|
22790
|
-
const parsed =
|
|
22935
|
+
var execute104 = async (graph, params) => {
|
|
22936
|
+
const parsed = schema104.safeParse(params);
|
|
22791
22937
|
if (!parsed.success)
|
|
22792
22938
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22793
22939
|
const { chatId } = parsed.data;
|
|
@@ -22824,7 +22970,7 @@ var execute103 = async (graph, params) => {
|
|
|
22824
22970
|
projection: fullMode ? "full" : "slim"
|
|
22825
22971
|
});
|
|
22826
22972
|
};
|
|
22827
|
-
var
|
|
22973
|
+
var meta106 = {
|
|
22828
22974
|
summary: "Deep read of a Microsoft Teams chat's message history via the IC3 substrate (`teams.microsoft.com/api/chatsvc/<region>/v1/...`). Unlike `list-teams-chat-messages` (which caps at the 200 most recent messages with no working pagination cursor), this command follows the server-provided `_metadata.syncState` URL backward through history, fetching up to `--page-size` * `--max-pages` messages per invocation (default 200 * 20 = 4000). Uses the IC3-audience bearer captured at login (same Teams web client identity as the basic Teams token). The CLI ships a slim default projection — each message is reduced to `id, sequenceId, composetime, originalarrivaltime, messagetype, from, imdisplayname, content` and `content` is truncated to 4096 chars (with `truncated: true` and `originalContentChars` set on the affected entries). Pass `--full true` to opt out of projection and truncation; pass `--max-content-chars N` to override the truncation cap. **Best-effort, may break on Microsoft client updates** — the IC3 substrate is not in the public Microsoft Graph API. To page beyond `--max-pages`, take the response's `nextSyncState` and pass it back as `--sync-state` on the next call.",
|
|
22829
22975
|
category: "chats",
|
|
22830
22976
|
needsSubstrateToken: true,
|
|
@@ -22878,22 +23024,22 @@ var meta105 = {
|
|
|
22878
23024
|
// src/use-cases/commands/get-teams-chat-message.ts
|
|
22879
23025
|
var exports_get_teams_chat_message = {};
|
|
22880
23026
|
__export(exports_get_teams_chat_message, {
|
|
22881
|
-
schema: () =>
|
|
22882
|
-
meta: () =>
|
|
22883
|
-
execute: () =>
|
|
23027
|
+
schema: () => schema105,
|
|
23028
|
+
meta: () => meta107,
|
|
23029
|
+
execute: () => execute105
|
|
22884
23030
|
});
|
|
22885
|
-
var
|
|
23031
|
+
var schema105 = exports_external.object({
|
|
22886
23032
|
chatId: exports_external.string().min(1),
|
|
22887
23033
|
messageId: exports_external.string().min(1)
|
|
22888
23034
|
});
|
|
22889
|
-
var
|
|
22890
|
-
const parsed =
|
|
23035
|
+
var execute105 = async (graph, params) => {
|
|
23036
|
+
const parsed = schema105.safeParse(params);
|
|
22891
23037
|
if (!parsed.success)
|
|
22892
23038
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22893
23039
|
const { chatId, messageId } = parsed.data;
|
|
22894
23040
|
return graph.teamsChat(`/api/v1/chats/${encodeURIComponent(chatId)}/messages/${encodeURIComponent(messageId)}`);
|
|
22895
23041
|
};
|
|
22896
|
-
var
|
|
23042
|
+
var meta107 = {
|
|
22897
23043
|
summary: "Return a single Microsoft Teams chat message by its id via the chat substrate. Uses the chatsvcagg-audience bearer captured at login (same identity as the basic Teams token, different audience). **Best-effort, may break on Microsoft client updates** — the chat substrate is not in the public Microsoft Graph API. Source the chat-id + message-id via `list-teams-chats-with-messages` or `list-teams-chat-messages`.",
|
|
22898
23044
|
category: "chats",
|
|
22899
23045
|
needsSubstrateToken: true,
|
|
@@ -22912,9 +23058,9 @@ var meta106 = {
|
|
|
22912
23058
|
// src/use-cases/commands/resolve-teams-link.ts
|
|
22913
23059
|
var exports_resolve_teams_link = {};
|
|
22914
23060
|
__export(exports_resolve_teams_link, {
|
|
22915
|
-
schema: () =>
|
|
22916
|
-
meta: () =>
|
|
22917
|
-
execute: () =>
|
|
23061
|
+
schema: () => schema106,
|
|
23062
|
+
meta: () => meta108,
|
|
23063
|
+
execute: () => execute106
|
|
22918
23064
|
});
|
|
22919
23065
|
|
|
22920
23066
|
// src/use-cases/commands/link-shape.ts
|
|
@@ -22941,7 +23087,7 @@ var detectSiblingResolver = (raw) => {
|
|
|
22941
23087
|
};
|
|
22942
23088
|
|
|
22943
23089
|
// src/use-cases/commands/resolve-teams-link.ts
|
|
22944
|
-
var
|
|
23090
|
+
var schema106 = exports_external.object({
|
|
22945
23091
|
url: exports_external.url()
|
|
22946
23092
|
});
|
|
22947
23093
|
var PREFIX2 = "https://teams.microsoft.com/l/message/";
|
|
@@ -22977,8 +23123,8 @@ var parse5 = (raw) => {
|
|
|
22977
23123
|
...optional2
|
|
22978
23124
|
};
|
|
22979
23125
|
};
|
|
22980
|
-
var
|
|
22981
|
-
const parsed =
|
|
23126
|
+
var execute106 = async (_graph, params) => {
|
|
23127
|
+
const parsed = schema106.safeParse(params);
|
|
22982
23128
|
if (!parsed.success)
|
|
22983
23129
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
22984
23130
|
const sibling = detectSiblingResolver(parsed.data.url);
|
|
@@ -23012,7 +23158,7 @@ var execute105 = async (_graph, params) => {
|
|
|
23012
23158
|
}
|
|
23013
23159
|
return ok(resolved);
|
|
23014
23160
|
};
|
|
23015
|
-
var
|
|
23161
|
+
var meta108 = {
|
|
23016
23162
|
summary: "Parse a Microsoft Teams `Copy link` URL (the share link emitted by the message context menu in Teams) into its `chatId` + `messageId` components. Pure transformation — no Graph call. Pipe the result into `get-teams-chat-message` to fetch the message body, or into `list-teams-chat-history` to read the chat that contains it.",
|
|
23017
23163
|
category: "chats",
|
|
23018
23164
|
graphMethod: "GET",
|
|
@@ -23033,11 +23179,11 @@ var meta107 = {
|
|
|
23033
23179
|
// src/use-cases/commands/resolve-mail-link.ts
|
|
23034
23180
|
var exports_resolve_mail_link = {};
|
|
23035
23181
|
__export(exports_resolve_mail_link, {
|
|
23036
|
-
schema: () =>
|
|
23037
|
-
meta: () =>
|
|
23038
|
-
execute: () =>
|
|
23182
|
+
schema: () => schema107,
|
|
23183
|
+
meta: () => meta109,
|
|
23184
|
+
execute: () => execute107
|
|
23039
23185
|
});
|
|
23040
|
-
var
|
|
23186
|
+
var schema107 = exports_external.object({
|
|
23041
23187
|
url: exports_external.url()
|
|
23042
23188
|
});
|
|
23043
23189
|
var OUTLOOK_HOSTS2 = ["outlook.office.com", "outlook.office365.com", "outlook.live.com"];
|
|
@@ -23083,8 +23229,8 @@ var parse6 = (raw) => {
|
|
|
23083
23229
|
return { kind: "ok", value: { messageId: decodeURIComponent(pathId) } };
|
|
23084
23230
|
return { kind: "unknown" };
|
|
23085
23231
|
};
|
|
23086
|
-
var
|
|
23087
|
-
const parsed =
|
|
23232
|
+
var execute107 = async (_graph, params) => {
|
|
23233
|
+
const parsed = schema107.safeParse(params);
|
|
23088
23234
|
if (!parsed.success)
|
|
23089
23235
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
23090
23236
|
const outcome = parse6(parsed.data.url);
|
|
@@ -23109,7 +23255,7 @@ var execute106 = async (_graph, params) => {
|
|
|
23109
23255
|
message: `--url: not an Outlook mail link. Expected shapes: \`https://outlook.office.com/owa/?itemid=AAMkA...\`, \`https://outlook.office.com/mail/inbox/id/AAMkA...\`, or \`https://outlook.office.com/mail/AAMkA...\`. Hosts accepted: ${OUTLOOK_HOSTS2.join(", ")}.`
|
|
23110
23256
|
});
|
|
23111
23257
|
};
|
|
23112
|
-
var
|
|
23258
|
+
var meta109 = {
|
|
23113
23259
|
summary: 'Parse a Microsoft Outlook web mail link (the URL emitted by the "Copy link" / address-bar share of an email) into its `messageId`. Pure transformation — no Graph call. Pipe the result into `get-mail-message` to fetch the body, or `convert-mail-to-markdown` to render it. For Outlook calendar links use `resolve-calendar-link` instead — this command rejects them with a pointer.',
|
|
23114
23260
|
category: "mail",
|
|
23115
23261
|
graphMethod: "GET",
|
|
@@ -23130,11 +23276,11 @@ var meta108 = {
|
|
|
23130
23276
|
// src/use-cases/commands/resolve-drive-share-link.ts
|
|
23131
23277
|
var exports_resolve_drive_share_link = {};
|
|
23132
23278
|
__export(exports_resolve_drive_share_link, {
|
|
23133
|
-
schema: () =>
|
|
23134
|
-
meta: () =>
|
|
23135
|
-
execute: () =>
|
|
23279
|
+
schema: () => schema108,
|
|
23280
|
+
meta: () => meta110,
|
|
23281
|
+
execute: () => execute108
|
|
23136
23282
|
});
|
|
23137
|
-
var
|
|
23283
|
+
var schema108 = exports_external.object({
|
|
23138
23284
|
url: exports_external.url()
|
|
23139
23285
|
});
|
|
23140
23286
|
var ACCEPTED_HOST_PATTERNS = [
|
|
@@ -23153,8 +23299,8 @@ var parse7 = (raw) => {
|
|
|
23153
23299
|
originalUrl: raw
|
|
23154
23300
|
};
|
|
23155
23301
|
};
|
|
23156
|
-
var
|
|
23157
|
-
const parsed =
|
|
23302
|
+
var execute108 = async (_graph, params) => {
|
|
23303
|
+
const parsed = schema108.safeParse(params);
|
|
23158
23304
|
if (!parsed.success)
|
|
23159
23305
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
23160
23306
|
const sibling = detectSiblingResolver(parsed.data.url);
|
|
@@ -23188,7 +23334,7 @@ var execute107 = async (_graph, params) => {
|
|
|
23188
23334
|
}
|
|
23189
23335
|
return ok(resolved);
|
|
23190
23336
|
};
|
|
23191
|
-
var
|
|
23337
|
+
var meta110 = {
|
|
23192
23338
|
summary: "Encode a OneDrive / SharePoint sharing URL into the Graph `/shares/{token}` share token (`u!<base64url>` per [shares-get](https://learn.microsoft.com/en-us/graph/api/shares-get)). Pure transformation — no Graph call. Pipe the returned `graphPath` (`/shares/{token}/driveItem`) into a sibling lookup (`get-drive-item`, `download-drive-item-content`, `convert-mail-attachment-to-pdf`, etc.) once the file has been resolved to a `driveItem`. Accepts any `*.sharepoint.com` URL (tenant + `*-my.sharepoint.com` personal OneDrive) and Microsoft's short-link host `1drv.ms`.",
|
|
23193
23339
|
category: "drive",
|
|
23194
23340
|
graphMethod: "GET",
|
|
@@ -23209,11 +23355,11 @@ var meta109 = {
|
|
|
23209
23355
|
// src/use-cases/commands/resolve-calendar-link.ts
|
|
23210
23356
|
var exports_resolve_calendar_link = {};
|
|
23211
23357
|
__export(exports_resolve_calendar_link, {
|
|
23212
|
-
schema: () =>
|
|
23213
|
-
meta: () =>
|
|
23214
|
-
execute: () =>
|
|
23358
|
+
schema: () => schema109,
|
|
23359
|
+
meta: () => meta111,
|
|
23360
|
+
execute: () => execute109
|
|
23215
23361
|
});
|
|
23216
|
-
var
|
|
23362
|
+
var schema109 = exports_external.object({
|
|
23217
23363
|
url: exports_external.url()
|
|
23218
23364
|
});
|
|
23219
23365
|
var OUTLOOK_HOSTS3 = ["outlook.office.com", "outlook.office365.com", "outlook.live.com"];
|
|
@@ -23255,8 +23401,8 @@ var parse8 = (raw) => {
|
|
|
23255
23401
|
return { kind: "mail" };
|
|
23256
23402
|
return { kind: "unknown" };
|
|
23257
23403
|
};
|
|
23258
|
-
var
|
|
23259
|
-
const parsed =
|
|
23404
|
+
var execute109 = async (_graph, params) => {
|
|
23405
|
+
const parsed = schema109.safeParse(params);
|
|
23260
23406
|
if (!parsed.success)
|
|
23261
23407
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
23262
23408
|
const outcome = parse8(parsed.data.url);
|
|
@@ -23274,7 +23420,7 @@ var execute108 = async (_graph, params) => {
|
|
|
23274
23420
|
message: `--url: not an Outlook calendar item link. Expected shapes: \`https://outlook.office.com/calendar/item/AAMkA...\` (path-style), or \`https://outlook.office.com/owa/?itemid=AAMkA...&path=/calendar/item\` (OWA query). Hosts accepted: ${OUTLOOK_HOSTS3.join(", ")}.`
|
|
23275
23421
|
});
|
|
23276
23422
|
};
|
|
23277
|
-
var
|
|
23423
|
+
var meta111 = {
|
|
23278
23424
|
summary: 'Parse a Microsoft Outlook calendar item link (the URL emitted by the "Copy link" / share action on a calendar event) into its `eventId`. Pure transformation — no Graph call. Pipe the result into `get-calendar-event` to fetch the event body. For Outlook mail message links use `resolve-mail-link` instead — this command rejects them with a pointer.',
|
|
23279
23425
|
category: "calendar",
|
|
23280
23426
|
graphMethod: "GET",
|
|
@@ -23295,11 +23441,11 @@ var meta110 = {
|
|
|
23295
23441
|
// src/use-cases/commands/find-chats-with-user.ts
|
|
23296
23442
|
var exports_find_chats_with_user = {};
|
|
23297
23443
|
__export(exports_find_chats_with_user, {
|
|
23298
|
-
schema: () =>
|
|
23299
|
-
meta: () =>
|
|
23300
|
-
execute: () =>
|
|
23444
|
+
schema: () => schema110,
|
|
23445
|
+
meta: () => meta112,
|
|
23446
|
+
execute: () => execute110
|
|
23301
23447
|
});
|
|
23302
|
-
var
|
|
23448
|
+
var schema110 = exports_external.object({
|
|
23303
23449
|
name: exports_external.string().min(1),
|
|
23304
23450
|
maxPages: exports_external.string().regex(/^[1-9]\d*$/, "must be a positive integer").optional(),
|
|
23305
23451
|
pageSize: exports_external.string().regex(/^[1-9]\d*$/, "must be a positive integer").optional()
|
|
@@ -23416,8 +23562,8 @@ var hydrateBareDirect = async (graph, queryFolded, bareUnmatched, matched) => {
|
|
|
23416
23562
|
return { chatsHydrated: direct.length, unresolvedMemberCount };
|
|
23417
23563
|
};
|
|
23418
23564
|
var HINT2 = "No chat member matched by name, but at least one chat has a cross-tenant member the Teams roster left unresolved — an externally-homed counterpart often appears only as a bare object-id. Direct 1:1 chats were deep-probed; members in group/meeting chats were not. Retry searching by their object-id (pass it as `--name <object-id>`), or, if you have the chat URL, read it directly with `get-chat` / `list-teams-chat-messages --chat-id 19:<their-oid>_<your-oid>@unq.gbl.spaces`.";
|
|
23419
|
-
var
|
|
23420
|
-
const parsed =
|
|
23565
|
+
var execute110 = async (graph, params) => {
|
|
23566
|
+
const parsed = schema110.safeParse(params);
|
|
23421
23567
|
if (!parsed.success)
|
|
23422
23568
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
23423
23569
|
const queryFolded = fold(parsed.data.name);
|
|
@@ -23441,7 +23587,7 @@ var execute109 = async (graph, params) => {
|
|
|
23441
23587
|
...matched.length === 0 && unresolvedMemberCount > 0 ? { hint: HINT2 } : {}
|
|
23442
23588
|
});
|
|
23443
23589
|
};
|
|
23444
|
-
var
|
|
23590
|
+
var meta112 = {
|
|
23445
23591
|
summary: 'Find every Microsoft Teams chat that includes a member matching `--name` (substring search across display-name, email, given-name, surname, MRI, and object-id). Both sides are Unicode-folded (NFD + combining-mark strip) and lowercased before comparison, so `--name Alex` matches `Alex Kim` AND `alex.kim@example.com` AND `ALEX` — important because a dual-identity user often carries the accented display-name on one identity and the un-accented email on the other. Walks the paginated chat-list substrate up to `--max-pages` and returns matching chats with their `matchedMembers[]`. Collapses the canonical "all conversations with person X" workflow into a single call AND surfaces dual-identity people (e.g. someone with both an org MRI and a guest-tenant MRI). Cross-tenant resolution: the summary roster returns externally-homed counterparts as a bare object-id (no name/email), which a name search cannot match; for every bare DIRECT (1:1) chat the command hydrates the roster via the per-chat members endpoint and re-matches — so an external counterpart who is bare in your 1:1 is still found, even when they were already resolved in some meeting (the dual-identity case). Bare members in group/meeting chats are not deep-probed; when nothing matches and such members exist it returns a `hint` plus `unresolvedMemberCount` rather than a confident empty result. **Best-effort, may break on Microsoft client updates** — the chat substrate is not in the public Microsoft Graph API.',
|
|
23446
23592
|
category: "chats",
|
|
23447
23593
|
needsSubstrateToken: true,
|
|
@@ -23476,20 +23622,20 @@ var meta111 = {
|
|
|
23476
23622
|
// src/use-cases/commands/list-my-direct-reports.ts
|
|
23477
23623
|
var exports_list_my_direct_reports = {};
|
|
23478
23624
|
__export(exports_list_my_direct_reports, {
|
|
23479
|
-
schema: () =>
|
|
23480
|
-
meta: () =>
|
|
23481
|
-
execute: () =>
|
|
23625
|
+
schema: () => schema111,
|
|
23626
|
+
meta: () => meta113,
|
|
23627
|
+
execute: () => execute111
|
|
23482
23628
|
});
|
|
23483
|
-
var
|
|
23484
|
-
var
|
|
23485
|
-
const parsed =
|
|
23629
|
+
var schema111 = exports_external.object({}).strict().extend(odataQuerySchema.shape);
|
|
23630
|
+
var execute111 = async (graph, params) => {
|
|
23631
|
+
const parsed = schema111.safeParse(params);
|
|
23486
23632
|
if (!parsed.success)
|
|
23487
23633
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
23488
23634
|
const headers = parsed.data.orderby !== undefined ? { ConsistencyLevel: "eventual" } : {};
|
|
23489
23635
|
const path = appendOData("/me/directReports", parsed.data);
|
|
23490
23636
|
return graph.get(path, headers);
|
|
23491
23637
|
};
|
|
23492
|
-
var
|
|
23638
|
+
var meta113 = {
|
|
23493
23639
|
summary: "List the signed-in user's direct reports (employees who report to them in the directory). When `--orderby` is supplied the CLI auto-injects the `ConsistencyLevel: eventual` header Graph requires on directory endpoints — otherwise Graph rejects the sort with `Request_UnsupportedQuery`.",
|
|
23494
23640
|
category: "user",
|
|
23495
23641
|
graphMethod: "GET",
|
|
@@ -23504,13 +23650,13 @@ var meta112 = {
|
|
|
23504
23650
|
// src/use-cases/commands/list-user-direct-reports.ts
|
|
23505
23651
|
var exports_list_user_direct_reports = {};
|
|
23506
23652
|
__export(exports_list_user_direct_reports, {
|
|
23507
|
-
schema: () =>
|
|
23508
|
-
meta: () =>
|
|
23509
|
-
execute: () =>
|
|
23653
|
+
schema: () => schema112,
|
|
23654
|
+
meta: () => meta114,
|
|
23655
|
+
execute: () => execute112
|
|
23510
23656
|
});
|
|
23511
23657
|
var baseSchema51 = exports_external.object({ userId: exports_external.string().min(1) });
|
|
23512
|
-
var { execute:
|
|
23513
|
-
var
|
|
23658
|
+
var { execute: execute112, schema: schema112 } = buildListCommand((p) => `/users/${p.userId}/directReports`, baseSchema51);
|
|
23659
|
+
var meta114 = {
|
|
23514
23660
|
summary: "List a specific user's direct reports.",
|
|
23515
23661
|
category: "user",
|
|
23516
23662
|
graphMethod: "GET",
|
|
@@ -23534,13 +23680,13 @@ var meta113 = {
|
|
|
23534
23680
|
// src/use-cases/commands/list-recent-files.ts
|
|
23535
23681
|
var exports_list_recent_files = {};
|
|
23536
23682
|
__export(exports_list_recent_files, {
|
|
23537
|
-
schema: () =>
|
|
23538
|
-
meta: () =>
|
|
23539
|
-
execute: () =>
|
|
23683
|
+
schema: () => schema113,
|
|
23684
|
+
meta: () => meta115,
|
|
23685
|
+
execute: () => execute113
|
|
23540
23686
|
});
|
|
23541
23687
|
var baseSchema52 = exports_external.object({}).strict();
|
|
23542
|
-
var { execute:
|
|
23543
|
-
var
|
|
23688
|
+
var { execute: execute113, schema: schema113 } = buildNoSkipListCommand(() => "/me/drive/recent", baseSchema52);
|
|
23689
|
+
var meta115 = {
|
|
23544
23690
|
summary: "List the signed-in user's most recently used / opened OneDrive and SharePoint files, ranked by Microsoft's recency signal. The strongest single answer to \"what is this user working on right now?\". Note: Graph's recent-files feed is signal-driven and can lag the underlying drive by 24-48 hours — `lastModifiedDateTime` here may be older than the file's true mtime. For \"what is the actual latest version?\" call `list-drive-item-versions` on a specific item.",
|
|
23545
23691
|
category: "drive",
|
|
23546
23692
|
graphMethod: "GET",
|
|
@@ -23556,13 +23702,13 @@ var meta114 = {
|
|
|
23556
23702
|
// src/use-cases/commands/list-shared-with-me.ts
|
|
23557
23703
|
var exports_list_shared_with_me = {};
|
|
23558
23704
|
__export(exports_list_shared_with_me, {
|
|
23559
|
-
schema: () =>
|
|
23560
|
-
meta: () =>
|
|
23561
|
-
execute: () =>
|
|
23705
|
+
schema: () => schema114,
|
|
23706
|
+
meta: () => meta116,
|
|
23707
|
+
execute: () => execute114
|
|
23562
23708
|
});
|
|
23563
|
-
var
|
|
23564
|
-
var { execute:
|
|
23565
|
-
var
|
|
23709
|
+
var schema114 = exports_external.object({}).strict();
|
|
23710
|
+
var { execute: execute114 } = buildCommand(() => "/me/drive/sharedWithMe", schema114);
|
|
23711
|
+
var meta116 = {
|
|
23566
23712
|
summary: "List driveItems shared with the signed-in user (typically by colleagues). Each entry includes the original drive + item ID under `remoteItem` so you can chain into `get-drive-item`, `download-drive-item-content`, etc. Note: Graph does NOT honor any OData query parameters on this endpoint (top/select/filter/etc. are all silently ignored), so the CLI does not advertise them. The full collection (~500 items in a typical tenant) is always returned; slice client-side or pair with the global output-path flag to land the raw JSON on disk.",
|
|
23567
23713
|
category: "drive",
|
|
23568
23714
|
graphMethod: "GET",
|
|
@@ -23576,13 +23722,13 @@ var meta115 = {
|
|
|
23576
23722
|
// src/use-cases/commands/list-recently-used-insights.ts
|
|
23577
23723
|
var exports_list_recently_used_insights = {};
|
|
23578
23724
|
__export(exports_list_recently_used_insights, {
|
|
23579
|
-
schema: () =>
|
|
23580
|
-
meta: () =>
|
|
23581
|
-
execute: () =>
|
|
23725
|
+
schema: () => schema115,
|
|
23726
|
+
meta: () => meta117,
|
|
23727
|
+
execute: () => execute115
|
|
23582
23728
|
});
|
|
23583
23729
|
var baseSchema53 = exports_external.object({}).strict();
|
|
23584
|
-
var { execute:
|
|
23585
|
-
var
|
|
23730
|
+
var { execute: execute115, schema: schema115 } = buildListCommand(() => "/me/insights/used", baseSchema53);
|
|
23731
|
+
var meta117 = {
|
|
23586
23732
|
summary: "List documents the signed-in user has *personally* used recently (Microsoft's machine-learning recency signal — distinct from `list-recent-files` which is the OneDrive recency feed). Each item carries a `lastUsed` (a `usageDetails` object) with `lastAccessedDateTime` + `lastModifiedDateTime`.",
|
|
23587
23733
|
category: "drive",
|
|
23588
23734
|
graphMethod: "GET",
|
|
@@ -23597,13 +23743,13 @@ var meta116 = {
|
|
|
23597
23743
|
// src/use-cases/commands/list-shared-insights.ts
|
|
23598
23744
|
var exports_list_shared_insights = {};
|
|
23599
23745
|
__export(exports_list_shared_insights, {
|
|
23600
|
-
schema: () =>
|
|
23601
|
-
meta: () =>
|
|
23602
|
-
execute: () =>
|
|
23746
|
+
schema: () => schema116,
|
|
23747
|
+
meta: () => meta118,
|
|
23748
|
+
execute: () => execute116
|
|
23603
23749
|
});
|
|
23604
23750
|
var baseSchema54 = exports_external.object({}).strict();
|
|
23605
|
-
var { execute:
|
|
23606
|
-
var
|
|
23751
|
+
var { execute: execute116, schema: schema116 } = buildListCommand(() => "/me/insights/shared", baseSchema54);
|
|
23752
|
+
var meta118 = {
|
|
23607
23753
|
summary: "List documents *shared with* the signed-in user, scored by Microsoft's relevance ranking — sibling to `list-shared-with-me` but with sharing-context details (`sharingHistory[]`, `lastShared.sharedBy`, `lastShared.sharingReference`).",
|
|
23608
23754
|
category: "drive",
|
|
23609
23755
|
graphMethod: "GET",
|
|
@@ -23618,13 +23764,13 @@ var meta117 = {
|
|
|
23618
23764
|
// src/use-cases/commands/get-organization.ts
|
|
23619
23765
|
var exports_get_organization = {};
|
|
23620
23766
|
__export(exports_get_organization, {
|
|
23621
|
-
schema: () =>
|
|
23622
|
-
meta: () =>
|
|
23623
|
-
execute: () =>
|
|
23767
|
+
schema: () => schema117,
|
|
23768
|
+
meta: () => meta119,
|
|
23769
|
+
execute: () => execute117
|
|
23624
23770
|
});
|
|
23625
23771
|
var baseSchema55 = exports_external.object({});
|
|
23626
|
-
var { execute:
|
|
23627
|
-
var
|
|
23772
|
+
var { execute: execute117, schema: schema117 } = buildSelectableCommand(() => "/organization", baseSchema55);
|
|
23773
|
+
var meta119 = {
|
|
23628
23774
|
summary: "Return the tenant's organization metadata — display name, country, verified domains, business phones, technical / security notification contacts, assigned Microsoft 365 SKUs / licensing. Graph wraps the single organization resource under `value[]` (— even though only one tenant exists, the endpoint returns a collection). The full resource is ~57 KB; use `--select` to slim it (e.g. `--select id,displayName,verifiedDomains`).",
|
|
23629
23775
|
category: "user",
|
|
23630
23776
|
graphMethod: "GET",
|
|
@@ -23638,13 +23784,13 @@ var meta118 = {
|
|
|
23638
23784
|
// src/use-cases/commands/list-mail-folders-delta.ts
|
|
23639
23785
|
var exports_list_mail_folders_delta = {};
|
|
23640
23786
|
__export(exports_list_mail_folders_delta, {
|
|
23641
|
-
schema: () =>
|
|
23642
|
-
meta: () =>
|
|
23643
|
-
execute: () =>
|
|
23787
|
+
schema: () => schema118,
|
|
23788
|
+
meta: () => meta120,
|
|
23789
|
+
execute: () => execute118
|
|
23644
23790
|
});
|
|
23645
|
-
var
|
|
23646
|
-
var { execute:
|
|
23647
|
-
var
|
|
23791
|
+
var schema118 = exports_external.object({}).strict();
|
|
23792
|
+
var { execute: execute118 } = buildCommand(() => "/me/mailFolders/delta()", schema118);
|
|
23793
|
+
var meta120 = {
|
|
23648
23794
|
summary: "Track incremental changes to the mail-folder tree itself (folders added / renamed / deleted). The first call returns the current snapshot plus a `@odata.deltaLink`; subsequent calls with that link return only what has changed. Companion to `list-mail-folder-messages-delta` which tracks message changes inside one folder. Note: Graph explicitly rejects `$top`, `$filter`, `$orderby`, and `$search` on this delta endpoint (`ErrorInvalidUrlQuery: not supported with change tracking over the 'Folders' resource`), so the OData passthrough is intentionally NOT exposed here.",
|
|
23649
23795
|
category: "mail",
|
|
23650
23796
|
graphMethod: "GET",
|
|
@@ -23660,13 +23806,13 @@ var meta119 = {
|
|
|
23660
23806
|
// src/use-cases/commands/get-channel-files-folder.ts
|
|
23661
23807
|
var exports_get_channel_files_folder = {};
|
|
23662
23808
|
__export(exports_get_channel_files_folder, {
|
|
23663
|
-
schema: () =>
|
|
23664
|
-
meta: () =>
|
|
23665
|
-
execute: () =>
|
|
23809
|
+
schema: () => schema119,
|
|
23810
|
+
meta: () => meta121,
|
|
23811
|
+
execute: () => execute119
|
|
23666
23812
|
});
|
|
23667
23813
|
var baseSchema56 = exports_external.object({ teamId: exports_external.string().min(1), channelId: exports_external.string().min(1) });
|
|
23668
|
-
var { execute:
|
|
23669
|
-
var
|
|
23814
|
+
var { execute: execute119, schema: schema119 } = buildSelectableCommand((p) => `/teams/${p.teamId}/channels/${p.channelId}/filesFolder`, baseSchema56);
|
|
23815
|
+
var meta121 = {
|
|
23670
23816
|
summary: "Return the SharePoint folder that backs a Teams channel's Files tab. Returned `driveItem` includes `parentReference.driveId` and `id` so you can pivot into `list-folder-files`, `download-drive-item-content`, etc., and treat the channel like any other OneDrive folder. Requires that the signed-in user is a member of the channel — restricted channels return `AccessDenied`.",
|
|
23671
23817
|
category: "teams",
|
|
23672
23818
|
graphMethod: "GET",
|
|
@@ -23694,13 +23840,13 @@ var meta120 = {
|
|
|
23694
23840
|
// src/use-cases/commands/get-drive-item-list-item.ts
|
|
23695
23841
|
var exports_get_drive_item_list_item = {};
|
|
23696
23842
|
__export(exports_get_drive_item_list_item, {
|
|
23697
|
-
schema: () =>
|
|
23698
|
-
meta: () =>
|
|
23699
|
-
execute: () =>
|
|
23843
|
+
schema: () => schema120,
|
|
23844
|
+
meta: () => meta122,
|
|
23845
|
+
execute: () => execute120
|
|
23700
23846
|
});
|
|
23701
23847
|
var baseSchema57 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
23702
|
-
var { execute:
|
|
23703
|
-
var
|
|
23848
|
+
var { execute: execute120, schema: schema120 } = buildSelectableCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/listItem`, baseSchema57);
|
|
23849
|
+
var meta122 = {
|
|
23704
23850
|
summary: "Return the SharePoint listItem projection of a OneDrive / SharePoint file — exposes the file's library-defined column values (custom metadata: status, due-date, classification, taxonomy tags, etc.) which are NOT present on the plain `driveItem`. Combine with `list-sharepoint-list-columns` to interpret the column schema.",
|
|
23705
23851
|
category: "sharepoint",
|
|
23706
23852
|
graphMethod: "GET",
|
|
@@ -23728,13 +23874,13 @@ var meta121 = {
|
|
|
23728
23874
|
// src/use-cases/commands/get-drive-item-analytics.ts
|
|
23729
23875
|
var exports_get_drive_item_analytics = {};
|
|
23730
23876
|
__export(exports_get_drive_item_analytics, {
|
|
23731
|
-
schema: () =>
|
|
23732
|
-
meta: () =>
|
|
23733
|
-
execute: () =>
|
|
23877
|
+
schema: () => schema121,
|
|
23878
|
+
meta: () => meta123,
|
|
23879
|
+
execute: () => execute121
|
|
23734
23880
|
});
|
|
23735
|
-
var
|
|
23736
|
-
var { execute:
|
|
23737
|
-
var
|
|
23881
|
+
var schema121 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
23882
|
+
var { execute: execute121 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/analytics`, schema121);
|
|
23883
|
+
var meta123 = {
|
|
23738
23884
|
summary: 'Return view / activity analytics for a OneDrive / SharePoint file — `allTime` totals (views, viewers) and `lastSevenDays` rollup. Useful for ranking files by attention or detecting stale content. **Known empty case**: returns `{ allTime: null, lastSevenDays: null }` on low-traffic items, or when the calling identity (the Teams web client basic token) lacks the analytics scope on the tenant. Do not interpret nulls as "no views" — interpret as "not available for this caller". For active files where you expect data and see nulls, escalate to a token with `Reports.Read.All`.',
|
|
23739
23885
|
category: "drive",
|
|
23740
23886
|
graphMethod: "GET",
|
|
@@ -23761,13 +23907,13 @@ var meta122 = {
|
|
|
23761
23907
|
// src/use-cases/commands/list-team-installed-apps.ts
|
|
23762
23908
|
var exports_list_team_installed_apps = {};
|
|
23763
23909
|
__export(exports_list_team_installed_apps, {
|
|
23764
|
-
schema: () =>
|
|
23765
|
-
meta: () =>
|
|
23766
|
-
execute: () =>
|
|
23910
|
+
schema: () => schema122,
|
|
23911
|
+
meta: () => meta124,
|
|
23912
|
+
execute: () => execute122
|
|
23767
23913
|
});
|
|
23768
|
-
var
|
|
23769
|
-
var { execute:
|
|
23770
|
-
var
|
|
23914
|
+
var schema122 = exports_external.object({ teamId: exports_external.string().min(1) });
|
|
23915
|
+
var { execute: execute122 } = buildCommand((p) => `/teams/${p.teamId}/installedApps?$expand=teamsAppDefinition`, schema122);
|
|
23916
|
+
var meta124 = {
|
|
23771
23917
|
summary: "List the Teams apps installed in a team. The CLI hard-pins `$expand=teamsAppDefinition` so every entry includes `displayName`, `version`, and `distributionMethod` (the bare endpoint returns only opaque IDs). Useful for surfacing which integrations are wired into a given team. Graph rejects user-supplied OData query parameters on this endpoint (`Query option 'Top' is not allowed`) — so the standard OData flags are intentionally NOT exposed here. The response itself is still server-paginated via `@odata.nextLink` when the team has many installed apps; chain with `next-page` to walk subsequent pages.",
|
|
23772
23918
|
category: "teams",
|
|
23773
23919
|
graphMethod: "GET",
|
|
@@ -23790,13 +23936,13 @@ var meta123 = {
|
|
|
23790
23936
|
// src/use-cases/commands/list-calendar-groups.ts
|
|
23791
23937
|
var exports_list_calendar_groups = {};
|
|
23792
23938
|
__export(exports_list_calendar_groups, {
|
|
23793
|
-
schema: () =>
|
|
23794
|
-
meta: () =>
|
|
23795
|
-
execute: () =>
|
|
23939
|
+
schema: () => schema123,
|
|
23940
|
+
meta: () => meta125,
|
|
23941
|
+
execute: () => execute123
|
|
23796
23942
|
});
|
|
23797
23943
|
var baseSchema58 = exports_external.object({}).strict();
|
|
23798
|
-
var { execute:
|
|
23799
|
-
var
|
|
23944
|
+
var { execute: execute123, schema: schema123 } = buildListCommand(() => "/me/calendarGroups", baseSchema58);
|
|
23945
|
+
var meta125 = {
|
|
23800
23946
|
summary: 'List the signed-in user\'s calendar groups — Outlook\'s organizational layer above individual calendars (e.g. "My Calendars", "Other Calendars", "Birthdays"). Use the returned `id` with `list-calendar-group-calendars` to drill in.',
|
|
23801
23947
|
category: "calendar",
|
|
23802
23948
|
graphMethod: "GET",
|
|
@@ -23811,13 +23957,13 @@ var meta124 = {
|
|
|
23811
23957
|
// src/use-cases/commands/list-calendar-group-calendars.ts
|
|
23812
23958
|
var exports_list_calendar_group_calendars = {};
|
|
23813
23959
|
__export(exports_list_calendar_group_calendars, {
|
|
23814
|
-
schema: () =>
|
|
23815
|
-
meta: () =>
|
|
23816
|
-
execute: () =>
|
|
23960
|
+
schema: () => schema124,
|
|
23961
|
+
meta: () => meta126,
|
|
23962
|
+
execute: () => execute124
|
|
23817
23963
|
});
|
|
23818
23964
|
var baseSchema59 = exports_external.object({ calendarGroupId: exports_external.string().min(1) });
|
|
23819
|
-
var { execute:
|
|
23820
|
-
var
|
|
23965
|
+
var { execute: execute124, schema: schema124 } = buildListCommand((p) => `/me/calendarGroups/${p.calendarGroupId}/calendars`, baseSchema59);
|
|
23966
|
+
var meta126 = {
|
|
23821
23967
|
summary: "List the calendars inside one calendar group.",
|
|
23822
23968
|
category: "calendar",
|
|
23823
23969
|
graphMethod: "GET",
|
|
@@ -23841,13 +23987,13 @@ var meta125 = {
|
|
|
23841
23987
|
// src/use-cases/commands/get-my-calendar.ts
|
|
23842
23988
|
var exports_get_my_calendar = {};
|
|
23843
23989
|
__export(exports_get_my_calendar, {
|
|
23844
|
-
schema: () =>
|
|
23845
|
-
meta: () =>
|
|
23846
|
-
execute: () =>
|
|
23990
|
+
schema: () => schema125,
|
|
23991
|
+
meta: () => meta127,
|
|
23992
|
+
execute: () => execute125
|
|
23847
23993
|
});
|
|
23848
23994
|
var baseSchema60 = exports_external.object({});
|
|
23849
|
-
var { execute:
|
|
23850
|
-
var
|
|
23995
|
+
var { execute: execute125, schema: schema125 } = buildSelectableCommand(() => "/me/calendar", baseSchema60);
|
|
23996
|
+
var meta127 = {
|
|
23851
23997
|
summary: "Return metadata for the signed-in user's *primary* calendar — `id`, `name`, `color`, `owner`, `canShare`, `canViewPrivateItems`, `canEdit`, `defaultOnlineMeetingProvider`. Sibling to `list-calendars` which returns every calendar (incl. shared / subscribed). Use `--select` to fetch only the fields you need.",
|
|
23852
23998
|
category: "calendar",
|
|
23853
23999
|
graphMethod: "GET",
|
|
@@ -23861,13 +24007,13 @@ var meta126 = {
|
|
|
23861
24007
|
// src/use-cases/commands/list-site-columns.ts
|
|
23862
24008
|
var exports_list_site_columns = {};
|
|
23863
24009
|
__export(exports_list_site_columns, {
|
|
23864
|
-
schema: () =>
|
|
23865
|
-
meta: () =>
|
|
23866
|
-
execute: () =>
|
|
24010
|
+
schema: () => schema126,
|
|
24011
|
+
meta: () => meta128,
|
|
24012
|
+
execute: () => execute126
|
|
23867
24013
|
});
|
|
23868
24014
|
var baseSchema61 = exports_external.object({ siteId: exports_external.string().min(1) });
|
|
23869
|
-
var { execute:
|
|
23870
|
-
var
|
|
24015
|
+
var { execute: execute126, schema: schema126 } = buildSelectableCommand((p) => `/sites/${p.siteId}/columns`, baseSchema61);
|
|
24016
|
+
var meta128 = {
|
|
23871
24017
|
summary: "List the *site-level* column definitions — columns reusable across multiple lists in the site. Distinct from `list-sharepoint-list-columns` which returns one specific list's schema. Note: Graph silently ignores `$top` and `$skip` on this endpoint (verified live — passing them returns the full collection regardless), so the CLI exposes only `--select` and `--expand`.",
|
|
23872
24018
|
category: "sharepoint",
|
|
23873
24019
|
graphMethod: "GET",
|
|
@@ -23890,13 +24036,13 @@ var meta127 = {
|
|
|
23890
24036
|
// src/use-cases/commands/list-site-content-types.ts
|
|
23891
24037
|
var exports_list_site_content_types = {};
|
|
23892
24038
|
__export(exports_list_site_content_types, {
|
|
23893
|
-
schema: () =>
|
|
23894
|
-
meta: () =>
|
|
23895
|
-
execute: () =>
|
|
24039
|
+
schema: () => schema127,
|
|
24040
|
+
meta: () => meta129,
|
|
24041
|
+
execute: () => execute127
|
|
23896
24042
|
});
|
|
23897
24043
|
var baseSchema62 = exports_external.object({ siteId: exports_external.string().min(1) });
|
|
23898
|
-
var { execute:
|
|
23899
|
-
var
|
|
24044
|
+
var { execute: execute127, schema: schema127 } = buildNoSkipListCommand((p) => `/sites/${p.siteId}/contentTypes`, baseSchema62);
|
|
24045
|
+
var meta129 = {
|
|
23900
24046
|
summary: "List the content type definitions of a SharePoint site — typed schemas (Document, Page, Item, custom-defined) describing which columns + behaviors apply to items of each type. Useful for understanding a site's information architecture.",
|
|
23901
24047
|
category: "sharepoint",
|
|
23902
24048
|
graphMethod: "GET",
|
|
@@ -23921,13 +24067,13 @@ var meta128 = {
|
|
|
23921
24067
|
// src/use-cases/commands/list-sharepoint-site-pages.ts
|
|
23922
24068
|
var exports_list_sharepoint_site_pages = {};
|
|
23923
24069
|
__export(exports_list_sharepoint_site_pages, {
|
|
23924
|
-
schema: () =>
|
|
23925
|
-
meta: () =>
|
|
23926
|
-
execute: () =>
|
|
24070
|
+
schema: () => schema128,
|
|
24071
|
+
meta: () => meta130,
|
|
24072
|
+
execute: () => execute128
|
|
23927
24073
|
});
|
|
23928
24074
|
var baseSchema63 = exports_external.object({ siteId: exports_external.string().min(1) });
|
|
23929
|
-
var { execute:
|
|
23930
|
-
var
|
|
24075
|
+
var { execute: execute128, schema: schema128 } = buildNoSkipListCommand((p) => `/sites/${p.siteId}/pages`, baseSchema63);
|
|
24076
|
+
var meta130 = {
|
|
23931
24077
|
summary: "List modern SharePoint pages on a site (news posts, dashboards, landing pages). Each `sitePage` has `title`, `description`, `webUrl`, `publishingState`, `lastPublishedDateTime`. Returned items are the read-only listing — fetch the page body via the SharePoint REST API or by opening the `webUrl`.",
|
|
23932
24078
|
category: "sharepoint",
|
|
23933
24079
|
graphMethod: "GET",
|
|
@@ -23952,15 +24098,15 @@ var meta129 = {
|
|
|
23952
24098
|
// src/use-cases/commands/list-excel-defined-names.ts
|
|
23953
24099
|
var exports_list_excel_defined_names = {};
|
|
23954
24100
|
__export(exports_list_excel_defined_names, {
|
|
23955
|
-
schema: () =>
|
|
23956
|
-
meta: () =>
|
|
23957
|
-
execute: () =>
|
|
24101
|
+
schema: () => schema129,
|
|
24102
|
+
meta: () => meta131,
|
|
24103
|
+
execute: () => execute129
|
|
23958
24104
|
});
|
|
23959
24105
|
var baseSchema64 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
23960
24106
|
var inner10 = buildListCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/workbook/names`, baseSchema64);
|
|
23961
|
-
var
|
|
23962
|
-
var { schema:
|
|
23963
|
-
var
|
|
24107
|
+
var execute129 = wrapExcelExecute(inner10.execute);
|
|
24108
|
+
var { schema: schema129 } = inner10;
|
|
24109
|
+
var meta131 = {
|
|
23964
24110
|
summary: "List the workbook's defined names (named ranges, named formulas, named constants). Each `workbookNamedItem` has `name`, `value` (the formula or address), `comment`, and `scope` (workbook or worksheet). Useful for understanding workbook structure before reading ranges.",
|
|
23965
24111
|
category: "excel",
|
|
23966
24112
|
graphMethod: "GET",
|
|
@@ -23989,15 +24135,15 @@ var meta130 = {
|
|
|
23989
24135
|
// src/use-cases/commands/list-excel-worksheet-charts.ts
|
|
23990
24136
|
var exports_list_excel_worksheet_charts = {};
|
|
23991
24137
|
__export(exports_list_excel_worksheet_charts, {
|
|
23992
|
-
schema: () =>
|
|
23993
|
-
meta: () =>
|
|
23994
|
-
execute: () =>
|
|
24138
|
+
schema: () => schema130,
|
|
24139
|
+
meta: () => meta132,
|
|
24140
|
+
execute: () => execute130
|
|
23995
24141
|
});
|
|
23996
24142
|
var baseSchema65 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1), worksheetId: exports_external.string().min(1) });
|
|
23997
24143
|
var inner11 = buildListCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/workbook/worksheets/${p.worksheetId}/charts`, baseSchema65);
|
|
23998
|
-
var
|
|
23999
|
-
var { schema:
|
|
24000
|
-
var
|
|
24144
|
+
var execute130 = wrapExcelExecute(inner11.execute);
|
|
24145
|
+
var { schema: schema130 } = inner11;
|
|
24146
|
+
var meta132 = {
|
|
24001
24147
|
summary: "List the charts on a worksheet. Each `workbookChart` has `id`, `name`, `height`, `width`, `top`, `left`. Use the chart's image endpoint (`.../charts/{id}/image()`) to render the chart as a base64 PNG.",
|
|
24002
24148
|
category: "excel",
|
|
24003
24149
|
graphMethod: "GET",
|
|
@@ -24033,15 +24179,15 @@ var meta131 = {
|
|
|
24033
24179
|
// src/use-cases/commands/microsoft-search-query.ts
|
|
24034
24180
|
var exports_microsoft_search_query = {};
|
|
24035
24181
|
__export(exports_microsoft_search_query, {
|
|
24036
|
-
schema: () =>
|
|
24037
|
-
meta: () =>
|
|
24038
|
-
execute: () =>
|
|
24182
|
+
schema: () => schema131,
|
|
24183
|
+
meta: () => meta133,
|
|
24184
|
+
execute: () => execute131
|
|
24039
24185
|
});
|
|
24040
24186
|
var ALL_ENTITY_TYPES = ["driveItem", "listItem", "site", "message", "event", "person"];
|
|
24041
24187
|
var PAGE_SIZE2 = 25;
|
|
24042
|
-
var
|
|
24043
|
-
var
|
|
24044
|
-
const parsed =
|
|
24188
|
+
var schema131 = exports_external.object({ query: exports_external.string().min(1) });
|
|
24189
|
+
var execute131 = async (graph, params) => {
|
|
24190
|
+
const parsed = schema131.safeParse(params);
|
|
24045
24191
|
if (!parsed.success)
|
|
24046
24192
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
24047
24193
|
const queryString = parsed.data.query;
|
|
@@ -24063,7 +24209,7 @@ var execute130 = async (graph, params) => {
|
|
|
24063
24209
|
return err(partialErrors[0]?.error ?? { type: "api_error", status: 500, message: "all entity-type sub-requests failed" });
|
|
24064
24210
|
return ok({ value: merged, ...partialErrors.length > 0 ? { partialErrors } : {} });
|
|
24065
24211
|
};
|
|
24066
|
-
var
|
|
24212
|
+
var meta133 = {
|
|
24067
24213
|
summary: "Run a federated KQL search across the signed-in user's mail, files, list items, sites, calendar events, and people. Microsoft Graph v1.0 rejects multi-entity search bodies on most tenants (`Multiple entity search is not supported in v1.0`), so this command issues SIX parallel POSTs — one per entityType — and merges the per-entity `searchHits` containers into a single `value[]`. Each container is identifiable by the resource type inside `hits[].resource`. If a sub-request fails (e.g. tenant lacks the scope for one entity), the others still return; failures show up in `partialErrors[]`. Page size is fixed at 25 per sub-request and `top` is NOT exposed (Graph rejects $top in /search/query bodies). `chatMessage` is excluded since `Chat.Read*` is unavailable. To find Microsoft Loop pages (`.loop`) for markdown conversion, query `filetype:loop`: each `driveItem` hit carries `resource.id` plus `resource.parentReference.driveId`, the exact pair `download-drive-item-as-markdown` needs to render the page via Graph `?format=html`. (`filetype:fluid` returns nothing on this corpus; Loop pages index as `.loop`.)",
|
|
24068
24214
|
category: "meta",
|
|
24069
24215
|
graphMethod: "POST",
|
|
@@ -24085,14 +24231,14 @@ var meta132 = {
|
|
|
24085
24231
|
// src/use-cases/commands/my-quick-context.ts
|
|
24086
24232
|
var exports_my_quick_context = {};
|
|
24087
24233
|
__export(exports_my_quick_context, {
|
|
24088
|
-
schema: () =>
|
|
24089
|
-
meta: () =>
|
|
24090
|
-
execute: () =>
|
|
24234
|
+
schema: () => schema132,
|
|
24235
|
+
meta: () => meta134,
|
|
24236
|
+
execute: () => execute132
|
|
24091
24237
|
});
|
|
24092
|
-
var
|
|
24238
|
+
var schema132 = exports_external.object({}).strict();
|
|
24093
24239
|
var valueOrUndefined = (r) => r.ok ? r.value : undefined;
|
|
24094
|
-
var
|
|
24095
|
-
const parsed =
|
|
24240
|
+
var execute132 = async (graph, params) => {
|
|
24241
|
+
const parsed = schema132.safeParse(params);
|
|
24096
24242
|
if (!parsed.success)
|
|
24097
24243
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
24098
24244
|
const [meRes, driveRes, inboxRes, calendarRes, plannerRes, notebooksRes, teamsRes, recentRes, mailboxRes] = await Promise.all([
|
|
@@ -24131,7 +24277,7 @@ var execute131 = async (graph, params) => {
|
|
|
24131
24277
|
tenantWorkingHours: mailbox?.workingHours?.startTime !== undefined && mailbox.workingHours.endTime !== undefined ? { start: mailbox.workingHours.startTime, end: mailbox.workingHours.endTime, timeZone: mailbox.workingHours.timeZone?.name } : undefined
|
|
24132
24278
|
});
|
|
24133
24279
|
};
|
|
24134
|
-
var
|
|
24280
|
+
var meta134 = {
|
|
24135
24281
|
summary: "One-shot discovery for the IDs every other command needs, plus the user's job title and tenant timezone / locale / working-hours. Issues 9 Graph calls in parallel and returns what each succeeded for. Partial-result mode: only `/me` is load-bearing — if any other sub-call fails (missing license, scope, or tenant policy) the corresponding field is `undefined` but the rest are still returned. Replaces the audit's 5-call discovery chain — feed the IDs straight into `list-mail-folder-messages`, `list-folder-files`, `list-planner-tasks`, `list-onenote-notebook-sections`, etc. For Microsoft To Do lists call `list-todo-task-lists` on demand (intentionally dropped from this command's fan-out — the array of {id, displayName, wellknownListName} entries crowded the envelope with IDs an LLM rarely needs on first contact). `tenantTimeZone` lets an LLM stop treating every datetime as UTC on first contact.",
|
|
24136
24282
|
category: "meta",
|
|
24137
24283
|
graphMethod: "GET",
|
|
@@ -24145,38 +24291,38 @@ var meta133 = {
|
|
|
24145
24291
|
// src/use-cases/commands/scopes-check.ts
|
|
24146
24292
|
var exports_scopes_check = {};
|
|
24147
24293
|
__export(exports_scopes_check, {
|
|
24148
|
-
schema: () =>
|
|
24149
|
-
meta: () =>
|
|
24150
|
-
execute: () =>
|
|
24294
|
+
schema: () => schema133,
|
|
24295
|
+
meta: () => meta135,
|
|
24296
|
+
execute: () => execute133
|
|
24151
24297
|
});
|
|
24152
|
-
var
|
|
24153
|
-
var
|
|
24154
|
-
const parsed =
|
|
24298
|
+
var schema133 = exports_external.object({}).strict();
|
|
24299
|
+
var execute133 = async (graph, params) => {
|
|
24300
|
+
const parsed = schema133.safeParse(params);
|
|
24155
24301
|
if (!parsed.success)
|
|
24156
24302
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
24157
24303
|
return graph.getCachedTokenInfo();
|
|
24158
24304
|
};
|
|
24159
|
-
var
|
|
24160
|
-
summary: "Decode the cached Teams web client access token and return its scopes, audience, and expiry without making a Graph call. Use this as a self-test before running a command an LLM expects to fail with `accessDenied` — if the required scope isn't in the returned list, the call will reject regardless of tenant config. Each command's `scopesRequired` field in `help-json` lists the scopes that command needs; intersect with the array returned here for a pre-flight check (pipe both through `jq` and diff). The `expiresInSeconds` field
|
|
24305
|
+
var meta135 = {
|
|
24306
|
+
summary: "Decode the cached Teams web client access token and return its scopes, audience, and expiry without making a Graph call. Use this as a self-test before running a command an LLM expects to fail with `accessDenied` — if the required scope isn't in the returned list, the call will reject regardless of tenant config. Each command's `scopesRequired` field in `help-json` lists the scopes that command needs; intersect with the array returned here for a pre-flight check (pipe both through `jq` and diff). The `expiresInSeconds` field lets an LLM decide pre-emptively to `login` again — typically worth doing under ~5 minutes (300 s) so a long-running session doesn't hit the wall mid-command. The `elevated` block reports whether the *separate* M365ChatClient-elevated token (needed by the historical-version download / convert commands) is cached and still usable — so a fresh process can pre-flight `deep-scan`-style workloads instead of discovering a 403 mid-run; `available:false` when it is absent, expired, or within the same 5-minute buffer the download path applies. The `chatsvcagg` and `ic3` blocks report the two Teams-chat substrate tokens (used by `list-teams-chat*` / `find-chats-with-user`) the same way; both self-heal from the shared refresh token, so they are informational rather than a preflight gate.",
|
|
24161
24307
|
category: "meta",
|
|
24162
24308
|
graphMethod: "GET",
|
|
24163
24309
|
graphPathTemplate: "(meta) cached-token introspection — no Graph endpoint",
|
|
24164
24310
|
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/permissions-reference",
|
|
24165
24311
|
options: [],
|
|
24166
24312
|
example: "ask-marcel-office scopes-check",
|
|
24167
|
-
responseShape: "`{ scopes: string[], audience: string, expiresAt: string (ISO 8601), expiresInSeconds: number }`. `expiresInSeconds` is negative when the cached token has already expired (run `login`); `audience` is the JWT `aud` claim (typically `https://graph.microsoft.com`)."
|
|
24313
|
+
responseShape: "`{ scopes: string[], audience: string, expiresAt: string (ISO 8601), expiresInSeconds: number, elevated: { available: boolean, expiresInSeconds?: number }, chatsvcagg: { available: boolean, expiresInSeconds?: number }, ic3: { available: boolean, expiresInSeconds?: number } }`. `expiresInSeconds` is negative when the cached token has already expired (run `login`); `audience` is the JWT `aud` claim (typically `https://graph.microsoft.com`). `elevated.available` is `true` only when the cached M365ChatClient-elevated token (used by the historical-version commands) is present and beyond the 5-minute buffer; `elevated.expiresInSeconds` is its raw remaining seconds and is omitted (the key is absent) when no elevated token is cached. `chatsvcagg` and `ic3` are the two Teams-chat substrate tokens, same shape as `elevated`; both self-heal from the shared refresh token, so they are informational rather than a preflight gate."
|
|
24168
24314
|
};
|
|
24169
24315
|
|
|
24170
24316
|
// src/use-cases/commands/get-drive-special-folder.ts
|
|
24171
24317
|
var exports_get_drive_special_folder = {};
|
|
24172
24318
|
__export(exports_get_drive_special_folder, {
|
|
24173
|
-
schema: () =>
|
|
24174
|
-
meta: () =>
|
|
24175
|
-
execute: () =>
|
|
24319
|
+
schema: () => schema134,
|
|
24320
|
+
meta: () => meta136,
|
|
24321
|
+
execute: () => execute134
|
|
24176
24322
|
});
|
|
24177
24323
|
var baseSchema66 = exports_external.object({ folderName: exports_external.enum(["documents", "photos", "cameraroll", "approot", "music", "attachments"]) });
|
|
24178
|
-
var { execute:
|
|
24179
|
-
var
|
|
24324
|
+
var { execute: execute134, schema: schema134 } = buildSelectableCommand((p) => `/me/drive/special/${p.folderName}`, baseSchema66);
|
|
24325
|
+
var meta136 = {
|
|
24180
24326
|
summary: "Resolve a OneDrive well-known folder via `--folder-name` (one of `documents`, `photos`, `cameraroll`, `approot`, `music`, `attachments`) without having to navigate from the root. Returns the folder's driveItem (id, name, parentReference, etc.) ready to feed into `list-folder-files` or `download-drive-item-content`.",
|
|
24181
24327
|
category: "drive",
|
|
24182
24328
|
graphMethod: "GET",
|
|
@@ -24198,13 +24344,13 @@ var meta135 = {
|
|
|
24198
24344
|
// src/use-cases/commands/get-drive-root-delta.ts
|
|
24199
24345
|
var exports_get_drive_root_delta = {};
|
|
24200
24346
|
__export(exports_get_drive_root_delta, {
|
|
24201
|
-
schema: () =>
|
|
24202
|
-
meta: () =>
|
|
24203
|
-
execute: () =>
|
|
24347
|
+
schema: () => schema135,
|
|
24348
|
+
meta: () => meta137,
|
|
24349
|
+
execute: () => execute135
|
|
24204
24350
|
});
|
|
24205
24351
|
var baseSchema67 = exports_external.object({}).strict();
|
|
24206
|
-
var { execute:
|
|
24207
|
-
var
|
|
24352
|
+
var { execute: execute135, schema: schema135 } = buildNoSkipListCommand(() => "/me/drive/root/delta()", baseSchema67);
|
|
24353
|
+
var meta137 = {
|
|
24208
24354
|
summary: "Track incremental changes (added / modified / deleted items) anywhere under the signed-in user's OneDrive root. **Takes zero required arguments** — acts implicitly on the signed-in user's primary OneDrive; use `get-drive-delta` to target a specific drive by ID. The first call returns a snapshot plus `@odata.deltaLink`; subsequent calls with that link return only what has changed since. Cross-folder companion to `get-drive-delta` (which scopes to one specific folder).",
|
|
24209
24355
|
category: "drive",
|
|
24210
24356
|
graphMethod: "GET",
|
|
@@ -24220,13 +24366,13 @@ var meta136 = {
|
|
|
24220
24366
|
// src/use-cases/commands/list-followed-drive-items.ts
|
|
24221
24367
|
var exports_list_followed_drive_items = {};
|
|
24222
24368
|
__export(exports_list_followed_drive_items, {
|
|
24223
|
-
schema: () =>
|
|
24224
|
-
meta: () =>
|
|
24225
|
-
execute: () =>
|
|
24369
|
+
schema: () => schema136,
|
|
24370
|
+
meta: () => meta138,
|
|
24371
|
+
execute: () => execute136
|
|
24226
24372
|
});
|
|
24227
24373
|
var baseSchema68 = exports_external.object({}).strict();
|
|
24228
|
-
var { execute:
|
|
24229
|
-
var
|
|
24374
|
+
var { execute: execute136, schema: schema136 } = buildNoSkipListCommand(() => "/me/drive/following", baseSchema68);
|
|
24375
|
+
var meta138 = {
|
|
24230
24376
|
summary: "List driveItems the signed-in user has explicitly followed (the OneDrive star). A small, hand-curated set of frequently-revisited files, distinct from the algorithmic `list-recent-files` and `list-recently-used-insights`.",
|
|
24231
24377
|
category: "drive",
|
|
24232
24378
|
graphMethod: "GET",
|
|
@@ -24242,13 +24388,13 @@ var meta137 = {
|
|
|
24242
24388
|
// src/use-cases/commands/get-drive-item-created-by-user.ts
|
|
24243
24389
|
var exports_get_drive_item_created_by_user = {};
|
|
24244
24390
|
__export(exports_get_drive_item_created_by_user, {
|
|
24245
|
-
schema: () =>
|
|
24246
|
-
meta: () =>
|
|
24247
|
-
execute: () =>
|
|
24391
|
+
schema: () => schema137,
|
|
24392
|
+
meta: () => meta139,
|
|
24393
|
+
execute: () => execute137
|
|
24248
24394
|
});
|
|
24249
24395
|
var baseSchema69 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
24250
|
-
var { execute:
|
|
24251
|
-
var
|
|
24396
|
+
var { execute: execute137, schema: schema137 } = buildSelectableCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/createdByUser`, baseSchema69);
|
|
24397
|
+
var meta139 = {
|
|
24252
24398
|
summary: "Return the `user` resource for whoever created a OneDrive / SharePoint file — full profile, not just the truncated `createdBy.user` summary embedded in the parent driveItem. Useful when you need title / department / mail of the author. Use `--select` to fetch only the fields you care about (e.g. `--select id,displayName,jobTitle,department,mail`).",
|
|
24253
24399
|
category: "drive",
|
|
24254
24400
|
graphMethod: "GET",
|
|
@@ -24276,13 +24422,13 @@ var meta138 = {
|
|
|
24276
24422
|
// src/use-cases/commands/get-drive-item-last-modified-by-user.ts
|
|
24277
24423
|
var exports_get_drive_item_last_modified_by_user = {};
|
|
24278
24424
|
__export(exports_get_drive_item_last_modified_by_user, {
|
|
24279
|
-
schema: () =>
|
|
24280
|
-
meta: () =>
|
|
24281
|
-
execute: () =>
|
|
24425
|
+
schema: () => schema138,
|
|
24426
|
+
meta: () => meta140,
|
|
24427
|
+
execute: () => execute138
|
|
24282
24428
|
});
|
|
24283
24429
|
var baseSchema70 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
24284
|
-
var { execute:
|
|
24285
|
-
var
|
|
24430
|
+
var { execute: execute138, schema: schema138 } = buildSelectableCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/lastModifiedByUser`, baseSchema70);
|
|
24431
|
+
var meta140 = {
|
|
24286
24432
|
summary: "Return the full `user` resource for whoever last modified a OneDrive / SharePoint file — sibling to `get-drive-item-created-by-user`. Use `--select` to fetch only specific fields.",
|
|
24287
24433
|
category: "drive",
|
|
24288
24434
|
graphMethod: "GET",
|
|
@@ -24310,13 +24456,13 @@ var meta139 = {
|
|
|
24310
24456
|
// src/use-cases/commands/get-site-analytics.ts
|
|
24311
24457
|
var exports_get_site_analytics = {};
|
|
24312
24458
|
__export(exports_get_site_analytics, {
|
|
24313
|
-
schema: () =>
|
|
24314
|
-
meta: () =>
|
|
24315
|
-
execute: () =>
|
|
24459
|
+
schema: () => schema139,
|
|
24460
|
+
meta: () => meta141,
|
|
24461
|
+
execute: () => execute139
|
|
24316
24462
|
});
|
|
24317
|
-
var
|
|
24318
|
-
var { execute:
|
|
24319
|
-
var
|
|
24463
|
+
var schema139 = exports_external.object({ siteId: exports_external.string().min(1) });
|
|
24464
|
+
var { execute: execute139 } = buildCommand((p) => `/sites/${p.siteId}/analytics`, schema139);
|
|
24465
|
+
var meta141 = {
|
|
24320
24466
|
summary: 'Return view / activity analytics for a SharePoint site — `allTime` totals (visits, viewers) and `lastSevenDays` rollup. Site-level parallel to `get-drive-item-analytics`. Useful for ranking sites by attention or detecting stale workspaces. **Known empty case**: returns `{ allTime: null, lastSevenDays: null }` even on active sites when the calling identity (the Teams web client basic token) lacks the analytics scope. Do not interpret nulls as "no activity" — interpret as "not available for this caller".',
|
|
24321
24467
|
category: "sharepoint",
|
|
24322
24468
|
graphMethod: "GET",
|
|
@@ -24338,13 +24484,13 @@ var meta140 = {
|
|
|
24338
24484
|
// src/use-cases/commands/list-sharepoint-list-item-versions.ts
|
|
24339
24485
|
var exports_list_sharepoint_list_item_versions = {};
|
|
24340
24486
|
__export(exports_list_sharepoint_list_item_versions, {
|
|
24341
|
-
schema: () =>
|
|
24342
|
-
meta: () =>
|
|
24343
|
-
execute: () =>
|
|
24487
|
+
schema: () => schema140,
|
|
24488
|
+
meta: () => meta142,
|
|
24489
|
+
execute: () => execute140
|
|
24344
24490
|
});
|
|
24345
24491
|
var baseSchema71 = exports_external.object({ siteId: exports_external.string().min(1), listId: exports_external.string().min(1), listItemId: exports_external.string().min(1) });
|
|
24346
|
-
var { execute:
|
|
24347
|
-
var
|
|
24492
|
+
var { execute: execute140, schema: schema140 } = buildNoSkipListCommand((p) => `/sites/${p.siteId}/lists/${p.listId}/items/${p.listItemId}/versions`, baseSchema71);
|
|
24493
|
+
var meta142 = {
|
|
24348
24494
|
summary: "List the version history of a SharePoint list item — every change (column edits, status flips, custom-field changes) tracked as a `listItemVersion`. Distinct from `list-drive-item-versions`, which tracks file content versions.",
|
|
24349
24495
|
category: "sharepoint",
|
|
24350
24496
|
graphMethod: "GET",
|
|
@@ -24381,13 +24527,13 @@ var meta141 = {
|
|
|
24381
24527
|
// src/use-cases/commands/get-mail-rule.ts
|
|
24382
24528
|
var exports_get_mail_rule = {};
|
|
24383
24529
|
__export(exports_get_mail_rule, {
|
|
24384
|
-
schema: () =>
|
|
24385
|
-
meta: () =>
|
|
24386
|
-
execute: () =>
|
|
24530
|
+
schema: () => schema141,
|
|
24531
|
+
meta: () => meta143,
|
|
24532
|
+
execute: () => execute141
|
|
24387
24533
|
});
|
|
24388
|
-
var
|
|
24389
|
-
var { execute:
|
|
24390
|
-
var
|
|
24534
|
+
var schema141 = exports_external.object({ mailFolderId: exports_external.string().min(1).default("inbox"), messageRuleId: exports_external.string().min(1) });
|
|
24535
|
+
var { execute: execute141 } = buildCommand((p) => `/me/mailFolders/${p.mailFolderId}/messageRules/${p.messageRuleId}`, schema141);
|
|
24536
|
+
var meta143 = {
|
|
24391
24537
|
summary: "Return a single Outlook message rule by ID, including its conditions and actions. Sibling to `list-mail-rules`. `--mail-folder-id` defaults to `inbox` (the only folder where rules actually live in Graph); the flag is preserved for callers that want to pass a resolved Inbox ID explicitly.",
|
|
24392
24538
|
category: "mail",
|
|
24393
24539
|
graphMethod: "GET",
|
|
@@ -24418,15 +24564,15 @@ var meta142 = {
|
|
|
24418
24564
|
// src/use-cases/commands/list-excel-comments.ts
|
|
24419
24565
|
var exports_list_excel_comments = {};
|
|
24420
24566
|
__export(exports_list_excel_comments, {
|
|
24421
|
-
schema: () =>
|
|
24422
|
-
meta: () =>
|
|
24423
|
-
execute: () =>
|
|
24567
|
+
schema: () => schema142,
|
|
24568
|
+
meta: () => meta144,
|
|
24569
|
+
execute: () => execute142
|
|
24424
24570
|
});
|
|
24425
24571
|
var baseSchema72 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
24426
24572
|
var inner12 = buildListCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/workbook/comments`, baseSchema72);
|
|
24427
|
-
var
|
|
24428
|
-
var { schema:
|
|
24429
|
-
var
|
|
24573
|
+
var execute142 = wrapExcelExecute(inner12.execute);
|
|
24574
|
+
var { schema: schema142 } = inner12;
|
|
24575
|
+
var meta144 = {
|
|
24430
24576
|
summary: "List the modern threaded comments anchored to cells in an Excel workbook (the New Comments feature, distinct from legacy notes). Each `workbookComment` has `content`, `contentType`, `task` state, plus replies via the comment's `replies` navigation.",
|
|
24431
24577
|
category: "excel",
|
|
24432
24578
|
graphMethod: "GET",
|
|
@@ -24455,15 +24601,15 @@ var meta143 = {
|
|
|
24455
24601
|
// src/use-cases/commands/list-excel-worksheet-pivot-tables.ts
|
|
24456
24602
|
var exports_list_excel_worksheet_pivot_tables = {};
|
|
24457
24603
|
__export(exports_list_excel_worksheet_pivot_tables, {
|
|
24458
|
-
schema: () =>
|
|
24459
|
-
meta: () =>
|
|
24460
|
-
execute: () =>
|
|
24604
|
+
schema: () => schema143,
|
|
24605
|
+
meta: () => meta145,
|
|
24606
|
+
execute: () => execute143
|
|
24461
24607
|
});
|
|
24462
24608
|
var baseSchema73 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1), worksheetId: exports_external.string().min(1) });
|
|
24463
24609
|
var inner13 = buildListCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/workbook/worksheets/${p.worksheetId}/pivotTables`, baseSchema73);
|
|
24464
|
-
var
|
|
24465
|
-
var { schema:
|
|
24466
|
-
var
|
|
24610
|
+
var execute143 = wrapExcelExecute(inner13.execute);
|
|
24611
|
+
var { schema: schema143 } = inner13;
|
|
24612
|
+
var meta145 = {
|
|
24467
24613
|
summary: "List the pivot tables on a worksheet. Each `workbookPivotTable` has `name` and a navigation to its source `workbookWorksheet`. Useful for understanding analytical structure inside a workbook.",
|
|
24468
24614
|
category: "excel",
|
|
24469
24615
|
graphMethod: "GET",
|
|
@@ -24499,13 +24645,13 @@ var meta144 = {
|
|
|
24499
24645
|
// src/use-cases/commands/list-sensitivity-labels.ts
|
|
24500
24646
|
var exports_list_sensitivity_labels = {};
|
|
24501
24647
|
__export(exports_list_sensitivity_labels, {
|
|
24502
|
-
schema: () =>
|
|
24503
|
-
meta: () =>
|
|
24504
|
-
execute: () =>
|
|
24648
|
+
schema: () => schema144,
|
|
24649
|
+
meta: () => meta146,
|
|
24650
|
+
execute: () => execute144
|
|
24505
24651
|
});
|
|
24506
24652
|
var baseSchema74 = exports_external.object({}).strict();
|
|
24507
|
-
var { execute:
|
|
24508
|
-
var
|
|
24653
|
+
var { execute: execute144, schema: schema144 } = buildListCommand(() => "/me/informationProtection/sensitivityLabels", baseSchema74);
|
|
24654
|
+
var meta146 = {
|
|
24509
24655
|
summary: 'List the Microsoft Information Protection sensitivity labels available to the signed-in user — the labels Outlook / Word / SharePoint surfaces in the "Sensitivity" picker (e.g. Public / Internal / Confidential / Highly Confidential). Each label has `id`, `displayName`, `priority`, `isAppliable`, `tooltip`.',
|
|
24510
24656
|
category: "user",
|
|
24511
24657
|
graphMethod: "GET",
|
|
@@ -24520,13 +24666,13 @@ var meta145 = {
|
|
|
24520
24666
|
// src/use-cases/commands/list-my-transitive-memberships.ts
|
|
24521
24667
|
var exports_list_my_transitive_memberships = {};
|
|
24522
24668
|
__export(exports_list_my_transitive_memberships, {
|
|
24523
|
-
schema: () =>
|
|
24524
|
-
meta: () =>
|
|
24525
|
-
execute: () =>
|
|
24669
|
+
schema: () => schema145,
|
|
24670
|
+
meta: () => meta147,
|
|
24671
|
+
execute: () => execute145
|
|
24526
24672
|
});
|
|
24527
24673
|
var baseSchema75 = exports_external.object({}).strict();
|
|
24528
|
-
var { execute:
|
|
24529
|
-
var
|
|
24674
|
+
var { execute: execute145, schema: schema145 } = buildListCommand(() => "/me/transitiveMemberOf", baseSchema75);
|
|
24675
|
+
var meta147 = {
|
|
24530
24676
|
summary: "List all groups, directory roles, and administrative units the signed-in user is a member of *transitively* — including memberships inherited via nested groups. Sibling to `list-my-memberships` (`/me/memberOf`) which only returns direct memberships.",
|
|
24531
24677
|
category: "user",
|
|
24532
24678
|
graphMethod: "GET",
|
|
@@ -24541,13 +24687,13 @@ var meta146 = {
|
|
|
24541
24687
|
// src/use-cases/commands/get-team-primary-channel.ts
|
|
24542
24688
|
var exports_get_team_primary_channel = {};
|
|
24543
24689
|
__export(exports_get_team_primary_channel, {
|
|
24544
|
-
schema: () =>
|
|
24545
|
-
meta: () =>
|
|
24546
|
-
execute: () =>
|
|
24690
|
+
schema: () => schema146,
|
|
24691
|
+
meta: () => meta148,
|
|
24692
|
+
execute: () => execute146
|
|
24547
24693
|
});
|
|
24548
24694
|
var baseSchema76 = exports_external.object({ teamId: exports_external.string().min(1) });
|
|
24549
|
-
var { execute:
|
|
24550
|
-
var
|
|
24695
|
+
var { execute: execute146, schema: schema146 } = buildSelectableCommand((p) => `/teams/${p.teamId}/primaryChannel`, baseSchema76);
|
|
24696
|
+
var meta148 = {
|
|
24551
24697
|
summary: "Return the team's primary (General) channel directly without having to list-then-pick. The returned `channel` has `id`, `displayName`, `webUrl`, `email` — feed `id` into `list-team-channels` siblings or `get-channel-files-folder`.",
|
|
24552
24698
|
category: "teams",
|
|
24553
24699
|
graphMethod: "GET",
|
|
@@ -24570,13 +24716,13 @@ var meta147 = {
|
|
|
24570
24716
|
// src/use-cases/commands/list-todo-tasks-delta.ts
|
|
24571
24717
|
var exports_list_todo_tasks_delta = {};
|
|
24572
24718
|
__export(exports_list_todo_tasks_delta, {
|
|
24573
|
-
schema: () =>
|
|
24574
|
-
meta: () =>
|
|
24575
|
-
execute: () =>
|
|
24719
|
+
schema: () => schema147,
|
|
24720
|
+
meta: () => meta149,
|
|
24721
|
+
execute: () => execute147
|
|
24576
24722
|
});
|
|
24577
|
-
var
|
|
24578
|
-
var { execute:
|
|
24579
|
-
var
|
|
24723
|
+
var schema147 = exports_external.object({ todoTaskListId: exports_external.string().min(1) });
|
|
24724
|
+
var { execute: execute147 } = buildCommand((p) => `/me/todo/lists/${p.todoTaskListId}/tasks/delta()`, schema147);
|
|
24725
|
+
var meta149 = {
|
|
24580
24726
|
summary: "Track incremental task changes (added / updated / completed / deleted) within a single Microsoft To Do list. The first call returns the current snapshot plus `@odata.deltaLink`; subsequent calls with that link return only what has changed since. Note: Graph rejects standard OData query parameters on this delta endpoint (the page-cap flag throws `Skip token is not provided`), so the OData passthrough is intentionally NOT exposed here. Use `next-page` with the returned `@odata.nextLink` to walk pages.",
|
|
24581
24727
|
category: "tasks",
|
|
24582
24728
|
graphMethod: "GET",
|
|
@@ -24604,13 +24750,13 @@ var meta148 = {
|
|
|
24604
24750
|
// src/use-cases/commands/list-my-memberships.ts
|
|
24605
24751
|
var exports_list_my_memberships = {};
|
|
24606
24752
|
__export(exports_list_my_memberships, {
|
|
24607
|
-
schema: () =>
|
|
24608
|
-
meta: () =>
|
|
24609
|
-
execute: () =>
|
|
24753
|
+
schema: () => schema148,
|
|
24754
|
+
meta: () => meta150,
|
|
24755
|
+
execute: () => execute148
|
|
24610
24756
|
});
|
|
24611
24757
|
var baseSchema77 = exports_external.object({}).strict();
|
|
24612
|
-
var { execute:
|
|
24613
|
-
var
|
|
24758
|
+
var { execute: execute148, schema: schema148 } = buildListCommand(() => "/me/memberOf", baseSchema77);
|
|
24759
|
+
var meta150 = {
|
|
24614
24760
|
summary: "List the groups, directory roles, and administrative units the signed-in user is a member of. Each entry's `@odata.type` distinguishes #microsoft.graph.group from #microsoft.graph.directoryRole, etc.",
|
|
24615
24761
|
category: "user",
|
|
24616
24762
|
graphMethod: "GET",
|
|
@@ -24625,13 +24771,13 @@ var meta149 = {
|
|
|
24625
24771
|
// src/use-cases/commands/get-my-manager.ts
|
|
24626
24772
|
var exports_get_my_manager = {};
|
|
24627
24773
|
__export(exports_get_my_manager, {
|
|
24628
|
-
schema: () =>
|
|
24629
|
-
meta: () =>
|
|
24630
|
-
execute: () =>
|
|
24774
|
+
schema: () => schema149,
|
|
24775
|
+
meta: () => meta151,
|
|
24776
|
+
execute: () => execute149
|
|
24631
24777
|
});
|
|
24632
|
-
var
|
|
24633
|
-
var
|
|
24634
|
-
const parsed =
|
|
24778
|
+
var schema149 = exports_external.object({}).extend(selectExpandSchema.shape);
|
|
24779
|
+
var execute149 = async (graph, params) => {
|
|
24780
|
+
const parsed = schema149.safeParse(params);
|
|
24635
24781
|
if (!parsed.success)
|
|
24636
24782
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
24637
24783
|
const path = appendOData("/me/manager", parsed.data);
|
|
@@ -24643,7 +24789,7 @@ var execute148 = async (graph, params) => {
|
|
|
24643
24789
|
}
|
|
24644
24790
|
return result;
|
|
24645
24791
|
};
|
|
24646
|
-
var
|
|
24792
|
+
var meta151 = {
|
|
24647
24793
|
summary: "Return the signed-in user's manager (a single `user` resource). When no manager is set in the directory, Graph returns 404 `Request_ResourceNotFound`; this command maps that one specific 404 to `{ ok: true, data: { manager: null, note: '...' } }` so an LLM can distinguish 'no manager' from a permission failure without parsing prose. Use `--select` to slim the response (e.g. `--select id,displayName,mail`).",
|
|
24648
24794
|
category: "user",
|
|
24649
24795
|
graphMethod: "GET",
|
|
@@ -24657,13 +24803,13 @@ var meta150 = {
|
|
|
24657
24803
|
// src/use-cases/commands/get-user-manager.ts
|
|
24658
24804
|
var exports_get_user_manager = {};
|
|
24659
24805
|
__export(exports_get_user_manager, {
|
|
24660
|
-
schema: () =>
|
|
24661
|
-
meta: () =>
|
|
24662
|
-
execute: () =>
|
|
24806
|
+
schema: () => schema150,
|
|
24807
|
+
meta: () => meta152,
|
|
24808
|
+
execute: () => execute150
|
|
24663
24809
|
});
|
|
24664
|
-
var
|
|
24665
|
-
var
|
|
24666
|
-
const parsed =
|
|
24810
|
+
var schema150 = exports_external.object({ userId: exports_external.string().min(1) }).extend(selectExpandSchema.shape);
|
|
24811
|
+
var execute150 = async (graph, params) => {
|
|
24812
|
+
const parsed = schema150.safeParse(params);
|
|
24667
24813
|
if (!parsed.success)
|
|
24668
24814
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
24669
24815
|
const path = appendOData(`/users/${parsed.data.userId}/manager`, parsed.data);
|
|
@@ -24675,7 +24821,7 @@ var execute149 = async (graph, params) => {
|
|
|
24675
24821
|
}
|
|
24676
24822
|
return result;
|
|
24677
24823
|
};
|
|
24678
|
-
var
|
|
24824
|
+
var meta152 = {
|
|
24679
24825
|
summary: "Return a specific user's manager (a single `user` resource). When the user has no manager set in the directory, Graph returns 404 `Request_ResourceNotFound`; this command maps that one specific 404 to `{ ok: true, data: { manager: null, note: '...' } }` (same shape as `get-my-manager`) so an LLM can distinguish 'no manager' from 'unknown user' with a single discriminator across both commands. Use `--select` to slim the response.",
|
|
24680
24826
|
category: "user",
|
|
24681
24827
|
graphMethod: "GET",
|
|
@@ -24698,13 +24844,13 @@ var meta151 = {
|
|
|
24698
24844
|
// src/use-cases/commands/list-relevant-people.ts
|
|
24699
24845
|
var exports_list_relevant_people = {};
|
|
24700
24846
|
__export(exports_list_relevant_people, {
|
|
24701
|
-
schema: () =>
|
|
24702
|
-
meta: () =>
|
|
24703
|
-
execute: () =>
|
|
24847
|
+
schema: () => schema151,
|
|
24848
|
+
meta: () => meta153,
|
|
24849
|
+
execute: () => execute151
|
|
24704
24850
|
});
|
|
24705
24851
|
var baseSchema78 = exports_external.object({}).strict();
|
|
24706
|
-
var { execute:
|
|
24707
|
-
var
|
|
24852
|
+
var { execute: execute151, schema: schema151 } = buildListCommand(() => "/me/people", baseSchema78);
|
|
24853
|
+
var meta153 = {
|
|
24708
24854
|
summary: "List people relevant to the signed-in user — colleagues they email and meet with most. Microsoft's relevance ranking, not the full directory. Returns `displayName`, `emailAddresses`, `jobTitle`, `companyName`, etc.",
|
|
24709
24855
|
category: "user",
|
|
24710
24856
|
graphMethod: "GET",
|
|
@@ -24719,13 +24865,13 @@ var meta152 = {
|
|
|
24719
24865
|
// src/use-cases/commands/list-groups.ts
|
|
24720
24866
|
var exports_list_groups = {};
|
|
24721
24867
|
__export(exports_list_groups, {
|
|
24722
|
-
schema: () =>
|
|
24723
|
-
meta: () =>
|
|
24724
|
-
execute: () =>
|
|
24868
|
+
schema: () => schema152,
|
|
24869
|
+
meta: () => meta154,
|
|
24870
|
+
execute: () => execute152
|
|
24725
24871
|
});
|
|
24726
24872
|
var baseSchema79 = exports_external.object({}).strict();
|
|
24727
|
-
var { execute:
|
|
24728
|
-
var
|
|
24873
|
+
var { execute: execute152, schema: schema152 } = buildNoSkipListCommand(() => "/groups", baseSchema79);
|
|
24874
|
+
var meta154 = {
|
|
24729
24875
|
summary: "List Microsoft 365 groups, security groups, and distribution groups in the tenant directory. Use `--top` and `next-page` to paginate over very large directories.",
|
|
24730
24876
|
category: "user",
|
|
24731
24877
|
graphMethod: "GET",
|
|
@@ -24741,13 +24887,13 @@ var meta153 = {
|
|
|
24741
24887
|
// src/use-cases/commands/get-group.ts
|
|
24742
24888
|
var exports_get_group = {};
|
|
24743
24889
|
__export(exports_get_group, {
|
|
24744
|
-
schema: () =>
|
|
24745
|
-
meta: () =>
|
|
24746
|
-
execute: () =>
|
|
24890
|
+
schema: () => schema153,
|
|
24891
|
+
meta: () => meta155,
|
|
24892
|
+
execute: () => execute153
|
|
24747
24893
|
});
|
|
24748
24894
|
var baseSchema80 = exports_external.object({ groupId: exports_external.string().min(1) });
|
|
24749
|
-
var { execute:
|
|
24750
|
-
var
|
|
24895
|
+
var { execute: execute153, schema: schema153 } = buildSelectableCommand((p) => `/groups/${p.groupId}`, baseSchema80);
|
|
24896
|
+
var meta155 = {
|
|
24751
24897
|
summary: "Return metadata for a single Azure AD / Microsoft 365 group. Use `--select` to slim large group payloads (the full group resource includes 30+ fields).",
|
|
24752
24898
|
category: "user",
|
|
24753
24899
|
graphMethod: "GET",
|
|
@@ -24770,13 +24916,13 @@ var meta154 = {
|
|
|
24770
24916
|
// src/use-cases/commands/list-group-members.ts
|
|
24771
24917
|
var exports_list_group_members = {};
|
|
24772
24918
|
__export(exports_list_group_members, {
|
|
24773
|
-
schema: () =>
|
|
24774
|
-
meta: () =>
|
|
24775
|
-
execute: () =>
|
|
24919
|
+
schema: () => schema154,
|
|
24920
|
+
meta: () => meta156,
|
|
24921
|
+
execute: () => execute154
|
|
24776
24922
|
});
|
|
24777
24923
|
var baseSchema81 = exports_external.object({ groupId: exports_external.string().min(1) });
|
|
24778
|
-
var { execute:
|
|
24779
|
-
var
|
|
24924
|
+
var { execute: execute154, schema: schema154 } = buildListCommand((p) => `/groups/${p.groupId}/members`, baseSchema81);
|
|
24925
|
+
var meta156 = {
|
|
24780
24926
|
summary: "List members of an Azure AD / Microsoft 365 group. Returns users, groups, and other directoryObjects depending on the group's membership.",
|
|
24781
24927
|
category: "user",
|
|
24782
24928
|
graphMethod: "GET",
|
|
@@ -24800,13 +24946,13 @@ var meta155 = {
|
|
|
24800
24946
|
// src/use-cases/commands/list-group-owners.ts
|
|
24801
24947
|
var exports_list_group_owners = {};
|
|
24802
24948
|
__export(exports_list_group_owners, {
|
|
24803
|
-
schema: () =>
|
|
24804
|
-
meta: () =>
|
|
24805
|
-
execute: () =>
|
|
24949
|
+
schema: () => schema155,
|
|
24950
|
+
meta: () => meta157,
|
|
24951
|
+
execute: () => execute155
|
|
24806
24952
|
});
|
|
24807
24953
|
var baseSchema82 = exports_external.object({ groupId: exports_external.string().min(1) });
|
|
24808
|
-
var { execute:
|
|
24809
|
-
var
|
|
24954
|
+
var { execute: execute155, schema: schema155 } = buildListCommand((p) => `/groups/${p.groupId}/owners`, baseSchema82);
|
|
24955
|
+
var meta157 = {
|
|
24810
24956
|
summary: "List the owners of an Azure AD / Microsoft 365 group.",
|
|
24811
24957
|
category: "user",
|
|
24812
24958
|
graphMethod: "GET",
|
|
@@ -24830,13 +24976,13 @@ var meta156 = {
|
|
|
24830
24976
|
// src/use-cases/commands/list-group-events.ts
|
|
24831
24977
|
var exports_list_group_events = {};
|
|
24832
24978
|
__export(exports_list_group_events, {
|
|
24833
|
-
schema: () =>
|
|
24834
|
-
meta: () =>
|
|
24835
|
-
execute: () =>
|
|
24979
|
+
schema: () => schema156,
|
|
24980
|
+
meta: () => meta158,
|
|
24981
|
+
execute: () => execute156
|
|
24836
24982
|
});
|
|
24837
24983
|
var baseSchema83 = exports_external.object({ groupId: exports_external.string().min(1) });
|
|
24838
|
-
var { execute:
|
|
24839
|
-
var
|
|
24984
|
+
var { execute: execute156, schema: schema156 } = buildListCommand((p) => `/groups/${p.groupId}/events`, baseSchema83);
|
|
24985
|
+
var meta158 = {
|
|
24840
24986
|
summary: "List events from a unified (Microsoft 365) group's calendar. Only Microsoft 365 groups have a calendar — security and distribution groups return an empty `value[]` or 404.",
|
|
24841
24987
|
category: "calendar",
|
|
24842
24988
|
graphMethod: "GET",
|
|
@@ -24860,13 +25006,13 @@ var meta157 = {
|
|
|
24860
25006
|
// src/use-cases/commands/get-group-calendar-view.ts
|
|
24861
25007
|
var exports_get_group_calendar_view = {};
|
|
24862
25008
|
__export(exports_get_group_calendar_view, {
|
|
24863
|
-
schema: () =>
|
|
24864
|
-
meta: () =>
|
|
24865
|
-
execute: () =>
|
|
25009
|
+
schema: () => schema157,
|
|
25010
|
+
meta: () => meta159,
|
|
25011
|
+
execute: () => execute157
|
|
24866
25012
|
});
|
|
24867
25013
|
var baseSchema84 = exports_external.object({ groupId: exports_external.string().min(1), startDateTime: isoDateTimeField, endDateTime: isoDateTimeField });
|
|
24868
|
-
var { execute:
|
|
24869
|
-
var
|
|
25014
|
+
var { execute: execute157, schema: schema157 } = buildListCommand((p) => `/groups/${p.groupId}/calendarView?startDateTime=${encodeURIComponent(p.startDateTime)}&endDateTime=${encodeURIComponent(p.endDateTime)}`, baseSchema84);
|
|
25015
|
+
var meta159 = {
|
|
24870
25016
|
summary: "Return a date-windowed calendar view from a unified (Microsoft 365) group's calendar. Recurring events are expanded into individual occurrences across the window. Only Microsoft 365 groups have a calendar — security and distribution groups return `MailboxNotEnabledForRESTAPI`.",
|
|
24871
25017
|
category: "calendar",
|
|
24872
25018
|
graphMethod: "GET",
|
|
@@ -24898,13 +25044,13 @@ var meta158 = {
|
|
|
24898
25044
|
// src/use-cases/commands/list-group-conversations.ts
|
|
24899
25045
|
var exports_list_group_conversations = {};
|
|
24900
25046
|
__export(exports_list_group_conversations, {
|
|
24901
|
-
schema: () =>
|
|
24902
|
-
meta: () =>
|
|
24903
|
-
execute: () =>
|
|
25047
|
+
schema: () => schema158,
|
|
25048
|
+
meta: () => meta160,
|
|
25049
|
+
execute: () => execute158
|
|
24904
25050
|
});
|
|
24905
25051
|
var baseSchema85 = exports_external.object({ groupId: exports_external.string().min(1) });
|
|
24906
|
-
var { execute:
|
|
24907
|
-
var
|
|
25052
|
+
var { execute: execute158, schema: schema158 } = buildListCommand((p) => `/groups/${p.groupId}/conversations`, baseSchema85);
|
|
25053
|
+
var meta160 = {
|
|
24908
25054
|
summary: "List conversations in a unified (Microsoft 365) group inbox. Each conversation aggregates one or more threads. Only Microsoft 365 groups have a mailbox — security and distribution groups return `MailboxNotEnabledForRESTAPI`. Verify the group is unified before calling.",
|
|
24909
25055
|
category: "mail",
|
|
24910
25056
|
graphMethod: "GET",
|
|
@@ -24928,13 +25074,13 @@ var meta159 = {
|
|
|
24928
25074
|
// src/use-cases/commands/list-group-threads.ts
|
|
24929
25075
|
var exports_list_group_threads = {};
|
|
24930
25076
|
__export(exports_list_group_threads, {
|
|
24931
|
-
schema: () =>
|
|
24932
|
-
meta: () =>
|
|
24933
|
-
execute: () =>
|
|
25077
|
+
schema: () => schema159,
|
|
25078
|
+
meta: () => meta161,
|
|
25079
|
+
execute: () => execute159
|
|
24934
25080
|
});
|
|
24935
25081
|
var baseSchema86 = exports_external.object({ groupId: exports_external.string().min(1) });
|
|
24936
|
-
var { execute:
|
|
24937
|
-
var
|
|
25082
|
+
var { execute: execute159, schema: schema159 } = buildListCommand((p) => `/groups/${p.groupId}/threads`, baseSchema86);
|
|
25083
|
+
var meta161 = {
|
|
24938
25084
|
summary: "List threads in a unified (Microsoft 365) group inbox. Threads are flatter than conversations — one per topic, useful when conversation-level grouping isn't needed. Only Microsoft 365 groups have a mailbox — security and distribution groups return `MailboxNotEnabledForRESTAPI`.",
|
|
24939
25085
|
category: "mail",
|
|
24940
25086
|
graphMethod: "GET",
|
|
@@ -24958,18 +25104,18 @@ var meta160 = {
|
|
|
24958
25104
|
// src/use-cases/commands/get-mail-message-mime.ts
|
|
24959
25105
|
var exports_get_mail_message_mime = {};
|
|
24960
25106
|
__export(exports_get_mail_message_mime, {
|
|
24961
|
-
schema: () =>
|
|
24962
|
-
meta: () =>
|
|
24963
|
-
execute: () =>
|
|
25107
|
+
schema: () => schema160,
|
|
25108
|
+
meta: () => meta162,
|
|
25109
|
+
execute: () => execute160
|
|
24964
25110
|
});
|
|
24965
|
-
var
|
|
24966
|
-
var
|
|
24967
|
-
const parsed =
|
|
25111
|
+
var schema160 = exports_external.object({ messageId: exports_external.string().min(1) });
|
|
25112
|
+
var execute160 = async (graph, params) => {
|
|
25113
|
+
const parsed = schema160.safeParse(params);
|
|
24968
25114
|
if (!parsed.success)
|
|
24969
25115
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
24970
25116
|
return inlineBinary(graph, `/me/messages/${parsed.data.messageId}/$value`);
|
|
24971
25117
|
};
|
|
24972
|
-
var
|
|
25118
|
+
var meta162 = {
|
|
24973
25119
|
summary: "Return the raw RFC 5322 MIME source of a single Outlook message — full headers, every attachment encoded inline. Useful for archiving, full-fidelity forensic inspection, or feeding into a tool that reads MIME directly. For human-readable content prefer `get-mail-message` or `convert-mail-to-markdown`.",
|
|
24974
25120
|
category: "mail",
|
|
24975
25121
|
graphMethod: "GET",
|
|
@@ -24992,13 +25138,13 @@ var meta161 = {
|
|
|
24992
25138
|
// src/use-cases/commands/list-mail-folder-messages-delta.ts
|
|
24993
25139
|
var exports_list_mail_folder_messages_delta = {};
|
|
24994
25140
|
__export(exports_list_mail_folder_messages_delta, {
|
|
24995
|
-
schema: () =>
|
|
24996
|
-
meta: () =>
|
|
24997
|
-
execute: () =>
|
|
25141
|
+
schema: () => schema161,
|
|
25142
|
+
meta: () => meta163,
|
|
25143
|
+
execute: () => execute161
|
|
24998
25144
|
});
|
|
24999
25145
|
var baseSchema87 = exports_external.object({ mailFolderId: exports_external.string().min(1) });
|
|
25000
|
-
var { execute:
|
|
25001
|
-
var
|
|
25146
|
+
var { execute: execute161, schema: schema161 } = buildListCommand((p) => `/me/mailFolders/${p.mailFolderId}/messages/delta()`, baseSchema87);
|
|
25147
|
+
var meta163 = {
|
|
25002
25148
|
summary: "Track incremental changes (added / updated / deleted messages) within a single mail folder using Microsoft Graph delta tokens. The first call returns the current snapshot plus a `@odata.deltaLink`; subsequent calls with that link return only what has changed since.",
|
|
25003
25149
|
category: "mail",
|
|
25004
25150
|
graphMethod: "GET",
|
|
@@ -25023,13 +25169,13 @@ var meta162 = {
|
|
|
25023
25169
|
// src/use-cases/commands/list-shared-mailbox-messages.ts
|
|
25024
25170
|
var exports_list_shared_mailbox_messages = {};
|
|
25025
25171
|
__export(exports_list_shared_mailbox_messages, {
|
|
25026
|
-
schema: () =>
|
|
25027
|
-
meta: () =>
|
|
25028
|
-
execute: () =>
|
|
25172
|
+
schema: () => schema162,
|
|
25173
|
+
meta: () => meta164,
|
|
25174
|
+
execute: () => execute162
|
|
25029
25175
|
});
|
|
25030
25176
|
var baseSchema88 = exports_external.object({ userId: exports_external.string().min(1) });
|
|
25031
|
-
var { execute:
|
|
25032
|
-
var
|
|
25177
|
+
var { execute: execute162, schema: schema162 } = buildListCommand((p) => `/users/${p.userId}/messages`, baseSchema88);
|
|
25178
|
+
var meta164 = {
|
|
25033
25179
|
summary: "List messages from a shared or delegated mailbox the signed-in user has read access to. Same shape as `list-mail-messages` but scoped to a specific mailbox owner. 403 if the signed-in user does not have shared access to that mailbox.",
|
|
25034
25180
|
category: "mail",
|
|
25035
25181
|
graphMethod: "GET",
|
|
@@ -25053,13 +25199,13 @@ var meta163 = {
|
|
|
25053
25199
|
// src/use-cases/commands/list-shared-mailbox-folder-messages.ts
|
|
25054
25200
|
var exports_list_shared_mailbox_folder_messages = {};
|
|
25055
25201
|
__export(exports_list_shared_mailbox_folder_messages, {
|
|
25056
|
-
schema: () =>
|
|
25057
|
-
meta: () =>
|
|
25058
|
-
execute: () =>
|
|
25202
|
+
schema: () => schema163,
|
|
25203
|
+
meta: () => meta165,
|
|
25204
|
+
execute: () => execute163
|
|
25059
25205
|
});
|
|
25060
25206
|
var baseSchema89 = exports_external.object({ userId: exports_external.string().min(1), mailFolderId: exports_external.string().min(1) });
|
|
25061
|
-
var { execute:
|
|
25062
|
-
var
|
|
25207
|
+
var { execute: execute163, schema: schema163 } = buildListCommand((p) => `/users/${p.userId}/mailFolders/${p.mailFolderId}/messages`, baseSchema89);
|
|
25208
|
+
var meta165 = {
|
|
25063
25209
|
summary: "List messages in a single folder of a shared / delegated mailbox.",
|
|
25064
25210
|
category: "mail",
|
|
25065
25211
|
graphMethod: "GET",
|
|
@@ -25088,13 +25234,13 @@ var meta164 = {
|
|
|
25088
25234
|
// src/use-cases/commands/get-shared-mailbox-message.ts
|
|
25089
25235
|
var exports_get_shared_mailbox_message = {};
|
|
25090
25236
|
__export(exports_get_shared_mailbox_message, {
|
|
25091
|
-
schema: () =>
|
|
25092
|
-
meta: () =>
|
|
25093
|
-
execute: () =>
|
|
25237
|
+
schema: () => schema164,
|
|
25238
|
+
meta: () => meta166,
|
|
25239
|
+
execute: () => execute164
|
|
25094
25240
|
});
|
|
25095
25241
|
var baseSchema90 = exports_external.object({ userId: exports_external.string().min(1), messageId: exports_external.string().min(1) });
|
|
25096
|
-
var { execute:
|
|
25097
|
-
var
|
|
25242
|
+
var { execute: execute164, schema: schema164 } = buildSelectableCommand((p) => `/users/${p.userId}/messages/${p.messageId}`, baseSchema90);
|
|
25243
|
+
var meta166 = {
|
|
25098
25244
|
summary: "Return a single message from a shared / delegated mailbox. Use `--select` to fetch only specific fields (e.g. `--select id,subject,from,receivedDateTime`) — sibling to `get-mail-message` for /me.",
|
|
25099
25245
|
category: "mail",
|
|
25100
25246
|
graphMethod: "GET",
|
|
@@ -25122,22 +25268,22 @@ var meta165 = {
|
|
|
25122
25268
|
// src/use-cases/commands/list-conversation-messages.ts
|
|
25123
25269
|
var exports_list_conversation_messages = {};
|
|
25124
25270
|
__export(exports_list_conversation_messages, {
|
|
25125
|
-
schema: () =>
|
|
25126
|
-
meta: () =>
|
|
25127
|
-
execute: () =>
|
|
25271
|
+
schema: () => schema165,
|
|
25272
|
+
meta: () => meta167,
|
|
25273
|
+
execute: () => execute165
|
|
25128
25274
|
});
|
|
25129
25275
|
var allowedShape = Object.fromEntries(Object.entries(odataQuerySchema.shape).filter(([key]) => key !== "filter" && key !== "orderby"));
|
|
25130
25276
|
var allowedOptions = odataQueryOptions.filter((o) => o.name !== "filter" && o.name !== "orderby");
|
|
25131
|
-
var
|
|
25132
|
-
var
|
|
25133
|
-
const parsed =
|
|
25277
|
+
var schema165 = exports_external.object({ conversationId: exports_external.string().min(1) }).extend(allowedShape);
|
|
25278
|
+
var execute165 = async (graph, params) => {
|
|
25279
|
+
const parsed = schema165.safeParse(params);
|
|
25134
25280
|
if (!parsed.success)
|
|
25135
25281
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
25136
25282
|
const escaped = parsed.data.conversationId.replace(/'/g, "''");
|
|
25137
25283
|
const path = appendOData(`/me/messages?$filter=conversationId eq '${escaped}'`, parsed.data);
|
|
25138
25284
|
return graph.get(path);
|
|
25139
25285
|
};
|
|
25140
|
-
var
|
|
25286
|
+
var meta167 = {
|
|
25141
25287
|
summary: "List every message in a single Outlook conversation (thread) using `$filter=conversationId eq '...'`. Reconstructs a complete thread regardless of which subject lines or folders the replies landed in. Accepts the OData passthrough flags top/skip/select/expand — the filter and orderby passthroughs are intentionally omitted (the path already pins a `$filter`, and Graph rejects this filter combined with `$orderby` as `InefficientFilter` since `conversationId` is not a sortable index). The caller can sort by `receivedDateTime` client-side. KQL `$search` does not index `conversationId`, so `$filter` is the only documented Graph idiom for whole-thread retrieval.",
|
|
25142
25288
|
category: "mail",
|
|
25143
25289
|
graphMethod: "GET",
|
|
@@ -25161,13 +25307,13 @@ var meta166 = {
|
|
|
25161
25307
|
// src/use-cases/commands/list-focused-inbox-overrides.ts
|
|
25162
25308
|
var exports_list_focused_inbox_overrides = {};
|
|
25163
25309
|
__export(exports_list_focused_inbox_overrides, {
|
|
25164
|
-
schema: () =>
|
|
25165
|
-
meta: () =>
|
|
25166
|
-
execute: () =>
|
|
25310
|
+
schema: () => schema166,
|
|
25311
|
+
meta: () => meta168,
|
|
25312
|
+
execute: () => execute166
|
|
25167
25313
|
});
|
|
25168
25314
|
var baseSchema91 = exports_external.object({}).strict();
|
|
25169
|
-
var { execute:
|
|
25170
|
-
var
|
|
25315
|
+
var { execute: execute166, schema: schema166 } = buildListCommand(() => "/me/inferenceClassification/overrides", baseSchema91);
|
|
25316
|
+
var meta168 = {
|
|
25171
25317
|
summary: "List the signed-in user's Focused Inbox classification overrides — sender addresses they've manually moved to Focused or Other, which override Microsoft's automatic classifier.",
|
|
25172
25318
|
category: "mail",
|
|
25173
25319
|
graphMethod: "GET",
|
|
@@ -25182,13 +25328,13 @@ var meta167 = {
|
|
|
25182
25328
|
// src/use-cases/commands/list-outlook-categories.ts
|
|
25183
25329
|
var exports_list_outlook_categories = {};
|
|
25184
25330
|
__export(exports_list_outlook_categories, {
|
|
25185
|
-
schema: () =>
|
|
25186
|
-
meta: () =>
|
|
25187
|
-
execute: () =>
|
|
25331
|
+
schema: () => schema167,
|
|
25332
|
+
meta: () => meta169,
|
|
25333
|
+
execute: () => execute167
|
|
25188
25334
|
});
|
|
25189
|
-
var
|
|
25190
|
-
var { execute:
|
|
25191
|
-
var
|
|
25335
|
+
var schema167 = exports_external.object({}).strict();
|
|
25336
|
+
var { execute: execute167 } = buildCommand(() => "/me/outlook/masterCategories", schema167);
|
|
25337
|
+
var meta169 = {
|
|
25192
25338
|
summary: "List the signed-in user's Outlook color categories — the named tags that can be applied to mail, calendar items, and contacts. Each entry has `displayName` and a `color` from Outlook's preset palette. Note: Graph silently ignores every OData passthrough on this endpoint (`$top`, `$skip`, `$select`, `$filter`, `$orderby`, `$expand`), so the CLI does not expose any of those flags — the full collection is always returned. Slice client-side.",
|
|
25193
25339
|
category: "mail",
|
|
25194
25340
|
graphMethod: "GET",
|
|
@@ -25202,13 +25348,13 @@ var meta168 = {
|
|
|
25202
25348
|
// src/use-cases/commands/list-shared-calendar-events.ts
|
|
25203
25349
|
var exports_list_shared_calendar_events = {};
|
|
25204
25350
|
__export(exports_list_shared_calendar_events, {
|
|
25205
|
-
schema: () =>
|
|
25206
|
-
meta: () =>
|
|
25207
|
-
execute: () =>
|
|
25351
|
+
schema: () => schema168,
|
|
25352
|
+
meta: () => meta170,
|
|
25353
|
+
execute: () => execute168
|
|
25208
25354
|
});
|
|
25209
25355
|
var baseSchema92 = exports_external.object({ userId: exports_external.string().min(1) });
|
|
25210
|
-
var { execute:
|
|
25211
|
-
var
|
|
25356
|
+
var { execute: execute168, schema: schema168 } = buildListCommand((p) => `/users/${p.userId}/calendar/events`, baseSchema92);
|
|
25357
|
+
var meta170 = {
|
|
25212
25358
|
summary: "List events from another user's primary calendar (shared / delegated access). 403 without `Calendars.Read.Shared`.",
|
|
25213
25359
|
category: "calendar",
|
|
25214
25360
|
graphMethod: "GET",
|
|
@@ -25232,13 +25378,13 @@ var meta169 = {
|
|
|
25232
25378
|
// src/use-cases/commands/get-shared-calendar-view.ts
|
|
25233
25379
|
var exports_get_shared_calendar_view = {};
|
|
25234
25380
|
__export(exports_get_shared_calendar_view, {
|
|
25235
|
-
schema: () =>
|
|
25236
|
-
meta: () =>
|
|
25237
|
-
execute: () =>
|
|
25381
|
+
schema: () => schema169,
|
|
25382
|
+
meta: () => meta171,
|
|
25383
|
+
execute: () => execute169
|
|
25238
25384
|
});
|
|
25239
25385
|
var baseSchema93 = exports_external.object({ userId: exports_external.string().min(1), startDateTime: isoDateTimeField, endDateTime: isoDateTimeField });
|
|
25240
|
-
var { execute:
|
|
25241
|
-
var
|
|
25386
|
+
var { execute: execute169, schema: schema169 } = buildListCommand((p) => `/users/${p.userId}/calendarView?startDateTime=${encodeURIComponent(p.startDateTime)}&endDateTime=${encodeURIComponent(p.endDateTime)}`, baseSchema93);
|
|
25387
|
+
var meta171 = {
|
|
25242
25388
|
summary: "Return a date-windowed calendar view from another user's primary calendar (shared / delegated access). Recurrences expanded into individual occurrences.",
|
|
25243
25389
|
category: "calendar",
|
|
25244
25390
|
graphMethod: "GET",
|
|
@@ -25264,13 +25410,13 @@ var meta170 = {
|
|
|
25264
25410
|
// src/use-cases/commands/list-sharepoint-list-columns.ts
|
|
25265
25411
|
var exports_list_sharepoint_list_columns = {};
|
|
25266
25412
|
__export(exports_list_sharepoint_list_columns, {
|
|
25267
|
-
schema: () =>
|
|
25268
|
-
meta: () =>
|
|
25269
|
-
execute: () =>
|
|
25413
|
+
schema: () => schema170,
|
|
25414
|
+
meta: () => meta172,
|
|
25415
|
+
execute: () => execute170
|
|
25270
25416
|
});
|
|
25271
25417
|
var baseSchema94 = exports_external.object({ siteId: exports_external.string().min(1), listId: exports_external.string().min(1) });
|
|
25272
|
-
var { execute:
|
|
25273
|
-
var
|
|
25418
|
+
var { execute: execute170, schema: schema170 } = buildSelectableCommand((p) => `/sites/${p.siteId}/lists/${p.listId}/columns`, baseSchema94);
|
|
25419
|
+
var meta172 = {
|
|
25274
25420
|
summary: "List the column definitions (schema) of a SharePoint list. Useful before reading list items so you know which fields exist and their types. Note: Graph silently ignores `$top` and `$skip` on this endpoint, so the CLI exposes only `--select` and `--expand`.",
|
|
25275
25421
|
category: "sharepoint",
|
|
25276
25422
|
graphMethod: "GET",
|
|
@@ -25298,13 +25444,13 @@ var meta171 = {
|
|
|
25298
25444
|
// src/use-cases/commands/get-sharepoint-list-column.ts
|
|
25299
25445
|
var exports_get_sharepoint_list_column = {};
|
|
25300
25446
|
__export(exports_get_sharepoint_list_column, {
|
|
25301
|
-
schema: () =>
|
|
25302
|
-
meta: () =>
|
|
25303
|
-
execute: () =>
|
|
25447
|
+
schema: () => schema171,
|
|
25448
|
+
meta: () => meta173,
|
|
25449
|
+
execute: () => execute171
|
|
25304
25450
|
});
|
|
25305
25451
|
var baseSchema95 = exports_external.object({ siteId: exports_external.string().min(1), listId: exports_external.string().min(1), columnId: exports_external.string().min(1) });
|
|
25306
|
-
var { execute:
|
|
25307
|
-
var
|
|
25452
|
+
var { execute: execute171, schema: schema171 } = buildSelectableCommand((p) => `/sites/${p.siteId}/lists/${p.listId}/columns/${p.columnId}`, baseSchema95);
|
|
25453
|
+
var meta173 = {
|
|
25308
25454
|
summary: "Return a single column definition from a SharePoint list.",
|
|
25309
25455
|
category: "sharepoint",
|
|
25310
25456
|
graphMethod: "GET",
|
|
@@ -25339,9 +25485,9 @@ var meta172 = {
|
|
|
25339
25485
|
// src/use-cases/commands/list-sharepoint-site-onenote-notebooks.ts
|
|
25340
25486
|
var exports_list_sharepoint_site_onenote_notebooks = {};
|
|
25341
25487
|
__export(exports_list_sharepoint_site_onenote_notebooks, {
|
|
25342
|
-
schema: () =>
|
|
25343
|
-
meta: () =>
|
|
25344
|
-
execute: () =>
|
|
25488
|
+
schema: () => schema172,
|
|
25489
|
+
meta: () => meta174,
|
|
25490
|
+
execute: () => execute172
|
|
25345
25491
|
});
|
|
25346
25492
|
|
|
25347
25493
|
// src/use-cases/commands/onenote-5k-limit.ts
|
|
@@ -25364,9 +25510,9 @@ var wrapOnenote5kLimit = (inner14) => async (graph, params) => {
|
|
|
25364
25510
|
// src/use-cases/commands/list-sharepoint-site-onenote-notebooks.ts
|
|
25365
25511
|
var baseSchema96 = exports_external.object({ siteId: exports_external.string().min(1) });
|
|
25366
25512
|
var inner14 = buildListCommand((p) => `/sites/${p.siteId}/onenote/notebooks`, baseSchema96);
|
|
25367
|
-
var
|
|
25368
|
-
var { schema:
|
|
25369
|
-
var
|
|
25513
|
+
var execute172 = wrapOnenote5kLimit(inner14.execute);
|
|
25514
|
+
var { schema: schema172 } = inner14;
|
|
25515
|
+
var meta174 = {
|
|
25370
25516
|
summary: "List OneNote notebooks attached to a SharePoint site (separate from the personal `list-onenote-notebooks` which targets `/me`).",
|
|
25371
25517
|
category: "notes",
|
|
25372
25518
|
graphMethod: "GET",
|
|
@@ -25390,15 +25536,15 @@ var meta173 = {
|
|
|
25390
25536
|
// src/use-cases/commands/list-sharepoint-site-onenote-notebook-sections.ts
|
|
25391
25537
|
var exports_list_sharepoint_site_onenote_notebook_sections = {};
|
|
25392
25538
|
__export(exports_list_sharepoint_site_onenote_notebook_sections, {
|
|
25393
|
-
schema: () =>
|
|
25394
|
-
meta: () =>
|
|
25395
|
-
execute: () =>
|
|
25539
|
+
schema: () => schema173,
|
|
25540
|
+
meta: () => meta175,
|
|
25541
|
+
execute: () => execute173
|
|
25396
25542
|
});
|
|
25397
25543
|
var baseSchema97 = exports_external.object({ siteId: exports_external.string().min(1), notebookId: exports_external.string().min(1) });
|
|
25398
25544
|
var inner15 = buildListCommand((p) => `/sites/${p.siteId}/onenote/notebooks/${p.notebookId}/sections`, baseSchema97);
|
|
25399
|
-
var
|
|
25400
|
-
var { schema:
|
|
25401
|
-
var
|
|
25545
|
+
var execute173 = wrapOnenote5kLimit(inner15.execute);
|
|
25546
|
+
var { schema: schema173 } = inner15;
|
|
25547
|
+
var meta175 = {
|
|
25402
25548
|
summary: "List sections inside one OneNote notebook attached to a SharePoint site.",
|
|
25403
25549
|
category: "notes",
|
|
25404
25550
|
graphMethod: "GET",
|
|
@@ -25427,15 +25573,15 @@ var meta174 = {
|
|
|
25427
25573
|
// src/use-cases/commands/list-sharepoint-site-onenote-section-pages.ts
|
|
25428
25574
|
var exports_list_sharepoint_site_onenote_section_pages = {};
|
|
25429
25575
|
__export(exports_list_sharepoint_site_onenote_section_pages, {
|
|
25430
|
-
schema: () =>
|
|
25431
|
-
meta: () =>
|
|
25432
|
-
execute: () =>
|
|
25576
|
+
schema: () => schema174,
|
|
25577
|
+
meta: () => meta176,
|
|
25578
|
+
execute: () => execute174
|
|
25433
25579
|
});
|
|
25434
25580
|
var baseSchema98 = exports_external.object({ siteId: exports_external.string().min(1), onenoteSectionId: exports_external.string().min(1) });
|
|
25435
25581
|
var inner16 = buildListCommand((p) => `/sites/${p.siteId}/onenote/sections/${p.onenoteSectionId}/pages`, baseSchema98);
|
|
25436
|
-
var
|
|
25437
|
-
var { schema:
|
|
25438
|
-
var
|
|
25582
|
+
var execute174 = wrapOnenote5kLimit(inner16.execute);
|
|
25583
|
+
var { schema: schema174 } = inner16;
|
|
25584
|
+
var meta176 = {
|
|
25439
25585
|
summary: "List pages inside one section of a SharePoint-site OneNote notebook.",
|
|
25440
25586
|
category: "notes",
|
|
25441
25587
|
graphMethod: "GET",
|
|
@@ -25465,19 +25611,19 @@ var meta175 = {
|
|
|
25465
25611
|
// src/use-cases/commands/get-sharepoint-site-onenote-page-content.ts
|
|
25466
25612
|
var exports_get_sharepoint_site_onenote_page_content = {};
|
|
25467
25613
|
__export(exports_get_sharepoint_site_onenote_page_content, {
|
|
25468
|
-
schema: () =>
|
|
25469
|
-
meta: () =>
|
|
25470
|
-
execute: () =>
|
|
25614
|
+
schema: () => schema175,
|
|
25615
|
+
meta: () => meta177,
|
|
25616
|
+
execute: () => execute175
|
|
25471
25617
|
});
|
|
25472
|
-
var
|
|
25618
|
+
var schema175 = exports_external.object({ siteId: exports_external.string().min(1), onenotePageId: exports_external.string().min(1) });
|
|
25473
25619
|
var innerExecute = async (graph, params) => {
|
|
25474
|
-
const parsed =
|
|
25620
|
+
const parsed = schema175.safeParse(params);
|
|
25475
25621
|
if (!parsed.success)
|
|
25476
25622
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
25477
25623
|
return graph.getBinary(`/sites/${parsed.data.siteId}/onenote/pages/${parsed.data.onenotePageId}/content`);
|
|
25478
25624
|
};
|
|
25479
|
-
var
|
|
25480
|
-
var
|
|
25625
|
+
var execute175 = wrapOnenote5kLimit(innerExecute);
|
|
25626
|
+
var meta177 = {
|
|
25481
25627
|
summary: "Return the HTML content of a single OneNote page from a SharePoint site (parallel to `get-onenote-page-content` for `/me`). The response carries the standard `{contentType: text/html, size, text}` shape so the HTML body is available verbatim under either output format.",
|
|
25482
25628
|
category: "notes",
|
|
25483
25629
|
graphMethod: "GET",
|
|
@@ -25506,13 +25652,13 @@ var meta176 = {
|
|
|
25506
25652
|
// src/use-cases/commands/list-drive-item-thumbnails.ts
|
|
25507
25653
|
var exports_list_drive_item_thumbnails = {};
|
|
25508
25654
|
__export(exports_list_drive_item_thumbnails, {
|
|
25509
|
-
schema: () =>
|
|
25510
|
-
meta: () =>
|
|
25511
|
-
execute: () =>
|
|
25655
|
+
schema: () => schema176,
|
|
25656
|
+
meta: () => meta178,
|
|
25657
|
+
execute: () => execute176
|
|
25512
25658
|
});
|
|
25513
25659
|
var baseSchema99 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
25514
|
-
var { execute:
|
|
25515
|
-
var
|
|
25660
|
+
var { execute: execute176, schema: schema176 } = buildNoSkipListCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/thumbnails`, baseSchema99);
|
|
25661
|
+
var meta178 = {
|
|
25516
25662
|
summary: "List thumbnail URLs (small / medium / large) for a OneDrive / SharePoint file. Each thumbnail set has pre-signed CDN URLs you can render in a UI without further auth.",
|
|
25517
25663
|
category: "drive",
|
|
25518
25664
|
graphMethod: "GET",
|
|
@@ -25542,20 +25688,20 @@ var meta177 = {
|
|
|
25542
25688
|
// src/use-cases/commands/get-excel-used-range.ts
|
|
25543
25689
|
var exports_get_excel_used_range = {};
|
|
25544
25690
|
__export(exports_get_excel_used_range, {
|
|
25545
|
-
schema: () =>
|
|
25546
|
-
meta: () =>
|
|
25547
|
-
execute: () =>
|
|
25691
|
+
schema: () => schema177,
|
|
25692
|
+
meta: () => meta179,
|
|
25693
|
+
execute: () => execute177
|
|
25548
25694
|
});
|
|
25549
25695
|
var DEFAULT_MAX_CELLS2 = 50000;
|
|
25550
|
-
var
|
|
25696
|
+
var schema177 = exports_external.object({
|
|
25551
25697
|
driveId: exports_external.string().min(1),
|
|
25552
25698
|
itemId: exports_external.string().min(1),
|
|
25553
25699
|
worksheetId: exports_external.string().min(1),
|
|
25554
25700
|
full: exports_external.enum(["true", "false"]).optional(),
|
|
25555
25701
|
maxCells: exports_external.string().regex(/^[1-9]\d*$/, "must be a positive integer").optional()
|
|
25556
25702
|
});
|
|
25557
|
-
var
|
|
25558
|
-
const parsed =
|
|
25703
|
+
var execute177 = async (graph, params) => {
|
|
25704
|
+
const parsed = schema177.safeParse(params);
|
|
25559
25705
|
if (!parsed.success)
|
|
25560
25706
|
return err({ type: "validation_error", message: formatZodError(parsed.error) });
|
|
25561
25707
|
const { driveId, itemId, worksheetId } = parsed.data;
|
|
@@ -25590,7 +25736,7 @@ var execute176 = async (graph, params) => {
|
|
|
25590
25736
|
projection: "slim"
|
|
25591
25737
|
});
|
|
25592
25738
|
};
|
|
25593
|
-
var
|
|
25739
|
+
var meta179 = {
|
|
25594
25740
|
summary: 'Return the worksheet\'s used range — the bounding box of every non-empty cell — as a single Excel range. The CLI ships a slim default that strips the redundant `text` / `numberFormat` / `formulas` 2D arrays Graph returns (mostly `"General"` repeated cell-by-cell), keeping `address` / `rowCount` / `columnCount` / `values`. Pass `--full true` to return the raw four-array Graph shape. `--max-cells` (default 50 000) caps the size of the projected `values[]`; oversize ranges drop `values` and surface a hint pointing at `get-excel-range` for band-by-band reads. Avoids fetching the entire 1M × 16K-cell sheet when only a small data island is populated.',
|
|
25595
25741
|
category: "excel",
|
|
25596
25742
|
graphMethod: "GET",
|
|
@@ -25636,13 +25782,13 @@ var meta178 = {
|
|
|
25636
25782
|
// src/use-cases/commands/list-rooms.ts
|
|
25637
25783
|
var exports_list_rooms = {};
|
|
25638
25784
|
__export(exports_list_rooms, {
|
|
25639
|
-
schema: () =>
|
|
25640
|
-
meta: () =>
|
|
25641
|
-
execute: () =>
|
|
25785
|
+
schema: () => schema178,
|
|
25786
|
+
meta: () => meta180,
|
|
25787
|
+
execute: () => execute178
|
|
25642
25788
|
});
|
|
25643
25789
|
var baseSchema100 = exports_external.object({}).strict();
|
|
25644
|
-
var { execute:
|
|
25645
|
-
var
|
|
25790
|
+
var { execute: execute178, schema: schema178 } = buildListCommand(() => "/places/microsoft.graph.room", baseSchema100);
|
|
25791
|
+
var meta180 = {
|
|
25646
25792
|
summary: "List bookable meeting rooms in the tenant. Each `room` has `displayName`, `emailAddress`, `capacity`, `building`, `floorNumber`, and `isWheelChairAccessible`. Use the `emailAddress` as a meeting `attendee` for room booking. Pass `--top 5` to limit the response — large tenants return tens of KB by default.",
|
|
25647
25793
|
category: "calendar",
|
|
25648
25794
|
graphMethod: "GET",
|
|
@@ -25657,13 +25803,13 @@ var meta179 = {
|
|
|
25657
25803
|
// src/use-cases/commands/list-room-lists.ts
|
|
25658
25804
|
var exports_list_room_lists = {};
|
|
25659
25805
|
__export(exports_list_room_lists, {
|
|
25660
|
-
schema: () =>
|
|
25661
|
-
meta: () =>
|
|
25662
|
-
execute: () =>
|
|
25806
|
+
schema: () => schema179,
|
|
25807
|
+
meta: () => meta181,
|
|
25808
|
+
execute: () => execute179
|
|
25663
25809
|
});
|
|
25664
25810
|
var baseSchema101 = exports_external.object({}).strict();
|
|
25665
|
-
var { execute:
|
|
25666
|
-
var
|
|
25811
|
+
var { execute: execute179, schema: schema179 } = buildListCommand(() => "/places/microsoft.graph.roomList", baseSchema101);
|
|
25812
|
+
var meta181 = {
|
|
25667
25813
|
summary: "List room lists — usually one per building. Use these to scope a room search by location: a roomList groups the rooms in one office, then `/places/{roomList}/rooms` lists just those rooms. Pass `--top N` to limit the response on large tenants.",
|
|
25668
25814
|
category: "calendar",
|
|
25669
25815
|
graphMethod: "GET",
|
|
@@ -25678,13 +25824,13 @@ var meta180 = {
|
|
|
25678
25824
|
// src/use-cases/commands/list-trending-insights.ts
|
|
25679
25825
|
var exports_list_trending_insights = {};
|
|
25680
25826
|
__export(exports_list_trending_insights, {
|
|
25681
|
-
schema: () =>
|
|
25682
|
-
meta: () =>
|
|
25683
|
-
execute: () =>
|
|
25827
|
+
schema: () => schema180,
|
|
25828
|
+
meta: () => meta182,
|
|
25829
|
+
execute: () => execute180
|
|
25684
25830
|
});
|
|
25685
25831
|
var baseSchema102 = exports_external.object({}).strict();
|
|
25686
|
-
var { execute:
|
|
25687
|
-
var
|
|
25832
|
+
var { execute: execute180, schema: schema180 } = buildListCommand(() => "/me/insights/trending", baseSchema102);
|
|
25833
|
+
var meta182 = {
|
|
25688
25834
|
summary: "List documents trending around the signed-in user — files popular in their working network (colleagues' recent edits, shares, opens). Microsoft's relevance ranking, useful for surfacing unfamiliar but related work.",
|
|
25689
25835
|
category: "drive",
|
|
25690
25836
|
graphMethod: "GET",
|
|
@@ -25756,6 +25902,7 @@ var commands = {
|
|
|
25756
25902
|
"extract-sharepoint-links-in-mail": exports_extract_sharepoint_links_in_mail,
|
|
25757
25903
|
"extract-sharepoint-links-in-documents": exports_extract_sharepoint_links_in_documents,
|
|
25758
25904
|
"convert-mail-to-markdown": exports_convert_mail_to_markdown,
|
|
25905
|
+
"create-forward-draft": exports_create_forward_draft,
|
|
25759
25906
|
"create-mail-draft": exports_create_mail_draft,
|
|
25760
25907
|
"create-reply-draft": exports_create_reply_draft,
|
|
25761
25908
|
"update-mail-draft": exports_update_mail_draft,
|