@fourier-labs/harbour-contracts 0.77.0 → 0.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +3 -3
  2. package/contract-release.json +31 -25
  3. package/dist/gen-ts/app-integrations-declaration.d.ts +11 -2
  4. package/dist/gen-ts/app-sign-in.d.ts +9 -0
  5. package/dist/gen-ts/app-sign-in.js +3 -0
  6. package/dist/gen-ts/contract-release.d.ts +6 -6
  7. package/dist/gen-ts/contract-release.js +6 -6
  8. package/dist/gen-ts/data-grant-v2.d.ts +5 -5
  9. package/dist/gen-ts/deployment-app-registration.d.ts +8 -2
  10. package/dist/gen-ts/external-sign-in.d.ts +29 -0
  11. package/dist/gen-ts/external-sign-in.js +3 -0
  12. package/dist/gen-ts/identity-context.d.ts +18 -0
  13. package/dist/gen-ts/identity-context.js +3 -0
  14. package/dist/gen-ts/index.d.ts +3 -0
  15. package/dist/gen-ts/index.js +3 -0
  16. package/dist/gen-ts/integration-execute-input-rules.d.ts +202 -0
  17. package/dist/gen-ts/integration-execute-input-rules.js +88 -2
  18. package/dist/gen-ts/integration-execute-request.d.ts +52 -6
  19. package/dist/gen-ts/integration-execute-result.d.ts +90 -2
  20. package/dist/gen-ts/integration-operations.d.ts +63 -0
  21. package/dist/gen-ts/integration-operations.js +81 -0
  22. package/dist/gen-ts/saas-connection.d.ts +11 -11
  23. package/gen-ts/app-integrations-declaration.ts +11 -2
  24. package/gen-ts/app-sign-in.ts +12 -0
  25. package/gen-ts/contract-release.ts +6 -6
  26. package/gen-ts/data-grant-v2.ts +13 -4
  27. package/gen-ts/deployment-app-registration.ts +8 -2
  28. package/gen-ts/external-sign-in.ts +32 -0
  29. package/gen-ts/identity-context.ts +21 -0
  30. package/gen-ts/index.ts +3 -0
  31. package/gen-ts/integration-execute-input-rules.ts +90 -4
  32. package/gen-ts/integration-execute-request.ts +60 -5
  33. package/gen-ts/integration-execute-result.ts +90 -2
  34. package/gen-ts/integration-operations.ts +81 -0
  35. package/gen-ts/saas-connection.ts +19 -10
  36. package/package.json +1 -1
  37. package/schema/app-integrations-declaration.schema.json +193 -3
  38. package/schema/app-sign-in.schema.json +51 -0
  39. package/schema/data-grant-v2.schema.json +4 -4
  40. package/schema/deployment-app-registration.schema.json +5 -2
  41. package/schema/external-sign-in.schema.json +120 -0
  42. package/schema/identity-context.schema.json +141 -0
  43. package/schema/integration-execute-request.schema.json +497 -7
  44. package/schema/integration-execute-result.schema.json +345 -4
  45. package/schema/saas-connection.schema.json +27 -10
@@ -27,6 +27,15 @@ export type DeclaredConnection = {
27
27
  'basecamp.comment.post'?: UserModeChannelOperation;
28
28
  'basecamp.campfire.post'?: UserModeChannelOperation;
29
29
  'basecamp.people.list'?: UserModeChannelOperation;
30
+ 'sharepoint.list.list'?: UserModeChannelOperation;
31
+ 'sharepoint.item.list'?: UserModeChannelOperation;
32
+ 'sharepoint.item.create'?: UserModeChannelOperation;
33
+ 'sharepoint.item.update'?: UserModeChannelOperation;
34
+ 'sharepoint.drive.list'?: UserModeChannelOperation;
35
+ 'sharepoint.file.list'?: UserModeChannelOperation;
36
+ 'sharepoint.file.search'?: UserModeChannelOperation;
37
+ 'sharepoint.file.read'?: UserModeChannelOperation;
38
+ 'sharepoint.file.upload'?: UserModeChannelOperation;
30
39
  'warehouse.view.read'?: AppModeViewOperation;
31
40
  'service.request'?: ServiceOperation;
32
41
  };
@@ -51,7 +60,7 @@ export type ResourceNames = IntegrationAlias[];
51
60
  export type ColumnName = string;
52
61
 
53
62
  /**
54
- * Committed `.isomorph/integrations.json`: the app's declared use of tenant-wide integration connections. Keys are logical connection aliases (the governance sourceId); resources are logical names (Slack channel alias, warehouse view name), never IDs, tokens or URLs. The operation set is closed (twenty-four operations since 0.76.0, ADR 0018 and ADR 0022). Each operation carries a fixed identity mode — slack.dm.send=app, slack.user.lookup=app, every gmail.* operation=user, every basecamp.* operation=user, warehouse.view.read=app, service.request=app — except the declared-mode Slack operations (slack.message.post, and since 0.71.0 slack.channel.history, slack.message.update and slack.message.delete), whose mode the app DECLARES: `app` acts as the company's Slack app (the one audited bot identity; a post goes out under the IT-approved per-app display name when the connection declares `presentation`), `user` acts as the signed-in person after their own consent (reads what they can read, edits what they wrote). The declared mode is the one the app requests access for; an app may hold approved grants for both modes after two requests, and each declared-mode call names which approved mode it runs under (`mode` on the execute request, 0.55.0) — a mode IT did not approve is refused, never swapped for the other. A `saas` connection may declare only the Slack, Gmail and Basecamp operations and a `database` connection only warehouse.view.read; `presentation` is a `saas` connection's optional per-app display name and icon for app-mode Slack posts, shown to IT at approval time and applied only from the approved grant. Gmail is user-mode only (reads, one send); its single resource is the fixed `inbox` alias. Basecamp (0.76.0, ADR 0022) is user-mode only too: basecamp.project.list runs on the fixed `account` alias (the company's pinned Basecamp account) and every other basecamp.* operation on a project alias IT mapped in the connection's `channels` map, so Basecamp itself refuses an id outside that project. slack.dm.send and slack.user.lookup address people by email rather than a channel, so their single resource is the fixed `workspace` alias (the connection's installed workspace), the way Gmail's is `inbox`. This file also owns the shared IntegrationOperation / IntegrationIdentityMode / IntegrationEnvironment / IntegrationConnectionKind / IntegrationPresentation definitions referenced by the other integration schemas.
63
+ * Committed `.isomorph/integrations.json`: the app's declared use of tenant-wide integration connections. Keys are logical connection aliases (the governance sourceId); resources are logical names (Slack channel alias, warehouse view name), never IDs, tokens or URLs. The operation set is closed (thirty-three operations since 0.78.0, ADR 0018, ADR 0022 and ADR 0024). Each operation carries a fixed identity mode — slack.dm.send=app, slack.user.lookup=app, every gmail.* operation=user, every basecamp.* operation=user, every sharepoint.* operation=user, warehouse.view.read=app, service.request=app — except the declared-mode Slack operations (slack.message.post, and since 0.71.0 slack.channel.history, slack.message.update and slack.message.delete), whose mode the app DECLARES: `app` acts as the company's Slack app (the one audited bot identity; a post goes out under the IT-approved per-app display name when the connection declares `presentation`), `user` acts as the signed-in person after their own consent (reads what they can read, edits what they wrote). The declared mode is the one the app requests access for; an app may hold approved grants for both modes after two requests, and each declared-mode call names which approved mode it runs under (`mode` on the execute request, 0.55.0) — a mode IT did not approve is refused, never swapped for the other. A `saas` connection may declare only the Slack, Gmail, Basecamp and SharePoint operations and a `database` connection only warehouse.view.read; `presentation` is a `saas` connection's optional per-app display name and icon for app-mode Slack posts, shown to IT at approval time and applied only from the approved grant. Gmail is user-mode only (reads, one send); its single resource is the fixed `inbox` alias. Basecamp (0.76.0, ADR 0022) is user-mode only too: basecamp.project.list runs on the fixed `account` alias (the company's pinned Basecamp account) and every other basecamp.* operation on a project alias IT mapped in the connection's `channels` map, so Basecamp itself refuses an id outside that project. SharePoint (0.78.0, ADR 0024) is user-mode only as well: every sharepoint.* operation runs on a site alias IT mapped in the connection's `channels` map (a Microsoft Graph site id), so Graph itself refuses a list, item or file outside that site. slack.dm.send and slack.user.lookup address people by email rather than a channel, so their single resource is the fixed `workspace` alias (the connection's installed workspace), the way Gmail's is `inbox`. This file also owns the shared IntegrationOperation / IntegrationIdentityMode / IntegrationEnvironment / IntegrationConnectionKind / IntegrationPresentation definitions referenced by the other integration schemas.
55
64
  */
