@fourier-labs/harbour-contracts 0.85.0 → 0.87.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.
Files changed (32) hide show
  1. package/README.md +3 -3
  2. package/contract-release.json +25 -25
  3. package/dist/gen-ts/app-integrations-declaration.d.ts +47 -2
  4. package/dist/gen-ts/contract-release.d.ts +6 -6
  5. package/dist/gen-ts/contract-release.js +6 -6
  6. package/dist/gen-ts/data-grant-v2.d.ts +4 -4
  7. package/dist/gen-ts/integration-execute-input-rules.d.ts +1194 -0
  8. package/dist/gen-ts/integration-execute-input-rules.js +392 -0
  9. package/dist/gen-ts/integration-execute-request.d.ts +150 -25
  10. package/dist/gen-ts/integration-execute-result.d.ts +237 -7
  11. package/dist/gen-ts/integration-operations.d.ts +315 -0
  12. package/dist/gen-ts/integration-operations.js +405 -0
  13. package/dist/gen-ts/kit-bundle-manifest.d.ts +1 -0
  14. package/dist/gen-ts/kit-lock.d.ts +1 -0
  15. package/dist/gen-ts/saas-connection.d.ts +9 -9
  16. package/gen-ts/app-integrations-declaration.ts +47 -2
  17. package/gen-ts/contract-release.ts +6 -6
  18. package/gen-ts/data-grant-v2.ts +48 -3
  19. package/gen-ts/integration-execute-input-rules.ts +390 -1
  20. package/gen-ts/integration-execute-request.ts +194 -24
  21. package/gen-ts/integration-execute-result.ts +237 -7
  22. package/gen-ts/integration-operations.ts +405 -0
  23. package/gen-ts/kit-bundle-manifest.ts +1 -0
  24. package/gen-ts/kit-lock.ts +1 -0
  25. package/gen-ts/saas-connection.ts +66 -8
  26. package/package.json +1 -1
  27. package/schema/app-integrations-declaration.schema.json +976 -36
  28. package/schema/data-grant-v2.schema.json +3 -3
  29. package/schema/integration-execute-request.schema.json +2320 -55
  30. package/schema/integration-execute-result.schema.json +934 -30
  31. package/schema/kit-bundle-manifest.schema.json +1 -0
  32. package/schema/saas-connection.schema.json +139 -8
@@ -35,6 +35,7 @@
35
35
  "description": "Native local App Gateway executables for supported builder platforms; hosted workloads continue to use images.",
36
36
  "properties": {
37
37
  "darwinArm64": { "$ref": "#/definitions/NativeExecutable" },
38
+ "linuxArm64": { "$ref": "#/definitions/NativeExecutable" },
38
39
  "linuxX64": { "$ref": "#/definitions/NativeExecutable" },
39
40
  "windowsX64": { "$ref": "#/definitions/NativeExecutable" }
40
41
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://schemas.harbour.dev/saas-connection.schema.json",
4
4
  "title": "SaasConnection",
5
- "description": "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.",
5
+ "description": "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. The eight Google Workspace and Microsoft 365 connections (0.86.0, ADR 0032) are Gmail-shaped: user consent only, one connection per provider (calendar, drive, docs, sheets on the Google client; outlook, onedrive, excel, teams on the Microsoft client), no installation. Seven of them carry no `account` and empty `channels`, acting on the signed-in person's own data through one fixed alias; a Teams connection pins the Microsoft 365 tenant in `account` like SharePoint and maps channel aliases to `<teamId>/<channelId>` in `channels`. 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.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schema", "tenantId", "sourceId", "kind", "provider", "displayName", "status", "version", "channels", "operations", "developmentPreapproval", "createdAt", "updatedAt"],
@@ -21,17 +21,17 @@
21
21
  "type": "object",
22
22
  "maxProperties": 64,
23
23
  "propertyNames": { "$ref": "app-integrations-declaration.schema.json#/definitions/IntegrationAlias" },
