ask-marcel-office-cli 0.1.0 → 0.5.5
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/README.md +112 -114
- package/dist/cli.js +1849 -585
- package/dist/commands.json +1436 -0
- package/dist/composition/build-deps.d.ts +5 -1
- package/dist/composition/cli.d.ts +12 -6
- package/dist/composition/package-manager.d.ts +2 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +1666 -548
- package/dist/infra/browser-auth.d.ts +9 -2
- package/dist/infra/graph-client.d.ts +2 -0
- package/dist/infra/playwright-loader.d.ts +4 -0
- package/dist/infra/process-runner-bun.d.ts +2 -0
- package/dist/infra/process-runner-node.d.ts +2 -0
- package/dist/use-cases/commands/build-command.d.ts +1 -1
- package/dist/use-cases/commands/command-types.d.ts +21 -1
- package/dist/use-cases/commands/docs-render.d.ts +24 -0
- package/dist/use-cases/commands/docs.d.ts +10 -0
- package/dist/use-cases/commands/download-drive-item-version-content.d.ts +12 -0
- package/dist/use-cases/commands/download-onedrive-file-content.d.ts +3 -1
- package/dist/use-cases/commands/get-calendar-event.d.ts +3 -1
- package/dist/use-cases/commands/get-calendar-view.d.ts +7 -2
- package/dist/use-cases/commands/get-current-user.d.ts +3 -1
- package/dist/use-cases/commands/get-drive-delta.d.ts +3 -1
- package/dist/use-cases/commands/get-drive-item.d.ts +3 -1
- package/dist/use-cases/commands/get-drive-root-item.d.ts +3 -1
- package/dist/use-cases/commands/get-excel-range.d.ts +3 -1
- package/dist/use-cases/commands/get-excel-table.d.ts +3 -1
- package/dist/use-cases/commands/get-mail-attachment.d.ts +3 -1
- package/dist/use-cases/commands/get-mail-message.d.ts +3 -1
- package/dist/use-cases/commands/get-mailbox-settings.d.ts +3 -1
- package/dist/use-cases/commands/get-my-profile-photo.d.ts +6 -2
- package/dist/use-cases/commands/get-onenote-page-content.d.ts +6 -2
- package/dist/use-cases/commands/get-planner-bucket.d.ts +3 -1
- package/dist/use-cases/commands/get-planner-plan.d.ts +3 -1
- package/dist/use-cases/commands/get-planner-task-details.d.ts +3 -1
- package/dist/use-cases/commands/get-planner-task.d.ts +3 -1
- package/dist/use-cases/commands/get-sharepoint-site-by-path.d.ts +4 -2
- package/dist/use-cases/commands/get-sharepoint-site-drive-by-id.d.ts +3 -1
- package/dist/use-cases/commands/get-sharepoint-site-list-item.d.ts +3 -1
- package/dist/use-cases/commands/get-sharepoint-site-list.d.ts +3 -1
- package/dist/use-cases/commands/get-sharepoint-site.d.ts +3 -1
- package/dist/use-cases/commands/get-specific-calendar-event.d.ts +3 -1
- package/dist/use-cases/commands/get-specific-calendar-view.d.ts +5 -1
- package/dist/use-cases/commands/get-team-channel.d.ts +3 -1
- package/dist/use-cases/commands/get-team.d.ts +3 -1
- package/dist/use-cases/commands/get-todo-task.d.ts +3 -1
- package/dist/use-cases/commands/list-all-onenote-sections.d.ts +3 -1
- package/dist/use-cases/commands/list-calendar-event-instances.d.ts +5 -1
- package/dist/use-cases/commands/list-calendar-events-delta.d.ts +3 -1
- package/dist/use-cases/commands/list-calendar-events.d.ts +3 -1
- package/dist/use-cases/commands/list-calendar-view-delta.d.ts +7 -2
- package/dist/use-cases/commands/list-calendars.d.ts +3 -1
- package/dist/use-cases/commands/list-chat-members.d.ts +3 -1
- package/dist/use-cases/commands/list-drive-item-permissions.d.ts +3 -1
- package/dist/use-cases/commands/list-drive-item-versions.d.ts +3 -1
- package/dist/use-cases/commands/list-drives.d.ts +3 -1
- package/dist/use-cases/commands/list-excel-table-rows.d.ts +3 -1
- package/dist/use-cases/commands/list-excel-tables.d.ts +3 -1
- package/dist/use-cases/commands/list-excel-worksheets.d.ts +3 -1
- package/dist/use-cases/commands/list-folder-files.d.ts +3 -1
- package/dist/use-cases/commands/{get-sharepoint-sites-delta.d.ts → list-incomplete-planner-tasks.d.ts} +3 -1
- package/dist/use-cases/commands/list-incomplete-todo-tasks.d.ts +8 -0
- package/dist/use-cases/commands/list-joined-teams.d.ts +3 -1
- package/dist/use-cases/commands/list-mail-attachments.d.ts +3 -1
- package/dist/use-cases/commands/list-mail-child-folders.d.ts +3 -1
- package/dist/use-cases/commands/list-mail-folder-messages.d.ts +3 -1
- package/dist/use-cases/commands/list-mail-folders.d.ts +3 -1
- package/dist/use-cases/commands/list-mail-messages.d.ts +3 -1
- package/dist/use-cases/commands/list-mail-rules.d.ts +3 -1
- package/dist/use-cases/commands/list-onenote-notebook-sections.d.ts +3 -1
- package/dist/use-cases/commands/list-onenote-notebooks.d.ts +3 -1
- package/dist/use-cases/commands/list-onenote-section-pages.d.ts +3 -1
- package/dist/use-cases/commands/list-plan-buckets.d.ts +3 -1
- package/dist/use-cases/commands/list-plan-tasks.d.ts +3 -1
- package/dist/use-cases/commands/{list-chats.d.ts → list-planner-plans.d.ts} +3 -1
- package/dist/use-cases/commands/list-planner-tasks.d.ts +3 -1
- package/dist/use-cases/commands/list-sharepoint-site-drives.d.ts +3 -1
- package/dist/use-cases/commands/list-sharepoint-site-list-items.d.ts +3 -1
- package/dist/use-cases/commands/list-sharepoint-site-lists.d.ts +3 -1
- package/dist/use-cases/commands/list-specific-calendar-events.d.ts +3 -1
- package/dist/use-cases/commands/list-team-channels.d.ts +3 -1
- package/dist/use-cases/commands/list-todo-linked-resources.d.ts +3 -1
- package/dist/use-cases/commands/list-todo-task-lists.d.ts +3 -1
- package/dist/use-cases/commands/list-todo-tasks.d.ts +3 -1
- package/dist/use-cases/commands/{get-channel-files-folder.d.ts → next-page.d.ts} +4 -3
- package/dist/use-cases/commands/{get-chat-message.d.ts → search-mail-messages.d.ts} +4 -3
- package/dist/use-cases/commands/{get-channel-message.d.ts → search-my-documents.d.ts} +4 -4
- package/dist/use-cases/commands/search-onedrive-files.d.ts +3 -1
- package/dist/use-cases/commands/search-onenote-pages.d.ts +8 -0
- package/dist/use-cases/commands/{get-chat-message-hosted-content.d.ts → search-sharepoint-sites-by-name.d.ts} +4 -4
- package/dist/use-cases/commands/search-sharepoint-sites.d.ts +3 -1
- package/dist/use-cases/commands/update.d.ts +16 -0
- package/dist/use-cases/ports/process-runner.d.ts +11 -0
- package/docs/commands.json +1436 -0
- package/package.json +6 -3
- package/dist/use-cases/commands/get-channel-message-hosted-content.d.ts +0 -9
- package/dist/use-cases/commands/get-chat.d.ts +0 -6
- package/dist/use-cases/commands/get-outlook-contact.d.ts +0 -6
- package/dist/use-cases/commands/get-sharepoint-site-item.d.ts +0 -7
- package/dist/use-cases/commands/list-channel-message-hosted-contents.d.ts +0 -8
- package/dist/use-cases/commands/list-channel-message-replies.d.ts +0 -8
- package/dist/use-cases/commands/list-channel-messages.d.ts +0 -7
- package/dist/use-cases/commands/list-channel-tabs.d.ts +0 -7
- package/dist/use-cases/commands/list-chat-message-hosted-contents.d.ts +0 -7
- package/dist/use-cases/commands/list-chat-message-replies.d.ts +0 -7
- package/dist/use-cases/commands/list-chat-messages.d.ts +0 -6
- package/dist/use-cases/commands/list-outlook-contacts.d.ts +0 -4
- package/dist/use-cases/commands/list-pinned-chat-messages.d.ts +0 -6
- package/dist/use-cases/commands/list-sharepoint-site-items.d.ts +0 -6
- package/dist/use-cases/commands/list-team-members.d.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -9976,6 +9976,7 @@ var formatError = (err2) => {
|
|
|
9976
9976
|
};
|
|
9977
9977
|
|
|
9978
9978
|
// src/infra/filesystem-bun.ts
|
|
9979
|
+
var isMissingError = (e) => e instanceof Error && e.code === "ENOENT";
|
|
9979
9980
|
var createBunFileSystem = () => ({
|
|
9980
9981
|
readJson: async (path) => {
|
|
9981
9982
|
const file = Bun.file(path);
|
|
@@ -9996,13 +9997,12 @@ var createBunFileSystem = () => ({
|
|
|
9996
9997
|
}
|
|
9997
9998
|
},
|
|
9998
9999
|
deleteIfExists: async (path) => {
|
|
9999
|
-
const file = Bun.file(path);
|
|
10000
|
-
if (!await file.exists())
|
|
10001
|
-
return ok(undefined);
|
|
10002
10000
|
try {
|
|
10003
|
-
await file.delete();
|
|
10001
|
+
await Bun.file(path).delete();
|
|
10004
10002
|
return ok(undefined);
|
|
10005
10003
|
} catch (e) {
|
|
10004
|
+
if (isMissingError(e))
|
|
10005
|
+
return ok(undefined);
|
|
10006
10006
|
return err({ type: "io_failed", message: formatError(e) });
|
|
10007
10007
|
}
|
|
10008
10008
|
}
|
|
@@ -10049,8 +10049,12 @@ var createNodeFileSystem = () => ({
|
|
|
10049
10049
|
}
|
|
10050
10050
|
});
|
|
10051
10051
|
|
|
10052
|
+
// src/infra/playwright-loader.ts
|
|
10053
|
+
var loadPlaywright = async () => import("playwright");
|
|
10054
|
+
|
|
10052
10055
|
// src/infra/browser-auth.ts
|
|
10053
10056
|
var TOKEN_HOSTS = ["login.microsoftonline.com", "login.live.com", "login.microsoft.com"];
|
|
10057
|
+
var PROXY_ENV_KEYS = ["HTTP_PROXY", "HTTPS_PROXY", "http_proxy", "https_proxy"];
|
|
10054
10058
|
var sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
10055
10059
|
var defaultProfileDir = () => {
|
|
10056
10060
|
const envOverride = process.env.ASKMARCEL_BROWSER_PROFILE;
|
|
@@ -10064,9 +10068,20 @@ var cleanupSingletonLocks = async (dir, fs) => {
|
|
|
10064
10068
|
await fs.deleteIfExists(join(dir, name));
|
|
10065
10069
|
}
|
|
10066
10070
|
};
|
|
10071
|
+
var stripProxyEnv = () => {
|
|
10072
|
+
for (const k of PROXY_ENV_KEYS)
|
|
10073
|
+
delete process.env[k];
|
|
10074
|
+
};
|
|
10075
|
+
var createPlaywrightApi = (loader) => ({
|
|
10076
|
+
launchPersistentContext: async (profileDir, options) => {
|
|
10077
|
+
stripProxyEnv();
|
|
10078
|
+
const { chromium } = await loader();
|
|
10079
|
+
return chromium.launchPersistentContext(profileDir, options);
|
|
10080
|
+
}
|
|
10081
|
+
});
|
|
10067
10082
|
var createBrowserAuthFromApi = (api, config) => {
|
|
10068
10083
|
const { logger, fs } = config;
|
|
10069
|
-
const trace = config.trace ?? ((
|
|
10084
|
+
const trace = config.trace ?? (() => {});
|
|
10070
10085
|
const profileDir = config.profileDir ?? defaultProfileDir();
|
|
10071
10086
|
const initialSettleMs = config.initialSettleMs ?? 5000;
|
|
10072
10087
|
const postReloginSettleMs = config.postReloginSettleMs ?? 3000;
|
|
@@ -10074,6 +10089,21 @@ var createBrowserAuthFromApi = (api, config) => {
|
|
|
10074
10089
|
const pollDeadlineMs = config.pollDeadlineMs ?? 5 * 60 * 1000;
|
|
10075
10090
|
const navigationTimeoutMs = config.navigationTimeoutMs ?? 30000;
|
|
10076
10091
|
let context = null;
|
|
10092
|
+
let page = null;
|
|
10093
|
+
const cleanup = async () => {
|
|
10094
|
+
if (page) {
|
|
10095
|
+
try {
|
|
10096
|
+
await page.close();
|
|
10097
|
+
} catch {}
|
|
10098
|
+
page = null;
|
|
10099
|
+
}
|
|
10100
|
+
if (context) {
|
|
10101
|
+
try {
|
|
10102
|
+
await context.close();
|
|
10103
|
+
} catch {}
|
|
10104
|
+
context = null;
|
|
10105
|
+
}
|
|
10106
|
+
};
|
|
10077
10107
|
const launchContext = async () => {
|
|
10078
10108
|
for (const channel of ["msedge", "chrome"]) {
|
|
10079
10109
|
try {
|
|
@@ -10106,7 +10136,8 @@ var createBrowserAuthFromApi = (api, config) => {
|
|
|
10106
10136
|
let capturedAccess = null;
|
|
10107
10137
|
let capturedRefresh = null;
|
|
10108
10138
|
context = await launchContext();
|
|
10109
|
-
|
|
10139
|
+
page = await context.newPage();
|
|
10140
|
+
const activePage = page;
|
|
10110
10141
|
const handleResponse = async (response) => {
|
|
10111
10142
|
if (capturedAccess)
|
|
10112
10143
|
return;
|
|
@@ -10135,14 +10166,14 @@ var createBrowserAuthFromApi = (api, config) => {
|
|
|
10135
10166
|
`);
|
|
10136
10167
|
} catch {}
|
|
10137
10168
|
};
|
|
10138
|
-
|
|
10169
|
+
activePage.on("response", (r) => {
|
|
10139
10170
|
handleResponse(r);
|
|
10140
10171
|
});
|
|
10141
10172
|
logger.info("browser_navigating", { url: startUrl });
|
|
10142
10173
|
trace(`[DEBUG] navigating to: ${startUrl}
|
|
10143
10174
|
`);
|
|
10144
10175
|
try {
|
|
10145
|
-
await
|
|
10176
|
+
await activePage.goto(startUrl, { waitUntil: "domcontentloaded", timeout: navigationTimeoutMs });
|
|
10146
10177
|
logger.info("browser_navigated", { url: startUrl });
|
|
10147
10178
|
} catch (navError) {
|
|
10148
10179
|
const navMsg = navError instanceof Error ? navError.message : String(navError);
|
|
@@ -10150,56 +10181,45 @@ var createBrowserAuthFromApi = (api, config) => {
|
|
|
10150
10181
|
`);
|
|
10151
10182
|
logger.info("browser_navigation_error", { message: navMsg });
|
|
10152
10183
|
}
|
|
10153
|
-
const
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
try {
|
|
10158
|
-
if (context)
|
|
10159
|
-
await context.close();
|
|
10160
|
-
} catch {}
|
|
10161
|
-
context = null;
|
|
10162
|
-
};
|
|
10163
|
-
await sleep(initialSettleMs);
|
|
10164
|
-
if (capturedAccess) {
|
|
10165
|
-
trace(`[DEBUG] token captured during initial settle
|
|
10184
|
+
const tryReturnCaptured = async (label) => {
|
|
10185
|
+
if (!capturedAccess)
|
|
10186
|
+
return null;
|
|
10187
|
+
trace(`[DEBUG] ${label}
|
|
10166
10188
|
`);
|
|
10167
10189
|
await cleanup();
|
|
10168
10190
|
return { accessToken: capturedAccess, refreshToken: capturedRefresh };
|
|
10169
|
-
}
|
|
10170
|
-
|
|
10191
|
+
};
|
|
10192
|
+
await sleep(initialSettleMs);
|
|
10193
|
+
const settleResult = await tryReturnCaptured("token captured during initial settle");
|
|
10194
|
+
if (settleResult)
|
|
10195
|
+
return settleResult;
|
|
10196
|
+
const currentUrl = activePage.url();
|
|
10171
10197
|
if (!currentUrl.includes("login.microsoftonline.com") && !currentUrl.includes("login.live.com")) {
|
|
10172
10198
|
trace(`[DEBUG] already signed in — clearing session to force fresh login
|
|
10173
10199
|
`);
|
|
10174
10200
|
logger.info("browser_force_relogin", { url: currentUrl });
|
|
10175
10201
|
await context.clearCookies();
|
|
10176
10202
|
try {
|
|
10177
|
-
await
|
|
10203
|
+
await activePage.evaluate(() => {
|
|
10178
10204
|
localStorage.clear();
|
|
10179
10205
|
sessionStorage.clear();
|
|
10180
10206
|
});
|
|
10181
10207
|
} catch {}
|
|
10182
10208
|
try {
|
|
10183
|
-
await
|
|
10209
|
+
await activePage.goto(startUrl, { waitUntil: "domcontentloaded", timeout: navigationTimeoutMs });
|
|
10184
10210
|
} catch {}
|
|
10185
10211
|
await sleep(postReloginSettleMs);
|
|
10186
|
-
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
await cleanup();
|
|
10190
|
-
return { accessToken: capturedAccess, refreshToken: capturedRefresh };
|
|
10191
|
-
}
|
|
10212
|
+
const reloginResult = await tryReturnCaptured("token captured after force relogin");
|
|
10213
|
+
if (reloginResult)
|
|
10214
|
+
return reloginResult;
|
|
10192
10215
|
}
|
|
10193
10216
|
trace(`[DEBUG] complete sign-in in the browser window — waiting up to 5 min
|
|
10194
10217
|
`);
|
|
10195
10218
|
const deadline = Date.now() + pollDeadlineMs;
|
|
10196
10219
|
while (Date.now() < deadline) {
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
await cleanup();
|
|
10201
|
-
return { accessToken: capturedAccess, refreshToken: capturedRefresh };
|
|
10202
|
-
}
|
|
10220
|
+
const polledResult = await tryReturnCaptured("token found in polling loop, closing browser");
|
|
10221
|
+
if (polledResult)
|
|
10222
|
+
return polledResult;
|
|
10203
10223
|
await sleep(pollIntervalMs);
|
|
10204
10224
|
}
|
|
10205
10225
|
trace(`[DEBUG] polling loop timeout expired, no token captured
|
|
@@ -10209,29 +10229,12 @@ var createBrowserAuthFromApi = (api, config) => {
|
|
|
10209
10229
|
};
|
|
10210
10230
|
const close = async () => {
|
|
10211
10231
|
logger.info("browser_auth_close");
|
|
10212
|
-
|
|
10213
|
-
try {
|
|
10214
|
-
await context.close();
|
|
10215
|
-
} catch {}
|
|
10216
|
-
context = null;
|
|
10217
|
-
}
|
|
10232
|
+
await cleanup();
|
|
10218
10233
|
};
|
|
10219
10234
|
return { acquireToken, close };
|
|
10220
10235
|
};
|
|
10221
10236
|
var defaultFileSystem = () => typeof globalThis.Bun !== "undefined" ? createBunFileSystem() : createNodeFileSystem();
|
|
10222
|
-
var createBrowserAuth = (deps) => {
|
|
10223
|
-
const api = {
|
|
10224
|
-
launchPersistentContext: async (profileDir, options) => {
|
|
10225
|
-
for (const k of ["HTTP_PROXY", "HTTPS_PROXY", "http_proxy", "https_proxy"]) {
|
|
10226
|
-
delete process.env[k];
|
|
10227
|
-
}
|
|
10228
|
-
const { chromium } = await import("playwright");
|
|
10229
|
-
const ctx = await chromium.launchPersistentContext(profileDir, options);
|
|
10230
|
-
return ctx;
|
|
10231
|
-
}
|
|
10232
|
-
};
|
|
10233
|
-
return createBrowserAuthFromApi(api, { logger: deps.logger, fs: deps.fs ?? defaultFileSystem() });
|
|
10234
|
-
};
|
|
10237
|
+
var createBrowserAuth = (deps) => createBrowserAuthFromApi(createPlaywrightApi(loadPlaywright), { logger: deps.logger, fs: deps.fs ?? defaultFileSystem() });
|
|
10235
10238
|
|
|
10236
10239
|
// src/infra/auth.ts
|
|
10237
10240
|
var CLIENT_ID = "5e3ce6c0-2b1f-4285-8d4b-75ee78787346";
|
|
@@ -10317,38 +10320,96 @@ var createAuthManagerFromApi = (browserAuth, cachePath, logger, fs) => {
|
|
|
10317
10320
|
var defaultFileSystem2 = () => typeof globalThis.Bun !== "undefined" ? createBunFileSystem() : createNodeFileSystem();
|
|
10318
10321
|
var createAuthManager = (deps) => createAuthManagerFromApi(createBrowserAuth({ logger: deps.logger, fs: deps.fs ?? defaultFileSystem2() }), deps.cachePath, deps.logger, deps.fs ?? defaultFileSystem2());
|
|
10319
10322
|
// src/infra/graph-client.ts
|
|
10323
|
+
var isJson = (contentType) => contentType !== null && contentType.toLowerCase().includes("application/json");
|
|
10324
|
+
var isText = (contentType) => {
|
|
10325
|
+
if (contentType === null)
|
|
10326
|
+
return false;
|
|
10327
|
+
const lower = contentType.toLowerCase();
|
|
10328
|
+
return lower.startsWith("text/") || lower.includes("+xml") || lower.includes("application/xml") || lower.includes("application/javascript");
|
|
10329
|
+
};
|
|
10330
|
+
var toBase64 = (bytes) => {
|
|
10331
|
+
let binary = "";
|
|
10332
|
+
for (const byte of bytes)
|
|
10333
|
+
binary += String.fromCharCode(byte);
|
|
10334
|
+
return btoa(binary);
|
|
10335
|
+
};
|
|
10336
|
+
var networkErrorMessage = (e) => {
|
|
10337
|
+
if (e instanceof Error)
|
|
10338
|
+
return e.message;
|
|
10339
|
+
if (typeof e === "string")
|
|
10340
|
+
return e;
|
|
10341
|
+
return "network request failed";
|
|
10342
|
+
};
|
|
10320
10343
|
var createGraphClient = (auth, fetchFn = globalThis.fetch) => {
|
|
10321
|
-
const
|
|
10344
|
+
const authHeaders = async () => {
|
|
10322
10345
|
const tokenResult = await auth.getAccessToken();
|
|
10323
10346
|
if (!tokenResult.ok) {
|
|
10324
10347
|
const msg = tokenResult.error.type === "auth_cancelled" ? "Auth cancelled" : tokenResult.error.message;
|
|
10325
10348
|
return err({ type: "auth_failed", message: msg });
|
|
10326
10349
|
}
|
|
10350
|
+
return ok({ Authorization: `Bearer ${tokenResult.value}` });
|
|
10351
|
+
};
|
|
10352
|
+
const request = async (method, path, body) => {
|
|
10353
|
+
const headers = await authHeaders();
|
|
10354
|
+
if (!headers.ok)
|
|
10355
|
+
return headers;
|
|
10327
10356
|
try {
|
|
10328
10357
|
const res = await fetchFn(`https://graph.microsoft.com/v1.0${path}`, {
|
|
10329
|
-
|
|
10358
|
+
method,
|
|
10359
|
+
headers: { ...headers.value, "content-type": "application/json" },
|
|
10360
|
+
...body === undefined ? {} : { body: JSON.stringify(body) }
|
|
10330
10361
|
});
|
|
10331
10362
|
if (!res.ok) {
|
|
10332
|
-
const
|
|
10333
|
-
return err({ type: "api_error", status: res.status, message:
|
|
10363
|
+
const errBody = await res.json().catch(() => ({}));
|
|
10364
|
+
return err({ type: "api_error", status: res.status, message: errBody.error?.message ?? res.statusText });
|
|
10334
10365
|
}
|
|
10335
10366
|
return ok(await res.json());
|
|
10336
10367
|
} catch (e) {
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10368
|
+
return err({ type: "network_error", message: networkErrorMessage(e) });
|
|
10369
|
+
}
|
|
10370
|
+
};
|
|
10371
|
+
const getBinary = async (path) => {
|
|
10372
|
+
const headers = await authHeaders();
|
|
10373
|
+
if (!headers.ok)
|
|
10374
|
+
return headers;
|
|
10375
|
+
try {
|
|
10376
|
+
const res = await fetchFn(`https://graph.microsoft.com/v1.0${path}`, {
|
|
10377
|
+
method: "GET",
|
|
10378
|
+
headers: headers.value,
|
|
10379
|
+
redirect: "manual"
|
|
10380
|
+
});
|
|
10381
|
+
if (res.status >= 300 && res.status < 400) {
|
|
10382
|
+
const location = res.headers.get("location");
|
|
10383
|
+
if (location !== null)
|
|
10384
|
+
return ok({ "@microsoft.graph.downloadUrl": location });
|
|
10385
|
+
}
|
|
10386
|
+
if (!res.ok) {
|
|
10387
|
+
const errBody = await res.json().catch(() => ({}));
|
|
10388
|
+
return err({ type: "api_error", status: res.status, message: errBody.error?.message ?? res.statusText });
|
|
10389
|
+
}
|
|
10390
|
+
const contentType = res.headers.get("content-type");
|
|
10391
|
+
if (isJson(contentType))
|
|
10392
|
+
return ok(await res.json());
|
|
10393
|
+
if (isText(contentType)) {
|
|
10394
|
+
const text = await res.text();
|
|
10395
|
+
return ok({ contentType: contentType ?? "text/plain", size: text.length, text });
|
|
10396
|
+
}
|
|
10397
|
+
const buffer = await res.arrayBuffer();
|
|
10398
|
+
return ok({ contentType: contentType ?? "application/octet-stream", size: buffer.byteLength, base64: toBase64(new Uint8Array(buffer)) });
|
|
10399
|
+
} catch (e) {
|
|
10400
|
+
return err({ type: "network_error", message: networkErrorMessage(e) });
|
|
10345
10401
|
}
|
|
10346
10402
|
};
|
|
10347
|
-
return {
|
|
10403
|
+
return {
|
|
10404
|
+
get: (path) => request("GET", path),
|
|
10405
|
+
post: (path, body) => request("POST", path, body),
|
|
10406
|
+
getBinary
|
|
10407
|
+
};
|
|
10348
10408
|
};
|
|
10349
10409
|
// src/infra/logger.ts
|
|
10350
10410
|
var import_winston = __toESM(require_winston(), 1);
|
|
10351
10411
|
var REDACTED_KEYS = new Set(["password", "token", "authorization", "apikey", "secret"]);
|
|
10412
|
+
var ALL_LEVELS = ["error", "warn", "info", "http", "verbose", "debug", "silly"];
|
|
10352
10413
|
var redactFormat = import_winston.format((info) => {
|
|
10353
10414
|
for (const key of Object.keys(info)) {
|
|
10354
10415
|
if (REDACTED_KEYS.has(key.toLowerCase()))
|
|
@@ -10358,9 +10419,9 @@ var redactFormat = import_winston.format((info) => {
|
|
|
10358
10419
|
});
|
|
10359
10420
|
var createWinstonLogger = (config = {}) => {
|
|
10360
10421
|
const winston = import_winston.createLogger({
|
|
10361
|
-
level: config.logLevel ?? process.env.
|
|
10422
|
+
level: config.logLevel ?? process.env.ASKMARCEL_LOG_LEVEL ?? "error",
|
|
10362
10423
|
format: import_winston.format.combine(redactFormat(), import_winston.format.json()),
|
|
10363
|
-
transports: [new import_winston.transports.Console]
|
|
10424
|
+
transports: [new import_winston.transports.Console({ stderrLevels: ALL_LEVELS })]
|
|
10364
10425
|
});
|
|
10365
10426
|
return {
|
|
10366
10427
|
info: (event, meta) => winston.info(event, meta),
|
|
@@ -10368,10 +10429,36 @@ var createWinstonLogger = (config = {}) => {
|
|
|
10368
10429
|
error: (event, meta) => winston.error(event, meta)
|
|
10369
10430
|
};
|
|
10370
10431
|
};
|
|
10371
|
-
// src/
|
|
10372
|
-
var
|
|
10373
|
-
|
|
10432
|
+
// src/infra/process-runner-bun.ts
|
|
10433
|
+
var createBunProcessRunner = () => ({
|
|
10434
|
+
runInherit: async (command, args) => {
|
|
10435
|
+
try {
|
|
10436
|
+
const proc = Bun.spawn([command, ...args], { stdio: ["inherit", "inherit", "inherit"] });
|
|
10437
|
+
const exitCode = await proc.exited;
|
|
10438
|
+
return ok({ exitCode });
|
|
10439
|
+
} catch (e) {
|
|
10440
|
+
return err({ type: "spawn_failed", message: formatError(e) });
|
|
10441
|
+
}
|
|
10442
|
+
}
|
|
10443
|
+
});
|
|
10444
|
+
// src/infra/process-runner-node.ts
|
|
10445
|
+
import { spawn } from "node:child_process";
|
|
10446
|
+
var createNodeProcessRunner = () => ({
|
|
10447
|
+
runInherit: async (command, args) => new Promise((resolve) => {
|
|
10448
|
+
try {
|
|
10449
|
+
const child = spawn(command, [...args], { stdio: "inherit" });
|
|
10450
|
+
child.on("exit", (exitCode) => resolve(ok({ exitCode: exitCode ?? 0 })));
|
|
10451
|
+
child.on("error", (e) => resolve(err({ type: "spawn_failed", message: formatError(e) })));
|
|
10452
|
+
} catch (e) {
|
|
10453
|
+
resolve(err({ type: "spawn_failed", message: formatError(e) }));
|
|
10454
|
+
}
|
|
10455
|
+
})
|
|
10456
|
+
});
|
|
10457
|
+
// src/use-cases/commands/download-drive-item-version-content.ts
|
|
10458
|
+
var exports_download_drive_item_version_content = {};
|
|
10459
|
+
__export(exports_download_drive_item_version_content, {
|
|
10374
10460
|
schema: () => schema,
|
|
10461
|
+
meta: () => meta3,
|
|
10375
10462
|
execute: () => execute
|
|
10376
10463
|
});
|
|
10377
10464
|
|
|
@@ -23907,798 +23994,1829 @@ function date4(params) {
|
|
|
23907
23994
|
|
|
23908
23995
|
// node_modules/zod/v4/classic/external.js
|
|
23909
23996
|
config(en_default());
|
|
23910
|
-
// src/use-cases/commands/download-
|
|
23911
|
-
var schema = exports_external.object({
|
|
23997
|
+
// src/use-cases/commands/download-drive-item-version-content.ts
|
|
23998
|
+
var schema = exports_external.object({
|
|
23999
|
+
driveId: exports_external.string().min(1),
|
|
24000
|
+
itemId: exports_external.string().min(1),
|
|
24001
|
+
versionId: exports_external.string().min(1)
|
|
24002
|
+
});
|
|
23912
24003
|
var execute = async (graph, params) => {
|
|
23913
24004
|
const parsed = schema.safeParse(params);
|
|
23914
24005
|
if (!parsed.success)
|
|
23915
24006
|
throw new Error(`validation failed: ${parsed.error.message}`);
|
|
23916
|
-
return graph.
|
|
24007
|
+
return graph.getBinary(`/drives/${parsed.data.driveId}/items/${parsed.data.itemId}/versions/${parsed.data.versionId}/content`);
|
|
24008
|
+
};
|
|
24009
|
+
var meta3 = {
|
|
24010
|
+
summary: 'Download the binary content of a specific *non-current* historical version of a OneDrive / SharePoint file. Graph refuses to serve the current version through this endpoint with "You cannot get the content of the current version" — for the current version use `download-onedrive-file-content` instead. Same envelope as that command (302 → downloadUrl, or base64 bytes).',
|
|
24011
|
+
category: "drive",
|
|
24012
|
+
graphMethod: "GET",
|
|
24013
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/versions/{version-id}/content",
|
|
24014
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitemversion-get-content",
|
|
24015
|
+
options: [
|
|
24016
|
+
{
|
|
24017
|
+
name: "drive-id",
|
|
24018
|
+
key: "driveId",
|
|
24019
|
+
required: true,
|
|
24020
|
+
description: "Microsoft Graph drive ID. Use `ask-marcel list-drives` for the personal OneDrive, " + "or `ask-marcel list-sharepoint-site-drives --site-id <id>` for a SharePoint document library."
|
|
24021
|
+
},
|
|
24022
|
+
{ name: "item-id", key: "itemId", required: true, description: "driveItem ID of the file. Returned by `list-folder-files` or `search-onedrive-files`." },
|
|
24023
|
+
{
|
|
24024
|
+
name: "version-id",
|
|
24025
|
+
key: "versionId",
|
|
24026
|
+
required: true,
|
|
24027
|
+
description: "driveItemVersion ID. Returned by `ask-marcel list-drive-item-versions`. Use the `id` field of an entry under `value[]`. " + "Pick a non-current version — the first entry (e.g. `12.0`) is the live file and Graph rejects this endpoint for it; use `value[1]` or older."
|
|
24028
|
+
}
|
|
24029
|
+
],
|
|
24030
|
+
example: "ask-marcel download-drive-item-version-content --drive-id 'b!1234' --item-id '01ABC' --version-id '4.0'",
|
|
24031
|
+
responseShape: '`{ "@microsoft.graph.downloadUrl": "..." }` for the typical 302 case, or `{ contentType, size, base64 }` when Graph streams bytes directly'
|
|
24032
|
+
};
|
|
24033
|
+
|
|
24034
|
+
// src/use-cases/commands/download-onedrive-file-content.ts
|
|
24035
|
+
var exports_download_onedrive_file_content = {};
|
|
24036
|
+
__export(exports_download_onedrive_file_content, {
|
|
24037
|
+
schema: () => schema2,
|
|
24038
|
+
meta: () => meta4,
|
|
24039
|
+
execute: () => execute2
|
|
24040
|
+
});
|
|
24041
|
+
var schema2 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
24042
|
+
var execute2 = async (graph, params) => {
|
|
24043
|
+
const parsed = schema2.safeParse(params);
|
|
24044
|
+
if (!parsed.success)
|
|
24045
|
+
throw new Error(`validation failed: ${parsed.error.message}`);
|
|
24046
|
+
return graph.getBinary(`/drives/${parsed.data.driveId}/items/${parsed.data.itemId}/content`);
|
|
24047
|
+
};
|
|
24048
|
+
var meta4 = {
|
|
24049
|
+
summary: "Download the binary content of a file stored in OneDrive / SharePoint. Graph normally returns a 302 redirect to a pre-signed CDN URL, surfaced as `@microsoft.graph.downloadUrl`; if it returns bytes directly they are base64-encoded for safe JSON output.",
|
|
24050
|
+
category: "drive",
|
|
24051
|
+
graphMethod: "GET",
|
|
24052
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/content",
|
|
24053
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitem-get-content",
|
|
24054
|
+
options: [
|
|
24055
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID. Returned by `ask-marcel list-drives`." },
|
|
24056
|
+
{ name: "item-id", key: "itemId", required: true, description: "driveItem ID of the file to download. Returned by `ask-marcel list-folder-files` or `search-onedrive-files`." }
|
|
24057
|
+
],
|
|
24058
|
+
example: "ask-marcel download-onedrive-file-content --drive-id 'b!1234' --item-id '01ABC'",
|
|
24059
|
+
responseShape: '`{ "@microsoft.graph.downloadUrl": "..." }` for the typical 302 case, or `{ contentType, size, base64 }` when Graph streams bytes directly'
|
|
23917
24060
|
};
|
|
23918
24061
|
|
|
23919
24062
|
// src/use-cases/commands/get-calendar-event.ts
|
|
23920
24063
|
var exports_get_calendar_event = {};
|
|
23921
24064
|
__export(exports_get_calendar_event, {
|
|
23922
|
-
schema: () =>
|
|
23923
|
-
|
|
24065
|
+
schema: () => schema3,
|
|
24066
|
+
meta: () => meta5,
|
|
24067
|
+
execute: () => execute3
|
|
23924
24068
|
});
|
|
23925
24069
|
|
|
23926
24070
|
// src/use-cases/commands/build-command.ts
|
|
23927
|
-
var buildCommand = (pathFn,
|
|
23928
|
-
const
|
|
23929
|
-
const parsed =
|
|
24071
|
+
var buildCommand = (pathFn, schema3) => {
|
|
24072
|
+
const execute3 = async (graph, params) => {
|
|
24073
|
+
const parsed = schema3.safeParse(params);
|
|
23930
24074
|
if (!parsed.success)
|
|
23931
24075
|
throw new Error(`validation failed: ${parsed.error.message}`);
|
|
23932
24076
|
const path = pathFn(parsed.data);
|
|
23933
24077
|
return graph.get(path);
|
|
23934
24078
|
};
|
|
23935
|
-
return { schema:
|
|
24079
|
+
return { schema: schema3, execute: execute3 };
|
|
23936
24080
|
};
|
|
23937
24081
|
|
|
23938
24082
|
// src/use-cases/commands/get-calendar-event.ts
|
|
23939
|
-
var
|
|
23940
|
-
var { execute:
|
|
24083
|
+
var schema3 = exports_external.object({ eventId: exports_external.string().min(1) });
|
|
24084
|
+
var { execute: execute3 } = buildCommand((p) => `/me/events/${p.eventId}`, schema3);
|
|
24085
|
+
var meta5 = {
|
|
24086
|
+
summary: "Fetch a single calendar event by ID from the signed-in user’s default calendar.",
|
|
24087
|
+
category: "calendar",
|
|
24088
|
+
graphMethod: "GET",
|
|
24089
|
+
graphPathTemplate: "/me/events/{event-id}",
|
|
24090
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/event-get",
|
|
24091
|
+
options: [
|
|
24092
|
+
{
|
|
24093
|
+
name: "event-id",
|
|
24094
|
+
key: "eventId",
|
|
24095
|
+
required: true,
|
|
24096
|
+
description: "Microsoft Graph event ID. Returned by `ask-marcel list-calendar-events` in the `id` field of each event."
|
|
24097
|
+
}
|
|
24098
|
+
],
|
|
24099
|
+
example: "ask-marcel get-calendar-event --event-id 'AAMkAGI2THVS...'",
|
|
24100
|
+
responseShape: "single Microsoft Graph `event` resource"
|
|
24101
|
+
};
|
|
23941
24102
|
|
|
23942
24103
|
// src/use-cases/commands/get-calendar-view.ts
|
|
23943
24104
|
var exports_get_calendar_view = {};
|
|
23944
24105
|
__export(exports_get_calendar_view, {
|
|
23945
|
-
schema: () => schema3,
|
|
23946
|
-
execute: () => execute3
|
|
23947
|
-
});
|
|
23948
|
-
var schema3 = exports_external.object({}).strict();
|
|
23949
|
-
var { execute: execute3 } = buildCommand(() => "/me/calendarView", schema3);
|
|
23950
|
-
|
|
23951
|
-
// src/use-cases/commands/get-channel-files-folder.ts
|
|
23952
|
-
var exports_get_channel_files_folder = {};
|
|
23953
|
-
__export(exports_get_channel_files_folder, {
|
|
23954
24106
|
schema: () => schema4,
|
|
24107
|
+
meta: () => meta6,
|
|
23955
24108
|
execute: () => execute4
|
|
23956
24109
|
});
|
|
23957
|
-
var schema4 = exports_external.object({
|
|
23958
|
-
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
var
|
|
23962
|
-
|
|
23963
|
-
|
|
23964
|
-
|
|
23965
|
-
|
|
23966
|
-
|
|
23967
|
-
|
|
23968
|
-
|
|
23969
|
-
|
|
23970
|
-
|
|
23971
|
-
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
}
|
|
23975
|
-
|
|
23976
|
-
|
|
23977
|
-
|
|
23978
|
-
|
|
23979
|
-
|
|
23980
|
-
|
|
23981
|
-
|
|
23982
|
-
|
|
23983
|
-
|
|
23984
|
-
|
|
23985
|
-
var { execute: execute7 } = buildCommand((p) => `/chats/${p.chatId}/messages/${p.chatMessageId}/hostedContents/${p.chatMessageHostedContentId}/$value`, schema7);
|
|
23986
|
-
|
|
23987
|
-
// src/use-cases/commands/get-chat-message.ts
|
|
23988
|
-
var exports_get_chat_message = {};
|
|
23989
|
-
__export(exports_get_chat_message, {
|
|
23990
|
-
schema: () => schema8,
|
|
23991
|
-
execute: () => execute8
|
|
23992
|
-
});
|
|
23993
|
-
var schema8 = exports_external.object({ chatId: exports_external.string().min(1), chatMessageId: exports_external.string().min(1) });
|
|
23994
|
-
var { execute: execute8 } = buildCommand((p) => `/chats/${p.chatId}/messages/${p.chatMessageId}`, schema8);
|
|
23995
|
-
|
|
23996
|
-
// src/use-cases/commands/get-chat.ts
|
|
23997
|
-
var exports_get_chat = {};
|
|
23998
|
-
__export(exports_get_chat, {
|
|
23999
|
-
schema: () => schema9,
|
|
24000
|
-
execute: () => execute9
|
|
24001
|
-
});
|
|
24002
|
-
var schema9 = exports_external.object({ chatId: exports_external.string().min(1) });
|
|
24003
|
-
var { execute: execute9 } = buildCommand((p) => `/chats/${p.chatId}`, schema9);
|
|
24110
|
+
var schema4 = exports_external.object({
|
|
24111
|
+
startDateTime: exports_external.string().min(1),
|
|
24112
|
+
endDateTime: exports_external.string().min(1)
|
|
24113
|
+
});
|
|
24114
|
+
var { execute: execute4 } = buildCommand((p) => `/me/calendarView?startDateTime=${p.startDateTime}&endDateTime=${p.endDateTime}`, schema4);
|
|
24115
|
+
var meta6 = {
|
|
24116
|
+
summary: "List the signed-in user’s default-calendar events with recurrence expanded into individual occurrences in a date range. Both ISO date-time params are required by Graph.",
|
|
24117
|
+
category: "calendar",
|
|
24118
|
+
graphMethod: "GET",
|
|
24119
|
+
graphPathTemplate: "/me/calendarView?startDateTime={start-date-time}&endDateTime={end-date-time}",
|
|
24120
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/user-list-calendarview",
|
|
24121
|
+
options: [
|
|
24122
|
+
{
|
|
24123
|
+
name: "start-date-time",
|
|
24124
|
+
key: "startDateTime",
|
|
24125
|
+
required: true,
|
|
24126
|
+
description: "ISO 8601 lower bound (UTC). Example: `2026-04-01T00:00:00Z`. Required by Graph; the request fails without it."
|
|
24127
|
+
},
|
|
24128
|
+
{
|
|
24129
|
+
name: "end-date-time",
|
|
24130
|
+
key: "endDateTime",
|
|
24131
|
+
required: true,
|
|
24132
|
+
description: "ISO 8601 upper bound (UTC). Example: `2026-05-01T00:00:00Z`. Required by Graph; the request fails without it."
|
|
24133
|
+
}
|
|
24134
|
+
],
|
|
24135
|
+
example: "ask-marcel get-calendar-view --start-date-time '2026-04-01T00:00:00Z' --end-date-time '2026-05-01T00:00:00Z'",
|
|
24136
|
+
responseShape: "collection of Microsoft Graph `event` resources (single occurrences) under `value[]`"
|
|
24137
|
+
};
|
|
24004
24138
|
|
|
24005
24139
|
// src/use-cases/commands/get-current-user.ts
|
|
24006
24140
|
var exports_get_current_user = {};
|
|
24007
24141
|
__export(exports_get_current_user, {
|
|
24008
|
-
schema: () =>
|
|
24009
|
-
|
|
24142
|
+
schema: () => schema5,
|
|
24143
|
+
meta: () => meta7,
|
|
24144
|
+
execute: () => execute5
|
|
24010
24145
|
});
|
|
24011
|
-
var
|
|
24012
|
-
var { execute:
|
|
24146
|
+
var schema5 = exports_external.object({}).strict();
|
|
24147
|
+
var { execute: execute5 } = buildCommand(() => "/me", schema5);
|
|
24148
|
+
var meta7 = {
|
|
24149
|
+
summary: "Return the signed-in user’s Microsoft Graph profile (id, displayName, mail, jobTitle, etc.).",
|
|
24150
|
+
category: "user",
|
|
24151
|
+
graphMethod: "GET",
|
|
24152
|
+
graphPathTemplate: "/me",
|
|
24153
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/user-get",
|
|
24154
|
+
options: [],
|
|
24155
|
+
example: "ask-marcel get-current-user",
|
|
24156
|
+
responseShape: "single Microsoft Graph `user` resource"
|
|
24157
|
+
};
|
|
24013
24158
|
|
|
24014
24159
|
// src/use-cases/commands/get-drive-delta.ts
|
|
24015
24160
|
var exports_get_drive_delta = {};
|
|
24016
24161
|
__export(exports_get_drive_delta, {
|
|
24017
|
-
schema: () =>
|
|
24018
|
-
|
|
24162
|
+
schema: () => schema6,
|
|
24163
|
+
meta: () => meta8,
|
|
24164
|
+
execute: () => execute6
|
|
24019
24165
|
});
|
|
24020
|
-
var
|
|
24021
|
-
var { execute:
|
|
24166
|
+
var schema6 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
24167
|
+
var { execute: execute6 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/delta()`, schema6);
|
|
24168
|
+
var meta8 = {
|
|
24169
|
+
summary: "Get the incremental change set (added / modified / deleted items) under a OneDrive / SharePoint folder. Use the `@odata.deltaLink` from a previous response to resume.",
|
|
24170
|
+
category: "drive",
|
|
24171
|
+
graphMethod: "GET",
|
|
24172
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/delta()",
|
|
24173
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitem-delta",
|
|
24174
|
+
options: [
|
|
24175
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID. Returned by `ask-marcel list-drives`." },
|
|
24176
|
+
{
|
|
24177
|
+
name: "item-id",
|
|
24178
|
+
key: "itemId",
|
|
24179
|
+
required: true,
|
|
24180
|
+
description: "driveItem ID of the folder whose subtree to track. Use the root folder ID from `get-drive-root-item` to track the entire drive."
|
|
24181
|
+
}
|
|
24182
|
+
],
|
|
24183
|
+
example: "ask-marcel get-drive-delta --drive-id 'b!1234' --item-id '01ROOT'",
|
|
24184
|
+
responseShape: "collection of changed Microsoft Graph `driveItem` resources under `value[]` plus an `@odata.deltaLink` token"
|
|
24185
|
+
};
|
|
24022
24186
|
|
|
24023
24187
|
// src/use-cases/commands/get-drive-item.ts
|
|
24024
24188
|
var exports_get_drive_item = {};
|
|
24025
24189
|
__export(exports_get_drive_item, {
|
|
24026
|
-
schema: () =>
|
|
24027
|
-
|
|
24190
|
+
schema: () => schema7,
|
|
24191
|
+
meta: () => meta9,
|
|
24192
|
+
execute: () => execute7
|
|
24028
24193
|
});
|
|
24029
|
-
var
|
|
24030
|
-
var { execute:
|
|
24194
|
+
var schema7 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
24195
|
+
var { execute: execute7 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}`, schema7);
|
|
24196
|
+
var meta9 = {
|
|
24197
|
+
summary: "Get the metadata (driveItem resource) of a single file or folder in OneDrive / SharePoint.",
|
|
24198
|
+
category: "drive",
|
|
24199
|
+
graphMethod: "GET",
|
|
24200
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}",
|
|
24201
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitem-get",
|
|
24202
|
+
options: [
|
|
24203
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID. Returned by `ask-marcel list-drives`." },
|
|
24204
|
+
{ name: "item-id", key: "itemId", required: true, description: "driveItem ID. Returned by `list-folder-files`, `search-onedrive-files`, or `get-drive-root-item`." }
|
|
24205
|
+
],
|
|
24206
|
+
example: "ask-marcel get-drive-item --drive-id 'b!1234' --item-id '01ABC'",
|
|
24207
|
+
responseShape: "single Microsoft Graph `driveItem` resource"
|
|
24208
|
+
};
|
|
24031
24209
|
|
|
24032
24210
|
// src/use-cases/commands/get-drive-root-item.ts
|
|
24033
24211
|
var exports_get_drive_root_item = {};
|
|
24034
24212
|
__export(exports_get_drive_root_item, {
|
|
24035
|
-
schema: () =>
|
|
24036
|
-
|
|
24213
|
+
schema: () => schema8,
|
|
24214
|
+
meta: () => meta10,
|
|
24215
|
+
execute: () => execute8
|
|
24037
24216
|
});
|
|
24038
|
-
var
|
|
24039
|
-
var { execute:
|
|
24217
|
+
var schema8 = exports_external.object({ driveId: exports_external.string().min(1) });
|
|
24218
|
+
var { execute: execute8 } = buildCommand((p) => `/drives/${p.driveId}/root`, schema8);
|
|
24219
|
+
var meta10 = {
|
|
24220
|
+
summary: "Get the root folder (driveItem) of a OneDrive / SharePoint drive.",
|
|
24221
|
+
category: "drive",
|
|
24222
|
+
graphMethod: "GET",
|
|
24223
|
+
graphPathTemplate: "/drives/{drive-id}/root",
|
|
24224
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitem-get",
|
|
24225
|
+
options: [{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID. Returned by `ask-marcel list-drives` in the `id` field." }],
|
|
24226
|
+
example: "ask-marcel get-drive-root-item --drive-id 'b!1234'",
|
|
24227
|
+
responseShape: "single Microsoft Graph `driveItem` resource (the root folder)"
|
|
24228
|
+
};
|
|
24040
24229
|
|
|
24041
24230
|
// src/use-cases/commands/get-excel-range.ts
|
|
24042
24231
|
var exports_get_excel_range = {};
|
|
24043
24232
|
__export(exports_get_excel_range, {
|
|
24044
|
-
schema: () =>
|
|
24045
|
-
|
|
24233
|
+
schema: () => schema9,
|
|
24234
|
+
meta: () => meta11,
|
|
24235
|
+
execute: () => execute9
|
|
24046
24236
|
});
|
|
24047
|
-
var
|
|
24048
|
-
var { execute:
|
|
24237
|
+
var schema9 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1), worksheetId: exports_external.string().min(1), address: exports_external.string().min(1) });
|
|
24238
|
+
var { execute: execute9 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/workbook/worksheets/${p.worksheetId}/range(address='${p.address}')`, schema9);
|
|
24239
|
+
var meta11 = {
|
|
24240
|
+
summary: "Get the cell values, formulas, and formats of a specific Excel range (e.g. `A1:C10`).",
|
|
24241
|
+
category: "excel",
|
|
24242
|
+
graphMethod: "GET",
|
|
24243
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/workbook/worksheets/{worksheet-id}/range(address='{address}')",
|
|
24244
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/worksheet-range",
|
|
24245
|
+
options: [
|
|
24246
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID containing the workbook. Returned by `ask-marcel list-drives`." },
|
|
24247
|
+
{ name: "item-id", key: "itemId", required: true, description: "driveItem ID of the .xlsx file." },
|
|
24248
|
+
{ name: "worksheet-id", key: "worksheetId", required: true, description: "Worksheet ID or worksheet name. Returned by `ask-marcel list-excel-worksheets`." },
|
|
24249
|
+
{ name: "address", key: "address", required: true, description: "A1-style range address, e.g. `A1:C10` or a single cell like `B7`." }
|
|
24250
|
+
],
|
|
24251
|
+
example: "ask-marcel get-excel-range --drive-id 'b!1234' --item-id '01XLSX' --worksheet-id 'Sheet1' --address 'A1:C10'",
|
|
24252
|
+
responseShape: "single Microsoft Graph `workbookRange` resource (values, formulas, format)"
|
|
24253
|
+
};
|
|
24049
24254
|
|
|
24050
24255
|
// src/use-cases/commands/get-excel-table.ts
|
|
24051
24256
|
var exports_get_excel_table = {};
|
|
24052
24257
|
__export(exports_get_excel_table, {
|
|
24053
|
-
schema: () =>
|
|
24054
|
-
|
|
24258
|
+
schema: () => schema10,
|
|
24259
|
+
meta: () => meta12,
|
|
24260
|
+
execute: () => execute10
|
|
24055
24261
|
});
|
|
24056
|
-
var
|
|
24057
|
-
var { execute:
|
|
24262
|
+
var schema10 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1), tableId: exports_external.string().min(1) });
|
|
24263
|
+
var { execute: execute10 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/workbook/tables/${p.tableId}`, schema10);
|
|
24264
|
+
var meta12 = {
|
|
24265
|
+
summary: "Get the metadata (style, header row, total row) of a single named Excel table.",
|
|
24266
|
+
category: "excel",
|
|
24267
|
+
graphMethod: "GET",
|
|
24268
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/workbook/tables/{table-id}",
|
|
24269
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/workbooktable-get",
|
|
24270
|
+
options: [
|
|
24271
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID containing the workbook. Returned by `ask-marcel list-drives`." },
|
|
24272
|
+
{ name: "item-id", key: "itemId", required: true, description: "driveItem ID of the .xlsx file." },
|
|
24273
|
+
{ name: "table-id", key: "tableId", required: true, description: "Workbook table ID or table name. Returned by `ask-marcel list-excel-tables`." }
|
|
24274
|
+
],
|
|
24275
|
+
example: "ask-marcel get-excel-table --drive-id 'b!1234' --item-id '01XLSX' --table-id 'Table1'",
|
|
24276
|
+
responseShape: "single Microsoft Graph `workbookTable` resource"
|
|
24277
|
+
};
|
|
24058
24278
|
|
|
24059
24279
|
// src/use-cases/commands/get-mail-attachment.ts
|
|
24060
24280
|
var exports_get_mail_attachment = {};
|
|
24061
24281
|
__export(exports_get_mail_attachment, {
|
|
24062
|
-
schema: () =>
|
|
24063
|
-
|
|
24282
|
+
schema: () => schema11,
|
|
24283
|
+
meta: () => meta13,
|
|
24284
|
+
execute: () => execute11
|
|
24064
24285
|
});
|
|
24065
|
-
var
|
|
24066
|
-
var { execute:
|
|
24286
|
+
var schema11 = exports_external.object({ messageId: exports_external.string().min(1), attachmentId: exports_external.string().min(1) });
|
|
24287
|
+
var { execute: execute11 } = buildCommand((p) => `/me/messages/${p.messageId}/attachments/${p.attachmentId}`, schema11);
|
|
24288
|
+
var meta13 = {
|
|
24289
|
+
summary: "Get a single attachment on an Outlook message (metadata, plus the base64 `contentBytes` for file attachments).",
|
|
24290
|
+
category: "mail",
|
|
24291
|
+
graphMethod: "GET",
|
|
24292
|
+
graphPathTemplate: "/me/messages/{message-id}/attachments/{attachment-id}",
|
|
24293
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/attachment-get",
|
|
24294
|
+
options: [
|
|
24295
|
+
{ name: "message-id", key: "messageId", required: true, description: "Outlook message ID. Returned by `ask-marcel list-mail-messages`." },
|
|
24296
|
+
{ name: "attachment-id", key: "attachmentId", required: true, description: "Attachment ID. Returned by `ask-marcel list-mail-attachments`." }
|
|
24297
|
+
],
|
|
24298
|
+
example: "ask-marcel get-mail-attachment --message-id 'AAMkAGI2...' --attachment-id 'AAMkABC...'",
|
|
24299
|
+
responseShape: "single Microsoft Graph `attachment` resource"
|
|
24300
|
+
};
|
|
24067
24301
|
|
|
24068
24302
|
// src/use-cases/commands/get-mail-message.ts
|
|
24069
24303
|
var exports_get_mail_message = {};
|
|
24070
24304
|
__export(exports_get_mail_message, {
|
|
24071
|
-
schema: () =>
|
|
24072
|
-
|
|
24305
|
+
schema: () => schema12,
|
|
24306
|
+
meta: () => meta14,
|
|
24307
|
+
execute: () => execute12
|
|
24073
24308
|
});
|
|
24074
|
-
var
|
|
24075
|
-
var { execute:
|
|
24309
|
+
var schema12 = exports_external.object({ messageId: exports_external.string().min(1) });
|
|
24310
|
+
var { execute: execute12 } = buildCommand((p) => `/me/messages/${p.messageId}`, schema12);
|
|
24311
|
+
var meta14 = {
|
|
24312
|
+
summary: "Get a single Outlook message by ID, including subject, sender, body, and flags.",
|
|
24313
|
+
category: "mail",
|
|
24314
|
+
graphMethod: "GET",
|
|
24315
|
+
graphPathTemplate: "/me/messages/{message-id}",
|
|
24316
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/message-get",
|
|
24317
|
+
options: [
|
|
24318
|
+
{ name: "message-id", key: "messageId", required: true, description: "Outlook message ID. Returned by `ask-marcel list-mail-messages` or `list-mail-folder-messages`." }
|
|
24319
|
+
],
|
|
24320
|
+
example: "ask-marcel get-mail-message --message-id 'AAMkAGI2...'",
|
|
24321
|
+
responseShape: "single Microsoft Graph `message` resource"
|
|
24322
|
+
};
|
|
24076
24323
|
|
|
24077
24324
|
// src/use-cases/commands/get-mailbox-settings.ts
|
|
24078
24325
|
var exports_get_mailbox_settings = {};
|
|
24079
24326
|
__export(exports_get_mailbox_settings, {
|
|
24080
|
-
schema: () =>
|
|
24081
|
-
|
|
24327
|
+
schema: () => schema13,
|
|
24328
|
+
meta: () => meta15,
|
|
24329
|
+
execute: () => execute13
|
|
24082
24330
|
});
|
|
24083
|
-
var
|
|
24084
|
-
var { execute:
|
|
24331
|
+
var schema13 = exports_external.object({}).strict();
|
|
24332
|
+
var { execute: execute13 } = buildCommand(() => "/me/mailboxSettings", schema13);
|
|
24333
|
+
var meta15 = {
|
|
24334
|
+
summary: "Get the signed-in user’s Outlook mailbox settings (timezone, working hours, automatic replies).",
|
|
24335
|
+
category: "mail",
|
|
24336
|
+
graphMethod: "GET",
|
|
24337
|
+
graphPathTemplate: "/me/mailboxSettings",
|
|
24338
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/user-get-mailboxsettings",
|
|
24339
|
+
options: [],
|
|
24340
|
+
example: "ask-marcel get-mailbox-settings",
|
|
24341
|
+
responseShape: "single Microsoft Graph `mailboxSettings` resource"
|
|
24342
|
+
};
|
|
24085
24343
|
|
|
24086
24344
|
// src/use-cases/commands/get-my-profile-photo.ts
|
|
24087
24345
|
var exports_get_my_profile_photo = {};
|
|
24088
24346
|
__export(exports_get_my_profile_photo, {
|
|
24089
|
-
schema: () =>
|
|
24090
|
-
|
|
24347
|
+
schema: () => schema14,
|
|
24348
|
+
meta: () => meta16,
|
|
24349
|
+
execute: () => execute14
|
|
24091
24350
|
});
|
|
24092
|
-
var
|
|
24093
|
-
var
|
|
24351
|
+
var schema14 = exports_external.object({}).strict();
|
|
24352
|
+
var execute14 = async (graph, params) => {
|
|
24353
|
+
const parsed = schema14.safeParse(params);
|
|
24354
|
+
if (!parsed.success)
|
|
24355
|
+
throw new Error(`validation failed: ${parsed.error.message}`);
|
|
24356
|
+
return graph.getBinary("/me/photo/$value");
|
|
24357
|
+
};
|
|
24358
|
+
var meta16 = {
|
|
24359
|
+
summary: "Download the signed-in user’s profile photo (largest available size). Returned as a base64 envelope so the binary survives JSON output.",
|
|
24360
|
+
category: "user",
|
|
24361
|
+
graphMethod: "GET",
|
|
24362
|
+
graphPathTemplate: "/me/photo/$value",
|
|
24363
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/profilephoto-get",
|
|
24364
|
+
options: [],
|
|
24365
|
+
example: "ask-marcel get-my-profile-photo",
|
|
24366
|
+
responseShape: '`{ contentType: "image/jpeg", size: <bytes>, base64: "<encoded>" }` (or `{ "@microsoft.graph.downloadUrl": "..." }` when Graph returns a 302 redirect to a CDN URL)'
|
|
24367
|
+
};
|
|
24094
24368
|
|
|
24095
24369
|
// src/use-cases/commands/get-onenote-page-content.ts
|
|
24096
24370
|
var exports_get_onenote_page_content = {};
|
|
24097
24371
|
__export(exports_get_onenote_page_content, {
|
|
24098
|
-
schema: () =>
|
|
24099
|
-
|
|
24100
|
-
|
|
24101
|
-
var schema20 = exports_external.object({ onenotePageId: exports_external.string().min(1) });
|
|
24102
|
-
var { execute: execute20 } = buildCommand((p) => `/me/onenote/pages/${p.onenotePageId}/content`, schema20);
|
|
24103
|
-
|
|
24104
|
-
// src/use-cases/commands/get-outlook-contact.ts
|
|
24105
|
-
var exports_get_outlook_contact = {};
|
|
24106
|
-
__export(exports_get_outlook_contact, {
|
|
24107
|
-
schema: () => schema21,
|
|
24108
|
-
execute: () => execute21
|
|
24372
|
+
schema: () => schema15,
|
|
24373
|
+
meta: () => meta17,
|
|
24374
|
+
execute: () => execute15
|
|
24109
24375
|
});
|
|
24110
|
-
var
|
|
24111
|
-
var
|
|
24376
|
+
var schema15 = exports_external.object({ onenotePageId: exports_external.string().min(1) });
|
|
24377
|
+
var execute15 = async (graph, params) => {
|
|
24378
|
+
const parsed = schema15.safeParse(params);
|
|
24379
|
+
if (!parsed.success)
|
|
24380
|
+
throw new Error(`validation failed: ${parsed.error.message}`);
|
|
24381
|
+
return graph.getBinary(`/me/onenote/pages/${parsed.data.onenotePageId}/content`);
|
|
24382
|
+
};
|
|
24383
|
+
var meta17 = {
|
|
24384
|
+
summary: "Get the HTML body of a single OneNote page. Returned in a JSON envelope so the HTML survives transport.",
|
|
24385
|
+
category: "notes",
|
|
24386
|
+
graphMethod: "GET",
|
|
24387
|
+
graphPathTemplate: "/me/onenote/pages/{onenote-page-id}/content",
|
|
24388
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/page-get",
|
|
24389
|
+
options: [{ name: "onenote-page-id", key: "onenotePageId", required: true, description: "OneNote page ID. Returned by `ask-marcel list-onenote-section-pages`." }],
|
|
24390
|
+
example: "ask-marcel get-onenote-page-content --onenote-page-id '1-abc...'",
|
|
24391
|
+
responseShape: '`{ contentType: "text/html", size: <chars>, text: "<html>..." }` — the rendered OneNote page body wrapped in a JSON envelope'
|
|
24392
|
+
};
|
|
24112
24393
|
|
|
24113
24394
|
// src/use-cases/commands/get-planner-bucket.ts
|
|
24114
24395
|
var exports_get_planner_bucket = {};
|
|
24115
24396
|
__export(exports_get_planner_bucket, {
|
|
24116
|
-
schema: () =>
|
|
24117
|
-
|
|
24397
|
+
schema: () => schema16,
|
|
24398
|
+
meta: () => meta18,
|
|
24399
|
+
execute: () => execute16
|
|
24118
24400
|
});
|
|
24119
|
-
var
|
|
24120
|
-
var { execute:
|
|
24401
|
+
var schema16 = exports_external.object({ plannerBucketId: exports_external.string().min(1) });
|
|
24402
|
+
var { execute: execute16 } = buildCommand((p) => `/planner/buckets/${p.plannerBucketId}`, schema16);
|
|
24403
|
+
var meta18 = {
|
|
24404
|
+
summary: "Get the metadata of a single Microsoft Planner bucket (column / lane).",
|
|
24405
|
+
category: "tasks",
|
|
24406
|
+
graphMethod: "GET",
|
|
24407
|
+
graphPathTemplate: "/planner/buckets/{planner-bucket-id}",
|
|
24408
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/plannerbucket-get",
|
|
24409
|
+
options: [{ name: "planner-bucket-id", key: "plannerBucketId", required: true, description: "Planner bucket ID. Returned by `ask-marcel list-plan-buckets`." }],
|
|
24410
|
+
example: "ask-marcel get-planner-bucket --planner-bucket-id 'sFNeQRFu_kqhxpwwAhmA15gAGfoT'",
|
|
24411
|
+
responseShape: "single Microsoft Graph `plannerBucket` resource"
|
|
24412
|
+
};
|
|
24121
24413
|
|
|
24122
24414
|
// src/use-cases/commands/get-planner-plan.ts
|
|
24123
24415
|
var exports_get_planner_plan = {};
|
|
24124
24416
|
__export(exports_get_planner_plan, {
|
|
24125
|
-
schema: () =>
|
|
24126
|
-
|
|
24417
|
+
schema: () => schema17,
|
|
24418
|
+
meta: () => meta19,
|
|
24419
|
+
execute: () => execute17
|
|
24127
24420
|
});
|
|
24128
|
-
var
|
|
24129
|
-
var { execute:
|
|
24421
|
+
var schema17 = exports_external.object({ plannerPlanId: exports_external.string().min(1) });
|
|
24422
|
+
var { execute: execute17 } = buildCommand((p) => `/planner/plans/${p.plannerPlanId}`, schema17);
|
|
24423
|
+
var meta19 = {
|
|
24424
|
+
summary: "Get the metadata of a single Microsoft Planner plan (title, owner group, container).",
|
|
24425
|
+
category: "tasks",
|
|
24426
|
+
graphMethod: "GET",
|
|
24427
|
+
graphPathTemplate: "/planner/plans/{planner-plan-id}",
|
|
24428
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/plannerplan-get",
|
|
24429
|
+
options: [
|
|
24430
|
+
{
|
|
24431
|
+
name: "planner-plan-id",
|
|
24432
|
+
key: "plannerPlanId",
|
|
24433
|
+
required: true,
|
|
24434
|
+
description: "Planner plan ID. Returned in the `planId` field of any task from `ask-marcel list-planner-tasks`."
|
|
24435
|
+
}
|
|
24436
|
+
],
|
|
24437
|
+
example: "ask-marcel get-planner-plan --planner-plan-id 'xqQg5FS2LkCp935s-FIFm5gAB6'",
|
|
24438
|
+
responseShape: "single Microsoft Graph `plannerPlan` resource"
|
|
24439
|
+
};
|
|
24130
24440
|
|
|
24131
24441
|
// src/use-cases/commands/get-planner-task-details.ts
|
|
24132
24442
|
var exports_get_planner_task_details = {};
|
|
24133
24443
|
__export(exports_get_planner_task_details, {
|
|
24134
|
-
schema: () =>
|
|
24135
|
-
|
|
24444
|
+
schema: () => schema18,
|
|
24445
|
+
meta: () => meta20,
|
|
24446
|
+
execute: () => execute18
|
|
24136
24447
|
});
|
|
24137
|
-
var
|
|
24138
|
-
var { execute:
|
|
24448
|
+
var schema18 = exports_external.object({ plannerTaskId: exports_external.string().min(1) });
|
|
24449
|
+
var { execute: execute18 } = buildCommand((p) => `/planner/tasks/${p.plannerTaskId}/details`, schema18);
|
|
24450
|
+
var meta20 = {
|
|
24451
|
+
summary: "Get the rich details (description, checklist, references) of a Microsoft Planner task.",
|
|
24452
|
+
category: "tasks",
|
|
24453
|
+
graphMethod: "GET",
|
|
24454
|
+
graphPathTemplate: "/planner/tasks/{planner-task-id}/details",
|
|
24455
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/plannertaskdetails-get",
|
|
24456
|
+
options: [{ name: "planner-task-id", key: "plannerTaskId", required: true, description: "Planner task ID. Returned by `ask-marcel list-planner-tasks` or `list-plan-tasks`." }],
|
|
24457
|
+
example: "ask-marcel get-planner-task-details --planner-task-id '01tx7Ic7-USXEwt0lvR1cmgAH8gK'",
|
|
24458
|
+
responseShape: "single Microsoft Graph `plannerTaskDetails` resource"
|
|
24459
|
+
};
|
|
24139
24460
|
|
|
24140
24461
|
// src/use-cases/commands/get-planner-task.ts
|
|
24141
24462
|
var exports_get_planner_task = {};
|
|
24142
24463
|
__export(exports_get_planner_task, {
|
|
24143
|
-
schema: () =>
|
|
24144
|
-
|
|
24464
|
+
schema: () => schema19,
|
|
24465
|
+
meta: () => meta21,
|
|
24466
|
+
execute: () => execute19
|
|
24145
24467
|
});
|
|
24146
|
-
var
|
|
24147
|
-
var { execute:
|
|
24468
|
+
var schema19 = exports_external.object({ plannerTaskId: exports_external.string().min(1) });
|
|
24469
|
+
var { execute: execute19 } = buildCommand((p) => `/planner/tasks/${p.plannerTaskId}`, schema19);
|
|
24470
|
+
var meta21 = {
|
|
24471
|
+
summary: "Get the metadata of a single Microsoft Planner task (title, assignees, dates, completion).",
|
|
24472
|
+
category: "tasks",
|
|
24473
|
+
graphMethod: "GET",
|
|
24474
|
+
graphPathTemplate: "/planner/tasks/{planner-task-id}",
|
|
24475
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/plannertask-get",
|
|
24476
|
+
options: [{ name: "planner-task-id", key: "plannerTaskId", required: true, description: "Planner task ID. Returned by `ask-marcel list-planner-tasks` or `list-plan-tasks`." }],
|
|
24477
|
+
example: "ask-marcel get-planner-task --planner-task-id '01tx7Ic7-USXEwt0lvR1cmgAH8gK'",
|
|
24478
|
+
responseShape: "single Microsoft Graph `plannerTask` resource"
|
|
24479
|
+
};
|
|
24148
24480
|
|
|
24149
24481
|
// src/use-cases/commands/get-sharepoint-site-by-path.ts
|
|
24150
24482
|
var exports_get_sharepoint_site_by_path = {};
|
|
24151
24483
|
__export(exports_get_sharepoint_site_by_path, {
|
|
24152
|
-
schema: () =>
|
|
24153
|
-
|
|
24484
|
+
schema: () => schema20,
|
|
24485
|
+
meta: () => meta22,
|
|
24486
|
+
execute: () => execute20
|
|
24154
24487
|
});
|
|
24155
|
-
var
|
|
24156
|
-
|
|
24488
|
+
var schema20 = exports_external.object({
|
|
24489
|
+
hostname: exports_external.string().min(1),
|
|
24490
|
+
path: exports_external.string().min(1).refine((v) => v.startsWith("/"), { message: "must start with `/` (server-relative path, e.g. /sites/Marketing)" })
|
|
24491
|
+
});
|
|
24492
|
+
var { execute: execute20 } = buildCommand((p) => `/sites/${p.hostname}:${p.path}`, schema20);
|
|
24493
|
+
var meta22 = {
|
|
24494
|
+
summary: "Resolve a SharePoint site by its hostname + server-relative path. Use this when you have a SharePoint URL (e.g. `https://contoso.sharepoint.com/sites/Marketing`) but no site ID.",
|
|
24495
|
+
category: "sharepoint",
|
|
24496
|
+
graphMethod: "GET",
|
|
24497
|
+
graphPathTemplate: "/sites/{hostname}:{path}",
|
|
24498
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/site-get",
|
|
24499
|
+
options: [
|
|
24500
|
+
{
|
|
24501
|
+
name: "hostname",
|
|
24502
|
+
key: "hostname",
|
|
24503
|
+
required: true,
|
|
24504
|
+
description: "SharePoint host, e.g. `contoso.sharepoint.com` (or `contoso-my.sharepoint.com` for personal sites). Take the host portion of your SharePoint URL."
|
|
24505
|
+
},
|
|
24506
|
+
{
|
|
24507
|
+
name: "path",
|
|
24508
|
+
key: "path",
|
|
24509
|
+
required: true,
|
|
24510
|
+
description: "Server-relative path starting with `/`, e.g. `/sites/Marketing` or `/teams/Marketing/Subsite`. Take the URL pathname after the hostname."
|
|
24511
|
+
}
|
|
24512
|
+
],
|
|
24513
|
+
example: "ask-marcel get-sharepoint-site-by-path --hostname 'contoso.sharepoint.com' --path '/sites/Marketing'",
|
|
24514
|
+
responseShape: "single Microsoft Graph `site` resource"
|
|
24515
|
+
};
|
|
24157
24516
|
|
|
24158
24517
|
// src/use-cases/commands/get-sharepoint-site-drive-by-id.ts
|
|
24159
24518
|
var exports_get_sharepoint_site_drive_by_id = {};
|
|
24160
24519
|
__export(exports_get_sharepoint_site_drive_by_id, {
|
|
24161
|
-
schema: () =>
|
|
24162
|
-
|
|
24163
|
-
|
|
24164
|
-
var schema27 = exports_external.object({ siteId: exports_external.string().min(1), driveId: exports_external.string().min(1) });
|
|
24165
|
-
var { execute: execute27 } = buildCommand((p) => `/sites/${p.siteId}/drives/${p.driveId}`, schema27);
|
|
24166
|
-
|
|
24167
|
-
// src/use-cases/commands/get-sharepoint-site-item.ts
|
|
24168
|
-
var exports_get_sharepoint_site_item = {};
|
|
24169
|
-
__export(exports_get_sharepoint_site_item, {
|
|
24170
|
-
schema: () => schema28,
|
|
24171
|
-
execute: () => execute28
|
|
24520
|
+
schema: () => schema21,
|
|
24521
|
+
meta: () => meta23,
|
|
24522
|
+
execute: () => execute21
|
|
24172
24523
|
});
|
|
24173
|
-
var
|
|
24174
|
-
var { execute:
|
|
24524
|
+
var schema21 = exports_external.object({ siteId: exports_external.string().min(1), driveId: exports_external.string().min(1) });
|
|
24525
|
+
var { execute: execute21 } = buildCommand((p) => `/sites/${p.siteId}/drives/${p.driveId}`, schema21);
|
|
24526
|
+
var meta23 = {
|
|
24527
|
+
summary: "Get the metadata of a single document library (drive) on a SharePoint site by drive ID.",
|
|
24528
|
+
category: "sharepoint",
|
|
24529
|
+
graphMethod: "GET",
|
|
24530
|
+
graphPathTemplate: "/sites/{site-id}/drives/{drive-id}",
|
|
24531
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/drive-get",
|
|
24532
|
+
options: [
|
|
24533
|
+
{ name: "site-id", key: "siteId", required: true, description: "SharePoint site ID. Returned by `ask-marcel search-sharepoint-sites`." },
|
|
24534
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Drive (document library) ID on the site. Returned by `ask-marcel list-sharepoint-site-drives`." }
|
|
24535
|
+
],
|
|
24536
|
+
example: "ask-marcel get-sharepoint-site-drive-by-id --site-id 'contoso.sharepoint.com,1234,5678' --drive-id 'b!abcd'",
|
|
24537
|
+
responseShape: "single Microsoft Graph `drive` resource"
|
|
24538
|
+
};
|
|
24175
24539
|
|
|
24176
24540
|
// src/use-cases/commands/get-sharepoint-site-list-item.ts
|
|
24177
24541
|
var exports_get_sharepoint_site_list_item = {};
|
|
24178
24542
|
__export(exports_get_sharepoint_site_list_item, {
|
|
24179
|
-
schema: () =>
|
|
24180
|
-
|
|
24543
|
+
schema: () => schema22,
|
|
24544
|
+
meta: () => meta24,
|
|
24545
|
+
execute: () => execute22
|
|
24181
24546
|
});
|
|
24182
|
-
var
|
|
24183
|
-
var { execute:
|
|
24547
|
+
var schema22 = exports_external.object({ siteId: exports_external.string().min(1), listId: exports_external.string().min(1), listItemId: exports_external.string().min(1) });
|
|
24548
|
+
var { execute: execute22 } = buildCommand((p) => `/sites/${p.siteId}/lists/${p.listId}/items/${p.listItemId}`, schema22);
|
|
24549
|
+
var meta24 = {
|
|
24550
|
+
summary: "Get a single row (listItem) of a SharePoint list by ID.",
|
|
24551
|
+
category: "sharepoint",
|
|
24552
|
+
graphMethod: "GET",
|
|
24553
|
+
graphPathTemplate: "/sites/{site-id}/lists/{list-id}/items/{list-item-id}",
|
|
24554
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/listitem-get",
|
|
24555
|
+
options: [
|
|
24556
|
+
{ name: "site-id", key: "siteId", required: true, description: "SharePoint site ID. Returned by `ask-marcel search-sharepoint-sites`." },
|
|
24557
|
+
{ name: "list-id", key: "listId", required: true, description: "SharePoint list ID or display name. Returned by `ask-marcel list-sharepoint-site-lists`." },
|
|
24558
|
+
{ name: "list-item-id", key: "listItemId", required: true, description: "listItem ID (typically a small integer). Returned by `ask-marcel list-sharepoint-site-list-items`." }
|
|
24559
|
+
],
|
|
24560
|
+
example: "ask-marcel get-sharepoint-site-list-item --site-id 'contoso.sharepoint.com,1234,5678' --list-id 'Tasks' --list-item-id '7'",
|
|
24561
|
+
responseShape: "single Microsoft Graph `listItem` resource"
|
|
24562
|
+
};
|
|
24184
24563
|
|
|
24185
24564
|
// src/use-cases/commands/get-sharepoint-site-list.ts
|
|
24186
24565
|
var exports_get_sharepoint_site_list = {};
|
|
24187
24566
|
__export(exports_get_sharepoint_site_list, {
|
|
24188
|
-
schema: () =>
|
|
24189
|
-
|
|
24567
|
+
schema: () => schema23,
|
|
24568
|
+
meta: () => meta25,
|
|
24569
|
+
execute: () => execute23
|
|
24190
24570
|
});
|
|
24191
|
-
var
|
|
24192
|
-
var { execute:
|
|
24571
|
+
var schema23 = exports_external.object({ siteId: exports_external.string().min(1), listId: exports_external.string().min(1) });
|
|
24572
|
+
var { execute: execute23 } = buildCommand((p) => `/sites/${p.siteId}/lists/${p.listId}`, schema23);
|
|
24573
|
+
var meta25 = {
|
|
24574
|
+
summary: "Get the metadata (display name, template, columns) of a single SharePoint list.",
|
|
24575
|
+
category: "sharepoint",
|
|
24576
|
+
graphMethod: "GET",
|
|
24577
|
+
graphPathTemplate: "/sites/{site-id}/lists/{list-id}",
|
|
24578
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/list-get",
|
|
24579
|
+
options: [
|
|
24580
|
+
{ name: "site-id", key: "siteId", required: true, description: "SharePoint site ID. Returned by `ask-marcel search-sharepoint-sites`." },
|
|
24581
|
+
{ name: "list-id", key: "listId", required: true, description: "SharePoint list ID or display name. Returned by `ask-marcel list-sharepoint-site-lists`." }
|
|
24582
|
+
],
|
|
24583
|
+
example: "ask-marcel get-sharepoint-site-list --site-id 'contoso.sharepoint.com,1234,5678' --list-id 'Documents'",
|
|
24584
|
+
responseShape: "single Microsoft Graph `list` resource"
|
|
24585
|
+
};
|
|
24193
24586
|
|
|
24194
24587
|
// src/use-cases/commands/get-sharepoint-site.ts
|
|
24195
24588
|
var exports_get_sharepoint_site = {};
|
|
24196
24589
|
__export(exports_get_sharepoint_site, {
|
|
24197
|
-
schema: () =>
|
|
24198
|
-
|
|
24199
|
-
|
|
24200
|
-
var schema31 = exports_external.object({ siteId: exports_external.string().min(1) });
|
|
24201
|
-
var { execute: execute31 } = buildCommand((p) => `/sites/${p.siteId}`, schema31);
|
|
24202
|
-
|
|
24203
|
-
// src/use-cases/commands/get-sharepoint-sites-delta.ts
|
|
24204
|
-
var exports_get_sharepoint_sites_delta = {};
|
|
24205
|
-
__export(exports_get_sharepoint_sites_delta, {
|
|
24206
|
-
schema: () => schema32,
|
|
24207
|
-
execute: () => execute32
|
|
24590
|
+
schema: () => schema24,
|
|
24591
|
+
meta: () => meta26,
|
|
24592
|
+
execute: () => execute24
|
|
24208
24593
|
});
|
|
24209
|
-
var
|
|
24210
|
-
var { execute:
|
|
24594
|
+
var schema24 = exports_external.object({ siteId: exports_external.string().min(1) });
|
|
24595
|
+
var { execute: execute24 } = buildCommand((p) => `/sites/${p.siteId}`, schema24);
|
|
24596
|
+
var meta26 = {
|
|
24597
|
+
summary: "Get the metadata of a single SharePoint site by its site ID.",
|
|
24598
|
+
category: "sharepoint",
|
|
24599
|
+
graphMethod: "GET",
|
|
24600
|
+
graphPathTemplate: "/sites/{site-id}",
|
|
24601
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/site-get",
|
|
24602
|
+
options: [
|
|
24603
|
+
{
|
|
24604
|
+
name: "site-id",
|
|
24605
|
+
key: "siteId",
|
|
24606
|
+
required: true,
|
|
24607
|
+
description: "SharePoint site ID. Either the composite ID (`hostname,site-collection-id,site-id`) returned by `ask-marcel search-sharepoint-sites`, or the literal `root` to refer to the tenant root site."
|
|
24608
|
+
}
|
|
24609
|
+
],
|
|
24610
|
+
example: "ask-marcel get-sharepoint-site --site-id 'contoso.sharepoint.com,1234,5678'",
|
|
24611
|
+
responseShape: "single Microsoft Graph `site` resource"
|
|
24612
|
+
};
|
|
24211
24613
|
|
|
24212
24614
|
// src/use-cases/commands/get-specific-calendar-event.ts
|
|
24213
24615
|
var exports_get_specific_calendar_event = {};
|
|
24214
24616
|
__export(exports_get_specific_calendar_event, {
|
|
24215
|
-
schema: () =>
|
|
24216
|
-
|
|
24617
|
+
schema: () => schema25,
|
|
24618
|
+
meta: () => meta27,
|
|
24619
|
+
execute: () => execute25
|
|
24217
24620
|
});
|
|
24218
|
-
var
|
|
24219
|
-
var { execute:
|
|
24621
|
+
var schema25 = exports_external.object({ calendarId: exports_external.string().min(1), eventId: exports_external.string().min(1) });
|
|
24622
|
+
var { execute: execute25 } = buildCommand((p) => `/me/calendars/${p.calendarId}/events/${p.eventId}`, schema25);
|
|
24623
|
+
var meta27 = {
|
|
24624
|
+
summary: "Fetch a single calendar event by ID from a specific (non-default) calendar.",
|
|
24625
|
+
category: "calendar",
|
|
24626
|
+
graphMethod: "GET",
|
|
24627
|
+
graphPathTemplate: "/me/calendars/{calendar-id}/events/{event-id}",
|
|
24628
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/event-get",
|
|
24629
|
+
options: [
|
|
24630
|
+
{ name: "calendar-id", key: "calendarId", required: true, description: "Calendar ID. Returned by `ask-marcel list-calendars`." },
|
|
24631
|
+
{ name: "event-id", key: "eventId", required: true, description: "Event ID. Returned by `ask-marcel list-specific-calendar-events`." }
|
|
24632
|
+
],
|
|
24633
|
+
example: "ask-marcel get-specific-calendar-event --calendar-id 'AAMkAGI2THVS...' --event-id 'AAMkABC...'",
|
|
24634
|
+
responseShape: "single Microsoft Graph `event` resource"
|
|
24635
|
+
};
|
|
24220
24636
|
|
|
24221
24637
|
// src/use-cases/commands/get-specific-calendar-view.ts
|
|
24222
24638
|
var exports_get_specific_calendar_view = {};
|
|
24223
24639
|
__export(exports_get_specific_calendar_view, {
|
|
24224
|
-
schema: () =>
|
|
24225
|
-
|
|
24640
|
+
schema: () => schema26,
|
|
24641
|
+
meta: () => meta28,
|
|
24642
|
+
execute: () => execute26
|
|
24226
24643
|
});
|
|
24227
|
-
var
|
|
24228
|
-
|
|
24644
|
+
var schema26 = exports_external.object({
|
|
24645
|
+
calendarId: exports_external.string().min(1),
|
|
24646
|
+
startDateTime: exports_external.string().min(1),
|
|
24647
|
+
endDateTime: exports_external.string().min(1)
|
|
24648
|
+
});
|
|
24649
|
+
var { execute: execute26 } = buildCommand((p) => `/me/calendars/${p.calendarId}/calendarView?startDateTime=${p.startDateTime}&endDateTime=${p.endDateTime}`, schema26);
|
|
24650
|
+
var meta28 = {
|
|
24651
|
+
summary: "List the events in a specific (non-default) calendar with recurrence expanded into individual occurrences in a date range. Both ISO date-time params are required by Graph.",
|
|
24652
|
+
category: "calendar",
|
|
24653
|
+
graphMethod: "GET",
|
|
24654
|
+
graphPathTemplate: "/me/calendars/{calendar-id}/calendarView?startDateTime={start-date-time}&endDateTime={end-date-time}",
|
|
24655
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/calendar-list-calendarview",
|
|
24656
|
+
options: [
|
|
24657
|
+
{ name: "calendar-id", key: "calendarId", required: true, description: "Calendar ID. Returned by `ask-marcel list-calendars`." },
|
|
24658
|
+
{
|
|
24659
|
+
name: "start-date-time",
|
|
24660
|
+
key: "startDateTime",
|
|
24661
|
+
required: true,
|
|
24662
|
+
description: "ISO 8601 lower bound (UTC). Example: `2026-04-01T00:00:00Z`. Required by Graph; the request fails without it."
|
|
24663
|
+
},
|
|
24664
|
+
{
|
|
24665
|
+
name: "end-date-time",
|
|
24666
|
+
key: "endDateTime",
|
|
24667
|
+
required: true,
|
|
24668
|
+
description: "ISO 8601 upper bound (UTC). Example: `2026-05-01T00:00:00Z`. Required by Graph; the request fails without it."
|
|
24669
|
+
}
|
|
24670
|
+
],
|
|
24671
|
+
example: "ask-marcel get-specific-calendar-view --calendar-id 'AAMkAGI2THVS...' --start-date-time '2026-04-01T00:00:00Z' --end-date-time '2026-05-01T00:00:00Z'",
|
|
24672
|
+
responseShape: "collection of Microsoft Graph `event` resources (single occurrences) under `value[]`"
|
|
24673
|
+
};
|
|
24229
24674
|
|
|
24230
24675
|
// src/use-cases/commands/get-team-channel.ts
|
|
24231
24676
|
var exports_get_team_channel = {};
|
|
24232
24677
|
__export(exports_get_team_channel, {
|
|
24233
|
-
schema: () =>
|
|
24234
|
-
|
|
24678
|
+
schema: () => schema27,
|
|
24679
|
+
meta: () => meta29,
|
|
24680
|
+
execute: () => execute27
|
|
24235
24681
|
});
|
|
24236
|
-
var
|
|
24237
|
-
var { execute:
|
|
24682
|
+
var schema27 = exports_external.object({ teamId: exports_external.string().min(1), channelId: exports_external.string().min(1) });
|
|
24683
|
+
var { execute: execute27 } = buildCommand((p) => `/teams/${p.teamId}/channels/${p.channelId}`, schema27);
|
|
24684
|
+
var meta29 = {
|
|
24685
|
+
summary: "Get the metadata of a single channel inside a Microsoft Team.",
|
|
24686
|
+
category: "teams",
|
|
24687
|
+
graphMethod: "GET",
|
|
24688
|
+
graphPathTemplate: "/teams/{team-id}/channels/{channel-id}",
|
|
24689
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/channel-get",
|
|
24690
|
+
options: [
|
|
24691
|
+
{ name: "team-id", key: "teamId", required: true, description: "Microsoft Teams team ID. Returned by `ask-marcel list-joined-teams`." },
|
|
24692
|
+
{ name: "channel-id", key: "channelId", required: true, description: "Channel ID. Returned by `ask-marcel list-team-channels`." }
|
|
24693
|
+
],
|
|
24694
|
+
example: "ask-marcel get-team-channel --team-id 'abc-1234-...' --channel-id '19:def@thread.tacv2'",
|
|
24695
|
+
responseShape: "single Microsoft Graph `channel` resource"
|
|
24696
|
+
};
|
|
24238
24697
|
|
|
24239
24698
|
// src/use-cases/commands/get-team.ts
|
|
24240
24699
|
var exports_get_team = {};
|
|
24241
24700
|
__export(exports_get_team, {
|
|
24242
|
-
schema: () =>
|
|
24243
|
-
|
|
24701
|
+
schema: () => schema28,
|
|
24702
|
+
meta: () => meta30,
|
|
24703
|
+
execute: () => execute28
|
|
24244
24704
|
});
|
|
24245
|
-
var
|
|
24246
|
-
var { execute:
|
|
24705
|
+
var schema28 = exports_external.object({ teamId: exports_external.string().min(1) });
|
|
24706
|
+
var { execute: execute28 } = buildCommand((p) => `/teams/${p.teamId}`, schema28);
|
|
24707
|
+
var meta30 = {
|
|
24708
|
+
summary: "Get the metadata of a single Microsoft Team (display name, settings, member-settings, owner group).",
|
|
24709
|
+
category: "teams",
|
|
24710
|
+
graphMethod: "GET",
|
|
24711
|
+
graphPathTemplate: "/teams/{team-id}",
|
|
24712
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/team-get",
|
|
24713
|
+
options: [{ name: "team-id", key: "teamId", required: true, description: "Microsoft Teams team ID. Returned by `ask-marcel list-joined-teams`." }],
|
|
24714
|
+
example: "ask-marcel get-team --team-id 'abc-1234-...'",
|
|
24715
|
+
responseShape: "single Microsoft Graph `team` resource"
|
|
24716
|
+
};
|
|
24247
24717
|
|
|
24248
24718
|
// src/use-cases/commands/get-todo-task.ts
|
|
24249
24719
|
var exports_get_todo_task = {};
|
|
24250
24720
|
__export(exports_get_todo_task, {
|
|
24251
|
-
schema: () =>
|
|
24252
|
-
|
|
24721
|
+
schema: () => schema29,
|
|
24722
|
+
meta: () => meta31,
|
|
24723
|
+
execute: () => execute29
|
|
24253
24724
|
});
|
|
24254
|
-
var
|
|
24255
|
-
var { execute:
|
|
24725
|
+
var schema29 = exports_external.object({ todoTaskListId: exports_external.string().min(1), todoTaskId: exports_external.string().min(1) });
|
|
24726
|
+
var { execute: execute29 } = buildCommand((p) => `/me/todo/lists/${p.todoTaskListId}/tasks/${p.todoTaskId}`, schema29);
|
|
24727
|
+
var meta31 = {
|
|
24728
|
+
summary: "Get a single Microsoft To Do task by its ID and its parent list ID.",
|
|
24729
|
+
category: "tasks",
|
|
24730
|
+
graphMethod: "GET",
|
|
24731
|
+
graphPathTemplate: "/me/todo/lists/{todo-task-list-id}/tasks/{todo-task-id}",
|
|
24732
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/todotask-get",
|
|
24733
|
+
options: [
|
|
24734
|
+
{ name: "todo-task-list-id", key: "todoTaskListId", required: true, description: "To Do task list ID. Returned by `ask-marcel list-todo-task-lists`." },
|
|
24735
|
+
{ name: "todo-task-id", key: "todoTaskId", required: true, description: "To Do task ID. Returned by `ask-marcel list-todo-tasks`." }
|
|
24736
|
+
],
|
|
24737
|
+
example: "ask-marcel get-todo-task --todo-task-list-id 'AAMkAGI...' --todo-task-id 'AAMkABC...'",
|
|
24738
|
+
responseShape: "single Microsoft Graph `todoTask` resource"
|
|
24739
|
+
};
|
|
24256
24740
|
|
|
24257
24741
|
// src/use-cases/commands/list-all-onenote-sections.ts
|
|
24258
24742
|
var exports_list_all_onenote_sections = {};
|
|
24259
24743
|
__export(exports_list_all_onenote_sections, {
|
|
24260
|
-
schema: () =>
|
|
24261
|
-
|
|
24744
|
+
schema: () => schema30,
|
|
24745
|
+
meta: () => meta32,
|
|
24746
|
+
execute: () => execute30
|
|
24262
24747
|
});
|
|
24263
|
-
var
|
|
24264
|
-
var { execute:
|
|
24748
|
+
var schema30 = exports_external.object({}).strict();
|
|
24749
|
+
var { execute: execute30 } = buildCommand(() => "/me/onenote/sections", schema30);
|
|
24750
|
+
var meta32 = {
|
|
24751
|
+
summary: "List every OneNote section the signed-in user can see, across all notebooks.",
|
|
24752
|
+
category: "notes",
|
|
24753
|
+
graphMethod: "GET",
|
|
24754
|
+
graphPathTemplate: "/me/onenote/sections",
|
|
24755
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/onenote-list-sections",
|
|
24756
|
+
options: [],
|
|
24757
|
+
example: "ask-marcel list-all-onenote-sections",
|
|
24758
|
+
responseShape: "collection of Microsoft Graph `onenoteSection` resources under `value[]`"
|
|
24759
|
+
};
|
|
24265
24760
|
|
|
24266
24761
|
// src/use-cases/commands/list-calendar-event-instances.ts
|
|
24267
24762
|
var exports_list_calendar_event_instances = {};
|
|
24268
24763
|
__export(exports_list_calendar_event_instances, {
|
|
24269
|
-
schema: () =>
|
|
24270
|
-
|
|
24764
|
+
schema: () => schema31,
|
|
24765
|
+
meta: () => meta33,
|
|
24766
|
+
execute: () => execute31
|
|
24271
24767
|
});
|
|
24272
|
-
var
|
|
24273
|
-
|
|
24768
|
+
var schema31 = exports_external.object({
|
|
24769
|
+
calendarId: exports_external.string().min(1),
|
|
24770
|
+
eventId: exports_external.string().min(1),
|
|
24771
|
+
startDateTime: exports_external.string().min(1),
|
|
24772
|
+
endDateTime: exports_external.string().min(1)
|
|
24773
|
+
});
|
|
24774
|
+
var { execute: execute31 } = buildCommand((p) => `/me/calendars/${p.calendarId}/events/${p.eventId}/instances?startDateTime=${p.startDateTime}&endDateTime=${p.endDateTime}`, schema31);
|
|
24775
|
+
var meta33 = {
|
|
24776
|
+
summary: "List the individual occurrences of a recurring calendar event over a date range. Both ISO date-time params are required by Graph.",
|
|
24777
|
+
category: "calendar",
|
|
24778
|
+
graphMethod: "GET",
|
|
24779
|
+
graphPathTemplate: "/me/calendars/{calendar-id}/events/{event-id}/instances?startDateTime={start-date-time}&endDateTime={end-date-time}",
|
|
24780
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/event-list-instances",
|
|
24781
|
+
options: [
|
|
24782
|
+
{ name: "calendar-id", key: "calendarId", required: true, description: "Calendar ID. Returned by `ask-marcel list-calendars`." },
|
|
24783
|
+
{ name: "event-id", key: "eventId", required: true, description: "Recurring event ID. Returned by `ask-marcel list-specific-calendar-events`." },
|
|
24784
|
+
{
|
|
24785
|
+
name: "start-date-time",
|
|
24786
|
+
key: "startDateTime",
|
|
24787
|
+
required: true,
|
|
24788
|
+
description: "ISO 8601 lower bound (UTC). Example: `2026-04-01T00:00:00Z`. Required by Graph; the request fails without it."
|
|
24789
|
+
},
|
|
24790
|
+
{
|
|
24791
|
+
name: "end-date-time",
|
|
24792
|
+
key: "endDateTime",
|
|
24793
|
+
required: true,
|
|
24794
|
+
description: "ISO 8601 upper bound (UTC). Example: `2026-05-01T00:00:00Z`. Required by Graph; the request fails without it."
|
|
24795
|
+
}
|
|
24796
|
+
],
|
|
24797
|
+
example: "ask-marcel list-calendar-event-instances --calendar-id 'AAMkAGI2THVS...' --event-id 'AAMkABC...' --start-date-time '2026-04-01T00:00:00Z' --end-date-time '2026-05-01T00:00:00Z'",
|
|
24798
|
+
responseShape: "collection of Microsoft Graph `event` resources (single occurrences) under `value[]`"
|
|
24799
|
+
};
|
|
24274
24800
|
|
|
24275
24801
|
// src/use-cases/commands/list-calendar-events-delta.ts
|
|
24276
24802
|
var exports_list_calendar_events_delta = {};
|
|
24277
24803
|
__export(exports_list_calendar_events_delta, {
|
|
24278
|
-
schema: () =>
|
|
24279
|
-
|
|
24804
|
+
schema: () => schema32,
|
|
24805
|
+
meta: () => meta34,
|
|
24806
|
+
execute: () => execute32
|
|
24280
24807
|
});
|
|
24281
|
-
var
|
|
24282
|
-
var { execute:
|
|
24808
|
+
var schema32 = exports_external.object({}).strict();
|
|
24809
|
+
var { execute: execute32 } = buildCommand(() => "/me/events/delta()", schema32);
|
|
24810
|
+
var meta34 = {
|
|
24811
|
+
summary: "Get the incremental change set (added / modified / deleted events) for the signed-in user’s default calendar. Use the `@odata.deltaLink` from a previous response to resume.",
|
|
24812
|
+
category: "calendar",
|
|
24813
|
+
graphMethod: "GET",
|
|
24814
|
+
graphPathTemplate: "/me/events/delta()",
|
|
24815
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/event-delta",
|
|
24816
|
+
options: [],
|
|
24817
|
+
example: "ask-marcel list-calendar-events-delta",
|
|
24818
|
+
responseShape: "collection of changed Microsoft Graph `event` resources under `value[]` plus an `@odata.deltaLink` token"
|
|
24819
|
+
};
|
|
24283
24820
|
|
|
24284
24821
|
// src/use-cases/commands/list-calendar-events.ts
|
|
24285
24822
|
var exports_list_calendar_events = {};
|
|
24286
24823
|
__export(exports_list_calendar_events, {
|
|
24287
|
-
schema: () =>
|
|
24288
|
-
|
|
24824
|
+
schema: () => schema33,
|
|
24825
|
+
meta: () => meta35,
|
|
24826
|
+
execute: () => execute33
|
|
24289
24827
|
});
|
|
24290
|
-
var
|
|
24291
|
-
var { execute:
|
|
24828
|
+
var schema33 = exports_external.object({}).strict();
|
|
24829
|
+
var { execute: execute33 } = buildCommand(() => "/me/events", schema33);
|
|
24830
|
+
var meta35 = {
|
|
24831
|
+
summary: "List the events in the signed-in user’s default calendar (does not expand recurrences).",
|
|
24832
|
+
category: "calendar",
|
|
24833
|
+
graphMethod: "GET",
|
|
24834
|
+
graphPathTemplate: "/me/events",
|
|
24835
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/user-list-events",
|
|
24836
|
+
options: [],
|
|
24837
|
+
example: "ask-marcel list-calendar-events",
|
|
24838
|
+
responseShape: "collection of Microsoft Graph `event` resources under `value[]`"
|
|
24839
|
+
};
|
|
24292
24840
|
|
|
24293
24841
|
// src/use-cases/commands/list-calendar-view-delta.ts
|
|
24294
24842
|
var exports_list_calendar_view_delta = {};
|
|
24295
24843
|
__export(exports_list_calendar_view_delta, {
|
|
24296
|
-
schema: () =>
|
|
24297
|
-
|
|
24844
|
+
schema: () => schema34,
|
|
24845
|
+
meta: () => meta36,
|
|
24846
|
+
execute: () => execute34
|
|
24298
24847
|
});
|
|
24299
|
-
var
|
|
24300
|
-
|
|
24848
|
+
var schema34 = exports_external.object({
|
|
24849
|
+
startDateTime: exports_external.string().min(1),
|
|
24850
|
+
endDateTime: exports_external.string().min(1)
|
|
24851
|
+
});
|
|
24852
|
+
var { execute: execute34 } = buildCommand((p) => `/me/calendarView/delta()?startDateTime=${p.startDateTime}&endDateTime=${p.endDateTime}`, schema34);
|
|
24853
|
+
var meta36 = {
|
|
24854
|
+
summary: "Get the first page of the incremental change set of expanded calendar-view occurrences over a date range. Subsequent pages: feed the returned `@odata.nextLink` to `next-page`; resume later via the `@odata.deltaLink`.",
|
|
24855
|
+
category: "calendar",
|
|
24856
|
+
graphMethod: "GET",
|
|
24857
|
+
graphPathTemplate: "/me/calendarView/delta()?startDateTime={start-date-time}&endDateTime={end-date-time}",
|
|
24858
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/event-delta",
|
|
24859
|
+
options: [
|
|
24860
|
+
{
|
|
24861
|
+
name: "start-date-time",
|
|
24862
|
+
key: "startDateTime",
|
|
24863
|
+
required: true,
|
|
24864
|
+
description: "ISO 8601 lower bound (UTC). Required on the first call only — the deltaLink token encodes it for resumes."
|
|
24865
|
+
},
|
|
24866
|
+
{
|
|
24867
|
+
name: "end-date-time",
|
|
24868
|
+
key: "endDateTime",
|
|
24869
|
+
required: true,
|
|
24870
|
+
description: "ISO 8601 upper bound (UTC). Required on the first call only — the deltaLink token encodes it for resumes."
|
|
24871
|
+
}
|
|
24872
|
+
],
|
|
24873
|
+
example: "ask-marcel list-calendar-view-delta --start-date-time '2026-04-01T00:00:00Z' --end-date-time '2026-05-01T00:00:00Z'",
|
|
24874
|
+
responseShape: "collection of changed Microsoft Graph `event` occurrences under `value[]` plus an `@odata.deltaLink` token"
|
|
24875
|
+
};
|
|
24301
24876
|
|
|
24302
24877
|
// src/use-cases/commands/list-calendars.ts
|
|
24303
24878
|
var exports_list_calendars = {};
|
|
24304
24879
|
__export(exports_list_calendars, {
|
|
24305
|
-
schema: () =>
|
|
24306
|
-
|
|
24307
|
-
|
|
24308
|
-
var schema43 = exports_external.object({}).strict();
|
|
24309
|
-
var { execute: execute43 } = buildCommand(() => "/me/calendars", schema43);
|
|
24310
|
-
|
|
24311
|
-
// src/use-cases/commands/list-channel-message-hosted-contents.ts
|
|
24312
|
-
var exports_list_channel_message_hosted_contents = {};
|
|
24313
|
-
__export(exports_list_channel_message_hosted_contents, {
|
|
24314
|
-
schema: () => schema44,
|
|
24315
|
-
execute: () => execute44
|
|
24316
|
-
});
|
|
24317
|
-
var schema44 = exports_external.object({ teamId: exports_external.string().min(1), channelId: exports_external.string().min(1), chatMessageId: exports_external.string().min(1) });
|
|
24318
|
-
var { execute: execute44 } = buildCommand((p) => `/teams/${p.teamId}/channels/${p.channelId}/messages/${p.chatMessageId}/hostedContents`, schema44);
|
|
24319
|
-
|
|
24320
|
-
// src/use-cases/commands/list-channel-message-replies.ts
|
|
24321
|
-
var exports_list_channel_message_replies = {};
|
|
24322
|
-
__export(exports_list_channel_message_replies, {
|
|
24323
|
-
schema: () => schema45,
|
|
24324
|
-
execute: () => execute45
|
|
24325
|
-
});
|
|
24326
|
-
var schema45 = exports_external.object({ teamId: exports_external.string().min(1), channelId: exports_external.string().min(1), chatMessageId: exports_external.string().min(1) });
|
|
24327
|
-
var { execute: execute45 } = buildCommand((p) => `/teams/${p.teamId}/channels/${p.channelId}/messages/${p.chatMessageId}/replies`, schema45);
|
|
24328
|
-
|
|
24329
|
-
// src/use-cases/commands/list-channel-messages.ts
|
|
24330
|
-
var exports_list_channel_messages = {};
|
|
24331
|
-
__export(exports_list_channel_messages, {
|
|
24332
|
-
schema: () => schema46,
|
|
24333
|
-
execute: () => execute46
|
|
24334
|
-
});
|
|
24335
|
-
var schema46 = exports_external.object({ teamId: exports_external.string().min(1), channelId: exports_external.string().min(1) });
|
|
24336
|
-
var { execute: execute46 } = buildCommand((p) => `/teams/${p.teamId}/channels/${p.channelId}/messages`, schema46);
|
|
24337
|
-
|
|
24338
|
-
// src/use-cases/commands/list-channel-tabs.ts
|
|
24339
|
-
var exports_list_channel_tabs = {};
|
|
24340
|
-
__export(exports_list_channel_tabs, {
|
|
24341
|
-
schema: () => schema47,
|
|
24342
|
-
execute: () => execute47
|
|
24880
|
+
schema: () => schema35,
|
|
24881
|
+
meta: () => meta37,
|
|
24882
|
+
execute: () => execute35
|
|
24343
24883
|
});
|
|
24344
|
-
var
|
|
24345
|
-
var { execute:
|
|
24884
|
+
var schema35 = exports_external.object({}).strict();
|
|
24885
|
+
var { execute: execute35 } = buildCommand(() => "/me/calendars", schema35);
|
|
24886
|
+
var meta37 = {
|
|
24887
|
+
summary: "List the calendars in the signed-in user’s mailbox (default + secondary calendars + shared calendars).",
|
|
24888
|
+
category: "calendar",
|
|
24889
|
+
graphMethod: "GET",
|
|
24890
|
+
graphPathTemplate: "/me/calendars",
|
|
24891
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/user-list-calendars",
|
|
24892
|
+
options: [],
|
|
24893
|
+
example: "ask-marcel list-calendars",
|
|
24894
|
+
responseShape: "collection of Microsoft Graph `calendar` resources under `value[]`"
|
|
24895
|
+
};
|
|
24346
24896
|
|
|
24347
24897
|
// src/use-cases/commands/list-chat-members.ts
|
|
24348
24898
|
var exports_list_chat_members = {};
|
|
24349
24899
|
__export(exports_list_chat_members, {
|
|
24350
|
-
schema: () =>
|
|
24351
|
-
|
|
24352
|
-
|
|
24353
|
-
var schema48 = exports_external.object({ chatId: exports_external.string().min(1) });
|
|
24354
|
-
var { execute: execute48 } = buildCommand((p) => `/chats/${p.chatId}/members`, schema48);
|
|
24355
|
-
|
|
24356
|
-
// src/use-cases/commands/list-chat-message-hosted-contents.ts
|
|
24357
|
-
var exports_list_chat_message_hosted_contents = {};
|
|
24358
|
-
__export(exports_list_chat_message_hosted_contents, {
|
|
24359
|
-
schema: () => schema49,
|
|
24360
|
-
execute: () => execute49
|
|
24361
|
-
});
|
|
24362
|
-
var schema49 = exports_external.object({ chatId: exports_external.string().min(1), chatMessageId: exports_external.string().min(1) });
|
|
24363
|
-
var { execute: execute49 } = buildCommand((p) => `/chats/${p.chatId}/messages/${p.chatMessageId}/hostedContents`, schema49);
|
|
24364
|
-
|
|
24365
|
-
// src/use-cases/commands/list-chat-message-replies.ts
|
|
24366
|
-
var exports_list_chat_message_replies = {};
|
|
24367
|
-
__export(exports_list_chat_message_replies, {
|
|
24368
|
-
schema: () => schema50,
|
|
24369
|
-
execute: () => execute50
|
|
24370
|
-
});
|
|
24371
|
-
var schema50 = exports_external.object({ chatId: exports_external.string().min(1), chatMessageId: exports_external.string().min(1) });
|
|
24372
|
-
var { execute: execute50 } = buildCommand((p) => `/chats/${p.chatId}/messages/${p.chatMessageId}/replies`, schema50);
|
|
24373
|
-
|
|
24374
|
-
// src/use-cases/commands/list-chat-messages.ts
|
|
24375
|
-
var exports_list_chat_messages = {};
|
|
24376
|
-
__export(exports_list_chat_messages, {
|
|
24377
|
-
schema: () => schema51,
|
|
24378
|
-
execute: () => execute51
|
|
24379
|
-
});
|
|
24380
|
-
var schema51 = exports_external.object({ chatId: exports_external.string().min(1) });
|
|
24381
|
-
var { execute: execute51 } = buildCommand((p) => `/chats/${p.chatId}/messages`, schema51);
|
|
24382
|
-
|
|
24383
|
-
// src/use-cases/commands/list-chats.ts
|
|
24384
|
-
var exports_list_chats = {};
|
|
24385
|
-
__export(exports_list_chats, {
|
|
24386
|
-
schema: () => schema52,
|
|
24387
|
-
execute: () => execute52
|
|
24900
|
+
schema: () => schema36,
|
|
24901
|
+
meta: () => meta38,
|
|
24902
|
+
execute: () => execute36
|
|
24388
24903
|
});
|
|
24389
|
-
var
|
|
24390
|
-
var { execute:
|
|
24904
|
+
var schema36 = exports_external.object({ chatId: exports_external.string().min(1) });
|
|
24905
|
+
var { execute: execute36 } = buildCommand((p) => `/chats/${p.chatId}/members`, schema36);
|
|
24906
|
+
var meta38 = {
|
|
24907
|
+
summary: "List the members of a single Microsoft Teams chat.",
|
|
24908
|
+
category: "chats",
|
|
24909
|
+
graphMethod: "GET",
|
|
24910
|
+
graphPathTemplate: "/chats/{chat-id}/members",
|
|
24911
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/chat-list-members",
|
|
24912
|
+
options: [
|
|
24913
|
+
{
|
|
24914
|
+
name: "chat-id",
|
|
24915
|
+
key: "chatId",
|
|
24916
|
+
required: true,
|
|
24917
|
+
description: "Microsoft Teams chat ID, e.g. `19:abc...@thread.v2`. " + "This CLI does not list chats (the Teams web client token has no `Chat.Read*` scope), so the chat ID has to come from outside. " + "Easiest source from inside this CLI: pick any Teams meeting from `list-calendar-events` and URL-decode the " + "`19%3ameeting_...%40thread.v2` segment of its `onlineMeeting.joinUrl`. " + "Other sources: the Teams desktop / web client (Open in browser → URL contains the chat thread ID), Microsoft Graph Explorer, or Power Automate."
|
|
24918
|
+
}
|
|
24919
|
+
],
|
|
24920
|
+
example: "ask-marcel list-chat-members --chat-id '19:abc...@thread.v2'",
|
|
24921
|
+
responseShape: "collection of Microsoft Graph `conversationMember` resources under `value[]`"
|
|
24922
|
+
};
|
|
24391
24923
|
|
|
24392
24924
|
// src/use-cases/commands/list-drive-item-permissions.ts
|
|
24393
24925
|
var exports_list_drive_item_permissions = {};
|
|
24394
24926
|
__export(exports_list_drive_item_permissions, {
|
|
24395
|
-
schema: () =>
|
|
24396
|
-
|
|
24927
|
+
schema: () => schema37,
|
|
24928
|
+
meta: () => meta39,
|
|
24929
|
+
execute: () => execute37
|
|
24397
24930
|
});
|
|
24398
|
-
var
|
|
24399
|
-
var { execute:
|
|
24931
|
+
var schema37 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
24932
|
+
var { execute: execute37 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/permissions`, schema37);
|
|
24933
|
+
var meta39 = {
|
|
24934
|
+
summary: "List the sharing permissions on a OneDrive / SharePoint file or folder.",
|
|
24935
|
+
category: "drive",
|
|
24936
|
+
graphMethod: "GET",
|
|
24937
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/permissions",
|
|
24938
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitem-list-permissions",
|
|
24939
|
+
options: [
|
|
24940
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID. Returned by `ask-marcel list-drives`." },
|
|
24941
|
+
{
|
|
24942
|
+
name: "item-id",
|
|
24943
|
+
key: "itemId",
|
|
24944
|
+
required: true,
|
|
24945
|
+
description: "driveItem ID of the file or folder. Returned by `list-folder-files`, `search-onedrive-files`, or `get-drive-item`."
|
|
24946
|
+
}
|
|
24947
|
+
],
|
|
24948
|
+
example: "ask-marcel list-drive-item-permissions --drive-id 'b!1234' --item-id '01ABC'",
|
|
24949
|
+
responseShape: "collection of Microsoft Graph `permission` resources under `value[]`"
|
|
24950
|
+
};
|
|
24400
24951
|
|
|
24401
24952
|
// src/use-cases/commands/list-drive-item-versions.ts
|
|
24402
24953
|
var exports_list_drive_item_versions = {};
|
|
24403
24954
|
__export(exports_list_drive_item_versions, {
|
|
24404
|
-
schema: () =>
|
|
24405
|
-
|
|
24955
|
+
schema: () => schema38,
|
|
24956
|
+
meta: () => meta40,
|
|
24957
|
+
execute: () => execute38
|
|
24406
24958
|
});
|
|
24407
|
-
var
|
|
24408
|
-
var { execute:
|
|
24959
|
+
var schema38 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
24960
|
+
var { execute: execute38 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/versions`, schema38);
|
|
24961
|
+
var meta40 = {
|
|
24962
|
+
summary: "List the historical versions of a OneDrive / SharePoint file (each save creates a new version).",
|
|
24963
|
+
category: "drive",
|
|
24964
|
+
graphMethod: "GET",
|
|
24965
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/versions",
|
|
24966
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitem-list-versions",
|
|
24967
|
+
options: [
|
|
24968
|
+
{
|
|
24969
|
+
name: "drive-id",
|
|
24970
|
+
key: "driveId",
|
|
24971
|
+
required: true,
|
|
24972
|
+
description: "Microsoft Graph drive ID. Use `ask-marcel list-drives` for the personal OneDrive, " + "or `ask-marcel list-sharepoint-site-drives --site-id <id>` for a SharePoint document library."
|
|
24973
|
+
},
|
|
24974
|
+
{ name: "item-id", key: "itemId", required: true, description: "driveItem ID of the file. Returned by `list-folder-files` or `search-onedrive-files`." }
|
|
24975
|
+
],
|
|
24976
|
+
example: "ask-marcel list-drive-item-versions --drive-id 'b!1234' --item-id '01ABC'",
|
|
24977
|
+
responseShape: "collection of Microsoft Graph `driveItemVersion` resources under `value[]`"
|
|
24978
|
+
};
|
|
24409
24979
|
|
|
24410
24980
|
// src/use-cases/commands/list-drives.ts
|
|
24411
24981
|
var exports_list_drives = {};
|
|
24412
24982
|
__export(exports_list_drives, {
|
|
24413
|
-
schema: () =>
|
|
24414
|
-
|
|
24983
|
+
schema: () => schema39,
|
|
24984
|
+
meta: () => meta41,
|
|
24985
|
+
execute: () => execute39
|
|
24415
24986
|
});
|
|
24416
|
-
var
|
|
24417
|
-
var { execute:
|
|
24987
|
+
var schema39 = exports_external.object({}).strict();
|
|
24988
|
+
var { execute: execute39 } = buildCommand(() => "/me/drives", schema39);
|
|
24989
|
+
var meta41 = {
|
|
24990
|
+
summary: "List all OneDrive / SharePoint drives the signed-in user has access to.",
|
|
24991
|
+
category: "drive",
|
|
24992
|
+
graphMethod: "GET",
|
|
24993
|
+
graphPathTemplate: "/me/drives",
|
|
24994
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/drive-list",
|
|
24995
|
+
options: [],
|
|
24996
|
+
example: "ask-marcel list-drives",
|
|
24997
|
+
responseShape: "collection of Microsoft Graph `drive` resources under `value[]`"
|
|
24998
|
+
};
|
|
24418
24999
|
|
|
24419
25000
|
// src/use-cases/commands/list-excel-table-rows.ts
|
|
24420
25001
|
var exports_list_excel_table_rows = {};
|
|
24421
25002
|
__export(exports_list_excel_table_rows, {
|
|
24422
|
-
schema: () =>
|
|
24423
|
-
|
|
25003
|
+
schema: () => schema40,
|
|
25004
|
+
meta: () => meta42,
|
|
25005
|
+
execute: () => execute40
|
|
24424
25006
|
});
|
|
24425
|
-
var
|
|
24426
|
-
var { execute:
|
|
25007
|
+
var schema40 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1), tableId: exports_external.string().min(1) });
|
|
25008
|
+
var { execute: execute40 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/workbook/tables/${p.tableId}/rows`, schema40);
|
|
25009
|
+
var meta42 = {
|
|
25010
|
+
summary: "List the data rows of a named Excel table (excluding the header row).",
|
|
25011
|
+
category: "excel",
|
|
25012
|
+
graphMethod: "GET",
|
|
25013
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/workbook/tables/{table-id}/rows",
|
|
25014
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/workbooktable-list-rows",
|
|
25015
|
+
options: [
|
|
25016
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID containing the workbook. Returned by `ask-marcel list-drives`." },
|
|
25017
|
+
{ name: "item-id", key: "itemId", required: true, description: "driveItem ID of the .xlsx file." },
|
|
25018
|
+
{ name: "table-id", key: "tableId", required: true, description: "Workbook table ID or table name. Returned by `ask-marcel list-excel-tables`." }
|
|
25019
|
+
],
|
|
25020
|
+
example: "ask-marcel list-excel-table-rows --drive-id 'b!1234' --item-id '01XLSX' --table-id 'Table1'",
|
|
25021
|
+
responseShape: "collection of Microsoft Graph `workbookTableRow` resources (each `values` is a 2D array) under `value[]`"
|
|
25022
|
+
};
|
|
24427
25023
|
|
|
24428
25024
|
// src/use-cases/commands/list-excel-tables.ts
|
|
24429
25025
|
var exports_list_excel_tables = {};
|
|
24430
25026
|
__export(exports_list_excel_tables, {
|
|
24431
|
-
schema: () =>
|
|
24432
|
-
|
|
25027
|
+
schema: () => schema41,
|
|
25028
|
+
meta: () => meta43,
|
|
25029
|
+
execute: () => execute41
|
|
24433
25030
|
});
|
|
24434
|
-
var
|
|
24435
|
-
var { execute:
|
|
25031
|
+
var schema41 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
25032
|
+
var { execute: execute41 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/workbook/tables`, schema41);
|
|
25033
|
+
var meta43 = {
|
|
25034
|
+
summary: "List the named tables across every worksheet in an Excel workbook.",
|
|
25035
|
+
category: "excel",
|
|
25036
|
+
graphMethod: "GET",
|
|
25037
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/workbook/tables",
|
|
25038
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/workbook-list-tables",
|
|
25039
|
+
options: [
|
|
25040
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID containing the workbook. Returned by `ask-marcel list-drives`." },
|
|
25041
|
+
{ name: "item-id", key: "itemId", required: true, description: "driveItem ID of the .xlsx file. Returned by `list-folder-files` or `search-onedrive-files`." }
|
|
25042
|
+
],
|
|
25043
|
+
example: "ask-marcel list-excel-tables --drive-id 'b!1234' --item-id '01XLSX'",
|
|
25044
|
+
responseShape: "collection of Microsoft Graph `workbookTable` resources under `value[]`"
|
|
25045
|
+
};
|
|
24436
25046
|
|
|
24437
25047
|
// src/use-cases/commands/list-excel-worksheets.ts
|
|
24438
25048
|
var exports_list_excel_worksheets = {};
|
|
24439
25049
|
__export(exports_list_excel_worksheets, {
|
|
24440
|
-
schema: () =>
|
|
24441
|
-
|
|
25050
|
+
schema: () => schema42,
|
|
25051
|
+
meta: () => meta44,
|
|
25052
|
+
execute: () => execute42
|
|
24442
25053
|
});
|
|
24443
|
-
var
|
|
24444
|
-
var { execute:
|
|
25054
|
+
var schema42 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
25055
|
+
var { execute: execute42 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/workbook/worksheets`, schema42);
|
|
25056
|
+
var meta44 = {
|
|
25057
|
+
summary: "List the worksheets (tabs) inside an Excel workbook stored in OneDrive / SharePoint.",
|
|
25058
|
+
category: "excel",
|
|
25059
|
+
graphMethod: "GET",
|
|
25060
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/workbook/worksheets",
|
|
25061
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/workbook-list-worksheets",
|
|
25062
|
+
options: [
|
|
25063
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID containing the workbook. Returned by `ask-marcel list-drives`." },
|
|
25064
|
+
{ name: "item-id", key: "itemId", required: true, description: "driveItem ID of the .xlsx file. Returned by `list-folder-files` or `search-onedrive-files`." }
|
|
25065
|
+
],
|
|
25066
|
+
example: "ask-marcel list-excel-worksheets --drive-id 'b!1234' --item-id '01XLSX'",
|
|
25067
|
+
responseShape: "collection of Microsoft Graph `worksheet` resources under `value[]`"
|
|
25068
|
+
};
|
|
24445
25069
|
|
|
24446
25070
|
// src/use-cases/commands/list-folder-files.ts
|
|
24447
25071
|
var exports_list_folder_files = {};
|
|
24448
25072
|
__export(exports_list_folder_files, {
|
|
24449
|
-
schema: () =>
|
|
24450
|
-
|
|
25073
|
+
schema: () => schema43,
|
|
25074
|
+
meta: () => meta45,
|
|
25075
|
+
execute: () => execute43
|
|
24451
25076
|
});
|
|
24452
|
-
var
|
|
24453
|
-
var { execute:
|
|
25077
|
+
var schema43 = exports_external.object({ driveId: exports_external.string().min(1), itemId: exports_external.string().min(1) });
|
|
25078
|
+
var { execute: execute43 } = buildCommand((p) => `/drives/${p.driveId}/items/${p.itemId}/children`, schema43);
|
|
25079
|
+
var meta45 = {
|
|
25080
|
+
summary: "List the children (files and subfolders) of a folder in OneDrive / SharePoint.",
|
|
25081
|
+
category: "drive",
|
|
25082
|
+
graphMethod: "GET",
|
|
25083
|
+
graphPathTemplate: "/drives/{drive-id}/items/{item-id}/children",
|
|
25084
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitem-list-children",
|
|
25085
|
+
options: [
|
|
25086
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID. Returned by `ask-marcel list-drives`." },
|
|
25087
|
+
{
|
|
25088
|
+
name: "item-id",
|
|
25089
|
+
key: "itemId",
|
|
25090
|
+
required: true,
|
|
25091
|
+
description: "driveItem ID of the folder. Use the root folder ID from `ask-marcel get-drive-root-item` to list the top of a drive."
|
|
25092
|
+
}
|
|
25093
|
+
],
|
|
25094
|
+
example: "ask-marcel list-folder-files --drive-id 'b!1234' --item-id '01ROOT'",
|
|
25095
|
+
responseShape: "collection of Microsoft Graph `driveItem` resources under `value[]`"
|
|
25096
|
+
};
|
|
25097
|
+
|
|
25098
|
+
// src/use-cases/commands/list-incomplete-planner-tasks.ts
|
|
25099
|
+
var exports_list_incomplete_planner_tasks = {};
|
|
25100
|
+
__export(exports_list_incomplete_planner_tasks, {
|
|
25101
|
+
schema: () => schema44,
|
|
25102
|
+
meta: () => meta46,
|
|
25103
|
+
execute: () => execute44
|
|
25104
|
+
});
|
|
25105
|
+
var schema44 = exports_external.object({}).strict();
|
|
25106
|
+
var { execute: execute44 } = buildCommand(() => "/me/planner/tasks?$filter=percentComplete ne 100", schema44);
|
|
25107
|
+
var meta46 = {
|
|
25108
|
+
summary: "List every incomplete Microsoft Planner task assigned to or owned by the signed-in user, across every plan.",
|
|
25109
|
+
category: "tasks",
|
|
25110
|
+
graphMethod: "GET",
|
|
25111
|
+
graphPathTemplate: "/me/planner/tasks?$filter=percentComplete ne 100",
|
|
25112
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/planneruser-list-tasks",
|
|
25113
|
+
options: [],
|
|
25114
|
+
example: "ask-marcel list-incomplete-planner-tasks",
|
|
25115
|
+
responseShape: "collection of Microsoft Graph `plannerTask` resources under `value[]` where `percentComplete < 100`"
|
|
25116
|
+
};
|
|
25117
|
+
|
|
25118
|
+
// src/use-cases/commands/list-incomplete-todo-tasks.ts
|
|
25119
|
+
var exports_list_incomplete_todo_tasks = {};
|
|
25120
|
+
__export(exports_list_incomplete_todo_tasks, {
|
|
25121
|
+
schema: () => schema45,
|
|
25122
|
+
meta: () => meta47,
|
|
25123
|
+
execute: () => execute45
|
|
25124
|
+
});
|
|
25125
|
+
var schema45 = exports_external.object({ todoTaskListId: exports_external.string().min(1) });
|
|
25126
|
+
var { execute: execute45 } = buildCommand((p) => `/me/todo/lists/${p.todoTaskListId}/tasks?$filter=status ne 'completed'`, schema45);
|
|
25127
|
+
var meta47 = {
|
|
25128
|
+
summary: "List every incomplete Microsoft To Do task in a given list (status not equal to `completed`).",
|
|
25129
|
+
category: "tasks",
|
|
25130
|
+
graphMethod: "GET",
|
|
25131
|
+
graphPathTemplate: "/me/todo/lists/{todo-task-list-id}/tasks?$filter=status ne 'completed'",
|
|
25132
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/todotasklist-list-tasks",
|
|
25133
|
+
options: [
|
|
25134
|
+
{
|
|
25135
|
+
name: "todo-task-list-id",
|
|
25136
|
+
key: "todoTaskListId",
|
|
25137
|
+
required: true,
|
|
25138
|
+
description: "todoTaskList ID. Returned by `ask-marcel list-todo-task-lists`. Well-known names also work, e.g. `tasks` for the default list. " + "There is no Graph endpoint that returns incomplete tasks across every list — call this once per list."
|
|
25139
|
+
}
|
|
25140
|
+
],
|
|
25141
|
+
example: "ask-marcel list-incomplete-todo-tasks --todo-task-list-id 'tasks'",
|
|
25142
|
+
responseShape: 'collection of Microsoft Graph `todoTask` resources under `value[]` where `status != "completed"`'
|
|
25143
|
+
};
|
|
24454
25144
|
|
|
24455
25145
|
// src/use-cases/commands/list-joined-teams.ts
|
|
24456
25146
|
var exports_list_joined_teams = {};
|
|
24457
25147
|
__export(exports_list_joined_teams, {
|
|
24458
|
-
schema: () =>
|
|
24459
|
-
|
|
25148
|
+
schema: () => schema46,
|
|
25149
|
+
meta: () => meta48,
|
|
25150
|
+
execute: () => execute46
|
|
24460
25151
|
});
|
|
24461
|
-
var
|
|
24462
|
-
var { execute:
|
|
25152
|
+
var schema46 = exports_external.object({}).strict();
|
|
25153
|
+
var { execute: execute46 } = buildCommand(() => "/me/joinedTeams", schema46);
|
|
25154
|
+
var meta48 = {
|
|
25155
|
+
summary: "List the Microsoft Teams the signed-in user is a member of.",
|
|
25156
|
+
category: "teams",
|
|
25157
|
+
graphMethod: "GET",
|
|
25158
|
+
graphPathTemplate: "/me/joinedTeams",
|
|
25159
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/user-list-joinedteams",
|
|
25160
|
+
options: [],
|
|
25161
|
+
example: "ask-marcel list-joined-teams",
|
|
25162
|
+
responseShape: "collection of Microsoft Graph `team` resources under `value[]`"
|
|
25163
|
+
};
|
|
24463
25164
|
|
|
24464
25165
|
// src/use-cases/commands/list-mail-attachments.ts
|
|
24465
25166
|
var exports_list_mail_attachments = {};
|
|
24466
25167
|
__export(exports_list_mail_attachments, {
|
|
24467
|
-
schema: () =>
|
|
24468
|
-
|
|
25168
|
+
schema: () => schema47,
|
|
25169
|
+
meta: () => meta49,
|
|
25170
|
+
execute: () => execute47
|
|
24469
25171
|
});
|
|
24470
|
-
var
|
|
24471
|
-
var { execute:
|
|
25172
|
+
var schema47 = exports_external.object({ messageId: exports_external.string().min(1) });
|
|
25173
|
+
var { execute: execute47 } = buildCommand((p) => `/me/messages/${p.messageId}/attachments`, schema47);
|
|
25174
|
+
var meta49 = {
|
|
25175
|
+
summary: "List the attachments (file, item, reference) on a single Outlook message.",
|
|
25176
|
+
category: "mail",
|
|
25177
|
+
graphMethod: "GET",
|
|
25178
|
+
graphPathTemplate: "/me/messages/{message-id}/attachments",
|
|
25179
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/message-list-attachments",
|
|
25180
|
+
options: [
|
|
25181
|
+
{ name: "message-id", key: "messageId", required: true, description: "Outlook message ID. Returned by `ask-marcel list-mail-messages` or `list-mail-folder-messages`." }
|
|
25182
|
+
],
|
|
25183
|
+
example: "ask-marcel list-mail-attachments --message-id 'AAMkAGI2...'",
|
|
25184
|
+
responseShape: "collection of Microsoft Graph `attachment` resources under `value[]`"
|
|
25185
|
+
};
|
|
24472
25186
|
|
|
24473
25187
|
// src/use-cases/commands/list-mail-child-folders.ts
|
|
24474
25188
|
var exports_list_mail_child_folders = {};
|
|
24475
25189
|
__export(exports_list_mail_child_folders, {
|
|
24476
|
-
schema: () =>
|
|
24477
|
-
|
|
25190
|
+
schema: () => schema48,
|
|
25191
|
+
meta: () => meta50,
|
|
25192
|
+
execute: () => execute48
|
|
24478
25193
|
});
|
|
24479
|
-
var
|
|
24480
|
-
var { execute:
|
|
25194
|
+
var schema48 = exports_external.object({ mailFolderId: exports_external.string().min(1) });
|
|
25195
|
+
var { execute: execute48 } = buildCommand((p) => `/me/mailFolders/${p.mailFolderId}/childFolders`, schema48);
|
|
25196
|
+
var meta50 = {
|
|
25197
|
+
summary: "List the subfolders of a single Outlook mail folder (e.g. subfolders of Inbox).",
|
|
25198
|
+
category: "mail",
|
|
25199
|
+
graphMethod: "GET",
|
|
25200
|
+
graphPathTemplate: "/me/mailFolders/{mail-folder-id}/childFolders",
|
|
25201
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/mailfolder-list-childfolders",
|
|
25202
|
+
options: [
|
|
25203
|
+
{
|
|
25204
|
+
name: "mail-folder-id",
|
|
25205
|
+
key: "mailFolderId",
|
|
25206
|
+
required: true,
|
|
25207
|
+
description: "mailFolder ID. Returned by `ask-marcel list-mail-folders`. Well-known names also work, e.g. `inbox`, `sentitems`, `drafts`."
|
|
25208
|
+
}
|
|
25209
|
+
],
|
|
25210
|
+
example: "ask-marcel list-mail-child-folders --mail-folder-id 'inbox'",
|
|
25211
|
+
responseShape: "collection of Microsoft Graph `mailFolder` resources under `value[]`"
|
|
25212
|
+
};
|
|
24481
25213
|
|
|
24482
25214
|
// src/use-cases/commands/list-mail-folder-messages.ts
|
|
24483
25215
|
var exports_list_mail_folder_messages = {};
|
|
24484
25216
|
__export(exports_list_mail_folder_messages, {
|
|
24485
|
-
schema: () =>
|
|
24486
|
-
|
|
25217
|
+
schema: () => schema49,
|
|
25218
|
+
meta: () => meta51,
|
|
25219
|
+
execute: () => execute49
|
|
24487
25220
|
});
|
|
24488
|
-
var
|
|
24489
|
-
var { execute:
|
|
25221
|
+
var schema49 = exports_external.object({ mailFolderId: exports_external.string().min(1) });
|
|
25222
|
+
var { execute: execute49 } = buildCommand((p) => `/me/mailFolders/${p.mailFolderId}/messages`, schema49);
|
|
25223
|
+
var meta51 = {
|
|
25224
|
+
summary: "List the messages inside a specific Outlook mail folder (Inbox, custom folder, etc.).",
|
|
25225
|
+
category: "mail",
|
|
25226
|
+
graphMethod: "GET",
|
|
25227
|
+
graphPathTemplate: "/me/mailFolders/{mail-folder-id}/messages",
|
|
25228
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/mailfolder-list-messages",
|
|
25229
|
+
options: [
|
|
25230
|
+
{
|
|
25231
|
+
name: "mail-folder-id",
|
|
25232
|
+
key: "mailFolderId",
|
|
25233
|
+
required: true,
|
|
25234
|
+
description: "mailFolder ID. Returned by `ask-marcel list-mail-folders`. Well-known names also work, e.g. `inbox`, `sentitems`, `drafts`."
|
|
25235
|
+
}
|
|
25236
|
+
],
|
|
25237
|
+
example: "ask-marcel list-mail-folder-messages --mail-folder-id 'inbox'",
|
|
25238
|
+
responseShape: "collection of Microsoft Graph `message` resources under `value[]`"
|
|
25239
|
+
};
|
|
24490
25240
|
|
|
24491
25241
|
// src/use-cases/commands/list-mail-folders.ts
|
|
24492
25242
|
var exports_list_mail_folders = {};
|
|
24493
25243
|
__export(exports_list_mail_folders, {
|
|
24494
|
-
schema: () =>
|
|
24495
|
-
|
|
25244
|
+
schema: () => schema50,
|
|
25245
|
+
meta: () => meta52,
|
|
25246
|
+
execute: () => execute50
|
|
24496
25247
|
});
|
|
24497
|
-
var
|
|
24498
|
-
var { execute:
|
|
25248
|
+
var schema50 = exports_external.object({}).strict();
|
|
25249
|
+
var { execute: execute50 } = buildCommand(() => "/me/mailFolders", schema50);
|
|
25250
|
+
var meta52 = {
|
|
25251
|
+
summary: "List the top-level mail folders in the signed-in user’s Outlook mailbox (Inbox, Sent Items, etc.).",
|
|
25252
|
+
category: "mail",
|
|
25253
|
+
graphMethod: "GET",
|
|
25254
|
+
graphPathTemplate: "/me/mailFolders",
|
|
25255
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/user-list-mailfolders",
|
|
25256
|
+
options: [],
|
|
25257
|
+
example: "ask-marcel list-mail-folders",
|
|
25258
|
+
responseShape: "collection of Microsoft Graph `mailFolder` resources under `value[]`"
|
|
25259
|
+
};
|
|
24499
25260
|
|
|
24500
25261
|
// src/use-cases/commands/list-mail-messages.ts
|
|
24501
25262
|
var exports_list_mail_messages = {};
|
|
24502
25263
|
__export(exports_list_mail_messages, {
|
|
24503
|
-
schema: () =>
|
|
24504
|
-
|
|
25264
|
+
schema: () => schema51,
|
|
25265
|
+
meta: () => meta53,
|
|
25266
|
+
execute: () => execute51
|
|
24505
25267
|
});
|
|
24506
|
-
var
|
|
24507
|
-
var { execute:
|
|
25268
|
+
var schema51 = exports_external.object({}).strict();
|
|
25269
|
+
var { execute: execute51 } = buildCommand(() => "/me/messages", schema51);
|
|
25270
|
+
var meta53 = {
|
|
25271
|
+
summary: "List the most recent messages from across the signed-in user’s entire Outlook mailbox (every folder including Sent, Archive, Junk; default sort `receivedDateTime` desc). Use `list-mail-folder-messages` to scope to a single folder such as Inbox.",
|
|
25272
|
+
category: "mail",
|
|
25273
|
+
graphMethod: "GET",
|
|
25274
|
+
graphPathTemplate: "/me/messages",
|
|
25275
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/user-list-messages",
|
|
25276
|
+
options: [],
|
|
25277
|
+
example: "ask-marcel list-mail-messages",
|
|
25278
|
+
responseShape: "collection of Microsoft Graph `message` resources under `value[]`"
|
|
25279
|
+
};
|
|
24508
25280
|
|
|
24509
25281
|
// src/use-cases/commands/list-mail-rules.ts
|
|
24510
25282
|
var exports_list_mail_rules = {};
|
|
24511
25283
|
__export(exports_list_mail_rules, {
|
|
24512
|
-
schema: () =>
|
|
24513
|
-
|
|
25284
|
+
schema: () => schema52,
|
|
25285
|
+
meta: () => meta54,
|
|
25286
|
+
execute: () => execute52
|
|
24514
25287
|
});
|
|
24515
|
-
var
|
|
24516
|
-
var { execute:
|
|
25288
|
+
var schema52 = exports_external.object({ mailFolderId: exports_external.string().min(1) });
|
|
25289
|
+
var { execute: execute52 } = buildCommand((p) => `/me/mailFolders/${p.mailFolderId}/messageRules`, schema52);
|
|
25290
|
+
var meta54 = {
|
|
25291
|
+
summary: "List the inbox / folder rules attached to a single Outlook mail folder.",
|
|
25292
|
+
category: "mail",
|
|
25293
|
+
graphMethod: "GET",
|
|
25294
|
+
graphPathTemplate: "/me/mailFolders/{mail-folder-id}/messageRules",
|
|
25295
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/mailfolder-list-messagerules",
|
|
25296
|
+
options: [
|
|
25297
|
+
{
|
|
25298
|
+
name: "mail-folder-id",
|
|
25299
|
+
key: "mailFolderId",
|
|
25300
|
+
required: true,
|
|
25301
|
+
description: "mailFolder ID. Returned by `ask-marcel list-mail-folders`. Well-known names also work, e.g. `inbox`."
|
|
25302
|
+
}
|
|
25303
|
+
],
|
|
25304
|
+
example: "ask-marcel list-mail-rules --mail-folder-id 'inbox'",
|
|
25305
|
+
responseShape: "collection of Microsoft Graph `messageRule` resources under `value[]`"
|
|
25306
|
+
};
|
|
24517
25307
|
|
|
24518
25308
|
// src/use-cases/commands/list-onenote-notebook-sections.ts
|
|
24519
25309
|
var exports_list_onenote_notebook_sections = {};
|
|
24520
25310
|
__export(exports_list_onenote_notebook_sections, {
|
|
24521
|
-
schema: () =>
|
|
24522
|
-
|
|
25311
|
+
schema: () => schema53,
|
|
25312
|
+
meta: () => meta55,
|
|
25313
|
+
execute: () => execute53
|
|
24523
25314
|
});
|
|
24524
|
-
var
|
|
24525
|
-
var { execute:
|
|
25315
|
+
var schema53 = exports_external.object({ notebookId: exports_external.string().min(1) });
|
|
25316
|
+
var { execute: execute53 } = buildCommand((p) => `/me/onenote/notebooks/${p.notebookId}/sections`, schema53);
|
|
25317
|
+
var meta55 = {
|
|
25318
|
+
summary: "List the top-level sections of a single OneNote notebook (flat — does NOT recurse into section groups; use `list-all-onenote-sections` to flatten every notebook the user has access to).",
|
|
25319
|
+
category: "notes",
|
|
25320
|
+
graphMethod: "GET",
|
|
25321
|
+
graphPathTemplate: "/me/onenote/notebooks/{notebook-id}/sections",
|
|
25322
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/notebook-list-sections",
|
|
25323
|
+
options: [{ name: "notebook-id", key: "notebookId", required: true, description: "OneNote notebook ID. Returned by `ask-marcel list-onenote-notebooks`." }],
|
|
25324
|
+
example: "ask-marcel list-onenote-notebook-sections --notebook-id '1-12abc...'",
|
|
25325
|
+
responseShape: "collection of Microsoft Graph `onenoteSection` resources under `value[]`"
|
|
25326
|
+
};
|
|
24526
25327
|
|
|
24527
25328
|
// src/use-cases/commands/list-onenote-notebooks.ts
|
|
24528
25329
|
var exports_list_onenote_notebooks = {};
|
|
24529
25330
|
__export(exports_list_onenote_notebooks, {
|
|
24530
|
-
schema: () =>
|
|
24531
|
-
|
|
25331
|
+
schema: () => schema54,
|
|
25332
|
+
meta: () => meta56,
|
|
25333
|
+
execute: () => execute54
|
|
24532
25334
|
});
|
|
24533
|
-
var
|
|
24534
|
-
var { execute:
|
|
25335
|
+
var schema54 = exports_external.object({}).strict();
|
|
25336
|
+
var { execute: execute54 } = buildCommand(() => "/me/onenote/notebooks", schema54);
|
|
25337
|
+
var meta56 = {
|
|
25338
|
+
summary: "List the OneNote notebooks the signed-in user owns or has access to (sorted by `createdDateTime` desc by Graph; soft-deleted notebooks excluded).",
|
|
25339
|
+
category: "notes",
|
|
25340
|
+
graphMethod: "GET",
|
|
25341
|
+
graphPathTemplate: "/me/onenote/notebooks",
|
|
25342
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/onenote-list-notebooks",
|
|
25343
|
+
options: [],
|
|
25344
|
+
example: "ask-marcel list-onenote-notebooks",
|
|
25345
|
+
responseShape: "collection of Microsoft Graph `notebook` resources under `value[]`"
|
|
25346
|
+
};
|
|
24535
25347
|
|
|
24536
25348
|
// src/use-cases/commands/list-onenote-section-pages.ts
|
|
24537
25349
|
var exports_list_onenote_section_pages = {};
|
|
24538
25350
|
__export(exports_list_onenote_section_pages, {
|
|
24539
|
-
schema: () =>
|
|
24540
|
-
|
|
24541
|
-
|
|
24542
|
-
var schema69 = exports_external.object({ onenoteSectionId: exports_external.string().min(1) });
|
|
24543
|
-
var { execute: execute69 } = buildCommand((p) => `/me/onenote/sections/${p.onenoteSectionId}/pages`, schema69);
|
|
24544
|
-
|
|
24545
|
-
// src/use-cases/commands/list-outlook-contacts.ts
|
|
24546
|
-
var exports_list_outlook_contacts = {};
|
|
24547
|
-
__export(exports_list_outlook_contacts, {
|
|
24548
|
-
schema: () => schema70,
|
|
24549
|
-
execute: () => execute70
|
|
24550
|
-
});
|
|
24551
|
-
var schema70 = exports_external.object({}).strict();
|
|
24552
|
-
var { execute: execute70 } = buildCommand(() => "/me/contacts", schema70);
|
|
24553
|
-
|
|
24554
|
-
// src/use-cases/commands/list-pinned-chat-messages.ts
|
|
24555
|
-
var exports_list_pinned_chat_messages = {};
|
|
24556
|
-
__export(exports_list_pinned_chat_messages, {
|
|
24557
|
-
schema: () => schema71,
|
|
24558
|
-
execute: () => execute71
|
|
25351
|
+
schema: () => schema55,
|
|
25352
|
+
meta: () => meta57,
|
|
25353
|
+
execute: () => execute55
|
|
24559
25354
|
});
|
|
24560
|
-
var
|
|
24561
|
-
var { execute:
|
|
25355
|
+
var schema55 = exports_external.object({ onenoteSectionId: exports_external.string().min(1) });
|
|
25356
|
+
var { execute: execute55 } = buildCommand((p) => `/me/onenote/sections/${p.onenoteSectionId}/pages`, schema55);
|
|
25357
|
+
var meta57 = {
|
|
25358
|
+
summary: "List the pages inside a single OneNote section.",
|
|
25359
|
+
category: "notes",
|
|
25360
|
+
graphMethod: "GET",
|
|
25361
|
+
graphPathTemplate: "/me/onenote/sections/{onenote-section-id}/pages",
|
|
25362
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/section-list-pages",
|
|
25363
|
+
options: [
|
|
25364
|
+
{
|
|
25365
|
+
name: "onenote-section-id",
|
|
25366
|
+
key: "onenoteSectionId",
|
|
25367
|
+
required: true,
|
|
25368
|
+
description: "OneNote section ID. Returned by `ask-marcel list-onenote-notebook-sections` or `list-all-onenote-sections`."
|
|
25369
|
+
}
|
|
25370
|
+
],
|
|
25371
|
+
example: "ask-marcel list-onenote-section-pages --onenote-section-id '1-abc...'",
|
|
25372
|
+
responseShape: "collection of Microsoft Graph `onenotePage` resources under `value[]`"
|
|
25373
|
+
};
|
|
24562
25374
|
|
|
24563
25375
|
// src/use-cases/commands/list-plan-buckets.ts
|
|
24564
25376
|
var exports_list_plan_buckets = {};
|
|
24565
25377
|
__export(exports_list_plan_buckets, {
|
|
24566
|
-
schema: () =>
|
|
24567
|
-
|
|
25378
|
+
schema: () => schema56,
|
|
25379
|
+
meta: () => meta58,
|
|
25380
|
+
execute: () => execute56
|
|
24568
25381
|
});
|
|
24569
|
-
var
|
|
24570
|
-
var { execute:
|
|
25382
|
+
var schema56 = exports_external.object({ plannerPlanId: exports_external.string().min(1) });
|
|
25383
|
+
var { execute: execute56 } = buildCommand((p) => `/planner/plans/${p.plannerPlanId}/buckets`, schema56);
|
|
25384
|
+
var meta58 = {
|
|
25385
|
+
summary: "List the buckets (columns / lanes) of a Microsoft Planner plan.",
|
|
25386
|
+
category: "tasks",
|
|
25387
|
+
graphMethod: "GET",
|
|
25388
|
+
graphPathTemplate: "/planner/plans/{planner-plan-id}/buckets",
|
|
25389
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/plannerplan-list-buckets",
|
|
25390
|
+
options: [
|
|
25391
|
+
{
|
|
25392
|
+
name: "planner-plan-id",
|
|
25393
|
+
key: "plannerPlanId",
|
|
25394
|
+
required: true,
|
|
25395
|
+
description: "Planner plan ID. Returned in the `planId` field of any task from `ask-marcel list-planner-tasks`."
|
|
25396
|
+
}
|
|
25397
|
+
],
|
|
25398
|
+
example: "ask-marcel list-plan-buckets --planner-plan-id 'xqQg5FS2LkCp935s-FIFm5gAB6'",
|
|
25399
|
+
responseShape: "collection of Microsoft Graph `plannerBucket` resources under `value[]`"
|
|
25400
|
+
};
|
|
24571
25401
|
|
|
24572
25402
|
// src/use-cases/commands/list-plan-tasks.ts
|
|
24573
25403
|
var exports_list_plan_tasks = {};
|
|
24574
25404
|
__export(exports_list_plan_tasks, {
|
|
24575
|
-
schema: () =>
|
|
24576
|
-
|
|
25405
|
+
schema: () => schema57,
|
|
25406
|
+
meta: () => meta59,
|
|
25407
|
+
execute: () => execute57
|
|
25408
|
+
});
|
|
25409
|
+
var schema57 = exports_external.object({ plannerPlanId: exports_external.string().min(1) });
|
|
25410
|
+
var { execute: execute57 } = buildCommand((p) => `/planner/plans/${p.plannerPlanId}/tasks`, schema57);
|
|
25411
|
+
var meta59 = {
|
|
25412
|
+
summary: "List every task within a Microsoft Planner plan, regardless of completion status (Graph orders by `orderHint`). Use `list-incomplete-planner-tasks` for the across-plans incomplete view.",
|
|
25413
|
+
category: "tasks",
|
|
25414
|
+
graphMethod: "GET",
|
|
25415
|
+
graphPathTemplate: "/planner/plans/{planner-plan-id}/tasks",
|
|
25416
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/plannerplan-list-tasks",
|
|
25417
|
+
options: [
|
|
25418
|
+
{
|
|
25419
|
+
name: "planner-plan-id",
|
|
25420
|
+
key: "plannerPlanId",
|
|
25421
|
+
required: true,
|
|
25422
|
+
description: "Planner plan ID. Returned in the `planId` field of any task from `ask-marcel list-planner-tasks`."
|
|
25423
|
+
}
|
|
25424
|
+
],
|
|
25425
|
+
example: "ask-marcel list-plan-tasks --planner-plan-id 'xqQg5FS2LkCp935s-FIFm5gAB6'",
|
|
25426
|
+
responseShape: "collection of Microsoft Graph `plannerTask` resources under `value[]`"
|
|
25427
|
+
};
|
|
25428
|
+
|
|
25429
|
+
// src/use-cases/commands/list-planner-plans.ts
|
|
25430
|
+
var exports_list_planner_plans = {};
|
|
25431
|
+
__export(exports_list_planner_plans, {
|
|
25432
|
+
schema: () => schema58,
|
|
25433
|
+
meta: () => meta60,
|
|
25434
|
+
execute: () => execute58
|
|
24577
25435
|
});
|
|
24578
|
-
var
|
|
24579
|
-
var { execute:
|
|
25436
|
+
var schema58 = exports_external.object({}).strict();
|
|
25437
|
+
var { execute: execute58 } = buildCommand(() => "/me/planner/plans", schema58);
|
|
25438
|
+
var meta60 = {
|
|
25439
|
+
summary: "List every Microsoft Planner plan the signed-in user has access to (across every group). Use this to discover plan IDs without needing an existing task as the entry point.",
|
|
25440
|
+
category: "tasks",
|
|
25441
|
+
graphMethod: "GET",
|
|
25442
|
+
graphPathTemplate: "/me/planner/plans",
|
|
25443
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/planneruser-list-plans",
|
|
25444
|
+
options: [],
|
|
25445
|
+
example: "ask-marcel list-planner-plans",
|
|
25446
|
+
responseShape: "collection of Microsoft Graph `plannerPlan` resources under `value[]`"
|
|
25447
|
+
};
|
|
24580
25448
|
|
|
24581
25449
|
// src/use-cases/commands/list-planner-tasks.ts
|
|
24582
25450
|
var exports_list_planner_tasks = {};
|
|
24583
25451
|
__export(exports_list_planner_tasks, {
|
|
24584
|
-
schema: () =>
|
|
24585
|
-
|
|
25452
|
+
schema: () => schema59,
|
|
25453
|
+
meta: () => meta61,
|
|
25454
|
+
execute: () => execute59
|
|
24586
25455
|
});
|
|
24587
|
-
var
|
|
24588
|
-
var { execute:
|
|
25456
|
+
var schema59 = exports_external.object({}).strict();
|
|
25457
|
+
var { execute: execute59 } = buildCommand(() => "/me/planner/tasks", schema59);
|
|
25458
|
+
var meta61 = {
|
|
25459
|
+
summary: "List every Microsoft Planner task assigned to or owned by the signed-in user, across all plans.",
|
|
25460
|
+
category: "tasks",
|
|
25461
|
+
graphMethod: "GET",
|
|
25462
|
+
graphPathTemplate: "/me/planner/tasks",
|
|
25463
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/planneruser-list-tasks",
|
|
25464
|
+
options: [],
|
|
25465
|
+
example: "ask-marcel list-planner-tasks",
|
|
25466
|
+
responseShape: "collection of Microsoft Graph `plannerTask` resources under `value[]`"
|
|
25467
|
+
};
|
|
24589
25468
|
|
|
24590
25469
|
// src/use-cases/commands/list-sharepoint-site-drives.ts
|
|
24591
25470
|
var exports_list_sharepoint_site_drives = {};
|
|
24592
25471
|
__export(exports_list_sharepoint_site_drives, {
|
|
24593
|
-
schema: () =>
|
|
24594
|
-
|
|
25472
|
+
schema: () => schema60,
|
|
25473
|
+
meta: () => meta62,
|
|
25474
|
+
execute: () => execute60
|
|
24595
25475
|
});
|
|
24596
|
-
var
|
|
24597
|
-
var { execute:
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
|
|
24601
|
-
|
|
24602
|
-
|
|
24603
|
-
|
|
24604
|
-
}
|
|
24605
|
-
|
|
24606
|
-
|
|
25476
|
+
var schema60 = exports_external.object({ siteId: exports_external.string().min(1) });
|
|
25477
|
+
var { execute: execute60 } = buildCommand((p) => `/sites/${p.siteId}/drives`, schema60);
|
|
25478
|
+
var meta62 = {
|
|
25479
|
+
summary: "List the document libraries (drives) attached to a SharePoint site.",
|
|
25480
|
+
category: "sharepoint",
|
|
25481
|
+
graphMethod: "GET",
|
|
25482
|
+
graphPathTemplate: "/sites/{site-id}/drives",
|
|
25483
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/drive-list",
|
|
25484
|
+
options: [{ name: "site-id", key: "siteId", required: true, description: "SharePoint site ID. Returned by `ask-marcel search-sharepoint-sites`." }],
|
|
25485
|
+
example: "ask-marcel list-sharepoint-site-drives --site-id 'contoso.sharepoint.com,1234,5678'",
|
|
25486
|
+
responseShape: "collection of Microsoft Graph `drive` resources under `value[]`"
|
|
25487
|
+
};
|
|
24607
25488
|
|
|
24608
25489
|
// src/use-cases/commands/list-sharepoint-site-list-items.ts
|
|
24609
25490
|
var exports_list_sharepoint_site_list_items = {};
|
|
24610
25491
|
__export(exports_list_sharepoint_site_list_items, {
|
|
24611
|
-
schema: () =>
|
|
24612
|
-
|
|
25492
|
+
schema: () => schema61,
|
|
25493
|
+
meta: () => meta63,
|
|
25494
|
+
execute: () => execute61
|
|
24613
25495
|
});
|
|
24614
|
-
var
|
|
24615
|
-
var { execute:
|
|
25496
|
+
var schema61 = exports_external.object({ siteId: exports_external.string().min(1), listId: exports_external.string().min(1) });
|
|
25497
|
+
var { execute: execute61 } = buildCommand((p) => `/sites/${p.siteId}/lists/${p.listId}/items`, schema61);
|
|
25498
|
+
var meta63 = {
|
|
25499
|
+
summary: "List the rows (listItem resources) of a single SharePoint list.",
|
|
25500
|
+
category: "sharepoint",
|
|
25501
|
+
graphMethod: "GET",
|
|
25502
|
+
graphPathTemplate: "/sites/{site-id}/lists/{list-id}/items",
|
|
25503
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/listitem-list",
|
|
25504
|
+
options: [
|
|
25505
|
+
{ name: "site-id", key: "siteId", required: true, description: "SharePoint site ID. Returned by `ask-marcel search-sharepoint-sites`." },
|
|
25506
|
+
{ name: "list-id", key: "listId", required: true, description: "SharePoint list ID or display name. Returned by `ask-marcel list-sharepoint-site-lists`." }
|
|
25507
|
+
],
|
|
25508
|
+
example: "ask-marcel list-sharepoint-site-list-items --site-id 'contoso.sharepoint.com,1234,5678' --list-id 'Tasks'",
|
|
25509
|
+
responseShape: "collection of Microsoft Graph `listItem` resources under `value[]`"
|
|
25510
|
+
};
|
|
24616
25511
|
|
|
24617
25512
|
// src/use-cases/commands/list-sharepoint-site-lists.ts
|
|
24618
25513
|
var exports_list_sharepoint_site_lists = {};
|
|
24619
25514
|
__export(exports_list_sharepoint_site_lists, {
|
|
24620
|
-
schema: () =>
|
|
24621
|
-
|
|
25515
|
+
schema: () => schema62,
|
|
25516
|
+
meta: () => meta64,
|
|
25517
|
+
execute: () => execute62
|
|
24622
25518
|
});
|
|
24623
|
-
var
|
|
24624
|
-
var { execute:
|
|
25519
|
+
var schema62 = exports_external.object({ siteId: exports_external.string().min(1) });
|
|
25520
|
+
var { execute: execute62 } = buildCommand((p) => `/sites/${p.siteId}/lists`, schema62);
|
|
25521
|
+
var meta64 = {
|
|
25522
|
+
summary: "List all SharePoint lists (custom + built-in document libraries) on a site.",
|
|
25523
|
+
category: "sharepoint",
|
|
25524
|
+
graphMethod: "GET",
|
|
25525
|
+
graphPathTemplate: "/sites/{site-id}/lists",
|
|
25526
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/list-list",
|
|
25527
|
+
options: [{ name: "site-id", key: "siteId", required: true, description: "SharePoint site ID. Returned by `ask-marcel search-sharepoint-sites`." }],
|
|
25528
|
+
example: "ask-marcel list-sharepoint-site-lists --site-id 'contoso.sharepoint.com,1234,5678'",
|
|
25529
|
+
responseShape: "collection of Microsoft Graph `list` resources under `value[]`"
|
|
25530
|
+
};
|
|
24625
25531
|
|
|
24626
25532
|
// src/use-cases/commands/list-specific-calendar-events.ts
|
|
24627
25533
|
var exports_list_specific_calendar_events = {};
|
|
24628
25534
|
__export(exports_list_specific_calendar_events, {
|
|
24629
|
-
schema: () =>
|
|
24630
|
-
|
|
25535
|
+
schema: () => schema63,
|
|
25536
|
+
meta: () => meta65,
|
|
25537
|
+
execute: () => execute63
|
|
24631
25538
|
});
|
|
24632
|
-
var
|
|
24633
|
-
var { execute:
|
|
25539
|
+
var schema63 = exports_external.object({ calendarId: exports_external.string().min(1) });
|
|
25540
|
+
var { execute: execute63 } = buildCommand((p) => `/me/calendars/${p.calendarId}/events`, schema63);
|
|
25541
|
+
var meta65 = {
|
|
25542
|
+
summary: "List the events in a specific (non-default) calendar (does not expand recurrences).",
|
|
25543
|
+
category: "calendar",
|
|
25544
|
+
graphMethod: "GET",
|
|
25545
|
+
graphPathTemplate: "/me/calendars/{calendar-id}/events",
|
|
25546
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/calendar-list-events",
|
|
25547
|
+
options: [{ name: "calendar-id", key: "calendarId", required: true, description: "Calendar ID. Returned by `ask-marcel list-calendars`." }],
|
|
25548
|
+
example: "ask-marcel list-specific-calendar-events --calendar-id 'AAMkAGI2THVS...'",
|
|
25549
|
+
responseShape: "collection of Microsoft Graph `event` resources under `value[]`"
|
|
25550
|
+
};
|
|
24634
25551
|
|
|
24635
25552
|
// src/use-cases/commands/list-team-channels.ts
|
|
24636
25553
|
var exports_list_team_channels = {};
|
|
24637
25554
|
__export(exports_list_team_channels, {
|
|
24638
|
-
schema: () =>
|
|
24639
|
-
|
|
25555
|
+
schema: () => schema64,
|
|
25556
|
+
meta: () => meta66,
|
|
25557
|
+
execute: () => execute64
|
|
24640
25558
|
});
|
|
24641
|
-
var
|
|
24642
|
-
var { execute:
|
|
24643
|
-
|
|
24644
|
-
|
|
24645
|
-
|
|
24646
|
-
|
|
24647
|
-
|
|
24648
|
-
|
|
24649
|
-
}
|
|
24650
|
-
|
|
24651
|
-
|
|
25559
|
+
var schema64 = exports_external.object({ teamId: exports_external.string().min(1) });
|
|
25560
|
+
var { execute: execute64 } = buildCommand((p) => `/teams/${p.teamId}/channels`, schema64);
|
|
25561
|
+
var meta66 = {
|
|
25562
|
+
summary: "List the channels (standard, private, shared) inside a single Microsoft Team.",
|
|
25563
|
+
category: "teams",
|
|
25564
|
+
graphMethod: "GET",
|
|
25565
|
+
graphPathTemplate: "/teams/{team-id}/channels",
|
|
25566
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/channel-list",
|
|
25567
|
+
options: [{ name: "team-id", key: "teamId", required: true, description: "Microsoft Teams team ID. Returned by `ask-marcel list-joined-teams`." }],
|
|
25568
|
+
example: "ask-marcel list-team-channels --team-id 'abc-1234-...'",
|
|
25569
|
+
responseShape: "collection of Microsoft Graph `channel` resources under `value[]`"
|
|
25570
|
+
};
|
|
24652
25571
|
|
|
24653
25572
|
// src/use-cases/commands/list-todo-linked-resources.ts
|
|
24654
25573
|
var exports_list_todo_linked_resources = {};
|
|
24655
25574
|
__export(exports_list_todo_linked_resources, {
|
|
24656
|
-
schema: () =>
|
|
24657
|
-
|
|
25575
|
+
schema: () => schema65,
|
|
25576
|
+
meta: () => meta67,
|
|
25577
|
+
execute: () => execute65
|
|
24658
25578
|
});
|
|
24659
|
-
var
|
|
24660
|
-
var { execute:
|
|
25579
|
+
var schema65 = exports_external.object({ todoTaskListId: exports_external.string().min(1), todoTaskId: exports_external.string().min(1) });
|
|
25580
|
+
var { execute: execute65 } = buildCommand((p) => `/me/todo/lists/${p.todoTaskListId}/tasks/${p.todoTaskId}/linkedResources`, schema65);
|
|
25581
|
+
var meta67 = {
|
|
25582
|
+
summary: "List the linked resources (URLs, emails, files) attached to a Microsoft To Do task.",
|
|
25583
|
+
category: "tasks",
|
|
25584
|
+
graphMethod: "GET",
|
|
25585
|
+
graphPathTemplate: "/me/todo/lists/{todo-task-list-id}/tasks/{todo-task-id}/linkedResources",
|
|
25586
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/todotask-list-linkedresources",
|
|
25587
|
+
options: [
|
|
25588
|
+
{ name: "todo-task-list-id", key: "todoTaskListId", required: true, description: "To Do task list ID. Returned by `ask-marcel list-todo-task-lists`." },
|
|
25589
|
+
{ name: "todo-task-id", key: "todoTaskId", required: true, description: "To Do task ID. Returned by `ask-marcel list-todo-tasks`." }
|
|
25590
|
+
],
|
|
25591
|
+
example: "ask-marcel list-todo-linked-resources --todo-task-list-id 'AAMkAGI...' --todo-task-id 'AAMkABC...'",
|
|
25592
|
+
responseShape: "collection of Microsoft Graph `linkedResource` resources under `value[]`"
|
|
25593
|
+
};
|
|
24661
25594
|
|
|
24662
25595
|
// src/use-cases/commands/list-todo-task-lists.ts
|
|
24663
25596
|
var exports_list_todo_task_lists = {};
|
|
24664
25597
|
__export(exports_list_todo_task_lists, {
|
|
24665
|
-
schema: () =>
|
|
24666
|
-
|
|
25598
|
+
schema: () => schema66,
|
|
25599
|
+
meta: () => meta68,
|
|
25600
|
+
execute: () => execute66
|
|
24667
25601
|
});
|
|
24668
|
-
var
|
|
24669
|
-
var { execute:
|
|
25602
|
+
var schema66 = exports_external.object({}).strict();
|
|
25603
|
+
var { execute: execute66 } = buildCommand(() => "/me/todo/lists", schema66);
|
|
25604
|
+
var meta68 = {
|
|
25605
|
+
summary: "List the signed-in user’s Microsoft To Do task lists (e.g. `Tasks`, `Flagged Emails`, custom lists).",
|
|
25606
|
+
category: "tasks",
|
|
25607
|
+
graphMethod: "GET",
|
|
25608
|
+
graphPathTemplate: "/me/todo/lists",
|
|
25609
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/todo-list-lists",
|
|
25610
|
+
options: [],
|
|
25611
|
+
example: "ask-marcel list-todo-task-lists",
|
|
25612
|
+
responseShape: "collection of Microsoft Graph `todoTaskList` resources under `value[]`"
|
|
25613
|
+
};
|
|
24670
25614
|
|
|
24671
25615
|
// src/use-cases/commands/list-todo-tasks.ts
|
|
24672
25616
|
var exports_list_todo_tasks = {};
|
|
24673
25617
|
__export(exports_list_todo_tasks, {
|
|
24674
|
-
schema: () =>
|
|
24675
|
-
|
|
25618
|
+
schema: () => schema67,
|
|
25619
|
+
meta: () => meta69,
|
|
25620
|
+
execute: () => execute67
|
|
25621
|
+
});
|
|
25622
|
+
var schema67 = exports_external.object({ todoTaskListId: exports_external.string().min(1) });
|
|
25623
|
+
var { execute: execute67 } = buildCommand((p) => `/me/todo/lists/${p.todoTaskListId}/tasks`, schema67);
|
|
25624
|
+
var meta69 = {
|
|
25625
|
+
summary: "List every task in a single Microsoft To Do task list, regardless of completion status. Use `list-incomplete-todo-tasks` if you only want the open ones.",
|
|
25626
|
+
category: "tasks",
|
|
25627
|
+
graphMethod: "GET",
|
|
25628
|
+
graphPathTemplate: "/me/todo/lists/{todo-task-list-id}/tasks",
|
|
25629
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/todotasklist-list-tasks",
|
|
25630
|
+
options: [{ name: "todo-task-list-id", key: "todoTaskListId", required: true, description: "To Do task list ID. Returned by `ask-marcel list-todo-task-lists`." }],
|
|
25631
|
+
example: "ask-marcel list-todo-tasks --todo-task-list-id 'AAMkAGI...'",
|
|
25632
|
+
responseShape: "collection of Microsoft Graph `todoTask` resources under `value[]`"
|
|
25633
|
+
};
|
|
25634
|
+
|
|
25635
|
+
// src/use-cases/commands/next-page.ts
|
|
25636
|
+
var exports_next_page = {};
|
|
25637
|
+
__export(exports_next_page, {
|
|
25638
|
+
schema: () => schema68,
|
|
25639
|
+
meta: () => meta70,
|
|
25640
|
+
execute: () => execute68
|
|
24676
25641
|
});
|
|
24677
|
-
var
|
|
24678
|
-
var
|
|
25642
|
+
var PREFIX = "https://graph.microsoft.com/v1.0";
|
|
25643
|
+
var schema68 = exports_external.object({
|
|
25644
|
+
url: exports_external.string().min(1).refine((v) => v.startsWith(`${PREFIX}/`), { message: `must be a Microsoft Graph v1.0 URL starting with ${PREFIX}/` })
|
|
25645
|
+
});
|
|
25646
|
+
var { execute: execute68 } = buildCommand((p) => p.url.slice(PREFIX.length), schema68);
|
|
25647
|
+
var meta70 = {
|
|
25648
|
+
summary: "Fetch the next page of a paginated Graph response. Pass the `@odata.nextLink` value returned by any list / search / delta command to walk pagination yourself.",
|
|
25649
|
+
category: "meta",
|
|
25650
|
+
graphMethod: "GET",
|
|
25651
|
+
graphPathTemplate: "{url}",
|
|
25652
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/paging",
|
|
25653
|
+
options: [
|
|
25654
|
+
{
|
|
25655
|
+
name: "url",
|
|
25656
|
+
key: "url",
|
|
25657
|
+
required: true,
|
|
25658
|
+
description: "Full Graph v1.0 URL — copy the `@odata.nextLink` field from the previous response. " + "Example: `https://graph.microsoft.com/v1.0/me/messages?$skiptoken=AKDsfg...`. " + "Loop: keep calling until the response no longer contains `@odata.nextLink`. " + "Also handles `@odata.deltaLink` if you want to resume a delta query."
|
|
25659
|
+
}
|
|
25660
|
+
],
|
|
25661
|
+
example: "ask-marcel next-page --url 'https://graph.microsoft.com/v1.0/me/messages?$skip=10'",
|
|
25662
|
+
responseShape: 'same shape as the originating endpoint (typically `{ value: [...], "@odata.nextLink": "..." }`)'
|
|
25663
|
+
};
|
|
25664
|
+
|
|
25665
|
+
// src/use-cases/commands/search-mail-messages.ts
|
|
25666
|
+
var exports_search_mail_messages = {};
|
|
25667
|
+
__export(exports_search_mail_messages, {
|
|
25668
|
+
schema: () => schema69,
|
|
25669
|
+
meta: () => meta71,
|
|
25670
|
+
execute: () => execute69
|
|
25671
|
+
});
|
|
25672
|
+
var schema69 = exports_external.object({ query: exports_external.string().min(1) });
|
|
25673
|
+
var { execute: execute69 } = buildCommand((p) => `/me/messages?$search="${p.query}"`, schema69);
|
|
25674
|
+
var meta71 = {
|
|
25675
|
+
summary: "Search the signed-in user’s entire Outlook mailbox using KQL or free text. Results are ranked by Graph relevance.",
|
|
25676
|
+
category: "mail",
|
|
25677
|
+
graphMethod: "GET",
|
|
25678
|
+
graphPathTemplate: '/me/messages?$search="{query}"',
|
|
25679
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/user-list-messages",
|
|
25680
|
+
options: [
|
|
25681
|
+
{
|
|
25682
|
+
name: "query",
|
|
25683
|
+
key: "query",
|
|
25684
|
+
required: true,
|
|
25685
|
+
description: "KQL or free-text query. Searches subject, body, sender, and recipients. " + "Examples: `Q3 budget`, `from:alice@contoso.com`, `subject:invoice received>=2026-01-01`."
|
|
25686
|
+
}
|
|
25687
|
+
],
|
|
25688
|
+
example: "ask-marcel search-mail-messages --query 'from:alice subject:Q3'",
|
|
25689
|
+
responseShape: "collection of Microsoft Graph `message` resources under `value[]`, ranked by relevance"
|
|
25690
|
+
};
|
|
25691
|
+
|
|
25692
|
+
// src/use-cases/commands/search-my-documents.ts
|
|
25693
|
+
var exports_search_my_documents = {};
|
|
25694
|
+
__export(exports_search_my_documents, {
|
|
25695
|
+
schema: () => schema70,
|
|
25696
|
+
meta: () => meta72,
|
|
25697
|
+
execute: () => execute70
|
|
25698
|
+
});
|
|
25699
|
+
var schema70 = exports_external.object({ query: exports_external.string().min(1) });
|
|
25700
|
+
var { execute: execute70 } = buildCommand((p) => `/me/drive/search(q='${p.query}')`, schema70);
|
|
25701
|
+
var meta72 = {
|
|
25702
|
+
summary: "Search the signed-in user’s default OneDrive for documents matching a free-text query (filename, content, metadata).",
|
|
25703
|
+
category: "drive",
|
|
25704
|
+
graphMethod: "GET",
|
|
25705
|
+
graphPathTemplate: "/me/drive/search(q='{query}')",
|
|
25706
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitem-search",
|
|
25707
|
+
options: [
|
|
25708
|
+
{
|
|
25709
|
+
name: "query",
|
|
25710
|
+
key: "query",
|
|
25711
|
+
required: true,
|
|
25712
|
+
description: "Free-text search query. Matches filename, content, and metadata across the user’s personal OneDrive. " + "Use `search-onedrive-files --drive-id <id>` instead to target a specific shared SharePoint or OneDrive drive by ID."
|
|
25713
|
+
}
|
|
25714
|
+
],
|
|
25715
|
+
example: "ask-marcel search-my-documents --query 'q1 budget'",
|
|
25716
|
+
responseShape: "collection of Microsoft Graph `driveItem` resources under `value[]`"
|
|
25717
|
+
};
|
|
24679
25718
|
|
|
24680
25719
|
// src/use-cases/commands/search-onedrive-files.ts
|
|
24681
25720
|
var exports_search_onedrive_files = {};
|
|
24682
25721
|
__export(exports_search_onedrive_files, {
|
|
24683
|
-
schema: () =>
|
|
24684
|
-
|
|
25722
|
+
schema: () => schema71,
|
|
25723
|
+
meta: () => meta73,
|
|
25724
|
+
execute: () => execute71
|
|
24685
25725
|
});
|
|
24686
|
-
var
|
|
24687
|
-
var
|
|
24688
|
-
const parsed =
|
|
25726
|
+
var schema71 = exports_external.object({ driveId: exports_external.string().min(1), query: exports_external.string().min(1) });
|
|
25727
|
+
var execute71 = async (graph, params) => {
|
|
25728
|
+
const parsed = schema71.safeParse(params);
|
|
24689
25729
|
if (!parsed.success)
|
|
24690
25730
|
throw new Error(`validation failed: ${parsed.error.message}`);
|
|
24691
25731
|
return graph.get(`/drives/${parsed.data.driveId}/search(q='${parsed.data.query}')`);
|
|
24692
25732
|
};
|
|
25733
|
+
var meta73 = {
|
|
25734
|
+
summary: "Search a single OneDrive / SharePoint drive for files and folders matching a free-text query.",
|
|
25735
|
+
category: "drive",
|
|
25736
|
+
graphMethod: "GET",
|
|
25737
|
+
graphPathTemplate: "/drives/{drive-id}/search(q='{query}')",
|
|
25738
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/driveitem-search",
|
|
25739
|
+
options: [
|
|
25740
|
+
{ name: "drive-id", key: "driveId", required: true, description: "Microsoft Graph drive ID to search inside. Returned by `ask-marcel list-drives`." },
|
|
25741
|
+
{ name: "query", key: "query", required: true, description: "Free-text search query. Matches filename, content, and metadata." }
|
|
25742
|
+
],
|
|
25743
|
+
example: "ask-marcel search-onedrive-files --drive-id 'b!1234' --query 'q1 budget'",
|
|
25744
|
+
responseShape: "collection of Microsoft Graph `driveItem` resources under `value[]`"
|
|
25745
|
+
};
|
|
25746
|
+
|
|
25747
|
+
// src/use-cases/commands/search-onenote-pages.ts
|
|
25748
|
+
var exports_search_onenote_pages = {};
|
|
25749
|
+
__export(exports_search_onenote_pages, {
|
|
25750
|
+
schema: () => schema72,
|
|
25751
|
+
meta: () => meta74,
|
|
25752
|
+
execute: () => execute72
|
|
25753
|
+
});
|
|
25754
|
+
var schema72 = exports_external.object({ titleSubstring: exports_external.string().min(1) });
|
|
25755
|
+
var { execute: execute72 } = buildCommand((p) => `/me/onenote/pages?$filter=contains(title,'${p.titleSubstring}')`, schema72);
|
|
25756
|
+
var meta74 = {
|
|
25757
|
+
summary: "Find OneNote pages whose title contains a substring (case-sensitive — page content is NOT searched). Microsoft removed full-text OneNote `?search=` from v1.0 Graph; only $filter against `title` remains, which is what this command runs.",
|
|
25758
|
+
category: "notes",
|
|
25759
|
+
graphMethod: "GET",
|
|
25760
|
+
graphPathTemplate: "/me/onenote/pages?$filter=contains(title,'{title-substring}')",
|
|
25761
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/onenote-list-pages",
|
|
25762
|
+
options: [
|
|
25763
|
+
{
|
|
25764
|
+
name: "title-substring",
|
|
25765
|
+
key: "titleSubstring",
|
|
25766
|
+
required: true,
|
|
25767
|
+
description: "Substring to look for inside OneNote page titles (case-sensitive, exact substring). " + "This is title-only — full-text body search is not available on OneNote pages in v1.0 Graph. " + "Use `list-onenote-section-pages` if you already know the section."
|
|
25768
|
+
}
|
|
25769
|
+
],
|
|
25770
|
+
example: "ask-marcel search-onenote-pages --title-substring 'meeting notes'",
|
|
25771
|
+
responseShape: "collection of Microsoft Graph `onenotePage` resources under `value[]` whose title contains the substring"
|
|
25772
|
+
};
|
|
25773
|
+
|
|
25774
|
+
// src/use-cases/commands/search-sharepoint-sites-by-name.ts
|
|
25775
|
+
var exports_search_sharepoint_sites_by_name = {};
|
|
25776
|
+
__export(exports_search_sharepoint_sites_by_name, {
|
|
25777
|
+
schema: () => schema73,
|
|
25778
|
+
meta: () => meta75,
|
|
25779
|
+
execute: () => execute73
|
|
25780
|
+
});
|
|
25781
|
+
var schema73 = exports_external.object({ query: exports_external.string().min(1) });
|
|
25782
|
+
var { execute: execute73 } = buildCommand((p) => `/sites?search=${p.query}`, schema73);
|
|
25783
|
+
var meta75 = {
|
|
25784
|
+
summary: "Search the tenant for SharePoint sites whose display name or description matches a free-text query (returns up to 25).",
|
|
25785
|
+
category: "sharepoint",
|
|
25786
|
+
graphMethod: "GET",
|
|
25787
|
+
graphPathTemplate: "/sites?search={query}",
|
|
25788
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/site-search",
|
|
25789
|
+
options: [
|
|
25790
|
+
{
|
|
25791
|
+
name: "query",
|
|
25792
|
+
key: "query",
|
|
25793
|
+
required: true,
|
|
25794
|
+
description: "Free-text query. Matches site display name and description across the tenant. " + "Use `search-sharepoint-sites` (no query) to instead list the sites the signed-in user follows."
|
|
25795
|
+
}
|
|
25796
|
+
],
|
|
25797
|
+
example: "ask-marcel search-sharepoint-sites-by-name --query 'marketing'",
|
|
25798
|
+
responseShape: "collection of Microsoft Graph `site` resources under `value[]` (up to 25)"
|
|
25799
|
+
};
|
|
24693
25800
|
|
|
24694
25801
|
// src/use-cases/commands/search-sharepoint-sites.ts
|
|
24695
25802
|
var exports_search_sharepoint_sites = {};
|
|
24696
25803
|
__export(exports_search_sharepoint_sites, {
|
|
24697
|
-
schema: () =>
|
|
24698
|
-
|
|
25804
|
+
schema: () => schema74,
|
|
25805
|
+
meta: () => meta76,
|
|
25806
|
+
execute: () => execute74
|
|
24699
25807
|
});
|
|
24700
|
-
var
|
|
24701
|
-
var { execute:
|
|
25808
|
+
var schema74 = exports_external.object({}).strict();
|
|
25809
|
+
var { execute: execute74 } = buildCommand(() => "/sites", schema74);
|
|
25810
|
+
var meta76 = {
|
|
25811
|
+
summary: "List the SharePoint sites the signed-in user has access to (returns the followed sites by default).",
|
|
25812
|
+
category: "sharepoint",
|
|
25813
|
+
graphMethod: "GET",
|
|
25814
|
+
graphPathTemplate: "/sites",
|
|
25815
|
+
graphDocsUrl: "https://learn.microsoft.com/en-us/graph/api/site-search",
|
|
25816
|
+
options: [],
|
|
25817
|
+
example: "ask-marcel search-sharepoint-sites",
|
|
25818
|
+
responseShape: "collection of Microsoft Graph `site` resources under `value[]`"
|
|
25819
|
+
};
|
|
24702
25820
|
|
|
24703
25821
|
// src/use-cases/commands/index.ts
|
|
24704
25822
|
var commands = {
|
|
@@ -24709,7 +25827,9 @@ var commands = {
|
|
|
24709
25827
|
"get-drive-item": exports_get_drive_item,
|
|
24710
25828
|
"list-drive-item-permissions": exports_list_drive_item_permissions,
|
|
24711
25829
|
"list-drive-item-versions": exports_list_drive_item_versions,
|
|
25830
|
+
"download-drive-item-version-content": exports_download_drive_item_version_content,
|
|
24712
25831
|
"search-onedrive-files": exports_search_onedrive_files,
|
|
25832
|
+
"search-my-documents": exports_search_my_documents,
|
|
24713
25833
|
"get-excel-range": exports_get_excel_range,
|
|
24714
25834
|
"list-excel-worksheets": exports_list_excel_worksheets,
|
|
24715
25835
|
"list-excel-tables": exports_list_excel_tables,
|
|
@@ -24717,22 +25837,23 @@ var commands = {
|
|
|
24717
25837
|
"list-excel-table-rows": exports_list_excel_table_rows,
|
|
24718
25838
|
"get-drive-delta": exports_get_drive_delta,
|
|
24719
25839
|
"search-sharepoint-sites": exports_search_sharepoint_sites,
|
|
25840
|
+
"search-sharepoint-sites-by-name": exports_search_sharepoint_sites_by_name,
|
|
24720
25841
|
"get-sharepoint-site": exports_get_sharepoint_site,
|
|
24721
25842
|
"list-sharepoint-site-drives": exports_list_sharepoint_site_drives,
|
|
24722
25843
|
"get-sharepoint-site-drive-by-id": exports_get_sharepoint_site_drive_by_id,
|
|
24723
|
-
"list-sharepoint-site-items": exports_list_sharepoint_site_items,
|
|
24724
|
-
"get-sharepoint-site-item": exports_get_sharepoint_site_item,
|
|
24725
25844
|
"list-sharepoint-site-lists": exports_list_sharepoint_site_lists,
|
|
24726
25845
|
"get-sharepoint-site-list": exports_get_sharepoint_site_list,
|
|
24727
25846
|
"list-sharepoint-site-list-items": exports_list_sharepoint_site_list_items,
|
|
24728
25847
|
"get-sharepoint-site-list-item": exports_get_sharepoint_site_list_item,
|
|
24729
25848
|
"get-sharepoint-site-by-path": exports_get_sharepoint_site_by_path,
|
|
24730
|
-
"get-sharepoint-sites-delta": exports_get_sharepoint_sites_delta,
|
|
24731
25849
|
"list-todo-task-lists": exports_list_todo_task_lists,
|
|
24732
25850
|
"list-todo-tasks": exports_list_todo_tasks,
|
|
25851
|
+
"list-incomplete-todo-tasks": exports_list_incomplete_todo_tasks,
|
|
24733
25852
|
"get-todo-task": exports_get_todo_task,
|
|
24734
25853
|
"list-todo-linked-resources": exports_list_todo_linked_resources,
|
|
25854
|
+
"list-planner-plans": exports_list_planner_plans,
|
|
24735
25855
|
"list-planner-tasks": exports_list_planner_tasks,
|
|
25856
|
+
"list-incomplete-planner-tasks": exports_list_incomplete_planner_tasks,
|
|
24736
25857
|
"get-planner-plan": exports_get_planner_plan,
|
|
24737
25858
|
"list-plan-tasks": exports_list_plan_tasks,
|
|
24738
25859
|
"get-planner-task": exports_get_planner_task,
|
|
@@ -24748,11 +25869,13 @@ var commands = {
|
|
|
24748
25869
|
"get-mail-attachment": exports_get_mail_attachment,
|
|
24749
25870
|
"list-mail-rules": exports_list_mail_rules,
|
|
24750
25871
|
"get-mailbox-settings": exports_get_mailbox_settings,
|
|
25872
|
+
"search-mail-messages": exports_search_mail_messages,
|
|
24751
25873
|
"list-onenote-notebooks": exports_list_onenote_notebooks,
|
|
24752
25874
|
"list-onenote-notebook-sections": exports_list_onenote_notebook_sections,
|
|
24753
25875
|
"list-all-onenote-sections": exports_list_all_onenote_sections,
|
|
24754
25876
|
"list-onenote-section-pages": exports_list_onenote_section_pages,
|
|
24755
25877
|
"get-onenote-page-content": exports_get_onenote_page_content,
|
|
25878
|
+
"search-onenote-pages": exports_search_onenote_pages,
|
|
24756
25879
|
"get-current-user": exports_get_current_user,
|
|
24757
25880
|
"get-my-profile-photo": exports_get_my_profile_photo,
|
|
24758
25881
|
"list-calendar-events": exports_list_calendar_events,
|
|
@@ -24765,43 +25888,35 @@ var commands = {
|
|
|
24765
25888
|
"list-calendars": exports_list_calendars,
|
|
24766
25889
|
"list-calendar-events-delta": exports_list_calendar_events_delta,
|
|
24767
25890
|
"list-calendar-view-delta": exports_list_calendar_view_delta,
|
|
24768
|
-
"list-outlook-contacts": exports_list_outlook_contacts,
|
|
24769
|
-
"get-outlook-contact": exports_get_outlook_contact,
|
|
24770
|
-
"list-chats": exports_list_chats,
|
|
24771
|
-
"get-chat": exports_get_chat,
|
|
24772
25891
|
"list-chat-members": exports_list_chat_members,
|
|
24773
|
-
"list-chat-messages": exports_list_chat_messages,
|
|
24774
|
-
"get-chat-message": exports_get_chat_message,
|
|
24775
|
-
"list-chat-message-hosted-contents": exports_list_chat_message_hosted_contents,
|
|
24776
|
-
"get-chat-message-hosted-content": exports_get_chat_message_hosted_content,
|
|
24777
|
-
"list-chat-message-replies": exports_list_chat_message_replies,
|
|
24778
|
-
"list-pinned-chat-messages": exports_list_pinned_chat_messages,
|
|
24779
25892
|
"list-joined-teams": exports_list_joined_teams,
|
|
24780
25893
|
"get-team": exports_get_team,
|
|
24781
25894
|
"list-team-channels": exports_list_team_channels,
|
|
24782
25895
|
"get-team-channel": exports_get_team_channel,
|
|
24783
|
-
"
|
|
24784
|
-
"get-channel-message": exports_get_channel_message,
|
|
24785
|
-
"list-channel-message-hosted-contents": exports_list_channel_message_hosted_contents,
|
|
24786
|
-
"get-channel-message-hosted-content": exports_get_channel_message_hosted_content,
|
|
24787
|
-
"list-channel-message-replies": exports_list_channel_message_replies,
|
|
24788
|
-
"list-channel-tabs": exports_list_channel_tabs,
|
|
24789
|
-
"list-team-members": exports_list_team_members,
|
|
24790
|
-
"get-channel-files-folder": exports_get_channel_files_folder
|
|
25896
|
+
"next-page": exports_next_page
|
|
24791
25897
|
};
|
|
24792
25898
|
// src/composition/build-deps.ts
|
|
24793
25899
|
import { join as join2 } from "node:path";
|
|
24794
25900
|
var defaultCachePath = (home) => join2(home, ".ask-marcel", "token-cache.json");
|
|
24795
25901
|
var defaultFileSystem3 = () => typeof globalThis.Bun !== "undefined" ? createBunFileSystem() : createNodeFileSystem();
|
|
25902
|
+
var defaultProcessRunner = () => typeof globalThis.Bun !== "undefined" ? createBunProcessRunner() : createNodeProcessRunner();
|
|
24796
25903
|
var buildDeps = (config2 = {}) => {
|
|
24797
25904
|
const home = config2.home ?? process.env.HOME ?? process.env.USERPROFILE ?? "";
|
|
24798
25905
|
const cachePath = config2.cachePath ?? defaultCachePath(home);
|
|
24799
|
-
const logLevel = config2.logLevel ?? process.env.
|
|
25906
|
+
const logLevel = config2.logLevel ?? process.env.ASKMARCEL_LOG_LEVEL ?? "error";
|
|
24800
25907
|
const fs = config2.fs ?? defaultFileSystem3();
|
|
25908
|
+
const processRunner = config2.processRunner ?? defaultProcessRunner();
|
|
24801
25909
|
const logger = createWinstonLogger({ logLevel });
|
|
24802
25910
|
const auth = createAuthManager({ cachePath, logger, fs });
|
|
24803
25911
|
const graph = createGraphClient(auth);
|
|
24804
|
-
return { logger, auth, graph };
|
|
25912
|
+
return { logger, auth, graph, processRunner };
|
|
25913
|
+
};
|
|
25914
|
+
// src/composition/package-manager.ts
|
|
25915
|
+
var detectPackageManager = (binPath) => {
|
|
25916
|
+
const normalised = binPath.replaceAll("\\", "/");
|
|
25917
|
+
if (normalised.includes("/.bun/") || normalised.endsWith("/.bun"))
|
|
25918
|
+
return "bun";
|
|
25919
|
+
return "npm";
|
|
24805
25920
|
};
|
|
24806
25921
|
export {
|
|
24807
25922
|
ok,
|
|
@@ -24810,10 +25925,13 @@ export {
|
|
|
24810
25925
|
err,
|
|
24811
25926
|
envVarUnsafe,
|
|
24812
25927
|
envVar,
|
|
25928
|
+
detectPackageManager,
|
|
24813
25929
|
decodeJwtPayload,
|
|
24814
25930
|
createWinstonLogger,
|
|
25931
|
+
createNodeProcessRunner,
|
|
24815
25932
|
createNodeFileSystem,
|
|
24816
25933
|
createGraphClient,
|
|
25934
|
+
createBunProcessRunner,
|
|
24817
25935
|
createBunFileSystem,
|
|
24818
25936
|
createAuthManager,
|
|
24819
25937
|
commands,
|