@fourier-labs/harbour-contracts 0.77.0 → 0.78.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Body of POST /_harbour/integrations/execute (app SDK), forwarded unchanged to the governance development and runtime execute routes. Exactly one declared operation against one declared resource. The identity mode is fixed by the operation for every operation but the declared-mode Slack operations (slack.channel.history, slack.message.post, slack.message.update, slack.message.delete; 0.71.0 widened history), and always enforced from an approved grant; any identity/userId/scope field is rejected by additionalProperties. A declared-mode operation runs as the app (for a post: the IT-approved per-app name from the grant, plus a "Posted by <app> on Isomorph" footer) or as the signed-in person (no name, no footer) — the same input either way — and since 0.55.0 the call names which of the app's approved modes it runs under (`mode`): required when IT approved both modes for the app (MODE_REQUIRED otherwise), optional when it approved one (that one is used), and a named mode without an approved grant is refused (MODE_NOT_GRANTED) rather than served under the other, so approval order never decides what a call does. Per-operation input bounds (0.71.0, ADR 0018): slack.channel.history {limit? 1..100, default 15, cursor?, oldest?, latest?}; slack.message.post {text 1..4000 chars, threadId?, format? plain|mrkdwn} and a required idempotencyKey retained across retries of one explicit Send; slack.message.update {messageId, text, format?}; slack.message.delete {messageId}; slack.dm.send {to 1..8 addresses, text, format?} (app mode only) with a required idempotencyKey; slack.user.lookup {email}; gmail.thread.list {limit? 1..50, default 15, q?, labelIds? default [INBOX], pageToken?}; gmail.thread.read {threadId}; gmail.message.read {messageId}; gmail.attachment.read {messageId, attachmentId}; gmail.message.send {to 1..50 addresses (to+cc+bcc <= 50 in total), cc?, bcc?, subject 1..256 chars, text 1..4000 chars, html? <= 64 KiB, attachments? 1..5 of <= 2 MiB each as base64, replyToMessageId?} and a required idempotencyKey like slack.message.post; warehouse.view.read {columns? 1..32, where? 1..16 filters, groupBy? 1..8 columns, aggregates? 1..16, orderBy? 1..8, limit? 1..1000, default 100} (0.70.0: a plain read names columns, an aggregate read names aggregates and optionally groupBy; the cross-field rules — exactly one of columns or aggregates, groupBy needs aggregates, a filter value that fits its op, orderBy naming a returned column, every named column approved — are enforced by governance, not expressible here; ADR 0017). Basecamp (0.76.0, ADR 0022; every id a string of 1..20 digits, every operation user mode): basecamp.project.list {pageToken?, projectStatus? active|archived} on the fixed `account` alias; on a project alias basecamp.todolist.list {pageToken?}; basecamp.todo.list {todolistId, completed?, pageToken?}; basecamp.todo.create {todolistId, content 1..1000 (the to-do title), description? <= 16384, contentFormat? plain|html, dueOn? YYYY-MM-DD, assigneeIds? 1..20, notify?} with a required idempotencyKey; basecamp.todo.complete {todoId} (idempotent at Basecamp, so no key); basecamp.message.list {pageToken?}; basecamp.message.post {subject 1..256, content 1..65536, contentFormat?} with a required idempotencyKey; basecamp.comment.list {recordingId, pageToken?}; basecamp.comment.post {recordingId, content 1..16384, contentFormat?} with a required idempotencyKey; basecamp.campfire.post {content 1..4000, contentFormat?} with a required idempotencyKey; basecamp.people.list {pageToken?}. `pageToken` is the previous page's `nextPageToken` (a Basecamp page number as digits). Each operation's then-block is the one statement of its input rules: propertyNames.enum names the fields it accepts, required the ones it needs, and per-field overrides (maximum, default) narrow the shared property. Codegen derives IntegrationExecuteInputRules and validateIntegrationExecuteInput (gen-ts/integration-execute-input-rules.ts, gen-go/integration_execute_input_rules.go) from exactly these blocks, so the governance execute route, the app SDK and the kit's local check refuse the same request with the same message. Transport limits (not expressible here): request <= 16 KiB except a gmail.message.send carrying attachments (governance sizes that route for the attachment bound) and a basecamp.message.post (its 64 KiB body; governance allows 80 KiB there), total deadline 10 s.
2
+ * Body of POST /_harbour/integrations/execute (app SDK), forwarded unchanged to the governance development and runtime execute routes. Exactly one declared operation against one declared resource. The identity mode is fixed by the operation for every operation but the declared-mode Slack operations (slack.channel.history, slack.message.post, slack.message.update, slack.message.delete; 0.71.0 widened history), and always enforced from an approved grant; any identity/userId/scope field is rejected by additionalProperties. A declared-mode operation runs as the app (for a post: the IT-approved per-app name from the grant, plus a "Posted by <app> on Isomorph" footer) or as the signed-in person (no name, no footer) — the same input either way — and since 0.55.0 the call names which of the app's approved modes it runs under (`mode`): required when IT approved both modes for the app (MODE_REQUIRED otherwise), optional when it approved one (that one is used), and a named mode without an approved grant is refused (MODE_NOT_GRANTED) rather than served under the other, so approval order never decides what a call does. Per-operation input bounds (0.71.0, ADR 0018): slack.channel.history {limit? 1..100, default 15, cursor?, oldest?, latest?}; slack.message.post {text 1..4000 chars, threadId?, format? plain|mrkdwn} and a required idempotencyKey retained across retries of one explicit Send; slack.message.update {messageId, text, format?}; slack.message.delete {messageId}; slack.dm.send {to 1..8 addresses, text, format?} (app mode only) with a required idempotencyKey; slack.user.lookup {email}; gmail.thread.list {limit? 1..50, default 15, q?, labelIds? default [INBOX], pageToken?}; gmail.thread.read {threadId}; gmail.message.read {messageId}; gmail.attachment.read {messageId, attachmentId}; gmail.message.send {to 1..50 addresses (to+cc+bcc <= 50 in total), cc?, bcc?, subject 1..256 chars, text 1..4000 chars, html? <= 64 KiB, attachments? 1..5 of <= 2 MiB each as base64, replyToMessageId?} and a required idempotencyKey like slack.message.post; warehouse.view.read {columns? 1..32, where? 1..16 filters, groupBy? 1..8 columns, aggregates? 1..16, orderBy? 1..8, limit? 1..1000, default 100} (0.70.0: a plain read names columns, an aggregate read names aggregates and optionally groupBy; the cross-field rules — exactly one of columns or aggregates, groupBy needs aggregates, a filter value that fits its op, orderBy naming a returned column, every named column approved — are enforced by governance, not expressible here; ADR 0017). Basecamp (0.76.0, ADR 0022; every id a string of 1..20 digits, every operation user mode): basecamp.project.list {pageToken?, projectStatus? active|archived} on the fixed `account` alias; on a project alias basecamp.todolist.list {pageToken?}; basecamp.todo.list {todolistId, completed?, pageToken?}; basecamp.todo.create {todolistId, content 1..1000 (the to-do title), description? <= 16384, contentFormat? plain|html, dueOn? YYYY-MM-DD, assigneeIds? 1..20, notify?} with a required idempotencyKey; basecamp.todo.complete {todoId} (idempotent at Basecamp, so no key); basecamp.message.list {pageToken?}; basecamp.message.post {subject 1..256, content 1..65536, contentFormat?} with a required idempotencyKey; basecamp.comment.list {recordingId, pageToken?}; basecamp.comment.post {recordingId, content 1..16384, contentFormat?} with a required idempotencyKey; basecamp.campfire.post {content 1..4000, contentFormat?} with a required idempotencyKey; basecamp.people.list {pageToken?}. `pageToken` is the previous page's `nextPageToken` (a Basecamp page number as digits). SharePoint (0.78.0, ADR 0024; every id a Microsoft Graph id — GraphId, 1..256 characters — every operation user mode on a site alias): sharepoint.list.list {pageToken?}; sharepoint.item.list {listId, filter? 1..512 (an OData filter on `fields/...`), pageToken?}; sharepoint.item.create {listId, fields (1..32 columns, each a string <= 4000, a number, a boolean or null)} with a required idempotencyKey; sharepoint.item.update {listId, itemId, fields} (a PATCH, idempotent at Graph, so no key); sharepoint.drive.list {pageToken?}; sharepoint.file.list {driveId?, folderId?, pageToken?} (no driveId: the site's default drive; no folderId: its root); sharepoint.file.search {q 1..256, driveId?, pageToken?}; sharepoint.file.read {fileId, driveId?}; sharepoint.file.upload {filename 1..255, contentType, dataBase64 <= 2 MiB, driveId?, folderId?, conflict? rename|replace|fail} with a required idempotencyKey. A SharePoint `pageToken` is Graph's `$skiptoken` (up to 2048 characters; the shared field is that wide, the Gmail and Basecamp operations narrow it back to 256). Each operation's then-block is the one statement of its input rules: propertyNames.enum names the fields it accepts, required the ones it needs, and per-field overrides (maximum, default) narrow the shared property. Codegen derives IntegrationExecuteInputRules and validateIntegrationExecuteInput (gen-ts/integration-execute-input-rules.ts, gen-go/integration_execute_input_rules.go) from exactly these blocks, so the governance execute route, the app SDK and the kit's local check refuse the same request with the same message. Transport limits (not expressible here): request <= 16 KiB except a gmail.message.send carrying attachments (governance sizes that route for the attachment bound) and a basecamp.message.post (its 64 KiB body; governance allows 80 KiB there) and a sharepoint.file.upload (its 2 MiB file as base64; governance sizes it like the Gmail attachment route), total deadline 10 s.
3
3
  */
4
4
  export type IntegrationExecuteRequest = {
5
5
  /**
@@ -7,9 +7,9 @@ export type IntegrationExecuteRequest = {
7
7
  */
8
8
  connection: string;
9
9
  /**
10
- * Closed operation set. Extending it is a contracts change. 0.76.0 (ADR 0022) adds the eleven Basecamp operations, every one user mode only like gmail.*: basecamp.project.list (the projects of the company's pinned Basecamp account; its resource is the fixed `account` alias), and on one mapped project (the resource is a project alias, a key of the connection's `channels` map) basecamp.todolist.list, basecamp.todo.list, basecamp.todo.create (a receipted write: explicit action, idempotencyKey), basecamp.todo.complete (idempotent at Basecamp, no key), basecamp.message.list, basecamp.message.post, basecamp.comment.list, basecamp.comment.post, basecamp.campfire.post (the three posts are receipted writes) and basecamp.people.list. gmail.message.send (0.50.0) sends one email as the signed-in person: a send like slack.message.post (explicit Send, idempotencyKey, write receipt) under user identity; since 0.71.0 it may carry an HTML body and attachments. slack.message.post (0.53.0) runs in the mode the app declares: app (the company's Slack app, under the IT-approved per-app name) or user (the signed-in person, after their consent); since 0.55.0 each call names which of the approved modes it runs under. 0.71.0 (ADR 0018) adds slack.message.update and slack.message.delete (declared mode, like post), slack.dm.send (app mode: a direct message to 1..8 workspace members named by email), slack.user.lookup (app mode: email to Slack user id), gmail.thread.read (every message of one thread) and gmail.attachment.read (one attachment's bytes), and lets slack.channel.history run in app mode as well as user mode.
10
+ * Closed operation set. Extending it is a contracts change. 0.78.0 (ADR 0024) adds the nine SharePoint operations, every one user mode only on a site alias (a key of the connection's `channels` map, holding a Microsoft Graph site id): sharepoint.list.list, sharepoint.item.list, sharepoint.item.create (a receipted write: explicit action, idempotencyKey), sharepoint.item.update (a PATCH, idempotent at Graph, no key), sharepoint.drive.list, sharepoint.file.list, sharepoint.file.search, sharepoint.file.read and sharepoint.file.upload (a receipted write). 0.76.0 (ADR 0022) adds the eleven Basecamp operations, every one user mode only like gmail.*: basecamp.project.list (the projects of the company's pinned Basecamp account; its resource is the fixed `account` alias), and on one mapped project (the resource is a project alias, a key of the connection's `channels` map) basecamp.todolist.list, basecamp.todo.list, basecamp.todo.create (a receipted write: explicit action, idempotencyKey), basecamp.todo.complete (idempotent at Basecamp, no key), basecamp.message.list, basecamp.message.post, basecamp.comment.list, basecamp.comment.post, basecamp.campfire.post (the three posts are receipted writes) and basecamp.people.list. gmail.message.send (0.50.0) sends one email as the signed-in person: a send like slack.message.post (explicit Send, idempotencyKey, write receipt) under user identity; since 0.71.0 it may carry an HTML body and attachments. slack.message.post (0.53.0) runs in the mode the app declares: app (the company's Slack app, under the IT-approved per-app name) or user (the signed-in person, after their consent); since 0.55.0 each call names which of the approved modes it runs under. 0.71.0 (ADR 0018) adds slack.message.update and slack.message.delete (declared mode, like post), slack.dm.send (app mode: a direct message to 1..8 workspace members named by email), slack.user.lookup (app mode: email to Slack user id), gmail.thread.read (every message of one thread) and gmail.attachment.read (one attachment's bytes), and lets slack.channel.history run in app mode as well as user mode.
11
11
  */
12
- operation: 'slack.channel.history' | 'slack.message.post' | 'slack.message.update' | 'slack.message.delete' | 'slack.dm.send' | 'slack.user.lookup' | 'gmail.thread.list' | 'gmail.thread.read' | 'gmail.message.read' | 'gmail.message.send' | 'gmail.attachment.read' | 'basecamp.project.list' | 'basecamp.todolist.list' | 'basecamp.todo.list' | 'basecamp.todo.create' | 'basecamp.todo.complete' | 'basecamp.message.list' | 'basecamp.message.post' | 'basecamp.comment.list' | 'basecamp.comment.post' | 'basecamp.campfire.post' | 'basecamp.people.list' | 'warehouse.view.read' | 'service.request';
12
+ operation: 'slack.channel.history' | 'slack.message.post' | 'slack.message.update' | 'slack.message.delete' | 'slack.dm.send' | 'slack.user.lookup' | 'gmail.thread.list' | 'gmail.thread.read' | 'gmail.message.read' | 'gmail.message.send' | 'gmail.attachment.read' | 'basecamp.project.list' | 'basecamp.todolist.list' | 'basecamp.todo.list' | 'basecamp.todo.create' | 'basecamp.todo.complete' | 'basecamp.message.list' | 'basecamp.message.post' | 'basecamp.comment.list' | 'basecamp.comment.post' | 'basecamp.campfire.post' | 'basecamp.people.list' | 'sharepoint.list.list' | 'sharepoint.item.list' | 'sharepoint.item.create' | 'sharepoint.item.update' | 'sharepoint.drive.list' | 'sharepoint.file.list' | 'sharepoint.file.search' | 'sharepoint.file.read' | 'sharepoint.file.upload' | 'warehouse.view.read' | 'service.request';
13
13
  /**
14
14
  * Tenant-wide logical alias of a connection (governance sourceId) or of a resource under it.
15
15
  */
@@ -52,7 +52,7 @@ export type IntegrationExecuteRequest = {
52
52
  */
53
53
  latest?: string;
54
54
  /**
55
- * gmail.thread.list (0.71.0): a Gmail search query (the search-box syntax, e.g. `from:jane newer_than:7d`).
55
+ * gmail.thread.list (0.71.0): a Gmail search query (the search-box syntax, e.g. `from:jane newer_than:7d`). sharepoint.file.search (0.78.0): the words to search a drive's file names and contents for.
56
56
  */
57
57
  q?: string;
58
58
  /**
@@ -63,7 +63,7 @@ export type IntegrationExecuteRequest = {
63
63
  */
64
64
  labelIds?: string[];
65
65
  /**
66
- * gmail.thread.list (0.71.0) and every basecamp.*.list operation (0.76.0): the `nextPageToken` of the previous page; absent reads the first page.
66
+ * gmail.thread.list (0.71.0), every basecamp.*.list operation (0.76.0) and the paged sharepoint.* reads (0.78.0: list.list, item.list, drive.list, file.list, file.search): the `nextPageToken` of the previous page; absent reads the first page. At most 2048 characters for a Graph `$skiptoken`; the Gmail and Basecamp operations narrow it to 256.
67
67
  */
68
68
  pageToken?: string;
69
69
  /**
@@ -139,6 +139,52 @@ export type IntegrationExecuteRequest = {
139
139
  * basecamp.project.list (0.76.0): which projects to list; active when absent.
140
140
  */
141
141
  projectStatus?: 'active' | 'archived';
142
+ /**
143
+ * sharepoint.item.list / sharepoint.item.create / sharepoint.item.update (0.78.0): the SharePoint list, as a sharepoint.list.list result named it.
144
+ */
145
+ listId?: string;
146
+ /**
147
+ * sharepoint.item.update (0.78.0): the list item, as a sharepoint.item.list or sharepoint.item.create result named it.
148
+ */
149
+ itemId?: string;
150
+ /**
151
+ * sharepoint.file.list / sharepoint.file.search / sharepoint.file.read / sharepoint.file.upload (0.78.0): the document library, as a sharepoint.drive.list result named it; absent means the site's default drive (its Documents library).
152
+ */
153
+ driveId?: string;
154
+ /**
155
+ * sharepoint.file.list / sharepoint.file.upload (0.78.0): the folder to list or upload into, as a sharepoint.file.list result named it (an entry with isFolder); absent means the drive's root.
156
+ */
157
+ folderId?: string;
158
+ /**
159
+ * sharepoint.file.read (0.78.0): the file, as a sharepoint.file.list, sharepoint.file.search or sharepoint.file.upload result named it.
160
+ */
161
+ fileId?: string;
162
+ /**
163
+ * sharepoint.item.create / sharepoint.item.update (0.78.0): the item's column values keyed by the column's internal name (`Title`, `Status`, `DueDate`...), 1..32 of them; each a string of at most 4000 characters, a number, a boolean or null (which clears the column on an update). Which columns the list has, and whether a value fits its column type, is Graph's check.
164
+ */
165
+ fields?: {
166
+ [k: string]: string | number | boolean | null;
167
+ };
168
+ /**
169
+ * sharepoint.item.list (0.78.0): an OData `$filter` over the item's columns as `fields/<column> <op> <value>`, e.g. `fields/Status eq 'Open'`; absent lists every item. A filter on a column SharePoint has not indexed may be refused by Graph on a large list.
170
+ */
171
+ filter?: string;
172
+ /**
173
+ * sharepoint.file.upload (0.78.0): what happens when a file of that name already exists in the folder; rename when absent.
174
+ */
175
+ conflict?: 'rename' | 'replace' | 'fail';
176
+ /**
177
+ * sharepoint.file.upload (0.78.0): the name the file is stored under (the result's `filename` is the stored name, which `conflict` rename may have changed).
178
+ */
179
+ filename?: string;
180
+ /**
181
+ * sharepoint.file.upload (0.78.0): the file's MIME type, e.g. application/pdf.
182
+ */
183
+ contentType?: string;
184
+ /**
185
+ * sharepoint.file.upload (0.78.0): the file bytes, standard base64, at most 2 MiB of bytes (2,796,203 base64 characters) — the Gmail attachment bound.
186
+ */
187
+ dataBase64?: string;
142
188
  /**
143
189
  * warehouse.view.read, a plain read: explicit columns, or `*` alone when the app's approved resource grant allows all current and future columns. An aggregate read names aggregates instead.
144
190
  *
@@ -190,7 +236,7 @@ export type IntegrationExecuteRequest = {
190
236
  };
191
237
  };
192
238
  /**
193
- * UUID of one explicit Send action; required for the sends (slack.message.post, slack.dm.send, gmail.message.send) and the receipted Basecamp writes (basecamp.todo.create, basecamp.message.post, basecamp.comment.post, basecamp.campfire.post; 0.76.0), refused everywhere else. The same key with the same payload and subject returns the recorded outcome for seven days.
239
+ * UUID of one explicit Send action; required for the sends (slack.message.post, slack.dm.send, gmail.message.send), the receipted Basecamp writes (basecamp.todo.create, basecamp.message.post, basecamp.comment.post, basecamp.campfire.post; 0.76.0) and the receipted SharePoint writes (sharepoint.item.create, sharepoint.file.upload; 0.78.0), refused everywhere else. The same key with the same payload and subject returns the recorded outcome for seven days.
194
240
  */
195
241
  idempotencyKey?: string;
196
242
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The `data` member of a successful execute response `{data, requestId}`; the SDK unwraps `data`. Exactly one of the operation results (twenty-four operations since 0.76.0, ADR 0018 and ADR 0022): slack.channel.history -> {messages, hasMore, nextCursor?} (plain text/IDs/time, plus the display name and emoji icon a per-app-named app post carries — authorName/authorIcon, 0.55.0 — never the provider payload; `nextCursor` when hasMore, to pass as the next read's `cursor`); slack.message.post, slack.message.update, slack.message.delete -> {messageId} (the Slack ts); slack.dm.send -> {messageId, channelId} (the ts and the DM channel it went to); slack.user.lookup -> {userId, displayName}; gmail.thread.list -> {threads, hasMore, nextPageToken?} (newest matching threads; each `messageId` is the thread's newest message, what gmail.message.read takes; `nextPageToken` when hasMore); gmail.thread.read -> {id, emails} (every message of the thread, oldest first, each shaped like a gmail.message.read result); gmail.message.read -> {id, threadId, subject, from, to, date, text, truncated, attachments?} (headers plus the plain text with html stripped, cut at 16 KiB with `truncated` set; `attachments` lists the files without their bytes, which gmail.attachment.read fetches by id); gmail.attachment.read -> {filename, mimeType, size, dataBase64}; gmail.message.send -> {messageId, threadId} (the Gmail ids of the sent message and its thread); warehouse.view.read -> {rows, truncated} (rows keyed by the selected columns, or for an aggregate read by the groupBy columns then the aggregate aliases; decimal/64-bit values as strings, dates as ISO strings; since 0.70.0 every server sends `truncated`, true when more rows matched than `limit` — the server reads limit+1 rows to know — so the rows are incomplete and must not be totalled or averaged; a server before 0.70.0 omitted it). Basecamp (0.76.0, ADR 0022; every id a string of digits, every page at most 100 items, `nextPageToken` only when hasMore, text cut at 16 KiB like Gmail): basecamp.project.list -> {projects, hasMore, nextPageToken?}; basecamp.todolist.list -> {todolists, hasMore, nextPageToken?}; basecamp.todo.list -> {todos, hasMore, nextPageToken?}; basecamp.message.list -> {boardMessages, hasMore, nextPageToken?} (`boardMessages`, not `messages`, which is the Slack history shape); basecamp.comment.list -> {comments, hasMore, nextPageToken?}; basecamp.people.list -> {people, hasMore, nextPageToken?}; basecamp.todo.create, basecamp.message.post, basecamp.comment.post, basecamp.campfire.post -> {id, appUrl} (the new recording and its Basecamp page); basecamp.todo.complete -> {id, completed} with completed always true. An unknown send outcome is never a result; it is an error with details.code SEND_OUTCOME_UNKNOWN. A whole result over 1 MiB is rejected, never cut down to fit — except a gmail.attachment.read, whose single attachment is bounded by its own 2 MiB.
2
+ * The `data` member of a successful execute response `{data, requestId}`; the SDK unwraps `data`. Exactly one of the operation results (thirty-three operations since 0.78.0, ADR 0018, ADR 0022 and ADR 0024): slack.channel.history -> {messages, hasMore, nextCursor?} (plain text/IDs/time, plus the display name and emoji icon a per-app-named app post carries — authorName/authorIcon, 0.55.0 — never the provider payload; `nextCursor` when hasMore, to pass as the next read's `cursor`); slack.message.post, slack.message.update, slack.message.delete -> {messageId} (the Slack ts); slack.dm.send -> {messageId, channelId} (the ts and the DM channel it went to); slack.user.lookup -> {userId, displayName}; gmail.thread.list -> {threads, hasMore, nextPageToken?} (newest matching threads; each `messageId` is the thread's newest message, what gmail.message.read takes; `nextPageToken` when hasMore); gmail.thread.read -> {id, emails} (every message of the thread, oldest first, each shaped like a gmail.message.read result); gmail.message.read -> {id, threadId, subject, from, to, date, text, truncated, attachments?} (headers plus the plain text with html stripped, cut at 16 KiB with `truncated` set; `attachments` lists the files without their bytes, which gmail.attachment.read fetches by id); gmail.attachment.read -> {filename, mimeType, size, dataBase64}; gmail.message.send -> {messageId, threadId} (the Gmail ids of the sent message and its thread); warehouse.view.read -> {rows, truncated} (rows keyed by the selected columns, or for an aggregate read by the groupBy columns then the aggregate aliases; decimal/64-bit values as strings, dates as ISO strings; since 0.70.0 every server sends `truncated`, true when more rows matched than `limit` — the server reads limit+1 rows to know — so the rows are incomplete and must not be totalled or averaged; a server before 0.70.0 omitted it). Basecamp (0.76.0, ADR 0022; every id a string of digits, every page at most 100 items, `nextPageToken` only when hasMore, text cut at 16 KiB like Gmail): basecamp.project.list -> {projects, hasMore, nextPageToken?}; basecamp.todolist.list -> {todolists, hasMore, nextPageToken?}; basecamp.todo.list -> {todos, hasMore, nextPageToken?}; basecamp.message.list -> {boardMessages, hasMore, nextPageToken?} (`boardMessages`, not `messages`, which is the Slack history shape); basecamp.comment.list -> {comments, hasMore, nextPageToken?}; basecamp.people.list -> {people, hasMore, nextPageToken?}; basecamp.todo.create, basecamp.message.post, basecamp.comment.post, basecamp.campfire.post -> {id, appUrl} (the new recording and its Basecamp page); basecamp.todo.complete -> {id, completed} with completed always true. SharePoint (0.78.0, ADR 0024; every id a Microsoft Graph id, `nextPageToken` only when hasMore and up to 2048 characters for a Graph `$skiptoken`): sharepoint.list.list -> {lists, hasMore, nextPageToken?} (at most 100, hidden lists dropped); sharepoint.item.list -> {items, hasMore, nextPageToken?} (at most 50; each item's `fields` are the column values as Graph returns them with the system columns dropped, the whole object cut at 16 KiB); sharepoint.drive.list -> {drives, hasMore, nextPageToken?}; sharepoint.file.list and sharepoint.file.search -> {files, hasMore, nextPageToken?} (at most 100 entries, folders included with isFolder); sharepoint.file.read -> {id, filename, mimeType, size, dataBase64} (the Gmail attachment shape plus the file's id; at most 2 MiB of bytes); sharepoint.item.create -> {id, webUrl} (the new item and its SharePoint page); sharepoint.item.update -> {id}; sharepoint.file.upload -> {id, filename, webUrl} (the stored file, under the name `conflict` rename may have given it). An unknown send outcome is never a result; it is an error with details.code SEND_OUTCOME_UNKNOWN. A whole result over 1 MiB is rejected, never cut down to fit — except a gmail.attachment.read or a sharepoint.file.read, whose single file is bounded by its own 2 MiB.
3
3
  */
4
4
  export type IntegrationExecuteResult = {
5
5
  /**
@@ -29,9 +29,12 @@ export type IntegrationExecuteResult = {
29
29
  */
30
30
  threads?: GmailThread[];
31
31
  /**
32
- * gmail.thread.list (0.71.0): the token of the next page, present only when hasMore.
32
+ * gmail.thread.list (0.71.0), the basecamp.* lists (0.76.0) and the paged sharepoint.* reads (0.78.0): the token of the next page, present only when hasMore; up to 2048 characters since 0.78.0 for a Graph $skiptoken.
33
33
  */
34
34
  nextPageToken?: string;
35
+ /**
36
+ * gmail.thread.read / gmail.message.read: the Gmail id; the Basecamp writes and complete (0.76.0): the recording's id; the SharePoint writes and sharepoint.file.read (0.78.0): the Graph id of the item or file (up to 256 characters since 0.78.0, the GraphId bound).
37
+ */
35
38
  id?: string;
36
39
  threadId?: string;
37
40
  subject?: string;
@@ -119,6 +122,34 @@ export type IntegrationExecuteResult = {
119
122
  * basecamp.todo.complete (0.76.0): always true; the to-do is complete whether this call or an earlier one completed it.
120
123
  */
121
124
  completed?: boolean;
125
+ /**
126
+ * sharepoint.list.list (0.78.0): one page of the site's lists the signed-in person can see, hidden lists dropped.
127
+ *
128
+ * @maxItems 100
129
+ */
130
+ lists?: SharePointList[];
131
+ /**
132
+ * sharepoint.item.list (0.78.0): one page of the list's items (Graph pages of 50), filtered when the read said `filter`.
133
+ *
134
+ * @maxItems 50
135
+ */
136
+ items?: SharePointListItem[];
137
+ /**
138
+ * sharepoint.drive.list (0.78.0): one page of the site's document libraries.
139
+ *
140
+ * @maxItems 100
141
+ */
142
+ drives?: SharePointDrive[];
143
+ /**
144
+ * sharepoint.file.list / sharepoint.file.search (0.78.0): one page of a folder's entries (files and folders) or of the files matching the search.
145
+ *
146
+ * @maxItems 100
147
+ */
148
+ files?: SharePointFile[];
149
+ /**
150
+ * sharepoint.item.create / sharepoint.file.upload (0.78.0): the SharePoint page of the new item or file, for a person to open.
151
+ */
152
+ webUrl?: string;
122
153
  status?: number;
123
154
  headers?: {
124
155
  [k: string]: string;
@@ -292,3 +323,60 @@ export interface BasecampPerson {
292
323
  */
293
324
  admin: boolean;
294
325
  }
326
+ /**
327
+ * One list of a sharepoint.list.list result (0.78.0); `id` is what sharepoint.item.list, sharepoint.item.create and sharepoint.item.update take as `listId`. `template` is the list template Graph reports (genericList, documentLibrary, tasks, events...) when it does.
328
+ */
329
+ export interface SharePointList {
330
+ /**
331
+ * A Microsoft Graph id (0.78.0): a SharePoint list (a GUID), list item (digits), drive (`b!...`) or drive item, as Graph names it — opaque, 1..256 characters of letters, digits and `!._,=-`. How every sharepoint.* result names one and every sharepoint.* input takes one back.
332
+ */
333
+ id: string;
334
+ name: string;
335
+ description?: string;
336
+ webUrl: string;
337
+ template?: string;
338
+ }
339
+ /**
340
+ * One item of a sharepoint.item.list result (0.78.0): `fields` are its column values keyed by internal column name, as Graph returns them with the system columns (@odata.etag, ContentType, Attachments, Edit, LinkTitle*, ItemChildCount, FolderChildCount, _UIVersionString, _ComplianceFlags...) dropped and the whole object cut at 16 KiB; `id` is what sharepoint.item.update takes as `itemId`.
341
+ */
342
+ export interface SharePointListItem {
343
+ /**
344
+ * A Microsoft Graph id (0.78.0): a SharePoint list (a GUID), list item (digits), drive (`b!...`) or drive item, as Graph names it — opaque, 1..256 characters of letters, digits and `!._,=-`. How every sharepoint.* result names one and every sharepoint.* input takes one back.
345
+ */
346
+ id: string;
347
+ /**
348
+ * Column values as Graph returns them (strings, numbers, booleans, and lookup or person values as Graph shapes them).
349
+ */
350
+ fields: {
351
+ [k: string]: unknown;
352
+ };
353
+ webUrl: string;
354
+ createdAt: string;
355
+ modifiedAt: string;
356
+ }
357
+ /**
358
+ * One document library of a sharepoint.drive.list result (0.78.0); `id` is what the sharepoint.file.* operations take as `driveId`.
359
+ */
360
+ export interface SharePointDrive {
361
+ /**
362
+ * A Microsoft Graph id (0.78.0): a SharePoint list (a GUID), list item (digits), drive (`b!...`) or drive item, as Graph names it — opaque, 1..256 characters of letters, digits and `!._,=-`. How every sharepoint.* result names one and every sharepoint.* input takes one back.
363
+ */
364
+ id: string;
365
+ name: string;
366
+ webUrl: string;
367
+ }
368
+ /**
369
+ * One entry of a sharepoint.file.list or sharepoint.file.search result (0.78.0): a file (`mimeType` set, `id` is what sharepoint.file.read takes as `fileId`) or a folder (`isFolder`, `id` is what sharepoint.file.list and sharepoint.file.upload take as `folderId`). `size` is in bytes; a folder's is the total of its contents.
370
+ */
371
+ export interface SharePointFile {
372
+ /**
373
+ * A Microsoft Graph id (0.78.0): a SharePoint list (a GUID), list item (digits), drive (`b!...`) or drive item, as Graph names it — opaque, 1..256 characters of letters, digits and `!._,=-`. How every sharepoint.* result names one and every sharepoint.* input takes one back.
374
+ */
375
+ id: string;
376
+ name: string;
377
+ isFolder: boolean;
378
+ size: number;
379
+ mimeType?: string;
380
+ webUrl: string;
381
+ modifiedAt: string;
382
+ }
@@ -154,6 +154,69 @@ export declare const IntegrationOperations: {
154
154
  readonly declaredMode: false;
155
155
  readonly idempotencyKey: false;
156
156
  };
157
+ readonly "sharepoint.list.list": {
158
+ readonly kind: "saas";
159
+ readonly identities: readonly ["user"];
160
+ readonly readOnly: true;
161
+ readonly declaredMode: false;
162
+ readonly idempotencyKey: false;
163
+ };
164
+ readonly "sharepoint.item.list": {
165
+ readonly kind: "saas";
166
+ readonly identities: readonly ["user"];
167
+ readonly readOnly: true;
168
+ readonly declaredMode: false;
169
+ readonly idempotencyKey: false;
170
+ };
171
+ readonly "sharepoint.item.create": {
172
+ readonly kind: "saas";
173
+ readonly identities: readonly ["user"];
174
+ readonly readOnly: false;
175
+ readonly declaredMode: false;
176
+ readonly idempotencyKey: true;
177
+ };
178
+ readonly "sharepoint.item.update": {
179
+ readonly kind: "saas";
180
+ readonly identities: readonly ["user"];
181
+ readonly readOnly: false;
182
+ readonly declaredMode: false;
183
+ readonly idempotencyKey: false;
184
+ };
185
+ readonly "sharepoint.drive.list": {
186
+ readonly kind: "saas";
187
+ readonly identities: readonly ["user"];
188
+ readonly readOnly: true;
189
+ readonly declaredMode: false;
190
+ readonly idempotencyKey: false;
191
+ };
192
+ readonly "sharepoint.file.list": {
193
+ readonly kind: "saas";
194
+ readonly identities: readonly ["user"];
195
+ readonly readOnly: true;
196
+ readonly declaredMode: false;
197
+ readonly idempotencyKey: false;
198
+ };
199
+ readonly "sharepoint.file.search": {
200
+ readonly kind: "saas";
201
+ readonly identities: readonly ["user"];
202
+ readonly readOnly: true;
203
+ readonly declaredMode: false;
204
+ readonly idempotencyKey: false;
205
+ };
206
+ readonly "sharepoint.file.read": {
207
+ readonly kind: "saas";
208
+ readonly identities: readonly ["user"];
209
+ readonly readOnly: true;
210
+ readonly declaredMode: false;
211
+ readonly idempotencyKey: false;
212
+ };
213
+ readonly "sharepoint.file.upload": {
214
+ readonly kind: "saas";
215
+ readonly identities: readonly ["user"];
216
+ readonly readOnly: false;
217
+ readonly declaredMode: false;
218
+ readonly idempotencyKey: true;
219
+ };
157
220
  readonly "warehouse.view.read": {
158
221
  readonly kind: "database";
159
222
  readonly identities: readonly ["app"];
@@ -204,6 +204,87 @@ export const IntegrationOperations = {
204
204
  "declaredMode": false,
205
205
  "idempotencyKey": false
206
206
  },
207
+ "sharepoint.list.list": {
208
+ "kind": "saas",
209
+ "identities": [
210
+ "user"
211
+ ],
212
+ "readOnly": true,
213
+ "declaredMode": false,
214
+ "idempotencyKey": false
215
+ },
216
+ "sharepoint.item.list": {
217
+ "kind": "saas",
218
+ "identities": [
219
+ "user"
220
+ ],
221
+ "readOnly": true,
222
+ "declaredMode": false,
223
+ "idempotencyKey": false
224
+ },
225
+ "sharepoint.item.create": {
226
+ "kind": "saas",
227
+ "identities": [
228
+ "user"
229
+ ],
230
+ "readOnly": false,
231
+ "declaredMode": false,
232
+ "idempotencyKey": true
233
+ },
234
+ "sharepoint.item.update": {
235
+ "kind": "saas",
236
+ "identities": [
237
+ "user"
238
+ ],
239
+ "readOnly": false,
240
+ "declaredMode": false,
241
+ "idempotencyKey": false
242
+ },
243
+ "sharepoint.drive.list": {
244
+ "kind": "saas",
245
+ "identities": [
246
+ "user"
247
+ ],
248
+ "readOnly": true,
249
+ "declaredMode": false,
250
+ "idempotencyKey": false
251
+ },
252
+ "sharepoint.file.list": {
253
+ "kind": "saas",
254
+ "identities": [
255
+ "user"
256
+ ],
257
+ "readOnly": true,
258
+ "declaredMode": false,
259
+ "idempotencyKey": false
260
+ },
261
+ "sharepoint.file.search": {
262
+ "kind": "saas",
263
+ "identities": [
264
+ "user"
265
+ ],
266
+ "readOnly": true,
267
+ "declaredMode": false,
268
+ "idempotencyKey": false
269
+ },
270
+ "sharepoint.file.read": {
271
+ "kind": "saas",
272
+ "identities": [
273
+ "user"
274
+ ],
275
+ "readOnly": true,
276
+ "declaredMode": false,
277
+ "idempotencyKey": false
278
+ },
279
+ "sharepoint.file.upload": {
280
+ "kind": "saas",
281
+ "identities": [
282
+ "user"
283
+ ],
284
+ "readOnly": false,
285
+ "declaredMode": false,
286
+ "idempotencyKey": true
287
+ },
207
288
  "warehouse.view.read": {
208
289
  "kind": "database",
209
290
  "identities": [
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Slack carries an installation and a channel map; Gmail is user-consent only; Basecamp is user-consent only with an IT-pinned account and a project map in `channels`.
2
+ * Slack carries an installation and a channel map; Gmail is user-consent only; Basecamp is user-consent only with an IT-pinned account and a project map in `channels`; SharePoint (0.78.0) is user-consent only, pinned to the company's Microsoft 365 tenant in `account`, with a site map in `channels`.
3
3
  */
4
- export type SaasProvider = 'slack' | 'gmail' | 'basecamp';
4
+ export type SaasProvider = 'slack' | 'gmail' | 'basecamp' | 'sharepoint';
5
5
  /**
6
6
  * DISABLED stops every app call immediately (details.code CONNECTION_DISABLED).
7
7
  */
@@ -23,7 +23,7 @@ export type ExternalRecipientMode = 'block' | 'allowlist' | 'allow';
23
23
  */
24
24
  export type InstallationName = string;
25
25
  /**
26
- * Tenant-wide SaaS connection record (control table sk SAASCONN#<sourceId>, same tenant partition as database sources; alias uniqueness is enforced across both). One connection per tenant and provider: a single bot installation of the platform-owned provider app and a single logical channel map shared by every app environment (grants, requests and user consent links stay per environment). A Gmail connection has neither installation nor channels: user consent is the only step and its one resource is the fixed `inbox` alias. A Basecamp connection (0.76.0, ADR 0022) has no installation either: IT pins the company's Basecamp `account` (chosen from the accounts IT's own Basecamp sign-in belongs to) and maps project aliases to project ids in `channels`; basecamp.project.list runs on the fixed `account` alias. Contains references, never secrets: installation tokens live under their own token records. The pre-T25 per-environment shape (`clientId`, `clientSecretRef`, `environments`, `installations`) is deprecated: the control plane normalises such a stored record on read and never writes it.
26
+ * Tenant-wide SaaS connection record (control table sk SAASCONN#<sourceId>, same tenant partition as database sources; alias uniqueness is enforced across both). One connection per tenant and provider: a single bot installation of the platform-owned provider app and a single logical channel map shared by every app environment (grants, requests and user consent links stay per environment). A Gmail connection has neither installation nor channels: user consent is the only step and its one resource is the fixed `inbox` alias. A Basecamp connection (0.76.0, ADR 0022) has no installation either: IT pins the company's Basecamp `account` (chosen from the accounts IT's own Basecamp sign-in belongs to) and maps project aliases to project ids in `channels`; basecamp.project.list runs on the fixed `account` alias. A SharePoint connection (0.78.0, ADR 0024) is shaped the same way: IT pins the company's Microsoft 365 tenant in `account` (the Entra tenant id and the organisation's display name, from IT's own Microsoft sign-in) and maps site aliases to Microsoft Graph site ids (`hostname,siteCollectionGuid,webGuid`) in `channels`; every sharepoint.* operation runs on a site alias. Contains references, never secrets: installation tokens live under their own token records. The pre-T25 per-environment shape (`clientId`, `clientSecretRef`, `environments`, `installations`) is deprecated: the control plane normalises such a stored record on read and never writes it.
27
27
  */
28
28
  export interface SaasConnection {
29
29
  schema: 'harbour.saas-connection/1.0';
@@ -43,21 +43,21 @@ export interface SaasConnection {
43
43
  installation?: SaasInstallation;
44
44
  account?: BasecampAccount;
45
45
  /**
46
- * Logical alias → provider resource id: a Slack channel id or a Basecamp project id. Always empty for Gmail.
46
+ * Logical alias → provider resource id: a Slack channel id, a Basecamp project id or a SharePoint site id. Always empty for Gmail.
47
47
  */
48
48
  channels: {
49
49
  /**
50
- * A Slack channel id (public, non-archived) or a Basecamp project id (digits).
50
+ * A Slack channel id (public, non-archived), a Basecamp project id (digits) or a SharePoint site id (0.78.0: the Microsoft Graph composite `hostname,siteCollectionGuid,webGuid`).
51
51
  */
52
52
  [k: string]: string;
53
53
  };
54
54
  /**
55
- * Operations IT allows apps to request on this connection: the provider's own SaaS operations (Slack: slack.channel.history, slack.message.post, slack.message.update, slack.message.delete, slack.dm.send, slack.user.lookup; Gmail: gmail.thread.list, gmail.thread.read, gmail.message.read, gmail.message.send, gmail.attachment.read; Basecamp (0.76.0): basecamp.project.list, basecamp.todolist.list, basecamp.todo.list, basecamp.todo.create, basecamp.todo.complete, basecamp.message.list, basecamp.message.post, basecamp.comment.list, basecamp.comment.post, basecamp.campfire.post, basecamp.people.list). Never warehouse.view.read.
55
+ * Operations IT allows apps to request on this connection: the provider's own SaaS operations (Slack: slack.channel.history, slack.message.post, slack.message.update, slack.message.delete, slack.dm.send, slack.user.lookup; Gmail: gmail.thread.list, gmail.thread.read, gmail.message.read, gmail.message.send, gmail.attachment.read; Basecamp (0.76.0): basecamp.project.list, basecamp.todolist.list, basecamp.todo.list, basecamp.todo.create, basecamp.todo.complete, basecamp.message.list, basecamp.message.post, basecamp.comment.list, basecamp.comment.post, basecamp.campfire.post, basecamp.people.list; SharePoint (0.78.0): sharepoint.list.list, sharepoint.item.list, sharepoint.item.create, sharepoint.item.update, sharepoint.drive.list, sharepoint.file.list, sharepoint.file.search, sharepoint.file.read, sharepoint.file.upload). Never warehouse.view.read.
56
56
  *
57
57
  * @minItems 1
58
- * @maxItems 22
58
+ * @maxItems 31
59
59
  */
60
- operations: ('slack.channel.history' | 'slack.message.post' | 'slack.message.update' | 'slack.message.delete' | 'slack.dm.send' | 'slack.user.lookup' | 'gmail.thread.list' | 'gmail.thread.read' | 'gmail.message.read' | 'gmail.message.send' | 'gmail.attachment.read' | 'basecamp.project.list' | 'basecamp.todolist.list' | 'basecamp.todo.list' | 'basecamp.todo.create' | 'basecamp.todo.complete' | 'basecamp.message.list' | 'basecamp.message.post' | 'basecamp.comment.list' | 'basecamp.comment.post' | 'basecamp.campfire.post' | 'basecamp.people.list' | 'warehouse.view.read' | 'service.request')[];
60
+ operations: ('slack.channel.history' | 'slack.message.post' | 'slack.message.update' | 'slack.message.delete' | 'slack.dm.send' | 'slack.user.lookup' | 'gmail.thread.list' | 'gmail.thread.read' | 'gmail.message.read' | 'gmail.message.send' | 'gmail.attachment.read' | 'basecamp.project.list' | 'basecamp.todolist.list' | 'basecamp.todo.list' | 'basecamp.todo.create' | 'basecamp.todo.complete' | 'basecamp.message.list' | 'basecamp.message.post' | 'basecamp.comment.list' | 'basecamp.comment.post' | 'basecamp.campfire.post' | 'basecamp.people.list' | 'sharepoint.list.list' | 'sharepoint.item.list' | 'sharepoint.item.create' | 'sharepoint.item.update' | 'sharepoint.drive.list' | 'sharepoint.file.list' | 'sharepoint.file.search' | 'sharepoint.file.read' | 'sharepoint.file.upload' | 'warehouse.view.read' | 'service.request')[];
61
61
  developmentPreapproval: DevelopmentPreapproval;
62
62
  oauthClient?: SaasOauthClient;
63
63
  userModeApproval?: UserModeApproval;
@@ -122,15 +122,15 @@ export interface SaasInstallation {
122
122
  botName?: string;
123
123
  }
124
124
  /**
125
- * The pinned Basecamp account (0.76.0, Basecamp only): the one account, among those IT's own Basecamp sign-in belongs to, that every user token on this connection must also belong to and that every project id in `channels` lives in. Absent until IT chooses it; governance refuses every basecamp.* call until then.
125
+ * The pinned provider account (0.76.0, Basecamp; 0.78.0, SharePoint — the name keeps its 0.76.0 spelling so consumers need not move): the one account, among those IT's own provider sign-in belongs to, that every user token on this connection must also belong to and that every resource id in `channels` lives in. For Basecamp the account (digits); for SharePoint the Microsoft 365 tenant (the Entra tenant GUID). Absent until IT chooses it; governance refuses every basecamp.* and sharepoint.* call until then.
126
126
  */
127
127
  export interface BasecampAccount {
128
128
  /**
129
- * The Basecamp account id, the first path segment of the API base URL.
129
+ * The Basecamp account id (digits, the first path segment of the API base URL) or the Microsoft Entra tenant id (a GUID, the `tid` claim).
130
130
  */
131
131
  id: string;
132
132
  /**
133
- * The account's name as Basecamp shows it, for IT to recognise.
133
+ * The account's name as the provider shows it (a Basecamp account name, a Microsoft 365 organisation display name), for IT to recognise.
134
134
  */
135
135
  name: string;
136
136
  }
@@ -27,6 +27,15 @@ export type DeclaredConnection = {
27
27
  'basecamp.comment.post'?: UserModeChannelOperation;
28
28
  'basecamp.campfire.post'?: UserModeChannelOperation;
29
29
  'basecamp.people.list'?: UserModeChannelOperation;
30
+ 'sharepoint.list.list'?: UserModeChannelOperation;
31
+ 'sharepoint.item.list'?: UserModeChannelOperation;
32
+ 'sharepoint.item.create'?: UserModeChannelOperation;
33
+ 'sharepoint.item.update'?: UserModeChannelOperation;
34
+ 'sharepoint.drive.list'?: UserModeChannelOperation;
35
+ 'sharepoint.file.list'?: UserModeChannelOperation;
36
+ 'sharepoint.file.search'?: UserModeChannelOperation;
37
+ 'sharepoint.file.read'?: UserModeChannelOperation;
38
+ 'sharepoint.file.upload'?: UserModeChannelOperation;
30
39
  'warehouse.view.read'?: AppModeViewOperation;
31
40
  'service.request'?: ServiceOperation;
32
41
  };
@@ -51,7 +60,7 @@ export type ResourceNames = IntegrationAlias[];
51
60
  export type ColumnName = string;
52
61
 
53
62
  /**
54
- * Committed `.isomorph/integrations.json`: the app's declared use of tenant-wide integration connections. Keys are logical connection aliases (the governance sourceId); resources are logical names (Slack channel alias, warehouse view name), never IDs, tokens or URLs. The operation set is closed (twenty-four operations since 0.76.0, ADR 0018 and ADR 0022). Each operation carries a fixed identity mode — slack.dm.send=app, slack.user.lookup=app, every gmail.* operation=user, every basecamp.* operation=user, warehouse.view.read=app, service.request=app — except the declared-mode Slack operations (slack.message.post, and since 0.71.0 slack.channel.history, slack.message.update and slack.message.delete), whose mode the app DECLARES: `app` acts as the company's Slack app (the one audited bot identity; a post goes out under the IT-approved per-app display name when the connection declares `presentation`), `user` acts as the signed-in person after their own consent (reads what they can read, edits what they wrote). The declared mode is the one the app requests access for; an app may hold approved grants for both modes after two requests, and each declared-mode call names which approved mode it runs under (`mode` on the execute request, 0.55.0) — a mode IT did not approve is refused, never swapped for the other. A `saas` connection may declare only the Slack, Gmail and Basecamp operations and a `database` connection only warehouse.view.read; `presentation` is a `saas` connection's optional per-app display name and icon for app-mode Slack posts, shown to IT at approval time and applied only from the approved grant. Gmail is user-mode only (reads, one send); its single resource is the fixed `inbox` alias. Basecamp (0.76.0, ADR 0022) is user-mode only too: basecamp.project.list runs on the fixed `account` alias (the company's pinned Basecamp account) and every other basecamp.* operation on a project alias IT mapped in the connection's `channels` map, so Basecamp itself refuses an id outside that project. slack.dm.send and slack.user.lookup address people by email rather than a channel, so their single resource is the fixed `workspace` alias (the connection's installed workspace), the way Gmail's is `inbox`. This file also owns the shared IntegrationOperation / IntegrationIdentityMode / IntegrationEnvironment / IntegrationConnectionKind / IntegrationPresentation definitions referenced by the other integration schemas.
63
+ * Committed `.isomorph/integrations.json`: the app's declared use of tenant-wide integration connections. Keys are logical connection aliases (the governance sourceId); resources are logical names (Slack channel alias, warehouse view name), never IDs, tokens or URLs. The operation set is closed (thirty-three operations since 0.78.0, ADR 0018, ADR 0022 and ADR 0024). Each operation carries a fixed identity mode — slack.dm.send=app, slack.user.lookup=app, every gmail.* operation=user, every basecamp.* operation=user, every sharepoint.* operation=user, warehouse.view.read=app, service.request=app — except the declared-mode Slack operations (slack.message.post, and since 0.71.0 slack.channel.history, slack.message.update and slack.message.delete), whose mode the app DECLARES: `app` acts as the company's Slack app (the one audited bot identity; a post goes out under the IT-approved per-app display name when the connection declares `presentation`), `user` acts as the signed-in person after their own consent (reads what they can read, edits what they wrote). The declared mode is the one the app requests access for; an app may hold approved grants for both modes after two requests, and each declared-mode call names which approved mode it runs under (`mode` on the execute request, 0.55.0) — a mode IT did not approve is refused, never swapped for the other. A `saas` connection may declare only the Slack, Gmail, Basecamp and SharePoint operations and a `database` connection only warehouse.view.read; `presentation` is a `saas` connection's optional per-app display name and icon for app-mode Slack posts, shown to IT at approval time and applied only from the approved grant. Gmail is user-mode only (reads, one send); its single resource is the fixed `inbox` alias. Basecamp (0.76.0, ADR 0022) is user-mode only too: basecamp.project.list runs on the fixed `account` alias (the company's pinned Basecamp account) and every other basecamp.* operation on a project alias IT mapped in the connection's `channels` map, so Basecamp itself refuses an id outside that project. SharePoint (0.78.0, ADR 0024) is user-mode only as well: every sharepoint.* operation runs on a site alias IT mapped in the connection's `channels` map (a Microsoft Graph site id), so Graph itself refuses a list, item or file outside that site. slack.dm.send and slack.user.lookup address people by email rather than a channel, so their single resource is the fixed `workspace` alias (the connection's installed workspace), the way Gmail's is `inbox`. This file also owns the shared IntegrationOperation / IntegrationIdentityMode / IntegrationEnvironment / IntegrationConnectionKind / IntegrationPresentation definitions referenced by the other integration schemas.
55
64
  */
56
65
  export interface AppIntegrationsDeclaration {
57
66
  schema: 'isomorph.app-integrations/2.0';
@@ -87,7 +96,7 @@ export interface AppModeChannelOperation {
87
96
  resources: ResourceNames;
88
97
  }
89
98
  /**
90
- * Every gmail.* operation (resource: the fixed `inbox` alias) and, since 0.76.0, every basecamp.* operation (resource: a project alias from the connection's `channels` map, or the fixed `account` alias for basecamp.project.list): user mode only — the app acts as the signed-in person after their own consent.
99
+ * Every gmail.* operation (resource: the fixed `inbox` alias), since 0.76.0 every basecamp.* operation (resource: a project alias from the connection's `channels` map, or the fixed `account` alias for basecamp.project.list) and since 0.78.0 every sharepoint.* operation (resource: a site alias from the connection's `channels` map): user mode only — the app acts as the signed-in person after their own consent.
91
100
  */
92
101
  export interface UserModeChannelOperation {
93
102
  identity: 'user';
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable */
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
3
 
4
- export const ContractRepositoryVersion = "0.77.0.0" as const;
5
- export const ContractPublishVersion = "0.77.0" as const;
6
- export const ContractPublishTag = "v0.77.0" as const;
7
- export const ContractSchemasDigest = "sha256:4b1970124058b38db22026ca1f6f6c74d9e32d6753dac12a5452ba090d19c667" as const;
4
+ export const ContractRepositoryVersion = "0.78.0.0" as const;
5
+ export const ContractPublishVersion = "0.78.0" as const;
6
+ export const ContractPublishTag = "v0.78.0" as const;
7
+ export const ContractSchemasDigest = "sha256:f1be566763706a00ed462099e750f17828f9fdc5a5cc6cdc2c5e39431e574360" as const;
8
8
  export const ContractAiFixturesDigest = "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6" as const;
9
- export const ContractGeneratedGoDigest = "sha256:e61b74f464a07c98fcb02dfa7d62af79cc4634455ade7195602ec0632af9f9ba" as const;
10
- export const ContractGeneratedTypeScriptDigest = "sha256:442a4b31bff9288ca5a2dd4e9fb0eb74945c7abbe6b8a7eede8694ad9c44f1fd" as const;
9
+ export const ContractGeneratedGoDigest = "sha256:93ef23399ab41345982298e0a52e6d81be3496605771d7e347219ed11fa28bf1" as const;
10
+ export const ContractGeneratedTypeScriptDigest = "sha256:0975b1595804430ca85ce07f4d624c215a8c5f537f259cc9df8497dea97a927c" as const;
@@ -12,7 +12,7 @@ export type DataGrantV2ProvisioningStatus = 'NONE' | 'PENDING' | 'FAILED' | 'DON
12
12
  export type DataGrantV2CleanupStatus = 'PENDING' | 'FAILED' | 'DONE';
13
13
 
14
14
  /**
15
- * An app's integration grant for one connection, environment and identity mode (control table sk APP#<appId>#IGRANT#<environment>#<sourceId>#<mode>; grantId = base64url(JSON ["v2",appId,environment,sourceId,mode])). Additive to the legacy DataGrant (data-grant.schema.json), which is never consulted by v2 paths. A fresh REQUESTED record carries empty `operations`/`resources` until the attached request is approved; approved resources are structured `{name, columns?}` entries (a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias, or a warehouse view alias with its approved columns). Expiry is enforced from UTC time on every call and SDK calls never extend it; `expiredAt` is stamped by the recovery sweep afterwards. Status edges live in x-transitions; DENIED and REVOKED are terminal (a regrant after revocation is a new REQUESTED record once cleanup is DONE). Database grants add credentialRef/mintedPrincipal; both hold references only. An app-mode Slack grant may carry `presentation` (0.53.0): the IT-approved display name and icon the app's posts go out under, copied from the approved request and read by every post — never from the call. `identityMode` and `installation` are the deprecated 0.45.0 spellings: the record carries `mode`, and a SaaS grant runs on the connection's single installation.
15
+ * An app's integration grant for one connection, environment and identity mode (control table sk APP#<appId>#IGRANT#<environment>#<sourceId>#<mode>; grantId = base64url(JSON ["v2",appId,environment,sourceId,mode])). Additive to the legacy DataGrant (data-grant.schema.json), which is never consulted by v2 paths. A fresh REQUESTED record carries empty `operations`/`resources` until the attached request is approved; approved resources are structured `{name, columns?}` entries (a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias, a SharePoint site alias, or a warehouse view alias with its approved columns). Expiry is enforced from UTC time on every call and SDK calls never extend it; `expiredAt` is stamped by the recovery sweep afterwards. Status edges live in x-transitions; DENIED and REVOKED are terminal (a regrant after revocation is a new REQUESTED record once cleanup is DONE). Database grants add credentialRef/mintedPrincipal; both hold references only. An app-mode Slack grant may carry `presentation` (0.53.0): the IT-approved display name and icon the app's posts go out under, copied from the approved request and read by every post — never from the call. `identityMode` and `installation` are the deprecated 0.45.0 spellings: the record carries `mode`, and a SaaS grant runs on the connection's single installation.
16
16
  */
17
17
  export interface DataGrantV2 {
18
18
  schema: 'harbour.data-grant/2.0';
@@ -33,9 +33,9 @@ export interface DataGrantV2 {
33
33
  kind: 'saas' | 'database' | 'service';
34
34
  status: DataGrantV2Status;
35
35
  /**
36
- * Approved operations; each must match this grant's mode. Empty until the first approval. At most the twenty-two SaaS operations (0.76.0: eleven Slack and Gmail, eleven Basecamp); a database grant holds one.
36
+ * Approved operations; each must match this grant's mode. Empty until the first approval. At most the thirty-one SaaS operations (0.78.0: eleven Slack and Gmail, eleven Basecamp, nine SharePoint); a database grant holds one.
37
37
  *
38
- * @maxItems 22
38
+ * @maxItems 31
39
39
  */
40
40
  operations: (
41
41
  | 'slack.channel.history'
@@ -60,6 +60,15 @@ export interface DataGrantV2 {
60
60
  | 'basecamp.comment.post'
61
61
  | 'basecamp.campfire.post'
62
62
  | 'basecamp.people.list'
63
+ | 'sharepoint.list.list'
64
+ | 'sharepoint.item.list'
65
+ | 'sharepoint.item.create'
66
+ | 'sharepoint.item.update'
67
+ | 'sharepoint.drive.list'
68
+ | 'sharepoint.file.list'
69
+ | 'sharepoint.file.search'
70
+ | 'sharepoint.file.read'
71
+ | 'sharepoint.file.upload'
63
72
  | 'warehouse.view.read'
64
73
  | 'service.request'
65
74
  )[];
@@ -111,7 +120,7 @@ export interface DataGrantV2 {
111
120
  installation?: string;
112
121
  }
113
122
  /**
114
- * One approved logical resource: a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias (0.76.0), or a warehouse view alias with the approved columns.
123
+ * One approved logical resource: a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias (0.76.0), a SharePoint site alias (0.78.0), or a warehouse view alias with the approved columns.
115
124
  */
116
125
  export interface IntegrationResource {
117
126
  /**