@fourier-labs/harbour-contracts 0.88.0 → 0.91.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 (29) hide show
  1. package/contract-release.json +24 -24
  2. package/dist/gen-ts/app-integrations-declaration.d.ts +8 -0
  3. package/dist/gen-ts/contract-release.d.ts +6 -6
  4. package/dist/gen-ts/contract-release.js +6 -6
  5. package/dist/gen-ts/data-grant-v2.d.ts +16 -2
  6. package/dist/gen-ts/integration-execute-input-rules.d.ts +230 -0
  7. package/dist/gen-ts/integration-execute-input-rules.js +70 -0
  8. package/dist/gen-ts/integration-execute-request.d.ts +19 -2
  9. package/dist/gen-ts/integration-execute-result.d.ts +49 -0
  10. package/dist/gen-ts/integration-operations.d.ts +56 -0
  11. package/dist/gen-ts/integration-operations.js +72 -0
  12. package/dist/gen-ts/resolved-app-serving.d.ts +4 -0
  13. package/dist/gen-ts/saas-connection.d.ts +34 -3
  14. package/gen-ts/app-integrations-declaration.ts +8 -0
  15. package/gen-ts/contract-release.ts +6 -6
  16. package/gen-ts/data-grant-v2.ts +113 -1
  17. package/gen-ts/integration-execute-input-rules.ts +70 -0
  18. package/gen-ts/integration-execute-request.ts +27 -2
  19. package/gen-ts/integration-execute-result.ts +49 -0
  20. package/gen-ts/integration-operations.ts +72 -0
  21. package/gen-ts/resolved-app-serving.ts +4 -0
  22. package/gen-ts/saas-connection.ts +222 -2
  23. package/package.json +1 -1
  24. package/schema/app-integrations-declaration.schema.json +121 -9
  25. package/schema/data-grant-v2.schema.json +17 -1
  26. package/schema/integration-execute-request.schema.json +458 -7
  27. package/schema/integration-execute-result.schema.json +234 -2
  28. package/schema/resolved-app-serving.schema.json +1 -0
  29. package/schema/saas-connection.schema.json +732 -126
@@ -286,6 +286,55 @@ export type IntegrationExecuteResult = {
286
286
  [k: string]: string;
287
287
  };
288
288
  body?: unknown;
289
+ booksDocument?: {
290
+ id: string;
291
+ number: string;
292
+ status: string;
293
+ currency: string;
294
+ total: string;
295
+ vendorId?: string;
296
+ customerId?: string;
297
+ /**
298
+ * @maxItems 100
299
+ */
300
+ lineItems: {
301
+ itemId: string;
302
+ quantity: string;
303
+ rate: string;
304
+ total: string;
305
+ description?: string;
306
+ }[];
307
+ };
308
+ /**
309
+ * @maxItems 100
310
+ */
311
+ booksContacts?: {
312
+ id: string;
313
+ name: string;
314
+ type: string;
315
+ }[];
316
+ /**
317
+ * @maxItems 100
318
+ */
319
+ booksPurchaseOrders?: {
320
+ id: string;
321
+ number: string;
322
+ status: string;
323
+ currency: string;
324
+ total: string;
325
+ vendorId?: string;
326
+ customerId?: string;
327
+ /**
328
+ * @maxItems 100
329
+ */
330
+ lineItems: {
331
+ itemId: string;
332
+ quantity: string;
333
+ rate: string;
334
+ total: string;
335
+ description?: string;
336
+ }[];
337
+ }[];
289
338
  };