24
- "additionalProperties": { "type": "string", "pattern": "^[+A-Za-z0-9][A-Za-z0-9.,_:-]{0,255}$", "description": "A Slack channel id (public, non-archived), a Basecamp project id (digits), a SharePoint site id (0.78.0: the Microsoft Graph composite `hostname,siteCollectionGuid,webGuid`) or a phone number (0.82.0: E.164, a leading `+` and digits)." },
25
- "description": "Logical alias → provider resource id: a Slack channel id, a Basecamp project id, a SharePoint site id or a phone number. Always empty for Gmail."
24
+ "additionalProperties": { "type": "string", "pattern": "^[+A-Za-z0-9][A-Za-z0-9.,_:@!/-]{0,255}$", "description": "A Slack channel id (public, non-archived), a Basecamp project id (digits), a SharePoint site id (0.78.0: the Microsoft Graph composite `hostname,siteCollectionGuid,webGuid`), a phone number (0.82.0: E.164, a leading `+` and digits) or a Teams channel (0.86.0: `<teamId>/<channelId>`, the team's GUID and the channel id `19:...@thread.tacv2`, so the alphabet admits `@`, `!` and `/`)." },
25
+ "description": "Logical alias → provider resource id: a Slack channel id, a Basecamp project id, a SharePoint site id, a phone number or a Teams channel. Always empty for Gmail and for the seven personal Google Workspace and Microsoft 365 providers (0.86.0: calendar, drive, docs, sheets, outlook, onedrive, excel), whose one fixed alias governance resolves."
26
26
  },
27
27
  "operations": {
28
28
  "type": "array",
29
29
  "minItems": 1,
30
- "maxItems": 33,
30
+ "maxItems": 78,
31
31
  "uniqueItems": true,
32
32
  "items": { "$ref": "app-integrations-declaration.schema.json#/definitions/IntegrationOperation" },
33
33
  "not": { "anyOf": [{ "contains": { "const": "warehouse.view.read" } }, { "contains": { "const": "warehouse.table.append" } }] },
34
- "description": "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. Phone (0.82.0): phone.sms.list; 0.83.0 adds phone.number.get."
34
+ "description": "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; Google Workspace and Microsoft 365 (0.86.0): the calendar.*, drive.*, docs.*, sheets.*, outlook.*, onedrive.*, excel.* and teams.* operations of the connection's provider). Never warehouse.view.read. Phone (0.82.0): phone.sms.list; 0.83.0 adds phone.number.get. Seventy-eight SaaS operations in all since 0.86.0."
35
35
  },
36
36
  "developmentPreapproval": { "$ref": "#/definitions/DevelopmentPreapproval" },
37
37
  "oauthClient": { "$ref": "#/definitions/SaasOauthClient" },
