@jbctechsolutions/mcp-office365 2.5.1 → 4.0.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/README.md +66 -57
- package/dist/approval/hash.d.ts +8 -8
- package/dist/approval/token-manager.d.ts +37 -19
- package/dist/approval/token-manager.d.ts.map +1 -1
- package/dist/approval/token-manager.js +133 -37
- package/dist/approval/token-manager.js.map +1 -1
- package/dist/approval/types.d.ts +7 -3
- package/dist/approval/types.d.ts.map +1 -1
- package/dist/cli.d.ts +21 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +100 -2
- package/dist/cli.js.map +1 -1
- package/dist/database/repository.d.ts +48 -48
- package/dist/database/repository.d.ts.map +1 -1
- package/dist/database/repository.js.map +1 -1
- package/dist/delta/mirror.d.ts +67 -0
- package/dist/delta/mirror.d.ts.map +1 -0
- package/dist/delta/mirror.js +183 -0
- package/dist/delta/mirror.js.map +1 -0
- package/dist/graph/auth/account-id.d.ts +19 -0
- package/dist/graph/auth/account-id.d.ts.map +1 -0
- package/dist/graph/auth/account-id.js +55 -0
- package/dist/graph/auth/account-id.js.map +1 -0
- package/dist/graph/auth/config.d.ts +1 -1
- package/dist/graph/auth/config.d.ts.map +1 -1
- package/dist/graph/auth/config.js +13 -1
- package/dist/graph/auth/config.js.map +1 -1
- package/dist/graph/auth/device-code-flow.d.ts +3 -1
- package/dist/graph/auth/device-code-flow.d.ts.map +1 -1
- package/dist/graph/auth/device-code-flow.js +42 -14
- package/dist/graph/auth/device-code-flow.js.map +1 -1
- package/dist/graph/auth/index.d.ts +1 -0
- package/dist/graph/auth/index.d.ts.map +1 -1
- package/dist/graph/auth/index.js +1 -0
- package/dist/graph/auth/index.js.map +1 -1
- package/dist/graph/auth/token-cache.js +2 -2
- package/dist/graph/auth/token-cache.js.map +1 -1
- package/dist/graph/client/graph-client.d.ts +141 -8
- package/dist/graph/client/graph-client.d.ts.map +1 -1
- package/dist/graph/client/graph-client.js +536 -48
- package/dist/graph/client/graph-client.js.map +1 -1
- package/dist/graph/client/immutable-id-middleware.d.ts +50 -0
- package/dist/graph/client/immutable-id-middleware.d.ts.map +1 -0
- package/dist/graph/client/immutable-id-middleware.js +137 -0
- package/dist/graph/client/immutable-id-middleware.js.map +1 -0
- package/dist/graph/content-readers.d.ts +0 -12
- package/dist/graph/content-readers.d.ts.map +1 -1
- package/dist/graph/content-readers.js +0 -21
- package/dist/graph/content-readers.js.map +1 -1
- package/dist/graph/index.d.ts +5 -6
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/index.js +5 -6
- package/dist/graph/index.js.map +1 -1
- package/dist/graph/mailbox-adapter.d.ts +15 -15
- package/dist/graph/mappers/contact-mapper.d.ts +4 -1
- package/dist/graph/mappers/contact-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/contact-mapper.js +7 -3
- package/dist/graph/mappers/contact-mapper.js.map +1 -1
- package/dist/graph/mappers/email-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/email-mapper.js +7 -4
- package/dist/graph/mappers/email-mapper.js.map +1 -1
- package/dist/graph/mappers/event-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/event-mapper.js +6 -3
- package/dist/graph/mappers/event-mapper.js.map +1 -1
- package/dist/graph/mappers/folder-mapper.d.ts +0 -4
- package/dist/graph/mappers/folder-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/folder-mapper.js +9 -19
- package/dist/graph/mappers/folder-mapper.js.map +1 -1
- package/dist/graph/mappers/index.d.ts +2 -2
- package/dist/graph/mappers/index.d.ts.map +1 -1
- package/dist/graph/mappers/index.js +2 -2
- package/dist/graph/mappers/index.js.map +1 -1
- package/dist/graph/mappers/task-mapper.d.ts +4 -2
- package/dist/graph/mappers/task-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/task-mapper.js +7 -5
- package/dist/graph/mappers/task-mapper.js.map +1 -1
- package/dist/graph/mappers/utils.d.ts +0 -10
- package/dist/graph/mappers/utils.d.ts.map +1 -1
- package/dist/graph/mappers/utils.js +0 -19
- package/dist/graph/mappers/utils.js.map +1 -1
- package/dist/graph/repository.d.ts +409 -276
- package/dist/graph/repository.d.ts.map +1 -1
- package/dist/graph/repository.js +772 -1082
- package/dist/graph/repository.js.map +1 -1
- package/dist/ids/mint.d.ts +31 -0
- package/dist/ids/mint.d.ts.map +1 -0
- package/dist/ids/mint.js +36 -0
- package/dist/ids/mint.js.map +1 -0
- package/dist/ids/next-action.d.ts +29 -0
- package/dist/ids/next-action.d.ts.map +1 -0
- package/dist/ids/next-action.js +58 -0
- package/dist/ids/next-action.js.map +1 -0
- package/dist/ids/resolver.d.ts +31 -0
- package/dist/ids/resolver.d.ts.map +1 -0
- package/dist/ids/resolver.js +52 -0
- package/dist/ids/resolver.js.map +1 -0
- package/dist/ids/schema.d.ts +91 -0
- package/dist/ids/schema.d.ts.map +1 -0
- package/dist/ids/schema.js +131 -0
- package/dist/ids/schema.js.map +1 -0
- package/dist/ids/token.d.ts +62 -0
- package/dist/ids/token.d.ts.map +1 -0
- package/dist/ids/token.js +225 -0
- package/dist/ids/token.js.map +1 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +255 -5925
- package/dist/index.js.map +1 -1
- package/dist/parsers/index.d.ts +0 -1
- package/dist/parsers/index.d.ts.map +1 -1
- package/dist/parsers/index.js +0 -1
- package/dist/parsers/index.js.map +1 -1
- package/dist/registry/all-tools.d.ts +14 -0
- package/dist/registry/all-tools.d.ts.map +1 -0
- package/dist/registry/all-tools.js +68 -0
- package/dist/registry/all-tools.js.map +1 -0
- package/dist/registry/context.d.ts +19 -0
- package/dist/registry/context.d.ts.map +1 -0
- package/dist/registry/context.js +20 -0
- package/dist/registry/context.js.map +1 -0
- package/dist/registry/define-tool.d.ts +15 -0
- package/dist/registry/define-tool.d.ts.map +1 -0
- package/dist/registry/define-tool.js +8 -0
- package/dist/registry/define-tool.js.map +1 -0
- package/dist/registry/elicit-links.d.ts +35 -0
- package/dist/registry/elicit-links.d.ts.map +1 -0
- package/dist/registry/elicit-links.js +102 -0
- package/dist/registry/elicit-links.js.map +1 -0
- package/dist/registry/elicitor.d.ts +24 -0
- package/dist/registry/elicitor.d.ts.map +1 -0
- package/dist/registry/elicitor.js +51 -0
- package/dist/registry/elicitor.js.map +1 -0
- package/dist/registry/index.d.ts +13 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +8 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/registry.d.ts +73 -0
- package/dist/registry/registry.d.ts.map +1 -0
- package/dist/registry/registry.js +221 -0
- package/dist/registry/registry.js.map +1 -0
- package/dist/registry/types.d.ts +146 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +6 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/search/compiler.d.ts +49 -0
- package/dist/search/compiler.d.ts.map +1 -0
- package/dist/search/compiler.js +168 -0
- package/dist/search/compiler.js.map +1 -0
- package/dist/signature.js +2 -2
- package/dist/signature.js.map +1 -1
- package/dist/state/delta-store.d.ts +85 -0
- package/dist/state/delta-store.d.ts.map +1 -0
- package/dist/state/delta-store.js +124 -0
- package/dist/state/delta-store.js.map +1 -0
- package/dist/state/migrate.d.ts +23 -0
- package/dist/state/migrate.d.ts.map +1 -0
- package/dist/state/migrate.js +81 -0
- package/dist/state/migrate.js.map +1 -0
- package/dist/state/schema.d.ts +26 -0
- package/dist/state/schema.d.ts.map +1 -0
- package/dist/state/schema.js +77 -0
- package/dist/state/schema.js.map +1 -0
- package/dist/state/store.d.ts +155 -0
- package/dist/state/store.d.ts.map +1 -0
- package/dist/state/store.js +321 -0
- package/dist/state/store.js.map +1 -0
- package/dist/tools/calendar-graph.d.ts +41 -0
- package/dist/tools/calendar-graph.d.ts.map +1 -0
- package/dist/tools/calendar-graph.js +299 -0
- package/dist/tools/calendar-graph.js.map +1 -0
- package/dist/tools/calendar-permissions.d.ts +17 -7
- package/dist/tools/calendar-permissions.d.ts.map +1 -1
- package/dist/tools/calendar-permissions.js +60 -4
- package/dist/tools/calendar-permissions.js.map +1 -1
- package/dist/tools/calendar.d.ts +133 -82
- package/dist/tools/calendar.d.ts.map +1 -1
- package/dist/tools/calendar.js +249 -136
- package/dist/tools/calendar.js.map +1 -1
- package/dist/tools/categories.d.ts +14 -4
- package/dist/tools/categories.d.ts.map +1 -1
- package/dist/tools/categories.js +59 -2
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/checklist-items.d.ts +19 -9
- package/dist/tools/checklist-items.d.ts.map +1 -1
- package/dist/tools/checklist-items.js +71 -5
- package/dist/tools/checklist-items.js.map +1 -1
- package/dist/tools/contact-folders.d.ts +50 -0
- package/dist/tools/contact-folders.d.ts.map +1 -0
- package/dist/tools/contact-folders.js +136 -0
- package/dist/tools/contact-folders.js.map +1 -0
- package/dist/tools/contacts-graph.d.ts +45 -0
- package/dist/tools/contacts-graph.d.ts.map +1 -0
- package/dist/tools/contacts-graph.js +174 -0
- package/dist/tools/contacts-graph.js.map +1 -0
- package/dist/tools/contacts.d.ts +61 -30
- package/dist/tools/contacts.d.ts.map +1 -1
- package/dist/tools/contacts.js +150 -93
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/excel.d.ts +20 -10
- package/dist/tools/excel.d.ts.map +1 -1
- package/dist/tools/excel.js +82 -6
- package/dist/tools/excel.js.map +1 -1
- package/dist/tools/focused-overrides.d.ts +14 -4
- package/dist/tools/focused-overrides.d.ts.map +1 -1
- package/dist/tools/focused-overrides.js +59 -2
- package/dist/tools/focused-overrides.js.map +1 -1
- package/dist/tools/index.d.ts +4 -5
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -6
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/linked-resources.d.ts +17 -7
- package/dist/tools/linked-resources.d.ts.map +1 -1
- package/dist/tools/linked-resources.js +60 -4
- package/dist/tools/linked-resources.js.map +1 -1
- package/dist/tools/mail-graph.d.ts +38 -0
- package/dist/tools/mail-graph.d.ts.map +1 -0
- package/dist/tools/mail-graph.js +187 -0
- package/dist/tools/mail-graph.js.map +1 -0
- package/dist/tools/mail-rules.d.ts +20 -8
- package/dist/tools/mail-rules.d.ts.map +1 -1
- package/dist/tools/mail-rules.js +63 -7
- package/dist/tools/mail-rules.js.map +1 -1
- package/dist/tools/mail-send.d.ts +39 -27
- package/dist/tools/mail-send.d.ts.map +1 -1
- package/dist/tools/mail-send.js +249 -24
- package/dist/tools/mail-send.js.map +1 -1
- package/dist/tools/mail.d.ts +91 -68
- package/dist/tools/mail.d.ts.map +1 -1
- package/dist/tools/mail.js +232 -243
- package/dist/tools/mail.js.map +1 -1
- package/dist/tools/mailbox-organization.d.ts +51 -34
- package/dist/tools/mailbox-organization.d.ts.map +1 -1
- package/dist/tools/mailbox-organization.js +318 -35
- package/dist/tools/mailbox-organization.js.map +1 -1
- package/dist/tools/mailbox-settings.d.ts +59 -0
- package/dist/tools/mailbox-settings.d.ts.map +1 -0
- package/dist/tools/mailbox-settings.js +136 -0
- package/dist/tools/mailbox-settings.js.map +1 -0
- package/dist/tools/meetings.d.ts +24 -14
- package/dist/tools/meetings.d.ts.map +1 -1
- package/dist/tools/meetings.js +82 -6
- package/dist/tools/meetings.js.map +1 -1
- package/dist/tools/onedrive.d.ts +26 -16
- package/dist/tools/onedrive.d.ts.map +1 -1
- package/dist/tools/onedrive.js +140 -11
- package/dist/tools/onedrive.js.map +1 -1
- package/dist/tools/onenote.d.ts +63 -0
- package/dist/tools/onenote.d.ts.map +1 -0
- package/dist/tools/onenote.js +221 -0
- package/dist/tools/onenote.js.map +1 -0
- package/dist/tools/people.d.ts +10 -0
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +94 -0
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/planner-visualization.d.ts +15 -5
- package/dist/tools/planner-visualization.d.ts.map +1 -1
- package/dist/tools/planner-visualization.js +58 -4
- package/dist/tools/planner-visualization.js.map +1 -1
- package/dist/tools/planner.d.ts +69 -39
- package/dist/tools/planner.d.ts.map +1 -1
- package/dist/tools/planner.js +231 -23
- package/dist/tools/planner.js.map +1 -1
- package/dist/tools/scheduling.d.ts +12 -0
- package/dist/tools/scheduling.d.ts.map +1 -1
- package/dist/tools/scheduling.js +38 -0
- package/dist/tools/scheduling.js.map +1 -1
- package/dist/tools/shared-mailbox.d.ts +164 -0
- package/dist/tools/shared-mailbox.d.ts.map +1 -0
- package/dist/tools/shared-mailbox.js +318 -0
- package/dist/tools/shared-mailbox.js.map +1 -0
- package/dist/tools/sharepoint-lists.d.ts +131 -0
- package/dist/tools/sharepoint-lists.d.ts.map +1 -0
- package/dist/tools/sharepoint-lists.js +246 -0
- package/dist/tools/sharepoint-lists.js.map +1 -0
- package/dist/tools/sharepoint.d.ts +24 -14
- package/dist/tools/sharepoint.d.ts.map +1 -1
- package/dist/tools/sharepoint.js +85 -9
- package/dist/tools/sharepoint.js.map +1 -1
- package/dist/tools/task-attachments.d.ts +17 -7
- package/dist/tools/task-attachments.d.ts.map +1 -1
- package/dist/tools/task-attachments.js +60 -4
- package/dist/tools/task-attachments.js.map +1 -1
- package/dist/tools/task-lists.d.ts +56 -0
- package/dist/tools/task-lists.d.ts.map +1 -0
- package/dist/tools/task-lists.js +155 -0
- package/dist/tools/task-lists.js.map +1 -0
- package/dist/tools/tasks-graph.d.ts +49 -0
- package/dist/tools/tasks-graph.d.ts.map +1 -0
- package/dist/tools/tasks-graph.js +193 -0
- package/dist/tools/tasks-graph.js.map +1 -0
- package/dist/tools/tasks.d.ts +121 -29
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +136 -84
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/teams.d.ts +57 -46
- package/dist/tools/teams.d.ts.map +1 -1
- package/dist/tools/teams.js +288 -26
- package/dist/tools/teams.js.map +1 -1
- package/dist/tools/what-changed.d.ts +48 -0
- package/dist/tools/what-changed.d.ts.map +1 -0
- package/dist/tools/what-changed.js +149 -0
- package/dist/tools/what-changed.js.map +1 -0
- package/dist/types/calendar.d.ts +1 -1
- package/dist/types/calendar.d.ts.map +1 -1
- package/dist/types/calendar.js.map +1 -1
- package/dist/types/contacts.d.ts +1 -1
- package/dist/types/contacts.d.ts.map +1 -1
- package/dist/types/contacts.js.map +1 -1
- package/dist/types/mail.d.ts +1 -1
- package/dist/types/mail.d.ts.map +1 -1
- package/dist/types/mail.js.map +1 -1
- package/dist/utils/errors.d.ts +110 -38
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +239 -56
- package/dist/utils/errors.js.map +1 -1
- package/dist/visualization/types.d.ts +4 -4
- package/package.json +2 -3
- package/dist/applescript/account-repository.d.ts +0 -30
- package/dist/applescript/account-repository.d.ts.map +0 -1
- package/dist/applescript/account-repository.js +0 -38
- package/dist/applescript/account-repository.js.map +0 -1
- package/dist/applescript/account-scripts.d.ts +0 -21
- package/dist/applescript/account-scripts.d.ts.map +0 -1
- package/dist/applescript/account-scripts.js +0 -180
- package/dist/applescript/account-scripts.js.map +0 -1
- package/dist/applescript/calendar-manager.d.ts +0 -44
- package/dist/applescript/calendar-manager.d.ts.map +0 -1
- package/dist/applescript/calendar-manager.js +0 -92
- package/dist/applescript/calendar-manager.js.map +0 -1
- package/dist/applescript/calendar-writer.d.ts +0 -36
- package/dist/applescript/calendar-writer.d.ts.map +0 -1
- package/dist/applescript/calendar-writer.js +0 -94
- package/dist/applescript/calendar-writer.js.map +0 -1
- package/dist/applescript/content-readers.d.ts +0 -114
- package/dist/applescript/content-readers.d.ts.map +0 -1
- package/dist/applescript/content-readers.js +0 -328
- package/dist/applescript/content-readers.js.map +0 -1
- package/dist/applescript/executor.d.ts +0 -60
- package/dist/applescript/executor.d.ts.map +0 -1
- package/dist/applescript/executor.js +0 -173
- package/dist/applescript/executor.js.map +0 -1
- package/dist/applescript/index.d.ts +0 -20
- package/dist/applescript/index.d.ts.map +0 -1
- package/dist/applescript/index.js +0 -29
- package/dist/applescript/index.js.map +0 -1
- package/dist/applescript/mail-sender.d.ts +0 -38
- package/dist/applescript/mail-sender.d.ts.map +0 -1
- package/dist/applescript/mail-sender.js +0 -67
- package/dist/applescript/mail-sender.js.map +0 -1
- package/dist/applescript/parser.d.ts +0 -235
- package/dist/applescript/parser.d.ts.map +0 -1
- package/dist/applescript/parser.js +0 -496
- package/dist/applescript/parser.js.map +0 -1
- package/dist/applescript/repository.d.ts +0 -64
- package/dist/applescript/repository.d.ts.map +0 -1
- package/dist/applescript/repository.js +0 -444
- package/dist/applescript/repository.js.map +0 -1
- package/dist/applescript/scripts.d.ts +0 -265
- package/dist/applescript/scripts.d.ts.map +0 -1
- package/dist/applescript/scripts.js +0 -1483
- package/dist/applescript/scripts.js.map +0 -1
- package/dist/parsers/olk15.d.ts +0 -87
- package/dist/parsers/olk15.d.ts.map +0 -1
- package/dist/parsers/olk15.js +0 -368
- package/dist/parsers/olk15.js.map +0 -1
- package/dist/tools/notes.d.ts +0 -74
- package/dist/tools/notes.d.ts.map +0 -1
- package/dist/tools/notes.js +0 -136
- package/dist/tools/notes.js.map +0 -1
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
import type { IRepository, FolderRow, EmailRow, EventRow, ContactRow, TaskRow, NoteRow } from '../database/repository.js';
|
|
12
12
|
import { GraphClient } from './client/index.js';
|
|
13
13
|
import type { DeviceCodeCallback } from './auth/index.js';
|
|
14
|
+
import type { StateStore } from '../state/store.js';
|
|
15
|
+
import type { CompiledSearch } from '../search/compiler.js';
|
|
14
16
|
import type { PlanVisualizationData } from '../visualization/types.js';
|
|
15
17
|
/**
|
|
16
18
|
* Repository implementation using Microsoft Graph API.
|
|
@@ -19,97 +21,148 @@ import type { PlanVisualizationData } from '../visualization/types.js';
|
|
|
19
21
|
*/
|
|
20
22
|
export declare class GraphRepository implements IRepository {
|
|
21
23
|
private readonly client;
|
|
24
|
+
private readonly store;
|
|
25
|
+
private readonly accountId;
|
|
22
26
|
private readonly deltaLinks;
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
constructor(deviceCodeCallback?: DeviceCodeCallback, store?: StateStore, accountId?: () => string);
|
|
28
|
+
/**
|
|
29
|
+
* Resolves any id a tool receives — a durable token, a raw Graph id, or a
|
|
30
|
+
* legacy numeric id — to a live Graph id (U5). Self-encoding tokens decode with
|
|
31
|
+
* no store; alias-backed tokens need {@link store}; a numeric id on Graph is
|
|
32
|
+
* unsupported (D4). Throws a typed error on failure.
|
|
33
|
+
*/
|
|
34
|
+
private toGraphId;
|
|
35
|
+
/**
|
|
36
|
+
* Mints an alias-backed token for a single-Graph-id entity (e.g. team, chat)
|
|
37
|
+
* and records token → graphId in the alias table so it resolves on later calls.
|
|
38
|
+
* Alias-backed (not self-encoding) so the token is short and account-scoped: a
|
|
39
|
+
* cold store yields ID_UNKNOWN rather than leaking a decodable tenant-global id.
|
|
40
|
+
*/
|
|
41
|
+
private mintAlias;
|
|
42
|
+
/**
|
|
43
|
+
* Mints an alias-backed token for a composite entity whose Graph URL needs a
|
|
44
|
+
* tuple of ids (e.g. channel {teamId, channelId}). The tuple is the canonical
|
|
45
|
+
* key AND is stored JSON-encoded as the resolved value, so {@link toGraphParts}
|
|
46
|
+
* can recover every field.
|
|
47
|
+
*/
|
|
48
|
+
private mintAliasComposite;
|
|
49
|
+
/**
|
|
50
|
+
* Resolves a composite token to its identifying tuple. The alias row stores the
|
|
51
|
+
* tuple JSON-encoded; a raw (non-token) string can't carry a tuple, so anything
|
|
52
|
+
* that doesn't decode to a JSON object carrying every required key is an unusable
|
|
53
|
+
* id (ID_UNKNOWN). Generic over the key set so callers get a precisely-typed
|
|
54
|
+
* result — every requested field is a guaranteed non-empty string.
|
|
55
|
+
*/
|
|
56
|
+
private toGraphParts;
|
|
57
|
+
private resolveTeamId;
|
|
58
|
+
private resolvePlanId;
|
|
59
|
+
/** True for an HTTP 412 (Precondition Failed) — the `If-Match` etag we sent no
|
|
60
|
+
* longer matches the entity's current etag. */
|
|
61
|
+
private isPreconditionFailed;
|
|
62
|
+
/** Extracts the OData etag from a fetched entity, defaulting to `''` when absent. */
|
|
63
|
+
private extractEtag;
|
|
64
|
+
/**
|
|
65
|
+
* Fetches a fresh etag immediately before a write (U5b-5 — the Planner etag is
|
|
66
|
+
* mutable and per-sub-resource, so it can't ride in the durable token or a
|
|
67
|
+
* cache) and retries the write once with a re-fetched etag on a 412, covering
|
|
68
|
+
* the narrow race between the fetch and the write.
|
|
69
|
+
*
|
|
70
|
+
* CONCURRENCY SEMANTIC (deliberate, last-writer-wins): because MCP tool calls
|
|
71
|
+
* are stateless, the etag the caller observed at an earlier `get_*` cannot be
|
|
72
|
+
* carried into a later `update_*`. We therefore re-read the etag at write time,
|
|
73
|
+
* which means a concurrent edit landing between the caller's read and their
|
|
74
|
+
* write is NOT detected — the write overwrites it. This is the intended
|
|
75
|
+
* trade-off (it eliminates the spurious 412s the old cached-etag path produced
|
|
76
|
+
* for a lone editor); Planner writes are not cross-read conflict-protected.
|
|
77
|
+
*/
|
|
78
|
+
private withFreshEtag;
|
|
79
|
+
private resolveChatId;
|
|
25
80
|
listFolders(): FolderRow[];
|
|
26
81
|
listFoldersAsync(): Promise<FolderRow[]>;
|
|
27
|
-
getFolder(_id:
|
|
28
|
-
getFolderAsync(id:
|
|
82
|
+
getFolder(_id: string): FolderRow | undefined;
|
|
83
|
+
getFolderAsync(id: string): Promise<FolderRow | undefined>;
|
|
29
84
|
listEmails(_folderId: number, _limit: number, _offset: number): EmailRow[];
|
|
30
|
-
listEmailsAsync(folderId:
|
|
85
|
+
listEmailsAsync(folderId: string, limit: number, offset: number): Promise<EmailRow[]>;
|
|
31
86
|
private listEmailsWithGraphId;
|
|
32
87
|
listUnreadEmails(_folderId: number, _limit: number, _offset: number): EmailRow[];
|
|
33
|
-
listUnreadEmailsAsync(folderId:
|
|
88
|
+
listUnreadEmailsAsync(folderId: string, limit: number, offset: number): Promise<EmailRow[]>;
|
|
34
89
|
private listUnreadEmailsWithGraphId;
|
|
35
90
|
searchEmails(_query: string, _limit: number): EmailRow[];
|
|
36
91
|
searchEmailsAsync(query: string, limit: number): Promise<EmailRow[]>;
|
|
37
92
|
searchEmailsInFolder(_folderId: number, _query: string, _limit: number): EmailRow[];
|
|
38
|
-
searchEmailsInFolderAsync(folderId:
|
|
93
|
+
searchEmailsInFolderAsync(folderId: string, query: string, limit: number): Promise<EmailRow[]>;
|
|
39
94
|
private searchEmailsInFolderWithGraphId;
|
|
40
95
|
/**
|
|
41
|
-
*
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Advanced search in a specific folder using raw KQL query syntax.
|
|
96
|
+
* Structured advanced search (U7 / D9). Runs a compiled query on the correct
|
|
97
|
+
* Graph mechanism ($filter / quoted $search / /search/query), then caches IDs
|
|
98
|
+
* and maps to EmailRow[] exactly like the raw-KQL path it replaces.
|
|
46
99
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
100
|
+
searchEmailsStructuredAsync(compiled: CompiledSearch, limit: number): Promise<EmailRow[]>;
|
|
101
|
+
private runStructuredSearch;
|
|
102
|
+
checkNewEmailsAsync(folderId: string): Promise<{
|
|
49
103
|
emails: EmailRow[];
|
|
50
104
|
isInitialSync: boolean;
|
|
51
105
|
}>;
|
|
52
|
-
getEmail(_id:
|
|
53
|
-
|
|
54
|
-
* Populates the message ID cache by listing messages from mail folders.
|
|
55
|
-
* Used as a fallback when getEmailAsync is called with an ID not yet in cache
|
|
56
|
-
* (e.g. after server restart or when list_emails/search_emails wasn't called first).
|
|
57
|
-
*/
|
|
58
|
-
private refreshMessageCacheForGetEmail;
|
|
59
|
-
getEmailAsync(id: number): Promise<EmailRow | undefined>;
|
|
106
|
+
getEmail(_id: string): EmailRow | undefined;
|
|
107
|
+
getEmailAsync(id: string): Promise<EmailRow | undefined>;
|
|
60
108
|
getUnreadCount(): number;
|
|
61
109
|
getUnreadCountAsync(): Promise<number>;
|
|
62
110
|
getUnreadCountByFolder(_folderId: number): number;
|
|
63
|
-
getUnreadCountByFolderAsync(folderId:
|
|
111
|
+
getUnreadCountByFolderAsync(folderId: string): Promise<number>;
|
|
64
112
|
/**
|
|
65
113
|
* Lists all messages in a conversation thread.
|
|
66
114
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
115
|
+
* Resolves the message id to its Graph id (durable `em_` token or raw Graph
|
|
116
|
+
* id), fetches the message to read its raw Graph conversationId, then queries
|
|
117
|
+
* for all messages with that ID. No cache required.
|
|
69
118
|
*/
|
|
70
|
-
listConversationAsync(messageId:
|
|
119
|
+
listConversationAsync(messageId: string, limit: number): Promise<EmailRow[]>;
|
|
71
120
|
listCalendars(): FolderRow[];
|
|
72
121
|
listCalendarsAsync(): Promise<FolderRow[]>;
|
|
73
122
|
listEvents(_limit: number): EventRow[];
|
|
74
123
|
listEventsAsync(limit: number): Promise<EventRow[]>;
|
|
75
124
|
listEventsByFolder(_folderId: number, _limit: number): EventRow[];
|
|
76
|
-
listEventsByFolderAsync(folderId:
|
|
125
|
+
listEventsByFolderAsync(folderId: string, limit: number): Promise<EventRow[]>;
|
|
77
126
|
searchEvents(_query: string | null, _startDate: string | null, _endDate: string | null, _limit: number): EventRow[];
|
|
78
127
|
searchEventsAsync(query: string | null, startDate: string | null, endDate: string | null, limit: number): Promise<EventRow[]>;
|
|
79
128
|
listEventsByDateRange(_startDate: number, _endDate: number, _limit: number): EventRow[];
|
|
80
129
|
listEventsByDateRangeAsync(startDate: number, endDate: number, limit: number): Promise<EventRow[]>;
|
|
81
|
-
getEvent(_id:
|
|
82
|
-
getEventAsync(id:
|
|
83
|
-
|
|
130
|
+
getEvent(_id: string): EventRow | undefined;
|
|
131
|
+
getEventAsync(id: string): Promise<EventRow | undefined>;
|
|
132
|
+
/** Resolves an event id (durable `ev_` token or raw Graph id) to its Graph id. */
|
|
133
|
+
getEventGraphId(id: string): string;
|
|
134
|
+
listEventInstancesAsync(eventId: string, startDate: string, endDate: string): Promise<EventRow[]>;
|
|
84
135
|
listContacts(_limit: number, _offset: number): ContactRow[];
|
|
85
136
|
listContactsAsync(limit: number, offset: number): Promise<ContactRow[]>;
|
|
86
137
|
searchContacts(_query: string, _limit: number): ContactRow[];
|
|
87
138
|
searchContactsAsync(query: string, limit: number): Promise<ContactRow[]>;
|
|
88
|
-
getContact(_id:
|
|
89
|
-
getContactAsync(id:
|
|
139
|
+
getContact(_id: string): ContactRow | undefined;
|
|
140
|
+
getContactAsync(id: string): Promise<ContactRow | undefined>;
|
|
141
|
+
/** Resolves a contact id (durable `ct_` token or raw Graph id) to its Graph id. */
|
|
142
|
+
getContactGraphId(id: string): string;
|
|
90
143
|
listContactFoldersAsync(): Promise<Array<{
|
|
91
|
-
id:
|
|
144
|
+
id: string;
|
|
92
145
|
name: string;
|
|
93
146
|
parentFolderId: string | null;
|
|
94
147
|
}>>;
|
|
95
|
-
createContactFolderAsync(name: string): Promise<
|
|
96
|
-
deleteContactFolderAsync(folderId:
|
|
97
|
-
listContactsInFolderAsync(folderId:
|
|
98
|
-
getContactPhotoAsync(contactId:
|
|
148
|
+
createContactFolderAsync(name: string): Promise<string>;
|
|
149
|
+
deleteContactFolderAsync(folderId: string): Promise<void>;
|
|
150
|
+
listContactsInFolderAsync(folderId: string, limit?: number): Promise<ContactRow[]>;
|
|
151
|
+
getContactPhotoAsync(contactId: string): Promise<{
|
|
99
152
|
filePath: string;
|
|
100
153
|
contentType: string;
|
|
101
154
|
}>;
|
|
102
|
-
setContactPhotoAsync(contactId:
|
|
155
|
+
setContactPhotoAsync(contactId: string, filePath: string): Promise<void>;
|
|
103
156
|
listTasks(_limit: number, _offset: number): TaskRow[];
|
|
104
157
|
listTasksAsync(limit: number, offset: number): Promise<TaskRow[]>;
|
|
105
158
|
listIncompleteTasks(_limit: number, _offset: number): TaskRow[];
|
|
106
159
|
listIncompleteTasksAsync(limit: number, offset: number): Promise<TaskRow[]>;
|
|
107
160
|
searchTasks(_query: string, _limit: number): TaskRow[];
|
|
108
161
|
searchTasksAsync(query: string, limit: number): Promise<TaskRow[]>;
|
|
109
|
-
getTask(_id:
|
|
110
|
-
getTaskAsync(id:
|
|
162
|
+
getTask(_id: string): TaskRow | undefined;
|
|
163
|
+
getTaskAsync(id: string): Promise<TaskRow | undefined>;
|
|
111
164
|
listTaskListsAsync(): Promise<Array<{
|
|
112
|
-
id:
|
|
165
|
+
id: string;
|
|
113
166
|
name: string;
|
|
114
167
|
isDefault: boolean;
|
|
115
168
|
}>>;
|
|
@@ -126,55 +179,52 @@ export declare class GraphRepository implements IRepository {
|
|
|
126
179
|
*/
|
|
127
180
|
getGraphClient(): GraphClient;
|
|
128
181
|
/**
|
|
129
|
-
*
|
|
182
|
+
* Resolves a draft id (durable `em_` token or raw Graph id) to its Graph id
|
|
183
|
+
* (satisfies IMailSendRepository). Drafts are messages.
|
|
130
184
|
*/
|
|
131
|
-
getGraphIdForDraft(draftId:
|
|
185
|
+
getGraphIdForDraft(draftId: string): string;
|
|
132
186
|
/**
|
|
133
|
-
* Gets
|
|
187
|
+
* Gets task info (Graph taskListId/taskId) from a durable `td_` token.
|
|
134
188
|
*/
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Gets task info from a numeric ID.
|
|
138
|
-
*/
|
|
139
|
-
getTaskInfo(numericId: number): {
|
|
189
|
+
getTaskInfo(id: string): {
|
|
140
190
|
taskListId: string;
|
|
141
191
|
taskId: string;
|
|
142
192
|
} | undefined;
|
|
143
193
|
/**
|
|
144
|
-
* Gets the Graph string ID for a task list from a
|
|
145
|
-
*/
|
|
146
|
-
getTaskListGraphId(
|
|
147
|
-
moveEmail(_emailId:
|
|
148
|
-
deleteEmail(_emailId:
|
|
149
|
-
archiveEmail(_emailId:
|
|
150
|
-
junkEmail(_emailId:
|
|
151
|
-
markEmailRead(_emailId:
|
|
152
|
-
setEmailFlag(_emailId:
|
|
153
|
-
setEmailCategories(_emailId:
|
|
154
|
-
setEmailImportance(_emailId:
|
|
155
|
-
createFolder(_name: string, _parentFolderId?:
|
|
156
|
-
deleteFolder(_folderId:
|
|
157
|
-
renameFolder(_folderId:
|
|
158
|
-
moveFolder(_folderId:
|
|
159
|
-
emptyFolder(_folderId:
|
|
160
|
-
moveEmailAsync(emailId:
|
|
161
|
-
deleteEmailAsync(emailId:
|
|
162
|
-
archiveEmailAsync(emailId:
|
|
163
|
-
junkEmailAsync(emailId:
|
|
164
|
-
markEmailReadAsync(emailId:
|
|
165
|
-
setEmailFlagAsync(emailId:
|
|
166
|
-
setEmailCategoriesAsync(emailId:
|
|
167
|
-
setEmailImportanceAsync(emailId:
|
|
168
|
-
createFolderAsync(name: string, parentFolderId?:
|
|
169
|
-
deleteFolderAsync(folderId:
|
|
170
|
-
renameFolderAsync(folderId:
|
|
171
|
-
moveFolderAsync(folderId:
|
|
172
|
-
emptyFolderAsync(folderId:
|
|
194
|
+
* Gets the Graph string ID for a task list from a durable `tl_` token.
|
|
195
|
+
*/
|
|
196
|
+
getTaskListGraphId(id: string): string | undefined;
|
|
197
|
+
moveEmail(_emailId: string, _destinationFolderId: string): void;
|
|
198
|
+
deleteEmail(_emailId: string): void;
|
|
199
|
+
archiveEmail(_emailId: string): void;
|
|
200
|
+
junkEmail(_emailId: string): void;
|
|
201
|
+
markEmailRead(_emailId: string, _isRead: boolean): void;
|
|
202
|
+
setEmailFlag(_emailId: string, _flagStatus: number): void;
|
|
203
|
+
setEmailCategories(_emailId: string, _categories: string[]): void;
|
|
204
|
+
setEmailImportance(_emailId: string, _importance: string): void;
|
|
205
|
+
createFolder(_name: string, _parentFolderId?: string): FolderRow;
|
|
206
|
+
deleteFolder(_folderId: string): void;
|
|
207
|
+
renameFolder(_folderId: string, _newName: string): void;
|
|
208
|
+
moveFolder(_folderId: string, _destinationParentId: string): void;
|
|
209
|
+
emptyFolder(_folderId: string): void;
|
|
210
|
+
moveEmailAsync(emailId: string, destinationFolderId: string): Promise<void>;
|
|
211
|
+
deleteEmailAsync(emailId: string): Promise<void>;
|
|
212
|
+
archiveEmailAsync(emailId: string): Promise<void>;
|
|
213
|
+
junkEmailAsync(emailId: string): Promise<void>;
|
|
214
|
+
markEmailReadAsync(emailId: string, isRead: boolean): Promise<void>;
|
|
215
|
+
setEmailFlagAsync(emailId: string, flagStatus: number): Promise<void>;
|
|
216
|
+
setEmailCategoriesAsync(emailId: string, categories: string[]): Promise<void>;
|
|
217
|
+
setEmailImportanceAsync(emailId: string, importance: string): Promise<void>;
|
|
218
|
+
createFolderAsync(name: string, parentFolderId?: string): Promise<FolderRow>;
|
|
219
|
+
deleteFolderAsync(folderId: string): Promise<void>;
|
|
220
|
+
renameFolderAsync(folderId: string, newName: string): Promise<void>;
|
|
221
|
+
moveFolderAsync(folderId: string, destinationParentId: string): Promise<void>;
|
|
222
|
+
emptyFolderAsync(folderId: string): Promise<void>;
|
|
173
223
|
/**
|
|
174
224
|
* Creates a new draft message.
|
|
175
225
|
*
|
|
176
226
|
* Converts email address strings to Recipient objects, calls the Graph client,
|
|
177
|
-
*
|
|
227
|
+
* and returns a durable `em_` token plus the raw Graph id.
|
|
178
228
|
*/
|
|
179
229
|
createDraftAsync(params: {
|
|
180
230
|
subject: string;
|
|
@@ -184,15 +234,15 @@ export declare class GraphRepository implements IRepository {
|
|
|
184
234
|
cc?: string[];
|
|
185
235
|
bcc?: string[];
|
|
186
236
|
}): Promise<{
|
|
187
|
-
|
|
237
|
+
token: string;
|
|
188
238
|
graphId: string;
|
|
189
239
|
}>;
|
|
190
240
|
/**
|
|
191
241
|
* Updates an existing draft message.
|
|
192
242
|
*
|
|
193
|
-
*
|
|
243
|
+
* Resolves the draft id to its Graph id, then calls the client.
|
|
194
244
|
*/
|
|
195
|
-
updateDraftAsync(draftId:
|
|
245
|
+
updateDraftAsync(draftId: string, updates: Record<string, unknown>): Promise<void>;
|
|
196
246
|
/**
|
|
197
247
|
* Lists draft messages.
|
|
198
248
|
*
|
|
@@ -202,9 +252,9 @@ export declare class GraphRepository implements IRepository {
|
|
|
202
252
|
/**
|
|
203
253
|
* Sends an existing draft message.
|
|
204
254
|
*
|
|
205
|
-
*
|
|
255
|
+
* Resolves the id to its Graph id, then calls the client.
|
|
206
256
|
*/
|
|
207
|
-
sendDraftAsync(draftId:
|
|
257
|
+
sendDraftAsync(draftId: string): Promise<void>;
|
|
208
258
|
/**
|
|
209
259
|
* Sends a new email directly without creating a draft first.
|
|
210
260
|
*
|
|
@@ -221,39 +271,38 @@ export declare class GraphRepository implements IRepository {
|
|
|
221
271
|
/**
|
|
222
272
|
* Replies to a message (or replies all).
|
|
223
273
|
*
|
|
224
|
-
*
|
|
274
|
+
* Resolves the id to its Graph id, then calls the client.
|
|
225
275
|
*/
|
|
226
|
-
replyMessageAsync(messageId:
|
|
276
|
+
replyMessageAsync(messageId: string, comment: string, replyAll: boolean): Promise<void>;
|
|
227
277
|
/**
|
|
228
278
|
* Forwards a message to specified recipients.
|
|
229
279
|
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
280
|
+
* Resolves the id to its Graph id, converts recipient email strings to
|
|
281
|
+
* Recipient objects, then calls the client.
|
|
232
282
|
*/
|
|
233
|
-
forwardMessageAsync(messageId:
|
|
283
|
+
forwardMessageAsync(messageId: string, toRecipients: string[], comment?: string): Promise<void>;
|
|
234
284
|
/**
|
|
235
285
|
* Creates a reply (or reply-all) draft for a message.
|
|
236
286
|
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
287
|
+
* Resolves the source message id to its Graph id, creates the draft via the
|
|
288
|
+
* client, and optionally updates the body.
|
|
239
289
|
*
|
|
240
|
-
* @returns
|
|
290
|
+
* @returns A durable `em_` token and the raw Graph id of the new draft.
|
|
241
291
|
*/
|
|
242
|
-
replyAsDraftAsync(messageId:
|
|
243
|
-
|
|
292
|
+
replyAsDraftAsync(messageId: string, replyAll?: boolean, comment?: string, bodyType?: string): Promise<{
|
|
293
|
+
token: string;
|
|
244
294
|
graphId: string;
|
|
245
295
|
}>;
|
|
246
296
|
/**
|
|
247
297
|
* Creates a forward draft for a message.
|
|
248
298
|
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
* recipients and body.
|
|
299
|
+
* Resolves the source message id to its Graph id, creates the draft via the
|
|
300
|
+
* client, and optionally updates the recipients and body.
|
|
252
301
|
*
|
|
253
|
-
* @returns
|
|
302
|
+
* @returns A durable `em_` token and the raw Graph id of the new draft.
|
|
254
303
|
*/
|
|
255
|
-
forwardAsDraftAsync(messageId:
|
|
256
|
-
|
|
304
|
+
forwardAsDraftAsync(messageId: string, toRecipients?: string[], comment?: string, bodyType?: string): Promise<{
|
|
305
|
+
token: string;
|
|
257
306
|
graphId: string;
|
|
258
307
|
}>;
|
|
259
308
|
getScheduleAsync(params: {
|
|
@@ -272,14 +321,13 @@ export declare class GraphRepository implements IRepository {
|
|
|
272
321
|
/**
|
|
273
322
|
* Lists attachments for a given email.
|
|
274
323
|
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
* and caches it in idCache.attachments with { messageId, attachmentId }.
|
|
324
|
+
* Resolves the id to its Graph id, calls client.listAttachments, and mints
|
|
325
|
+
* an `at_` composite alias token ({ messageId, attachmentId }) per item.
|
|
278
326
|
*
|
|
279
327
|
* @returns Array of attachment metadata objects.
|
|
280
328
|
*/
|
|
281
|
-
listAttachmentsAsync(emailId:
|
|
282
|
-
id:
|
|
329
|
+
listAttachmentsAsync(emailId: string): Promise<Array<{
|
|
330
|
+
id: string;
|
|
283
331
|
name: string;
|
|
284
332
|
size: number;
|
|
285
333
|
contentType: string;
|
|
@@ -288,13 +336,13 @@ export declare class GraphRepository implements IRepository {
|
|
|
288
336
|
/**
|
|
289
337
|
* Downloads an attachment for a given email.
|
|
290
338
|
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
339
|
+
* Resolves the `at_` composite token to { messageId, attachmentId }, then
|
|
340
|
+
* delegates to the downloadAttachment helper which fetches the content and
|
|
341
|
+
* writes it to disk.
|
|
294
342
|
*
|
|
295
343
|
* @returns Metadata about the downloaded file including its local path.
|
|
296
344
|
*/
|
|
297
|
-
downloadAttachmentAsync(attachmentId:
|
|
345
|
+
downloadAttachmentAsync(attachmentId: string): Promise<{
|
|
298
346
|
filePath: string;
|
|
299
347
|
name: string;
|
|
300
348
|
size: number;
|
|
@@ -334,17 +382,17 @@ export declare class GraphRepository implements IRepository {
|
|
|
334
382
|
numberOfOccurrences?: number;
|
|
335
383
|
};
|
|
336
384
|
};
|
|
337
|
-
calendarId?:
|
|
385
|
+
calendarId?: string;
|
|
338
386
|
is_online_meeting?: boolean;
|
|
339
387
|
online_meeting_provider?: string;
|
|
340
|
-
}): Promise<
|
|
388
|
+
}): Promise<string>;
|
|
341
389
|
/**
|
|
342
390
|
* Updates an existing calendar event.
|
|
343
391
|
*
|
|
344
392
|
* Looks up the Graph string ID from idCache.events, then calls
|
|
345
393
|
* client.updateEvent(). Throws if the event is not cached.
|
|
346
394
|
*/
|
|
347
|
-
updateEventAsync(eventId:
|
|
395
|
+
updateEventAsync(eventId: string, updates: Record<string, unknown>): Promise<void>;
|
|
348
396
|
/**
|
|
349
397
|
* Deletes a calendar event.
|
|
350
398
|
*
|
|
@@ -352,14 +400,14 @@ export declare class GraphRepository implements IRepository {
|
|
|
352
400
|
* client.deleteEvent(), and removes the entry from idCache.
|
|
353
401
|
* Throws if the event is not cached.
|
|
354
402
|
*/
|
|
355
|
-
deleteEventAsync(eventId:
|
|
403
|
+
deleteEventAsync(eventId: string): Promise<void>;
|
|
356
404
|
/**
|
|
357
405
|
* Responds to a calendar event invitation.
|
|
358
406
|
*
|
|
359
407
|
* Looks up the Graph string ID from idCache.events, then calls
|
|
360
408
|
* client.respondToEvent(). Throws if the event is not cached.
|
|
361
409
|
*/
|
|
362
|
-
respondToEventAsync(eventId:
|
|
410
|
+
respondToEventAsync(eventId: string, response: 'accept' | 'decline' | 'tentative', sendResponse: boolean, comment?: string): Promise<void>;
|
|
363
411
|
/**
|
|
364
412
|
* Creates a new contact.
|
|
365
413
|
*
|
|
@@ -379,14 +427,14 @@ export declare class GraphRepository implements IRepository {
|
|
|
379
427
|
state?: string;
|
|
380
428
|
postal_code?: string;
|
|
381
429
|
country?: string;
|
|
382
|
-
}): Promise<
|
|
430
|
+
}): Promise<string>;
|
|
383
431
|
/**
|
|
384
432
|
* Updates an existing contact.
|
|
385
433
|
*
|
|
386
434
|
* Looks up the Graph string ID from idCache.contacts, then calls
|
|
387
435
|
* client.updateContact(). Throws if the contact is not cached.
|
|
388
436
|
*/
|
|
389
|
-
updateContactAsync(contactId:
|
|
437
|
+
updateContactAsync(contactId: string, updates: Record<string, unknown>): Promise<void>;
|
|
390
438
|
/**
|
|
391
439
|
* Deletes a contact.
|
|
392
440
|
*
|
|
@@ -394,17 +442,17 @@ export declare class GraphRepository implements IRepository {
|
|
|
394
442
|
* client.deleteContact(), and removes the entry from idCache.
|
|
395
443
|
* Throws if the contact is not cached.
|
|
396
444
|
*/
|
|
397
|
-
deleteContactAsync(contactId:
|
|
445
|
+
deleteContactAsync(contactId: string): Promise<void>;
|
|
398
446
|
/**
|
|
399
447
|
* Creates a new task in a task list.
|
|
400
448
|
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
449
|
+
* Resolves the `tl_` task list token to a Graph ID, builds a Graph API task
|
|
450
|
+
* object from the given params, calls client.createTask(), and returns a
|
|
451
|
+
* durable `td_` token for the created task.
|
|
404
452
|
*/
|
|
405
453
|
createTaskAsync(params: {
|
|
406
454
|
title: string;
|
|
407
|
-
task_list_id:
|
|
455
|
+
task_list_id: string;
|
|
408
456
|
body?: string;
|
|
409
457
|
body_type?: 'text' | 'html';
|
|
410
458
|
due_date?: string;
|
|
@@ -421,77 +469,67 @@ export declare class GraphRepository implements IRepository {
|
|
|
421
469
|
occurrences?: number | undefined;
|
|
422
470
|
} | undefined;
|
|
423
471
|
categories?: string[];
|
|
424
|
-
}): Promise<
|
|
472
|
+
}): Promise<string>;
|
|
425
473
|
/**
|
|
426
474
|
* Updates an existing task.
|
|
427
|
-
*
|
|
428
|
-
* Looks up the Graph task info from idCache.tasks, then calls
|
|
429
|
-
* client.updateTask(). Throws if the task is not cached.
|
|
430
475
|
*/
|
|
431
|
-
updateTaskAsync(taskId:
|
|
476
|
+
updateTaskAsync(taskId: string, updates: Record<string, unknown>): Promise<void>;
|
|
432
477
|
/**
|
|
433
478
|
* Marks a task as completed.
|
|
434
479
|
*
|
|
435
480
|
* Convenience method that calls updateTaskAsync with status: 'completed'
|
|
436
481
|
* and the current time as completedDateTime.
|
|
437
482
|
*/
|
|
438
|
-
completeTaskAsync(taskId:
|
|
483
|
+
completeTaskAsync(taskId: string): Promise<void>;
|
|
439
484
|
/**
|
|
440
485
|
* Deletes a task.
|
|
441
|
-
*
|
|
442
|
-
* Looks up the Graph task info from idCache.tasks, calls
|
|
443
|
-
* client.deleteTask(), and removes the entry from idCache.
|
|
444
|
-
* Throws if the task is not cached.
|
|
445
486
|
*/
|
|
446
|
-
deleteTaskAsync(taskId:
|
|
487
|
+
deleteTaskAsync(taskId: string): Promise<void>;
|
|
447
488
|
/**
|
|
448
489
|
* Creates a new task list.
|
|
449
|
-
*
|
|
450
|
-
* Calls client.createTaskList(), caches the resulting ID in
|
|
451
|
-
* idCache.taskLists, and returns a numeric ID.
|
|
452
490
|
*/
|
|
453
|
-
createTaskListAsync(displayName: string): Promise<
|
|
491
|
+
createTaskListAsync(displayName: string): Promise<string>;
|
|
454
492
|
/**
|
|
455
493
|
* Renames a task list.
|
|
456
494
|
*/
|
|
457
|
-
renameTaskListAsync(listId:
|
|
495
|
+
renameTaskListAsync(listId: string, name: string): Promise<void>;
|
|
458
496
|
/**
|
|
459
497
|
* Deletes a task list.
|
|
460
498
|
*/
|
|
461
|
-
deleteTaskListAsync(listId:
|
|
462
|
-
listChecklistItemsAsync(taskId:
|
|
463
|
-
id:
|
|
499
|
+
deleteTaskListAsync(listId: string): Promise<void>;
|
|
500
|
+
listChecklistItemsAsync(taskId: string): Promise<Array<{
|
|
501
|
+
id: string;
|
|
464
502
|
displayName: string;
|
|
465
503
|
isChecked: boolean;
|
|
466
504
|
createdDateTime: string;
|
|
467
505
|
}>>;
|
|
468
|
-
createChecklistItemAsync(taskId:
|
|
469
|
-
updateChecklistItemAsync(checklistItemId:
|
|
506
|
+
createChecklistItemAsync(taskId: string, displayName: string, isChecked?: boolean): Promise<string>;
|
|
507
|
+
updateChecklistItemAsync(checklistItemId: string, updates: {
|
|
470
508
|
displayName?: string;
|
|
471
509
|
isChecked?: boolean;
|
|
472
510
|
}): Promise<void>;
|
|
473
|
-
deleteChecklistItemAsync(checklistItemId:
|
|
474
|
-
listLinkedResourcesAsync(taskId:
|
|
475
|
-
id:
|
|
511
|
+
deleteChecklistItemAsync(checklistItemId: string): Promise<void>;
|
|
512
|
+
listLinkedResourcesAsync(taskId: string): Promise<Array<{
|
|
513
|
+
id: string;
|
|
476
514
|
webUrl: string;
|
|
477
515
|
applicationName: string;
|
|
478
516
|
displayName: string;
|
|
479
517
|
}>>;
|
|
480
|
-
createLinkedResourceAsync(taskId:
|
|
481
|
-
deleteLinkedResourceAsync(linkedResourceId:
|
|
482
|
-
listTaskAttachmentsAsync(taskId:
|
|
483
|
-
id:
|
|
518
|
+
createLinkedResourceAsync(taskId: string, webUrl: string, applicationName: string, displayName?: string): Promise<string>;
|
|
519
|
+
deleteLinkedResourceAsync(linkedResourceId: string): Promise<void>;
|
|
520
|
+
listTaskAttachmentsAsync(taskId: string): Promise<Array<{
|
|
521
|
+
id: string;
|
|
484
522
|
name: string;
|
|
485
523
|
size: number;
|
|
486
524
|
contentType: string;
|
|
487
525
|
}>>;
|
|
488
|
-
createTaskAttachmentAsync(taskId:
|
|
489
|
-
deleteTaskAttachmentAsync(taskAttachmentId:
|
|
526
|
+
createTaskAttachmentAsync(taskId: string, name: string, contentBytes: string, contentType?: string): Promise<string>;
|
|
527
|
+
deleteTaskAttachmentAsync(taskAttachmentId: string): Promise<void>;
|
|
490
528
|
/**
|
|
491
529
|
* Lists all inbox mail rules.
|
|
492
530
|
*/
|
|
493
531
|
listMailRulesAsync(): Promise<Array<{
|
|
494
|
-
id:
|
|
532
|
+
id: string;
|
|
495
533
|
displayName: string;
|
|
496
534
|
sequence: number;
|
|
497
535
|
isEnabled: boolean;
|
|
@@ -501,11 +539,11 @@ export declare class GraphRepository implements IRepository {
|
|
|
501
539
|
/**
|
|
502
540
|
* Creates a new inbox mail rule.
|
|
503
541
|
*/
|
|
504
|
-
createMailRuleAsync(rule: Record<string, unknown>): Promise<
|
|
542
|
+
createMailRuleAsync(rule: Record<string, unknown>): Promise<string>;
|
|
505
543
|
/**
|
|
506
544
|
* Deletes an inbox mail rule.
|
|
507
545
|
*/
|
|
508
|
-
deleteMailRuleAsync(ruleId:
|
|
546
|
+
deleteMailRuleAsync(ruleId: string): Promise<void>;
|
|
509
547
|
/**
|
|
510
548
|
* Gets the current automatic replies (OOF) settings.
|
|
511
549
|
*/
|
|
@@ -551,45 +589,45 @@ export declare class GraphRepository implements IRepository {
|
|
|
551
589
|
* Lists all master categories.
|
|
552
590
|
*/
|
|
553
591
|
listCategoriesAsync(): Promise<Array<{
|
|
554
|
-
id:
|
|
592
|
+
id: string;
|
|
555
593
|
name: string;
|
|
556
594
|
color: string;
|
|
557
595
|
}>>;
|
|
558
596
|
/**
|
|
559
597
|
* Creates a new master category.
|
|
560
598
|
*/
|
|
561
|
-
createCategoryAsync(name: string, color: string): Promise<
|
|
599
|
+
createCategoryAsync(name: string, color: string): Promise<string>;
|
|
562
600
|
/**
|
|
563
601
|
* Deletes a master category.
|
|
564
602
|
*/
|
|
565
|
-
deleteCategoryAsync(categoryId:
|
|
603
|
+
deleteCategoryAsync(categoryId: string): Promise<void>;
|
|
566
604
|
/**
|
|
567
605
|
* Lists all focused inbox overrides.
|
|
568
606
|
*/
|
|
569
607
|
listFocusedOverridesAsync(): Promise<Array<{
|
|
570
|
-
id:
|
|
608
|
+
id: string;
|
|
571
609
|
senderAddress: string;
|
|
572
610
|
classifyAs: string;
|
|
573
611
|
}>>;
|
|
574
612
|
/**
|
|
575
613
|
* Creates a focused inbox override.
|
|
576
614
|
*/
|
|
577
|
-
createFocusedOverrideAsync(senderAddress: string, classifyAs: 'focused' | 'other'): Promise<
|
|
615
|
+
createFocusedOverrideAsync(senderAddress: string, classifyAs: 'focused' | 'other'): Promise<string>;
|
|
578
616
|
/**
|
|
579
617
|
* Deletes a focused inbox override.
|
|
580
618
|
*/
|
|
581
|
-
deleteFocusedOverrideAsync(overrideId:
|
|
619
|
+
deleteFocusedOverrideAsync(overrideId: string): Promise<void>;
|
|
582
620
|
/**
|
|
583
621
|
* Gets internet message headers for an email.
|
|
584
622
|
*/
|
|
585
|
-
getMessageHeadersAsync(emailId:
|
|
623
|
+
getMessageHeadersAsync(emailId: string): Promise<Array<{
|
|
586
624
|
name: string;
|
|
587
625
|
value: string;
|
|
588
626
|
}>>;
|
|
589
627
|
/**
|
|
590
628
|
* Gets the MIME content of a message and saves it as an .eml file.
|
|
591
629
|
*/
|
|
592
|
-
getMessageMimeAsync(emailId:
|
|
630
|
+
getMessageMimeAsync(emailId: string): Promise<{
|
|
593
631
|
filePath: string;
|
|
594
632
|
}>;
|
|
595
633
|
/**
|
|
@@ -607,21 +645,24 @@ export declare class GraphRepository implements IRepository {
|
|
|
607
645
|
}>>;
|
|
608
646
|
/**
|
|
609
647
|
* Lists all calendar groups.
|
|
648
|
+
*
|
|
649
|
+
* Orphan entity: no Graph URL takes a calendar-group id as a path segment,
|
|
650
|
+
* so this returns the raw Graph id string rather than minting a token.
|
|
610
651
|
*/
|
|
611
652
|
listCalendarGroupsAsync(): Promise<Array<{
|
|
612
|
-
id:
|
|
653
|
+
id: string;
|
|
613
654
|
name: string;
|
|
614
655
|
classId: string;
|
|
615
656
|
}>>;
|
|
616
657
|
/**
|
|
617
658
|
* Creates a new calendar group.
|
|
618
659
|
*/
|
|
619
|
-
createCalendarGroupAsync(name: string): Promise<
|
|
660
|
+
createCalendarGroupAsync(name: string): Promise<string>;
|
|
620
661
|
/**
|
|
621
662
|
* Lists all permissions for a calendar.
|
|
622
663
|
*/
|
|
623
|
-
listCalendarPermissionsAsync(calendarId:
|
|
624
|
-
id:
|
|
664
|
+
listCalendarPermissionsAsync(calendarId: string): Promise<Array<{
|
|
665
|
+
id: string;
|
|
625
666
|
emailAddress: string;
|
|
626
667
|
role: string;
|
|
627
668
|
isRemovable: boolean;
|
|
@@ -630,11 +671,11 @@ export declare class GraphRepository implements IRepository {
|
|
|
630
671
|
/**
|
|
631
672
|
* Creates a calendar permission (shares a calendar with someone).
|
|
632
673
|
*/
|
|
633
|
-
createCalendarPermissionAsync(calendarId:
|
|
674
|
+
createCalendarPermissionAsync(calendarId: string, email: string, role: string): Promise<string>;
|
|
634
675
|
/**
|
|
635
676
|
* Deletes a calendar permission.
|
|
636
677
|
*/
|
|
637
|
-
deleteCalendarPermissionAsync(permissionId:
|
|
678
|
+
deleteCalendarPermissionAsync(permissionId: string): Promise<void>;
|
|
638
679
|
/**
|
|
639
680
|
* Lists all room lists.
|
|
640
681
|
*/
|
|
@@ -653,24 +694,24 @@ export declare class GraphRepository implements IRepository {
|
|
|
653
694
|
* Lists all joined teams with cached numeric IDs.
|
|
654
695
|
*/
|
|
655
696
|
listTeamsAsync(): Promise<Array<{
|
|
656
|
-
id:
|
|
697
|
+
id: string;
|
|
657
698
|
name: string;
|
|
658
699
|
description: string;
|
|
659
700
|
}>>;
|
|
660
701
|
/**
|
|
661
702
|
* Lists all channels in a team with cached numeric IDs.
|
|
662
703
|
*/
|
|
663
|
-
listChannelsAsync(teamId:
|
|
664
|
-
id:
|
|
704
|
+
listChannelsAsync(teamId: string): Promise<Array<{
|
|
705
|
+
id: string;
|
|
665
706
|
name: string;
|
|
666
707
|
description: string;
|
|
667
708
|
membershipType: string;
|
|
668
709
|
}>>;
|
|
669
710
|
/**
|
|
670
|
-
* Gets a specific channel by
|
|
711
|
+
* Gets a specific channel by durable cn_ token.
|
|
671
712
|
*/
|
|
672
|
-
getChannelAsync(channelId:
|
|
673
|
-
id:
|
|
713
|
+
getChannelAsync(channelId: string): Promise<{
|
|
714
|
+
id: string;
|
|
674
715
|
name: string;
|
|
675
716
|
description: string;
|
|
676
717
|
membershipType: string;
|
|
@@ -679,22 +720,22 @@ export declare class GraphRepository implements IRepository {
|
|
|
679
720
|
/**
|
|
680
721
|
* Creates a new channel in a team.
|
|
681
722
|
*/
|
|
682
|
-
createChannelAsync(teamId:
|
|
723
|
+
createChannelAsync(teamId: string, name: string, description?: string): Promise<string>;
|
|
683
724
|
/**
|
|
684
725
|
* Updates a channel's properties.
|
|
685
726
|
*/
|
|
686
|
-
updateChannelAsync(channelId:
|
|
727
|
+
updateChannelAsync(channelId: string, updates: {
|
|
687
728
|
name?: string;
|
|
688
729
|
description?: string;
|
|
689
730
|
}): Promise<void>;
|
|
690
731
|
/**
|
|
691
732
|
* Deletes a channel.
|
|
692
733
|
*/
|
|
693
|
-
deleteChannelAsync(channelId:
|
|
734
|
+
deleteChannelAsync(channelId: string): Promise<void>;
|
|
694
735
|
/**
|
|
695
736
|
* Lists members of a team.
|
|
696
737
|
*/
|
|
697
|
-
listTeamMembersAsync(teamId:
|
|
738
|
+
listTeamMembersAsync(teamId: string): Promise<Array<{
|
|
698
739
|
id: string;
|
|
699
740
|
displayName: string;
|
|
700
741
|
email: string;
|
|
@@ -703,8 +744,8 @@ export declare class GraphRepository implements IRepository {
|
|
|
703
744
|
/**
|
|
704
745
|
* Lists recent messages in a channel.
|
|
705
746
|
*/
|
|
706
|
-
listChannelMessagesAsync(channelId:
|
|
707
|
-
id:
|
|
747
|
+
listChannelMessagesAsync(channelId: string, limit?: number): Promise<Array<{
|
|
748
|
+
id: string;
|
|
708
749
|
senderName: string;
|
|
709
750
|
senderEmail: string;
|
|
710
751
|
bodyPreview: string;
|
|
@@ -715,15 +756,15 @@ export declare class GraphRepository implements IRepository {
|
|
|
715
756
|
/**
|
|
716
757
|
* Gets a specific channel message with its replies.
|
|
717
758
|
*/
|
|
718
|
-
getChannelMessageAsync(messageId:
|
|
719
|
-
id:
|
|
759
|
+
getChannelMessageAsync(messageId: string): Promise<{
|
|
760
|
+
id: string;
|
|
720
761
|
senderName: string;
|
|
721
762
|
senderEmail: string;
|
|
722
763
|
bodyContent: string;
|
|
723
764
|
contentType: string;
|
|
724
765
|
createdDateTime: string;
|
|
725
766
|
replies: Array<{
|
|
726
|
-
id:
|
|
767
|
+
id: string;
|
|
727
768
|
senderName: string;
|
|
728
769
|
senderEmail: string;
|
|
729
770
|
bodyContent: string;
|
|
@@ -734,27 +775,27 @@ export declare class GraphRepository implements IRepository {
|
|
|
734
775
|
/**
|
|
735
776
|
* Sends a new message to a channel.
|
|
736
777
|
*/
|
|
737
|
-
sendChannelMessageAsync(channelId:
|
|
778
|
+
sendChannelMessageAsync(channelId: string, body: string, contentType?: string): Promise<string>;
|
|
738
779
|
/**
|
|
739
780
|
* Replies to a channel message.
|
|
740
781
|
*/
|
|
741
|
-
replyToChannelMessageAsync(messageId:
|
|
782
|
+
replyToChannelMessageAsync(messageId: string, body: string, contentType?: string): Promise<string>;
|
|
742
783
|
listChatsAsync(limit?: number): Promise<Array<{
|
|
743
|
-
id:
|
|
784
|
+
id: string;
|
|
744
785
|
topic: string;
|
|
745
786
|
chatType: string;
|
|
746
787
|
lastMessagePreview: string;
|
|
747
788
|
createdDateTime: string;
|
|
748
789
|
}>>;
|
|
749
|
-
getChatAsync(chatId:
|
|
750
|
-
id:
|
|
790
|
+
getChatAsync(chatId: string): Promise<{
|
|
791
|
+
id: string;
|
|
751
792
|
topic: string;
|
|
752
793
|
chatType: string;
|
|
753
794
|
createdDateTime: string;
|
|
754
795
|
webUrl: string;
|
|
755
796
|
}>;
|
|
756
|
-
listChatMessagesAsync(chatId:
|
|
757
|
-
id:
|
|
797
|
+
listChatMessagesAsync(chatId: string, limit?: number): Promise<Array<{
|
|
798
|
+
id: string;
|
|
758
799
|
senderName: string;
|
|
759
800
|
senderEmail: string;
|
|
760
801
|
bodyPreview: string;
|
|
@@ -762,35 +803,35 @@ export declare class GraphRepository implements IRepository {
|
|
|
762
803
|
contentType: string;
|
|
763
804
|
createdDateTime: string;
|
|
764
805
|
}>>;
|
|
765
|
-
sendChatMessageAsync(chatId:
|
|
766
|
-
listMessageReactionsAsync(messageId:
|
|
806
|
+
sendChatMessageAsync(chatId: string, body: string, contentType?: string): Promise<string>;
|
|
807
|
+
listMessageReactionsAsync(messageId: string, messageType: 'channel' | 'chat'): Promise<Array<{
|
|
767
808
|
reactionType: string;
|
|
768
809
|
user: {
|
|
769
810
|
displayName: string;
|
|
770
811
|
};
|
|
771
812
|
createdDateTime: string;
|
|
772
813
|
}>>;
|
|
773
|
-
addMessageReactionAsync(messageId:
|
|
774
|
-
removeMessageReactionAsync(messageId:
|
|
775
|
-
listChatMembersAsync(chatId:
|
|
814
|
+
addMessageReactionAsync(messageId: string, messageType: 'channel' | 'chat', reactionType: string): Promise<void>;
|
|
815
|
+
removeMessageReactionAsync(messageId: string, messageType: 'channel' | 'chat', reactionType: string): Promise<void>;
|
|
816
|
+
listChatMembersAsync(chatId: string): Promise<Array<{
|
|
776
817
|
displayName: string;
|
|
777
818
|
email: string;
|
|
778
819
|
roles: string[];
|
|
779
820
|
}>>;
|
|
780
821
|
/**
|
|
781
|
-
* Lists all plans the current user has.
|
|
822
|
+
* Lists all plans the current user has, minting durable pl_ tokens.
|
|
782
823
|
*/
|
|
783
824
|
listPlansAsync(): Promise<Array<{
|
|
784
|
-
id:
|
|
825
|
+
id: string;
|
|
785
826
|
title: string;
|
|
786
827
|
owner: string;
|
|
787
828
|
createdDateTime: string;
|
|
788
829
|
}>>;
|
|
789
830
|
/**
|
|
790
|
-
* Gets a specific plan
|
|
831
|
+
* Gets a specific plan.
|
|
791
832
|
*/
|
|
792
|
-
getPlanAsync(planId:
|
|
793
|
-
id:
|
|
833
|
+
getPlanAsync(planId: string): Promise<{
|
|
834
|
+
id: string;
|
|
794
835
|
title: string;
|
|
795
836
|
owner: string;
|
|
796
837
|
createdDateTime: string;
|
|
@@ -799,43 +840,62 @@ export declare class GraphRepository implements IRepository {
|
|
|
799
840
|
/**
|
|
800
841
|
* Creates a new plan.
|
|
801
842
|
*/
|
|
802
|
-
createPlanAsync(title: string, groupId: string): Promise<
|
|
843
|
+
createPlanAsync(title: string, groupId: string): Promise<string>;
|
|
803
844
|
/**
|
|
804
|
-
* Updates a plan (
|
|
845
|
+
* Updates a plan (U5b-5: fetches a fresh etag immediately before the write —
|
|
846
|
+
* etags are never cached across calls).
|
|
805
847
|
*/
|
|
806
|
-
updatePlanAsync(planId:
|
|
848
|
+
updatePlanAsync(planId: string, updates: {
|
|
807
849
|
title?: string;
|
|
808
850
|
}): Promise<void>;
|
|
809
851
|
/**
|
|
810
|
-
* Lists all buckets in a plan.
|
|
852
|
+
* Lists all buckets in a plan, minting durable pb_ tokens.
|
|
811
853
|
*/
|
|
812
|
-
listBucketsAsync(planId:
|
|
813
|
-
id:
|
|
854
|
+
listBucketsAsync(planId: string): Promise<Array<{
|
|
855
|
+
id: string;
|
|
814
856
|
name: string;
|
|
815
|
-
planId:
|
|
857
|
+
planId: string;
|
|
816
858
|
orderHint: string;
|
|
817
859
|
}>>;
|
|
818
860
|
/**
|
|
819
861
|
* Creates a new bucket in a plan.
|
|
820
862
|
*/
|
|
821
|
-
createBucketAsync(planId:
|
|
863
|
+
createBucketAsync(planId: string, name: string): Promise<string>;
|
|
822
864
|
/**
|
|
823
|
-
* Updates a bucket (
|
|
865
|
+
* Updates a bucket (U5b-5: fetches a fresh etag immediately before the write).
|
|
824
866
|
*/
|
|
825
|
-
updateBucketAsync(bucketId:
|
|
867
|
+
updateBucketAsync(bucketId: string, updates: {
|
|
826
868
|
name?: string;
|
|
827
869
|
}): Promise<void>;
|
|
828
870
|
/**
|
|
829
|
-
* Deletes a bucket (
|
|
871
|
+
* Deletes a bucket (U5b-5: fetches a fresh etag immediately before the write).
|
|
830
872
|
*/
|
|
831
|
-
deleteBucketAsync(bucketId:
|
|
873
|
+
deleteBucketAsync(bucketId: string): Promise<void>;
|
|
874
|
+
/**
|
|
875
|
+
* Lists all tasks in a plan, minting durable pt_ tokens.
|
|
876
|
+
*/
|
|
877
|
+
listPlannerTasksAsync(planId: string): Promise<Array<{
|
|
878
|
+
id: string;
|
|
879
|
+
title: string;
|
|
880
|
+
bucketId: string | null;
|
|
881
|
+
assignees: string[];
|
|
882
|
+
percentComplete: number;
|
|
883
|
+
priority: number;
|
|
884
|
+
startDateTime: string;
|
|
885
|
+
dueDateTime: string;
|
|
886
|
+
createdDateTime: string;
|
|
887
|
+
}>>;
|
|
832
888
|
/**
|
|
833
|
-
* Lists all tasks in
|
|
889
|
+
* Lists all Planner tasks assigned to the signed-in user, across every plan
|
|
890
|
+
* (`GET /me/planner/tasks`). Unlike the plan-scoped list, each task carries its
|
|
891
|
+
* own `planId`; the plan/bucket/task durable tokens are minted so follow-up
|
|
892
|
+
* get/update calls resolve without a re-list.
|
|
834
893
|
*/
|
|
835
|
-
|
|
836
|
-
id:
|
|
894
|
+
listMyPlannerTasksAsync(): Promise<Array<{
|
|
895
|
+
id: string;
|
|
837
896
|
title: string;
|
|
838
|
-
|
|
897
|
+
planId: string;
|
|
898
|
+
bucketId: string | null;
|
|
839
899
|
assignees: string[];
|
|
840
900
|
percentComplete: number;
|
|
841
901
|
priority: number;
|
|
@@ -844,12 +904,12 @@ export declare class GraphRepository implements IRepository {
|
|
|
844
904
|
createdDateTime: string;
|
|
845
905
|
}>>;
|
|
846
906
|
/**
|
|
847
|
-
* Gets a specific planner task
|
|
907
|
+
* Gets a specific planner task.
|
|
848
908
|
*/
|
|
849
|
-
getPlannerTaskAsync(taskId:
|
|
850
|
-
id:
|
|
909
|
+
getPlannerTaskAsync(taskId: string): Promise<{
|
|
910
|
+
id: string;
|
|
851
911
|
title: string;
|
|
852
|
-
bucketId:
|
|
912
|
+
bucketId: string | null;
|
|
853
913
|
assignees: string[];
|
|
854
914
|
percentComplete: number;
|
|
855
915
|
priority: number;
|
|
@@ -863,13 +923,13 @@ export declare class GraphRepository implements IRepository {
|
|
|
863
923
|
/**
|
|
864
924
|
* Creates a new planner task.
|
|
865
925
|
*/
|
|
866
|
-
createPlannerTaskAsync(planId:
|
|
926
|
+
createPlannerTaskAsync(planId: string, title: string, bucketId?: string, assignments?: Record<string, object>, priority?: number, startDate?: string, dueDate?: string): Promise<string>;
|
|
867
927
|
/**
|
|
868
|
-
* Updates a planner task (
|
|
928
|
+
* Updates a planner task (U5b-5: fetches a fresh etag immediately before the write).
|
|
869
929
|
*/
|
|
870
|
-
updatePlannerTaskAsync(taskId:
|
|
930
|
+
updatePlannerTaskAsync(taskId: string, updates: {
|
|
871
931
|
title?: string;
|
|
872
|
-
bucketId?:
|
|
932
|
+
bucketId?: string;
|
|
873
933
|
percentComplete?: number;
|
|
874
934
|
priority?: number;
|
|
875
935
|
startDate?: string;
|
|
@@ -877,14 +937,15 @@ export declare class GraphRepository implements IRepository {
|
|
|
877
937
|
assignments?: Record<string, object>;
|
|
878
938
|
}): Promise<void>;
|
|
879
939
|
/**
|
|
880
|
-
* Deletes a planner task (
|
|
940
|
+
* Deletes a planner task (U5b-5: fetches a fresh etag immediately before the write).
|
|
881
941
|
*/
|
|
882
|
-
deletePlannerTaskAsync(taskId:
|
|
942
|
+
deletePlannerTaskAsync(taskId: string): Promise<void>;
|
|
883
943
|
/**
|
|
884
|
-
* Gets details for a planner task (description, checklist, references).
|
|
944
|
+
* Gets details for a planner task (description, checklist, references). Task
|
|
945
|
+
* details piggyback the pt_ task token — they have no id of their own.
|
|
885
946
|
*/
|
|
886
|
-
getPlannerTaskDetailsAsync(taskId:
|
|
887
|
-
id:
|
|
947
|
+
getPlannerTaskDetailsAsync(taskId: string): Promise<{
|
|
948
|
+
id: string;
|
|
888
949
|
description: string;
|
|
889
950
|
checklist: Record<string, unknown>;
|
|
890
951
|
references: Record<string, unknown>;
|
|
@@ -899,10 +960,10 @@ export declare class GraphRepository implements IRepository {
|
|
|
899
960
|
* Partial failures are handled gracefully: tasks whose detail fetch failed will
|
|
900
961
|
* have `details` set to `undefined`.
|
|
901
962
|
*/
|
|
902
|
-
listPlannerTasksWithDetailsAsync(planId:
|
|
903
|
-
id:
|
|
963
|
+
listPlannerTasksWithDetailsAsync(planId: string): Promise<Array<{
|
|
964
|
+
id: string;
|
|
904
965
|
title: string;
|
|
905
|
-
bucketId:
|
|
966
|
+
bucketId: string | null;
|
|
906
967
|
assignees: string[];
|
|
907
968
|
percentComplete: number;
|
|
908
969
|
priority: number;
|
|
@@ -917,9 +978,11 @@ export declare class GraphRepository implements IRepository {
|
|
|
917
978
|
} | undefined;
|
|
918
979
|
}>>;
|
|
919
980
|
/**
|
|
920
|
-
* Updates details for a planner task (
|
|
981
|
+
* Updates details for a planner task (U5b-5: fetches a fresh etag immediately
|
|
982
|
+
* before the write — the task details etag is independent of the task's own
|
|
983
|
+
* etag).
|
|
921
984
|
*/
|
|
922
|
-
updatePlannerTaskDetailsAsync(taskId:
|
|
985
|
+
updatePlannerTaskDetailsAsync(taskId: string, updates: {
|
|
923
986
|
description?: string;
|
|
924
987
|
checklist?: Record<string, object>;
|
|
925
988
|
references?: Record<string, object>;
|
|
@@ -927,44 +990,44 @@ export declare class GraphRepository implements IRepository {
|
|
|
927
990
|
/**
|
|
928
991
|
* Assembles plan, buckets, and tasks into a unified visualization data object.
|
|
929
992
|
*/
|
|
930
|
-
getPlanVisualizationDataAsync(planId:
|
|
993
|
+
getPlanVisualizationDataAsync(planId: string): Promise<PlanVisualizationData>;
|
|
931
994
|
listOnlineMeetingsAsync(limit?: number): Promise<Array<{
|
|
932
|
-
id:
|
|
995
|
+
id: string;
|
|
933
996
|
subject: string;
|
|
934
997
|
startDateTime: string;
|
|
935
998
|
endDateTime: string;
|
|
936
999
|
joinUrl: string;
|
|
937
1000
|
}>>;
|
|
938
|
-
getOnlineMeetingAsync(meetingId:
|
|
939
|
-
id:
|
|
1001
|
+
getOnlineMeetingAsync(meetingId: string): Promise<{
|
|
1002
|
+
id: string;
|
|
940
1003
|
subject: string;
|
|
941
1004
|
startDateTime: string;
|
|
942
1005
|
endDateTime: string;
|
|
943
1006
|
joinUrl: string;
|
|
944
1007
|
participants: unknown;
|
|
945
1008
|
} | undefined>;
|
|
946
|
-
listMeetingRecordingsAsync(meetingId:
|
|
947
|
-
id:
|
|
1009
|
+
listMeetingRecordingsAsync(meetingId: string): Promise<Array<{
|
|
1010
|
+
id: string;
|
|
948
1011
|
createdDateTime: string;
|
|
949
1012
|
recordingContentUrl: string;
|
|
950
1013
|
}>>;
|
|
951
|
-
downloadMeetingRecordingAsync(recordingId:
|
|
952
|
-
listMeetingTranscriptsAsync(meetingId:
|
|
953
|
-
id:
|
|
1014
|
+
downloadMeetingRecordingAsync(recordingId: string, outputPath: string): Promise<string>;
|
|
1015
|
+
listMeetingTranscriptsAsync(meetingId: string): Promise<Array<{
|
|
1016
|
+
id: string;
|
|
954
1017
|
createdDateTime: string;
|
|
955
1018
|
contentUrl: string;
|
|
956
1019
|
}>>;
|
|
957
|
-
getMeetingTranscriptContentAsync(transcriptId:
|
|
958
|
-
listWorksheetsAsync(fileId:
|
|
959
|
-
getWorksheetRangeAsync(fileId:
|
|
960
|
-
getUsedRangeAsync(fileId:
|
|
961
|
-
updateWorksheetRangeAsync(fileId:
|
|
962
|
-
getTableDataAsync(fileId:
|
|
1020
|
+
getMeetingTranscriptContentAsync(transcriptId: string, format?: string): Promise<string>;
|
|
1021
|
+
listWorksheetsAsync(fileId: string): Promise<Record<string, unknown>[]>;
|
|
1022
|
+
getWorksheetRangeAsync(fileId: string, worksheetName: string, range: string): Promise<Record<string, unknown>>;
|
|
1023
|
+
getUsedRangeAsync(fileId: string, worksheetName: string): Promise<Record<string, unknown>>;
|
|
1024
|
+
updateWorksheetRangeAsync(fileId: string, worksheetName: string, range: string, values: unknown[][]): Promise<Record<string, unknown>>;
|
|
1025
|
+
getTableDataAsync(fileId: string, tableName: string): Promise<Record<string, unknown>[]>;
|
|
963
1026
|
/**
|
|
964
1027
|
* Lists files/folders in a drive folder (or root).
|
|
965
1028
|
*/
|
|
966
|
-
listDriveItemsAsync(folderId?:
|
|
967
|
-
id:
|
|
1029
|
+
listDriveItemsAsync(folderId?: string): Promise<Array<{
|
|
1030
|
+
id: string;
|
|
968
1031
|
name: string;
|
|
969
1032
|
size: number;
|
|
970
1033
|
lastModified: string;
|
|
@@ -975,7 +1038,7 @@ export declare class GraphRepository implements IRepository {
|
|
|
975
1038
|
* Searches drive items by query.
|
|
976
1039
|
*/
|
|
977
1040
|
searchDriveItemsAsync(query: string, limit?: number): Promise<Array<{
|
|
978
|
-
id:
|
|
1041
|
+
id: string;
|
|
979
1042
|
name: string;
|
|
980
1043
|
size: number;
|
|
981
1044
|
lastModified: string;
|
|
@@ -985,8 +1048,8 @@ export declare class GraphRepository implements IRepository {
|
|
|
985
1048
|
/**
|
|
986
1049
|
* Gets metadata for a specific drive item.
|
|
987
1050
|
*/
|
|
988
|
-
getDriveItemAsync(itemId:
|
|
989
|
-
id:
|
|
1051
|
+
getDriveItemAsync(itemId: string): Promise<{
|
|
1052
|
+
id: string;
|
|
990
1053
|
name: string;
|
|
991
1054
|
size: number;
|
|
992
1055
|
lastModified: string;
|
|
@@ -998,19 +1061,19 @@ export declare class GraphRepository implements IRepository {
|
|
|
998
1061
|
/**
|
|
999
1062
|
* Downloads a drive item to a local file.
|
|
1000
1063
|
*/
|
|
1001
|
-
downloadFileAsync(itemId:
|
|
1064
|
+
downloadFileAsync(itemId: string, outputPath: string): Promise<{
|
|
1002
1065
|
savedPath: string;
|
|
1003
1066
|
size: number;
|
|
1004
1067
|
}>;
|
|
1005
1068
|
/**
|
|
1006
1069
|
* Uploads a local file to OneDrive.
|
|
1007
1070
|
*/
|
|
1008
|
-
uploadFileAsync(parentPath: string, fileName: string, localFilePath: string): Promise<
|
|
1071
|
+
uploadFileAsync(parentPath: string, fileName: string, localFilePath: string): Promise<string>;
|
|
1009
1072
|
/**
|
|
1010
1073
|
* Lists recently accessed drive items.
|
|
1011
1074
|
*/
|
|
1012
1075
|
listRecentFilesAsync(): Promise<Array<{
|
|
1013
|
-
id:
|
|
1076
|
+
id: string;
|
|
1014
1077
|
name: string;
|
|
1015
1078
|
size: number;
|
|
1016
1079
|
lastModified: string;
|
|
@@ -1021,7 +1084,7 @@ export declare class GraphRepository implements IRepository {
|
|
|
1021
1084
|
* Lists drive items shared with the user.
|
|
1022
1085
|
*/
|
|
1023
1086
|
listSharedWithMeAsync(): Promise<Array<{
|
|
1024
|
-
id:
|
|
1087
|
+
id: string;
|
|
1025
1088
|
name: string;
|
|
1026
1089
|
size: number;
|
|
1027
1090
|
lastModified: string;
|
|
@@ -1031,7 +1094,7 @@ export declare class GraphRepository implements IRepository {
|
|
|
1031
1094
|
/**
|
|
1032
1095
|
* Creates a sharing link for a drive item.
|
|
1033
1096
|
*/
|
|
1034
|
-
createSharingLinkAsync(itemId:
|
|
1097
|
+
createSharingLinkAsync(itemId: string, type: string, scope: string): Promise<{
|
|
1035
1098
|
webUrl: string;
|
|
1036
1099
|
type: string;
|
|
1037
1100
|
scope: string;
|
|
@@ -1039,21 +1102,21 @@ export declare class GraphRepository implements IRepository {
|
|
|
1039
1102
|
/**
|
|
1040
1103
|
* Deletes a drive item.
|
|
1041
1104
|
*/
|
|
1042
|
-
deleteDriveItemAsync(itemId:
|
|
1105
|
+
deleteDriveItemAsync(itemId: string): Promise<void>;
|
|
1043
1106
|
/**
|
|
1044
|
-
* Lists followed SharePoint sites,
|
|
1107
|
+
* Lists followed SharePoint sites, minting durable si_ tokens.
|
|
1045
1108
|
*/
|
|
1046
1109
|
listSitesAsync(): Promise<Array<{
|
|
1047
|
-
id:
|
|
1110
|
+
id: string;
|
|
1048
1111
|
name: string;
|
|
1049
1112
|
webUrl: string;
|
|
1050
1113
|
displayName: string;
|
|
1051
1114
|
}>>;
|
|
1052
1115
|
/**
|
|
1053
|
-
* Searches SharePoint sites by keyword,
|
|
1116
|
+
* Searches SharePoint sites by keyword, minting durable si_ tokens.
|
|
1054
1117
|
*/
|
|
1055
1118
|
searchSitesAsync(query: string): Promise<Array<{
|
|
1056
|
-
id:
|
|
1119
|
+
id: string;
|
|
1057
1120
|
name: string;
|
|
1058
1121
|
webUrl: string;
|
|
1059
1122
|
displayName: string;
|
|
@@ -1061,27 +1124,27 @@ export declare class GraphRepository implements IRepository {
|
|
|
1061
1124
|
/**
|
|
1062
1125
|
* Gets details for a specific SharePoint site.
|
|
1063
1126
|
*/
|
|
1064
|
-
getSiteAsync(siteId:
|
|
1065
|
-
id:
|
|
1127
|
+
getSiteAsync(siteId: string): Promise<{
|
|
1128
|
+
id: string;
|
|
1066
1129
|
name: string;
|
|
1067
1130
|
webUrl: string;
|
|
1068
1131
|
displayName: string;
|
|
1069
1132
|
description: string;
|
|
1070
1133
|
}>;
|
|
1071
1134
|
/**
|
|
1072
|
-
* Lists document libraries for a SharePoint site,
|
|
1135
|
+
* Lists document libraries for a SharePoint site, minting durable dl_ tokens.
|
|
1073
1136
|
*/
|
|
1074
|
-
listDocumentLibrariesAsync(siteId:
|
|
1075
|
-
id:
|
|
1137
|
+
listDocumentLibrariesAsync(siteId: string): Promise<Array<{
|
|
1138
|
+
id: string;
|
|
1076
1139
|
name: string;
|
|
1077
1140
|
webUrl: string;
|
|
1078
1141
|
driveType: string;
|
|
1079
1142
|
}>>;
|
|
1080
1143
|
/**
|
|
1081
|
-
* Lists items in a document library or folder,
|
|
1144
|
+
* Lists items in a document library or folder, minting durable li_ tokens.
|
|
1082
1145
|
*/
|
|
1083
|
-
listLibraryItemsAsync(libraryId:
|
|
1084
|
-
id:
|
|
1146
|
+
listLibraryItemsAsync(libraryId: string, folderId?: string): Promise<Array<{
|
|
1147
|
+
id: string;
|
|
1085
1148
|
name: string;
|
|
1086
1149
|
size: number;
|
|
1087
1150
|
webUrl: string;
|
|
@@ -1091,14 +1154,84 @@ export declare class GraphRepository implements IRepository {
|
|
|
1091
1154
|
/**
|
|
1092
1155
|
* Downloads a file from a document library to the specified path.
|
|
1093
1156
|
*/
|
|
1094
|
-
downloadLibraryFileAsync(itemId:
|
|
1157
|
+
downloadLibraryFileAsync(itemId: string, outputPath: string): Promise<string>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Resolves a folder id (durable `fd_` token or raw Graph id) to its Graph id.
|
|
1160
|
+
*/
|
|
1161
|
+
getFolderGraphId(folderId: string): string;
|
|
1162
|
+
/**
|
|
1163
|
+
* Lists the SharePoint lists in a site, minting durable sl_ tokens. Each list
|
|
1164
|
+
* token carries the {siteId, listId} tuple its Graph URL needs.
|
|
1165
|
+
*/
|
|
1166
|
+
listSharePointListsAsync(siteId: string): Promise<Array<{
|
|
1167
|
+
id: string;
|
|
1168
|
+
name: string;
|
|
1169
|
+
displayName: string;
|
|
1170
|
+
description: string;
|
|
1171
|
+
webUrl: string;
|
|
1172
|
+
}>>;
|
|
1173
|
+
/**
|
|
1174
|
+
* Gets a specific SharePoint list, resolving the sl_ token to its tuple.
|
|
1175
|
+
*/
|
|
1176
|
+
getSharePointListAsync(listId: string): Promise<{
|
|
1177
|
+
id: string;
|
|
1178
|
+
name: string;
|
|
1179
|
+
displayName: string;
|
|
1180
|
+
description: string;
|
|
1181
|
+
webUrl: string;
|
|
1182
|
+
}>;
|
|
1183
|
+
/**
|
|
1184
|
+
* Creates a SharePoint list in a site, minting a durable sl_ token.
|
|
1185
|
+
*/
|
|
1186
|
+
createSharePointListAsync(siteId: string, displayName: string, description?: string): Promise<string>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Lists the column definitions for a SharePoint list. Columns are addressed by
|
|
1189
|
+
* name in item field values, so they carry no durable token.
|
|
1190
|
+
*/
|
|
1191
|
+
listSharePointListColumnsAsync(listId: string): Promise<Array<{
|
|
1192
|
+
id: string;
|
|
1193
|
+
name: string;
|
|
1194
|
+
displayName: string;
|
|
1195
|
+
columnType: string;
|
|
1196
|
+
required: boolean;
|
|
1197
|
+
readOnly: boolean;
|
|
1198
|
+
}>>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Lists the items in a SharePoint list, minting durable sn_ tokens that carry
|
|
1201
|
+
* the {siteId, listId, itemId} tuple.
|
|
1202
|
+
*/
|
|
1203
|
+
listSharePointListItemsAsync(listId: string, limit?: number): Promise<Array<{
|
|
1204
|
+
id: string;
|
|
1205
|
+
fields: Record<string, unknown>;
|
|
1206
|
+
webUrl: string;
|
|
1207
|
+
createdDateTime: string;
|
|
1208
|
+
lastModifiedDateTime: string;
|
|
1209
|
+
}>>;
|
|
1210
|
+
/**
|
|
1211
|
+
* Gets a specific SharePoint list item, resolving the sn_ token to its tuple.
|
|
1212
|
+
*/
|
|
1213
|
+
getSharePointListItemAsync(itemId: string): Promise<{
|
|
1214
|
+
id: string;
|
|
1215
|
+
fields: Record<string, unknown>;
|
|
1216
|
+
webUrl: string;
|
|
1217
|
+
createdDateTime: string;
|
|
1218
|
+
lastModifiedDateTime: string;
|
|
1219
|
+
}>;
|
|
1220
|
+
/**
|
|
1221
|
+
* Creates an item in a SharePoint list, minting a durable sn_ token.
|
|
1222
|
+
*/
|
|
1223
|
+
createSharePointListItemAsync(listId: string, fields: Record<string, unknown>): Promise<string>;
|
|
1224
|
+
/**
|
|
1225
|
+
* Updates the field values of a SharePoint list item.
|
|
1226
|
+
*/
|
|
1227
|
+
updateSharePointListItemAsync(itemId: string, fields: Record<string, unknown>): Promise<void>;
|
|
1095
1228
|
/**
|
|
1096
|
-
*
|
|
1229
|
+
* Deletes an item from a SharePoint list.
|
|
1097
1230
|
*/
|
|
1098
|
-
|
|
1231
|
+
deleteSharePointListItemAsync(itemId: string): Promise<void>;
|
|
1099
1232
|
}
|
|
1100
1233
|
/**
|
|
1101
1234
|
* Creates a Microsoft Graph API repository.
|
|
1102
1235
|
*/
|
|
1103
|
-
export declare function createGraphRepository(deviceCodeCallback?: DeviceCodeCallback): GraphRepository;
|
|
1236
|
+
export declare function createGraphRepository(deviceCodeCallback?: DeviceCodeCallback, store?: StateStore, accountId?: () => string): GraphRepository;
|
|
1104
1237
|
//# sourceMappingURL=repository.d.ts.map
|