290
339
  /**
291
340
  * An event's state (0.86.0): confirmed (Google `confirmed`, Graph not cancelled and not tentative), tentative, or cancelled.
@@ -567,4 +567,60 @@ export declare const IntegrationOperations: {
567
567
  readonly declaredMode: false;
568
568
  readonly idempotencyKey: false;
569
569
  };
570
+ readonly "zohobooks.contact.list": {
571
+ readonly kind: "saas";
572
+ readonly identities: readonly ["user"];
573
+ readonly readOnly: true;
574
+ readonly declaredMode: false;
575
+ readonly idempotencyKey: false;
576
+ };
577
+ readonly "zohobooks.purchaseorder.list": {
578
+ readonly kind: "saas";
579
+ readonly identities: readonly ["user"];
580
+ readonly readOnly: true;
581
+ readonly declaredMode: false;
582
+ readonly idempotencyKey: false;
583
+ };
584
+ readonly "zohobooks.purchaseorder.read": {
585
+ readonly kind: "saas";
586
+ readonly identities: readonly ["user"];
587
+ readonly readOnly: true;
588
+ readonly declaredMode: false;
589
+ readonly idempotencyKey: false;
590
+ };
591
+ readonly "zohobooks.bill.create": {
592
+ readonly kind: "saas";
593
+ readonly identities: readonly ["user"];
594
+ readonly readOnly: false;
595
+ readonly declaredMode: false;
596
+ readonly idempotencyKey: true;
597
+ };
598
+ readonly "zohobooks.bill.read": {
599
+ readonly kind: "saas";
600
+ readonly identities: readonly ["user"];
601
+ readonly readOnly: true;
602
+ readonly declaredMode: false;
603
+ readonly idempotencyKey: false;
604
+ };
605
+ readonly "zohobooks.invoice.create": {
606
+ readonly kind: "saas";
607
+ readonly identities: readonly ["user"];
608
+ readonly readOnly: false;
609
+ readonly declaredMode: false;
610
+ readonly idempotencyKey: true;
611
+ };
612
+ readonly "zohobooks.invoice.read": {
613
+ readonly kind: "saas";
614
+ readonly identities: readonly ["user"];
615
+ readonly readOnly: true;
616
+ readonly declaredMode: false;
617
+ readonly idempotencyKey: false;
618
+ };
619
+ readonly "zohobooks.invoice.pdf": {
620
+ readonly kind: "saas";
621
+ readonly identities: readonly ["user"];
622
+ readonly readOnly: true;
623
+ readonly declaredMode: false;
624
+ readonly idempotencyKey: false;
625
+ };
570
626
  };
@@ -734,5 +734,77 @@ export const IntegrationOperations = {
734
734
  "readOnly": false,
735
735
  "declaredMode": false,
736
736
  "idempotencyKey": false
737
+ },
738
+ "zohobooks.contact.list": {
739
+ "kind": "saas",
740
+ "identities": [
741
+ "user"
742
+ ],
743
+ "readOnly": true,
744
+ "declaredMode": false,
745
+ "idempotencyKey": false
746
+ },
747
+ "zohobooks.purchaseorder.list": {
748
+ "kind": "saas",
749
+ "identities": [
750
+ "user"
751
+ ],
752
+ "readOnly": true,
753
+ "declaredMode": false,
754
+ "idempotencyKey": false
755
+ },
756
+ "zohobooks.purchaseorder.read": {
757
+ "kind": "saas",
758
+ "identities": [
759
+ "user"
760
+ ],
761
+ "readOnly": true,
762
+ "declaredMode": false,
763
+ "idempotencyKey": false
764
+ },
765
+ "zohobooks.bill.create": {
766
+ "kind": "saas",
767
+ "identities": [
768
+ "user"
769
+ ],
770
+ "readOnly": false,
771
+ "declaredMode": false,
772
+ "idempotencyKey": true
773
+ },
774
+ "zohobooks.bill.read": {
775
+ "kind": "saas",
776
+ "identities": [
777
+ "user"
778
+ ],
779
+ "readOnly": true,
780
+ "declaredMode": false,
781
+ "idempotencyKey": false
782
+ },
783
+ "zohobooks.invoice.create": {
784
+ "kind": "saas",
785
+ "identities": [
786
+ "user"
787
+ ],
788
+ "readOnly": false,
789
+ "declaredMode": false,
790
+ "idempotencyKey": true
791
+ },
792
+ "zohobooks.invoice.read": {
793
+ "kind": "saas",
794
+ "identities": [
795
+ "user"
796
+ ],
797
+ "readOnly": true,
798
+ "declaredMode": false,
799
+ "idempotencyKey": false
800
+ },
801
+ "zohobooks.invoice.pdf": {
802
+ "kind": "saas",
803
+ "identities": [
804
+ "user"
805
+ ],
806
+ "readOnly": true,
807
+ "declaredMode": false,
808
+ "idempotencyKey": false
737
809
  }
738
810
  };
@@ -19,6 +19,10 @@ export interface ResolvedAppServing {
19
19
  * The platform cell (LLD §3.7) whose routing store and template distribution serve this app.
20
20
  */
21
21
  cellId?: string;
22
+ /**
23
+ * How the tenant's cells run the app's server (ADR 0035): `kubernetes`, the cluster cell, or `serverless`, the gateway service with Lambda Web Functions, which serves kit apps only. One choice per tenant, the same in every environment; governance copies it from the tenant's deployment destination, and build and Provision branch on it. Absent means kubernetes.
24
+ */
25
+ hosting?: 'kubernetes' | 'serverless';
22
26
  /**
23
27
  * The cell's CloudFront KeyValueStore ARN; equals edge.routingStoreArn unless the cell record names its own.
24
28
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 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. Google Workspace (0.86.0, ADR 0032: calendar, drive, docs, sheets on the Google OAuth client) and Microsoft 365 (outlook, onedrive, excel, teams on the Microsoft client) are user-consent only like Gmail, one connection per provider with its own consent and scopes; the seven personal providers have no `account` and empty `channels` (their one fixed alias is the signed-in person's own calendar, drive, documents, spreadsheets, mailbox or workbooks); teams is pinned to the Microsoft 365 tenant in `account` like SharePoint and maps channel aliases in `channels`.
3
3
  */
