@jbctechsolutions/mcp-office365 3.0.0 → 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 +42 -65
- package/dist/approval/hash.d.ts +8 -8
- package/dist/approval/token-manager.d.ts +12 -6
- package/dist/approval/token-manager.d.ts.map +1 -1
- package/dist/approval/token-manager.js +11 -3
- 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 +4 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +18 -3
- 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 +8 -0
- package/dist/graph/auth/config.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/client/graph-client.d.ts +105 -0
- package/dist/graph/client/graph-client.d.ts.map +1 -1
- package/dist/graph/client/graph-client.js +414 -18
- 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 +400 -270
- package/dist/graph/repository.d.ts.map +1 -1
- package/dist/graph/repository.js +739 -1046
- package/dist/graph/repository.js.map +1 -1
- 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 +2 -1
- package/dist/ids/resolver.d.ts.map +1 -1
- package/dist/ids/resolver.js +19 -4
- package/dist/ids/resolver.js.map +1 -1
- 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 +7 -1
- package/dist/ids/token.d.ts.map +1 -1
- package/dist/ids/token.js +46 -7
- package/dist/ids/token.js.map +1 -1
- package/dist/index.d.ts +4 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -100
- 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.map +1 -1
- package/dist/registry/all-tools.js +8 -4
- package/dist/registry/all-tools.js.map +1 -1
- package/dist/registry/context.d.ts +1 -7
- package/dist/registry/context.d.ts.map +1 -1
- package/dist/registry/context.js +0 -11
- package/dist/registry/context.js.map +1 -1
- 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 +2 -2
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +1 -1
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/registry.d.ts +11 -0
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +87 -0
- package/dist/registry/registry.js.map +1 -1
- package/dist/registry/types.d.ts +61 -13
- package/dist/registry/types.d.ts.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/schema.d.ts +2 -3
- package/dist/state/schema.d.ts.map +1 -1
- package/dist/state/schema.js +26 -3
- package/dist/state/schema.js.map +1 -1
- package/dist/state/store.d.ts +3 -0
- package/dist/state/store.d.ts.map +1 -1
- package/dist/state/store.js +4 -0
- package/dist/state/store.js.map +1 -1
- package/dist/tools/calendar-graph.d.ts.map +1 -1
- package/dist/tools/calendar-graph.js +10 -9
- package/dist/tools/calendar-graph.js.map +1 -1
- package/dist/tools/calendar-permissions.d.ts +7 -7
- package/dist/tools/calendar-permissions.d.ts.map +1 -1
- package/dist/tools/calendar-permissions.js +7 -4
- package/dist/tools/calendar-permissions.js.map +1 -1
- package/dist/tools/calendar.d.ts +14 -114
- package/dist/tools/calendar.d.ts.map +1 -1
- package/dist/tools/calendar.js +41 -202
- package/dist/tools/calendar.js.map +1 -1
- package/dist/tools/categories.d.ts +4 -4
- package/dist/tools/categories.d.ts.map +1 -1
- package/dist/tools/categories.js +5 -2
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/checklist-items.d.ts +9 -9
- package/dist/tools/checklist-items.d.ts.map +1 -1
- package/dist/tools/checklist-items.js +8 -5
- package/dist/tools/checklist-items.js.map +1 -1
- package/dist/tools/contact-folders.d.ts +2 -2
- package/dist/tools/contact-folders.d.ts.map +1 -1
- package/dist/tools/contact-folders.js +5 -2
- package/dist/tools/contact-folders.js.map +1 -1
- package/dist/tools/contacts-graph.d.ts +1 -1
- package/dist/tools/contacts-graph.d.ts.map +1 -1
- package/dist/tools/contacts-graph.js +8 -6
- package/dist/tools/contacts-graph.js.map +1 -1
- package/dist/tools/contacts.d.ts +9 -44
- package/dist/tools/contacts.d.ts.map +1 -1
- package/dist/tools/contacts.js +23 -131
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/excel.d.ts +10 -10
- package/dist/tools/excel.d.ts.map +1 -1
- package/dist/tools/excel.js +9 -6
- package/dist/tools/excel.js.map +1 -1
- package/dist/tools/focused-overrides.d.ts +4 -4
- package/dist/tools/focused-overrides.d.ts.map +1 -1
- package/dist/tools/focused-overrides.js +5 -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 +7 -7
- package/dist/tools/linked-resources.d.ts.map +1 -1
- package/dist/tools/linked-resources.js +7 -4
- package/dist/tools/linked-resources.js.map +1 -1
- package/dist/tools/mail-graph.d.ts.map +1 -1
- package/dist/tools/mail-graph.js +21 -12
- package/dist/tools/mail-graph.js.map +1 -1
- package/dist/tools/mail-rules.d.ts +8 -8
- package/dist/tools/mail-rules.d.ts.map +1 -1
- package/dist/tools/mail-rules.js +7 -7
- package/dist/tools/mail-rules.js.map +1 -1
- package/dist/tools/mail-send.d.ts +27 -27
- package/dist/tools/mail-send.d.ts.map +1 -1
- package/dist/tools/mail-send.js +30 -19
- package/dist/tools/mail-send.js.map +1 -1
- package/dist/tools/mail.d.ts +22 -79
- package/dist/tools/mail.d.ts.map +1 -1
- package/dist/tools/mail.js +45 -293
- package/dist/tools/mail.js.map +1 -1
- package/dist/tools/mailbox-organization.d.ts +34 -37
- package/dist/tools/mailbox-organization.d.ts.map +1 -1
- package/dist/tools/mailbox-organization.js +72 -64
- package/dist/tools/mailbox-organization.js.map +1 -1
- package/dist/tools/meetings.d.ts +14 -14
- package/dist/tools/meetings.d.ts.map +1 -1
- package/dist/tools/meetings.js +8 -6
- package/dist/tools/meetings.js.map +1 -1
- package/dist/tools/onedrive.d.ts +16 -16
- package/dist/tools/onedrive.d.ts.map +1 -1
- package/dist/tools/onedrive.js +16 -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/planner-visualization.d.ts +5 -5
- package/dist/tools/planner-visualization.d.ts.map +1 -1
- package/dist/tools/planner-visualization.js +5 -4
- package/dist/tools/planner-visualization.js.map +1 -1
- package/dist/tools/planner.d.ts +59 -39
- package/dist/tools/planner.d.ts.map +1 -1
- package/dist/tools/planner.js +48 -23
- package/dist/tools/planner.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 +14 -14
- package/dist/tools/sharepoint.d.ts.map +1 -1
- package/dist/tools/sharepoint.js +11 -9
- package/dist/tools/sharepoint.js.map +1 -1
- package/dist/tools/task-attachments.d.ts +7 -7
- package/dist/tools/task-attachments.d.ts.map +1 -1
- package/dist/tools/task-attachments.js +7 -4
- package/dist/tools/task-attachments.js.map +1 -1
- package/dist/tools/task-lists.d.ts +3 -3
- package/dist/tools/task-lists.d.ts.map +1 -1
- package/dist/tools/task-lists.js +10 -6
- package/dist/tools/task-lists.js.map +1 -1
- package/dist/tools/tasks-graph.d.ts +2 -2
- package/dist/tools/tasks-graph.d.ts.map +1 -1
- package/dist/tools/tasks-graph.js +6 -4
- package/dist/tools/tasks-graph.js.map +1 -1
- package/dist/tools/tasks.d.ts +8 -43
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +19 -122
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/teams.d.ts +46 -46
- package/dist/tools/teams.d.ts.map +1 -1
- package/dist/tools/teams.js +34 -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 +15 -34
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +13 -49
- 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/accounts.d.ts +0 -37
- package/dist/tools/accounts.d.ts.map +0 -1
- package/dist/tools/accounts.js +0 -68
- package/dist/tools/accounts.js.map +0 -1
- package/dist/tools/calendar-apple.d.ts +0 -39
- package/dist/tools/calendar-apple.d.ts.map +0 -1
- package/dist/tools/calendar-apple.js +0 -159
- package/dist/tools/calendar-apple.js.map +0 -1
- package/dist/tools/mail-apple.d.ts +0 -40
- package/dist/tools/mail-apple.d.ts.map +0 -1
- package/dist/tools/mail-apple.js +0 -146
- package/dist/tools/mail-apple.js.map +0 -1
- package/dist/tools/notes.d.ts +0 -86
- package/dist/tools/notes.d.ts.map +0 -1
- package/dist/tools/notes.js +0 -202
- package/dist/tools/notes.js.map +0 -1
|
@@ -11,6 +11,7 @@
|
|
|
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';
|
|
14
15
|
import type { CompiledSearch } from '../search/compiler.js';
|
|
15
16
|
import type { PlanVisualizationData } from '../visualization/types.js';
|
|
16
17
|
/**
|
|
@@ -20,26 +21,76 @@ import type { PlanVisualizationData } from '../visualization/types.js';
|
|
|
20
21
|
*/
|
|
21
22
|
export declare class GraphRepository implements IRepository {
|
|
22
23
|
private readonly client;
|
|
24
|
+
private readonly store;
|
|
25
|
+
private readonly accountId;
|
|
23
26
|
private readonly deltaLinks;
|
|
24
|
-
|
|
25
|
-
|
|
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;
|
|
26
57
|
private resolveTeamId;
|
|
27
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;
|
|
28
79
|
private resolveChatId;
|
|
29
80
|
listFolders(): FolderRow[];
|
|
30
81
|
listFoldersAsync(): Promise<FolderRow[]>;
|
|
31
|
-
getFolder(_id:
|
|
32
|
-
getFolderAsync(id:
|
|
82
|
+
getFolder(_id: string): FolderRow | undefined;
|
|
83
|
+
getFolderAsync(id: string): Promise<FolderRow | undefined>;
|
|
33
84
|
listEmails(_folderId: number, _limit: number, _offset: number): EmailRow[];
|
|
34
|
-
listEmailsAsync(folderId:
|
|
85
|
+
listEmailsAsync(folderId: string, limit: number, offset: number): Promise<EmailRow[]>;
|
|
35
86
|
private listEmailsWithGraphId;
|
|
36
87
|
listUnreadEmails(_folderId: number, _limit: number, _offset: number): EmailRow[];
|
|
37
|
-
listUnreadEmailsAsync(folderId:
|
|
88
|
+
listUnreadEmailsAsync(folderId: string, limit: number, offset: number): Promise<EmailRow[]>;
|
|
38
89
|
private listUnreadEmailsWithGraphId;
|
|
39
90
|
searchEmails(_query: string, _limit: number): EmailRow[];
|
|
40
91
|
searchEmailsAsync(query: string, limit: number): Promise<EmailRow[]>;
|
|
41
92
|
searchEmailsInFolder(_folderId: number, _query: string, _limit: number): EmailRow[];
|
|
42
|
-
searchEmailsInFolderAsync(folderId:
|
|
93
|
+
searchEmailsInFolderAsync(folderId: string, query: string, limit: number): Promise<EmailRow[]>;
|
|
43
94
|
private searchEmailsInFolderWithGraphId;
|
|
44
95
|
/**
|
|
45
96
|
* Structured advanced search (U7 / D9). Runs a compiled query on the correct
|
|
@@ -48,71 +99,70 @@ export declare class GraphRepository implements IRepository {
|
|
|
48
99
|
*/
|
|
49
100
|
searchEmailsStructuredAsync(compiled: CompiledSearch, limit: number): Promise<EmailRow[]>;
|
|
50
101
|
private runStructuredSearch;
|
|
51
|
-
checkNewEmailsAsync(folderId:
|
|
102
|
+
checkNewEmailsAsync(folderId: string): Promise<{
|
|
52
103
|
emails: EmailRow[];
|
|
53
104
|
isInitialSync: boolean;
|
|
54
105
|
}>;
|
|
55
|
-
getEmail(_id:
|
|
56
|
-
|
|
57
|
-
* Populates the message ID cache by listing messages from mail folders.
|
|
58
|
-
* Used as a fallback when getEmailAsync is called with an ID not yet in cache
|
|
59
|
-
* (e.g. after server restart or when list_emails/search_emails wasn't called first).
|
|
60
|
-
*/
|
|
61
|
-
private refreshMessageCacheForGetEmail;
|
|
62
|
-
getEmailAsync(id: number): Promise<EmailRow | undefined>;
|
|
106
|
+
getEmail(_id: string): EmailRow | undefined;
|
|
107
|
+
getEmailAsync(id: string): Promise<EmailRow | undefined>;
|
|
63
108
|
getUnreadCount(): number;
|
|
64
109
|
getUnreadCountAsync(): Promise<number>;
|
|
65
110
|
getUnreadCountByFolder(_folderId: number): number;
|
|
66
|
-
getUnreadCountByFolderAsync(folderId:
|
|
111
|
+
getUnreadCountByFolderAsync(folderId: string): Promise<number>;
|
|
67
112
|
/**
|
|
68
113
|
* Lists all messages in a conversation thread.
|
|
69
114
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
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.
|
|
72
118
|
*/
|
|
73
|
-
listConversationAsync(messageId:
|
|
119
|
+
listConversationAsync(messageId: string, limit: number): Promise<EmailRow[]>;
|
|
74
120
|
listCalendars(): FolderRow[];
|
|
75
121
|
listCalendarsAsync(): Promise<FolderRow[]>;
|
|
76
122
|
listEvents(_limit: number): EventRow[];
|
|
77
123
|
listEventsAsync(limit: number): Promise<EventRow[]>;
|
|
78
124
|
listEventsByFolder(_folderId: number, _limit: number): EventRow[];
|
|
79
|
-
listEventsByFolderAsync(folderId:
|
|
125
|
+
listEventsByFolderAsync(folderId: string, limit: number): Promise<EventRow[]>;
|
|
80
126
|
searchEvents(_query: string | null, _startDate: string | null, _endDate: string | null, _limit: number): EventRow[];
|
|
81
127
|
searchEventsAsync(query: string | null, startDate: string | null, endDate: string | null, limit: number): Promise<EventRow[]>;
|
|
82
128
|
listEventsByDateRange(_startDate: number, _endDate: number, _limit: number): EventRow[];
|
|
83
129
|
listEventsByDateRangeAsync(startDate: number, endDate: number, limit: number): Promise<EventRow[]>;
|
|
84
|
-
getEvent(_id:
|
|
85
|
-
getEventAsync(id:
|
|
86
|
-
|
|
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[]>;
|
|
87
135
|
listContacts(_limit: number, _offset: number): ContactRow[];
|
|
88
136
|
listContactsAsync(limit: number, offset: number): Promise<ContactRow[]>;
|
|
89
137
|
searchContacts(_query: string, _limit: number): ContactRow[];
|
|
90
138
|
searchContactsAsync(query: string, limit: number): Promise<ContactRow[]>;
|
|
91
|
-
getContact(_id:
|
|
92
|
-
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;
|
|
93
143
|
listContactFoldersAsync(): Promise<Array<{
|
|
94
|
-
id:
|
|
144
|
+
id: string;
|
|
95
145
|
name: string;
|
|
96
146
|
parentFolderId: string | null;
|
|
97
147
|
}>>;
|
|
98
|
-
createContactFolderAsync(name: string): Promise<
|
|
99
|
-
deleteContactFolderAsync(folderId:
|
|
100
|
-
listContactsInFolderAsync(folderId:
|
|
101
|
-
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<{
|
|
102
152
|
filePath: string;
|
|
103
153
|
contentType: string;
|
|
104
154
|
}>;
|
|
105
|
-
setContactPhotoAsync(contactId:
|
|
155
|
+
setContactPhotoAsync(contactId: string, filePath: string): Promise<void>;
|
|
106
156
|
listTasks(_limit: number, _offset: number): TaskRow[];
|
|
107
157
|
listTasksAsync(limit: number, offset: number): Promise<TaskRow[]>;
|
|
108
158
|
listIncompleteTasks(_limit: number, _offset: number): TaskRow[];
|
|
109
159
|
listIncompleteTasksAsync(limit: number, offset: number): Promise<TaskRow[]>;
|
|
110
160
|
searchTasks(_query: string, _limit: number): TaskRow[];
|
|
111
161
|
searchTasksAsync(query: string, limit: number): Promise<TaskRow[]>;
|
|
112
|
-
getTask(_id:
|
|
113
|
-
getTaskAsync(id:
|
|
162
|
+
getTask(_id: string): TaskRow | undefined;
|
|
163
|
+
getTaskAsync(id: string): Promise<TaskRow | undefined>;
|
|
114
164
|
listTaskListsAsync(): Promise<Array<{
|
|
115
|
-
id:
|
|
165
|
+
id: string;
|
|
116
166
|
name: string;
|
|
117
167
|
isDefault: boolean;
|
|
118
168
|
}>>;
|
|
@@ -129,55 +179,52 @@ export declare class GraphRepository implements IRepository {
|
|
|
129
179
|
*/
|
|
130
180
|
getGraphClient(): GraphClient;
|
|
131
181
|
/**
|
|
132
|
-
*
|
|
133
|
-
|
|
134
|
-
getGraphIdForDraft(draftId: number): string | undefined;
|
|
135
|
-
/**
|
|
136
|
-
* Gets the Graph string ID from a numeric ID.
|
|
182
|
+
* Resolves a draft id (durable `em_` token or raw Graph id) to its Graph id
|
|
183
|
+
* (satisfies IMailSendRepository). Drafts are messages.
|
|
137
184
|
*/
|
|
138
|
-
|
|
185
|
+
getGraphIdForDraft(draftId: string): string;
|
|
139
186
|
/**
|
|
140
|
-
* Gets task info from a
|
|
187
|
+
* Gets task info (Graph taskListId/taskId) from a durable `td_` token.
|
|
141
188
|
*/
|
|
142
|
-
getTaskInfo(
|
|
189
|
+
getTaskInfo(id: string): {
|
|
143
190
|
taskListId: string;
|
|
144
191
|
taskId: string;
|
|
145
192
|
} | undefined;
|
|
146
193
|
/**
|
|
147
|
-
* Gets the Graph string ID for a task list from a
|
|
148
|
-
*/
|
|
149
|
-
getTaskListGraphId(
|
|
150
|
-
moveEmail(_emailId:
|
|
151
|
-
deleteEmail(_emailId:
|
|
152
|
-
archiveEmail(_emailId:
|
|
153
|
-
junkEmail(_emailId:
|
|
154
|
-
markEmailRead(_emailId:
|
|
155
|
-
setEmailFlag(_emailId:
|
|
156
|
-
setEmailCategories(_emailId:
|
|
157
|
-
setEmailImportance(_emailId:
|
|
158
|
-
createFolder(_name: string, _parentFolderId?:
|
|
159
|
-
deleteFolder(_folderId:
|
|
160
|
-
renameFolder(_folderId:
|
|
161
|
-
moveFolder(_folderId:
|
|
162
|
-
emptyFolder(_folderId:
|
|
163
|
-
moveEmailAsync(emailId:
|
|
164
|
-
deleteEmailAsync(emailId:
|
|
165
|
-
archiveEmailAsync(emailId:
|
|
166
|
-
junkEmailAsync(emailId:
|
|
167
|
-
markEmailReadAsync(emailId:
|
|
168
|
-
setEmailFlagAsync(emailId:
|
|
169
|
-
setEmailCategoriesAsync(emailId:
|
|
170
|
-
setEmailImportanceAsync(emailId:
|
|
171
|
-
createFolderAsync(name: string, parentFolderId?:
|
|
172
|
-
deleteFolderAsync(folderId:
|
|
173
|
-
renameFolderAsync(folderId:
|
|
174
|
-
moveFolderAsync(folderId:
|
|
175
|
-
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>;
|
|
176
223
|
/**
|
|
177
224
|
* Creates a new draft message.
|
|
178
225
|
*
|
|
179
226
|
* Converts email address strings to Recipient objects, calls the Graph client,
|
|
180
|
-
*
|
|
227
|
+
* and returns a durable `em_` token plus the raw Graph id.
|
|
181
228
|
*/
|
|
182
229
|
createDraftAsync(params: {
|
|
183
230
|
subject: string;
|
|
@@ -187,15 +234,15 @@ export declare class GraphRepository implements IRepository {
|
|
|
187
234
|
cc?: string[];
|
|
188
235
|
bcc?: string[];
|
|
189
236
|
}): Promise<{
|
|
190
|
-
|
|
237
|
+
token: string;
|
|
191
238
|
graphId: string;
|
|
192
239
|
}>;
|
|
193
240
|
/**
|
|
194
241
|
* Updates an existing draft message.
|
|
195
242
|
*
|
|
196
|
-
*
|
|
243
|
+
* Resolves the draft id to its Graph id, then calls the client.
|
|
197
244
|
*/
|
|
198
|
-
updateDraftAsync(draftId:
|
|
245
|
+
updateDraftAsync(draftId: string, updates: Record<string, unknown>): Promise<void>;
|
|
199
246
|
/**
|
|
200
247
|
* Lists draft messages.
|
|
201
248
|
*
|
|
@@ -205,9 +252,9 @@ export declare class GraphRepository implements IRepository {
|
|
|
205
252
|
/**
|
|
206
253
|
* Sends an existing draft message.
|
|
207
254
|
*
|
|
208
|
-
*
|
|
255
|
+
* Resolves the id to its Graph id, then calls the client.
|
|
209
256
|
*/
|
|
210
|
-
sendDraftAsync(draftId:
|
|
257
|
+
sendDraftAsync(draftId: string): Promise<void>;
|
|
211
258
|
/**
|
|
212
259
|
* Sends a new email directly without creating a draft first.
|
|
213
260
|
*
|
|
@@ -224,39 +271,38 @@ export declare class GraphRepository implements IRepository {
|
|
|
224
271
|
/**
|
|
225
272
|
* Replies to a message (or replies all).
|
|
226
273
|
*
|
|
227
|
-
*
|
|
274
|
+
* Resolves the id to its Graph id, then calls the client.
|
|
228
275
|
*/
|
|
229
|
-
replyMessageAsync(messageId:
|
|
276
|
+
replyMessageAsync(messageId: string, comment: string, replyAll: boolean): Promise<void>;
|
|
230
277
|
/**
|
|
231
278
|
* Forwards a message to specified recipients.
|
|
232
279
|
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
280
|
+
* Resolves the id to its Graph id, converts recipient email strings to
|
|
281
|
+
* Recipient objects, then calls the client.
|
|
235
282
|
*/
|
|
236
|
-
forwardMessageAsync(messageId:
|
|
283
|
+
forwardMessageAsync(messageId: string, toRecipients: string[], comment?: string): Promise<void>;
|
|
237
284
|
/**
|
|
238
285
|
* Creates a reply (or reply-all) draft for a message.
|
|
239
286
|
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
287
|
+
* Resolves the source message id to its Graph id, creates the draft via the
|
|
288
|
+
* client, and optionally updates the body.
|
|
242
289
|
*
|
|
243
|
-
* @returns
|
|
290
|
+
* @returns A durable `em_` token and the raw Graph id of the new draft.
|
|
244
291
|
*/
|
|
245
|
-
replyAsDraftAsync(messageId:
|
|
246
|
-
|
|
292
|
+
replyAsDraftAsync(messageId: string, replyAll?: boolean, comment?: string, bodyType?: string): Promise<{
|
|
293
|
+
token: string;
|
|
247
294
|
graphId: string;
|
|
248
295
|
}>;
|
|
249
296
|
/**
|
|
250
297
|
* Creates a forward draft for a message.
|
|
251
298
|
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
* 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.
|
|
255
301
|
*
|
|
256
|
-
* @returns
|
|
302
|
+
* @returns A durable `em_` token and the raw Graph id of the new draft.
|
|
257
303
|
*/
|
|
258
|
-
forwardAsDraftAsync(messageId:
|
|
259
|
-
|
|
304
|
+
forwardAsDraftAsync(messageId: string, toRecipients?: string[], comment?: string, bodyType?: string): Promise<{
|
|
305
|
+
token: string;
|
|
260
306
|
graphId: string;
|
|
261
307
|
}>;
|
|
262
308
|
getScheduleAsync(params: {
|
|
@@ -275,14 +321,13 @@ export declare class GraphRepository implements IRepository {
|
|
|
275
321
|
/**
|
|
276
322
|
* Lists attachments for a given email.
|
|
277
323
|
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
* 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.
|
|
281
326
|
*
|
|
282
327
|
* @returns Array of attachment metadata objects.
|
|
283
328
|
*/
|
|
284
|
-
listAttachmentsAsync(emailId:
|
|
285
|
-
id:
|
|
329
|
+
listAttachmentsAsync(emailId: string): Promise<Array<{
|
|
330
|
+
id: string;
|
|
286
331
|
name: string;
|
|
287
332
|
size: number;
|
|
288
333
|
contentType: string;
|
|
@@ -291,13 +336,13 @@ export declare class GraphRepository implements IRepository {
|
|
|
291
336
|
/**
|
|
292
337
|
* Downloads an attachment for a given email.
|
|
293
338
|
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
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.
|
|
297
342
|
*
|
|
298
343
|
* @returns Metadata about the downloaded file including its local path.
|
|
299
344
|
*/
|
|
300
|
-
downloadAttachmentAsync(attachmentId:
|
|
345
|
+
downloadAttachmentAsync(attachmentId: string): Promise<{
|
|
301
346
|
filePath: string;
|
|
302
347
|
name: string;
|
|
303
348
|
size: number;
|
|
@@ -337,17 +382,17 @@ export declare class GraphRepository implements IRepository {
|
|
|
337
382
|
numberOfOccurrences?: number;
|
|
338
383
|
};
|
|
339
384
|
};
|
|
340
|
-
calendarId?:
|
|
385
|
+
calendarId?: string;
|
|
341
386
|
is_online_meeting?: boolean;
|
|
342
387
|
online_meeting_provider?: string;
|
|
343
|
-
}): Promise<
|
|
388
|
+
}): Promise<string>;
|
|
344
389
|
/**
|
|
345
390
|
* Updates an existing calendar event.
|
|
346
391
|
*
|
|
347
392
|
* Looks up the Graph string ID from idCache.events, then calls
|
|
348
393
|
* client.updateEvent(). Throws if the event is not cached.
|
|
349
394
|
*/
|
|
350
|
-
updateEventAsync(eventId:
|
|
395
|
+
updateEventAsync(eventId: string, updates: Record<string, unknown>): Promise<void>;
|
|
351
396
|
/**
|
|
352
397
|
* Deletes a calendar event.
|
|
353
398
|
*
|
|
@@ -355,14 +400,14 @@ export declare class GraphRepository implements IRepository {
|
|
|
355
400
|
* client.deleteEvent(), and removes the entry from idCache.
|
|
356
401
|
* Throws if the event is not cached.
|
|
357
402
|
*/
|
|
358
|
-
deleteEventAsync(eventId:
|
|
403
|
+
deleteEventAsync(eventId: string): Promise<void>;
|
|
359
404
|
/**
|
|
360
405
|
* Responds to a calendar event invitation.
|
|
361
406
|
*
|
|
362
407
|
* Looks up the Graph string ID from idCache.events, then calls
|
|
363
408
|
* client.respondToEvent(). Throws if the event is not cached.
|
|
364
409
|
*/
|
|
365
|
-
respondToEventAsync(eventId:
|
|
410
|
+
respondToEventAsync(eventId: string, response: 'accept' | 'decline' | 'tentative', sendResponse: boolean, comment?: string): Promise<void>;
|
|
366
411
|
/**
|
|
367
412
|
* Creates a new contact.
|
|
368
413
|
*
|
|
@@ -382,14 +427,14 @@ export declare class GraphRepository implements IRepository {
|
|
|
382
427
|
state?: string;
|
|
383
428
|
postal_code?: string;
|
|
384
429
|
country?: string;
|
|
385
|
-
}): Promise<
|
|
430
|
+
}): Promise<string>;
|
|
386
431
|
/**
|
|
387
432
|
* Updates an existing contact.
|
|
388
433
|
*
|
|
389
434
|
* Looks up the Graph string ID from idCache.contacts, then calls
|
|
390
435
|
* client.updateContact(). Throws if the contact is not cached.
|
|
391
436
|
*/
|
|
392
|
-
updateContactAsync(contactId:
|
|
437
|
+
updateContactAsync(contactId: string, updates: Record<string, unknown>): Promise<void>;
|
|
393
438
|
/**
|
|
394
439
|
* Deletes a contact.
|
|
395
440
|
*
|
|
@@ -397,17 +442,17 @@ export declare class GraphRepository implements IRepository {
|
|
|
397
442
|
* client.deleteContact(), and removes the entry from idCache.
|
|
398
443
|
* Throws if the contact is not cached.
|
|
399
444
|
*/
|
|
400
|
-
deleteContactAsync(contactId:
|
|
445
|
+
deleteContactAsync(contactId: string): Promise<void>;
|
|
401
446
|
/**
|
|
402
447
|
* Creates a new task in a task list.
|
|
403
448
|
*
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
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.
|
|
407
452
|
*/
|
|
408
453
|
createTaskAsync(params: {
|
|
409
454
|
title: string;
|
|
410
|
-
task_list_id:
|
|
455
|
+
task_list_id: string;
|
|
411
456
|
body?: string;
|
|
412
457
|
body_type?: 'text' | 'html';
|
|
413
458
|
due_date?: string;
|
|
@@ -424,77 +469,67 @@ export declare class GraphRepository implements IRepository {
|
|
|
424
469
|
occurrences?: number | undefined;
|
|
425
470
|
} | undefined;
|
|
426
471
|
categories?: string[];
|
|
427
|
-
}): Promise<
|
|
472
|
+
}): Promise<string>;
|
|
428
473
|
/**
|
|
429
474
|
* Updates an existing task.
|
|
430
|
-
*
|
|
431
|
-
* Looks up the Graph task info from idCache.tasks, then calls
|
|
432
|
-
* client.updateTask(). Throws if the task is not cached.
|
|
433
475
|
*/
|
|
434
|
-
updateTaskAsync(taskId:
|
|
476
|
+
updateTaskAsync(taskId: string, updates: Record<string, unknown>): Promise<void>;
|
|
435
477
|
/**
|
|
436
478
|
* Marks a task as completed.
|
|
437
479
|
*
|
|
438
480
|
* Convenience method that calls updateTaskAsync with status: 'completed'
|
|
439
481
|
* and the current time as completedDateTime.
|
|
440
482
|
*/
|
|
441
|
-
completeTaskAsync(taskId:
|
|
483
|
+
completeTaskAsync(taskId: string): Promise<void>;
|
|
442
484
|
/**
|
|
443
485
|
* Deletes a task.
|
|
444
|
-
*
|
|
445
|
-
* Looks up the Graph task info from idCache.tasks, calls
|
|
446
|
-
* client.deleteTask(), and removes the entry from idCache.
|
|
447
|
-
* Throws if the task is not cached.
|
|
448
486
|
*/
|
|
449
|
-
deleteTaskAsync(taskId:
|
|
487
|
+
deleteTaskAsync(taskId: string): Promise<void>;
|
|
450
488
|
/**
|
|
451
489
|
* Creates a new task list.
|
|
452
|
-
*
|
|
453
|
-
* Calls client.createTaskList(), caches the resulting ID in
|
|
454
|
-
* idCache.taskLists, and returns a numeric ID.
|
|
455
490
|
*/
|
|
456
|
-
createTaskListAsync(displayName: string): Promise<
|
|
491
|
+
createTaskListAsync(displayName: string): Promise<string>;
|
|
457
492
|
/**
|
|
458
493
|
* Renames a task list.
|
|
459
494
|
*/
|
|
460
|
-
renameTaskListAsync(listId:
|
|
495
|
+
renameTaskListAsync(listId: string, name: string): Promise<void>;
|
|
461
496
|
/**
|
|
462
497
|
* Deletes a task list.
|
|
463
498
|
*/
|
|
464
|
-
deleteTaskListAsync(listId:
|
|
465
|
-
listChecklistItemsAsync(taskId:
|
|
466
|
-
id:
|
|
499
|
+
deleteTaskListAsync(listId: string): Promise<void>;
|
|
500
|
+
listChecklistItemsAsync(taskId: string): Promise<Array<{
|
|
501
|
+
id: string;
|
|
467
502
|
displayName: string;
|
|
468
503
|
isChecked: boolean;
|
|
469
504
|
createdDateTime: string;
|
|
470
505
|
}>>;
|
|
471
|
-
createChecklistItemAsync(taskId:
|
|
472
|
-
updateChecklistItemAsync(checklistItemId:
|
|
506
|
+
createChecklistItemAsync(taskId: string, displayName: string, isChecked?: boolean): Promise<string>;
|
|
507
|
+
updateChecklistItemAsync(checklistItemId: string, updates: {
|
|
473
508
|
displayName?: string;
|
|
474
509
|
isChecked?: boolean;
|
|
475
510
|
}): Promise<void>;
|
|
476
|
-
deleteChecklistItemAsync(checklistItemId:
|
|
477
|
-
listLinkedResourcesAsync(taskId:
|
|
478
|
-
id:
|
|
511
|
+
deleteChecklistItemAsync(checklistItemId: string): Promise<void>;
|
|
512
|
+
listLinkedResourcesAsync(taskId: string): Promise<Array<{
|
|
513
|
+
id: string;
|
|
479
514
|
webUrl: string;
|
|
480
515
|
applicationName: string;
|
|
481
516
|
displayName: string;
|
|
482
517
|
}>>;
|
|
483
|
-
createLinkedResourceAsync(taskId:
|
|
484
|
-
deleteLinkedResourceAsync(linkedResourceId:
|
|
485
|
-
listTaskAttachmentsAsync(taskId:
|
|
486
|
-
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;
|
|
487
522
|
name: string;
|
|
488
523
|
size: number;
|
|
489
524
|
contentType: string;
|
|
490
525
|
}>>;
|
|
491
|
-
createTaskAttachmentAsync(taskId:
|
|
492
|
-
deleteTaskAttachmentAsync(taskAttachmentId:
|
|
526
|
+
createTaskAttachmentAsync(taskId: string, name: string, contentBytes: string, contentType?: string): Promise<string>;
|
|
527
|
+
deleteTaskAttachmentAsync(taskAttachmentId: string): Promise<void>;
|
|
493
528
|
/**
|
|
494
529
|
* Lists all inbox mail rules.
|
|
495
530
|
*/
|
|
496
531
|
listMailRulesAsync(): Promise<Array<{
|
|
497
|
-
id:
|
|
532
|
+
id: string;
|
|
498
533
|
displayName: string;
|
|
499
534
|
sequence: number;
|
|
500
535
|
isEnabled: boolean;
|
|
@@ -504,11 +539,11 @@ export declare class GraphRepository implements IRepository {
|
|
|
504
539
|
/**
|
|
505
540
|
* Creates a new inbox mail rule.
|
|
506
541
|
*/
|
|
507
|
-
createMailRuleAsync(rule: Record<string, unknown>): Promise<
|
|
542
|
+
createMailRuleAsync(rule: Record<string, unknown>): Promise<string>;
|
|
508
543
|
/**
|
|
509
544
|
* Deletes an inbox mail rule.
|
|
510
545
|
*/
|
|
511
|
-
deleteMailRuleAsync(ruleId:
|
|
546
|
+
deleteMailRuleAsync(ruleId: string): Promise<void>;
|
|
512
547
|
/**
|
|
513
548
|
* Gets the current automatic replies (OOF) settings.
|
|
514
549
|
*/
|
|
@@ -554,45 +589,45 @@ export declare class GraphRepository implements IRepository {
|
|
|
554
589
|
* Lists all master categories.
|
|
555
590
|
*/
|
|
556
591
|
listCategoriesAsync(): Promise<Array<{
|
|
557
|
-
id:
|
|
592
|
+
id: string;
|
|
558
593
|
name: string;
|
|
559
594
|
color: string;
|
|
560
595
|
}>>;
|
|
561
596
|
/**
|
|
562
597
|
* Creates a new master category.
|
|
563
598
|
*/
|
|
564
|
-
createCategoryAsync(name: string, color: string): Promise<
|
|
599
|
+
createCategoryAsync(name: string, color: string): Promise<string>;
|
|
565
600
|
/**
|
|
566
601
|
* Deletes a master category.
|
|
567
602
|
*/
|
|
568
|
-
deleteCategoryAsync(categoryId:
|
|
603
|
+
deleteCategoryAsync(categoryId: string): Promise<void>;
|
|
569
604
|
/**
|
|
570
605
|
* Lists all focused inbox overrides.
|
|
571
606
|
*/
|
|
572
607
|
listFocusedOverridesAsync(): Promise<Array<{
|
|
573
|
-
id:
|
|
608
|
+
id: string;
|
|
574
609
|
senderAddress: string;
|
|
575
610
|
classifyAs: string;
|
|
576
611
|
}>>;
|
|
577
612
|
/**
|
|
578
613
|
* Creates a focused inbox override.
|
|
579
614
|
*/
|
|
580
|
-
createFocusedOverrideAsync(senderAddress: string, classifyAs: 'focused' | 'other'): Promise<
|
|
615
|
+
createFocusedOverrideAsync(senderAddress: string, classifyAs: 'focused' | 'other'): Promise<string>;
|
|
581
616
|
/**
|
|
582
617
|
* Deletes a focused inbox override.
|
|
583
618
|
*/
|
|
584
|
-
deleteFocusedOverrideAsync(overrideId:
|
|
619
|
+
deleteFocusedOverrideAsync(overrideId: string): Promise<void>;
|
|
585
620
|
/**
|
|
586
621
|
* Gets internet message headers for an email.
|
|
587
622
|
*/
|
|
588
|
-
getMessageHeadersAsync(emailId:
|
|
623
|
+
getMessageHeadersAsync(emailId: string): Promise<Array<{
|
|
589
624
|
name: string;
|
|
590
625
|
value: string;
|
|
591
626
|
}>>;
|
|
592
627
|
/**
|
|
593
628
|
* Gets the MIME content of a message and saves it as an .eml file.
|
|
594
629
|
*/
|
|
595
|
-
getMessageMimeAsync(emailId:
|
|
630
|
+
getMessageMimeAsync(emailId: string): Promise<{
|
|
596
631
|
filePath: string;
|
|
597
632
|
}>;
|
|
598
633
|
/**
|
|
@@ -610,21 +645,24 @@ export declare class GraphRepository implements IRepository {
|
|
|
610
645
|
}>>;
|
|
611
646
|
/**
|
|
612
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.
|
|
613
651
|
*/
|
|
614
652
|
listCalendarGroupsAsync(): Promise<Array<{
|
|
615
|
-
id:
|
|
653
|
+
id: string;
|
|
616
654
|
name: string;
|
|
617
655
|
classId: string;
|
|
618
656
|
}>>;
|
|
619
657
|
/**
|
|
620
658
|
* Creates a new calendar group.
|
|
621
659
|
*/
|
|
622
|
-
createCalendarGroupAsync(name: string): Promise<
|
|
660
|
+
createCalendarGroupAsync(name: string): Promise<string>;
|
|
623
661
|
/**
|
|
624
662
|
* Lists all permissions for a calendar.
|
|
625
663
|
*/
|
|
626
|
-
listCalendarPermissionsAsync(calendarId:
|
|
627
|
-
id:
|
|
664
|
+
listCalendarPermissionsAsync(calendarId: string): Promise<Array<{
|
|
665
|
+
id: string;
|
|
628
666
|
emailAddress: string;
|
|
629
667
|
role: string;
|
|
630
668
|
isRemovable: boolean;
|
|
@@ -633,11 +671,11 @@ export declare class GraphRepository implements IRepository {
|
|
|
633
671
|
/**
|
|
634
672
|
* Creates a calendar permission (shares a calendar with someone).
|
|
635
673
|
*/
|
|
636
|
-
createCalendarPermissionAsync(calendarId:
|
|
674
|
+
createCalendarPermissionAsync(calendarId: string, email: string, role: string): Promise<string>;
|
|
637
675
|
/**
|
|
638
676
|
* Deletes a calendar permission.
|
|
639
677
|
*/
|
|
640
|
-
deleteCalendarPermissionAsync(permissionId:
|
|
678
|
+
deleteCalendarPermissionAsync(permissionId: string): Promise<void>;
|
|
641
679
|
/**
|
|
642
680
|
* Lists all room lists.
|
|
643
681
|
*/
|
|
@@ -656,24 +694,24 @@ export declare class GraphRepository implements IRepository {
|
|
|
656
694
|
* Lists all joined teams with cached numeric IDs.
|
|
657
695
|
*/
|
|
658
696
|
listTeamsAsync(): Promise<Array<{
|
|
659
|
-
id:
|
|
697
|
+
id: string;
|
|
660
698
|
name: string;
|
|
661
699
|
description: string;
|
|
662
700
|
}>>;
|
|
663
701
|
/**
|
|
664
702
|
* Lists all channels in a team with cached numeric IDs.
|
|
665
703
|
*/
|
|
666
|
-
listChannelsAsync(teamId:
|
|
667
|
-
id:
|
|
704
|
+
listChannelsAsync(teamId: string): Promise<Array<{
|
|
705
|
+
id: string;
|
|
668
706
|
name: string;
|
|
669
707
|
description: string;
|
|
670
708
|
membershipType: string;
|
|
671
709
|
}>>;
|
|
672
710
|
/**
|
|
673
|
-
* Gets a specific channel by
|
|
711
|
+
* Gets a specific channel by durable cn_ token.
|
|
674
712
|
*/
|
|
675
|
-
getChannelAsync(channelId:
|
|
676
|
-
id:
|
|
713
|
+
getChannelAsync(channelId: string): Promise<{
|
|
714
|
+
id: string;
|
|
677
715
|
name: string;
|
|
678
716
|
description: string;
|
|
679
717
|
membershipType: string;
|
|
@@ -682,22 +720,22 @@ export declare class GraphRepository implements IRepository {
|
|
|
682
720
|
/**
|
|
683
721
|
* Creates a new channel in a team.
|
|
684
722
|
*/
|
|
685
|
-
createChannelAsync(teamId:
|
|
723
|
+
createChannelAsync(teamId: string, name: string, description?: string): Promise<string>;
|
|
686
724
|
/**
|
|
687
725
|
* Updates a channel's properties.
|
|
688
726
|
*/
|
|
689
|
-
updateChannelAsync(channelId:
|
|
727
|
+
updateChannelAsync(channelId: string, updates: {
|
|
690
728
|
name?: string;
|
|
691
729
|
description?: string;
|
|
692
730
|
}): Promise<void>;
|
|
693
731
|
/**
|
|
694
732
|
* Deletes a channel.
|
|
695
733
|
*/
|
|
696
|
-
deleteChannelAsync(channelId:
|
|
734
|
+
deleteChannelAsync(channelId: string): Promise<void>;
|
|
697
735
|
/**
|
|
698
736
|
* Lists members of a team.
|
|
699
737
|
*/
|
|
700
|
-
listTeamMembersAsync(teamId:
|
|
738
|
+
listTeamMembersAsync(teamId: string): Promise<Array<{
|
|
701
739
|
id: string;
|
|
702
740
|
displayName: string;
|
|
703
741
|
email: string;
|
|
@@ -706,8 +744,8 @@ export declare class GraphRepository implements IRepository {
|
|
|
706
744
|
/**
|
|
707
745
|
* Lists recent messages in a channel.
|
|
708
746
|
*/
|
|
709
|
-
listChannelMessagesAsync(channelId:
|
|
710
|
-
id:
|
|
747
|
+
listChannelMessagesAsync(channelId: string, limit?: number): Promise<Array<{
|
|
748
|
+
id: string;
|
|
711
749
|
senderName: string;
|
|
712
750
|
senderEmail: string;
|
|
713
751
|
bodyPreview: string;
|
|
@@ -718,15 +756,15 @@ export declare class GraphRepository implements IRepository {
|
|
|
718
756
|
/**
|
|
719
757
|
* Gets a specific channel message with its replies.
|
|
720
758
|
*/
|
|
721
|
-
getChannelMessageAsync(messageId:
|
|
722
|
-
id:
|
|
759
|
+
getChannelMessageAsync(messageId: string): Promise<{
|
|
760
|
+
id: string;
|
|
723
761
|
senderName: string;
|
|
724
762
|
senderEmail: string;
|
|
725
763
|
bodyContent: string;
|
|
726
764
|
contentType: string;
|
|
727
765
|
createdDateTime: string;
|
|
728
766
|
replies: Array<{
|
|
729
|
-
id:
|
|
767
|
+
id: string;
|
|
730
768
|
senderName: string;
|
|
731
769
|
senderEmail: string;
|
|
732
770
|
bodyContent: string;
|
|
@@ -737,27 +775,27 @@ export declare class GraphRepository implements IRepository {
|
|
|
737
775
|
/**
|
|
738
776
|
* Sends a new message to a channel.
|
|
739
777
|
*/
|
|
740
|
-
sendChannelMessageAsync(channelId:
|
|
778
|
+
sendChannelMessageAsync(channelId: string, body: string, contentType?: string): Promise<string>;
|
|
741
779
|
/**
|
|
742
780
|
* Replies to a channel message.
|
|
743
781
|
*/
|
|
744
|
-
replyToChannelMessageAsync(messageId:
|
|
782
|
+
replyToChannelMessageAsync(messageId: string, body: string, contentType?: string): Promise<string>;
|
|
745
783
|
listChatsAsync(limit?: number): Promise<Array<{
|
|
746
|
-
id:
|
|
784
|
+
id: string;
|
|
747
785
|
topic: string;
|
|
748
786
|
chatType: string;
|
|
749
787
|
lastMessagePreview: string;
|
|
750
788
|
createdDateTime: string;
|
|
751
789
|
}>>;
|
|
752
|
-
getChatAsync(chatId:
|
|
753
|
-
id:
|
|
790
|
+
getChatAsync(chatId: string): Promise<{
|
|
791
|
+
id: string;
|
|
754
792
|
topic: string;
|
|
755
793
|
chatType: string;
|
|
756
794
|
createdDateTime: string;
|
|
757
795
|
webUrl: string;
|
|
758
796
|
}>;
|
|
759
|
-
listChatMessagesAsync(chatId:
|
|
760
|
-
id:
|
|
797
|
+
listChatMessagesAsync(chatId: string, limit?: number): Promise<Array<{
|
|
798
|
+
id: string;
|
|
761
799
|
senderName: string;
|
|
762
800
|
senderEmail: string;
|
|
763
801
|
bodyPreview: string;
|
|
@@ -765,35 +803,35 @@ export declare class GraphRepository implements IRepository {
|
|
|
765
803
|
contentType: string;
|
|
766
804
|
createdDateTime: string;
|
|
767
805
|
}>>;
|
|
768
|
-
sendChatMessageAsync(chatId:
|
|
769
|
-
listMessageReactionsAsync(messageId:
|
|
806
|
+
sendChatMessageAsync(chatId: string, body: string, contentType?: string): Promise<string>;
|
|
807
|
+
listMessageReactionsAsync(messageId: string, messageType: 'channel' | 'chat'): Promise<Array<{
|
|
770
808
|
reactionType: string;
|
|
771
809
|
user: {
|
|
772
810
|
displayName: string;
|
|
773
811
|
};
|
|
774
812
|
createdDateTime: string;
|
|
775
813
|
}>>;
|
|
776
|
-
addMessageReactionAsync(messageId:
|
|
777
|
-
removeMessageReactionAsync(messageId:
|
|
778
|
-
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<{
|
|
779
817
|
displayName: string;
|
|
780
818
|
email: string;
|
|
781
819
|
roles: string[];
|
|
782
820
|
}>>;
|
|
783
821
|
/**
|
|
784
|
-
* Lists all plans the current user has.
|
|
822
|
+
* Lists all plans the current user has, minting durable pl_ tokens.
|
|
785
823
|
*/
|
|
786
824
|
listPlansAsync(): Promise<Array<{
|
|
787
|
-
id:
|
|
825
|
+
id: string;
|
|
788
826
|
title: string;
|
|
789
827
|
owner: string;
|
|
790
828
|
createdDateTime: string;
|
|
791
829
|
}>>;
|
|
792
830
|
/**
|
|
793
|
-
* Gets a specific plan
|
|
831
|
+
* Gets a specific plan.
|
|
794
832
|
*/
|
|
795
|
-
getPlanAsync(planId:
|
|
796
|
-
id:
|
|
833
|
+
getPlanAsync(planId: string): Promise<{
|
|
834
|
+
id: string;
|
|
797
835
|
title: string;
|
|
798
836
|
owner: string;
|
|
799
837
|
createdDateTime: string;
|
|
@@ -802,43 +840,62 @@ export declare class GraphRepository implements IRepository {
|
|
|
802
840
|
/**
|
|
803
841
|
* Creates a new plan.
|
|
804
842
|
*/
|
|
805
|
-
createPlanAsync(title: string, groupId: string): Promise<
|
|
843
|
+
createPlanAsync(title: string, groupId: string): Promise<string>;
|
|
806
844
|
/**
|
|
807
|
-
* Updates a plan (
|
|
845
|
+
* Updates a plan (U5b-5: fetches a fresh etag immediately before the write —
|
|
846
|
+
* etags are never cached across calls).
|
|
808
847
|
*/
|
|
809
|
-
updatePlanAsync(planId:
|
|
848
|
+
updatePlanAsync(planId: string, updates: {
|
|
810
849
|
title?: string;
|
|
811
850
|
}): Promise<void>;
|
|
812
851
|
/**
|
|
813
|
-
* Lists all buckets in a plan.
|
|
852
|
+
* Lists all buckets in a plan, minting durable pb_ tokens.
|
|
814
853
|
*/
|
|
815
|
-
listBucketsAsync(planId:
|
|
816
|
-
id:
|
|
854
|
+
listBucketsAsync(planId: string): Promise<Array<{
|
|
855
|
+
id: string;
|
|
817
856
|
name: string;
|
|
818
|
-
planId:
|
|
857
|
+
planId: string;
|
|
819
858
|
orderHint: string;
|
|
820
859
|
}>>;
|
|
821
860
|
/**
|
|
822
861
|
* Creates a new bucket in a plan.
|
|
823
862
|
*/
|
|
824
|
-
createBucketAsync(planId:
|
|
863
|
+
createBucketAsync(planId: string, name: string): Promise<string>;
|
|
825
864
|
/**
|
|
826
|
-
* Updates a bucket (
|
|
865
|
+
* Updates a bucket (U5b-5: fetches a fresh etag immediately before the write).
|
|
827
866
|
*/
|
|
828
|
-
updateBucketAsync(bucketId:
|
|
867
|
+
updateBucketAsync(bucketId: string, updates: {
|
|
829
868
|
name?: string;
|
|
830
869
|
}): Promise<void>;
|
|
831
870
|
/**
|
|
832
|
-
* Deletes a bucket (
|
|
871
|
+
* Deletes a bucket (U5b-5: fetches a fresh etag immediately before the write).
|
|
833
872
|
*/
|
|
834
|
-
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
|
+
}>>;
|
|
835
888
|
/**
|
|
836
|
-
* 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.
|
|
837
893
|
*/
|
|
838
|
-
|
|
839
|
-
id:
|
|
894
|
+
listMyPlannerTasksAsync(): Promise<Array<{
|
|
895
|
+
id: string;
|
|
840
896
|
title: string;
|
|
841
|
-
|
|
897
|
+
planId: string;
|
|
898
|
+
bucketId: string | null;
|
|
842
899
|
assignees: string[];
|
|
843
900
|
percentComplete: number;
|
|
844
901
|
priority: number;
|
|
@@ -847,12 +904,12 @@ export declare class GraphRepository implements IRepository {
|
|
|
847
904
|
createdDateTime: string;
|
|
848
905
|
}>>;
|
|
849
906
|
/**
|
|
850
|
-
* Gets a specific planner task
|
|
907
|
+
* Gets a specific planner task.
|
|
851
908
|
*/
|
|
852
|
-
getPlannerTaskAsync(taskId:
|
|
853
|
-
id:
|
|
909
|
+
getPlannerTaskAsync(taskId: string): Promise<{
|
|
910
|
+
id: string;
|
|
854
911
|
title: string;
|
|
855
|
-
bucketId:
|
|
912
|
+
bucketId: string | null;
|
|
856
913
|
assignees: string[];
|
|
857
914
|
percentComplete: number;
|
|
858
915
|
priority: number;
|
|
@@ -866,13 +923,13 @@ export declare class GraphRepository implements IRepository {
|
|
|
866
923
|
/**
|
|
867
924
|
* Creates a new planner task.
|
|
868
925
|
*/
|
|
869
|
-
createPlannerTaskAsync(planId:
|
|
926
|
+
createPlannerTaskAsync(planId: string, title: string, bucketId?: string, assignments?: Record<string, object>, priority?: number, startDate?: string, dueDate?: string): Promise<string>;
|
|
870
927
|
/**
|
|
871
|
-
* Updates a planner task (
|
|
928
|
+
* Updates a planner task (U5b-5: fetches a fresh etag immediately before the write).
|
|
872
929
|
*/
|
|
873
|
-
updatePlannerTaskAsync(taskId:
|
|
930
|
+
updatePlannerTaskAsync(taskId: string, updates: {
|
|
874
931
|
title?: string;
|
|
875
|
-
bucketId?:
|
|
932
|
+
bucketId?: string;
|
|
876
933
|
percentComplete?: number;
|
|
877
934
|
priority?: number;
|
|
878
935
|
startDate?: string;
|
|
@@ -880,14 +937,15 @@ export declare class GraphRepository implements IRepository {
|
|
|
880
937
|
assignments?: Record<string, object>;
|
|
881
938
|
}): Promise<void>;
|
|
882
939
|
/**
|
|
883
|
-
* Deletes a planner task (
|
|
940
|
+
* Deletes a planner task (U5b-5: fetches a fresh etag immediately before the write).
|
|
884
941
|
*/
|
|
885
|
-
deletePlannerTaskAsync(taskId:
|
|
942
|
+
deletePlannerTaskAsync(taskId: string): Promise<void>;
|
|
886
943
|
/**
|
|
887
|
-
* 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.
|
|
888
946
|
*/
|
|
889
|
-
getPlannerTaskDetailsAsync(taskId:
|
|
890
|
-
id:
|
|
947
|
+
getPlannerTaskDetailsAsync(taskId: string): Promise<{
|
|
948
|
+
id: string;
|
|
891
949
|
description: string;
|
|
892
950
|
checklist: Record<string, unknown>;
|
|
893
951
|
references: Record<string, unknown>;
|
|
@@ -902,10 +960,10 @@ export declare class GraphRepository implements IRepository {
|
|
|
902
960
|
* Partial failures are handled gracefully: tasks whose detail fetch failed will
|
|
903
961
|
* have `details` set to `undefined`.
|
|
904
962
|
*/
|
|
905
|
-
listPlannerTasksWithDetailsAsync(planId:
|
|
906
|
-
id:
|
|
963
|
+
listPlannerTasksWithDetailsAsync(planId: string): Promise<Array<{
|
|
964
|
+
id: string;
|
|
907
965
|
title: string;
|
|
908
|
-
bucketId:
|
|
966
|
+
bucketId: string | null;
|
|
909
967
|
assignees: string[];
|
|
910
968
|
percentComplete: number;
|
|
911
969
|
priority: number;
|
|
@@ -920,9 +978,11 @@ export declare class GraphRepository implements IRepository {
|
|
|
920
978
|
} | undefined;
|
|
921
979
|
}>>;
|
|
922
980
|
/**
|
|
923
|
-
* 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).
|
|
924
984
|
*/
|
|
925
|
-
updatePlannerTaskDetailsAsync(taskId:
|
|
985
|
+
updatePlannerTaskDetailsAsync(taskId: string, updates: {
|
|
926
986
|
description?: string;
|
|
927
987
|
checklist?: Record<string, object>;
|
|
928
988
|
references?: Record<string, object>;
|
|
@@ -930,44 +990,44 @@ export declare class GraphRepository implements IRepository {
|
|
|
930
990
|
/**
|
|
931
991
|
* Assembles plan, buckets, and tasks into a unified visualization data object.
|
|
932
992
|
*/
|
|
933
|
-
getPlanVisualizationDataAsync(planId:
|
|
993
|
+
getPlanVisualizationDataAsync(planId: string): Promise<PlanVisualizationData>;
|
|
934
994
|
listOnlineMeetingsAsync(limit?: number): Promise<Array<{
|
|
935
|
-
id:
|
|
995
|
+
id: string;
|
|
936
996
|
subject: string;
|
|
937
997
|
startDateTime: string;
|
|
938
998
|
endDateTime: string;
|
|
939
999
|
joinUrl: string;
|
|
940
1000
|
}>>;
|
|
941
|
-
getOnlineMeetingAsync(meetingId:
|
|
942
|
-
id:
|
|
1001
|
+
getOnlineMeetingAsync(meetingId: string): Promise<{
|
|
1002
|
+
id: string;
|
|
943
1003
|
subject: string;
|
|
944
1004
|
startDateTime: string;
|
|
945
1005
|
endDateTime: string;
|
|
946
1006
|
joinUrl: string;
|
|
947
1007
|
participants: unknown;
|
|
948
1008
|
} | undefined>;
|
|
949
|
-
listMeetingRecordingsAsync(meetingId:
|
|
950
|
-
id:
|
|
1009
|
+
listMeetingRecordingsAsync(meetingId: string): Promise<Array<{
|
|
1010
|
+
id: string;
|
|
951
1011
|
createdDateTime: string;
|
|
952
1012
|
recordingContentUrl: string;
|
|
953
1013
|
}>>;
|
|
954
|
-
downloadMeetingRecordingAsync(recordingId:
|
|
955
|
-
listMeetingTranscriptsAsync(meetingId:
|
|
956
|
-
id:
|
|
1014
|
+
downloadMeetingRecordingAsync(recordingId: string, outputPath: string): Promise<string>;
|
|
1015
|
+
listMeetingTranscriptsAsync(meetingId: string): Promise<Array<{
|
|
1016
|
+
id: string;
|
|
957
1017
|
createdDateTime: string;
|
|
958
1018
|
contentUrl: string;
|
|
959
1019
|
}>>;
|
|
960
|
-
getMeetingTranscriptContentAsync(transcriptId:
|
|
961
|
-
listWorksheetsAsync(fileId:
|
|
962
|
-
getWorksheetRangeAsync(fileId:
|
|
963
|
-
getUsedRangeAsync(fileId:
|
|
964
|
-
updateWorksheetRangeAsync(fileId:
|
|
965
|
-
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>[]>;
|
|
966
1026
|
/**
|
|
967
1027
|
* Lists files/folders in a drive folder (or root).
|
|
968
1028
|
*/
|
|
969
|
-
listDriveItemsAsync(folderId?:
|
|
970
|
-
id:
|
|
1029
|
+
listDriveItemsAsync(folderId?: string): Promise<Array<{
|
|
1030
|
+
id: string;
|
|
971
1031
|
name: string;
|
|
972
1032
|
size: number;
|
|
973
1033
|
lastModified: string;
|
|
@@ -978,7 +1038,7 @@ export declare class GraphRepository implements IRepository {
|
|
|
978
1038
|
* Searches drive items by query.
|
|
979
1039
|
*/
|
|
980
1040
|
searchDriveItemsAsync(query: string, limit?: number): Promise<Array<{
|
|
981
|
-
id:
|
|
1041
|
+
id: string;
|
|
982
1042
|
name: string;
|
|
983
1043
|
size: number;
|
|
984
1044
|
lastModified: string;
|
|
@@ -988,8 +1048,8 @@ export declare class GraphRepository implements IRepository {
|
|
|
988
1048
|
/**
|
|
989
1049
|
* Gets metadata for a specific drive item.
|
|
990
1050
|
*/
|
|
991
|
-
getDriveItemAsync(itemId:
|
|
992
|
-
id:
|
|
1051
|
+
getDriveItemAsync(itemId: string): Promise<{
|
|
1052
|
+
id: string;
|
|
993
1053
|
name: string;
|
|
994
1054
|
size: number;
|
|
995
1055
|
lastModified: string;
|
|
@@ -1001,19 +1061,19 @@ export declare class GraphRepository implements IRepository {
|
|
|
1001
1061
|
/**
|
|
1002
1062
|
* Downloads a drive item to a local file.
|
|
1003
1063
|
*/
|
|
1004
|
-
downloadFileAsync(itemId:
|
|
1064
|
+
downloadFileAsync(itemId: string, outputPath: string): Promise<{
|
|
1005
1065
|
savedPath: string;
|
|
1006
1066
|
size: number;
|
|
1007
1067
|
}>;
|
|
1008
1068
|
/**
|
|
1009
1069
|
* Uploads a local file to OneDrive.
|
|
1010
1070
|
*/
|
|
1011
|
-
uploadFileAsync(parentPath: string, fileName: string, localFilePath: string): Promise<
|
|
1071
|
+
uploadFileAsync(parentPath: string, fileName: string, localFilePath: string): Promise<string>;
|
|
1012
1072
|
/**
|
|
1013
1073
|
* Lists recently accessed drive items.
|
|
1014
1074
|
*/
|
|
1015
1075
|
listRecentFilesAsync(): Promise<Array<{
|
|
1016
|
-
id:
|
|
1076
|
+
id: string;
|
|
1017
1077
|
name: string;
|
|
1018
1078
|
size: number;
|
|
1019
1079
|
lastModified: string;
|
|
@@ -1024,7 +1084,7 @@ export declare class GraphRepository implements IRepository {
|
|
|
1024
1084
|
* Lists drive items shared with the user.
|
|
1025
1085
|
*/
|
|
1026
1086
|
listSharedWithMeAsync(): Promise<Array<{
|
|
1027
|
-
id:
|
|
1087
|
+
id: string;
|
|
1028
1088
|
name: string;
|
|
1029
1089
|
size: number;
|
|
1030
1090
|
lastModified: string;
|
|
@@ -1034,7 +1094,7 @@ export declare class GraphRepository implements IRepository {
|
|
|
1034
1094
|
/**
|
|
1035
1095
|
* Creates a sharing link for a drive item.
|
|
1036
1096
|
*/
|
|
1037
|
-
createSharingLinkAsync(itemId:
|
|
1097
|
+
createSharingLinkAsync(itemId: string, type: string, scope: string): Promise<{
|
|
1038
1098
|
webUrl: string;
|
|
1039
1099
|
type: string;
|
|
1040
1100
|
scope: string;
|
|
@@ -1042,21 +1102,21 @@ export declare class GraphRepository implements IRepository {
|
|
|
1042
1102
|
/**
|
|
1043
1103
|
* Deletes a drive item.
|
|
1044
1104
|
*/
|
|
1045
|
-
deleteDriveItemAsync(itemId:
|
|
1105
|
+
deleteDriveItemAsync(itemId: string): Promise<void>;
|
|
1046
1106
|
/**
|
|
1047
|
-
* Lists followed SharePoint sites,
|
|
1107
|
+
* Lists followed SharePoint sites, minting durable si_ tokens.
|
|
1048
1108
|
*/
|
|
1049
1109
|
listSitesAsync(): Promise<Array<{
|
|
1050
|
-
id:
|
|
1110
|
+
id: string;
|
|
1051
1111
|
name: string;
|
|
1052
1112
|
webUrl: string;
|
|
1053
1113
|
displayName: string;
|
|
1054
1114
|
}>>;
|
|
1055
1115
|
/**
|
|
1056
|
-
* Searches SharePoint sites by keyword,
|
|
1116
|
+
* Searches SharePoint sites by keyword, minting durable si_ tokens.
|
|
1057
1117
|
*/
|
|
1058
1118
|
searchSitesAsync(query: string): Promise<Array<{
|
|
1059
|
-
id:
|
|
1119
|
+
id: string;
|
|
1060
1120
|
name: string;
|
|
1061
1121
|
webUrl: string;
|
|
1062
1122
|
displayName: string;
|
|
@@ -1064,27 +1124,27 @@ export declare class GraphRepository implements IRepository {
|
|
|
1064
1124
|
/**
|
|
1065
1125
|
* Gets details for a specific SharePoint site.
|
|
1066
1126
|
*/
|
|
1067
|
-
getSiteAsync(siteId:
|
|
1068
|
-
id:
|
|
1127
|
+
getSiteAsync(siteId: string): Promise<{
|
|
1128
|
+
id: string;
|
|
1069
1129
|
name: string;
|
|
1070
1130
|
webUrl: string;
|
|
1071
1131
|
displayName: string;
|
|
1072
1132
|
description: string;
|
|
1073
1133
|
}>;
|
|
1074
1134
|
/**
|
|
1075
|
-
* Lists document libraries for a SharePoint site,
|
|
1135
|
+
* Lists document libraries for a SharePoint site, minting durable dl_ tokens.
|
|
1076
1136
|
*/
|
|
1077
|
-
listDocumentLibrariesAsync(siteId:
|
|
1078
|
-
id:
|
|
1137
|
+
listDocumentLibrariesAsync(siteId: string): Promise<Array<{
|
|
1138
|
+
id: string;
|
|
1079
1139
|
name: string;
|
|
1080
1140
|
webUrl: string;
|
|
1081
1141
|
driveType: string;
|
|
1082
1142
|
}>>;
|
|
1083
1143
|
/**
|
|
1084
|
-
* Lists items in a document library or folder,
|
|
1144
|
+
* Lists items in a document library or folder, minting durable li_ tokens.
|
|
1085
1145
|
*/
|
|
1086
|
-
listLibraryItemsAsync(libraryId:
|
|
1087
|
-
id:
|
|
1146
|
+
listLibraryItemsAsync(libraryId: string, folderId?: string): Promise<Array<{
|
|
1147
|
+
id: string;
|
|
1088
1148
|
name: string;
|
|
1089
1149
|
size: number;
|
|
1090
1150
|
webUrl: string;
|
|
@@ -1094,14 +1154,84 @@ export declare class GraphRepository implements IRepository {
|
|
|
1094
1154
|
/**
|
|
1095
1155
|
* Downloads a file from a document library to the specified path.
|
|
1096
1156
|
*/
|
|
1097
|
-
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>;
|
|
1098
1228
|
/**
|
|
1099
|
-
*
|
|
1229
|
+
* Deletes an item from a SharePoint list.
|
|
1100
1230
|
*/
|
|
1101
|
-
|
|
1231
|
+
deleteSharePointListItemAsync(itemId: string): Promise<void>;
|
|
1102
1232
|
}
|
|
1103
1233
|
/**
|
|
1104
1234
|
* Creates a Microsoft Graph API repository.
|
|
1105
1235
|
*/
|
|
1106
|
-
export declare function createGraphRepository(deviceCodeCallback?: DeviceCodeCallback): GraphRepository;
|
|
1236
|
+
export declare function createGraphRepository(deviceCodeCallback?: DeviceCodeCallback, store?: StateStore, accountId?: () => string): GraphRepository;
|
|
1107
1237
|
//# sourceMappingURL=repository.d.ts.map
|