@fourier-labs/harbour-contracts 0.85.0 → 0.87.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 +25 -25
- package/dist/gen-ts/app-integrations-declaration.d.ts +47 -2
- package/dist/gen-ts/contract-release.d.ts +6 -6
- package/dist/gen-ts/contract-release.js +6 -6
- package/dist/gen-ts/data-grant-v2.d.ts +4 -4
- package/dist/gen-ts/integration-execute-input-rules.d.ts +1194 -0
- package/dist/gen-ts/integration-execute-input-rules.js +392 -0
- package/dist/gen-ts/integration-execute-request.d.ts +150 -25
- package/dist/gen-ts/integration-execute-result.d.ts +237 -7
- package/dist/gen-ts/integration-operations.d.ts +315 -0
- package/dist/gen-ts/integration-operations.js +405 -0
- package/dist/gen-ts/kit-bundle-manifest.d.ts +1 -0
- package/dist/gen-ts/kit-lock.d.ts +1 -0
- package/dist/gen-ts/saas-connection.d.ts +9 -9
- package/gen-ts/app-integrations-declaration.ts +47 -2
- package/gen-ts/contract-release.ts +6 -6
- package/gen-ts/data-grant-v2.ts +48 -3
- package/gen-ts/integration-execute-input-rules.ts +390 -1
- package/gen-ts/integration-execute-request.ts +194 -24
- package/gen-ts/integration-execute-result.ts +237 -7
- package/gen-ts/integration-operations.ts +405 -0
- package/gen-ts/kit-bundle-manifest.ts +1 -0
- package/gen-ts/kit-lock.ts +1 -0
- package/gen-ts/saas-connection.ts +66 -8
- package/package.json +1 -1
- package/schema/app-integrations-declaration.schema.json +976 -36
- package/schema/data-grant-v2.schema.json +3 -3
- package/schema/integration-execute-request.schema.json +2320 -55
- package/schema/integration-execute-result.schema.json +934 -30
- package/schema/kit-bundle-manifest.schema.json +1 -0
- package/schema/saas-connection.schema.json +139 -8
package/gen-ts/data-grant-v2.ts
CHANGED
|
@@ -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, 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.
|
|
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, a Google Workspace or Microsoft 365 provider's fixed alias or a Teams channel alias (0.86.0), 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
|
|
36
|
+
* Approved operations; each must match this grant's mode. Empty until the first approval. At most the seventy-eight SaaS operations (0.86.0: eleven Slack and Gmail, eleven Basecamp, nine SharePoint, two phone, forty-five Google Workspace and Microsoft 365); a database grant holds up to two (warehouse.view.read, warehouse.table.append).
|
|
37
37
|
*
|
|
38
|
-
* @maxItems
|
|
38
|
+
* @maxItems 78
|
|
39
39
|
*/
|
|
40
40
|
operations: (
|
|
41
41
|
| 'slack.channel.history'
|
|
@@ -71,6 +71,51 @@ export interface DataGrantV2 {
|
|
|
71
71
|
| 'sharepoint.file.upload'
|
|
72
72
|
| 'phone.sms.list'
|
|
73
73
|
| 'phone.number.get'
|
|
74
|
+
| 'calendar.calendar.list'
|
|
75
|
+
| 'calendar.event.list'
|
|
76
|
+
| 'calendar.event.read'
|
|
77
|
+
| 'calendar.event.create'
|
|
78
|
+
| 'calendar.event.update'
|
|
79
|
+
| 'calendar.event.cancel'
|
|
80
|
+
| 'drive.file.list'
|
|
81
|
+
| 'drive.file.search'
|
|
82
|
+
| 'drive.file.read'
|
|
83
|
+
| 'drive.file.upload'
|
|
84
|
+
| 'drive.folder.create'
|
|
85
|
+
| 'docs.document.read'
|
|
86
|
+
| 'docs.document.create'
|
|
87
|
+
| 'docs.document.append'
|
|
88
|
+
| 'docs.text.replace'
|
|
89
|
+
| 'sheets.spreadsheet.read'
|
|
90
|
+
| 'sheets.values.read'
|
|
91
|
+
| 'sheets.values.append'
|
|
92
|
+
| 'sheets.values.update'
|
|
93
|
+
| 'sheets.values.clear'
|
|
94
|
+
| 'sheets.spreadsheet.create'
|
|
95
|
+
| 'outlook.message.list'
|
|
96
|
+
| 'outlook.message.read'
|
|
97
|
+
| 'outlook.attachment.read'
|
|
98
|
+
| 'outlook.message.send'
|
|
99
|
+
| 'outlook.message.reply'
|
|
100
|
+
| 'outlook.event.list'
|
|
101
|
+
| 'outlook.event.read'
|
|
102
|
+
| 'outlook.event.create'
|
|
103
|
+
| 'outlook.event.update'
|
|
104
|
+
| 'outlook.event.cancel'
|
|
105
|
+
| 'onedrive.file.list'
|
|
106
|
+
| 'onedrive.file.search'
|
|
107
|
+
| 'onedrive.file.read'
|
|
108
|
+
| 'onedrive.file.upload'
|
|
109
|
+
| 'onedrive.folder.create'
|
|
110
|
+
| 'excel.worksheet.list'
|
|
111
|
+
| 'excel.range.read'
|
|
112
|
+
| 'excel.range.update'
|
|
113
|
+
| 'excel.table.list'
|
|
114
|
+
| 'excel.row.add'
|
|
115
|
+
| 'excel.worksheet.add'
|
|
116
|
+
| 'teams.message.list'
|
|
117
|
+
| 'teams.message.post'
|
|
118
|
+
| 'teams.reply.post'
|
|
74
119
|
| 'warehouse.view.read'
|
|
75
120
|
| 'warehouse.table.append'
|
|
76
121
|
| 'service.request'
|
|
@@ -18,7 +18,8 @@ export type 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
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
|
+
| { kind: 'record[]'; required: boolean; minItems: number; maxItems: number; minProperties: number; maxProperties: number; types: readonly IntegrationExecuteInputRecordValueType[]; maxLength?: number }
|
|
22
|
+
| { kind: 'matrix'; required: boolean; minItems: number; maxItems: number; row: { minItems: number; maxItems: number }; types: readonly IntegrationExecuteInputRecordValueType[]; maxLength?: number };
|
|
22
23
|
|
|
23
24
|
/** The scalar types a `value` input accepts, alone or in its list form. */
|
|
24
25
|
export type IntegrationExecuteInputValueType = 'string' | 'number' | 'boolean';
|
|
@@ -280,6 +281,383 @@ export const IntegrationExecuteInputRules = {
|
|
|
280
281
|
idempotencyKey: false,
|
|
281
282
|
fields: {},
|
|
282
283
|
},
|
|
284
|
+
"calendar.calendar.list": {
|
|
285
|
+
idempotencyKey: false,
|
|
286
|
+
fields: {
|
|
287
|
+
pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
"calendar.event.list": {
|
|
291
|
+
idempotencyKey: false,
|
|
292
|
+
fields: {
|
|
293
|
+
calendarId: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
294
|
+
timeMin: { 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})$" },
|
|
295
|
+
timeMax: { 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})$" },
|
|
296
|
+
q: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
297
|
+
pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
"calendar.event.read": {
|
|
301
|
+
idempotencyKey: false,
|
|
302
|
+
fields: {
|
|
303
|
+
calendarId: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
304
|
+
eventId: { kind: "string", required: true, minLength: 1, maxLength: 1024 },
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
"calendar.event.create": {
|
|
308
|
+
idempotencyKey: true,
|
|
309
|
+
fields: {
|
|
310
|
+
calendarId: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
311
|
+
title: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
312
|
+
start: { 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})$" },
|
|
313
|
+
end: { 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})$" },
|
|
314
|
+
timeZone: { kind: "string", required: false, minLength: 1, maxLength: 64 },
|
|
315
|
+
allDay: { kind: "boolean", required: false },
|
|
316
|
+
description: { kind: "string", required: false, minLength: 1, maxLength: 8000 },
|
|
317
|
+
location: { kind: "string", required: false, minLength: 1, maxLength: 512 },
|
|
318
|
+
attendees: { kind: "string[]", required: false, minItems: 1, maxItems: 100, uniqueItems: true, item: { minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" } },
|
|
319
|
+
notify: { kind: "boolean", required: false },
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
"calendar.event.update": {
|
|
323
|
+
idempotencyKey: false,
|
|
324
|
+
fields: {
|
|
325
|
+
calendarId: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
326
|
+
eventId: { kind: "string", required: true, minLength: 1, maxLength: 1024 },
|
|
327
|
+
title: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
328
|
+
start: { kind: "string", required: false, 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})$" },
|
|
329
|
+
end: { kind: "string", required: false, 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})$" },
|
|
330
|
+
timeZone: { kind: "string", required: false, minLength: 1, maxLength: 64 },
|
|
331
|
+
description: { kind: "string", required: false, minLength: 1, maxLength: 8000 },
|
|
332
|
+
location: { kind: "string", required: false, minLength: 1, maxLength: 512 },
|
|
333
|
+
attendees: { kind: "string[]", required: false, minItems: 1, maxItems: 100, uniqueItems: true, item: { minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" } },
|
|
334
|
+
notify: { kind: "boolean", required: false },
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
"calendar.event.cancel": {
|
|
338
|
+
idempotencyKey: false,
|
|
339
|
+
fields: {
|
|
340
|
+
calendarId: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
341
|
+
eventId: { kind: "string", required: true, minLength: 1, maxLength: 1024 },
|
|
342
|
+
notify: { kind: "boolean", required: false },
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
"drive.file.list": {
|
|
346
|
+
idempotencyKey: false,
|
|
347
|
+
fields: {
|
|
348
|
+
folderId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
349
|
+
pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
"drive.file.search": {
|
|
353
|
+
idempotencyKey: false,
|
|
354
|
+
fields: {
|
|
355
|
+
q: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
356
|
+
pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
"drive.file.read": {
|
|
360
|
+
idempotencyKey: false,
|
|
361
|
+
fields: {
|
|
362
|
+
fileId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
363
|
+
exportAs: { kind: "enum", required: false, values: ["text", "csv", "pdf"] },
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
"drive.file.upload": {
|
|
367
|
+
idempotencyKey: true,
|
|
368
|
+
fields: {
|
|
369
|
+
filename: { kind: "string", required: true, minLength: 1, maxLength: 255 },
|
|
370
|
+
contentType: { kind: "string", required: true, minLength: 1, maxLength: 128 },
|
|
371
|
+
dataBase64: { kind: "string", required: true, minLength: 1, maxLength: 2796203 },
|
|
372
|
+
folderId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
373
|
+
conflict: { kind: "enum", required: false, values: ["rename", "replace", "fail"], default: "rename" },
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
"drive.folder.create": {
|
|
377
|
+
idempotencyKey: true,
|
|
378
|
+
fields: {
|
|
379
|
+
title: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
380
|
+
folderId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
"docs.document.read": {
|
|
384
|
+
idempotencyKey: false,
|
|
385
|
+
fields: {
|
|
386
|
+
documentId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9_-]{10,128}$" },
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
"docs.document.create": {
|
|
390
|
+
idempotencyKey: true,
|
|
391
|
+
fields: {
|
|
392
|
+
title: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
393
|
+
text: { kind: "string", required: false, minLength: 1, maxLength: 65536 },
|
|
394
|
+
},
|
|
395
|
+
},
|
|
396
|
+
"docs.document.append": {
|
|
397
|
+
idempotencyKey: false,
|
|
398
|
+
fields: {
|
|
399
|
+
documentId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9_-]{10,128}$" },
|
|
400
|
+
text: { kind: "string", required: true, minLength: 1, maxLength: 65536 },
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
"docs.text.replace": {
|
|
404
|
+
idempotencyKey: false,
|
|
405
|
+
fields: {
|
|
406
|
+
documentId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9_-]{10,128}$" },
|
|
407
|
+
replacements: { kind: "object[]", required: true, minItems: 1, maxItems: 64, fields: {
|
|
408
|
+
find: { kind: "string", required: true, minLength: 1, maxLength: 512 },
|
|
409
|
+
replace: { kind: "string", required: true, minLength: 0, maxLength: 4000 },
|
|
410
|
+
matchCase: { kind: "boolean", required: false },
|
|
411
|
+
} },
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
"sheets.spreadsheet.read": {
|
|
415
|
+
idempotencyKey: false,
|
|
416
|
+
fields: {
|
|
417
|
+
spreadsheetId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9_-]{10,128}$" },
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
"sheets.values.read": {
|
|
421
|
+
idempotencyKey: false,
|
|
422
|
+
fields: {
|
|
423
|
+
spreadsheetId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9_-]{10,128}$" },
|
|
424
|
+
range: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
"sheets.values.append": {
|
|
428
|
+
idempotencyKey: true,
|
|
429
|
+
fields: {
|
|
430
|
+
spreadsheetId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9_-]{10,128}$" },
|
|
431
|
+
range: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
432
|
+
values: { kind: "matrix", required: true, minItems: 1, maxItems: 1000, row: { minItems: 1, maxItems: 100 }, types: ["string", "number", "boolean", "null"], maxLength: 4000 },
|
|
433
|
+
valueInput: { kind: "enum", required: false, values: ["raw", "user"], default: "user" },
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
"sheets.values.update": {
|
|
437
|
+
idempotencyKey: false,
|
|
438
|
+
fields: {
|
|
439
|
+
spreadsheetId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9_-]{10,128}$" },
|
|
440
|
+
range: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
441
|
+
values: { kind: "matrix", required: true, minItems: 1, maxItems: 1000, row: { minItems: 1, maxItems: 100 }, types: ["string", "number", "boolean", "null"], maxLength: 4000 },
|
|
442
|
+
valueInput: { kind: "enum", required: false, values: ["raw", "user"], default: "user" },
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
"sheets.values.clear": {
|
|
446
|
+
idempotencyKey: false,
|
|
447
|
+
fields: {
|
|
448
|
+
spreadsheetId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9_-]{10,128}$" },
|
|
449
|
+
range: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
"sheets.spreadsheet.create": {
|
|
453
|
+
idempotencyKey: true,
|
|
454
|
+
fields: {
|
|
455
|
+
title: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
456
|
+
sheets: { kind: "string[]", required: false, minItems: 1, maxItems: 20, uniqueItems: true, item: { minLength: 1, maxLength: 100 } },
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
"outlook.message.list": {
|
|
460
|
+
idempotencyKey: false,
|
|
461
|
+
fields: {
|
|
462
|
+
folder: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
463
|
+
q: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
464
|
+
pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
"outlook.message.read": {
|
|
468
|
+
idempotencyKey: false,
|
|
469
|
+
fields: {
|
|
470
|
+
messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._=-]{1,256}$" },
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
"outlook.attachment.read": {
|
|
474
|
+
idempotencyKey: false,
|
|
475
|
+
fields: {
|
|
476
|
+
messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._=-]{1,256}$" },
|
|
477
|
+
attachmentId: { kind: "string", required: true, minLength: 1, maxLength: 512 },
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
"outlook.message.send": {
|
|
481
|
+
idempotencyKey: true,
|
|
482
|
+
fields: {
|
|
483
|
+
to: { kind: "string[]", required: true, minItems: 1, maxItems: 50, uniqueItems: true, item: { minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" } },
|
|
484
|
+
cc: { kind: "string[]", required: false, minItems: 1, maxItems: 50, uniqueItems: true, item: { minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" } },
|
|
485
|
+
bcc: { kind: "string[]", required: false, minItems: 1, maxItems: 50, uniqueItems: true, item: { minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" } },
|
|
486
|
+
subject: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
487
|
+
text: { kind: "string", required: true, minLength: 1, maxLength: 4000 },
|
|
488
|
+
html: { kind: "string", required: false, minLength: 1, maxLength: 65536 },
|
|
489
|
+
attachments: { kind: "object[]", required: false, minItems: 1, maxItems: 5, fields: {
|
|
490
|
+
filename: { kind: "string", required: true, minLength: 1, maxLength: 255 },
|
|
491
|
+
contentType: { kind: "string", required: true, minLength: 1, maxLength: 128 },
|
|
492
|
+
dataBase64: { kind: "string", required: true, minLength: 1, maxLength: 2796203 },
|
|
493
|
+
} },
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
"outlook.message.reply": {
|
|
497
|
+
idempotencyKey: true,
|
|
498
|
+
fields: {
|
|
499
|
+
messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._=-]{1,256}$" },
|
|
500
|
+
text: { kind: "string", required: true, minLength: 1, maxLength: 4000 },
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
"outlook.event.list": {
|
|
504
|
+
idempotencyKey: false,
|
|
505
|
+
fields: {
|
|
506
|
+
start: { 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})$" },
|
|
507
|
+
end: { 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})$" },
|
|
508
|
+
pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
|
|
509
|
+
},
|
|
510
|
+
},
|
|
511
|
+
"outlook.event.read": {
|
|
512
|
+
idempotencyKey: false,
|
|
513
|
+
fields: {
|
|
514
|
+
eventId: { kind: "string", required: true, minLength: 1, maxLength: 1024 },
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
"outlook.event.create": {
|
|
518
|
+
idempotencyKey: true,
|
|
519
|
+
fields: {
|
|
520
|
+
title: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
521
|
+
start: { 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})$" },
|
|
522
|
+
end: { 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})$" },
|
|
523
|
+
timeZone: { kind: "string", required: false, minLength: 1, maxLength: 64 },
|
|
524
|
+
allDay: { kind: "boolean", required: false },
|
|
525
|
+
description: { kind: "string", required: false, minLength: 1, maxLength: 8000 },
|
|
526
|
+
location: { kind: "string", required: false, minLength: 1, maxLength: 512 },
|
|
527
|
+
attendees: { kind: "string[]", required: false, minItems: 1, maxItems: 100, uniqueItems: true, item: { minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" } },
|
|
528
|
+
notify: { kind: "boolean", required: false },
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
"outlook.event.update": {
|
|
532
|
+
idempotencyKey: false,
|
|
533
|
+
fields: {
|
|
534
|
+
eventId: { kind: "string", required: true, minLength: 1, maxLength: 1024 },
|
|
535
|
+
title: { kind: "string", required: false, minLength: 1, maxLength: 256 },
|
|
536
|
+
start: { kind: "string", required: false, 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})$" },
|
|
537
|
+
end: { kind: "string", required: false, 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})$" },
|
|
538
|
+
timeZone: { kind: "string", required: false, minLength: 1, maxLength: 64 },
|
|
539
|
+
description: { kind: "string", required: false, minLength: 1, maxLength: 8000 },
|
|
540
|
+
location: { kind: "string", required: false, minLength: 1, maxLength: 512 },
|
|
541
|
+
attendees: { kind: "string[]", required: false, minItems: 1, maxItems: 100, uniqueItems: true, item: { minLength: 3, maxLength: 254, pattern: "^[^\\s@<>,;\"]+@[^\\s@<>,;\"]+\\.[^\\s@<>,;\"]+$" } },
|
|
542
|
+
notify: { kind: "boolean", required: false },
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
"outlook.event.cancel": {
|
|
546
|
+
idempotencyKey: false,
|
|
547
|
+
fields: {
|
|
548
|
+
eventId: { kind: "string", required: true, minLength: 1, maxLength: 1024 },
|
|
549
|
+
comment: { kind: "string", required: false, minLength: 1, maxLength: 4000 },
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
"onedrive.file.list": {
|
|
553
|
+
idempotencyKey: false,
|
|
554
|
+
fields: {
|
|
555
|
+
folderId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
556
|
+
pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
"onedrive.file.search": {
|
|
560
|
+
idempotencyKey: false,
|
|
561
|
+
fields: {
|
|
562
|
+
q: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
563
|
+
pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
|
|
564
|
+
},
|
|
565
|
+
},
|
|
566
|
+
"onedrive.file.read": {
|
|
567
|
+
idempotencyKey: false,
|
|
568
|
+
fields: {
|
|
569
|
+
fileId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
"onedrive.file.upload": {
|
|
573
|
+
idempotencyKey: true,
|
|
574
|
+
fields: {
|
|
575
|
+
filename: { kind: "string", required: true, minLength: 1, maxLength: 255 },
|
|
576
|
+
contentType: { kind: "string", required: true, minLength: 1, maxLength: 128 },
|
|
577
|
+
dataBase64: { kind: "string", required: true, minLength: 1, maxLength: 2796203 },
|
|
578
|
+
folderId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
579
|
+
conflict: { kind: "enum", required: false, values: ["rename", "replace", "fail"], default: "rename" },
|
|
580
|
+
},
|
|
581
|
+
},
|
|
582
|
+
"onedrive.folder.create": {
|
|
583
|
+
idempotencyKey: true,
|
|
584
|
+
fields: {
|
|
585
|
+
title: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
586
|
+
folderId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
587
|
+
},
|
|
588
|
+
},
|
|
589
|
+
"excel.worksheet.list": {
|
|
590
|
+
idempotencyKey: false,
|
|
591
|
+
fields: {
|
|
592
|
+
fileId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
593
|
+
driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
594
|
+
},
|
|
595
|
+
},
|
|
596
|
+
"excel.range.read": {
|
|
597
|
+
idempotencyKey: false,
|
|
598
|
+
fields: {
|
|
599
|
+
fileId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
600
|
+
driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
601
|
+
worksheet: { kind: "string", required: true, minLength: 1, maxLength: 255 },
|
|
602
|
+
address: { kind: "string", required: false, minLength: 1, maxLength: 64 },
|
|
603
|
+
},
|
|
604
|
+
},
|
|
605
|
+
"excel.range.update": {
|
|
606
|
+
idempotencyKey: false,
|
|
607
|
+
fields: {
|
|
608
|
+
fileId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
609
|
+
driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
610
|
+
worksheet: { kind: "string", required: true, minLength: 1, maxLength: 255 },
|
|
611
|
+
address: { kind: "string", required: true, minLength: 1, maxLength: 64 },
|
|
612
|
+
values: { kind: "matrix", required: true, minItems: 1, maxItems: 1000, row: { minItems: 1, maxItems: 100 }, types: ["string", "number", "boolean", "null"], maxLength: 4000 },
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
"excel.table.list": {
|
|
616
|
+
idempotencyKey: false,
|
|
617
|
+
fields: {
|
|
618
|
+
fileId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
619
|
+
driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
620
|
+
worksheet: { kind: "string", required: false, minLength: 1, maxLength: 255 },
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
"excel.row.add": {
|
|
624
|
+
idempotencyKey: true,
|
|
625
|
+
fields: {
|
|
626
|
+
fileId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
627
|
+
driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
628
|
+
tableName: { kind: "string", required: true, minLength: 1, maxLength: 255 },
|
|
629
|
+
values: { kind: "matrix", required: true, minItems: 1, maxItems: 1000, row: { minItems: 1, maxItems: 100 }, types: ["string", "number", "boolean", "null"], maxLength: 4000 },
|
|
630
|
+
},
|
|
631
|
+
},
|
|
632
|
+
"excel.worksheet.add": {
|
|
633
|
+
idempotencyKey: true,
|
|
634
|
+
fields: {
|
|
635
|
+
fileId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
636
|
+
driveId: { kind: "string", required: false, minLength: 0, pattern: "^[A-Za-z0-9!._,=-]{1,256}$" },
|
|
637
|
+
title: { kind: "string", required: true, minLength: 1, maxLength: 256 },
|
|
638
|
+
},
|
|
639
|
+
},
|
|
640
|
+
"teams.message.list": {
|
|
641
|
+
idempotencyKey: false,
|
|
642
|
+
fields: {
|
|
643
|
+
pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
"teams.message.post": {
|
|
647
|
+
idempotencyKey: true,
|
|
648
|
+
fields: {
|
|
649
|
+
text: { kind: "string", required: true, minLength: 1, maxLength: 4000 },
|
|
650
|
+
html: { kind: "string", required: false, minLength: 1, maxLength: 65536 },
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
"teams.reply.post": {
|
|
654
|
+
idempotencyKey: true,
|
|
655
|
+
fields: {
|
|
656
|
+
messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._=-]{1,256}$" },
|
|
657
|
+
text: { kind: "string", required: true, minLength: 1, maxLength: 4000 },
|
|
658
|
+
html: { kind: "string", required: false, minLength: 1, maxLength: 65536 },
|
|
659
|
+
},
|
|
660
|
+
},
|
|
283
661
|
"warehouse.view.read": {
|
|
284
662
|
idempotencyKey: false,
|
|
285
663
|
fields: {
|
|
@@ -411,6 +789,17 @@ function checkField(operation: string, path: string, name: string, field: Integr
|
|
|
411
789
|
}
|
|
412
790
|
return { ok: true, value };
|
|
413
791
|
}
|
|
792
|
+
case 'matrix': {
|
|
793
|
+
if (!Array.isArray(value) || value.length < field.minItems || value.length > field.maxItems) return refuse(path, `${path} must list ${field.minItems} to ${field.maxItems} items`);
|
|
794
|
+
for (const [index, row] of value.entries()) {
|
|
795
|
+
if (!Array.isArray(row)) return refuse(path, `${path}[${index}] is not a valid ${name} entry`);
|
|
796
|
+
if (row.length < field.row.minItems || row.length > field.row.maxItems) return refuse(`${path}[${index}]`, `${path}[${index}] must list ${field.row.minItems} to ${field.row.maxItems} items`);
|
|
797
|
+
for (const [column, cell] of row.entries()) {
|
|
798
|
+
if (!isScalar(field.types, field.maxLength, cell)) return refuse(`${path}[${index}][${column}]`, `${path}[${index}][${column}] must be ${either(scalarShapes(field.types, field.maxLength))}`);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
return { ok: true, value };
|
|
802
|
+
}
|
|
414
803
|
case 'integer':
|
|
415
804
|
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}`);
|
|
416
805
|
return { ok: true, value };
|