ask-marcel-office-cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +267 -0
- package/dist/cli.js +27084 -0
- package/dist/composition/build-deps.d.ts +15 -0
- package/dist/composition/cli.d.ts +11 -0
- package/dist/composition/env.d.ts +2 -0
- package/dist/domain/access-token.d.ts +13 -0
- package/dist/domain/env-var.d.ts +10 -0
- package/dist/domain/jwt-utils.d.ts +3 -0
- package/dist/domain/result.d.ts +19 -0
- package/dist/domain/utilities/format-error.d.ts +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +24823 -0
- package/dist/infra/auth.d.ts +23 -0
- package/dist/infra/browser-auth.d.ts +59 -0
- package/dist/infra/filesystem-bun.d.ts +2 -0
- package/dist/infra/filesystem-node.d.ts +2 -0
- package/dist/infra/graph-client.d.ts +20 -0
- package/dist/infra/logger.d.ts +5 -0
- package/dist/main.d.ts +1 -0
- package/dist/presenter/output.d.ts +4 -0
- package/dist/use-cases/commands/build-command.d.ts +4 -0
- package/dist/use-cases/commands/command-types.d.ts +10 -0
- package/dist/use-cases/commands/download-onedrive-file-content.d.ts +9 -0
- package/dist/use-cases/commands/get-calendar-event.d.ts +6 -0
- package/dist/use-cases/commands/get-calendar-view.d.ts +4 -0
- package/dist/use-cases/commands/get-channel-files-folder.d.ts +7 -0
- package/dist/use-cases/commands/get-channel-message-hosted-content.d.ts +9 -0
- package/dist/use-cases/commands/get-channel-message.d.ts +8 -0
- package/dist/use-cases/commands/get-chat-message-hosted-content.d.ts +8 -0
- package/dist/use-cases/commands/get-chat-message.d.ts +7 -0
- package/dist/use-cases/commands/get-chat.d.ts +6 -0
- package/dist/use-cases/commands/get-current-user.d.ts +4 -0
- package/dist/use-cases/commands/get-drive-delta.d.ts +7 -0
- package/dist/use-cases/commands/get-drive-item.d.ts +7 -0
- package/dist/use-cases/commands/get-drive-root-item.d.ts +6 -0
- package/dist/use-cases/commands/get-excel-range.d.ts +9 -0
- package/dist/use-cases/commands/get-excel-table.d.ts +8 -0
- package/dist/use-cases/commands/get-mail-attachment.d.ts +7 -0
- package/dist/use-cases/commands/get-mail-message.d.ts +6 -0
- package/dist/use-cases/commands/get-mailbox-settings.d.ts +4 -0
- package/dist/use-cases/commands/get-my-profile-photo.d.ts +4 -0
- package/dist/use-cases/commands/get-onenote-page-content.d.ts +6 -0
- package/dist/use-cases/commands/get-outlook-contact.d.ts +6 -0
- package/dist/use-cases/commands/get-planner-bucket.d.ts +6 -0
- package/dist/use-cases/commands/get-planner-plan.d.ts +6 -0
- package/dist/use-cases/commands/get-planner-task-details.d.ts +6 -0
- package/dist/use-cases/commands/get-planner-task.d.ts +6 -0
- package/dist/use-cases/commands/get-sharepoint-site-by-path.d.ts +7 -0
- package/dist/use-cases/commands/get-sharepoint-site-drive-by-id.d.ts +7 -0
- package/dist/use-cases/commands/get-sharepoint-site-item.d.ts +7 -0
- package/dist/use-cases/commands/get-sharepoint-site-list-item.d.ts +8 -0
- package/dist/use-cases/commands/get-sharepoint-site-list.d.ts +7 -0
- package/dist/use-cases/commands/get-sharepoint-site.d.ts +6 -0
- package/dist/use-cases/commands/get-sharepoint-sites-delta.d.ts +4 -0
- package/dist/use-cases/commands/get-specific-calendar-event.d.ts +7 -0
- package/dist/use-cases/commands/get-specific-calendar-view.d.ts +6 -0
- package/dist/use-cases/commands/get-team-channel.d.ts +7 -0
- package/dist/use-cases/commands/get-team.d.ts +6 -0
- package/dist/use-cases/commands/get-todo-task.d.ts +7 -0
- package/dist/use-cases/commands/index.d.ts +3 -0
- package/dist/use-cases/commands/list-all-onenote-sections.d.ts +4 -0
- package/dist/use-cases/commands/list-calendar-event-instances.d.ts +7 -0
- package/dist/use-cases/commands/list-calendar-events-delta.d.ts +4 -0
- package/dist/use-cases/commands/list-calendar-events.d.ts +4 -0
- package/dist/use-cases/commands/list-calendar-view-delta.d.ts +4 -0
- package/dist/use-cases/commands/list-calendars.d.ts +4 -0
- package/dist/use-cases/commands/list-channel-message-hosted-contents.d.ts +8 -0
- package/dist/use-cases/commands/list-channel-message-replies.d.ts +8 -0
- package/dist/use-cases/commands/list-channel-messages.d.ts +7 -0
- package/dist/use-cases/commands/list-channel-tabs.d.ts +7 -0
- package/dist/use-cases/commands/list-chat-members.d.ts +6 -0
- package/dist/use-cases/commands/list-chat-message-hosted-contents.d.ts +7 -0
- package/dist/use-cases/commands/list-chat-message-replies.d.ts +7 -0
- package/dist/use-cases/commands/list-chat-messages.d.ts +6 -0
- package/dist/use-cases/commands/list-chats.d.ts +4 -0
- package/dist/use-cases/commands/list-drive-item-permissions.d.ts +7 -0
- package/dist/use-cases/commands/list-drive-item-versions.d.ts +7 -0
- package/dist/use-cases/commands/list-drives.d.ts +4 -0
- package/dist/use-cases/commands/list-excel-table-rows.d.ts +8 -0
- package/dist/use-cases/commands/list-excel-tables.d.ts +7 -0
- package/dist/use-cases/commands/list-excel-worksheets.d.ts +7 -0
- package/dist/use-cases/commands/list-folder-files.d.ts +7 -0
- package/dist/use-cases/commands/list-joined-teams.d.ts +4 -0
- package/dist/use-cases/commands/list-mail-attachments.d.ts +6 -0
- package/dist/use-cases/commands/list-mail-child-folders.d.ts +6 -0
- package/dist/use-cases/commands/list-mail-folder-messages.d.ts +6 -0
- package/dist/use-cases/commands/list-mail-folders.d.ts +4 -0
- package/dist/use-cases/commands/list-mail-messages.d.ts +4 -0
- package/dist/use-cases/commands/list-mail-rules.d.ts +6 -0
- package/dist/use-cases/commands/list-onenote-notebook-sections.d.ts +6 -0
- package/dist/use-cases/commands/list-onenote-notebooks.d.ts +4 -0
- package/dist/use-cases/commands/list-onenote-section-pages.d.ts +6 -0
- package/dist/use-cases/commands/list-outlook-contacts.d.ts +4 -0
- package/dist/use-cases/commands/list-pinned-chat-messages.d.ts +6 -0
- package/dist/use-cases/commands/list-plan-buckets.d.ts +6 -0
- package/dist/use-cases/commands/list-plan-tasks.d.ts +6 -0
- package/dist/use-cases/commands/list-planner-tasks.d.ts +4 -0
- package/dist/use-cases/commands/list-sharepoint-site-drives.d.ts +6 -0
- package/dist/use-cases/commands/list-sharepoint-site-items.d.ts +6 -0
- package/dist/use-cases/commands/list-sharepoint-site-list-items.d.ts +7 -0
- package/dist/use-cases/commands/list-sharepoint-site-lists.d.ts +6 -0
- package/dist/use-cases/commands/list-specific-calendar-events.d.ts +6 -0
- package/dist/use-cases/commands/list-team-channels.d.ts +6 -0
- package/dist/use-cases/commands/list-team-members.d.ts +6 -0
- package/dist/use-cases/commands/list-todo-linked-resources.d.ts +7 -0
- package/dist/use-cases/commands/list-todo-task-lists.d.ts +4 -0
- package/dist/use-cases/commands/list-todo-tasks.d.ts +6 -0
- package/dist/use-cases/commands/login.d.ts +6 -0
- package/dist/use-cases/commands/logout.d.ts +6 -0
- package/dist/use-cases/commands/search-onedrive-files.d.ts +9 -0
- package/dist/use-cases/commands/search-sharepoint-sites.d.ts +4 -0
- package/dist/use-cases/ports/filesystem.d.ts +15 -0
- package/dist/use-cases/ports/logger.d.ts +6 -0
- package/package.json +87 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Result } from '../../domain/result.js';
|
|
3
|
+
import type { AuthManager } from '../../infra/auth.js';
|
|
4
|
+
declare const schema: z.ZodObject<{}, z.core.$strict>;
|
|
5
|
+
declare const execute: (auth: AuthManager) => Promise<Result<string, import("../../infra/auth.js").AuthError>>;
|
|
6
|
+
export { execute, schema };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Result } from '../../domain/result.js';
|
|
3
|
+
import type { AuthManager } from '../../infra/auth.js';
|
|
4
|
+
declare const schema: z.ZodObject<{}, z.core.$strict>;
|
|
5
|
+
declare const execute: (auth: AuthManager) => Promise<Result<void, import("../../infra/auth.js").AuthError>>;
|
|
6
|
+
export { execute, schema };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Result } from '../../domain/result.js';
|
|
3
|
+
import type { GraphClient } from '../../infra/graph-client.js';
|
|
4
|
+
declare const schema: z.ZodObject<{
|
|
5
|
+
driveId: z.ZodString;
|
|
6
|
+
query: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
declare const execute: (graph: GraphClient, params: Record<string, string>) => Promise<Result<unknown, import("../../infra/graph-client.js").GraphError>>;
|
|
9
|
+
export { execute, schema };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Result } from '../../domain/result.js';
|
|
2
|
+
export type FileSystemError = {
|
|
3
|
+
type: 'not_found';
|
|
4
|
+
} | {
|
|
5
|
+
type: 'parse_failed';
|
|
6
|
+
message: string;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'io_failed';
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
export type FileSystem = {
|
|
12
|
+
readonly readJson: <T>(path: string) => Promise<Result<T, FileSystemError>>;
|
|
13
|
+
readonly writeText: (path: string, content: string) => Promise<Result<void, FileSystemError>>;
|
|
14
|
+
readonly deleteIfExists: (path: string) => Promise<Result<void, FileSystemError>>;
|
|
15
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ask-marcel-office-cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Microsoft Graph CLI + library — typed Bun/TypeScript wrapper around 100+ Graph API operations with browser-fallback OAuth.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Vincent Delacourt <vincent.delacourt@adama-development.com>",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/vdelacou/ask-marcel-office-cli.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/vdelacou/ask-marcel-office-cli/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/vdelacou/ask-marcel-office-cli#readme",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"module": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"ask-marcel": "./dist/cli.js"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist/",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=20",
|
|
36
|
+
"bun": ">=1.0"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"microsoft-graph",
|
|
43
|
+
"office-365",
|
|
44
|
+
"cli",
|
|
45
|
+
"bun",
|
|
46
|
+
"typescript",
|
|
47
|
+
"graph-api",
|
|
48
|
+
"outlook",
|
|
49
|
+
"teams",
|
|
50
|
+
"onedrive",
|
|
51
|
+
"sharepoint"
|
|
52
|
+
],
|
|
53
|
+
"scripts": {
|
|
54
|
+
"start": "bun run src/main.ts",
|
|
55
|
+
"lint": "eslint --cache",
|
|
56
|
+
"lint:strict": "LINT_STRICT=1 eslint",
|
|
57
|
+
"typecheck": "tsc --noEmit",
|
|
58
|
+
"coverage": "bun run scripts/check-coverage.ts",
|
|
59
|
+
"mutate": "stryker run",
|
|
60
|
+
"mutate:changed": "bash scripts/mutate-changed.sh",
|
|
61
|
+
"mutate:staged": "bash scripts/mutate-staged.sh",
|
|
62
|
+
"build:js": "bun build src/main.ts --target=node --outfile=dist/cli.js --format=esm --external playwright --external update-notifier && bun build src/index.ts --target=node --outfile=dist/index.js --format=esm --external playwright --external update-notifier",
|
|
63
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
64
|
+
"build": "rm -rf dist && bun run build:js && bun run build:types && bun run scripts/fix-dts-extensions.ts && bun run scripts/add-shebang.ts",
|
|
65
|
+
"prepublishOnly": "bun run build && bun test && bun run lint:strict && bun run typecheck && bun run coverage"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@eslint/js": "^9.28.0",
|
|
69
|
+
"@stryker-mutator/core": "^9.6.1",
|
|
70
|
+
"@types/bun": "^1.2.0",
|
|
71
|
+
"@types/update-notifier": "^6.0.8",
|
|
72
|
+
"eslint": "^9.28.0",
|
|
73
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
74
|
+
"eslint-plugin-security": "^3.0.1",
|
|
75
|
+
"eslint-plugin-sonarjs": "^4.0.3",
|
|
76
|
+
"eslint-plugin-unicorn": "^59.0.1",
|
|
77
|
+
"typescript": "^5.0.0",
|
|
78
|
+
"typescript-eslint": "^8.33.1"
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"commander": "^14.0.3",
|
|
82
|
+
"playwright": "^1.59.1",
|
|
83
|
+
"update-notifier": "^7.3.1",
|
|
84
|
+
"winston": "^3.19.0",
|
|
85
|
+
"zod": "^4.3.6"
|
|
86
|
+
}
|
|
87
|
+
}
|