@@ -84,14 +84,14 @@
84
84
  "definitions": {
85
85
  "SaasProvider": {
86
86
  "type": "string",
87
- "enum": ["slack", "gmail", "basecamp", "sharepoint", "phone"],
88
- "description": "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`. Phone (0.82.0) is app mode only with no installation: the tenant's inbound SMS numbers (E.164) mapped from aliases in `channels`, and the SMS the platform received on them listed by phone.sms.list; since 0.83.0 an app reads the number an alias maps to with phone.number.get."
87
+ "enum": ["slack", "gmail", "basecamp", "sharepoint", "phone", "calendar", "drive", "docs", "sheets", "outlook", "onedrive", "excel", "teams"],
88
+ "description": "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`. Phone (0.82.0) is app mode only with no installation: the tenant's inbound SMS numbers (E.164) mapped from aliases in `channels`, and the SMS the platform received on them listed by phone.sms.list; since 0.83.0 an app reads the number an alias maps to with phone.number.get. Google Workspace (0.86.0, ADR 0032: calendar, drive, docs, sheets on the Google OAuth client) and Microsoft 365 (outlook, onedrive, excel, teams on the Microsoft client) are user-consent only like Gmail, one connection per provider with its own consent and scopes; the seven personal providers have no `account` and empty `channels` (their one fixed alias is the signed-in person's own calendar, drive, documents, spreadsheets, mailbox or workbooks); teams is pinned to the Microsoft 365 tenant in `account` like SharePoint and maps channel aliases in `channels`."
89
89
  },
90
90
  "BasecampAccount": {
91
91
  "type": "object",
92
92
  "additionalProperties": false,
93
93
  "required": ["id", "name"],
94
- "description": "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.",
94
+ "description": "The pinned provider account (0.76.0, Basecamp; 0.78.0, SharePoint; 0.86.0, Teams — 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 and Teams the Microsoft 365 tenant (the Entra tenant GUID). Absent until IT chooses it; governance refuses every basecamp.*, sharepoint.* and teams.* call until then. The seven personal Google Workspace and Microsoft 365 providers carry none.",
95
95
  "properties": {
96
96
  "id": { "type": "string", "pattern": "^[A-Za-z0-9-]{1,64}$", "description": "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)." },
97
97
  "name": { "type": "string", "minLength": 1, "maxLength": 120, "description": "The account's name as the provider shows it (a Basecamp account name, a Microsoft 365 organisation display name), for IT to recognise." }
@@ -305,6 +305,137 @@
305
305
  "developmentPreapproval": { "enabled": false, "hours": 24 },
306
306
  "createdAt": "2026-10-17T08:00:00Z",
307
307
  "updatedAt": "2026-10-17T08:00:00Z"
308
+ },
309
+ {
310
+ "schema": "harbour.saas-connection/1.0",
311
+ "tenantId": "fourier",
312
+ "sourceId": "company-calendar",
313
+ "kind": "saas",
314
+ "provider": "calendar",
315
+ "displayName": "Company Google Calendar",
316
+ "status": "ACTIVE",
317
+ "version": 1,
318
+ "channels": {},
319
+ "operations": ["calendar.calendar.list", "calendar.event.list", "calendar.event.read", "calendar.event.create", "calendar.event.update", "calendar.event.cancel"],
320
+ "developmentPreapproval": { "enabled": true, "hours": 24 },
321
+ "userModeApproval": "automatic",
322
+ "createdAt": "2026-10-17T08:00:00Z",
323
+ "updatedAt": "2026-10-17T08:00:00Z"
324
+ },
325
+ {
326
+ "schema": "harbour.saas-connection/1.0",
327
+ "tenantId": "fourier",
328
+ "sourceId": "company-drive",
329
+ "kind": "saas",
330
+ "provider": "drive",
331
+ "displayName": "Company Google Drive",
332
+ "status": "ACTIVE",
333
+ "version": 2,
334
+ "channels": {},
335
+ "operations": ["drive.file.list", "drive.file.search", "drive.file.read", "drive.file.upload", "drive.folder.create"],
336
+ "developmentPreapproval": { "enabled": true, "hours": 24 },
337
+ "oauthClient": { "clientId": "987334312340-abc123def456.apps.googleusercontent.com", "secretRef": "secretref://tenant/fourier/saas/company-drive/oauth-client", "setAt": "2026-10-17T08:00:00Z", "setBy": "it-admin@example.com" },
338
+ "userModeApproval": "it",
339
+ "createdAt": "2026-10-17T08:00:00Z",
340
+ "updatedAt": "2026-10-17T08:00:00Z"
341
+ },
342
+ {
343
+ "schema": "harbour.saas-connection/1.0",
344
+ "tenantId": "fourier",
345
+ "sourceId": "company-docs",
346
+ "kind": "saas",
347
+ "provider": "docs",
348
+ "displayName": "Company Google Docs",
349
+ "status": "ACTIVE",
350
+ "version": 1,
351
+ "channels": {},
352
+ "operations": ["docs.document.read", "docs.document.create", "docs.document.append", "docs.text.replace"],
353
+ "developmentPreapproval": { "enabled": true, "hours": 24 },
354
+ "userModeApproval": "automatic",
355
+ "createdAt": "2026-10-17T08:00:00Z",
356
+ "updatedAt": "2026-10-17T08:00:00Z"
357
+ },
358
+ {
359
+ "schema": "harbour.saas-connection/1.0",
360
+ "tenantId": "fourier",
361
+ "sourceId": "company-sheets",
362
+ "kind": "saas",
363
+ "provider": "sheets",
364
+ "displayName": "Company Google Sheets",
365
+ "status": "ACTIVE",
366
+ "version": 1,
367
+ "channels": {},
368
+ "operations": ["sheets.spreadsheet.read", "sheets.values.read", "sheets.values.append", "sheets.values.update", "sheets.values.clear", "sheets.spreadsheet.create"],
369
+ "developmentPreapproval": { "enabled": true, "hours": 24 },
370
+ "userModeApproval": "automatic",
371
+ "createdAt": "2026-10-17T08:00:00Z",
372
+ "updatedAt": "2026-10-17T08:00:00Z"
373
+ },
374
+ {
375
+ "schema": "harbour.saas-connection/1.0",
376
+ "tenantId": "fourier",
377
+ "sourceId": "company-outlook",
378
+ "kind": "saas",
379
+ "provider": "outlook",
380
+ "displayName": "Company Outlook",
381
+ "status": "ACTIVE",
382
+ "version": 1,
383
+ "channels": {},
384
+ "operations": ["outlook.message.list", "outlook.message.read", "outlook.attachment.read", "outlook.message.send", "outlook.message.reply", "outlook.event.list", "outlook.event.read", "outlook.event.create", "outlook.event.update", "outlook.event.cancel"],
385
+ "developmentPreapproval": { "enabled": false, "hours": 24 },
386
+ "userModeApproval": "it",
387
+ "externalRecipients": { "mode": "block" },
388
+ "createdAt": "2026-10-17T08:00:00Z",
389
+ "updatedAt": "2026-10-17T08:00:00Z"
390
+ },
391
+ {
392
+ "schema": "harbour.saas-connection/1.0",
393
+ "tenantId": "fourier",
394
+ "sourceId": "company-onedrive",
395
+ "kind": "saas",
396
+ "provider": "onedrive",
397
+ "displayName": "Company OneDrive",
398
+ "status": "ACTIVE",
399
+ "version": 1,
400
+ "channels": {},
401
+ "operations": ["onedrive.file.list", "onedrive.file.search", "onedrive.file.read", "onedrive.file.upload", "onedrive.folder.create"],
402
+ "developmentPreapproval": { "enabled": true, "hours": 24 },
403
+ "userModeApproval": "automatic",
404
+ "createdAt": "2026-10-17T08:00:00Z",
405
+ "updatedAt": "2026-10-17T08:00:00Z"
406
+ },
407
+ {
408
+ "schema": "harbour.saas-connection/1.0",
409
+ "tenantId": "fourier",
410
+ "sourceId": "company-excel",
411
+ "kind": "saas",
412
+ "provider": "excel",
413
+ "displayName": "Company Excel",
414
+ "status": "ACTIVE",
415
+ "version": 1,
416
+ "channels": {},
417
+ "operations": ["excel.worksheet.list", "excel.range.read", "excel.range.update", "excel.table.list", "excel.row.add", "excel.worksheet.add"],
418
+ "developmentPreapproval": { "enabled": true, "hours": 24 },
419
+ "userModeApproval": "automatic",
420
+ "createdAt": "2026-10-17T08:00:00Z",
421
+ "updatedAt": "2026-10-17T08:00:00Z"
422
+ },
423
+ {
424
+ "schema": "harbour.saas-connection/1.0",
425
+ "tenantId": "fourier",
426
+ "sourceId": "company-teams",
427
+ "kind": "saas",
428
+ "provider": "teams",
429
+ "displayName": "Company Teams",
430
+ "status": "ACTIVE",
431
+ "version": 2,
432
+ "account": { "id": "3f2c9b1e-7d4a-4c6b-9e8f-0a1b2c3d4e5f", "name": "Fourier Labs" },
433
+ "channels": { "engineering": "0f1e2d3c-4b5a-4968-8776-655443322110/19:a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@thread.tacv2" },
434
+ "operations": ["teams.message.list", "teams.message.post", "teams.reply.post"],
435
+ "developmentPreapproval": { "enabled": true, "hours": 24 },
436
+ "userModeApproval": "automatic",
437
+ "createdAt": "2026-10-17T08:00:00Z",
438
+ "updatedAt": "2026-10-17T08:00:00Z"
308
439
  }
309
440
  ]
310
441
  }