@fourier-labs/harbour-contracts 0.69.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 five-operation set (Slack read/post, Gmail read-only, 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, the five 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.69.0.0",
4
- "publishVersion": "0.69.0",
5
- "publishTag": "v0.69.0",
6
- "schemasDigest": "sha256:e21f310517adb289db8b8233fd3c742a711fed8226892591f6581afb8510e30c",
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:1f793a0d039976e5a9b65a72753928ab68de66d6878c96a6ea242e48a16ca24e",
9
- "generatedTypeScriptDigest": "sha256:6bdb0271dae8bf7df75f72e61addda29ebb778a054b59c8538d05112000ac0e4",
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:7a3ebd7a9992a9390d05c9eea6b66762e437655afdca79b64ec992967172c325",
58
- "schema/integration-execute-result.schema.json": "sha256:de87c35fb4dfb16f7334cab111f247281fc2300dc27738871ed1f8397ece6753",
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:52a405aa7a97f7b4e2ed3c314a7bd28b7698cc7883ee72ad4c027637be602ab9",
113
- "gen-go/integration_execute_input_rules_test.go": "sha256:c437a8406a2f062a0173b9419e4cb176fc6eb54e569506225d5162323f55b40b",
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:9e3c05f1fcdd06a0eebfc56fe7ddf4b37c9ddc367822c2d3ec753770a09ee1ae",
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:0da117ac9f3109462e5862d658edf0f50e4b71fdcbb675d3a9dcb08489bcadd0",
167
- "gen-ts/integration-execute-request.ts": "sha256:1008bc1c8b8fec41dd7241a9f6ccb31233473e34c5cf538c0125f4ee6f45d2db",
168
- "gen-ts/integration-execute-result.ts": "sha256:b7c9270abb0c12888e651aeb1a9927a658faa135ad6197be6dfbd46d942f2a0a",
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.69.0.0";
2
- export declare const ContractPublishVersion: "0.69.0";
3
- export declare const ContractPublishTag: "v0.69.0";
4
- export declare const ContractSchemasDigest: "sha256:e21f310517adb289db8b8233fd3c742a711fed8226892591f6581afb8510e30c";
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:1f793a0d039976e5a9b65a72753928ab68de66d6878c96a6ea242e48a16ca24e";
7
- export declare const ContractGeneratedTypeScriptDigest: "sha256:6bdb0271dae8bf7df75f72e61addda29ebb778a054b59c8538d05112000ac0e4";
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.69.0.0";
4
- export const ContractPublishVersion = "0.69.0";
5
- export const ContractPublishTag = "v0.69.0";
6
- export const ContractSchemasDigest = "sha256:e21f310517adb289db8b8233fd3c742a711fed8226892591f6581afb8510e30c";
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:1f793a0d039976e5a9b65a72753928ab68de66d6878c96a6ea242e48a16ca24e";
9
- export const ContractGeneratedTypeScriptDigest = "sha256:6bdb0271dae8bf7df75f72e61addda29ebb778a054b59c8538d05112000ac0e4";
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,7 +28,31 @@ export type IntegrationExecuteInputFieldRule = {
28
28
  maxLength?: number;
29
29
  pattern?: string;
30
30
  };
31
+ default?: readonly string[];
32
+ } | {
33
+ kind: 'enum';
34
+ required: boolean;
35
+ values: readonly string[];
36
+ default?: string;
37
+ } | {
38
+ kind: 'object[]';
39
+ required: boolean;
40
+ minItems: number;
41
+ maxItems: number;
42
+ fields: Readonly<Record<string, IntegrationExecuteInputFieldRule>>;
43
+ } | {
44
+ kind: 'value';
45
+ required: boolean;
46
+ types: readonly IntegrationExecuteInputValueType[];
47
+ maxLength?: number;
48
+ list?: {
49
+ minItems: number;
50
+ maxItems: number;
51
+ types: readonly IntegrationExecuteInputValueType[];
52
+ };
31
53
  };
54
+ /** The scalar types a `value` input accepts, alone or in its list form. */
55
+ export type IntegrationExecuteInputValueType = 'string' | 'number' | 'boolean';
32
56
  export type IntegrationExecuteOperationRule = {
33
57
  idempotencyKey: boolean;
34
58
  fields: Record<string, IntegrationExecuteInputFieldRule>;
@@ -41,9 +65,27 @@ export declare const IntegrationExecuteInputRules: {
41
65
  readonly kind: "integer";
42
66
  readonly required: false;
43
67
  readonly minimum: 1;
44
- readonly maximum: 15;
68
+ readonly maximum: 100;
45
69
  readonly default: 15;
46
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
+ };
47
89
  };
48
90
  };
49
91
  readonly "slack.message.post": {
@@ -55,6 +97,93 @@ export declare const IntegrationExecuteInputRules: {
55
97
  readonly minLength: 1;
56
98
  readonly maxLength: 4000;
57
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
+ };
58
187
  };
59
188
  };