4
- export type SaasProvider = 'slack' | 'gmail' | 'basecamp' | 'sharepoint' | 'phone' | 'calendar' | 'drive' | 'docs' | 'sheets' | 'outlook' | 'onedrive' | 'excel' | 'teams';
4
+ export type SaasProvider = 'slack' | 'gmail' | 'basecamp' | 'sharepoint' | 'phone' | 'calendar' | 'drive' | 'docs' | 'sheets' | 'outlook' | 'onedrive' | 'excel' | 'teams' | 'zohobooks';
5
5
  /**
6
6
  * DISABLED stops every app call immediately (details.code CONNECTION_DISABLED).
7
7
  */
@@ -55,9 +55,21 @@ export interface SaasConnection {
55
55
  * 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; Google Workspace and Microsoft 365 (0.86.0): the calendar.*, drive.*, docs.*, sheets.*, outlook.*, onedrive.*, excel.* and teams.* operations of the connection's provider). Never warehouse.view.read. Phone (0.82.0): phone.sms.list; 0.83.0 adds phone.number.get. Seventy-eight SaaS operations in all since 0.86.0.
56
56
  *
57
57
  * @minItems 1
58
- * @maxItems 78
58
+ * @maxItems 86
59
59
  */
60
- operations: ('slack.channel.history' | 'slack.message.post' | 'slack.message.update' | 'slack.message.delete' | 'slack.dm.send' | 'slack.user.lookup' | 'gmail.thread.list' | 'gmail.thread.read' | 'gmail.message.read' | 'gmail.message.send' | 'gmail.attachment.read' | '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.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' | 'phone.sms.list' | 'phone.number.get' | 'calendar.calendar.list' | 'calendar.event.list' | 'calendar.event.read' | 'calendar.event.create' | 'calendar.event.update' | 'calendar.event.cancel' | 'drive.file.list' | 'drive.file.search' | 'drive.file.read' | 'drive.file.upload' | 'drive.folder.create' | 'docs.document.read' | 'docs.document.create' | 'docs.document.append' | 'docs.text.replace' | 'sheets.spreadsheet.read' | 'sheets.values.read' | 'sheets.values.append' | 'sheets.values.update' | 'sheets.values.clear' | 'sheets.spreadsheet.create' | 'outlook.message.list' | 'outlook.message.read' | 'outlook.attachment.read' | 'outlook.message.send' | 'outlook.message.reply' | 'outlook.event.list' | 'outlook.event.read' | 'outlook.event.create' | 'outlook.event.update' | 'outlook.event.cancel' | 'onedrive.file.list' | 'onedrive.file.search' | 'onedrive.file.read' | 'onedrive.file.upload' | 'onedrive.folder.create' | 'excel.worksheet.list' | 'excel.range.read' | 'excel.range.update' | 'excel.table.list' | 'excel.row.add' | 'excel.worksheet.add' | 'teams.message.list' | 'teams.message.post' | 'teams.reply.post' | 'warehouse.view.read' | 'warehouse.table.append' | 'service.request')[];
60
+ operations: ('slack.channel.history' | 'slack.message.post' | 'slack.message.update' | 'slack.message.delete' | 'slack.dm.send' | 'slack.user.lookup' | 'gmail.thread.list' | 'gmail.thread.read' | 'gmail.message.read' | 'gmail.message.send' | 'gmail.attachment.read' | '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.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' | 'phone.sms.list' | 'phone.number.get' | 'calendar.calendar.list' | 'calendar.event.list' | 'calendar.event.read' | 'calendar.event.create' | 'calendar.event.update' | 'calendar.event.cancel' | 'drive.file.list' | 'drive.file.search' | 'drive.file.read' | 'drive.file.upload' | 'drive.folder.create' | 'docs.document.read' | 'docs.document.create' | 'docs.document.append' | 'docs.text.replace' | 'sheets.spreadsheet.read' | 'sheets.values.read' | 'sheets.values.append' | 'sheets.values.update' | 'sheets.values.clear' | 'sheets.spreadsheet.create' | 'outlook.message.list' | 'outlook.message.read' | 'outlook.attachment.read' | 'outlook.message.send' | 'outlook.message.reply' | 'outlook.event.list' | 'outlook.event.read' | 'outlook.event.create' | 'outlook.event.update' | 'outlook.event.cancel' | 'onedrive.file.list' | 'onedrive.file.search' | 'onedrive.file.read' | 'onedrive.file.upload' | 'onedrive.folder.create' | 'excel.worksheet.list' | 'excel.range.read' | 'excel.range.update' | 'excel.table.list' | 'excel.row.add' | 'excel.worksheet.add' | 'teams.message.list' | 'teams.message.post' | 'teams.reply.post' | 'warehouse.view.read' | 'warehouse.table.append' | 'service.request' | 'zohobooks.contact.list' | 'zohobooks.purchaseorder.list' | 'zohobooks.purchaseorder.read' | 'zohobooks.bill.create' | 'zohobooks.bill.read' | 'zohobooks.invoice.create' | 'zohobooks.invoice.read' | 'zohobooks.invoice.pdf')[];
61
+ /**
62
+ * Explicit user-mode operations eligible for automatic app access, subject to the connection operation ceiling and personal consent. Empty means review all; absent inherits company defaults or the existing userModeApproval migration rule. Governance validates provider and mode compatibility. Background execution still requires personal background consent, not a separate admin grant.
63
+ *
64
+ * @maxItems 86
65
+ */
66
+ automaticUserOperations?: ('slack.channel.history' | 'slack.message.post' | 'slack.message.update' | 'slack.message.delete' | 'slack.dm.send' | 'slack.user.lookup' | 'gmail.thread.list' | 'gmail.thread.read' | 'gmail.message.read' | 'gmail.message.send' | 'gmail.attachment.read' | '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.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' | 'phone.sms.list' | 'phone.number.get' | 'calendar.calendar.list' | 'calendar.event.list' | 'calendar.event.read' | 'calendar.event.create' | 'calendar.event.update' | 'calendar.event.cancel' | 'drive.file.list' | 'drive.file.search' | 'drive.file.read' | 'drive.file.upload' | 'drive.folder.create' | 'docs.document.read' | 'docs.document.create' | 'docs.document.append' | 'docs.text.replace' | 'sheets.spreadsheet.read' | 'sheets.values.read' | 'sheets.values.append' | 'sheets.values.update' | 'sheets.values.clear' | 'sheets.spreadsheet.create' | 'outlook.message.list' | 'outlook.message.read' | 'outlook.attachment.read' | 'outlook.message.send' | 'outlook.message.reply' | 'outlook.event.list' | 'outlook.event.read' | 'outlook.event.create' | 'outlook.event.update' | 'outlook.event.cancel' | 'onedrive.file.list' | 'onedrive.file.search' | 'onedrive.file.read' | 'onedrive.file.upload' | 'onedrive.folder.create' | 'excel.worksheet.list' | 'excel.range.read' | 'excel.range.update' | 'excel.table.list' | 'excel.row.add' | 'excel.worksheet.add' | 'teams.message.list' | 'teams.message.post' | 'teams.reply.post' | 'warehouse.view.read' | 'warehouse.table.append' | 'service.request' | 'zohobooks.contact.list' | 'zohobooks.purchaseorder.list' | 'zohobooks.purchaseorder.read' | 'zohobooks.bill.create' | 'zohobooks.bill.read' | 'zohobooks.invoice.create' | 'zohobooks.invoice.read' | 'zohobooks.invoice.pdf')[];
67
+ /**
68
+ * Reusable permissions for admitted builders on explicit shared SaaS resources. Governance checks registered resources, provider/mode compatibility and the connection operation ceiling. Connection version and audit record changes; no per-entry approval metadata.
69
+ *
70
+ * @maxItems 128
71
+ */
72
+ reusableAccess?: ReusableSaasAccess[];
61
73
  developmentPreapproval: DevelopmentPreapproval;
62
74
  oauthClient?: SaasOauthClient;
63
75
  userModeApproval?: UserModeApproval;
@@ -104,6 +116,10 @@ export interface SaasConnection {
104
116
  installations?: {
105
117
  [k: string]: LegacySaasInstallation;
106
118
  };
119
+ /**
120
+ * Zoho data center. Chosen by the connection administrator, never by an app call.
121
+ */
122
+ region?: 'us' | 'in' | 'eu' | 'au' | 'jp' | 'ca' | 'sa' | 'cn' | 'ae';
107
123
  }
108
124
  /**
109
125
  * The one bot installation of the platform-owned provider app in this tenant's workspace.
@@ -141,6 +157,21 @@ export interface BasecampAccount {
141
157
  */
142
158
  name: string;
143
159
  }