56
65
  export interface AppIntegrationsDeclaration {
57
66
  schema: 'isomorph.app-integrations/2.0';
@@ -87,7 +96,7 @@ export interface AppModeChannelOperation {
87
96
  resources: ResourceNames;
88
97
  }
89
98
  /**
90
- * Every gmail.* operation (resource: the fixed `inbox` alias) and, since 0.76.0, every basecamp.* operation (resource: a project alias from the connection's `channels` map, or the fixed `account` alias for basecamp.project.list): user mode only — the app acts as the signed-in person after their own consent.
99
+ * Every gmail.* operation (resource: the fixed `inbox` alias), since 0.76.0 every basecamp.* operation (resource: a project alias from the connection's `channels` map, or the fixed `account` alias for basecamp.project.list) and since 0.78.0 every sharepoint.* operation (resource: a site alias from the connection's `channels` map): user mode only — the app acts as the signed-in person after their own consent.
91
100
  */
92
101
  export interface UserModeChannelOperation {
93
102
  identity: 'user';
@@ -0,0 +1,12 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+
4
+ export type AppSignIn = {
5
+ signIn?: 'company' | 'external';
6
+ /**
7
+ * @minItems 1
8
+ * @maxItems 1
9
+ */
10
+ signInMethods?: ('phone' | 'email')[];
11
+ clientId?: string;
12
+ };
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable */
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
3
 
4
- export const ContractRepositoryVersion = "0.77.0.0" as const;
5
- export const ContractPublishVersion = "0.77.0" as const;
6
- export const ContractPublishTag = "v0.77.0" as const;
7
- export const ContractSchemasDigest = "sha256:4b1970124058b38db22026ca1f6f6c74d9e32d6753dac12a5452ba090d19c667" as const;
4
+ export const ContractRepositoryVersion = "0.79.0.0" as const;
5
+ export const ContractPublishVersion = "0.79.0" as const;
6
+ export const ContractPublishTag = "v0.79.0" as const;
7
+ export const ContractSchemasDigest = "sha256:c4d332b1b1a8500a010e2a857ea6ccc435e95cef9b825205bd3474c3b5dee7c8" as const;
8
8
  export const ContractAiFixturesDigest = "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6" as const;
9
- export const ContractGeneratedGoDigest = "sha256:e61b74f464a07c98fcb02dfa7d62af79cc4634455ade7195602ec0632af9f9ba" as const;
10
- export const ContractGeneratedTypeScriptDigest = "sha256:442a4b31bff9288ca5a2dd4e9fb0eb74945c7abbe6b8a7eede8694ad9c44f1fd" as const;
9
+ export const ContractGeneratedGoDigest = "sha256:3e67916611e03ab198c2d06d1cf87234aa5fca15df7e6f3a658f2b7690fd970c" as const;
10
+ export const ContractGeneratedTypeScriptDigest = "sha256:dcca50e4cd5f629f24371ca42755b7b05fe581d01e69c7e3ebfd2d860fed205a" as const;
@@ -12,7 +12,7 @@ export type DataGrantV2ProvisioningStatus = 'NONE' | 'PENDING' | 'FAILED' | 'DON
12
12
  export type DataGrantV2CleanupStatus = 'PENDING' | 'FAILED' | 'DONE';
13
13
 
14
14
  /**
15
- * An app's integration grant for one connection, environment and identity mode (control table sk APP#<appId>#IGRANT#<environment>#<sourceId>#<mode>; grantId = base64url(JSON ["v2",appId,environment,sourceId,mode])). Additive to the legacy DataGrant (data-grant.schema.json), which is never consulted by v2 paths. A fresh REQUESTED record carries empty `operations`/`resources` until the attached request is approved; approved resources are structured `{name, columns?}` entries (a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias, or a warehouse view alias with its approved columns). Expiry is enforced from UTC time on every call and SDK calls never extend it; `expiredAt` is stamped by the recovery sweep afterwards. Status edges live in x-transitions; DENIED and REVOKED are terminal (a regrant after revocation is a new REQUESTED record once cleanup is DONE). Database grants add credentialRef/mintedPrincipal; both hold references only. An app-mode Slack grant may carry `presentation` (0.53.0): the IT-approved display name and icon the app's posts go out under, copied from the approved request and read by every post — never from the call. `identityMode` and `installation` are the deprecated 0.45.0 spellings: the record carries `mode`, and a SaaS grant runs on the connection's single installation.
15
+ * An app's integration grant for one connection, environment and identity mode (control table sk APP#<appId>#IGRANT#<environment>#<sourceId>#<mode>; grantId = base64url(JSON ["v2",appId,environment,sourceId,mode])). Additive to the legacy DataGrant (data-grant.schema.json), which is never consulted by v2 paths. A fresh REQUESTED record carries empty `operations`/`resources` until the attached request is approved; approved resources are structured `{name, columns?}` entries (a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias, a SharePoint site alias, or a warehouse view alias with its approved columns). Expiry is enforced from UTC time on every call and SDK calls never extend it; `expiredAt` is stamped by the recovery sweep afterwards. Status edges live in x-transitions; DENIED and REVOKED are terminal (a regrant after revocation is a new REQUESTED record once cleanup is DONE). Database grants add credentialRef/mintedPrincipal; both hold references only. An app-mode Slack grant may carry `presentation` (0.53.0): the IT-approved display name and icon the app's posts go out under, copied from the approved request and read by every post — never from the call. `identityMode` and `installation` are the deprecated 0.45.0 spellings: the record carries `mode`, and a SaaS grant runs on the connection's single installation.
16
16
  */
17
17
  export interface DataGrantV2 {
18
18
  schema: 'harbour.data-grant/2.0';
@@ -33,9 +33,9 @@ export interface DataGrantV2 {
33
33
  kind: 'saas' | 'database' | 'service';
34
34
  status: DataGrantV2Status;
35
35
  /**
36
- * Approved operations; each must match this grant's mode. Empty until the first approval. At most the twenty-two SaaS operations (0.76.0: eleven Slack and Gmail, eleven Basecamp); a database grant holds one.
36
+ * Approved operations; each must match this grant's mode. Empty until the first approval. At most the thirty-one SaaS operations (0.78.0: eleven Slack and Gmail, eleven Basecamp, nine SharePoint); a database grant holds one.
37
37
  *
38
- * @maxItems 22
38
+ * @maxItems 31
39
39
  */
40
40
  operations: (
41
41
  | 'slack.channel.history'
@@ -60,6 +60,15 @@ export interface DataGrantV2 {
60
60
  | 'basecamp.comment.post'
61
61
  | 'basecamp.campfire.post'
62
62
  | 'basecamp.people.list'
63
+ | 'sharepoint.list.list'
64
+ | 'sharepoint.item.list'
65
+ | 'sharepoint.item.create'
66
+ | 'sharepoint.item.update'
67
+ | 'sharepoint.drive.list'
68
+ | 'sharepoint.file.list'
69
+ | 'sharepoint.file.search'
70
+ | 'sharepoint.file.read'
71
+ | 'sharepoint.file.upload'
63
72
  | 'warehouse.view.read'
64
73
  | 'service.request'
65
74
  )[];
@@ -111,7 +120,7 @@ export interface DataGrantV2 {
111
120
  installation?: string;
112
121
  }
113
122
  /**
114
- * One approved logical resource: a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias (0.76.0), or a warehouse view alias with the approved columns.
123
+ * One approved logical resource: a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias (0.76.0), a SharePoint site alias (0.78.0), or a warehouse view alias with the approved columns.
115
124
  */
116
125
  export interface IntegrationResource {
117
126
  /**
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * IAM/SigV4 POST /v1/internal/deployment/apps/{appId}/register (Internal API) or POST /v1/deployment/apps/register body. Governance derives tenant identity-provider configuration; no identity secrets are supplied. apiHostnames explicitly identifies API hosts among backendHostnames; runtime validates that subset. Omission preserves legacy .api. inference during the coordinated V2 auth migration.
6
6
  */
7
- export interface DeploymentAppRegistration {
7
+ export type DeploymentAppRegistration = {
8
8
  tenantId: string;
9
9
  appId: string;
10
10
  origin: string;
@@ -18,4 +18,10 @@ export interface DeploymentAppRegistration {
18
18
  allowedGroups?: string[];
19
19
  enabled?: boolean;
20
20
  workloadPrincipalArn?: string;
21
- }
21
+ signIn?: 'company' | 'external';
22
+ /**
23
+ * @minItems 1
24
+ * @maxItems 1
25
+ */
26
+ signInMethods?: ('phone' | 'email')[];
27
+ };
@@ -0,0 +1,32 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+
4
+ export interface ExternalSignIn {
5
+ enabledMethods: ('phone' | 'email')[];
6
+ email?: {
7
+ senderEmail: string;
8
+ senderDomain?: string;
9
+ sesRegion: string;
10
+ configurationSet?: string;
11
+ };
12
+ sms?: {
13
+ originationIdentity?: string;
14
+ region: string;
15
+ inEntityId?: string;
16
+ inTemplateId?: string;
17
+ };
18
+ directory?: {
19
+ accountId: string;
20
+ region: string;
21
+ userPoolId: string;
22
+ };
23
+ readiness?: {
24
+ email?: {
25
+ senderVerified: boolean;
26
+ productionAccess: boolean;
27
+ };
28
+ sms?: {
29
+ sandbox: boolean;
30
+ };
31
+ };
32
+ }
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
+
4
+ export type IdentityContext = {
5
+ iss: string;
6
+ aud: string;
7
+ sub: string;
8
+ tenant: string;
9
+ app: string;
10
+ iat: number;
11
+ exp: number;
12
+ session_id?: string;
13
+ email?: string;
14
+ name?: string;
15
+ phone_number?: string;
16
+ email_verified?: boolean;
17
+ phone_number_verified?: boolean;
18
+ directory?: 'company' | 'external';
19
+ groups?: string[];
20
+ role?: 'builder' | 'member';
21
+ };
package/gen-ts/index.ts CHANGED
@@ -23,6 +23,7 @@ export * from './ai-transform-result.js';
23
23
  export * from './ai-verification-evidence.js';
24
24
  export * from './api-error-response.js';
25
25
  export * from './app-integrations-declaration.js';
26
+ export * from './app-sign-in.js';
26
27
  export * from './artifact-contract.js';
27
28
  export * from './binding-classification-digest-helper.js';
28
29
  export * from './binding-classification-subject.js';
@@ -46,6 +47,8 @@ export * from './env-bindings.js';
46
47
  export * from './error-category-registry.js';
47
48
  export * from './error-category.js';
48
49
  export * from './error-envelope.js';
50
+ export * from './external-sign-in.js';
51
+ export * from './identity-context.js';
49
52
  export * from './integration-connect-result.js';
50
53
  export * from './integration-error-details.js';
51
54
  export * from './integration-execute-input-rules.js';
@@ -16,11 +16,15 @@ export type IntegrationExecuteInputFieldRule =
16
16
  | { kind: 'enum'; required: boolean; values: readonly string[]; default?: string }
17
17
  | { kind: 'object[]'; required: boolean; minItems: number; maxItems: number; fields: Readonly<Record<string, IntegrationExecuteInputFieldRule>> }
18
18
  | { kind: 'value'; required: boolean; types: readonly IntegrationExecuteInputValueType[]; maxLength?: number; list?: { minItems: number; maxItems: number; types: readonly IntegrationExecuteInputValueType[] } }
19
- | { kind: 'boolean'; required: boolean };
19
+ | { kind: 'boolean'; required: boolean }
20
+ | { kind: 'record'; required: boolean; minProperties: number; maxProperties: number; types: readonly IntegrationExecuteInputRecordValueType[]; maxLength?: number };
20
21
 
21
22
  /** The scalar types a `value` input accepts, alone or in its list form. */
22
23
  export type IntegrationExecuteInputValueType = 'string' | 'number' | 'boolean';
23
24
 
25
+ /** The value types a `record` input accepts under each of its keys (0.78.0): a value type or null. */
26
+ export type IntegrationExecuteInputRecordValueType = IntegrationExecuteInputValueType | 'null';
27
+
24
28
  export type IntegrationExecuteOperationRule = { idempotencyKey: boolean; fields: Record<string, IntegrationExecuteInputFieldRule> };
25
29
 
26
30
  export const IntegrationExecuteInputRules = {
@@ -195,6 +199,75 @@ export const IntegrationExecuteInputRules = {
195
199
  pageToken: { kind: "string", required: false, minLength: 1, maxLength: 256 },
196
200
  },
197
201
  },
202
+ "sharepoint.list.list": {
203
+ idempotencyKey: false,
204
+ fields: {
205
+ pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
206
+ },
207
+ },
208
+ "sharepoint.item.list": {
209
+ idempotencyKey: false,
210
+ fields: {
211
+ listId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
212
+ filter: { kind: "string", required: false, minLength: 1, maxLength: 512 },
213
+ pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
214
+ },
215
+ },
216
+ "sharepoint.item.create": {
217
+ idempotencyKey: true,
218
+ fields: {
219
+ listId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
220
+ fields: { kind: "record", required: true, minProperties: 1, maxProperties: 32, types: ["string", "number", "boolean", "null"], maxLength: 4000 },
221
+ },
222
+ },
223
+ "sharepoint.item.update": {
224
+ idempotencyKey: false,
225
+ fields: {
226
+ listId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
227
+ itemId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
228
+ fields: { kind: "record", required: true, minProperties: 1, maxProperties: 32, types: ["string", "number", "boolean", "null"], maxLength: 4000 },
229
+ },
230
+ },
231
+ "sharepoint.drive.list": {
232
+ idempotencyKey: false,
233
+ fields: {
234
+ pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
235
+ },
236
+ },
237
+ "sharepoint.file.list": {
238
+ idempotencyKey: false,
239
+ fields: {
240
+ driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
241
+ folderId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
242
+ pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
243
+ },
244
+ },
245
+ "sharepoint.file.search": {
246
+ idempotencyKey: false,
247
+ fields: {
248
+ q: { kind: "string", required: true, minLength: 1, maxLength: 256 },
249
+ driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
250
+ pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
251
+ },
252
+ },
253
+ "sharepoint.file.read": {
254
+ idempotencyKey: false,
255
+ fields: {
256
+ fileId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
257
+ driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
258
+ },
259
+ },
260
+ "sharepoint.file.upload": {
261
+ idempotencyKey: true,
262
+ fields: {
263
+ filename: { kind: "string", required: true, minLength: 1, maxLength: 255 },
264
+ contentType: { kind: "string", required: true, minLength: 1, maxLength: 128 },
265
+ dataBase64: { kind: "string", required: true, minLength: 1, maxLength: 2796203 },
266
+ driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
267
+ folderId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
268
+ conflict: { kind: "enum", required: false, values: ["rename", "replace", "fail"], default: "rename" },
269
+ },
270
+ },
198
271
  "warehouse.view.read": {
199
272
  idempotencyKey: false,
200
273
  fields: {
@@ -252,15 +325,19 @@ function matches(pattern: string, value: string): boolean {
252
325
  type Refusal = { ok: false; problem: IntegrationExecuteInputProblem };
253
326
  function refuse(field: string, message: string): Refusal { return { ok: false, problem: { field, message } }; }
254
327
 
255
- const valueNouns = { string: ['a string', 'strings'], number: ['a number', 'numbers'], boolean: ['a boolean', 'booleans'] } as const;
328
+ const valueNouns = { string: ['a string', 'strings'], number: ['a number', 'numbers'], boolean: ['a boolean', 'booleans'], null: ['null', 'nulls'] } as const;
256
329
  function either(parts: readonly string[]): string {
257
330
  return parts.length > 1 ? `${parts.slice(0, -1).join(', ')} or ${parts[parts.length - 1]}` : parts.join('');
258
331
  }
259
- function isScalar(types: readonly IntegrationExecuteInputValueType[], maxLength: number | undefined, value: unknown): boolean {
332
+ function isScalar(types: readonly IntegrationExecuteInputRecordValueType[], maxLength: number | undefined, value: unknown): boolean {
333
+ if (value === null) return types.includes('null');
260
334
  if (typeof value === 'string') return types.includes('string') && (maxLength === undefined || value.length <= maxLength);
261
335
  if (typeof value === 'number') return types.includes('number') && Number.isFinite(value);
262
336
  return typeof value === 'boolean' && types.includes('boolean');
263
337
  }
338
+ function scalarShapes(types: readonly IntegrationExecuteInputRecordValueType[], maxLength: number | undefined): string[] {
339
+ return types.map(type => (type === 'string' && maxLength !== undefined ? `a string of at most ${maxLength} characters` : valueNouns[type][0]));
340
+ }
264
341
 
265
342
  /**
266
343
  * Checks one object's fields in rule order and applies defaults: the input
@@ -294,6 +371,15 @@ function checkField(operation: string, path: string, name: string, field: Integr
294
371
  case 'boolean':
295
372
  if (typeof value !== 'boolean') return refuse(path, `${path} must be a boolean`);
296
373
  return { ok: true, value };
374
+ case 'record': {
375
+ if (value === null || typeof value !== 'object' || Array.isArray(value)) return refuse(path, `${path} must be a JSON object`);
376
+ const keys = Object.keys(value);
377
+ if (keys.length < field.minProperties || keys.length > field.maxProperties) return refuse(path, `${path} must have ${field.minProperties} to ${field.maxProperties} properties`);
378
+ for (const key of keys) {
379
+ if (!isScalar(field.types, field.maxLength, (value as Record<string, unknown>)[key])) return refuse(`${path}.${key}`, `${path}.${key} must be ${either(scalarShapes(field.types, field.maxLength))}`);
380
+ }
381
+ return { ok: true, value };
382
+ }
297
383
  case 'integer':
298
384
  if (typeof value !== 'number' || !Number.isInteger(value) || value < field.minimum || value > field.maximum) return refuse(path, `${path} must be an integer between ${field.minimum} and ${field.maximum}`);
299
385
  return { ok: true, value };
@@ -328,7 +414,7 @@ function checkField(operation: string, path: string, name: string, field: Integr
328
414
  case 'value': {
329
415
  const { types, maxLength, list } = field;
330
416
  if (isScalar(types, maxLength, value) || (list !== undefined && Array.isArray(value) && value.length >= list.minItems && value.length <= list.maxItems && value.every(item => isScalar(list.types, maxLength, item)))) return { ok: true, value };
331
- const shapes = types.map(type => (type === 'string' && maxLength !== undefined ? `a string of at most ${maxLength} characters` : valueNouns[type][0]));
417
+ const shapes = scalarShapes(types, maxLength);
332
418
  if (list !== undefined) shapes.push(`a list of ${list.minItems} to ${list.maxItems} ${either(list.types.map(type => valueNouns[type][1]))}`);
333
419
  return refuse(path, `${path} must be ${either(shapes)}`);
334
420
  }
@@ -2,7 +2,7 @@
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
3
 
4
4
  /**
5
- * Body of POST /_harbour/integrations/execute (app SDK), forwarded unchanged to the governance development and runtime execute routes. Exactly one declared operation against one declared resource. The identity mode is fixed by the operation for every operation but the declared-mode Slack operations (slack.channel.history, slack.message.post, slack.message.update, slack.message.delete; 0.71.0 widened history), and always enforced from an approved grant; any identity/userId/scope field is rejected by additionalProperties. A declared-mode operation runs as the app (for a post: the IT-approved per-app name from the grant, plus a "Posted by <app> on Isomorph" footer) or as the signed-in person (no name, no footer) — the same input either way — and since 0.55.0 the call names which of the app's approved modes it runs under (`mode`): required when IT approved both modes for the app (MODE_REQUIRED otherwise), optional when it approved one (that one is used), and a named mode without an approved grant is refused (MODE_NOT_GRANTED) rather than served under the other, so approval order never decides what a call does. Per-operation input bounds (0.71.0, ADR 0018): slack.channel.history {limit? 1..100, default 15, cursor?, oldest?, latest?}; slack.message.post {text 1..4000 chars, threadId?, format? plain|mrkdwn} and a required idempotencyKey retained across retries of one explicit Send; slack.message.update {messageId, text, format?}; slack.message.delete {messageId}; slack.dm.send {to 1..8 addresses, text, format?} (app mode only) with a required idempotencyKey; slack.user.lookup {email}; gmail.thread.list {limit? 1..50, default 15, q?, labelIds? default [INBOX], pageToken?}; gmail.thread.read {threadId}; gmail.message.read {messageId}; gmail.attachment.read {messageId, attachmentId}; gmail.message.send {to 1..50 addresses (to+cc+bcc <= 50 in total), cc?, bcc?, subject 1..256 chars, text 1..4000 chars, html? <= 64 KiB, attachments? 1..5 of <= 2 MiB each as base64, replyToMessageId?} and a required idempotencyKey like slack.message.post; warehouse.view.read {columns? 1..32, where? 1..16 filters, groupBy? 1..8 columns, aggregates? 1..16, orderBy? 1..8, limit? 1..1000, default 100} (0.70.0: a plain read names columns, an aggregate read names aggregates and optionally groupBy; the cross-field rules — exactly one of columns or aggregates, groupBy needs aggregates, a filter value that fits its op, orderBy naming a returned column, every named column approved — are enforced by governance, not expressible here; ADR 0017). Basecamp (0.76.0, ADR 0022; every id a string of 1..20 digits, every operation user mode): basecamp.project.list {pageToken?, projectStatus? active|archived} on the fixed `account` alias; on a project alias basecamp.todolist.list {pageToken?}; basecamp.todo.list {todolistId, completed?, pageToken?}; basecamp.todo.create {todolistId, content 1..1000 (the to-do title), description? <= 16384, contentFormat? plain|html, dueOn? YYYY-MM-DD, assigneeIds? 1..20, notify?} with a required idempotencyKey; basecamp.todo.complete {todoId} (idempotent at Basecamp, so no key); basecamp.message.list {pageToken?}; basecamp.message.post {subject 1..256, content 1..65536, contentFormat?} with a required idempotencyKey; basecamp.comment.list {recordingId, pageToken?}; basecamp.comment.post {recordingId, content 1..16384, contentFormat?} with a required idempotencyKey; basecamp.campfire.post {content 1..4000, contentFormat?} with a required idempotencyKey; basecamp.people.list {pageToken?}. `pageToken` is the previous page's `nextPageToken` (a Basecamp page number as digits). Each operation's then-block is the one statement of its input rules: propertyNames.enum names the fields it accepts, required the ones it needs, and per-field overrides (maximum, default) narrow the shared property. Codegen derives IntegrationExecuteInputRules and validateIntegrationExecuteInput (gen-ts/integration-execute-input-rules.ts, gen-go/integration_execute_input_rules.go) from exactly these blocks, so the governance execute route, the app SDK and the kit's local check refuse the same request with the same message. Transport limits (not expressible here): request <= 16 KiB except a gmail.message.send carrying attachments (governance sizes that route for the attachment bound) and a basecamp.message.post (its 64 KiB body; governance allows 80 KiB there), total deadline 10 s.
5
+ * Body of POST /_harbour/integrations/execute (app SDK), forwarded unchanged to the governance development and runtime execute routes. Exactly one declared operation against one declared resource. The identity mode is fixed by the operation for every operation but the declared-mode Slack operations (slack.channel.history, slack.message.post, slack.message.update, slack.message.delete; 0.71.0 widened history), and always enforced from an approved grant; any identity/userId/scope field is rejected by additionalProperties. A declared-mode operation runs as the app (for a post: the IT-approved per-app name from the grant, plus a "Posted by <app> on Isomorph" footer) or as the signed-in person (no name, no footer) — the same input either way — and since 0.55.0 the call names which of the app's approved modes it runs under (`mode`): required when IT approved both modes for the app (MODE_REQUIRED otherwise), optional when it approved one (that one is used), and a named mode without an approved grant is refused (MODE_NOT_GRANTED) rather than served under the other, so approval order never decides what a call does. Per-operation input bounds (0.71.0, ADR 0018): slack.channel.history {limit? 1..100, default 15, cursor?, oldest?, latest?}; slack.message.post {text 1..4000 chars, threadId?, format? plain|mrkdwn} and a required idempotencyKey retained across retries of one explicit Send; slack.message.update {messageId, text, format?}; slack.message.delete {messageId}; slack.dm.send {to 1..8 addresses, text, format?} (app mode only) with a required idempotencyKey; slack.user.lookup {email}; gmail.thread.list {limit? 1..50, default 15, q?, labelIds? default [INBOX], pageToken?}; gmail.thread.read {threadId}; gmail.message.read {messageId}; gmail.attachment.read {messageId, attachmentId}; gmail.message.send {to 1..50 addresses (to+cc+bcc <= 50 in total), cc?, bcc?, subject 1..256 chars, text 1..4000 chars, html? <= 64 KiB, attachments? 1..5 of <= 2 MiB each as base64, replyToMessageId?} and a required idempotencyKey like slack.message.post; warehouse.view.read {columns? 1..32, where? 1..16 filters, groupBy? 1..8 columns, aggregates? 1..16, orderBy? 1..8, limit? 1..1000, default 100} (0.70.0: a plain read names columns, an aggregate read names aggregates and optionally groupBy; the cross-field rules — exactly one of columns or aggregates, groupBy needs aggregates, a filter value that fits its op, orderBy naming a returned column, every named column approved — are enforced by governance, not expressible here; ADR 0017). Basecamp (0.76.0, ADR 0022; every id a string of 1..20 digits, every operation user mode): basecamp.project.list {pageToken?, projectStatus? active|archived} on the fixed `account` alias; on a project alias basecamp.todolist.list {pageToken?}; basecamp.todo.list {todolistId, completed?, pageToken?}; basecamp.todo.create {todolistId, content 1..1000 (the to-do title), description? <= 16384, contentFormat? plain|html, dueOn? YYYY-MM-DD, assigneeIds? 1..20, notify?} with a required idempotencyKey; basecamp.todo.complete {todoId} (idempotent at Basecamp, so no key); basecamp.message.list {pageToken?}; basecamp.message.post {subject 1..256, content 1..65536, contentFormat?} with a required idempotencyKey; basecamp.comment.list {recordingId, pageToken?}; basecamp.comment.post {recordingId, content 1..16384, contentFormat?} with a required idempotencyKey; basecamp.campfire.post {content 1..4000, contentFormat?} with a required idempotencyKey; basecamp.people.list {pageToken?}. `pageToken` is the previous page's `nextPageToken` (a Basecamp page number as digits). SharePoint (0.78.0, ADR 0024; every id a Microsoft Graph id — GraphId, 1..256 characters — every operation user mode on a site alias): sharepoint.list.list {pageToken?}; sharepoint.item.list {listId, filter? 1..512 (an OData filter on `fields/...`), pageToken?}; sharepoint.item.create {listId, fields (1..32 columns, each a string <= 4000, a number, a boolean or null)} with a required idempotencyKey; sharepoint.item.update {listId, itemId, fields} (a PATCH, idempotent at Graph, so no key); sharepoint.drive.list {pageToken?}; sharepoint.file.list {driveId?, folderId?, pageToken?} (no driveId: the site's default drive; no folderId: its root); sharepoint.file.search {q 1..256, driveId?, pageToken?}; sharepoint.file.read {fileId, driveId?}; sharepoint.file.upload {filename 1..255, contentType, dataBase64 <= 2 MiB, driveId?, folderId?, conflict? rename|replace|fail} with a required idempotencyKey. A SharePoint `pageToken` is Graph's `$skiptoken` (up to 2048 characters; the shared field is that wide, the Gmail and Basecamp operations narrow it back to 256). Each operation's then-block is the one statement of its input rules: propertyNames.enum names the fields it accepts, required the ones it needs, and per-field overrides (maximum, default) narrow the shared property. Codegen derives IntegrationExecuteInputRules and validateIntegrationExecuteInput (gen-ts/integration-execute-input-rules.ts, gen-go/integration_execute_input_rules.go) from exactly these blocks, so the governance execute route, the app SDK and the kit's local check refuse the same request with the same message. Transport limits (not expressible here): request <= 16 KiB except a gmail.message.send carrying attachments (governance sizes that route for the attachment bound) and a basecamp.message.post (its 64 KiB body; governance allows 80 KiB there) and a sharepoint.file.upload (its 2 MiB file as base64; governance sizes it like the Gmail attachment route), total deadline 10 s.
6
6
  */
7
7
  export type IntegrationExecuteRequest = {
8
8
  /**
@@ -10,7 +10,7 @@ export type IntegrationExecuteRequest = {
10
10
  */
11
11
  connection: string;
12
12
  /**
13
- * 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.
13
+ * 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.
14
14
  */
15
15
  operation:
16
16
  | 'slack.channel.history'
@@ -35,6 +35,15 @@ export type IntegrationExecuteRequest = {
35
35
  | 'basecamp.comment.post'
36
36
  | 'basecamp.campfire.post'
37
37
  | 'basecamp.people.list'
38
+ | 'sharepoint.list.list'
39
+ | 'sharepoint.item.list'
40
+ | 'sharepoint.item.create'
41
+ | 'sharepoint.item.update'
42
+ | 'sharepoint.drive.list'
43
+ | 'sharepoint.file.list'
44
+ | 'sharepoint.file.search'
45
+ | 'sharepoint.file.read'
46
+ | 'sharepoint.file.upload'
38
47
  | 'warehouse.view.read'
39
48
  | 'service.request';
40
49
  /**
@@ -79,7 +88,7 @@ export type IntegrationExecuteRequest = {
79
88
  */
80
89
  latest?: string;
81
90
  /**
82
- * gmail.thread.list (0.71.0): a Gmail search query (the search-box syntax, e.g. `from:jane newer_than:7d`).
91
+ * gmail.thread.list (0.71.0): a Gmail search query (the search-box syntax, e.g. `from:jane newer_than:7d`). sharepoint.file.search (0.78.0): the words to search a drive's file names and contents for.
83
92
  */
84
93
  q?: string;
85
94
  /**
@@ -90,7 +99,7 @@ export type IntegrationExecuteRequest = {
90
99
  */
91
100
  labelIds?: string[];
92
101
  /**
93
- * gmail.thread.list (0.71.0) and every basecamp.*.list operation (0.76.0): the `nextPageToken` of the previous page; absent reads the first page.
102
+ * gmail.thread.list (0.71.0), every basecamp.*.list operation (0.76.0) and the paged sharepoint.* reads (0.78.0: list.list, item.list, drive.list, file.list, file.search): the `nextPageToken` of the previous page; absent reads the first page. At most 2048 characters for a Graph `$skiptoken`; the Gmail and Basecamp operations narrow it to 256.
94
103
  */
95
104
  pageToken?: string;
96
105
  /**
@@ -166,6 +175,52 @@ export type IntegrationExecuteRequest = {
166
175
  * basecamp.project.list (0.76.0): which projects to list; active when absent.
167
176
  */
168
177
  projectStatus?: 'active' | 'archived';
178
+ /**
179
+ * sharepoint.item.list / sharepoint.item.create / sharepoint.item.update (0.78.0): the SharePoint list, as a sharepoint.list.list result named it.
180
+ */
181
+ listId?: string;
182
+ /**
183
+ * sharepoint.item.update (0.78.0): the list item, as a sharepoint.item.list or sharepoint.item.create result named it.
184
+ */
185
+ itemId?: string;
186
+ /**
187
+ * sharepoint.file.list / sharepoint.file.search / sharepoint.file.read / sharepoint.file.upload (0.78.0): the document library, as a sharepoint.drive.list result named it; absent means the site's default drive (its Documents library).
188
+ */
189
+ driveId?: string;
190
+ /**
191
+ * sharepoint.file.list / sharepoint.file.upload (0.78.0): the folder to list or upload into, as a sharepoint.file.list result named it (an entry with isFolder); absent means the drive's root.
192
+ */
193
+ folderId?: string;
194
+ /**
195
+ * sharepoint.file.read (0.78.0): the file, as a sharepoint.file.list, sharepoint.file.search or sharepoint.file.upload result named it.
196
+ */
197
+ fileId?: string;
198
+ /**
199
+ * sharepoint.item.create / sharepoint.item.update (0.78.0): the item's column values keyed by the column's internal name (`Title`, `Status`, `DueDate`...), 1..32 of them; each a string of at most 4000 characters, a number, a boolean or null (which clears the column on an update). Which columns the list has, and whether a value fits its column type, is Graph's check.
200
+ */
201
+ fields?: {
202
+ [k: string]: string | number | boolean | null;
203
+ };
204
+ /**
205
+ * sharepoint.item.list (0.78.0): an OData `$filter` over the item's columns as `fields/<column> <op> <value>`, e.g. `fields/Status eq 'Open'`; absent lists every item. A filter on a column SharePoint has not indexed may be refused by Graph on a large list.
206
+ */
207
+ filter?: string;
208
+ /**
209
+ * sharepoint.file.upload (0.78.0): what happens when a file of that name already exists in the folder; rename when absent.
210
+ */
211
+ conflict?: 'rename' | 'replace' | 'fail';
212
+ /**
213
+ * sharepoint.file.upload (0.78.0): the name the file is stored under (the result's `filename` is the stored name, which `conflict` rename may have changed).
214
+ */
215
+ filename?: string;
216
+ /**
217
+ * sharepoint.file.upload (0.78.0): the file's MIME type, e.g. application/pdf.
218
+ */
219
+ contentType?: string;
220
+ /**
221
+ * sharepoint.file.upload (0.78.0): the file bytes, standard base64, at most 2 MiB of bytes (2,796,203 base64 characters) — the Gmail attachment bound.
222
+ */
223
+ dataBase64?: string;
169
224
  /**
170
225
  * warehouse.view.read, a plain read: explicit columns, or `*` alone when the app's approved resource grant allows all current and future columns. An aggregate read names aggregates instead.
171
226
  *
@@ -217,7 +272,7 @@ export type IntegrationExecuteRequest = {
217
272
  };
218
273
  };
219
274
  /**
220
- * UUID of one explicit Send action; required for the sends (slack.message.post, slack.dm.send, gmail.message.send) and the receipted Basecamp writes (basecamp.todo.create, basecamp.message.post, basecamp.comment.post, basecamp.campfire.post; 0.76.0), refused everywhere else. The same key with the same payload and subject returns the recorded outcome for seven days.
275
+ * UUID of one explicit Send action; required for the sends (slack.message.post, slack.dm.send, gmail.message.send), the receipted Basecamp writes (basecamp.todo.create, basecamp.message.post, basecamp.comment.post, basecamp.campfire.post; 0.76.0) and the receipted SharePoint writes (sharepoint.item.create, sharepoint.file.upload; 0.78.0), refused everywhere else. The same key with the same payload and subject returns the recorded outcome for seven days.
221
276
  */
222
277
  idempotencyKey?: string;
223
278
  /**
@@ -2,7 +2,7 @@
2
2
  // Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
3
3
 
4
4
  /**
5
- * The `data` member of a successful execute response `{data, requestId}`; the SDK unwraps `data`. Exactly one of the operation results (twenty-four operations since 0.76.0, ADR 0018 and ADR 0022): slack.channel.history -> {messages, hasMore, nextCursor?} (plain text/IDs/time, plus the display name and emoji icon a per-app-named app post carries — authorName/authorIcon, 0.55.0 — never the provider payload; `nextCursor` when hasMore, to pass as the next read's `cursor`); slack.message.post, slack.message.update, slack.message.delete -> {messageId} (the Slack ts); slack.dm.send -> {messageId, channelId} (the ts and the DM channel it went to); slack.user.lookup -> {userId, displayName}; gmail.thread.list -> {threads, hasMore, nextPageToken?} (newest matching threads; each `messageId` is the thread's newest message, what gmail.message.read takes; `nextPageToken` when hasMore); gmail.thread.read -> {id, emails} (every message of the thread, oldest first, each shaped like a gmail.message.read result); gmail.message.read -> {id, threadId, subject, from, to, date, text, truncated, attachments?} (headers plus the plain text with html stripped, cut at 16 KiB with `truncated` set; `attachments` lists the files without their bytes, which gmail.attachment.read fetches by id); gmail.attachment.read -> {filename, mimeType, size, dataBase64}; gmail.message.send -> {messageId, threadId} (the Gmail ids of the sent message and its thread); warehouse.view.read -> {rows, truncated} (rows keyed by the selected columns, or for an aggregate read by the groupBy columns then the aggregate aliases; decimal/64-bit values as strings, dates as ISO strings; since 0.70.0 every server sends `truncated`, true when more rows matched than `limit` — the server reads limit+1 rows to know — so the rows are incomplete and must not be totalled or averaged; a server before 0.70.0 omitted it). Basecamp (0.76.0, ADR 0022; every id a string of digits, every page at most 100 items, `nextPageToken` only when hasMore, text cut at 16 KiB like Gmail): basecamp.project.list -> {projects, hasMore, nextPageToken?}; basecamp.todolist.list -> {todolists, hasMore, nextPageToken?}; basecamp.todo.list -> {todos, hasMore, nextPageToken?}; basecamp.message.list -> {boardMessages, hasMore, nextPageToken?} (`boardMessages`, not `messages`, which is the Slack history shape); basecamp.comment.list -> {comments, hasMore, nextPageToken?}; basecamp.people.list -> {people, hasMore, nextPageToken?}; basecamp.todo.create, basecamp.message.post, basecamp.comment.post, basecamp.campfire.post -> {id, appUrl} (the new recording and its Basecamp page); basecamp.todo.complete -> {id, completed} with completed always true. An unknown send outcome is never a result; it is an error with details.code SEND_OUTCOME_UNKNOWN. A whole result over 1 MiB is rejected, never cut down to fit — except a gmail.attachment.read, whose single attachment is bounded by its own 2 MiB.
5
+ * The `data` member of a successful execute response `{data, requestId}`; the SDK unwraps `data`. Exactly one of the operation results (thirty-three operations since 0.78.0, ADR 0018, ADR 0022 and ADR 0024): slack.channel.history -> {messages, hasMore, nextCursor?} (plain text/IDs/time, plus the display name and emoji icon a per-app-named app post carries — authorName/authorIcon, 0.55.0 — never the provider payload; `nextCursor` when hasMore, to pass as the next read's `cursor`); slack.message.post, slack.message.update, slack.message.delete -> {messageId} (the Slack ts); slack.dm.send -> {messageId, channelId} (the ts and the DM channel it went to); slack.user.lookup -> {userId, displayName}; gmail.thread.list -> {threads, hasMore, nextPageToken?} (newest matching threads; each `messageId` is the thread's newest message, what gmail.message.read takes; `nextPageToken` when hasMore); gmail.thread.read -> {id, emails} (every message of the thread, oldest first, each shaped like a gmail.message.read result); gmail.message.read -> {id, threadId, subject, from, to, date, text, truncated, attachments?} (headers plus the plain text with html stripped, cut at 16 KiB with `truncated` set; `attachments` lists the files without their bytes, which gmail.attachment.read fetches by id); gmail.attachment.read -> {filename, mimeType, size, dataBase64}; gmail.message.send -> {messageId, threadId} (the Gmail ids of the sent message and its thread); warehouse.view.read -> {rows, truncated} (rows keyed by the selected columns, or for an aggregate read by the groupBy columns then the aggregate aliases; decimal/64-bit values as strings, dates as ISO strings; since 0.70.0 every server sends `truncated`, true when more rows matched than `limit` — the server reads limit+1 rows to know — so the rows are incomplete and must not be totalled or averaged; a server before 0.70.0 omitted it). Basecamp (0.76.0, ADR 0022; every id a string of digits, every page at most 100 items, `nextPageToken` only when hasMore, text cut at 16 KiB like Gmail): basecamp.project.list -> {projects, hasMore, nextPageToken?}; basecamp.todolist.list -> {todolists, hasMore, nextPageToken?}; basecamp.todo.list -> {todos, hasMore, nextPageToken?}; basecamp.message.list -> {boardMessages, hasMore, nextPageToken?} (`boardMessages`, not `messages`, which is the Slack history shape); basecamp.comment.list -> {comments, hasMore, nextPageToken?}; basecamp.people.list -> {people, hasMore, nextPageToken?}; basecamp.todo.create, basecamp.message.post, basecamp.comment.post, basecamp.campfire.post -> {id, appUrl} (the new recording and its Basecamp page); basecamp.todo.complete -> {id, completed} with completed always true. SharePoint (0.78.0, ADR 0024; every id a Microsoft Graph id, `nextPageToken` only when hasMore and up to 2048 characters for a Graph `$skiptoken`): sharepoint.list.list -> {lists, hasMore, nextPageToken?} (at most 100, hidden lists dropped); sharepoint.item.list -> {items, hasMore, nextPageToken?} (at most 50; each item's `fields` are the column values as Graph returns them with the system columns dropped, the whole object cut at 16 KiB); sharepoint.drive.list -> {drives, hasMore, nextPageToken?}; sharepoint.file.list and sharepoint.file.search -> {files, hasMore, nextPageToken?} (at most 100 entries, folders included with isFolder); sharepoint.file.read -> {id, filename, mimeType, size, dataBase64} (the Gmail attachment shape plus the file's id; at most 2 MiB of bytes); sharepoint.item.create -> {id, webUrl} (the new item and its SharePoint page); sharepoint.item.update -> {id}; sharepoint.file.upload -> {id, filename, webUrl} (the stored file, under the name `conflict` rename may have given it). An unknown send outcome is never a result; it is an error with details.code SEND_OUTCOME_UNKNOWN. A whole result over 1 MiB is rejected, never cut down to fit — except a gmail.attachment.read or a sharepoint.file.read, whose single file is bounded by its own 2 MiB.
6
6
  */
7
7
  export type IntegrationExecuteResult = {
8
8
  /**
@@ -32,9 +32,12 @@ export type IntegrationExecuteResult = {
32
32
  */
33
33
  threads?: GmailThread[];
34
34
  /**
35
- * gmail.thread.list (0.71.0): the token of the next page, present only when hasMore.
35
+ * gmail.thread.list (0.71.0), the basecamp.* lists (0.76.0) and the paged sharepoint.* reads (0.78.0): the token of the next page, present only when hasMore; up to 2048 characters since 0.78.0 for a Graph $skiptoken.
36
36
  */
37
37
  nextPageToken?: string;
38
+ /**
39
+ * gmail.thread.read / gmail.message.read: the Gmail id; the Basecamp writes and complete (0.76.0): the recording's id; the SharePoint writes and sharepoint.file.read (0.78.0): the Graph id of the item or file (up to 256 characters since 0.78.0, the GraphId bound).
40
+ */
38
41
  id?: string;
39
42
  threadId?: string;
40
43
  subject?: string;
@@ -122,6 +125,34 @@ export type IntegrationExecuteResult = {
122
125
  * basecamp.todo.complete (0.76.0): always true; the to-do is complete whether this call or an earlier one completed it.
123
126
  */
124
127
  completed?: boolean;
128
+ /**
129
+ * sharepoint.list.list (0.78.0): one page of the site's lists the signed-in person can see, hidden lists dropped.
130
+ *
131
+ * @maxItems 100
132
+ */
133
+ lists?: SharePointList[];
134
+ /**
135
+ * sharepoint.item.list (0.78.0): one page of the list's items (Graph pages of 50), filtered when the read said `filter`.
136
+ *
137
+ * @maxItems 50
138
+ */
139
+ items?: SharePointListItem[];
140
+ /**
141
+ * sharepoint.drive.list (0.78.0): one page of the site's document libraries.
142
+ *
143
+ * @maxItems 100
144
+ */
145
+ drives?: SharePointDrive[];
146
+ /**
147
+ * sharepoint.file.list / sharepoint.file.search (0.78.0): one page of a folder's entries (files and folders) or of the files matching the search.
148
+ *
149
+ * @maxItems 100
150
+ */
151
+ files?: SharePointFile[];
152
+ /**
153
+ * sharepoint.item.create / sharepoint.file.upload (0.78.0): the SharePoint page of the new item or file, for a person to open.
154
+ */
155
+ webUrl?: string;
125
156
  status?: number;
126
157
  headers?: {
127
158
  [k: string]: string;
@@ -296,3 +327,60 @@ export interface BasecampPerson {
296
327
  */
297
328
  admin: boolean;
298
329
  }
330
+ /**
331
+ * One list of a sharepoint.list.list result (0.78.0); `id` is what sharepoint.item.list, sharepoint.item.create and sharepoint.item.update take as `listId`. `template` is the list template Graph reports (genericList, documentLibrary, tasks, events...) when it does.
332
+ */
333
+ export interface SharePointList {
334
+ /**
335
+ * A Microsoft Graph id (0.78.0): a SharePoint list (a GUID), list item (digits), drive (`b!...`) or drive item, as Graph names it — opaque, 1..256 characters of letters, digits and `!._,=-`. How every sharepoint.* result names one and every sharepoint.* input takes one back.
336
+ */
337
+ id: string;
338
+ name: string;
339
+ description?: string;
340
+ webUrl: string;
341
+ template?: string;
342
+ }
343
+ /**
344
+ * One item of a sharepoint.item.list result (0.78.0): `fields` are its column values keyed by internal column name, as Graph returns them with the system columns (@odata.etag, ContentType, Attachments, Edit, LinkTitle*, ItemChildCount, FolderChildCount, _UIVersionString, _ComplianceFlags...) dropped and the whole object cut at 16 KiB; `id` is what sharepoint.item.update takes as `itemId`.
345
+ */
346
+ export interface SharePointListItem {
347
+ /**
348
+ * A Microsoft Graph id (0.78.0): a SharePoint list (a GUID), list item (digits), drive (`b!...`) or drive item, as Graph names it — opaque, 1..256 characters of letters, digits and `!._,=-`. How every sharepoint.* result names one and every sharepoint.* input takes one back.
349
+ */
350
+ id: string;
351
+ /**
352
+ * Column values as Graph returns them (strings, numbers, booleans, and lookup or person values as Graph shapes them).
353
+ */
354
+ fields: {
355
+ [k: string]: unknown;
356
+ };
357
+ webUrl: string;
358
+ createdAt: string;
359
+ modifiedAt: string;
360
+ }
361
+ /**
362
+ * One document library of a sharepoint.drive.list result (0.78.0); `id` is what the sharepoint.file.* operations take as `driveId`.
363
+ */
364
+ export interface SharePointDrive {
365
+ /**
366
+ * A Microsoft Graph id (0.78.0): a SharePoint list (a GUID), list item (digits), drive (`b!...`) or drive item, as Graph names it — opaque, 1..256 characters of letters, digits and `!._,=-`. How every sharepoint.* result names one and every sharepoint.* input takes one back.
367
+ */
368
+ id: string;
369
+ name: string;
370
+ webUrl: string;
371
+ }
372
+ /**
373
+ * One entry of a sharepoint.file.list or sharepoint.file.search result (0.78.0): a file (`mimeType` set, `id` is what sharepoint.file.read takes as `fileId`) or a folder (`isFolder`, `id` is what sharepoint.file.list and sharepoint.file.upload take as `folderId`). `size` is in bytes; a folder's is the total of its contents.
374
+ */
375
+ export interface SharePointFile {
376
+ /**
377
+ * A Microsoft Graph id (0.78.0): a SharePoint list (a GUID), list item (digits), drive (`b!...`) or drive item, as Graph names it — opaque, 1..256 characters of letters, digits and `!._,=-`. How every sharepoint.* result names one and every sharepoint.* input takes one back.
378
+ */
379
+ id: string;
380
+ name: string;
381
+ isFolder: boolean;
382
+ size: number;
383
+ mimeType?: string;
384
+ webUrl: string;
385
+ modifiedAt: string;
386
+ }