60
189
  readonly "gmail.thread.list": {
@@ -64,9 +193,44 @@ export declare const IntegrationExecuteInputRules: {
64
193
  readonly kind: "integer";
65
194
  readonly required: false;
66
195
  readonly minimum: 1;
67
- readonly maximum: 15;
196
+ readonly maximum: 50;
68
197
  readonly default: 15;
69
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
+ };
70
234
  };
71
235
  };
72
236
  readonly "gmail.message.read": {
@@ -76,7 +240,7 @@ export declare const IntegrationExecuteInputRules: {
76
240
  readonly kind: "string";
77
241
  readonly required: true;
78
242
  readonly minLength: 0;
79
- readonly pattern: "^[A-Za-z0-9_-]{1,64}$";
243
+ readonly pattern: "^[A-Za-z0-9._-]{1,64}$";
80
244
  };
81
245
  };
82
246
  };
@@ -131,6 +295,38 @@ export declare const IntegrationExecuteInputRules: {
131
295
  readonly minLength: 1;
132
296
  readonly maxLength: 4000;
133
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
+ };
134
330
  readonly replyToMessageId: {
135
331
  readonly kind: "string";
136
332
  readonly required: false;
@@ -139,12 +335,29 @@ export declare const IntegrationExecuteInputRules: {
139
335
  };
140
336
  };
141
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
+ };
142
355
  readonly "warehouse.view.read": {
143
356
  readonly idempotencyKey: false;
144
357
  readonly fields: {
145
358
  readonly columns: {
146
359
  readonly kind: "string[]";
147
- readonly required: true;
360
+ readonly required: false;
148
361
  readonly minItems: 1;
149
362
  readonly maxItems: 32;
150
363
  readonly uniqueItems: false;
@@ -153,6 +366,92 @@ export declare const IntegrationExecuteInputRules: {
153
366
  readonly pattern: "^(?:\\*|[A-Za-z_][A-Za-z0-9_]{0,62})$";
154
367
  };
155
368
  };
369
+ readonly where: {
370
+ readonly kind: "object[]";
371
+ readonly required: false;
372
+ readonly minItems: 1;
373
+ readonly maxItems: 16;
374
+ readonly fields: {
375
+ readonly column: {
376
+ readonly kind: "string";
377
+ readonly required: true;
378
+ readonly minLength: 0;
379
+ readonly pattern: "^[A-Za-z_][A-Za-z0-9_]{0,62}$";
380
+ };
381
+ readonly op: {
382
+ readonly kind: "enum";
383
+ readonly required: true;
384
+ readonly values: readonly ["eq", "ne", "gt", "gte", "lt", "lte", "in", "notIn", "isNull", "isNotNull"];
385
+ };
386
+ readonly value: {
387
+ readonly kind: "value";
388
+ readonly required: false;
389
+ readonly types: readonly ["string", "number", "boolean"];
390
+ readonly maxLength: 256;
391
+ readonly list: {
392
+ readonly minItems: 1;
393
+ readonly maxItems: 100;
394
+ readonly types: readonly ["string", "number"];
395
+ };
396
+ };
397
+ };
398
+ };
399
+ readonly groupBy: {
400
+ readonly kind: "string[]";
401
+ readonly required: false;
402
+ readonly minItems: 1;
403
+ readonly maxItems: 8;
404
+ readonly uniqueItems: false;
405
+ readonly item: {
406
+ readonly minLength: 0;
407
+ readonly pattern: "^[A-Za-z_][A-Za-z0-9_]{0,62}$";
408
+ };
409
+ };
410
+ readonly aggregates: {
411
+ readonly kind: "object[]";
412
+ readonly required: false;
413
+ readonly minItems: 1;
414
+ readonly maxItems: 16;
415
+ readonly fields: {
416
+ readonly fn: {
417
+ readonly kind: "enum";
418
+ readonly required: true;
419
+ readonly values: readonly ["count", "sum", "avg", "min", "max"];
420
+ };
421
+ readonly column: {
422
+ readonly kind: "string";
423
+ readonly required: true;
424
+ readonly minLength: 0;
425
+ readonly pattern: "^(?:\\*|[A-Za-z_][A-Za-z0-9_]{0,62})$";
426
+ };
427
+ readonly as: {
428
+ readonly kind: "string";
429
+ readonly required: true;
430
+ readonly minLength: 0;
431
+ readonly pattern: "^[a-z_][a-z0-9_]{0,62}$";
432
+ };
433
+ };
434
+ };
435
+ readonly orderBy: {
436
+ readonly kind: "object[]";
437
+ readonly required: false;
438
+ readonly minItems: 1;
439
+ readonly maxItems: 8;
440
+ readonly fields: {
441
+ readonly column: {
442
+ readonly kind: "string";
443
+ readonly required: true;
444
+ readonly minLength: 0;
445
+ readonly pattern: "^[A-Za-z_][A-Za-z0-9_]{0,62}$";
446
+ };
447
+ readonly direction: {
448
+ readonly kind: "enum";
449
+ readonly required: false;
450
+ readonly values: readonly ["asc", "desc"];
451
+ readonly default: "asc";
452
+ };
453
+ };
454
+ };
156
455
  readonly limit: {
157
456
  readonly kind: "integer";
158
457
  readonly required: false;