160
+ export interface ReusableSaasAccess {
161
+ /**
162
+ * Tenant-wide logical alias of a connection (governance sourceId) or of a resource under it.
163
+ */
164
+ resource: string;
165
+ /**
166
+ * Whose authority an operation runs under. Fixed per operation, except the declared-mode Slack operations (slack.message.post; since 0.71.0 also slack.channel.history, slack.message.update, slack.message.delete): declared per app for the access request, and named per call among the app's approved modes (execute request `mode`, 0.55.0).
167
+ */
168
+ mode: 'app' | 'user';
169
+ /**
170
+ * @minItems 1
171
+ * @maxItems 86
172
+ */
173
+ operations: ('slack.channel.history' | 'slack.message.post' | 'slack.message.update' | 'slack.message.delete' | 'slack.dm.send' | 'slack.user.lookup' | 'gmail.thread.list' | 'gmail.thread.read' | 'gmail.message.read' | 'gmail.message.send' | 'gmail.attachment.read' | '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.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' | 'phone.sms.list' | 'phone.number.get' | 'calendar.calendar.list' | 'calendar.event.list' | 'calendar.event.read' | 'calendar.event.create' | 'calendar.event.update' | 'calendar.event.cancel' | 'drive.file.list' | 'drive.file.search' | 'drive.file.read' | 'drive.file.upload' | 'drive.folder.create' | 'docs.document.read' | 'docs.document.create' | 'docs.document.append' | 'docs.text.replace' | 'sheets.spreadsheet.read' | 'sheets.values.read' | 'sheets.values.append' | 'sheets.values.update' | 'sheets.values.clear' | 'sheets.spreadsheet.create' | 'outlook.message.list' | 'outlook.message.read' | 'outlook.attachment.read' | 'outlook.message.send' | 'outlook.message.reply' | 'outlook.event.list' | 'outlook.event.read' | 'outlook.event.create' | 'outlook.event.update' | 'outlook.event.cancel' | 'onedrive.file.list' | 'onedrive.file.search' | 'onedrive.file.read' | 'onedrive.file.upload' | 'onedrive.folder.create' | 'excel.worksheet.list' | 'excel.range.read' | 'excel.range.update' | 'excel.table.list' | 'excel.row.add' | 'excel.worksheet.add' | 'teams.message.list' | 'teams.message.post' | 'teams.reply.post' | 'warehouse.view.read' | 'warehouse.table.append' | 'service.request' | 'zohobooks.contact.list' | 'zohobooks.purchaseorder.list' | 'zohobooks.purchaseorder.read' | 'zohobooks.bill.create' | 'zohobooks.bill.read' | 'zohobooks.invoice.create' | 'zohobooks.invoice.read' | 'zohobooks.invoice.pdf')[];
174
+ }
144
175
  export interface DevelopmentPreapproval {
145
176
  /**
146
177
  * Auto-approve development requests within the allowlist.
@@ -86,6 +86,14 @@ export type DeclaredConnection = {
86
86
  'warehouse.view.read'?: AppModeViewOperation;
87
87
  'warehouse.table.append'?: AppModeViewOperation;
88
88
  'service.request'?: ServiceOperation;
89
+ 'zohobooks.contact.list'?: UserModeChannelOperation;
90
+ 'zohobooks.purchaseorder.list'?: UserModeChannelOperation;
91
+ 'zohobooks.purchaseorder.read'?: UserModeChannelOperation;
92
+ 'zohobooks.bill.create'?: UserModeChannelOperation;
93
+ 'zohobooks.bill.read'?: UserModeChannelOperation;
94
+ 'zohobooks.invoice.create'?: UserModeChannelOperation;
95
+ 'zohobooks.invoice.read'?: UserModeChannelOperation;
96
+ 'zohobooks.invoice.pdf'?: UserModeChannelOperation;
89
97
  };
90
98
  };
91
99
  export type IntegrationConnectionKind = 'saas' | 'database' | 'service';
@@ -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.88.0.0" as const;
5
- export const ContractPublishVersion = "0.88.0" as const;
6
- export const ContractPublishTag = "v0.88.0" as const;
7
- export const ContractSchemasDigest = "sha256:23e1cb0d9f92c4ea5c2b827aeab9266dfee0ed503457ba5bdc101c39212e8c6f" as const;
4
+ export const ContractRepositoryVersion = "0.91.0.0" as const;
5
+ export const ContractPublishVersion = "0.91.0" as const;
6
+ export const ContractPublishTag = "v0.91.0" as const;
7
+ export const ContractSchemasDigest = "sha256:b6ef945b91544184715900ca739d16f3ad8a40d5307a3b04d71cf7ac39c4fb39" as const;
8
8
  export const ContractAiFixturesDigest = "sha256:edac31c92e146ca1c40130f2fb5649db82e24b8cd1ac758153b90612052fddb6" as const;
9
- export const ContractGeneratedGoDigest = "sha256:05eef493dc05e9f7ef4fbbf0aa4dbba5743ceb12a9baded16c875c33e9ed50bb" as const;
10
- export const ContractGeneratedTypeScriptDigest = "sha256:20e6bfe9e9c7689331b42ea841f6bcc6b0450fb0accc81b451ffba2f1ec2befb" as const;
9
+ export const ContractGeneratedGoDigest = "sha256:7dc23154d2d8cc3a50733c32bc005d71afa877ab327d89a3c3a7dc8dbec7dc5b" as const;
10
+ export const ContractGeneratedTypeScriptDigest = "sha256:ae301b3932627690ffc23da6368dac812e5e33968dbe65fed52716c4896cbfcb" as const;
@@ -35,7 +35,7 @@ export interface DataGrantV2 {
35
35
  /**
36
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 78
38
+ * @maxItems 86
39
39
  */
40
40
  operations: (
41
41
  | 'slack.channel.history'
@@ -119,6 +119,14 @@ export interface DataGrantV2 {
119
119
  | 'warehouse.view.read'
120
120
  | 'warehouse.table.append'
121
121
  | 'service.request'
122
+ | 'zohobooks.contact.list'
123
+ | 'zohobooks.purchaseorder.list'
124
+ | 'zohobooks.purchaseorder.read'
125
+ | 'zohobooks.bill.create'
126
+ | 'zohobooks.bill.read'
127
+ | 'zohobooks.invoice.create'
128
+ | 'zohobooks.invoice.read'
129
+ | 'zohobooks.invoice.pdf'
122
130
  )[];
123
131
  /**
124
132
  * Approved logical resources. Never inherited by wildcard. Empty until the first approval.
@@ -126,6 +134,7 @@ export interface DataGrantV2 {
126
134
  * @maxItems 64
127
135
  */
128
136
  resources: IntegrationResource[];
137
+ reviewedScope?: ReviewedIntegrationScope;
129
138
  /**
130
139
  * Absent only for explicitly approved ongoing production access.
131
140
  */
@@ -183,6 +192,109 @@ export interface IntegrationResource {
183
192
  */
184
193
  columns?: string[];
185
194
  }
195
+ /**
196
+ * Only for SaaS grants mixing reviewed and automatic access: the previously human-reviewed scope. The remaining scope must satisfy current automatic rules. Homogeneous grants continue using approvedBy alone. Governance validates this is a subset of the grant; database behaviour is unchanged.
197
+ */
198
+ export interface ReviewedIntegrationScope {
199
+ /**
200
+ * @maxItems 86
201
+ */
202
+ operations: (
203
+ | 'slack.channel.history'
204
+ | 'slack.message.post'
205
+ | 'slack.message.update'
206
+ | 'slack.message.delete'
207
+ | 'slack.dm.send'
208
+ | 'slack.user.lookup'
209
+ | 'gmail.thread.list'
210
+ | 'gmail.thread.read'
211
+ | 'gmail.message.read'
212
+ | 'gmail.message.send'
213
+ | 'gmail.attachment.read'
214
+ | 'basecamp.project.list'
215
+ | 'basecamp.todolist.list'
216
+ | 'basecamp.todo.list'
217
+ | 'basecamp.todo.create'
218
+ | 'basecamp.todo.complete'
219
+ | 'basecamp.message.list'
220
+ | 'basecamp.message.post'
221
+ | 'basecamp.comment.list'
222
+ | 'basecamp.comment.post'
223
+ | 'basecamp.campfire.post'
224
+ | 'basecamp.people.list'
225
+ | 'sharepoint.list.list'
226
+ | 'sharepoint.item.list'
227
+ | 'sharepoint.item.create'
228
+ | 'sharepoint.item.update'
229
+ | 'sharepoint.drive.list'
230
+ | 'sharepoint.file.list'
231
+ | 'sharepoint.file.search'
232
+ | 'sharepoint.file.read'
233
+ | 'sharepoint.file.upload'
234
+ | 'phone.sms.list'
235
+ | 'phone.number.get'
236
+ | 'calendar.calendar.list'
237
+ | 'calendar.event.list'
238
+ | 'calendar.event.read'
239
+ | 'calendar.event.create'
240
+ | 'calendar.event.update'
241
+ | 'calendar.event.cancel'
242
+ | 'drive.file.list'
243
+ | 'drive.file.search'
244
+ | 'drive.file.read'
245
+ | 'drive.file.upload'
246
+ | 'drive.folder.create'
247
+ | 'docs.document.read'
248
+ | 'docs.document.create'
249
+ | 'docs.document.append'
250
+ | 'docs.text.replace'
251
+ | 'sheets.spreadsheet.read'
252
+ | 'sheets.values.read'
253
+ | 'sheets.values.append'
254
+ | 'sheets.values.update'
255
+ | 'sheets.values.clear'
256
+ | 'sheets.spreadsheet.create'
257
+ | 'outlook.message.list'
258
+ | 'outlook.message.read'
259
+ | 'outlook.attachment.read'
260
+ | 'outlook.message.send'
261
+ | 'outlook.message.reply'
262
+ | 'outlook.event.list'
263
+ | 'outlook.event.read'
264
+ | 'outlook.event.create'
265
+ | 'outlook.event.update'
266
+ | 'outlook.event.cancel'
267
+ | 'onedrive.file.list'
268
+ | 'onedrive.file.search'
269
+ | 'onedrive.file.read'
270
+ | 'onedrive.file.upload'
271
+ | 'onedrive.folder.create'
272
+ | 'excel.worksheet.list'
273
+ | 'excel.range.read'
274
+ | 'excel.range.update'
275
+ | 'excel.table.list'
276
+ | 'excel.row.add'
277
+ | 'excel.worksheet.add'
278
+ | 'teams.message.list'
279
+ | 'teams.message.post'
280
+ | 'teams.reply.post'
281
+ | 'warehouse.view.read'
282
+ | 'warehouse.table.append'
283
+ | 'service.request'
284
+ | 'zohobooks.contact.list'
285
+ | 'zohobooks.purchaseorder.list'
286
+ | 'zohobooks.purchaseorder.read'
287
+ | 'zohobooks.bill.create'
288
+ | 'zohobooks.bill.read'
289
+ | 'zohobooks.invoice.create'
290
+ | 'zohobooks.invoice.read'
291
+ | 'zohobooks.invoice.pdf'
292
+ )[];
293
+ /**
294
+ * @maxItems 64
295
+ */
296
+ resources: IntegrationResource[];
297
+ }
186
298
  /**
187
299
  * App-mode Slack grants only: how the app's posts are presented, as IT approved it. Absent means the posts carry the bot's own name.
188
300
  */
@@ -697,6 +697,76 @@ export const IntegrationExecuteInputRules = {
697
697
  body: { kind: "object", required: false },
698
698
  },
699
699
  },
700
+ "zohobooks.contact.list": {
701
+ idempotencyKey: false,
702
+ fields: {
703
+ q: { kind: "string", required: false, minLength: 1, maxLength: 256 },
704
+ pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
705
+ },
706
+ },
707
+ "zohobooks.purchaseorder.list": {
708
+ idempotencyKey: false,
709
+ fields: {
710
+ vendorId: { kind: "string", required: true, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
711
+ pageToken: { kind: "string", required: false, minLength: 1, maxLength: 2048 },
712
+ },
713
+ },
714
+ "zohobooks.purchaseorder.read": {
715
+ idempotencyKey: false,
716
+ fields: {
717
+ purchaseOrderId: { kind: "string", required: true, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
718
+ },
719
+ },
720
+ "zohobooks.bill.create": {
721
+ idempotencyKey: true,
722
+ fields: {
723
+ vendorId: { kind: "string", required: true, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
724
+ documentNumber: { kind: "string", required: true, minLength: 1, maxLength: 100 },
725
+ documentDate: { kind: "string", required: true, minLength: 0, maxLength: 10, pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
726
+ purchaseOrderId: { kind: "string", required: false, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
727
+ lineItems: { kind: "object[]", required: true, minItems: 1, maxItems: 100, fields: {
728
+ itemId: { kind: "string", required: true, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
729
+ quantity: { kind: "string", required: true, minLength: 0, maxLength: 17, pattern: "^[0-9]{1,10}(\\.[0-9]{1,6})?$" },
730
+ rate: { kind: "string", required: true, minLength: 0, maxLength: 17, pattern: "^[0-9]{1,10}(\\.[0-9]{1,6})?$" },
731
+ taxId: { kind: "string", required: false, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
732
+ description: { kind: "string", required: false, minLength: 0, maxLength: 2000 },
733
+ } },
734
+ },
735
+ },
736
+ "zohobooks.bill.read": {
737
+ idempotencyKey: false,
738
+ fields: {
739
+ documentId: { kind: "string", required: true, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
740
+ },
741
+ },
742
+ "zohobooks.invoice.create": {
743
+ idempotencyKey: true,
744
+ fields: {
745
+ customerId: { kind: "string", required: true, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
746
+ documentNumber: { kind: "string", required: false, minLength: 1, maxLength: 100 },
747
+ documentDate: { kind: "string", required: true, minLength: 0, maxLength: 10, pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
748
+ referenceNumber: { kind: "string", required: false, minLength: 1, maxLength: 100 },
749
+ lineItems: { kind: "object[]", required: true, minItems: 1, maxItems: 100, fields: {
750
+ itemId: { kind: "string", required: true, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
751
+ quantity: { kind: "string", required: true, minLength: 0, maxLength: 17, pattern: "^[0-9]{1,10}(\\.[0-9]{1,6})?$" },
752
+ rate: { kind: "string", required: true, minLength: 0, maxLength: 17, pattern: "^[0-9]{1,10}(\\.[0-9]{1,6})?$" },
753
+ taxId: { kind: "string", required: false, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
754
+ description: { kind: "string", required: false, minLength: 0, maxLength: 2000 },
755
+ } },
756
+ },
757
+ },
758
+ "zohobooks.invoice.read": {
759
+ idempotencyKey: false,
760
+ fields: {
761
+ documentId: { kind: "string", required: true, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
762
+ },
763
+ },
764
+ "zohobooks.invoice.pdf": {
765
+ idempotencyKey: false,
766
+ fields: {
767
+ documentId: { kind: "string", required: true, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
768
+ },
769
+ },
700
770
  } as const satisfies Record<string, IntegrationExecuteOperationRule>;
701
771
 
702
772
  export type IntegrationExecuteOperation = keyof typeof IntegrationExecuteInputRules;
@@ -93,7 +93,15 @@ export type IntegrationExecuteRequest = {
93
93
  | 'teams.reply.post'
94
94
  | 'warehouse.view.read'
95
95
  | 'warehouse.table.append'
96
- | 'service.request';
96
+ | 'service.request'
97
+ | 'zohobooks.contact.list'
98
+ | 'zohobooks.purchaseorder.list'
99
+ | 'zohobooks.purchaseorder.read'
100
+ | 'zohobooks.bill.create'
101
+ | 'zohobooks.bill.read'
102
+ | 'zohobooks.invoice.create'
103
+ | 'zohobooks.invoice.read'
104
+ | 'zohobooks.invoice.pdf';
97
105
  /**
98
106
  * Tenant-wide logical alias of a connection (governance sourceId) or of a resource under it.
99
107
  */
@@ -383,7 +391,7 @@ export type IntegrationExecuteRequest = {
383
391
  */
384
392
  allDay?: boolean;
385
393
  /**
386
- * docs.document.read / docs.document.append / docs.text.replace (0.86.0): the Google Docs document id (the `/document/d/<id>` path segment, or a docs.document.create result's id).
394
+ * Google Docs document id or Zoho Books document id; each operation restricts its provider format.
387
395
  */
388
396
  documentId?: string;
389
397
  /**
@@ -443,6 +451,23 @@ export type IntegrationExecuteRequest = {
443
451
  * @maxItems 20
444
452
  */
445
453
  sheets?: string[];
454
+ vendorId?: string;
455
+ customerId?: string;
456
+ purchaseOrderId?: string;
457
+ documentNumber?: string;
458
+ documentDate?: string;
459
+ referenceNumber?: string;
460
+ /**
461
+ * @minItems 1
462
+ * @maxItems 100
463
+ */
464
+ lineItems?: {
465
+ itemId: string;
466
+ quantity: string;
467
+ rate: string;
468
+ taxId?: string;
469
+ description?: string;
470
+ }[];
446
471
  };
447
472
  /**
448
473
  * 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) the receipted warehouse append (warehouse.table.append; 0.82.0, where it is also the BigQuery load job id) and the receipted Google Workspace and Microsoft 365 writes (0.86.0: calendar.event.create, drive.file.upload, drive.folder.create, docs.document.create, sheets.values.append, sheets.spreadsheet.create, outlook.message.send, outlook.message.reply, outlook.event.create, onedrive.file.upload, onedrive.folder.create, excel.row.add, excel.worksheet.add, teams.message.post, teams.reply.post), refused everywhere else. The same key with the same payload and subject returns the recorded outcome for seven days.
@@ -289,6 +289,55 @@ export type IntegrationExecuteResult = {
289
289
  [k: string]: string;
290
290
  };
291
291
  body?: unknown;
292
+ booksDocument?: {
293
+ id: string;
294
+ number: string;
295
+ status: string;
296
+ currency: string;
297
+ total: string;
298
+ vendorId?: string;
299
+ customerId?: string;
300
+ /**
301
+ * @maxItems 100
302
+ */
303
+ lineItems: {
304
+ itemId: string;
305
+ quantity: string;
306
+ rate: string;
307
+ total: string;
308
+ description?: string;
309
+ }[];
310
+ };
311
+ /**
312
+ * @maxItems 100
313
+ */
314
+ booksContacts?: {
315
+ id: string;
316
+ name: string;
317
+ type: string;
318
+ }[];
319
+ /**
320
+ * @maxItems 100
321
+ */
322
+ booksPurchaseOrders?: {
323
+ id: string;
324
+ number: string;
325
+ status: string;
326
+ currency: string;
327
+ total: string;
328
+ vendorId?: string;
329
+ customerId?: string;
330
+ /**
331
+ * @maxItems 100
332
+ */
333
+ lineItems: {
334
+ itemId: string;
335
+ quantity: string;
336
+ rate: string;
337
+ total: string;
338
+ description?: string;
339
+ }[];
340
+ }[];
292
341
  };
293
342
  /**
294
343
  * An event's state (0.86.0): confirmed (Google `confirmed`, Graph not cancelled and not tentative), tentative, or cancelled.