@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.
- package/README.md +3 -3
- package/contract-release.json +22 -22
- package/dist/gen-ts/app-integrations-declaration.d.ts +11 -2
- package/dist/gen-ts/contract-release.d.ts +6 -6
- package/dist/gen-ts/contract-release.js +6 -6
- package/dist/gen-ts/data-grant-v2.d.ts +5 -5
- package/dist/gen-ts/integration-execute-input-rules.d.ts +202 -0
- package/dist/gen-ts/integration-execute-input-rules.js +88 -2
- package/dist/gen-ts/integration-execute-request.d.ts +52 -6
- package/dist/gen-ts/integration-execute-result.d.ts +90 -2
- package/dist/gen-ts/integration-operations.d.ts +63 -0
- package/dist/gen-ts/integration-operations.js +81 -0
- package/dist/gen-ts/saas-connection.d.ts +11 -11
- package/gen-ts/app-integrations-declaration.ts +11 -2
- package/gen-ts/contract-release.ts +6 -6
- package/gen-ts/data-grant-v2.ts +13 -4
- package/gen-ts/integration-execute-input-rules.ts +90 -4
- package/gen-ts/integration-execute-request.ts +60 -5
- package/gen-ts/integration-execute-result.ts +90 -2
- package/gen-ts/integration-operations.ts +81 -0
- package/gen-ts/saas-connection.ts +19 -10
- package/package.json +1 -1
- package/schema/app-integrations-declaration.schema.json +193 -3
- package/schema/data-grant-v2.schema.json +4 -4
- package/schema/integration-execute-request.schema.json +497 -7
- package/schema/integration-execute-result.schema.json +345 -4
- package/schema/saas-connection.schema.json +27 -10
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schemas.harbour.dev/app-integrations-declaration.schema.json",
|
|
4
4
|
"title": "AppIntegrationsDeclaration",
|
|
5
|
-
"description": "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 (
|
|
5
|
+
"description": "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 \u2014 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 \u2014 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) \u2014 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.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": [
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
"pattern": "^[0-9]{1,20}$",
|
|
38
38
|
"description": "A Basecamp id (0.76.0): an account, project, to-do list, to-do, recording or person, as a string of 1..20 digits \u2014 how every basecamp.* result names one and every basecamp.* input takes one back."
|
|
39
39
|
},
|
|
40
|
+
"GraphId": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"pattern": "^[A-Za-z0-9!._,=-]{1,256}$",
|
|
43
|
+
"description": "A Microsoft Graph id (0.78.0): a SharePoint list (a GUID), list item (digits), drive (`b!...`) or drive item, as Graph names it \u2014 opaque, 1..256 characters of letters, digits and `!._,=-`. How every sharepoint.* result names one and every sharepoint.* input takes one back."
|
|
44
|
+
},
|
|
40
45
|
"IntegrationConnectionKind": {
|
|
41
46
|
"type": "string",
|
|
42
47
|
"enum": [
|
|
@@ -70,10 +75,19 @@
|
|
|
70
75
|
"basecamp.comment.post",
|
|
71
76
|
"basecamp.campfire.post",
|
|
72
77
|
"basecamp.people.list",
|
|
78
|
+
"sharepoint.list.list",
|
|
79
|
+
"sharepoint.item.list",
|
|
80
|
+
"sharepoint.item.create",
|
|
81
|
+
"sharepoint.item.update",
|
|
82
|
+
"sharepoint.drive.list",
|
|
83
|
+
"sharepoint.file.list",
|
|
84
|
+
"sharepoint.file.search",
|
|
85
|
+
"sharepoint.file.read",
|
|
86
|
+
"sharepoint.file.upload",
|
|
73
87
|
"warehouse.view.read",
|
|
74
88
|
"service.request"
|
|
75
89
|
],
|
|
76
|
-
"description": "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."
|
|
90
|
+
"description": "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."
|
|
77
91
|
},
|
|
78
92
|
"IntegrationIdentityMode": {
|
|
79
93
|
"type": "string",
|
|
@@ -163,7 +177,7 @@
|
|
|
163
177
|
"identity",
|
|
164
178
|
"resources"
|
|
165
179
|
],
|
|
166
|
-
"description": "Every gmail.* operation (resource: the fixed `inbox` alias)
|
|
180
|
+
"description": "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.",
|
|
167
181
|
"properties": {
|
|
168
182
|
"identity": {
|
|
169
183
|
"type": "string",
|
|
@@ -320,6 +334,33 @@
|
|
|
320
334
|
"basecamp.people.list": {
|
|
321
335
|
"$ref": "#/definitions/UserModeChannelOperation"
|
|
322
336
|
},
|
|
337
|
+
"sharepoint.list.list": {
|
|
338
|
+
"$ref": "#/definitions/UserModeChannelOperation"
|
|
339
|
+
},
|
|
340
|
+
"sharepoint.item.list": {
|
|
341
|
+
"$ref": "#/definitions/UserModeChannelOperation"
|
|
342
|
+
},
|
|
343
|
+
"sharepoint.item.create": {
|
|
344
|
+
"$ref": "#/definitions/UserModeChannelOperation"
|
|
345
|
+
},
|
|
346
|
+
"sharepoint.item.update": {
|
|
347
|
+
"$ref": "#/definitions/UserModeChannelOperation"
|
|
348
|
+
},
|
|
349
|
+
"sharepoint.drive.list": {
|
|
350
|
+
"$ref": "#/definitions/UserModeChannelOperation"
|
|
351
|
+
},
|
|
352
|
+
"sharepoint.file.list": {
|
|
353
|
+
"$ref": "#/definitions/UserModeChannelOperation"
|
|
354
|
+
},
|
|
355
|
+
"sharepoint.file.search": {
|
|
356
|
+
"$ref": "#/definitions/UserModeChannelOperation"
|
|
357
|
+
},
|
|
358
|
+
"sharepoint.file.read": {
|
|
359
|
+
"$ref": "#/definitions/UserModeChannelOperation"
|
|
360
|
+
},
|
|
361
|
+
"sharepoint.file.upload": {
|
|
362
|
+
"$ref": "#/definitions/UserModeChannelOperation"
|
|
363
|
+
},
|
|
323
364
|
"warehouse.view.read": {
|
|
324
365
|
"$ref": "#/definitions/AppModeViewOperation"
|
|
325
366
|
},
|
|
@@ -482,6 +523,51 @@
|
|
|
482
523
|
"basecamp.people.list"
|
|
483
524
|
]
|
|
484
525
|
},
|
|
526
|
+
{
|
|
527
|
+
"required": [
|
|
528
|
+
"sharepoint.list.list"
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"required": [
|
|
533
|
+
"sharepoint.item.list"
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"required": [
|
|
538
|
+
"sharepoint.item.create"
|
|
539
|
+
]
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"required": [
|
|
543
|
+
"sharepoint.item.update"
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"required": [
|
|
548
|
+
"sharepoint.drive.list"
|
|
549
|
+
]
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"required": [
|
|
553
|
+
"sharepoint.file.list"
|
|
554
|
+
]
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"required": [
|
|
558
|
+
"sharepoint.file.search"
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"required": [
|
|
563
|
+
"sharepoint.file.read"
|
|
564
|
+
]
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"required": [
|
|
568
|
+
"sharepoint.file.upload"
|
|
569
|
+
]
|
|
570
|
+
},
|
|
485
571
|
{
|
|
486
572
|
"required": [
|
|
487
573
|
"service.request"
|
|
@@ -621,6 +707,51 @@
|
|
|
621
707
|
"basecamp.people.list"
|
|
622
708
|
]
|
|
623
709
|
},
|
|
710
|
+
{
|
|
711
|
+
"required": [
|
|
712
|
+
"sharepoint.list.list"
|
|
713
|
+
]
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"required": [
|
|
717
|
+
"sharepoint.item.list"
|
|
718
|
+
]
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"required": [
|
|
722
|
+
"sharepoint.item.create"
|
|
723
|
+
]
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"required": [
|
|
727
|
+
"sharepoint.item.update"
|
|
728
|
+
]
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"required": [
|
|
732
|
+
"sharepoint.drive.list"
|
|
733
|
+
]
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"required": [
|
|
737
|
+
"sharepoint.file.list"
|
|
738
|
+
]
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"required": [
|
|
742
|
+
"sharepoint.file.search"
|
|
743
|
+
]
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"required": [
|
|
747
|
+
"sharepoint.file.read"
|
|
748
|
+
]
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"required": [
|
|
752
|
+
"sharepoint.file.upload"
|
|
753
|
+
]
|
|
754
|
+
},
|
|
624
755
|
{
|
|
625
756
|
"required": [
|
|
626
757
|
"warehouse.view.read"
|
|
@@ -818,6 +949,65 @@
|
|
|
818
949
|
}
|
|
819
950
|
}
|
|
820
951
|
},
|
|
952
|
+
"company-sharepoint": {
|
|
953
|
+
"kind": "saas",
|
|
954
|
+
"operations": {
|
|
955
|
+
"sharepoint.list.list": {
|
|
956
|
+
"identity": "user",
|
|
957
|
+
"resources": [
|
|
958
|
+
"intranet"
|
|
959
|
+
]
|
|
960
|
+
},
|
|
961
|
+
"sharepoint.item.list": {
|
|
962
|
+
"identity": "user",
|
|
963
|
+
"resources": [
|
|
964
|
+
"intranet"
|
|
965
|
+
]
|
|
966
|
+
},
|
|
967
|
+
"sharepoint.item.create": {
|
|
968
|
+
"identity": "user",
|
|
969
|
+
"resources": [
|
|
970
|
+
"intranet"
|
|
971
|
+
]
|
|
972
|
+
},
|
|
973
|
+
"sharepoint.item.update": {
|
|
974
|
+
"identity": "user",
|
|
975
|
+
"resources": [
|
|
976
|
+
"intranet"
|
|
977
|
+
]
|
|
978
|
+
},
|
|
979
|
+
"sharepoint.drive.list": {
|
|
980
|
+
"identity": "user",
|
|
981
|
+
"resources": [
|
|
982
|
+
"intranet"
|
|
983
|
+
]
|
|
984
|
+
},
|
|
985
|
+
"sharepoint.file.list": {
|
|
986
|
+
"identity": "user",
|
|
987
|
+
"resources": [
|
|
988
|
+
"intranet"
|
|
989
|
+
]
|
|
990
|
+
},
|
|
991
|
+
"sharepoint.file.search": {
|
|
992
|
+
"identity": "user",
|
|
993
|
+
"resources": [
|
|
994
|
+
"intranet"
|
|
995
|
+
]
|
|
996
|
+
},
|
|
997
|
+
"sharepoint.file.read": {
|
|
998
|
+
"identity": "user",
|
|
999
|
+
"resources": [
|
|
1000
|
+
"intranet"
|
|
1001
|
+
]
|
|
1002
|
+
},
|
|
1003
|
+
"sharepoint.file.upload": {
|
|
1004
|
+
"identity": "user",
|
|
1005
|
+
"resources": [
|
|
1006
|
+
"intranet"
|
|
1007
|
+
]
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
821
1011
|
"sales-warehouse": {
|
|
822
1012
|
"kind": "database",
|
|
823
1013
|
"operations": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://schemas.harbour.dev/data-grant-v2.schema.json",
|
|
4
4
|
"title": "DataGrantV2",
|
|
5
|
-
"description": "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.",
|
|
5
|
+
"description": "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.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["schema", "tenantId", "appId", "environment", "sourceId", "mode", "kind", "status", "operations", "resources", "version", "provisioning", "createdAt", "updatedAt"],
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"status": { "$ref": "#/definitions/DataGrantV2Status" },
|
|
18
18
|
"operations": {
|
|
19
19
|
"type": "array",
|
|
20
|
-
"maxItems":
|
|
20
|
+
"maxItems": 31,
|
|
21
21
|
"uniqueItems": true,
|
|
22
22
|
"items": { "$ref": "app-integrations-declaration.schema.json#/definitions/IntegrationOperation" },
|
|
23
|
-
"description": "Approved operations; each must match this grant's mode. Empty until the first approval. At most the
|
|
23
|
+
"description": "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."
|
|
24
24
|
},
|
|
25
25
|
"resources": {
|
|
26
26
|
"type": "array",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"type": "object",
|
|
63
63
|
"additionalProperties": false,
|
|
64
64
|
"required": ["name"],
|
|
65
|
-
"description": "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.",
|
|
65
|
+
"description": "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.",
|
|
66
66
|
"properties": {
|
|
67
67
|
"name": { "$ref": "app-integrations-declaration.schema.json#/definitions/IntegrationAlias" },
|
|
68
68
|
"columns": {
|