@fourier-labs/harbour-contracts 0.44.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +4 -0
  2. package/contract-release.json +26 -8
  3. package/dist/gen-ts/app-integrations-declaration.d.ts +48 -0
  4. package/dist/gen-ts/app-integrations-declaration.js +3 -0
  5. package/dist/gen-ts/contract-release.d.ts +6 -6
  6. package/dist/gen-ts/contract-release.js +6 -6
  7. package/dist/gen-ts/data-grant-v2.d.ts +84 -0
  8. package/dist/gen-ts/data-grant-v2.js +13 -0
  9. package/dist/gen-ts/index.d.ts +9 -0
  10. package/dist/gen-ts/index.js +9 -0
  11. package/dist/gen-ts/integration-connect-result.d.ts +14 -0
  12. package/dist/gen-ts/integration-connect-result.js +3 -0
  13. package/dist/gen-ts/integration-error-details.d.ts +22 -0
  14. package/dist/gen-ts/integration-error-details.js +3 -0
  15. package/dist/gen-ts/integration-execute-request.d.ts +30 -0
  16. package/dist/gen-ts/integration-execute-request.js +3 -0
  17. package/dist/gen-ts/integration-execute-result.d.ts +23 -0
  18. package/dist/gen-ts/integration-execute-result.js +3 -0
  19. package/dist/gen-ts/kit-bundle-manifest.d.ts +40 -0
  20. package/dist/gen-ts/kit-bundle-manifest.js +3 -0
  21. package/dist/gen-ts/kit-lock.d.ts +54 -0
  22. package/dist/gen-ts/kit-lock.js +3 -0
  23. package/dist/gen-ts/saas-connection.d.ts +73 -0
  24. package/dist/gen-ts/saas-connection.js +3 -0
  25. package/gen-ts/app-integrations-declaration.ts +52 -0
  26. package/gen-ts/contract-release.ts +6 -6
  27. package/gen-ts/data-grant-v2.ts +98 -0
  28. package/gen-ts/index.ts +9 -0
  29. package/gen-ts/integration-connect-result.ts +21 -0
  30. package/gen-ts/integration-error-details.ts +47 -0
  31. package/gen-ts/integration-execute-request.ts +33 -0
  32. package/gen-ts/integration-execute-result.ts +27 -0
  33. package/gen-ts/kit-bundle-manifest.ts +44 -0
  34. package/gen-ts/kit-lock.ts +56 -0
  35. package/gen-ts/saas-connection.ts +77 -0
  36. package/package.json +1 -1
  37. package/schema/app-integrations-declaration.schema.json +144 -0
  38. package/schema/data-grant-v2.schema.json +108 -0
  39. package/schema/integration-connect-result.schema.json +24 -0
  40. package/schema/integration-error-details.schema.json +64 -0
  41. package/schema/integration-execute-request.schema.json +73 -0
  42. package/schema/integration-execute-result.schema.json +48 -0
  43. package/schema/kit-bundle-manifest.schema.json +73 -0
  44. package/schema/kit-lock.schema.json +37 -0
  45. package/schema/saas-connection.schema.json +115 -0
