@fourier-labs/harbour-contracts 0.80.0 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/contract-release.json +22 -22
- package/dist/gen-ts/app-integrations-declaration.d.ts +7 -0
- package/dist/gen-ts/contract-release.d.ts +6 -6
- package/dist/gen-ts/contract-release.js +6 -6
- package/dist/gen-ts/data-grant-v2.d.ts +5 -5
- package/dist/gen-ts/integration-execute-input-rules.d.ts +45 -0
- package/dist/gen-ts/integration-execute-input-rules.js +41 -9
- package/dist/gen-ts/integration-execute-request.d.ts +20 -3
- package/dist/gen-ts/integration-operations.d.ts +21 -0
- package/dist/gen-ts/integration-operations.js +27 -0
- package/dist/gen-ts/resolved-app-serving.d.ts +10 -0
- package/dist/gen-ts/saas-connection.d.ts +7 -7
- package/gen-ts/app-integrations-declaration.ts +7 -0
- package/gen-ts/contract-release.ts +6 -6
- package/gen-ts/data-grant-v2.ts +7 -4
- package/gen-ts/integration-execute-input-rules.ts +38 -7
- package/gen-ts/integration-execute-request.ts +22 -2
- package/gen-ts/integration-operations.ts +27 -0
- package/gen-ts/resolved-app-serving.ts +10 -0
- package/gen-ts/saas-connection.ts +9 -6
- package/package.json +1 -1
- package/schema/app-integrations-declaration.schema.json +82 -1
- package/schema/data-grant-v2.schema.json +4 -4
- package/schema/integration-execute-request.schema.json +159 -1
- package/schema/resolved-app-serving.schema.json +11 -0
- package/schema/saas-connection.schema.json +22 -7
package/gen-ts/data-grant-v2.ts
CHANGED
|
@@ -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 thirty-
|
|
36
|
+
* Approved operations; each must match this grant's mode. Empty until the first approval. At most the thirty-three SaaS operations (0.83.0: eleven Slack and Gmail, eleven Basecamp, nine SharePoint, two phone); a database grant holds up to two (warehouse.view.read, warehouse.table.append).
|
|
37
37
|
*
|
|
38
|
-
* @maxItems
|
|
38
|
+
* @maxItems 33
|
|
39
39
|
*/
|
|
40
40
|
operations: (
|
|
41
41
|
| 'slack.channel.history'
|
|
@@ -69,7 +69,10 @@ export interface DataGrantV2 {
|
|
|
69
69
|
| 'sharepoint.file.search'
|
|
70
70
|
| 'sharepoint.file.read'
|
|
71
71
|
| 'sharepoint.file.upload'
|
|
72
|
+
| 'phone.sms.list'
|
|
73
|
+
| 'phone.number.get'
|
|
72
74
|
| 'warehouse.view.read'
|
|
75
|
+
| 'warehouse.table.append'
|
|
73
76
|
| 'service.request'
|
|
74
77
|
)[];
|
|
75
78
|
/**
|
|
@@ -120,7 +123,7 @@ export interface DataGrantV2 {
|
|
|
120
123
|
installation?: string;
|
|
121
124
|
}
|
|
122
125
|
/**
|
|
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.
|
|
126
|
+
* 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), a phone number alias (0.82.0), or a warehouse view alias with the approved columns.
|
|
124
127
|
*/
|
|
125
128
|
export interface IntegrationResource {
|
|
126
129
|
/**
|
|
@@ -128,7 +131,7 @@ export interface IntegrationResource {
|
|
|
128
131
|
*/
|
|
129
132
|
name: string;
|
|
130
133
|
/**
|
|
131
|
-
* warehouse.view.read only: the approved columns of the view.
|
|
134
|
+
* warehouse.view.read and warehouse.table.append only: the approved columns of the view.
|
|
132
135
|
*
|
|
133
136
|
* @minItems 1
|
|
134
137
|
* @maxItems 32
|
|
@@ -17,7 +17,8 @@ export type IntegrationExecuteInputFieldRule =
|
|
|
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
19
|
| { kind: 'boolean'; required: boolean }
|
|
20
|
-
| { kind: 'record'; required: boolean; minProperties: number; maxProperties: number; types: readonly IntegrationExecuteInputRecordValueType[]; maxLength?: number }
|
|
20
|
+
| { kind: 'record'; required: boolean; minProperties: number; maxProperties: number; types: readonly IntegrationExecuteInputRecordValueType[]; maxLength?: number }
|
|
21
|
+
| { kind: 'record[]'; required: boolean; minItems: number; maxItems: number; minProperties: number; maxProperties: number; types: readonly IntegrationExecuteInputRecordValueType[]; maxLength?: number };
|
|
21
22
|
|
|
22
23
|
/** The scalar types a `value` input accepts, alone or in its list form. */
|
|
23
24
|
export type IntegrationExecuteInputValueType = 'string' | 'number' | 'boolean';
|
|
@@ -268,6 +269,17 @@ export const IntegrationExecuteInputRules = {
|
|
|
268
269
|
conflict: { kind: "enum", required: false, values: ["rename", "replace", "fail"], default: "rename" },
|
|
269
270
|
},
|
|
270
271
|
},
|
|
272
|
+
"phone.sms.list": {
|
|
273
|
+
idempotencyKey: false,
|
|
274
|
+
fields: {
|
|
275
|
+
since: { kind: "string", required: true, minLength: 1, pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,9})?(Z|[+-][0-9]{2}:[0-9]{2})$" },
|
|
276
|
+
from: { kind: "string", required: false, minLength: 0, maxLength: 32 },
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
"phone.number.get": {
|
|
280
|
+
idempotencyKey: false,
|
|
281
|
+
fields: {},
|
|
282
|
+
},
|
|
271
283
|
"warehouse.view.read": {
|
|
272
284
|
idempotencyKey: false,
|
|
273
285
|
fields: {
|
|
@@ -290,6 +302,12 @@ export const IntegrationExecuteInputRules = {
|
|
|
290
302
|
limit: { kind: "integer", required: false, minimum: 1, maximum: 1000, default: 100 },
|
|
291
303
|
},
|
|
292
304
|
},
|
|
305
|
+
"warehouse.table.append": {
|
|
306
|
+
idempotencyKey: true,
|
|
307
|
+
fields: {
|
|
308
|
+
rows: { kind: "record[]", required: true, minItems: 1, maxItems: 500, minProperties: 1, maxProperties: 64, types: ["string", "number", "boolean", "null"], maxLength: 4000 },
|
|
309
|
+
},
|
|
310
|
+
},
|
|
293
311
|
"service.request": {
|
|
294
312
|
idempotencyKey: false,
|
|
295
313
|
fields: {
|
|
@@ -363,6 +381,17 @@ function checkFields(operation: string, prefix: string, fields: Readonly<Record<
|
|
|
363
381
|
return { ok: true, value: out };
|
|
364
382
|
}
|
|
365
383
|
|
|
384
|
+
/** One record: a bounded count of free keys, every value one of the record's scalar types. */
|
|
385
|
+
function checkRecord(path: string, field: { minProperties: number; maxProperties: number; types: readonly IntegrationExecuteInputRecordValueType[]; maxLength?: number }, value: unknown): { ok: true; value: unknown } | Refusal {
|
|
386
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) return refuse(path, `${path} must be a JSON object`);
|
|
387
|
+
const keys = Object.keys(value);
|
|
388
|
+
if (keys.length < field.minProperties || keys.length > field.maxProperties) return refuse(path, `${path} must have ${field.minProperties} to ${field.maxProperties} properties`);
|
|
389
|
+
for (const key of keys) {
|
|
390
|
+
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))}`);
|
|
391
|
+
}
|
|
392
|
+
return { ok: true, value };
|
|
393
|
+
}
|
|
394
|
+
|
|
366
395
|
function checkField(operation: string, path: string, name: string, field: IntegrationExecuteInputFieldRule, value: unknown): { ok: true; value: unknown } | Refusal {
|
|
367
396
|
switch (field.kind) {
|
|
368
397
|
case 'object':
|
|
@@ -371,12 +400,14 @@ function checkField(operation: string, path: string, name: string, field: Integr
|
|
|
371
400
|
case 'boolean':
|
|
372
401
|
if (typeof value !== 'boolean') return refuse(path, `${path} must be a boolean`);
|
|
373
402
|
return { ok: true, value };
|
|
374
|
-
case 'record':
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
if (
|
|
378
|
-
for (const
|
|
379
|
-
if (
|
|
403
|
+
case 'record':
|
|
404
|
+
return checkRecord(path, field, value);
|
|
405
|
+
case 'record[]': {
|
|
406
|
+
if (!Array.isArray(value) || value.length < field.minItems || value.length > field.maxItems) return refuse(path, `${path} must list ${field.minItems} to ${field.maxItems} items`);
|
|
407
|
+
for (const [index, item] of value.entries()) {
|
|
408
|
+
if (item === null || typeof item !== 'object' || Array.isArray(item)) return refuse(path, `${path}[${index}] is not a valid ${name} entry`);
|
|
409
|
+
const entry = checkRecord(`${path}[${index}]`, field, item);
|
|
410
|
+
if (!entry.ok) return entry;
|
|
380
411
|
}
|
|
381
412
|
return { ok: true, value };
|
|
382
413
|
}
|
|
@@ -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.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.
|
|
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. 0.82.0 (ADR 0028) adds phone.sms.list (app mode only, a number alias from a phone connection's `channels` map: the SMS received on that number since a time) and warehouse.table.append (app mode only on a database connection, a receipted write with idempotencyKey: rows appended to a view alias whose mapping says `access: append`). 0.83.0 (ADR 0029) adds phone.number.get (app mode only, read-only, no input, on a number alias from a phone connection's `channels` map: the E.164 number that alias maps to, so the app — or a computer-use agent it drives — can type it into a portal that signs in by mobile number).
|
|
14
14
|
*/
|
|
15
15
|
operation:
|
|
16
16
|
| 'slack.channel.history'
|
|
@@ -44,7 +44,10 @@ export type IntegrationExecuteRequest = {
|
|
|
44
44
|
| 'sharepoint.file.search'
|
|
45
45
|
| 'sharepoint.file.read'
|
|
46
46
|
| 'sharepoint.file.upload'
|
|
47
|
+
| 'phone.sms.list'
|
|
48
|
+
| 'phone.number.get'
|
|
47
49
|
| 'warehouse.view.read'
|
|
50
|
+
| 'warehouse.table.append'
|
|
48
51
|
| 'service.request';
|
|
49
52
|
/**
|
|
50
53
|
* Tenant-wide logical alias of a connection (governance sourceId) or of a resource under it.
|
|
@@ -270,9 +273,26 @@ export type IntegrationExecuteRequest = {
|
|
|
270
273
|
body?: {
|
|
271
274
|
[k: string]: unknown;
|
|
272
275
|
};
|
|
276
|
+
/**
|
|
277
|
+
* warehouse.table.append (0.82.0): the rows to append, 1..500 of them, every one a record of the approved columns. Governance refuses an unapproved column, a value outside its column type and a request above 1 MB with ROW_VALUE_INVALID; nothing is coerced.
|
|
278
|
+
*
|
|
279
|
+
* @minItems 1
|
|
280
|
+
* @maxItems 500
|
|
281
|
+
*/
|
|
282
|
+
rows?: {
|
|
283
|
+
[k: string]: string | number | boolean | null;
|
|
284
|
+
}[];
|
|
285
|
+
/**
|
|
286
|
+
* phone.sms.list (0.82.0): the ISO 8601 date-time (with a zone) after which received messages are listed; inclusive. Messages are kept for 30 minutes, so an older `since` lists what is still held.
|
|
287
|
+
*/
|
|
288
|
+
since?: string;
|
|
289
|
+
/**
|
|
290
|
+
* phone.sms.list (0.82.0): only messages from this sender id or number (as the provider reports it, e.g. `VK-GSTNIN` or `+919876543210`); absent lists every sender.
|
|
291
|
+
*/
|
|
292
|
+
from?: string;
|
|
273
293
|
};
|
|
274
294
|
/**
|
|
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)
|
|
295
|
+
* 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) the receipted SharePoint writes (sharepoint.item.create, sharepoint.file.upload; 0.78.0) and the receipted warehouse append (warehouse.table.append; 0.82.0, where it is also the BigQuery load job id), refused everywhere else. The same key with the same payload and subject returns the recorded outcome for seven days.
|
|
276
296
|
*/
|
|
277
297
|
idempotencyKey?: string;
|
|
278
298
|
/**
|
|
@@ -286,6 +286,24 @@ export const IntegrationOperations = {
|
|
|
286
286
|
"declaredMode": false,
|
|
287
287
|
"idempotencyKey": true
|
|
288
288
|
},
|
|
289
|
+
"phone.sms.list": {
|
|
290
|
+
"kind": "saas",
|
|
291
|
+
"identities": [
|
|
292
|
+
"app"
|
|
293
|
+
],
|
|
294
|
+
"readOnly": true,
|
|
295
|
+
"declaredMode": false,
|
|
296
|
+
"idempotencyKey": false
|
|
297
|
+
},
|
|
298
|
+
"phone.number.get": {
|
|
299
|
+
"kind": "saas",
|
|
300
|
+
"identities": [
|
|
301
|
+
"app"
|
|
302
|
+
],
|
|
303
|
+
"readOnly": true,
|
|
304
|
+
"declaredMode": false,
|
|
305
|
+
"idempotencyKey": false
|
|
306
|
+
},
|
|
289
307
|
"warehouse.view.read": {
|
|
290
308
|
"kind": "database",
|
|
291
309
|
"identities": [
|
|
@@ -295,6 +313,15 @@ export const IntegrationOperations = {
|
|
|
295
313
|
"declaredMode": false,
|
|
296
314
|
"idempotencyKey": false
|
|
297
315
|
},
|
|
316
|
+
"warehouse.table.append": {
|
|
317
|
+
"kind": "database",
|
|
318
|
+
"identities": [
|
|
319
|
+
"app"
|
|
320
|
+
],
|
|
321
|
+
"readOnly": false,
|
|
322
|
+
"declaredMode": false,
|
|
323
|
+
"idempotencyKey": true
|
|
324
|
+
},
|
|
298
325
|
"service.request": {
|
|
299
326
|
"kind": "service",
|
|
300
327
|
"identities": [
|
|
@@ -34,6 +34,16 @@ export interface ResolvedAppServing {
|
|
|
34
34
|
* Bare hostname of apiUrl.
|
|
35
35
|
*/
|
|
36
36
|
apiHost?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Present only while the tenant enforces a network access policy (governance ADR 0130): the effective list of client ranges the app's gateway SecurityPolicy allows, the tenant's ranges plus the platform cell's own egress, as textual CIDRs. Absent means every network.
|
|
39
|
+
*/
|
|
40
|
+
networkAccess?: {
|
|
41
|
+
/**
|
|
42
|
+
* @minItems 1
|
|
43
|
+
* @maxItems 128
|
|
44
|
+
*/
|
|
45
|
+
clientCidrs: string[];
|
|
46
|
+
};
|
|
37
47
|
/**
|
|
38
48
|
* Present only when source is tenant: the ready delegated company zone the page and API hosts live under, and the shared gateway/TLS secret the cell serves it with.
|
|
39
49
|
*/
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Code generated by tools/gen/gen.mjs from schema/*.json. DO NOT EDIT.
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Slack carries an installation and a channel map; Gmail is user-consent only; Basecamp is user-consent only with an IT-pinned account and a project map in `channels`; SharePoint (0.78.0) is user-consent only, pinned to the company's Microsoft 365 tenant in `account`, with a site map in `channels`.
|
|
5
|
+
* Slack carries an installation and a channel map; Gmail is user-consent only; Basecamp is user-consent only with an IT-pinned account and a project map in `channels`; SharePoint (0.78.0) is user-consent only, pinned to the company's Microsoft 365 tenant in `account`, with a site map in `channels`. Phone (0.82.0) is app mode only with no installation: the tenant's inbound SMS numbers (E.164) mapped from aliases in `channels`, and the SMS the platform received on them listed by phone.sms.list; since 0.83.0 an app reads the number an alias maps to with phone.number.get.
|
|
6
6
|
*/
|
|
7
|
-
export type SaasProvider = 'slack' | 'gmail' | 'basecamp' | 'sharepoint';
|
|
7
|
+
export type SaasProvider = 'slack' | 'gmail' | 'basecamp' | 'sharepoint' | 'phone';
|
|
8
8
|
/**
|
|
9
9
|
* DISABLED stops every app call immediately (details.code CONNECTION_DISABLED).
|
|
10
10
|
*/
|
|
@@ -47,19 +47,19 @@ export interface SaasConnection {
|
|
|
47
47
|
installation?: SaasInstallation;
|
|
48
48
|
account?: BasecampAccount;
|
|
49
49
|
/**
|
|
50
|
-
* Logical alias → provider resource id: a Slack channel id, a Basecamp project id
|
|
50
|
+
* Logical alias → provider resource id: a Slack channel id, a Basecamp project id, a SharePoint site id or a phone number. Always empty for Gmail.
|
|
51
51
|
*/
|
|
52
52
|
channels: {
|
|
53
53
|
/**
|
|
54
|
-
* A Slack channel id (public, non-archived), a Basecamp project id (digits)
|
|
54
|
+
* A Slack channel id (public, non-archived), a Basecamp project id (digits), a SharePoint site id (0.78.0: the Microsoft Graph composite `hostname,siteCollectionGuid,webGuid`) or a phone number (0.82.0: E.164, a leading `+` and digits).
|
|
55
55
|
*/
|
|
56
56
|
[k: string]: string;
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
|
-
* Operations IT allows apps to request on this connection: the provider's own SaaS operations (Slack: slack.channel.history, slack.message.post, slack.message.update, slack.message.delete, slack.dm.send, slack.user.lookup; Gmail: gmail.thread.list, gmail.thread.read, gmail.message.read, gmail.message.send, gmail.attachment.read; Basecamp (0.76.0): basecamp.project.list, basecamp.todolist.list, basecamp.todo.list, basecamp.todo.create, basecamp.todo.complete, basecamp.message.list, basecamp.message.post, basecamp.comment.list, basecamp.comment.post, basecamp.campfire.post, basecamp.people.list; SharePoint (0.78.0): sharepoint.list.list, sharepoint.item.list, sharepoint.item.create, sharepoint.item.update, sharepoint.drive.list, sharepoint.file.list, sharepoint.file.search, sharepoint.file.read, sharepoint.file.upload). Never warehouse.view.read.
|
|
59
|
+
* Operations IT allows apps to request on this connection: the provider's own SaaS operations (Slack: slack.channel.history, slack.message.post, slack.message.update, slack.message.delete, slack.dm.send, slack.user.lookup; Gmail: gmail.thread.list, gmail.thread.read, gmail.message.read, gmail.message.send, gmail.attachment.read; Basecamp (0.76.0): basecamp.project.list, basecamp.todolist.list, basecamp.todo.list, basecamp.todo.create, basecamp.todo.complete, basecamp.message.list, basecamp.message.post, basecamp.comment.list, basecamp.comment.post, basecamp.campfire.post, basecamp.people.list; SharePoint (0.78.0): sharepoint.list.list, sharepoint.item.list, sharepoint.item.create, sharepoint.item.update, sharepoint.drive.list, sharepoint.file.list, sharepoint.file.search, sharepoint.file.read, sharepoint.file.upload). Never warehouse.view.read. Phone (0.82.0): phone.sms.list; 0.83.0 adds phone.number.get.
|
|
60
60
|
*
|
|
61
61
|
* @minItems 1
|
|
62
|
-
* @maxItems
|
|
62
|
+
* @maxItems 33
|
|
63
63
|
*/
|
|
64
64
|
operations: (
|
|
65
65
|
| 'slack.channel.history'
|
|
@@ -93,7 +93,10 @@ export interface SaasConnection {
|
|
|
93
93
|
| 'sharepoint.file.search'
|
|
94
94
|
| 'sharepoint.file.read'
|
|
95
95
|
| 'sharepoint.file.upload'
|
|
96
|
+
| 'phone.sms.list'
|
|
97
|
+
| 'phone.number.get'
|
|
96
98
|
| 'warehouse.view.read'
|
|
99
|
+
| 'warehouse.table.append'
|
|
97
100
|
| 'service.request'
|
|
98
101
|
)[];
|
|
99
102
|
developmentPreapproval: DevelopmentPreapproval;
|
package/package.json
CHANGED
|
@@ -84,10 +84,13 @@
|
|
|
84
84
|
"sharepoint.file.search",
|
|
85
85
|
"sharepoint.file.read",
|
|
86
86
|
"sharepoint.file.upload",
|
|
87
|
+
"phone.sms.list",
|
|
88
|
+
"phone.number.get",
|
|
87
89
|
"warehouse.view.read",
|
|
90
|
+
"warehouse.table.append",
|
|
88
91
|
"service.request"
|
|
89
92
|
],
|
|
90
|
-
"description": "Closed operation set. Extending it is a contracts change. 0.78.0 (ADR 0024) adds the nine SharePoint operations, every one user mode only on a site alias (a key of the connection's `channels` map, holding a Microsoft Graph site id): sharepoint.list.list, sharepoint.item.list, sharepoint.item.create (a receipted write: explicit action, idempotencyKey), sharepoint.item.update (a PATCH, idempotent at Graph, no key), sharepoint.drive.list, sharepoint.file.list, sharepoint.file.search, sharepoint.file.read and sharepoint.file.upload (a receipted write). 0.76.0 (ADR 0022) adds the eleven Basecamp operations, every one user mode only like gmail.*: basecamp.project.list (the projects of the company's pinned Basecamp account; its resource is the fixed `account` alias), and on one mapped project (the resource is a project alias, a key of the connection's `channels` map) basecamp.todolist.list, basecamp.todo.list, basecamp.todo.create (a receipted write: explicit action, idempotencyKey), basecamp.todo.complete (idempotent at Basecamp, no key), basecamp.message.list, basecamp.message.post, basecamp.comment.list, basecamp.comment.post, basecamp.campfire.post (the three posts are receipted writes) and basecamp.people.list. gmail.message.send (0.50.0) sends one email as the signed-in person: a send like slack.message.post (explicit Send, idempotencyKey, write receipt) under user identity; since 0.71.0 it may carry an HTML body and attachments. slack.message.post (0.53.0) runs in the mode the app declares: app (the company's Slack app, under the IT-approved per-app name) or user (the signed-in person, after their consent); since 0.55.0 each call names which of the approved modes it runs under. 0.71.0 (ADR 0018) adds slack.message.update and slack.message.delete (declared mode, like post), slack.dm.send (app mode: a direct message to 1..8 workspace members named by email), slack.user.lookup (app mode: email to Slack user id), gmail.thread.read (every message of one thread) and gmail.attachment.read (one attachment's bytes), and lets slack.channel.history run in app mode as well as user mode."
|
|
93
|
+
"description": "Closed operation set. Extending it is a contracts change. 0.78.0 (ADR 0024) adds the nine SharePoint operations, every one user mode only on a site alias (a key of the connection's `channels` map, holding a Microsoft Graph site id): sharepoint.list.list, sharepoint.item.list, sharepoint.item.create (a receipted write: explicit action, idempotencyKey), sharepoint.item.update (a PATCH, idempotent at Graph, no key), sharepoint.drive.list, sharepoint.file.list, sharepoint.file.search, sharepoint.file.read and sharepoint.file.upload (a receipted write). 0.76.0 (ADR 0022) adds the eleven Basecamp operations, every one user mode only like gmail.*: basecamp.project.list (the projects of the company's pinned Basecamp account; its resource is the fixed `account` alias), and on one mapped project (the resource is a project alias, a key of the connection's `channels` map) basecamp.todolist.list, basecamp.todo.list, basecamp.todo.create (a receipted write: explicit action, idempotencyKey), basecamp.todo.complete (idempotent at Basecamp, no key), basecamp.message.list, basecamp.message.post, basecamp.comment.list, basecamp.comment.post, basecamp.campfire.post (the three posts are receipted writes) and basecamp.people.list. gmail.message.send (0.50.0) sends one email as the signed-in person: a send like slack.message.post (explicit Send, idempotencyKey, write receipt) under user identity; since 0.71.0 it may carry an HTML body and attachments. slack.message.post (0.53.0) runs in the mode the app declares: app (the company's Slack app, under the IT-approved per-app name) or user (the signed-in person, after their consent); since 0.55.0 each call names which of the approved modes it runs under. 0.71.0 (ADR 0018) adds slack.message.update and slack.message.delete (declared mode, like post), slack.dm.send (app mode: a direct message to 1..8 workspace members named by email), slack.user.lookup (app mode: email to Slack user id), gmail.thread.read (every message of one thread) and gmail.attachment.read (one attachment's bytes), and lets slack.channel.history run in app mode as well as user mode. 0.82.0 (ADR 0028) adds phone.sms.list (app mode only, a number alias from a phone connection's `channels` map: the SMS received on that number since a time) and warehouse.table.append (app mode only on a database connection, a receipted write with idempotencyKey: rows appended to a view alias whose mapping says `access: append`). 0.83.0 (ADR 0029) adds phone.number.get (app mode only, read-only, no input, on a number alias from a phone connection's `channels` map: the E.164 number that alias maps to, so the app — or a computer-use agent it drives — can type it into a portal that signs in by mobile number)."
|
|
91
94
|
},
|
|
92
95
|
"IntegrationIdentityMode": {
|
|
93
96
|
"type": "string",
|
|
@@ -147,7 +150,16 @@
|
|
|
147
150
|
"required": [
|
|
148
151
|
"columns"
|
|
149
152
|
],
|
|
153
|
+
"description": "One declared warehouse alias: the columns the app uses and, since 0.82.0, how it uses them. `access` is read (warehouse.view.read, the default when absent, so every existing declaration and stored mapping is unchanged) or append (warehouse.table.append: the app writes rows with these columns and never reads). Governance refuses an append on a read alias and a read on an append alias with RESOURCE_NOT_APPROVED.",
|
|
150
154
|
"properties": {
|
|
155
|
+
"access": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"enum": [
|
|
158
|
+
"read",
|
|
159
|
+
"append"
|
|
160
|
+
],
|
|
161
|
+
"default": "read"
|
|
162
|
+
},
|
|
151
163
|
"columns": {
|
|
152
164
|
"type": "array",
|
|
153
165
|
"minItems": 1,
|
|
@@ -361,9 +373,18 @@
|
|
|
361
373
|
"sharepoint.file.upload": {
|
|
362
374
|
"$ref": "#/definitions/UserModeChannelOperation"
|
|
363
375
|
},
|
|
376
|
+
"phone.sms.list": {
|
|
377
|
+
"$ref": "#/definitions/AppModeChannelOperation"
|
|
378
|
+
},
|
|
379
|
+
"phone.number.get": {
|
|
380
|
+
"$ref": "#/definitions/AppModeChannelOperation"
|
|
381
|
+
},
|
|
364
382
|
"warehouse.view.read": {
|
|
365
383
|
"$ref": "#/definitions/AppModeViewOperation"
|
|
366
384
|
},
|
|
385
|
+
"warehouse.table.append": {
|
|
386
|
+
"$ref": "#/definitions/AppModeViewOperation"
|
|
387
|
+
},
|
|
367
388
|
"service.request": {
|
|
368
389
|
"$ref": "#/definitions/ServiceOperation"
|
|
369
390
|
}
|
|
@@ -389,6 +410,11 @@
|
|
|
389
410
|
"warehouse.view.read"
|
|
390
411
|
]
|
|
391
412
|
},
|
|
413
|
+
{
|
|
414
|
+
"required": [
|
|
415
|
+
"warehouse.table.append"
|
|
416
|
+
]
|
|
417
|
+
},
|
|
392
418
|
{
|
|
393
419
|
"required": [
|
|
394
420
|
"service.request"
|
|
@@ -568,6 +594,16 @@
|
|
|
568
594
|
"sharepoint.file.upload"
|
|
569
595
|
]
|
|
570
596
|
},
|
|
597
|
+
{
|
|
598
|
+
"required": [
|
|
599
|
+
"phone.sms.list"
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"required": [
|
|
604
|
+
"phone.number.get"
|
|
605
|
+
]
|
|
606
|
+
},
|
|
571
607
|
{
|
|
572
608
|
"required": [
|
|
573
609
|
"service.request"
|
|
@@ -752,10 +788,25 @@
|
|
|
752
788
|
"sharepoint.file.upload"
|
|
753
789
|
]
|
|
754
790
|
},
|
|
791
|
+
{
|
|
792
|
+
"required": [
|
|
793
|
+
"phone.sms.list"
|
|
794
|
+
]
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"required": [
|
|
798
|
+
"phone.number.get"
|
|
799
|
+
]
|
|
800
|
+
},
|
|
755
801
|
{
|
|
756
802
|
"required": [
|
|
757
803
|
"warehouse.view.read"
|
|
758
804
|
]
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"required": [
|
|
808
|
+
"warehouse.table.append"
|
|
809
|
+
]
|
|
759
810
|
}
|
|
760
811
|
]
|
|
761
812
|
}
|
|
@@ -1008,6 +1059,23 @@
|
|
|
1008
1059
|
}
|
|
1009
1060
|
}
|
|
1010
1061
|
},
|
|
1062
|
+
"company-phone": {
|
|
1063
|
+
"kind": "saas",
|
|
1064
|
+
"operations": {
|
|
1065
|
+
"phone.sms.list": {
|
|
1066
|
+
"identity": "app",
|
|
1067
|
+
"resources": [
|
|
1068
|
+
"gstn-line"
|
|
1069
|
+
]
|
|
1070
|
+
},
|
|
1071
|
+
"phone.number.get": {
|
|
1072
|
+
"identity": "app",
|
|
1073
|
+
"resources": [
|
|
1074
|
+
"gstn-line"
|
|
1075
|
+
]
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1011
1079
|
"sales-warehouse": {
|
|
1012
1080
|
"kind": "database",
|
|
1013
1081
|
"operations": {
|
|
@@ -1021,6 +1089,19 @@
|
|
|
1021
1089
|
]
|
|
1022
1090
|
}
|
|
1023
1091
|
}
|
|
1092
|
+
},
|
|
1093
|
+
"warehouse.table.append": {
|
|
1094
|
+
"identity": "app",
|
|
1095
|
+
"resources": {
|
|
1096
|
+
"esc_filings": {
|
|
1097
|
+
"access": "append",
|
|
1098
|
+
"columns": [
|
|
1099
|
+
"gstin",
|
|
1100
|
+
"period",
|
|
1101
|
+
"filed_at"
|
|
1102
|
+
]
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1024
1105
|
}
|
|
1025
1106
|
}
|
|
1026
1107
|
}
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"status": { "$ref": "#/definitions/DataGrantV2Status" },
|
|
18
18
|
"operations": {
|
|
19
19
|
"type": "array",
|
|
20
|
-
"maxItems":
|
|
20
|
+
"maxItems": 33,
|
|
21
21
|
"uniqueItems": true,
|
|
22
22
|
"items": { "$ref": "app-integrations-declaration.schema.json#/definitions/IntegrationOperation" },
|
|
23
|
-
"description": "Approved operations; each must match this grant's mode. Empty until the first approval. At most the thirty-
|
|
23
|
+
"description": "Approved operations; each must match this grant's mode. Empty until the first approval. At most the thirty-three SaaS operations (0.83.0: eleven Slack and Gmail, eleven Basecamp, nine SharePoint, two phone); a database grant holds up to two (warehouse.view.read, warehouse.table.append)."
|
|
24
24
|
},
|
|
25
25
|
"resources": {
|
|
26
26
|
"type": "array",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"type": "object",
|
|
63
63
|
"additionalProperties": false,
|
|
64
64
|
"required": ["name"],
|
|
65
|
-
"description": "One approved logical resource: a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias (0.76.0), a SharePoint site alias (0.78.0), or a warehouse view alias with the approved columns.",
|
|
65
|
+
"description": "One approved logical resource: a Slack channel alias, the fixed Gmail `inbox` alias, a Basecamp project alias or the fixed Basecamp `account` alias (0.76.0), a SharePoint site alias (0.78.0), a phone number alias (0.82.0), or a warehouse view alias with the approved columns.",
|
|
66
66
|
"properties": {
|
|
67
67
|
"name": { "$ref": "app-integrations-declaration.schema.json#/definitions/IntegrationAlias" },
|
|
68
68
|
"columns": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"maxItems": 32,
|
|
72
72
|
"uniqueItems": true,
|
|
73
73
|
"items": { "$ref": "app-integrations-declaration.schema.json#/definitions/ColumnName" },
|
|
74
|
-
"description": "warehouse.view.read only: the approved columns of the view."
|
|
74
|
+
"description": "warehouse.view.read and warehouse.table.append only: the approved columns of the view."
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
},
|