@fourier-labs/harbour-contracts 0.70.0 → 0.71.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 CHANGED
@@ -38,9 +38,9 @@ exist here first.
38
38
  | `binding-classification-subject.schema.json` | Complete value-free binding-name classification before version allocation | AI governance §5.7 / SEC-UP-01 |
39
39
  | `sanitized-binding-evidence.schema.json` | Exact-version sanitized runtime-binding allocation receipt | AI governance §5.7 / SEC-UP-02 |
40
40
  | `ai-pricing-revision`, `ai-metering-policy`, `ai-budget-ledger-event`, `ai-trace-event-v2` | Additive metering v2 records, including media dimensions and P5 trace attribution; v1 records remain readable | AI governance §9 |
41
- | `app-integrations-declaration.schema.json` | Committed `.isomorph/integrations.json` (`isomorph.app-integrations/2.0`): closed six-operation set (Slack read/post, Gmail read/send, warehouse view read) with fixed identity modes; owns the shared operation/identity/environment enums | Dev kit §4 |
42
- | `integration-execute-request`, `integration-execute-result`, `integration-connect-result`, `integration-error-details` | App SDK integrations wire contract on `/_harbour/integrations/*`: per-operation input bounds (a warehouse read filters, groups, aggregates and sorts in the warehouse and says when it was `truncated` — ADR 0017), the six result shapes, consent states and the closed `details.code` reason set | Dev kit §4, §8 |
43
- | `saas-connection.schema.json`, `data-grant-v2.schema.json` | Tenant SaaS connection record (one installation and channel map per tenant and provider) and the additive `harbour.data-grant/2.0` grant record with structured resources and provisioning lease/cleanup (status machine generated; legacy `data-grant` untouched) | Dev kit §5 |
41
+ | `app-integrations-declaration.schema.json` | Committed `.isomorph/integrations.json` (`isomorph.app-integrations/2.0`): closed twelve-operation set (Slack read/post/update/delete/DM/lookup, Gmail list/thread/read/send/attachment, warehouse view read — ADR 0018) with fixed or declared identity modes; owns the shared operation/identity/environment enums | Dev kit §4 |
42
+ | `integration-execute-request`, `integration-execute-result`, `integration-connect-result`, `integration-error-details` | App SDK integrations wire contract on `/_harbour/integrations/*`: per-operation input bounds (a warehouse read filters, groups, aggregates and sorts in the warehouse and says when it was `truncated` — ADR 0017; Slack and Gmail reads page, posts thread, mail carries HTML and attachments — ADR 0018), the per-operation result shapes, consent states and the closed `details.code` reason set | Dev kit §4, §8 |
43
+ | `saas-connection.schema.json`, `data-grant-v2.schema.json` | Tenant SaaS connection record (one installation and channel map per tenant and provider; IT's optional `oauthClient`, `userModeApproval`, `directMessages`, `externalRecipients` — ADR 0018) and the additive `harbour.data-grant/2.0` grant record with structured resources and provisioning lease/cleanup (status machine generated; legacy `data-grant` untouched) | Dev kit §5 |
44
44
  | `kit-bundle-manifest.schema.json`, `kit-lock.schema.json` | Published kit bundle identity (SDK tarball digest plus optional `sdk.version` and https `sdk.url` download location) and the committed `.isomorph/kit.lock.json` the CodeBuild SDK-vendoring gate compares against | Dev kit §3 |
45
45
  | `deploy-response.schema.json` | 202 Accepted body for `POST /v1/tenants/{tenant}/apps/{app}/deployments`, returned only after the authoritative QUEUED version exists and its SQS message is accepted | — |
46
46
  | `deployment-source.schema.json` | Credential-free GitHub source in the `DeployRequest` body; credentials are resolved internally by MaterializeSource | — |
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schema": "harbour.contract-release/1.0",
3
- "repositoryVersion": "0.70.0.0",
4
- "publishVersion": "0.70.0",
5
- "publishTag": "v0.70.0",
6
- "schemasDigest": "sha256:b3c430914fee8a4f33dc15051ec59a6a8bad9a84c31fda119b6d683eb523b094",
3
+ "repositoryVersion": "0.71.0.0",
4
+ "publishVersion": "0.71.0",
5
+ "publishTag": "v0.71.0",
6
+ "schemasDigest": "sha256:25c5de2ee9586c6280dca7c733a7063f46bd5d400112fe60f928cf6db1a627c3",
7
7
  "aiFixturesDigest": "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6",
8
- "generatedGoDigest": "sha256:05b383b27a90f3b3495a327e3da9ab6e13c5c2b047fc9311616ff6e7a283ccab",
9
- "generatedTypeScriptDigest": "sha256:184aacb9eb73cec089f8e891b1840873ca9497eb91cf4d3b12cfa9f0a9f305d1",
8
+ "generatedGoDigest": "sha256:09bd95f079e733af9bf594a157d7396a645cc6c9866d48b7aee6b00a9762ac62",
9
+ "generatedTypeScriptDigest": "sha256:7fa5c1e4d8fdb68855b5e10208ee6c0a210f3595f7e74174efbf6bfa4c3673ce",
10
10
  "generatedExclusions": {
11
11
  "gen-go/contract_release.go": "contains the generated aggregate digests (self-reference)",
12
12
  "gen-ts/contract-release.ts": "contains the generated aggregate digests (self-reference)"
@@ -31,12 +31,12 @@
31
31
  "schema/ai-transform-result.schema.json": "sha256:244e380a36957ab2dcb526ea22aaecb56b53664ce1fda6934d0021c084c99133",
32
32
  "schema/ai-verification-evidence.schema.json": "sha256:bdbc762df256d2a8dd0bdda60d4d13915ce40034cd756af9515871d145f10ad9",
33
33
  "schema/api-error-response.schema.json": "sha256:3d43d5bdf0b59c944e20509d832e6776c3ecdba4d6c245a9118bbe52062a8304",
34
- "schema/app-integrations-declaration.schema.json": "sha256:feaf24ae933173708254ae0a37598db03deda808e0984f2f88963657bdb82428",
34
+ "schema/app-integrations-declaration.schema.json": "sha256:9a8f6e192158c731afed92aeb76b0b6d0734800870a9e6f61181a95d43e6d7f8",
35
35
  "schema/artifact-contract.schema.json": "sha256:8047b461a1c6d07bbe867a259c57bdf5cc0fdf282cf842ec7b683a9e93713b10",
36
36
  "schema/binding-classification-subject.schema.json": "sha256:a8825ce652e7e00a18759c4249bd5bcd0cae552dd58440513f867e87f685133c",
37
37
  "schema/builder-input-proposal.schema.json": "sha256:fe85cffa6d76b1e1effe1f5d75525f8fe0e1eaa3be4a304e491aa23ad72c0e72",
38
38
  "schema/data-dependency.schema.json": "sha256:b4cc2b2484e982cfed64c0f56b8f1e9d1363c71854cd71f845b24fbe7d85c971",
39
- "schema/data-grant-v2.schema.json": "sha256:7fa6022aa2fcfd3c94bb969315155ea24e5a1aa25a25cb718df4465397076e07",
39
+ "schema/data-grant-v2.schema.json": "sha256:576db6f17bbd3c6d700628bb5b93dcb4ade536ab868085634d05ff06476b6272",
40
40
  "schema/data-grant.schema.json": "sha256:e640553831ecc1c01cc9a37fe388b84d0ffeaa0d0050e63712b48f65fa437c8a",
41
41
  "schema/data-source.schema.json": "sha256:899384f4f11b05d2737766918ab47987b11ed49f1160220a55a367fed96f6f2c",
42
42
  "schema/deploy-request.schema.json": "sha256:32531e21983cdfeec511f8b4cddd4dad6530cd90e4e9fe147225d78d138b6198",
@@ -54,8 +54,8 @@
54
54
  "schema/error-envelope.schema.json": "sha256:75dccda7dd16fdf8435deda53fc7dbcdc109b65114617a17f11763010c656f90",
55
55
  "schema/integration-connect-result.schema.json": "sha256:3f254b67ef739dc1fa395bdc8c4dc93359b16d481dba2a2d777aa5b6f34b7af8",
56
56
  "schema/integration-error-details.schema.json": "sha256:47ad7621c34b092c7e40f912a21e7ccbdc000b974cfb7fa0c9200463e029f8fb",
57
- "schema/integration-execute-request.schema.json": "sha256:b0ad5a3f4836d1f724ee9c28c2e55748819004f37ece37e5711a46bbcc85f3a6",
58
- "schema/integration-execute-result.schema.json": "sha256:ae0f17788d0933ee67e4f058d57484e192bc6d7d964ee01ec53b94b1777a0724",
57
+ "schema/integration-execute-request.schema.json": "sha256:2865c54564aa21eaf22f017312f42ef0cf77fc26c223ddd3e9de86062ed37156",
58
+ "schema/integration-execute-result.schema.json": "sha256:97f345cfc094a7af1d269486f3b3b90c07d13b70954c2b01dc0313225c9e5bd1",
59
59
  "schema/internal-configuration-request.schema.json": "sha256:229d44a3458f68dceddfba802e5c1adcd95523a45af29b93b972706b88461a7d",
60
60
  "schema/kit-bundle-manifest.schema.json": "sha256:4a9fcdd52ba0d55718ef4dbdab112b145ef90471d9356d4d3fb41e50fe9e400d",
61
61
  "schema/kit-lock.schema.json": "sha256:a48154d9471e49a893d928f7b0e1e0bc77708a4a7edce4fdf14073203e0e8987",
@@ -63,7 +63,7 @@
63
63
  "schema/promotion-request.schema.json": "sha256:00e96dfd8ddbdba88ea222941d43f3609ff6c815a79e34f6705cab458101c969",
64
64
  "schema/promotion-response.schema.json": "sha256:4129712d2e29d6ef21d93d4bd0bacfd60ada3f2ee0ade852824e64346b817634",
65
65
  "schema/resolved-app-serving.schema.json": "sha256:260e30ca16831ddd96b15f44eadc7daa2a5f87a0025588bd6318b236f349ec6b",
66
- "schema/saas-connection.schema.json": "sha256:82ed8018201800a95aa792bde1d22568e86b55b3be926aa094a260c8c78a58d7",
66
+ "schema/saas-connection.schema.json": "sha256:91ea0e7b1bf503962fba7aea4672bcaba5be70c2a91f4f5fbafe9e93460d5002",
67
67
  "schema/sanitized-binding-evidence.schema.json": "sha256:1191ab88e2764df927e5f17837674cebebe068d480da2b2fdb390e589f96b51f",
68
68
  "schema/secret-reference.schema.json": "sha256:db4e3c2c6a2dbd72d7ea0f9c91cb3b2343a7e67b601996c6818b2ef08e440895",
69
69
  "schema/security-scan-input-v2.schema.json": "sha256:0d418342078c9b5046ea6f4bef3c2c57539285dfee99cc0850d4f0d03739ee13",
@@ -109,10 +109,10 @@
109
109
  "gen-go/contracts_test.go": "sha256:56376287cb1548be1b35ab4c65d6f0b558c5d34885f7a47cb3d9e8d786607bf5",
110
110
  "gen-go/doc.go": "sha256:316d610ce568597a2ce6f38e9782e34fa5920f6f51ab0866e6d061b8a41cd822",
111
111
  "gen-go/error_category.go": "sha256:b2ddea22dcfa030f1a45e721e635485b0bd816cf1f38e7654628a653f5ed4583",
112
- "gen-go/integration_execute_input_rules.go": "sha256:7465a20d79cfb82ed5be683eca901677066e9f28fc5355c643a1883a28c4793a",
113
- "gen-go/integration_execute_input_rules_test.go": "sha256:0368dce6ee45d06cf8d8444afaa5d92449848187d8f391fffe69654ff1ca861b",
112
+ "gen-go/integration_execute_input_rules.go": "sha256:0293686700684419c8aae3d78c85b27825b9fc3429b013c5a84a6378c4e3f778",
113
+ "gen-go/integration_execute_input_rules_test.go": "sha256:9d81e4aac0c3d7f35ea98a40c6d8851570f715ddc95d1ae7324cdc095de4a72e",
114
114
  "gen-go/schema_documents.go": "sha256:c19c0d540f602ee997a84b90e20702d9bc63ed7d27aec267e76c04655fc182e0",
115
- "gen-go/types.go": "sha256:096be357356c51cf346b3e4568014f501cad66c2a482bdb6fd349c9e23bbcea0",
115
+ "gen-go/types.go": "sha256:4a301cf02eb10f4f666e4358b0c7054aed742ec924a1e4f9420c58ff7b8f0c88",
116
116
  "gen-go/version_state.go": "sha256:4ef8abb126414c0025cf2c59bc9c79a74ef4a2ff89e8f316cbf05acc872371c1"
117
117
  },
118
118
  "generatedTypeScript": {
@@ -137,13 +137,13 @@
137
137
  "gen-ts/ai-transform-result.ts": "sha256:208c66b2aeb425c0cbcc18b7191f6e8989443f2b2c1690648e0e06cc1448ce25",
138
138
  "gen-ts/ai-verification-evidence.ts": "sha256:979439d77f8b47631d1eb3b6c3c54ea6fec41089d2a51dc815fd370b1c4917fc",
139
139
  "gen-ts/api-error-response.ts": "sha256:0fd73be282e7a5d72d6c343a4e64d09c232556b16161167f0cffd6278ed7e3d3",
140
- "gen-ts/app-integrations-declaration.ts": "sha256:92ab07458747623fc8060247818bbf8e75b014efed55c4bb4332d39951a387fa",
140
+ "gen-ts/app-integrations-declaration.ts": "sha256:c522e5139d8ee454b7cfa2399802e2101de3b3932273106f51f7cf4e26bbb7fb",
141
141
  "gen-ts/artifact-contract.ts": "sha256:4a6dc6d2caaeed4bb2066cc8a333e6e09e5a0d4745e0b1038293d54ab9403aeb",
142
142
  "gen-ts/binding-classification-digest-helper.ts": "sha256:40fc7d85b4c3f3ffc5caf7d7950c62d013c83ee42058c7453b2100d95817f167",
143
143
  "gen-ts/binding-classification-subject.ts": "sha256:c409a3fd7b942b50419632c51d9a79474fb30d6374bdc79c0e25c73618e800c3",
144
144
  "gen-ts/builder-input-proposal.ts": "sha256:b0108c3787873d3cf1a39f00967379418a6766275d3474cfa55f5a9d93ead174",
145
145
  "gen-ts/data-dependency.ts": "sha256:259f19e2759395d72ead90b8ed74a6dcef0c2641124f4f182823138cfd19bedf",
146
- "gen-ts/data-grant-v2.ts": "sha256:b6660cd182b9c73e840bb962e66eafeda28cf003a3596ab8b3572174232da612",
146
+ "gen-ts/data-grant-v2.ts": "sha256:7ae2df78f14a76712bcab42d35ce5cf8509b317feb4d67f9a1da6bd13cc5dc2b",
147
147
  "gen-ts/data-grant.ts": "sha256:2358579d8aa1e57b01a6f2b0eacce5531e7f21ef226404c9809925365e0d6155",
148
148
  "gen-ts/data-source.ts": "sha256:1a40c252e94ee717d287ba63647e4368668dad9ea731770f8b58deb17d18b311",
149
149
  "gen-ts/deploy-request.ts": "sha256:0214faa8be6680f0bfc117d5ce67c1a59fcc18bd0ea4bc840e03e7d051fa9ab6",
@@ -163,9 +163,9 @@
163
163
  "gen-ts/index.ts": "sha256:8459b1cf136a0c822795154e2df2a28c848cddfadced329604be893ae6eef069",
164
164
  "gen-ts/integration-connect-result.ts": "sha256:4b10f169b6e1af364e9b418de21caa9fadbfb77b43cbff77d741cfae0b52180c",
165
165
  "gen-ts/integration-error-details.ts": "sha256:ad7ecec9dd4533a6e86b3508886a7d69937052f52105497285797f77106bcc6f",
166
- "gen-ts/integration-execute-input-rules.ts": "sha256:6f97b347d822624cbb4d51dae5834c67696babdea04b4c3aec9361e2bb670886",
167
- "gen-ts/integration-execute-request.ts": "sha256:fef0568ab5ffd9e021f3be4ee1178dec5ca1aa54d9799546699ae54b188d2c54",
168
- "gen-ts/integration-execute-result.ts": "sha256:79d40eb1f6f75ea06ca69d62bef5a71b5ad0c46eb51ab312fedefd5d3f568cb2",
166
+ "gen-ts/integration-execute-input-rules.ts": "sha256:3304b0fd14df331a164a035410de9b10885be6585077add4720da39b5d16d527",
167
+ "gen-ts/integration-execute-request.ts": "sha256:92ee799c42e5434229cb72198382352dabc469a2be551ef5c1926ed5ada45619",
168
+ "gen-ts/integration-execute-result.ts": "sha256:d72ca736d06741552e6a7be6c98fe1ae506ddaa1e58938b785303fdc3e1784ac",
169
169
  "gen-ts/internal-configuration-request.ts": "sha256:7032437797473fa1c581d134adef2f3d4b4f4132f482cd17743e9d47097886bc",
170
170
  "gen-ts/kit-bundle-manifest.ts": "sha256:2777a268aef8787b81e71d154a7d05f6f5ded09d66f378211ff5493ddb885171",
171
171
  "gen-ts/kit-lock.ts": "sha256:00ceeb97e9b7d0187bec00728f5099fd34e775e9cc44c85c4714f7a3a4118ef6",
@@ -173,7 +173,7 @@
173
173
  "gen-ts/promotion-request.ts": "sha256:9db88cef67f777a16bac628039ec3f582acb9e8cfff6fb592b30d0a0e55abc68",
174
174
  "gen-ts/promotion-response.ts": "sha256:f1c9cafac96faeb02a443a31786f67714e818f38d90108e7af41958396524d6f",
175
175
  "gen-ts/resolved-app-serving.ts": "sha256:6131a6cc5f784f0d101081d2ce1b96b76b2f904b2c5e7b2809f9ede5878ada1f",
176
- "gen-ts/saas-connection.ts": "sha256:a4b7a9b37db0cf747ca1c40db5b1459ade2a86cc067146154c3c42484b76e07a",
176
+ "gen-ts/saas-connection.ts": "sha256:b1ad7d3694806b429f10daf7440d0dbdfbb78d4022044da2324189ca59b1f737",
177
177
  "gen-ts/sanitized-binding-digest-helper.ts": "sha256:c47d7fdc20500e2e72c23fe39ecdd610fc397c47fcba51335ebec3c380fe6872",
178
178
  "gen-ts/sanitized-binding-evidence.ts": "sha256:f3fb7b1d7d2e0929eb0ea981eaf32db3104010647185f6ae59f67167d42538a9",
179
179
  "gen-ts/secret-reference.ts": "sha256:731fbcde7315cb4128d5b01bdbe6e6f248f13c7ad8dea04a3a4e927ac4890198",
@@ -1,4 +1,8 @@
1
1
  export type IntegrationConnectionKind = 'saas' | 'database';
2
+ /**
3
+ * Whose authority an operation runs under. Fixed per operation, except the declared-mode Slack operations (slack.message.post; since 0.71.0 also slack.channel.history, slack.message.update, slack.message.delete): declared per app for the access request, and named per call among the app's approved modes (execute request `mode`, 0.55.0).
4
+ */
5
+ export type IntegrationIdentityMode = 'app' | 'user';
2
6
  /**
3
7
  * Tenant-wide logical alias of a connection (governance sourceId) or of a resource under it.
4
8
  */
@@ -8,16 +12,12 @@ export type IntegrationAlias = string;
8
12
  * @maxItems 64
9
13
  */
10
14
  export type ResourceNames = IntegrationAlias[];
11
- /**
12
- * Whose authority an operation runs under. Fixed per operation, except slack.message.post: declared per app for the access request, and named per call among the app's approved modes (execute request `mode`, 0.55.0).
13
- */
14
- export type IntegrationIdentityMode = 'app' | 'user';
15
15
  /**
16
16
  * A plain warehouse column identifier, or `*` as the sole selection when IT exposed all current and future columns.
17
17
  */
18
18
  export type ColumnName = string;
19
19
  /**
20
- * 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 (six operations). Each operation carries a fixed identity mode — slack.channel.history=user, gmail.thread.list=user, gmail.message.read=user, gmail.message.send=user, warehouse.view.read=app — except slack.message.post, whose mode the app DECLARES: `app` posts as the company's Slack app (the one audited bot identity, under the IT-approved per-app display name when the connection declares `presentation`), `user` posts as the signed-in person after their own consent. 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 slack.message.post 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 and Gmail 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 plus one send); its single resource is the fixed `inbox` alias. This file also owns the shared IntegrationOperation / IntegrationIdentityMode / IntegrationEnvironment / IntegrationConnectionKind / IntegrationPresentation definitions referenced by the other integration schemas.
20
+ * 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 (twelve operations since 0.71.0, ADR 0018). Each operation carries a fixed identity mode — slack.dm.send=app, slack.user.lookup=app, every gmail.* operation=user, warehouse.view.read=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 and Gmail 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. 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.
21
21
  */
22
22
  export interface AppIntegrationsDeclaration {
23
23
  schema: 'isomorph.app-integrations/2.0';
@@ -29,11 +29,17 @@ export interface DeclaredConnection {
29
29
  kind: IntegrationConnectionKind;
30
30
  presentation?: IntegrationPresentation;
31
31
  operations: {
32
- 'slack.channel.history'?: UserModeChannelOperation;
32
+ 'slack.channel.history'?: DeclaredModeChannelOperation;
33
33
  'slack.message.post'?: DeclaredModeChannelOperation;
34
+ 'slack.message.update'?: DeclaredModeChannelOperation;
35
+ 'slack.message.delete'?: DeclaredModeChannelOperation;
36
+ 'slack.dm.send'?: AppModeChannelOperation;
37
+ 'slack.user.lookup'?: AppModeChannelOperation;
34
38
  'gmail.thread.list'?: UserModeChannelOperation;
39
+ 'gmail.thread.read'?: UserModeChannelOperation;
35
40
  'gmail.message.read'?: UserModeChannelOperation;
36
41
  'gmail.message.send'?: UserModeChannelOperation;
42
+ 'gmail.attachment.read'?: UserModeChannelOperation;
37
43
  'warehouse.view.read'?: AppModeViewOperation;
38
44
  };
39
45
  }
@@ -50,17 +56,24 @@ export interface IntegrationPresentation {
50
56
  */
51
57
  iconEmoji?: string;
52
58
  }
53
- export interface UserModeChannelOperation {
54
- identity: 'user';
55
- resources: ResourceNames;
56
- }
57
59
  /**
58
- * slack.message.post: the app declares the mode — app (posts as the company's Slack app) or user (posts as the signed-in person).
60
+ * slack.message.post, slack.channel.history, slack.message.update, slack.message.delete: the app declares the mode — app (acts as the company's Slack app) or user (acts as the signed-in person).
59
61
  */
60
62
  export interface DeclaredModeChannelOperation {
61
63
  identity: IntegrationIdentityMode;
62
64
  resources: ResourceNames;
63
65
  }
66
+ /**
67
+ * slack.dm.send, slack.user.lookup (0.71.0): app mode only — the company's Slack app messages people or resolves them by email; the resource is the fixed `workspace` alias.
68
+ */
69
+ export interface AppModeChannelOperation {
70
+ identity: 'app';
71
+ resources: ResourceNames;
72
+ }
73
+ export interface UserModeChannelOperation {
74
+ identity: 'user';
75
+ resources: ResourceNames;
76
+ }
64
77
  export interface AppModeViewOperation {
65
78
  identity: 'app';
66
79
  resources: {
@@ -1,7 +1,7 @@
1
- export declare const ContractRepositoryVersion: "0.70.0.0";
2
- export declare const ContractPublishVersion: "0.70.0";
3
- export declare const ContractPublishTag: "v0.70.0";
4
- export declare const ContractSchemasDigest: "sha256:b3c430914fee8a4f33dc15051ec59a6a8bad9a84c31fda119b6d683eb523b094";
1
+ export declare const ContractRepositoryVersion: "0.71.0.0";
2
+ export declare const ContractPublishVersion: "0.71.0";
3
+ export declare const ContractPublishTag: "v0.71.0";
4
+ export declare const ContractSchemasDigest: "sha256:25c5de2ee9586c6280dca7c733a7063f46bd5d400112fe60f928cf6db1a627c3";
5
5
  export declare const ContractAiFixturesDigest: "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6";
6
- export declare const ContractGeneratedGoDigest: "sha256:05b383b27a90f3b3495a327e3da9ab6e13c5c2b047fc9311616ff6e7a283ccab";
7
- export declare const ContractGeneratedTypeScriptDigest: "sha256:184aacb9eb73cec089f8e891b1840873ca9497eb91cf4d3b12cfa9f0a9f305d1";
6
+ export declare const ContractGeneratedGoDigest: "sha256:09bd95f079e733af9bf594a157d7396a645cc6c9866d48b7aee6b00a9762ac62";
7
+ export declare const ContractGeneratedTypeScriptDigest: "sha256:7fa5c1e4d8fdb68855b5e10208ee6c0a210f3595f7e74174efbf6bfa4c3673ce";
@@ -1,9 +1,9 @@
1
1
  /* eslint-disable */
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
- export const ContractRepositoryVersion = "0.70.0.0";
4
- export const ContractPublishVersion = "0.70.0";
5
- export const ContractPublishTag = "v0.70.0";
6
- export const ContractSchemasDigest = "sha256:b3c430914fee8a4f33dc15051ec59a6a8bad9a84c31fda119b6d683eb523b094";
3
+ export const ContractRepositoryVersion = "0.71.0.0";
4
+ export const ContractPublishVersion = "0.71.0";
5
+ export const ContractPublishTag = "v0.71.0";
6
+ export const ContractSchemasDigest = "sha256:25c5de2ee9586c6280dca7c733a7063f46bd5d400112fe60f928cf6db1a627c3";
7
7
  export const ContractAiFixturesDigest = "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6";
8
- export const ContractGeneratedGoDigest = "sha256:05b383b27a90f3b3495a327e3da9ab6e13c5c2b047fc9311616ff6e7a283ccab";
9
- export const ContractGeneratedTypeScriptDigest = "sha256:184aacb9eb73cec089f8e891b1840873ca9497eb91cf4d3b12cfa9f0a9f305d1";
8
+ export const ContractGeneratedGoDigest = "sha256:09bd95f079e733af9bf594a157d7396a645cc6c9866d48b7aee6b00a9762ac62";
9
+ export const ContractGeneratedTypeScriptDigest = "sha256:7fa5c1e4d8fdb68855b5e10208ee6c0a210f3595f7e74174efbf6bfa4c3673ce";
@@ -23,17 +23,17 @@ export interface DataGrantV2 {
23
23
  */
24
24
  sourceId: string;
25
25
  /**
26
- * Whose authority an operation runs under. Fixed per operation, except slack.message.post: declared per app for the access request, and named per call among the app's approved modes (execute request `mode`, 0.55.0).
26
+ * Whose authority an operation runs under. Fixed per operation, except the declared-mode Slack operations (slack.message.post; since 0.71.0 also slack.channel.history, slack.message.update, slack.message.delete): declared per app for the access request, and named per call among the app's approved modes (execute request `mode`, 0.55.0).
27
27
  */
28
28
  mode: 'app' | 'user';
29
29
  kind: 'saas' | 'database';
30
30
  status: DataGrantV2Status;
31
31
  /**
32
- * Approved operations; each must match this grant's mode. Empty until the first approval.
32
+ * Approved operations; each must match this grant's mode. Empty until the first approval. At most the eleven SaaS operations (0.71.0); a database grant holds one.
33
33
  *
34
- * @maxItems 5
34
+ * @maxItems 11
35
35
  */
36
- operations: ('slack.channel.history' | 'slack.message.post' | 'gmail.thread.list' | 'gmail.message.read' | 'gmail.message.send' | 'warehouse.view.read')[];
36
+ 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' | 'warehouse.view.read')[];
37
37
  /**
38
38
  * Approved logical resources. Never inherited by wildcard. Empty until the first approval.
39
39
  *
@@ -72,7 +72,7 @@ export interface DataGrantV2 {
72
72
  updatedAt: string;
73
73
  /**
74
74
  * @deprecated
75
- * Whose authority an operation runs under. Fixed per operation, except slack.message.post: declared per app for the access request, and named per call among the app's approved modes (execute request `mode`, 0.55.0).
75
+ * Whose authority an operation runs under. Fixed per operation, except the declared-mode Slack operations (slack.message.post; since 0.71.0 also slack.channel.history, slack.message.update, slack.message.delete): declared per app for the access request, and named per call among the app's approved modes (execute request `mode`, 0.55.0).
76
76
  */
77
77
  identityMode?: 'app' | 'user';
78
78
  /**
@@ -28,6 +28,7 @@ export type IntegrationExecuteInputFieldRule = {
28
28
  maxLength?: number;
29
29
  pattern?: string;
30
30
  };
31
+ default?: readonly string[];
31
32
  } | {
32
33
  kind: 'enum';
33
34
  required: boolean;
@@ -64,9 +65,27 @@ export declare const IntegrationExecuteInputRules: {
64
65
  readonly kind: "integer";
65
66
  readonly required: false;
66
67
  readonly minimum: 1;
67
- readonly maximum: 15;
68
+ readonly maximum: 100;
68
69
  readonly default: 15;
69
70
  };
71
+ readonly cursor: {
72
+ readonly kind: "string";
73
+ readonly required: false;
74
+ readonly minLength: 1;
75
+ readonly maxLength: 256;
76
+ };
77
+ readonly oldest: {
78
+ readonly kind: "string";
79
+ readonly required: false;
80
+ readonly minLength: 1;
81
+ readonly maxLength: 64;
82
+ };
83
+ readonly latest: {
84
+ readonly kind: "string";
85
+ readonly required: false;
86
+ readonly minLength: 1;
87
+ readonly maxLength: 64;
88
+ };
70
89
  };
71
90
  };
72
91
  readonly "slack.message.post": {
@@ -78,6 +97,93 @@ export declare const IntegrationExecuteInputRules: {
78
97
  readonly minLength: 1;
79
98
  readonly maxLength: 4000;
80
99
  };
100
+ readonly threadId: {
101
+ readonly kind: "string";
102
+ readonly required: false;
103
+ readonly minLength: 0;
104
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
105
+ };
106
+ readonly format: {
107
+ readonly kind: "enum";
108
+ readonly required: false;
109
+ readonly values: readonly ["plain", "mrkdwn"];
110
+ readonly default: "plain";
111
+ };
112
+ };
113
+ };
114
+ readonly "slack.message.update": {
115
+ readonly idempotencyKey: false;
116
+ readonly fields: {
117
+ readonly messageId: {
118
+ readonly kind: "string";
119
+ readonly required: true;
120
+ readonly minLength: 0;
121
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
122
+ };
123
+ readonly text: {
124
+ readonly kind: "string";
125
+ readonly required: true;
126
+ readonly minLength: 1;
127
+ readonly maxLength: 4000;
128
+ };
129
+ readonly format: {
130
+ readonly kind: "enum";
131
+ readonly required: false;
132
+ readonly values: readonly ["plain", "mrkdwn"];
133
+ readonly default: "plain";
134
+ };
135
+ };
136
+ };
137
+ readonly "slack.message.delete": {
138
+ readonly idempotencyKey: false;
139
+ readonly fields: {
140
+ readonly messageId: {
141
+ readonly kind: "string";
142
+ readonly required: true;
143
+ readonly minLength: 0;
144
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
145
+ };
146
+ };
147
+ };
148
+ readonly "slack.dm.send": {
149
+ readonly idempotencyKey: true;
150
+ readonly fields: {
151
+ readonly to: {
152
+ readonly kind: "string[]";
153
+ readonly required: true;
154
+ readonly minItems: 1;
155
+ readonly maxItems: 8;
156
+ readonly uniqueItems: true;
157
+ readonly item: {
158
+ readonly minLength: 3;
159
+ readonly maxLength: 254;
160
+ readonly pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$";
161
+ };
162
+ };
163
+ readonly text: {
164
+ readonly kind: "string";
165
+ readonly required: true;
166
+ readonly minLength: 1;
167
+ readonly maxLength: 4000;
168
+ };
169
+ readonly format: {
170
+ readonly kind: "enum";
171
+ readonly required: false;
172
+ readonly values: readonly ["plain", "mrkdwn"];
173
+ readonly default: "plain";
174
+ };
175
+ };
176
+ };
177
+ readonly "slack.user.lookup": {
178
+ readonly idempotencyKey: false;
179
+ readonly fields: {
180
+ readonly email: {
181
+ readonly kind: "string";
182
+ readonly required: true;
183
+ readonly minLength: 3;
184
+ readonly maxLength: 254;
185
+ readonly pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$";
186
+ };
81
187
  };
82
188
  };
83
189
  readonly "gmail.thread.list": {
@@ -87,9 +193,44 @@ export declare const IntegrationExecuteInputRules: {
87
193
  readonly kind: "integer";
88
194
  readonly required: false;
89
195
  readonly minimum: 1;
90
- readonly maximum: 15;
196
+ readonly maximum: 50;
91
197
  readonly default: 15;
92
198
  };
199
+ readonly q: {
200
+ readonly kind: "string";
201
+ readonly required: false;
202
+ readonly minLength: 1;
203
+ readonly maxLength: 256;
204
+ };
205
+ readonly labelIds: {
206
+ readonly kind: "string[]";
207
+ readonly required: false;
208
+ readonly minItems: 1;
209
+ readonly maxItems: 5;
210
+ readonly uniqueItems: true;
211
+ readonly item: {
212
+ readonly minLength: 1;
213
+ readonly maxLength: 64;
214
+ };
215
+ readonly default: readonly ["INBOX"];
216
+ };
217
+ readonly pageToken: {
218
+ readonly kind: "string";
219
+ readonly required: false;
220
+ readonly minLength: 1;
221
+ readonly maxLength: 256;
222
+ };
223
+ };
224
+ };
225
+ readonly "gmail.thread.read": {
226
+ readonly idempotencyKey: false;
227
+ readonly fields: {
228
+ readonly threadId: {
229
+ readonly kind: "string";
230
+ readonly required: true;
231
+ readonly minLength: 0;
232
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
233
+ };
93
234
  };
94
235
  };
95
236
  readonly "gmail.message.read": {
@@ -99,7 +240,7 @@ export declare const IntegrationExecuteInputRules: {
99
240
  readonly kind: "string";
100
241
  readonly required: true;
101
242
  readonly minLength: 0;
102
- readonly pattern: "^[A-Za-z0-9_-]{1,64}$";
243
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
103
244
  };
104
245
  };
105
246
  };
@@ -154,6 +295,38 @@ export declare const IntegrationExecuteInputRules: {
154
295
  readonly minLength: 1;
155
296
  readonly maxLength: 4000;
156
297
  };
298
+ readonly html: {
299
+ readonly kind: "string";
300
+ readonly required: false;
301
+ readonly minLength: 1;
302
+ readonly maxLength: 65536;
303
+ };
304
+ readonly attachments: {
305
+ readonly kind: "object[]";
306
+ readonly required: false;
307
+ readonly minItems: 1;
308
+ readonly maxItems: 5;
309
+ readonly fields: {
310
+ readonly filename: {
311
+ readonly kind: "string";
312
+ readonly required: true;
313
+ readonly minLength: 1;
314
+ readonly maxLength: 255;
315
+ };
316
+ readonly contentType: {
317
+ readonly kind: "string";
318
+ readonly required: true;
319
+ readonly minLength: 1;
320
+ readonly maxLength: 128;
321
+ };
322
+ readonly dataBase64: {
323
+ readonly kind: "string";
324
+ readonly required: true;
325
+ readonly minLength: 1;
326
+ readonly maxLength: 2796203;
327
+ };
328
+ };
329
+ };
157
330
  readonly replyToMessageId: {
158
331
  readonly kind: "string";
159
332
  readonly required: false;
@@ -162,6 +335,23 @@ export declare const IntegrationExecuteInputRules: {
162
335
  };
163
336
  };
164
337
  };
338
+ readonly "gmail.attachment.read": {
339
+ readonly idempotencyKey: false;
340
+ readonly fields: {
341
+ readonly messageId: {
342
+ readonly kind: "string";
343
+ readonly required: true;
344
+ readonly minLength: 0;
345
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
346
+ };
347
+ readonly attachmentId: {
348
+ readonly kind: "string";
349
+ readonly required: true;
350
+ readonly minLength: 1;
351
+ readonly maxLength: 512;
352
+ };
353
+ };
354
+ };
165
355
  readonly "warehouse.view.read": {
166
356
  readonly idempotencyKey: false;
167
357
  readonly fields: {
@@ -4,25 +4,67 @@ export const IntegrationExecuteInputRules = {
4
4
  "slack.channel.history": {
5
5
  idempotencyKey: false,
6
6
  fields: {
7
- limit: { kind: "integer", required: false, minimum: 1, maximum: 15, default: 15 },
7
+ limit: { kind: "integer", required: false, minimum: 1, maximum: 100, default: 15 },
8
+ cursor: { kind: "string", required: false, minLength: 1, maxLength: 256 },
9
+ oldest: { kind: "string", required: false, minLength: 1, maxLength: 64 },
10
+ latest: { kind: "string", required: false, minLength: 1, maxLength: 64 },
8
11
  },
9
12
  },
10
13
  "slack.message.post": {
11
14
  idempotencyKey: true,
12
15
  fields: {
13
16
  text: { kind: "string", required: true, minLength: 1, maxLength: 4000 },
17
+ threadId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9._-]{1,64}$" },
18
+ format: { kind: "enum", required: false, values: ["plain", "mrkdwn"], default: "plain" },
19
+ },
20
+ },
21
+ "slack.message.update": {
22
+ idempotencyKey: false,
23
+ fields: {
24
+ messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._-]{1,64}$" },
25
+ text: { kind: "string", required: true, minLength: 1, maxLength: 4000 },
26
+ format: { kind: "enum", required: false, values: ["plain", "mrkdwn"], default: "plain" },
27
+ },
28
+ },
29
+ "slack.message.delete": {
30
+ idempotencyKey: false,
31
+ fields: {
32
+ messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._-]{1,64}$" },
33
+ },
34
+ },
35
+ "slack.dm.send": {
36
+ idempotencyKey: true,
37
+ fields: {
38
+ to: { kind: "string[]", required: true, minItems: 1, maxItems: 8, uniqueItems: true, item: { minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" } },
39
+ text: { kind: "string", required: true, minLength: 1, maxLength: 4000 },
40
+ format: { kind: "enum", required: false, values: ["plain", "mrkdwn"], default: "plain" },
41
+ },
42
+ },
43
+ "slack.user.lookup": {
44
+ idempotencyKey: false,
45
+ fields: {
46
+ email: { kind: "string", required: true, minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" },
14
47
  },
15
48
  },
16
49
  "gmail.thread.list": {
17
50
  idempotencyKey: false,
18
51
  fields: {
19
- limit: { kind: "integer", required: false, minimum: 1, maximum: 15, default: 15 },
52
+ limit: { kind: "integer", required: false, minimum: 1, maximum: 50, default: 15 },
53
+ q: { kind: "string", required: false, minLength: 1, maxLength: 256 },
54
+ labelIds: { kind: "string[]", required: false, minItems: 1, maxItems: 5, uniqueItems: true, item: { minLength: 1, maxLength: 64 }, default: ["INBOX"] },
55
+ pageToken: { kind: "string", required: false, minLength: 1, maxLength: 256 },
56
+ },
57
+ },
58
+ "gmail.thread.read": {
59
+ idempotencyKey: false,
60
+ fields: {
61
+ threadId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._-]{1,64}$" },
20
62
  },
21
63
  },
22
64
  "gmail.message.read": {
23
65
  idempotencyKey: false,
24
66
  fields: {
25
- messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9_-]{1,64}$" },
67
+ messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._-]{1,64}$" },
26
68
  },
27
69
  },
28
70
  "gmail.message.send": {
@@ -33,9 +75,22 @@ export const IntegrationExecuteInputRules = {
33
75
  bcc: { kind: "string[]", required: false, minItems: 1, maxItems: 50, uniqueItems: true, item: { minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" } },
34
76
  subject: { kind: "string", required: true, minLength: 1, maxLength: 256 },
35
77
  text: { kind: "string", required: true, minLength: 1, maxLength: 4000 },
78
+ html: { kind: "string", required: false, minLength: 1, maxLength: 65536 },
79
+ attachments: { kind: "object[]", required: false, minItems: 1, maxItems: 5, fields: {
80
+ filename: { kind: "string", required: true, minLength: 1, maxLength: 255 },
81
+ contentType: { kind: "string", required: true, minLength: 1, maxLength: 128 },
82
+ dataBase64: { kind: "string", required: true, minLength: 1, maxLength: 2796203 },
83
+ } },
36
84
  replyToMessageId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9_-]{1,64}$" },
37
85
  },
38
86
  },
87
+ "gmail.attachment.read": {
88
+ idempotencyKey: false,
89
+ fields: {
90
+ messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._-]{1,64}$" },
91
+ attachmentId: { kind: "string", required: true, minLength: 1, maxLength: 512 },
92
+ },
93
+ },
39
94
  "warehouse.view.read": {
40
95
  idempotencyKey: false,
41
96
  fields: {
@@ -105,6 +160,8 @@ function checkFields(operation, prefix, fields, given, nullIsAbsent) {
105
160
  return refuse(path, `${path} is required for ${operation}`);
106
161
  if ((field.kind === 'integer' || field.kind === 'enum') && field.default !== undefined)
107
162
  out[name] = field.default;
163
+ if (field.kind === 'string[]' && field.default !== undefined)
164
+ out[name] = [...field.default];
108
165
  continue;
109
166
  }
110
167
  const checked = checkField(operation, path, name, field, value);