@@ -0,0 +1,115 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://schemas.harbour.dev/saas-connection.schema.json",
4
+ "title": "SaasConnection",
5
+ "description": "Tenant-wide SaaS connection record (control table sk SAASCONN#<sourceId>, same tenant partition as database sources; alias uniqueness is enforced across both). IT maps each environment to a provider installation and logical channel aliases to channel IDs; apps only ever see the aliases. Contains references, never secrets: the client secret lives in Secrets Manager under clientSecretRef and installation tokens under their own token records.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["sourceId", "kind", "provider", "displayName", "status", "version", "clientId", "environments", "operations", "developmentPreapproval"],
9
+ "properties": {
10
+ "sourceId": { "$ref": "app-integrations-declaration.schema.json#/definitions/IntegrationAlias" },
11
+ "kind": { "type": "string", "const": "saas" },
12
+ "provider": { "type": "string", "enum": ["slack"] },
13
+ "displayName": { "type": "string", "minLength": 1, "maxLength": 255 },
14
+ "status": { "$ref": "#/definitions/SaasConnectionStatus" },
15
+ "version": { "type": "integer", "minimum": 1, "description": "Optimistic-concurrency version; every write is conditional on it." },
16
+ "clientId": { "type": "string", "minLength": 1, "maxLength": 255 },
17
+ "clientSecretRef": {
18
+ "type": "string",
19
+ "pattern": "^secretref://[A-Za-z0-9][A-Za-z0-9/_.:-]*$",
20
+ "description": "secretref://tenant/{tenantId}/saas/{sourceId}/client"
21
+ },
22
+ "environments": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "minProperties": 1,
26
+ "properties": {
27
+ "development": { "$ref": "#/definitions/SaasEnvironmentMapping" },
28
+ "preview": { "$ref": "#/definitions/SaasEnvironmentMapping" },
29
+ "production": { "$ref": "#/definitions/SaasEnvironmentMapping" }
30
+ }
31
+ },
32
+ "operations": {
33
+ "type": "array",
34
+ "minItems": 1,
35
+ "maxItems": 2,
36
+ "uniqueItems": true,
37
+ "items": { "type": "string", "enum": ["slack.channel.history", "slack.message.post"] },
38
+ "description": "Operations IT allows apps to request on this connection."
39
+ },
40
+ "developmentPreapproval": { "$ref": "#/definitions/DevelopmentPreapproval" },
41
+ "installations": {
42
+ "type": "object",
43
+ "propertyNames": { "$ref": "#/definitions/InstallationName" },
44
+ "additionalProperties": { "$ref": "#/definitions/SaasInstallation" },
45
+ "description": "Provider installations keyed by the installation name environments point at."
46
+ },
47
+ "createdAt": { "type": "string", "format": "date-time" },
48
+ "updatedAt": { "type": "string", "format": "date-time" }
49
+ },
50
+ "definitions": {
51
+ "SaasConnectionStatus": {
52
+ "type": "string",
53
+ "enum": ["ACTIVE", "DISABLED"],
54
+ "description": "DISABLED stops every app call immediately (details.code CONNECTION_DISABLED)."
55
+ },
56
+ "InstallationName": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,62}$" },
57
+ "SaasEnvironmentMapping": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": ["installation", "channels"],
61
+ "properties": {
62
+ "installation": { "$ref": "#/definitions/InstallationName" },
63
+ "channels": {
64
+ "type": "object",
65
+ "maxProperties": 64,
66
+ "propertyNames": { "$ref": "app-integrations-declaration.schema.json#/definitions/IntegrationAlias" },
67
+ "additionalProperties": { "type": "string", "pattern": "^[A-Z0-9]{1,32}$", "description": "Provider channel ID; only public, non-archived channels are valid." }
68
+ }
69
+ }
70
+ },
71
+ "DevelopmentPreapproval": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["enabled", "hours"],
75
+ "properties": {
76
+ "enabled": { "type": "boolean", "description": "Auto-approve development requests within the allowlist." },
77
+ "hours": { "type": "integer", "minimum": 1, "maximum": 168, "description": "Development grant duration; default 24." }
78
+ }
79
+ },
80
+ "SaasInstallation": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": ["tokenRecordId", "workspaceId", "botUserId", "status"],
84
+ "properties": {
85
+ "tokenRecordId": { "type": "string", "minLength": 1, "maxLength": 128 },
86
+ "workspaceId": { "type": "string", "minLength": 1, "maxLength": 128 },
87
+ "botUserId": { "type": "string", "minLength": 1, "maxLength": 128 },
88
+ "status": { "type": "string", "enum": ["ACTIVE", "RECONNECT_REQUIRED", "REVOKED"] }
89
+ }
90
+ }
91
+ },
92
+ "examples": [
93
+ {
94
+ "sourceId": "company-slack",
95
+ "kind": "saas",
96
+ "provider": "slack",
97
+ "displayName": "Company Slack",
98
+ "status": "ACTIVE",
99
+ "version": 3,
100
+ "clientId": "1234567890.1234567890",
101
+ "clientSecretRef": "secretref://tenant/fourier/saas/company-slack/client",
102
+ "environments": {
103
+ "development": { "installation": "nonprod", "channels": { "team-updates": "C0123NONPROD" } },
104
+ "production": { "installation": "prod", "channels": { "team-updates": "C0123PROD" } }
105
+ },
106
+ "operations": ["slack.channel.history", "slack.message.post"],
107
+ "developmentPreapproval": { "enabled": true, "hours": 24 },
108
+ "installations": {
109
+ "nonprod": { "tokenRecordId": "tok_nonprod", "workspaceId": "T0NONPROD", "botUserId": "U0BOT", "status": "ACTIVE" }
110
+ },
111
+ "createdAt": "2026-09-09T08:00:00Z",
112
+ "updatedAt": "2026-09-09T08:00:00Z"
113
+ }
114
+ ]
115
+ }