@contractspec/example.integration-hub 1.57.0 → 1.58.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/dist/browser/connection/connection.enum.js +12 -0
- package/dist/browser/connection/connection.operation.js +101 -0
- package/dist/browser/connection/connection.presentation.js +99 -0
- package/dist/browser/connection/connection.schema.js +48 -0
- package/dist/browser/connection/index.js +104 -0
- package/dist/browser/docs/index.js +104 -0
- package/dist/browser/docs/integration-hub.docblock.js +104 -0
- package/dist/browser/events.js +211 -0
- package/dist/browser/example.js +42 -0
- package/dist/browser/handlers/index.js +246 -0
- package/dist/browser/handlers/integration.handlers.js +246 -0
- package/dist/browser/index.js +1595 -0
- package/dist/browser/integration/index.js +92 -0
- package/dist/browser/integration/integration.enum.js +12 -0
- package/dist/browser/integration/integration.operations.js +89 -0
- package/dist/browser/integration/integration.presentation.js +117 -0
- package/dist/browser/integration/integration.schema.js +42 -0
- package/dist/browser/integration-hub.capability.js +40 -0
- package/dist/browser/integration-hub.feature.js +114 -0
- package/dist/browser/seeders/index.js +60 -0
- package/dist/browser/sync/index.js +332 -0
- package/dist/browser/sync/sync.enum.js +26 -0
- package/dist/browser/sync/sync.operations.js +321 -0
- package/dist/browser/sync/sync.presentation.js +298 -0
- package/dist/browser/sync/sync.schema.js +154 -0
- package/dist/browser/sync-engine/index.js +186 -0
- package/dist/browser/tests/operations.test-spec.js +85 -0
- package/dist/browser/ui/IntegrationDashboard.js +369 -0
- package/dist/browser/ui/hooks/index.js +57 -0
- package/dist/browser/ui/hooks/useIntegrationData.js +54 -0
- package/dist/browser/ui/index.js +644 -0
- package/dist/browser/ui/renderers/index.js +273 -0
- package/dist/browser/ui/renderers/integration.markdown.js +273 -0
- package/dist/connection/connection.enum.d.ts +1 -6
- package/dist/connection/connection.enum.d.ts.map +1 -1
- package/dist/connection/connection.enum.js +11 -15
- package/dist/connection/connection.operation.d.ts +78 -84
- package/dist/connection/connection.operation.d.ts.map +1 -1
- package/dist/connection/connection.operation.js +99 -60
- package/dist/connection/connection.presentation.d.ts +2 -7
- package/dist/connection/connection.presentation.d.ts.map +1 -1
- package/dist/connection/connection.presentation.js +96 -56
- package/dist/connection/connection.schema.d.ts +54 -59
- package/dist/connection/connection.schema.d.ts.map +1 -1
- package/dist/connection/connection.schema.js +46 -73
- package/dist/connection/index.d.ts +7 -4
- package/dist/connection/index.d.ts.map +1 -0
- package/dist/connection/index.js +104 -4
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +105 -1
- package/dist/docs/integration-hub.docblock.d.ts +2 -1
- package/dist/docs/integration-hub.docblock.d.ts.map +1 -0
- package/dist/docs/integration-hub.docblock.js +45 -56
- package/dist/events.d.ts +137 -143
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +210 -287
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +41 -55
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +247 -3
- package/dist/handlers/integration.handlers.d.ts +114 -113
- package/dist/handlers/integration.handlers.d.ts.map +1 -1
- package/dist/handlers/integration.handlers.js +232 -267
- package/dist/index.d.ts +12 -19
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1596 -20
- package/dist/integration/index.d.ts +7 -4
- package/dist/integration/index.d.ts.map +1 -0
- package/dist/integration/index.js +92 -4
- package/dist/integration/integration.enum.d.ts +1 -6
- package/dist/integration/integration.enum.d.ts.map +1 -1
- package/dist/integration/integration.enum.js +11 -15
- package/dist/integration/integration.operations.d.ts +74 -80
- package/dist/integration/integration.operations.d.ts.map +1 -1
- package/dist/integration/integration.operations.js +87 -54
- package/dist/integration/integration.presentation.d.ts +3 -8
- package/dist/integration/integration.presentation.d.ts.map +1 -1
- package/dist/integration/integration.presentation.js +114 -73
- package/dist/integration/integration.schema.d.ts +54 -59
- package/dist/integration/integration.schema.d.ts.map +1 -1
- package/dist/integration/integration.schema.js +40 -73
- package/dist/integration-hub.capability.d.ts +3 -8
- package/dist/integration-hub.capability.d.ts.map +1 -1
- package/dist/integration-hub.capability.js +41 -38
- package/dist/integration-hub.feature.d.ts +1 -6
- package/dist/integration-hub.feature.d.ts.map +1 -1
- package/dist/integration-hub.feature.js +113 -242
- package/dist/node/connection/connection.enum.js +12 -0
- package/dist/node/connection/connection.operation.js +101 -0
- package/dist/node/connection/connection.presentation.js +99 -0
- package/dist/node/connection/connection.schema.js +48 -0
- package/dist/node/connection/index.js +104 -0
- package/dist/node/docs/index.js +104 -0
- package/dist/node/docs/integration-hub.docblock.js +104 -0
- package/dist/node/events.js +211 -0
- package/dist/node/example.js +42 -0
- package/dist/node/handlers/index.js +246 -0
- package/dist/node/handlers/integration.handlers.js +246 -0
- package/dist/node/index.js +1595 -0
- package/dist/node/integration/index.js +92 -0
- package/dist/node/integration/integration.enum.js +12 -0
- package/dist/node/integration/integration.operations.js +89 -0
- package/dist/node/integration/integration.presentation.js +117 -0
- package/dist/node/integration/integration.schema.js +42 -0
- package/dist/node/integration-hub.capability.js +40 -0
- package/dist/node/integration-hub.feature.js +114 -0
- package/dist/node/seeders/index.js +60 -0
- package/dist/node/sync/index.js +332 -0
- package/dist/node/sync/sync.enum.js +26 -0
- package/dist/node/sync/sync.operations.js +321 -0
- package/dist/node/sync/sync.presentation.js +298 -0
- package/dist/node/sync/sync.schema.js +154 -0
- package/dist/node/sync-engine/index.js +186 -0
- package/dist/node/tests/operations.test-spec.js +85 -0
- package/dist/node/ui/IntegrationDashboard.js +369 -0
- package/dist/node/ui/hooks/index.js +57 -0
- package/dist/node/ui/hooks/useIntegrationData.js +54 -0
- package/dist/node/ui/index.js +644 -0
- package/dist/node/ui/renderers/index.js +273 -0
- package/dist/node/ui/renderers/integration.markdown.js +273 -0
- package/dist/seeders/index.d.ts +4 -8
- package/dist/seeders/index.d.ts.map +1 -1
- package/dist/seeders/index.js +54 -52
- package/dist/sync/index.d.ts +7 -4
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +332 -4
- package/dist/sync/sync.enum.d.ts +3 -8
- package/dist/sync/sync.enum.d.ts.map +1 -1
- package/dist/sync/sync.enum.js +23 -31
- package/dist/sync/sync.operations.d.ts +413 -419
- package/dist/sync/sync.operations.d.ts.map +1 -1
- package/dist/sync/sync.operations.js +316 -197
- package/dist/sync/sync.presentation.d.ts +6 -11
- package/dist/sync/sync.presentation.d.ts.map +1 -1
- package/dist/sync/sync.presentation.js +291 -160
- package/dist/sync/sync.schema.d.ts +317 -322
- package/dist/sync/sync.schema.d.ts.map +1 -1
- package/dist/sync/sync.schema.js +146 -295
- package/dist/sync-engine/index.d.ts +88 -91
- package/dist/sync-engine/index.d.ts.map +1 -1
- package/dist/sync-engine/index.js +181 -142
- package/dist/tests/operations.test-spec.d.ts +3 -8
- package/dist/tests/operations.test-spec.d.ts.map +1 -1
- package/dist/tests/operations.test-spec.js +82 -90
- package/dist/ui/IntegrationDashboard.d.ts +1 -6
- package/dist/ui/IntegrationDashboard.d.ts.map +1 -1
- package/dist/ui/IntegrationDashboard.js +365 -261
- package/dist/ui/hooks/index.d.ts +2 -2
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +57 -4
- package/dist/ui/hooks/useIntegrationData.d.ts +16 -20
- package/dist/ui/hooks/useIntegrationData.d.ts.map +1 -1
- package/dist/ui/hooks/useIntegrationData.js +51 -55
- package/dist/ui/index.d.ts +7 -6
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +644 -5
- package/dist/ui/renderers/index.d.ts +2 -2
- package/dist/ui/renderers/index.d.ts.map +1 -0
- package/dist/ui/renderers/index.js +274 -3
- package/dist/ui/renderers/integration.markdown.d.ts +13 -14
- package/dist/ui/renderers/integration.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/integration.markdown.js +268 -264
- package/package.json +360 -71
- package/dist/connection/connection.enum.js.map +0 -1
- package/dist/connection/connection.operation.js.map +0 -1
- package/dist/connection/connection.presentation.js.map +0 -1
- package/dist/connection/connection.schema.js.map +0 -1
- package/dist/docs/integration-hub.docblock.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/integration.handlers.js.map +0 -1
- package/dist/integration/integration.enum.js.map +0 -1
- package/dist/integration/integration.operations.js.map +0 -1
- package/dist/integration/integration.presentation.js.map +0 -1
- package/dist/integration/integration.schema.js.map +0 -1
- package/dist/integration-hub.capability.js.map +0 -1
- package/dist/integration-hub.feature.js.map +0 -1
- package/dist/seeders/index.js.map +0 -1
- package/dist/sync/sync.enum.js.map +0 -1
- package/dist/sync/sync.operations.js.map +0 -1
- package/dist/sync/sync.presentation.js.map +0 -1
- package/dist/sync/sync.schema.js.map +0 -1
- package/dist/sync-engine/index.js.map +0 -1
- package/dist/tests/operations.test-spec.js.map +0 -1
- package/dist/ui/IntegrationDashboard.js.map +0 -1
- package/dist/ui/hooks/useIntegrationData.js.map +0 -1
- package/dist/ui/renderers/integration.markdown.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,73 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.integration-hub",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.0",
|
|
4
4
|
"description": "Integration Hub example with sync engine and field mappings for ContractSpec",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
9
9
|
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
10
|
-
"build": "bun build:
|
|
11
|
-
"build:bundle": "
|
|
12
|
-
"build:types": "
|
|
13
|
-
"dev": "bun
|
|
10
|
+
"build": "bun run prebuild && bun run build:bundle && bun run build:types",
|
|
11
|
+
"build:bundle": "contractspec-bun-build transpile",
|
|
12
|
+
"build:types": "contractspec-bun-build types",
|
|
13
|
+
"dev": "contractspec-bun-build dev",
|
|
14
14
|
"clean": "rimraf dist .turbo",
|
|
15
15
|
"lint": "bun lint:fix",
|
|
16
16
|
"lint:fix": "eslint src --fix",
|
|
17
17
|
"lint:check": "eslint src",
|
|
18
|
-
"validate": "contractspec validate \"src/**/*\""
|
|
18
|
+
"validate": "contractspec validate \"src/**/*\"",
|
|
19
|
+
"prebuild": "contractspec-bun-build prebuild",
|
|
20
|
+
"typecheck": "tsc --noEmit"
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
|
-
"@contractspec/lib.schema": "1.
|
|
22
|
-
"@contractspec/lib.contracts": "1.
|
|
23
|
-
"@contractspec/lib.example-shared-ui": "1.
|
|
24
|
-
"@contractspec/lib.design-system": "1.
|
|
25
|
-
"@contractspec/lib.runtime-sandbox": "0.
|
|
23
|
+
"@contractspec/lib.schema": "1.58.0",
|
|
24
|
+
"@contractspec/lib.contracts": "1.58.0",
|
|
25
|
+
"@contractspec/lib.example-shared-ui": "1.12.0",
|
|
26
|
+
"@contractspec/lib.design-system": "1.58.0",
|
|
27
|
+
"@contractspec/lib.runtime-sandbox": "0.13.0",
|
|
26
28
|
"react": "19.2.4",
|
|
27
29
|
"react-dom": "19.2.4"
|
|
28
30
|
},
|
|
29
31
|
"devDependencies": {
|
|
30
|
-
"@contractspec/tool.typescript": "1.
|
|
31
|
-
"@contractspec/tool.tsdown": "1.57.0",
|
|
32
|
+
"@contractspec/tool.typescript": "1.58.0",
|
|
32
33
|
"typescript": "^5.9.3",
|
|
33
34
|
"@types/react": "^19.2.13",
|
|
34
|
-
"@types/react-dom": "^19.2.2"
|
|
35
|
+
"@types/react-dom": "^19.2.2",
|
|
36
|
+
"@contractspec/tool.bun": "1.57.0"
|
|
35
37
|
},
|
|
36
38
|
"exports": {
|
|
37
|
-
".": "./
|
|
38
|
-
"./connection": "./
|
|
39
|
-
"./connection/connection.enum": "./
|
|
40
|
-
"./connection/connection.operation": "./
|
|
41
|
-
"./connection/connection.presentation": "./
|
|
42
|
-
"./connection/connection.schema": "./
|
|
43
|
-
"./
|
|
44
|
-
"./docs
|
|
45
|
-
"./
|
|
46
|
-
"./
|
|
47
|
-
"./
|
|
48
|
-
"./
|
|
49
|
-
"./
|
|
50
|
-
"./
|
|
51
|
-
"./integration
|
|
52
|
-
"./integration
|
|
53
|
-
"./integration
|
|
54
|
-
"./integration
|
|
55
|
-
"./integration/
|
|
56
|
-
"./
|
|
57
|
-
"./
|
|
58
|
-
"./
|
|
59
|
-
"./
|
|
60
|
-
"./
|
|
61
|
-
"./
|
|
62
|
-
"./sync
|
|
63
|
-
"./
|
|
64
|
-
"./
|
|
65
|
-
"./
|
|
66
|
-
"./
|
|
67
|
-
"./
|
|
68
|
-
"./
|
|
69
|
-
"./
|
|
70
|
-
"
|
|
39
|
+
".": "./src/index.ts",
|
|
40
|
+
"./connection": "./src/connection/index.ts",
|
|
41
|
+
"./connection/connection.enum": "./src/connection/connection.enum.ts",
|
|
42
|
+
"./connection/connection.operation": "./src/connection/connection.operation.ts",
|
|
43
|
+
"./connection/connection.presentation": "./src/connection/connection.presentation.ts",
|
|
44
|
+
"./connection/connection.schema": "./src/connection/connection.schema.ts",
|
|
45
|
+
"./connection/index": "./src/connection/index.ts",
|
|
46
|
+
"./docs": "./src/docs/index.ts",
|
|
47
|
+
"./docs/index": "./src/docs/index.ts",
|
|
48
|
+
"./docs/integration-hub.docblock": "./src/docs/integration-hub.docblock.ts",
|
|
49
|
+
"./events": "./src/events.ts",
|
|
50
|
+
"./example": "./src/example.ts",
|
|
51
|
+
"./handlers": "./src/handlers/index.ts",
|
|
52
|
+
"./handlers/index": "./src/handlers/index.ts",
|
|
53
|
+
"./handlers/integration.handlers": "./src/handlers/integration.handlers.ts",
|
|
54
|
+
"./integration": "./src/integration/index.ts",
|
|
55
|
+
"./integration-hub.capability": "./src/integration-hub.capability.ts",
|
|
56
|
+
"./integration-hub.feature": "./src/integration-hub.feature.ts",
|
|
57
|
+
"./integration/index": "./src/integration/index.ts",
|
|
58
|
+
"./integration/integration.enum": "./src/integration/integration.enum.ts",
|
|
59
|
+
"./integration/integration.operations": "./src/integration/integration.operations.ts",
|
|
60
|
+
"./integration/integration.presentation": "./src/integration/integration.presentation.ts",
|
|
61
|
+
"./integration/integration.schema": "./src/integration/integration.schema.ts",
|
|
62
|
+
"./seeders": "./src/seeders/index.ts",
|
|
63
|
+
"./seeders/index": "./src/seeders/index.ts",
|
|
64
|
+
"./sync": "./src/sync/index.ts",
|
|
65
|
+
"./sync-engine": "./src/sync-engine/index.ts",
|
|
66
|
+
"./sync-engine/index": "./src/sync-engine/index.ts",
|
|
67
|
+
"./sync/index": "./src/sync/index.ts",
|
|
68
|
+
"./sync/sync.enum": "./src/sync/sync.enum.ts",
|
|
69
|
+
"./sync/sync.operations": "./src/sync/sync.operations.ts",
|
|
70
|
+
"./sync/sync.presentation": "./src/sync/sync.presentation.ts",
|
|
71
|
+
"./sync/sync.schema": "./src/sync/sync.schema.ts",
|
|
72
|
+
"./tests/operations.test-spec": "./src/tests/operations.test-spec.ts",
|
|
73
|
+
"./ui": "./src/ui/index.ts",
|
|
74
|
+
"./ui/hooks": "./src/ui/hooks/index.ts",
|
|
75
|
+
"./ui/hooks/index": "./src/ui/hooks/index.ts",
|
|
76
|
+
"./ui/hooks/useIntegrationData": "./src/ui/hooks/useIntegrationData.ts",
|
|
77
|
+
"./ui/index": "./src/ui/index.ts",
|
|
78
|
+
"./ui/IntegrationDashboard": "./src/ui/IntegrationDashboard.tsx",
|
|
79
|
+
"./ui/renderers": "./src/ui/renderers/index.ts",
|
|
80
|
+
"./ui/renderers/index": "./src/ui/renderers/index.ts",
|
|
81
|
+
"./ui/renderers/integration.markdown": "./src/ui/renderers/integration.markdown.ts"
|
|
71
82
|
},
|
|
72
83
|
"files": [
|
|
73
84
|
"dist",
|
|
@@ -76,29 +87,307 @@
|
|
|
76
87
|
"publishConfig": {
|
|
77
88
|
"access": "public",
|
|
78
89
|
"exports": {
|
|
79
|
-
".":
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"./
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"./
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"./
|
|
101
|
-
|
|
90
|
+
".": {
|
|
91
|
+
"types": "./dist/index.d.ts",
|
|
92
|
+
"bun": "./dist/index.js",
|
|
93
|
+
"node": "./dist/node/index.mjs",
|
|
94
|
+
"browser": "./dist/browser/index.js",
|
|
95
|
+
"default": "./dist/index.js"
|
|
96
|
+
},
|
|
97
|
+
"./connection": {
|
|
98
|
+
"types": "./dist/connection/index.d.ts",
|
|
99
|
+
"bun": "./dist/connection/index.js",
|
|
100
|
+
"node": "./dist/node/connection/index.mjs",
|
|
101
|
+
"browser": "./dist/browser/connection/index.js",
|
|
102
|
+
"default": "./dist/connection/index.js"
|
|
103
|
+
},
|
|
104
|
+
"./connection/connection.enum": {
|
|
105
|
+
"types": "./dist/connection/connection.enum.d.ts",
|
|
106
|
+
"bun": "./dist/connection/connection.enum.js",
|
|
107
|
+
"node": "./dist/node/connection/connection.enum.mjs",
|
|
108
|
+
"browser": "./dist/browser/connection/connection.enum.js",
|
|
109
|
+
"default": "./dist/connection/connection.enum.js"
|
|
110
|
+
},
|
|
111
|
+
"./connection/connection.operation": {
|
|
112
|
+
"types": "./dist/connection/connection.operation.d.ts",
|
|
113
|
+
"bun": "./dist/connection/connection.operation.js",
|
|
114
|
+
"node": "./dist/node/connection/connection.operation.mjs",
|
|
115
|
+
"browser": "./dist/browser/connection/connection.operation.js",
|
|
116
|
+
"default": "./dist/connection/connection.operation.js"
|
|
117
|
+
},
|
|
118
|
+
"./connection/connection.presentation": {
|
|
119
|
+
"types": "./dist/connection/connection.presentation.d.ts",
|
|
120
|
+
"bun": "./dist/connection/connection.presentation.js",
|
|
121
|
+
"node": "./dist/node/connection/connection.presentation.mjs",
|
|
122
|
+
"browser": "./dist/browser/connection/connection.presentation.js",
|
|
123
|
+
"default": "./dist/connection/connection.presentation.js"
|
|
124
|
+
},
|
|
125
|
+
"./connection/connection.schema": {
|
|
126
|
+
"types": "./dist/connection/connection.schema.d.ts",
|
|
127
|
+
"bun": "./dist/connection/connection.schema.js",
|
|
128
|
+
"node": "./dist/node/connection/connection.schema.mjs",
|
|
129
|
+
"browser": "./dist/browser/connection/connection.schema.js",
|
|
130
|
+
"default": "./dist/connection/connection.schema.js"
|
|
131
|
+
},
|
|
132
|
+
"./connection/index": {
|
|
133
|
+
"types": "./dist/connection/index.d.ts",
|
|
134
|
+
"bun": "./dist/connection/index.js",
|
|
135
|
+
"node": "./dist/node/connection/index.mjs",
|
|
136
|
+
"browser": "./dist/browser/connection/index.js",
|
|
137
|
+
"default": "./dist/connection/index.js"
|
|
138
|
+
},
|
|
139
|
+
"./docs": {
|
|
140
|
+
"types": "./dist/docs/index.d.ts",
|
|
141
|
+
"bun": "./dist/docs/index.js",
|
|
142
|
+
"node": "./dist/node/docs/index.mjs",
|
|
143
|
+
"browser": "./dist/browser/docs/index.js",
|
|
144
|
+
"default": "./dist/docs/index.js"
|
|
145
|
+
},
|
|
146
|
+
"./docs/index": {
|
|
147
|
+
"types": "./dist/docs/index.d.ts",
|
|
148
|
+
"bun": "./dist/docs/index.js",
|
|
149
|
+
"node": "./dist/node/docs/index.mjs",
|
|
150
|
+
"browser": "./dist/browser/docs/index.js",
|
|
151
|
+
"default": "./dist/docs/index.js"
|
|
152
|
+
},
|
|
153
|
+
"./docs/integration-hub.docblock": {
|
|
154
|
+
"types": "./dist/docs/integration-hub.docblock.d.ts",
|
|
155
|
+
"bun": "./dist/docs/integration-hub.docblock.js",
|
|
156
|
+
"node": "./dist/node/docs/integration-hub.docblock.mjs",
|
|
157
|
+
"browser": "./dist/browser/docs/integration-hub.docblock.js",
|
|
158
|
+
"default": "./dist/docs/integration-hub.docblock.js"
|
|
159
|
+
},
|
|
160
|
+
"./events": {
|
|
161
|
+
"types": "./dist/events.d.ts",
|
|
162
|
+
"bun": "./dist/events.js",
|
|
163
|
+
"node": "./dist/node/events.mjs",
|
|
164
|
+
"browser": "./dist/browser/events.js",
|
|
165
|
+
"default": "./dist/events.js"
|
|
166
|
+
},
|
|
167
|
+
"./example": {
|
|
168
|
+
"types": "./dist/example.d.ts",
|
|
169
|
+
"bun": "./dist/example.js",
|
|
170
|
+
"node": "./dist/node/example.mjs",
|
|
171
|
+
"browser": "./dist/browser/example.js",
|
|
172
|
+
"default": "./dist/example.js"
|
|
173
|
+
},
|
|
174
|
+
"./handlers": {
|
|
175
|
+
"types": "./dist/handlers/index.d.ts",
|
|
176
|
+
"bun": "./dist/handlers/index.js",
|
|
177
|
+
"node": "./dist/node/handlers/index.mjs",
|
|
178
|
+
"browser": "./dist/browser/handlers/index.js",
|
|
179
|
+
"default": "./dist/handlers/index.js"
|
|
180
|
+
},
|
|
181
|
+
"./handlers/index": {
|
|
182
|
+
"types": "./dist/handlers/index.d.ts",
|
|
183
|
+
"bun": "./dist/handlers/index.js",
|
|
184
|
+
"node": "./dist/node/handlers/index.mjs",
|
|
185
|
+
"browser": "./dist/browser/handlers/index.js",
|
|
186
|
+
"default": "./dist/handlers/index.js"
|
|
187
|
+
},
|
|
188
|
+
"./handlers/integration.handlers": {
|
|
189
|
+
"types": "./dist/handlers/integration.handlers.d.ts",
|
|
190
|
+
"bun": "./dist/handlers/integration.handlers.js",
|
|
191
|
+
"node": "./dist/node/handlers/integration.handlers.mjs",
|
|
192
|
+
"browser": "./dist/browser/handlers/integration.handlers.js",
|
|
193
|
+
"default": "./dist/handlers/integration.handlers.js"
|
|
194
|
+
},
|
|
195
|
+
"./integration": {
|
|
196
|
+
"types": "./dist/integration/index.d.ts",
|
|
197
|
+
"bun": "./dist/integration/index.js",
|
|
198
|
+
"node": "./dist/node/integration/index.mjs",
|
|
199
|
+
"browser": "./dist/browser/integration/index.js",
|
|
200
|
+
"default": "./dist/integration/index.js"
|
|
201
|
+
},
|
|
202
|
+
"./integration-hub.capability": {
|
|
203
|
+
"types": "./dist/integration-hub.capability.d.ts",
|
|
204
|
+
"bun": "./dist/integration-hub.capability.js",
|
|
205
|
+
"node": "./dist/node/integration-hub.capability.mjs",
|
|
206
|
+
"browser": "./dist/browser/integration-hub.capability.js",
|
|
207
|
+
"default": "./dist/integration-hub.capability.js"
|
|
208
|
+
},
|
|
209
|
+
"./integration-hub.feature": {
|
|
210
|
+
"types": "./dist/integration-hub.feature.d.ts",
|
|
211
|
+
"bun": "./dist/integration-hub.feature.js",
|
|
212
|
+
"node": "./dist/node/integration-hub.feature.mjs",
|
|
213
|
+
"browser": "./dist/browser/integration-hub.feature.js",
|
|
214
|
+
"default": "./dist/integration-hub.feature.js"
|
|
215
|
+
},
|
|
216
|
+
"./integration/index": {
|
|
217
|
+
"types": "./dist/integration/index.d.ts",
|
|
218
|
+
"bun": "./dist/integration/index.js",
|
|
219
|
+
"node": "./dist/node/integration/index.mjs",
|
|
220
|
+
"browser": "./dist/browser/integration/index.js",
|
|
221
|
+
"default": "./dist/integration/index.js"
|
|
222
|
+
},
|
|
223
|
+
"./integration/integration.enum": {
|
|
224
|
+
"types": "./dist/integration/integration.enum.d.ts",
|
|
225
|
+
"bun": "./dist/integration/integration.enum.js",
|
|
226
|
+
"node": "./dist/node/integration/integration.enum.mjs",
|
|
227
|
+
"browser": "./dist/browser/integration/integration.enum.js",
|
|
228
|
+
"default": "./dist/integration/integration.enum.js"
|
|
229
|
+
},
|
|
230
|
+
"./integration/integration.operations": {
|
|
231
|
+
"types": "./dist/integration/integration.operations.d.ts",
|
|
232
|
+
"bun": "./dist/integration/integration.operations.js",
|
|
233
|
+
"node": "./dist/node/integration/integration.operations.mjs",
|
|
234
|
+
"browser": "./dist/browser/integration/integration.operations.js",
|
|
235
|
+
"default": "./dist/integration/integration.operations.js"
|
|
236
|
+
},
|
|
237
|
+
"./integration/integration.presentation": {
|
|
238
|
+
"types": "./dist/integration/integration.presentation.d.ts",
|
|
239
|
+
"bun": "./dist/integration/integration.presentation.js",
|
|
240
|
+
"node": "./dist/node/integration/integration.presentation.mjs",
|
|
241
|
+
"browser": "./dist/browser/integration/integration.presentation.js",
|
|
242
|
+
"default": "./dist/integration/integration.presentation.js"
|
|
243
|
+
},
|
|
244
|
+
"./integration/integration.schema": {
|
|
245
|
+
"types": "./dist/integration/integration.schema.d.ts",
|
|
246
|
+
"bun": "./dist/integration/integration.schema.js",
|
|
247
|
+
"node": "./dist/node/integration/integration.schema.mjs",
|
|
248
|
+
"browser": "./dist/browser/integration/integration.schema.js",
|
|
249
|
+
"default": "./dist/integration/integration.schema.js"
|
|
250
|
+
},
|
|
251
|
+
"./seeders": {
|
|
252
|
+
"types": "./dist/seeders/index.d.ts",
|
|
253
|
+
"bun": "./dist/seeders/index.js",
|
|
254
|
+
"node": "./dist/node/seeders/index.mjs",
|
|
255
|
+
"browser": "./dist/browser/seeders/index.js",
|
|
256
|
+
"default": "./dist/seeders/index.js"
|
|
257
|
+
},
|
|
258
|
+
"./seeders/index": {
|
|
259
|
+
"types": "./dist/seeders/index.d.ts",
|
|
260
|
+
"bun": "./dist/seeders/index.js",
|
|
261
|
+
"node": "./dist/node/seeders/index.mjs",
|
|
262
|
+
"browser": "./dist/browser/seeders/index.js",
|
|
263
|
+
"default": "./dist/seeders/index.js"
|
|
264
|
+
},
|
|
265
|
+
"./sync": {
|
|
266
|
+
"types": "./dist/sync/index.d.ts",
|
|
267
|
+
"bun": "./dist/sync/index.js",
|
|
268
|
+
"node": "./dist/node/sync/index.mjs",
|
|
269
|
+
"browser": "./dist/browser/sync/index.js",
|
|
270
|
+
"default": "./dist/sync/index.js"
|
|
271
|
+
},
|
|
272
|
+
"./sync-engine": {
|
|
273
|
+
"types": "./dist/sync-engine/index.d.ts",
|
|
274
|
+
"bun": "./dist/sync-engine/index.js",
|
|
275
|
+
"node": "./dist/node/sync-engine/index.mjs",
|
|
276
|
+
"browser": "./dist/browser/sync-engine/index.js",
|
|
277
|
+
"default": "./dist/sync-engine/index.js"
|
|
278
|
+
},
|
|
279
|
+
"./sync-engine/index": {
|
|
280
|
+
"types": "./dist/sync-engine/index.d.ts",
|
|
281
|
+
"bun": "./dist/sync-engine/index.js",
|
|
282
|
+
"node": "./dist/node/sync-engine/index.mjs",
|
|
283
|
+
"browser": "./dist/browser/sync-engine/index.js",
|
|
284
|
+
"default": "./dist/sync-engine/index.js"
|
|
285
|
+
},
|
|
286
|
+
"./sync/index": {
|
|
287
|
+
"types": "./dist/sync/index.d.ts",
|
|
288
|
+
"bun": "./dist/sync/index.js",
|
|
289
|
+
"node": "./dist/node/sync/index.mjs",
|
|
290
|
+
"browser": "./dist/browser/sync/index.js",
|
|
291
|
+
"default": "./dist/sync/index.js"
|
|
292
|
+
},
|
|
293
|
+
"./sync/sync.enum": {
|
|
294
|
+
"types": "./dist/sync/sync.enum.d.ts",
|
|
295
|
+
"bun": "./dist/sync/sync.enum.js",
|
|
296
|
+
"node": "./dist/node/sync/sync.enum.mjs",
|
|
297
|
+
"browser": "./dist/browser/sync/sync.enum.js",
|
|
298
|
+
"default": "./dist/sync/sync.enum.js"
|
|
299
|
+
},
|
|
300
|
+
"./sync/sync.operations": {
|
|
301
|
+
"types": "./dist/sync/sync.operations.d.ts",
|
|
302
|
+
"bun": "./dist/sync/sync.operations.js",
|
|
303
|
+
"node": "./dist/node/sync/sync.operations.mjs",
|
|
304
|
+
"browser": "./dist/browser/sync/sync.operations.js",
|
|
305
|
+
"default": "./dist/sync/sync.operations.js"
|
|
306
|
+
},
|
|
307
|
+
"./sync/sync.presentation": {
|
|
308
|
+
"types": "./dist/sync/sync.presentation.d.ts",
|
|
309
|
+
"bun": "./dist/sync/sync.presentation.js",
|
|
310
|
+
"node": "./dist/node/sync/sync.presentation.mjs",
|
|
311
|
+
"browser": "./dist/browser/sync/sync.presentation.js",
|
|
312
|
+
"default": "./dist/sync/sync.presentation.js"
|
|
313
|
+
},
|
|
314
|
+
"./sync/sync.schema": {
|
|
315
|
+
"types": "./dist/sync/sync.schema.d.ts",
|
|
316
|
+
"bun": "./dist/sync/sync.schema.js",
|
|
317
|
+
"node": "./dist/node/sync/sync.schema.mjs",
|
|
318
|
+
"browser": "./dist/browser/sync/sync.schema.js",
|
|
319
|
+
"default": "./dist/sync/sync.schema.js"
|
|
320
|
+
},
|
|
321
|
+
"./tests/operations.test-spec": {
|
|
322
|
+
"types": "./dist/tests/operations.test-spec.d.ts",
|
|
323
|
+
"bun": "./dist/tests/operations.test-spec.js",
|
|
324
|
+
"node": "./dist/node/tests/operations.test-spec.mjs",
|
|
325
|
+
"browser": "./dist/browser/tests/operations.test-spec.js",
|
|
326
|
+
"default": "./dist/tests/operations.test-spec.js"
|
|
327
|
+
},
|
|
328
|
+
"./ui": {
|
|
329
|
+
"types": "./dist/ui/index.d.ts",
|
|
330
|
+
"bun": "./dist/ui/index.js",
|
|
331
|
+
"node": "./dist/node/ui/index.mjs",
|
|
332
|
+
"browser": "./dist/browser/ui/index.js",
|
|
333
|
+
"default": "./dist/ui/index.js"
|
|
334
|
+
},
|
|
335
|
+
"./ui/hooks": {
|
|
336
|
+
"types": "./dist/ui/hooks/index.d.ts",
|
|
337
|
+
"bun": "./dist/ui/hooks/index.js",
|
|
338
|
+
"node": "./dist/node/ui/hooks/index.mjs",
|
|
339
|
+
"browser": "./dist/browser/ui/hooks/index.js",
|
|
340
|
+
"default": "./dist/ui/hooks/index.js"
|
|
341
|
+
},
|
|
342
|
+
"./ui/hooks/index": {
|
|
343
|
+
"types": "./dist/ui/hooks/index.d.ts",
|
|
344
|
+
"bun": "./dist/ui/hooks/index.js",
|
|
345
|
+
"node": "./dist/node/ui/hooks/index.mjs",
|
|
346
|
+
"browser": "./dist/browser/ui/hooks/index.js",
|
|
347
|
+
"default": "./dist/ui/hooks/index.js"
|
|
348
|
+
},
|
|
349
|
+
"./ui/hooks/useIntegrationData": {
|
|
350
|
+
"types": "./dist/ui/hooks/useIntegrationData.d.ts",
|
|
351
|
+
"bun": "./dist/ui/hooks/useIntegrationData.js",
|
|
352
|
+
"node": "./dist/node/ui/hooks/useIntegrationData.mjs",
|
|
353
|
+
"browser": "./dist/browser/ui/hooks/useIntegrationData.js",
|
|
354
|
+
"default": "./dist/ui/hooks/useIntegrationData.js"
|
|
355
|
+
},
|
|
356
|
+
"./ui/index": {
|
|
357
|
+
"types": "./dist/ui/index.d.ts",
|
|
358
|
+
"bun": "./dist/ui/index.js",
|
|
359
|
+
"node": "./dist/node/ui/index.mjs",
|
|
360
|
+
"browser": "./dist/browser/ui/index.js",
|
|
361
|
+
"default": "./dist/ui/index.js"
|
|
362
|
+
},
|
|
363
|
+
"./ui/IntegrationDashboard": {
|
|
364
|
+
"types": "./dist/ui/IntegrationDashboard.d.ts",
|
|
365
|
+
"bun": "./dist/ui/IntegrationDashboard.js",
|
|
366
|
+
"node": "./dist/node/ui/IntegrationDashboard.mjs",
|
|
367
|
+
"browser": "./dist/browser/ui/IntegrationDashboard.js",
|
|
368
|
+
"default": "./dist/ui/IntegrationDashboard.js"
|
|
369
|
+
},
|
|
370
|
+
"./ui/renderers": {
|
|
371
|
+
"types": "./dist/ui/renderers/index.d.ts",
|
|
372
|
+
"bun": "./dist/ui/renderers/index.js",
|
|
373
|
+
"node": "./dist/node/ui/renderers/index.mjs",
|
|
374
|
+
"browser": "./dist/browser/ui/renderers/index.js",
|
|
375
|
+
"default": "./dist/ui/renderers/index.js"
|
|
376
|
+
},
|
|
377
|
+
"./ui/renderers/index": {
|
|
378
|
+
"types": "./dist/ui/renderers/index.d.ts",
|
|
379
|
+
"bun": "./dist/ui/renderers/index.js",
|
|
380
|
+
"node": "./dist/node/ui/renderers/index.mjs",
|
|
381
|
+
"browser": "./dist/browser/ui/renderers/index.js",
|
|
382
|
+
"default": "./dist/ui/renderers/index.js"
|
|
383
|
+
},
|
|
384
|
+
"./ui/renderers/integration.markdown": {
|
|
385
|
+
"types": "./dist/ui/renderers/integration.markdown.d.ts",
|
|
386
|
+
"bun": "./dist/ui/renderers/integration.markdown.js",
|
|
387
|
+
"node": "./dist/node/ui/renderers/integration.markdown.mjs",
|
|
388
|
+
"browser": "./dist/browser/ui/renderers/integration.markdown.js",
|
|
389
|
+
"default": "./dist/ui/renderers/integration.markdown.js"
|
|
390
|
+
}
|
|
102
391
|
},
|
|
103
392
|
"registry": "https://registry.npmjs.org/"
|
|
104
393
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connection.enum.js","names":[],"sources":["../../src/connection/connection.enum.ts"],"sourcesContent":["import { defineEnum } from '@contractspec/lib.schema';\n\n/**\n * Connection status enum.\n */\nexport const ConnectionStatusEnum = defineEnum('ConnectionStatus', [\n 'PENDING',\n 'CONNECTED',\n 'DISCONNECTED',\n 'ERROR',\n 'EXPIRED',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,uBAAuB,WAAW,oBAAoB;CACjE;CACA;CACA;CACA;CACA;CACD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connection.operation.js","names":[],"sources":["../../src/connection/connection.operation.ts"],"sourcesContent":["import { defineCommand } from '@contractspec/lib.contracts/operations';\nimport {\n ConnectionModel,\n CreateConnectionInputModel,\n} from './connection.schema';\n\nconst OWNERS = ['@example.integration-hub'] as const;\n\n/**\n * Create a connection to an external system.\n */\nexport const CreateConnectionContract = defineCommand({\n meta: {\n key: 'integration.connection.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['integration', 'connection', 'create'],\n description: 'Create a connection to an external system.',\n goal: 'Authenticate with external systems.',\n context: 'Connection setup.',\n },\n io: { input: CreateConnectionInputModel, output: ConnectionModel },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'integration.connection.created',\n version: '1.0.0',\n when: 'Connection created',\n payload: ConnectionModel,\n },\n ],\n audit: ['integration.connection.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-connection-happy-path',\n given: ['User is authenticated'],\n when: ['User creates connection with valid credentials'],\n then: ['Connection is created', 'ConnectionCreated event is emitted'],\n },\n ],\n examples: [\n {\n key: 'connect-crm',\n input: {\n name: 'Salesforce Prod',\n integrationId: 'salesforce',\n credentials: { clientId: 'xxx' },\n },\n output: {\n id: 'conn-123',\n status: 'connected',\n connectedAt: '2025-01-01T12:00:00Z',\n },\n },\n ],\n },\n});\n"],"mappings":";;;;AAMA,MAAM,SAAS,CAAC,2BAA2B;;;;AAK3C,MAAa,2BAA2B,cAAc;CACpD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAe;GAAc;GAAS;EAC7C,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EAAE,OAAO;EAA4B,QAAQ;EAAiB;CAClE,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,iCAAiC;EAC1C;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,wBAAwB;GAChC,MAAM,CAAC,iDAAiD;GACxD,MAAM,CAAC,yBAAyB,qCAAqC;GACtE,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IACL,MAAM;IACN,eAAe;IACf,aAAa,EAAE,UAAU,OAAO;IACjC;GACD,QAAQ;IACN,IAAI;IACJ,QAAQ;IACR,aAAa;IACd;GACF,CACF;EACF;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connection.presentation.js","names":[],"sources":["../../src/connection/connection.presentation.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\nimport { ConnectionModel } from './connection.schema';\n\nexport const ConnectionListPresentation = definePresentation({\n meta: {\n key: 'integration.connection.list',\n version: '1.0.0',\n title: 'Connection List',\n description: 'List of integration connections',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'connection', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide an overview of all established integration connections.',\n context: 'The primary management view for integration hubs.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ConnectionList',\n props: ConnectionModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.enabled'],\n },\n});\n\nexport const ConnectionSetupPresentation = definePresentation({\n meta: {\n key: 'integration.connection.setup',\n version: '1.0.0',\n title: 'Connection Setup',\n description: 'Setup wizard for creating integration connections',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'connection', 'setup'],\n stability: StabilityEnum.Experimental,\n goal: 'Guide users through the multi-step process of connecting to a new integration.',\n context: 'The onboarding flow for new integrations.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ConnectionSetup',\n props: ConnectionModel,\n },\n targets: ['react'],\n policy: {\n flags: ['integration.enabled'],\n },\n});\n"],"mappings":";;;;AAGA,MAAa,6BAA6B,mBAAmB;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAc;GAAO;EAC3C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF,CAAC;AAEF,MAAa,8BAA8B,mBAAmB;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAc;GAAQ;EAC5C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connection.schema.js","names":[],"sources":["../../src/connection/connection.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { ConnectionStatusEnum } from './connection.enum';\n\n/**\n * A connection to an external system.\n */\nexport const ConnectionModel = defineSchemaModel({\n name: 'ConnectionModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n integrationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ConnectionStatusEnum, isOptional: false },\n authType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n externalAccountName: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n connectedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n lastHealthCheck: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n healthStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n/**\n * Input for creating a connection.\n */\nexport const CreateConnectionInputModel = defineSchemaModel({\n name: 'CreateConnectionInput',\n fields: {\n integrationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n authType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n credentials: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n"],"mappings":";;;;;;;AAMA,MAAa,kBAAkB,kBAAkB;CAC/C,MAAM;CACN,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,QAAQ;GAAE,MAAM;GAAsB,YAAY;GAAO;EACzD,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,qBAAqB;GACnB,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,aAAa;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EAClE,iBAAiB;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAM;EACtE,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EAC3E;CACF,CAAC;;;;AAKF,MAAa,6BAA6B,kBAAkB;CAC1D,MAAM;CACN,QAAQ;EACN,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,MAAM;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EAClE,UAAU;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACtE,aAAa;GAAE,MAAM,eAAe,MAAM;GAAE,YAAY;GAAM;EAC/D;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration-hub.docblock.js","names":[],"sources":["../../src/docs/integration-hub.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst integrationHubDocBlocks: DocBlock[] = [\n {\n id: 'docs.examples.integration-hub',\n title: 'Integration Hub',\n summary:\n 'Generic integration center with connectors, connections, sync configs, field mappings, and sync logs.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/integration-hub',\n tags: ['integrations', 'sync', 'etl', 'connectors'],\n body: `## Entities\n\n- Integration, Connection, SyncConfig, FieldMapping, SyncLog.\n- Sync engine config lives in \\`src/sync-engine\\` to map remote <-> local entities.\n\n## Contracts\n\n- \\`integration.create\\`, \\`integration.connect\\`, \\`integration.configureSync\\`, \\`integration.mapFields\\`, \\`integration.runSync\\`.\n- Uses Jobs module for scheduled syncs and retries; Files module for payload archives.\n\n## Events\n\n- sync.started/completed/failed, connection.connected/disconnected, mapping.updated.\n- Forward to Notifications and Audit for observability.\n\n## UI / Presentations\n\n- Dashboard, integration list, connection detail, sync config editor.\n- Templates registered as \\`integration-hub\\` in Template Registry.\n\n## Notes\n\n- Providers remain agnostic; keep mappings declarative for safe regeneration.\n- Seed data includes voice integrations for \\`ai-voice.gradium\\` and \\`ai-voice.fal\\`.\n- Feature flags can gate specific providers; metering can track sync volume.\n`,\n },\n {\n id: 'docs.examples.integration-hub.goal',\n title: 'Integration Hub — Goal',\n summary: 'Why this integration hub exists and what success looks like.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/integration-hub/goal',\n tags: ['integrations', 'goal'],\n body: `## Why it matters\n- Gives a regenerable, provider-agnostic integration hub with explicit mappings.\n- Prevents drift between sync configs, mappings, and event/log outputs.\n\n## Business/Product goal\n- Model connectors, connections, sync jobs, and mappings with governance and retries.\n- Support staged provider rollouts via Feature Flags and observability via Audit/Notifications.\n\n## Success criteria\n- Connections and mappings regenerate safely after spec edits.\n- Sync events and logs provide auditability; payloads are stored and PII-scoped.`,\n },\n {\n id: 'docs.examples.integration-hub.usage',\n title: 'Integration Hub — Usage',\n summary: 'How to configure connectors, mappings, and scheduled syncs.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/integration-hub/usage',\n tags: ['integrations', 'usage'],\n body: `## Setup\n1) Seed integrations/connections (if available) or create connector definitions.\n2) Configure sync jobs with Jobs module; store payload archives via Files.\n\n## Extend & regenerate\n1) Add mapping fields or provider configs in the spec; include validation and PII paths.\n2) Regenerate to align UI/API/events/logs; verify Notifications/Audit hooks.\n3) Gate risky providers behind Feature Flags; meter sync volume if needed.\n\n## Guardrails\n- Keep mappings declarative; avoid hardcoded transforms.\n- Emit events for sync lifecycle; persist logs for audit.\n- Redact sensitive payload paths in presentations.`,\n },\n {\n id: 'docs.examples.integration-hub.constraints',\n title: 'Integration Hub — Constraints & Safety',\n summary:\n 'Internal guidance for sync lifecycle, mappings, and regeneration safety.',\n kind: 'reference',\n visibility: 'internal',\n route: '/docs/examples/integration-hub/constraints',\n tags: ['integrations', 'constraints', 'internal'],\n body: `## Constraints\n- Mappings and sync states must remain declarative in spec; no hidden code transforms.\n- Events to emit at minimum: sync.started, sync.completed, sync.failed; connection.connected/disconnected.\n- Regeneration should not alter retry/backoff semantics without explicit spec change.\n\n## PII & Payloads\n- Treat payload archives as potentially sensitive; mark policy.pii paths.\n- For MCP/web, avoid exposing raw credentials/tokens; store via provider adapters only.\n\n## Verification\n- Include fixtures for mapping changes and sync retries.\n- Validate that scheduled jobs (cron) are spec-driven; Jobs module wiring intact.\n- Ensure Audit/Notifications receive sync lifecycle events.`,\n },\n];\n\nregisterDocBlocks(integrationHubDocBlocks);\n"],"mappings":";;;AA2GA,kBAxG4C;CAC1C;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAgB;GAAQ;GAAO;GAAa;EACnD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,gBAAgB,OAAO;EAC9B,MAAM;;;;;;;;;;;EAWP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,gBAAgB,QAAQ;EAC/B,MAAM;;;;;;;;;;;;;EAaP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAgB;GAAe;GAAW;EACjD,MAAM;;;;;;;;;;;;;EAaP;CACF,CAEyC"}
|
package/dist/events.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { defineEvent } from '@contractspec/lib.contracts';\nimport { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\n\n// Integration events\nconst IntegrationCreatedPayload = defineSchemaModel({\n name: 'IntegrationCreatedPayload',\n description: 'Payload when an integration is created',\n fields: {\n integrationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const IntegrationCreatedEvent = defineEvent({\n meta: {\n key: 'integration.created',\n version: '1.0.0',\n description: 'Fired when a new integration is created',\n stability: 'experimental',\n owners: ['@integration-team'],\n tags: ['integration'],\n },\n payload: IntegrationCreatedPayload,\n});\n\n// Connection events\nconst ConnectionCreatedPayload = defineSchemaModel({\n name: 'ConnectionCreatedPayload',\n description: 'Payload when a connection is established',\n fields: {\n connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n integrationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const ConnectionCreatedEvent = defineEvent({\n meta: {\n key: 'integration.connection.created',\n version: '1.0.0',\n description: 'Fired when a new connection is established',\n stability: 'experimental',\n owners: ['@integration-team'],\n tags: ['integration', 'connection'],\n },\n payload: ConnectionCreatedPayload,\n});\n\nconst ConnectionStatusChangedPayload = defineSchemaModel({\n name: 'ConnectionStatusChangedPayload',\n description: 'Payload when a connection status changes',\n fields: {\n connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n previousStatus: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n newStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n changedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const ConnectionStatusChangedEvent = defineEvent({\n meta: {\n key: 'integration.connection.statusChanged',\n version: '1.0.0',\n description: 'Fired when a connection status changes',\n stability: 'experimental',\n owners: ['@integration-team'],\n tags: ['integration', 'connection'],\n },\n payload: ConnectionStatusChangedPayload,\n});\n\n// Sync config events\nconst SyncConfigCreatedPayload = defineSchemaModel({\n name: 'SyncConfigCreatedPayload',\n description: 'Payload when a sync configuration is created',\n fields: {\n syncConfigId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const SyncConfigCreatedEvent = defineEvent({\n meta: {\n key: 'integration.syncConfig.created',\n version: '1.0.0',\n description: 'Fired when a sync configuration is created',\n stability: 'experimental',\n owners: ['@integration-team'],\n tags: ['integration', 'sync'],\n },\n payload: SyncConfigCreatedPayload,\n});\n\n// Sync run events\nconst SyncStartedPayload = defineSchemaModel({\n name: 'SyncStartedPayload',\n description: 'Payload when a sync run starts',\n fields: {\n syncRunId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n syncConfigId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const SyncStartedEvent = defineEvent({\n meta: {\n key: 'integration.sync.started',\n version: '1.0.0',\n description: 'Fired when a sync run starts',\n stability: 'experimental',\n owners: ['@integration-team'],\n tags: ['integration', 'sync'],\n },\n payload: SyncStartedPayload,\n});\n\nconst SyncCompletedPayload = defineSchemaModel({\n name: 'SyncCompletedPayload',\n description: 'Payload when a sync run completes successfully',\n fields: {\n syncRunId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n syncConfigId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n recordsProcessed: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const SyncCompletedEvent = defineEvent({\n meta: {\n key: 'integration.sync.completed',\n version: '1.0.0',\n description: 'Fired when a sync run completes successfully',\n stability: 'experimental',\n owners: ['@integration-team'],\n tags: ['integration', 'sync'],\n },\n payload: SyncCompletedPayload,\n});\n\nconst SyncFailedPayload = defineSchemaModel({\n name: 'SyncFailedPayload',\n description: 'Payload when a sync run fails',\n fields: {\n syncRunId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n syncConfigId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n error: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n failedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const SyncFailedEvent = defineEvent({\n meta: {\n key: 'integration.sync.failed',\n version: '1.0.0',\n description: 'Fired when a sync run fails',\n stability: 'experimental',\n owners: ['@integration-team'],\n tags: ['integration', 'sync'],\n },\n payload: SyncFailedPayload,\n});\n\nconst RecordSyncedPayload = defineSchemaModel({\n name: 'RecordSyncedPayload',\n description: 'Payload when a single record is synced',\n fields: {\n syncRunId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n recordId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n targetId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const RecordSyncedEvent = defineEvent({\n meta: {\n key: 'integration.record.synced',\n version: '1.0.0',\n description: 'Fired when a single record is synced',\n stability: 'experimental',\n owners: ['@integration-team'],\n tags: ['integration', 'sync'],\n },\n payload: RecordSyncedPayload,\n});\n\nconst FieldMappingAddedPayload = defineSchemaModel({\n name: 'FieldMappingAddedPayload',\n description: 'Payload when a field mapping is added to a sync config',\n fields: {\n syncConfigId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceField: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n targetField: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const FieldMappingAddedEvent = defineEvent({\n meta: {\n key: 'integration.fieldMapping.added',\n version: '1.0.0',\n description: 'Fired when a field mapping is added to a sync config',\n stability: 'experimental',\n owners: ['@integration-team'],\n tags: ['integration', 'sync'],\n },\n payload: FieldMappingAddedPayload,\n});\n"],"mappings":";;;;AAIA,MAAM,4BAA4B,kBAAkB;CAClD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,cAAc;EACtB;CACD,SAAS;CACV,CAAC;AAGF,MAAM,2BAA2B,kBAAkB;CACjD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,yBAAyB,YAAY;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,aAAa;EACpC;CACD,SAAS;CACV,CAAC;AAEF,MAAM,iCAAiC,kBAAkB;CACvD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,gBAAgB;GACd,MAAM,eAAe,iB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EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,OAAO;EAC9B;CACD,SAAS;CACV,CAAC;AAEF,MAAM,2BAA2B,kBAAkB;CACjD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,cAAc;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC3E;CACF,CAAC;AAEF,MAAa,yBAAyB,YAAY;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,oBAAoB;EAC7B,MAAM,CAAC,eAAe,OAAO;EAC9B;CACD,SAAS;CACV,CAAC"}
|
package/dist/example.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'integration-hub',\n version: '1.0.0',\n title: 'Integration Hub',\n description:\n 'Provider-agnostic integration center with connectors, connections, field mappings, and sync logs.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['integrations', 'sync', 'etl', 'connectors'],\n },\n docs: {\n rootDocId: 'docs.examples.integration-hub',\n goalDocId: 'docs.examples.integration-hub.goal',\n usageDocId: 'docs.examples.integration-hub.usage',\n constraintsDocId: 'docs.examples.integration-hub.constraints',\n },\n entrypoints: {\n packageName: '@contractspec/example.integration-hub',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAgB;GAAQ;GAAO;GAAa;EACpD;CACD,MAAM;EACJ,WAAW;EACX,WAAW;EACX,YAAY;EACZ,kBAAkB;EACnB;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration.handlers.js","names":[],"sources":["../../src/handlers/integration.handlers.ts"],"sourcesContent":["/**\n * Runtime-local Integration Hub handlers\n *\n * Database-backed handlers for the integration-hub template.\n */\nimport type { DatabasePort, DbRow } from '@contractspec/lib.runtime-sandbox';\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { web } from '@contractspec/lib.runtime-sandbox';\nconst { generateId } = web;\n\n// ============ Types ============\n\nexport interface Integration {\n id: string;\n projectId: string;\n organizationId: string;\n name: string;\n description?: string;\n type:\n | 'CRM'\n | 'MARKETING'\n | 'PAYMENT'\n | 'COMMUNICATION'\n | 'DATA'\n | 'ANALYTICS'\n | 'CUSTOM';\n status: 'ACTIVE' | 'INACTIVE';\n iconUrl?: string;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface Connection {\n id: string;\n integrationId: string;\n name: string;\n status: 'CONNECTED' | 'DISCONNECTED' | 'ERROR' | 'PENDING';\n credentials?: Record<string, unknown>;\n config?: Record<string, unknown>;\n lastSyncAt?: Date;\n errorMessage?: string;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface SyncConfig {\n id: string;\n connectionId: string;\n name: string;\n sourceEntity: string;\n targetEntity: string;\n frequency: 'REALTIME' | 'HOURLY' | 'DAILY' | 'WEEKLY' | 'MANUAL';\n status: 'ACTIVE' | 'PAUSED' | 'ERROR';\n lastRunAt?: Date;\n lastRunStatus?: 'SUCCESS' | 'FAILED' | 'PARTIAL';\n recordsSynced: number;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface FieldMapping {\n id: string;\n syncConfigId: string;\n sourceField: string;\n targetField: string;\n transformType?: 'DIRECT' | 'FORMAT' | 'LOOKUP' | 'CUSTOM';\n transformConfig?: Record<string, unknown>;\n createdAt: Date;\n}\n\nexport interface CreateIntegrationInput {\n name: string;\n description?: string;\n type: Integration['type'];\n iconUrl?: string;\n}\n\nexport interface ConnectServiceInput {\n integrationId: string;\n name: string;\n credentials?: Record<string, unknown>;\n config?: Record<string, unknown>;\n}\n\nexport interface ConfigureSyncInput {\n connectionId: string;\n name: string;\n sourceEntity: string;\n targetEntity: string;\n frequency?: SyncConfig['frequency'];\n}\n\nexport interface MapFieldsInput {\n syncConfigId: string;\n mappings: {\n sourceField: string;\n targetField: string;\n transformType?: FieldMapping['transformType'];\n transformConfig?: Record<string, unknown>;\n }[];\n}\n\nexport interface ListIntegrationsInput {\n projectId: string;\n type?: Integration['type'] | 'all';\n status?: 'ACTIVE' | 'INACTIVE' | 'all';\n search?: string;\n limit?: number;\n offset?: number;\n}\n\nexport interface ListIntegrationsOutput {\n integrations: Integration[];\n total: number;\n}\n\nexport interface ListConnectionsInput {\n integrationId?: string;\n status?: Connection['status'] | 'all';\n limit?: number;\n offset?: number;\n}\n\nexport interface ListConnectionsOutput {\n connections: Connection[];\n total: number;\n}\n\nexport interface ListSyncConfigsInput {\n connectionId?: string;\n status?: SyncConfig['status'] | 'all';\n limit?: number;\n offset?: number;\n}\n\nexport interface ListSyncConfigsOutput {\n configs: SyncConfig[];\n total: number;\n}\n\n// ============ Row Types ============\n\ninterface IntegrationRow {\n id: string;\n projectId: string;\n organizationId: string;\n name: string;\n description: string | null;\n type: string;\n status: string;\n iconUrl: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface ConnectionRow {\n id: string;\n integrationId: string;\n name: string;\n status: string;\n credentials: string | null;\n config: string | null;\n lastSyncAt: string | null;\n errorMessage: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface SyncConfigRow {\n id: string;\n connectionId: string;\n name: string;\n sourceEntity: string;\n targetEntity: string;\n frequency: string;\n status: string;\n lastRunAt: string | null;\n lastRunStatus: string | null;\n recordsSynced: number;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface FieldMappingRow {\n id: string;\n syncConfigId: string;\n sourceField: string;\n targetField: string;\n transformType: string | null;\n transformConfig: string | null;\n createdAt: string;\n}\n\nfunction rowToIntegration(row: IntegrationRow): Integration {\n return {\n id: row.id,\n projectId: row.projectId,\n organizationId: row.organizationId,\n name: row.name,\n description: row.description ?? undefined,\n type: row.type as Integration['type'],\n status: row.status as Integration['status'],\n iconUrl: row.iconUrl ?? undefined,\n createdAt: new Date(row.createdAt),\n updatedAt: new Date(row.updatedAt),\n };\n}\n\nfunction rowToConnection(row: ConnectionRow): Connection {\n return {\n id: row.id,\n integrationId: row.integrationId,\n name: row.name,\n status: row.status as Connection['status'],\n credentials: row.credentials ? JSON.parse(row.credentials) : undefined,\n config: row.config ? JSON.parse(row.config) : undefined,\n lastSyncAt: row.lastSyncAt ? new Date(row.lastSyncAt) : undefined,\n errorMessage: row.errorMessage ?? undefined,\n createdAt: new Date(row.createdAt),\n updatedAt: new Date(row.updatedAt),\n };\n}\n\nfunction rowToSyncConfig(row: SyncConfigRow): SyncConfig {\n return {\n id: row.id,\n connectionId: row.connectionId,\n name: row.name,\n sourceEntity: row.sourceEntity,\n targetEntity: row.targetEntity,\n frequency: row.frequency as SyncConfig['frequency'],\n status: row.status as SyncConfig['status'],\n lastRunAt: row.lastRunAt ? new Date(row.lastRunAt) : undefined,\n lastRunStatus:\n (row.lastRunStatus as SyncConfig['lastRunStatus']) ?? undefined,\n recordsSynced: row.recordsSynced,\n createdAt: new Date(row.createdAt),\n updatedAt: new Date(row.updatedAt),\n };\n}\n\nfunction rowToFieldMapping(row: FieldMappingRow): FieldMapping {\n return {\n id: row.id,\n syncConfigId: row.syncConfigId,\n sourceField: row.sourceField,\n targetField: row.targetField,\n transformType:\n (row.transformType as FieldMapping['transformType']) ?? undefined,\n transformConfig: row.transformConfig\n ? JSON.parse(row.transformConfig)\n : undefined,\n createdAt: new Date(row.createdAt),\n };\n}\n\n// ============ Handler Factory ============\n\nexport function createIntegrationHandlers(db: DatabasePort) {\n /**\n * List integrations\n */\n async function listIntegrations(\n input: ListIntegrationsInput\n ): Promise<ListIntegrationsOutput> {\n const { projectId, type, status, search, limit = 20, offset = 0 } = input;\n\n let whereClause = 'WHERE projectId = ?';\n const params: (string | number)[] = [projectId];\n\n if (type && type !== 'all') {\n whereClause += ' AND type = ?';\n params.push(type);\n }\n\n if (status && status !== 'all') {\n whereClause += ' AND status = ?';\n params.push(status);\n }\n\n if (search) {\n whereClause += ' AND name LIKE ?';\n params.push(`%${search}%`);\n }\n\n const countResult = (\n await db.query(\n `SELECT COUNT(*) as count FROM integration ${whereClause}`,\n params\n )\n ).rows as DbRow[];\n const total = (countResult[0]?.count as number) ?? 0;\n\n const rows = (\n await db.query(\n `SELECT * FROM integration ${whereClause} ORDER BY name LIMIT ? OFFSET ?`,\n [...params, limit, offset]\n )\n ).rows as unknown as IntegrationRow[];\n\n return {\n integrations: rows.map(rowToIntegration),\n total,\n };\n }\n\n /**\n * Create an integration\n */\n async function createIntegration(\n input: CreateIntegrationInput,\n context: { projectId: string; organizationId: string }\n ): Promise<Integration> {\n const id = generateId('integ');\n const now = new Date().toISOString();\n\n await db.execute(\n `INSERT INTO integration (id, projectId, organizationId, name, description, type, status, iconUrl, createdAt, updatedAt)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,\n [\n id,\n context.projectId,\n context.organizationId,\n input.name,\n input.description ?? null,\n input.type,\n 'INACTIVE',\n input.iconUrl ?? null,\n now,\n now,\n ]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration WHERE id = ?`, [id])\n ).rows as unknown as IntegrationRow[];\n\n return rowToIntegration(rows[0]!);\n }\n\n /**\n * List connections\n */\n async function listConnections(\n input: ListConnectionsInput\n ): Promise<ListConnectionsOutput> {\n const { integrationId, status, limit = 20, offset = 0 } = input;\n\n let whereClause = 'WHERE 1=1';\n const params: (string | number)[] = [];\n\n if (integrationId) {\n whereClause += ' AND integrationId = ?';\n params.push(integrationId);\n }\n\n if (status && status !== 'all') {\n whereClause += ' AND status = ?';\n params.push(status);\n }\n\n const countResult = (\n await db.query(\n `SELECT COUNT(*) as count FROM integration_connection ${whereClause}`,\n params\n )\n ).rows as DbRow[];\n const total = (countResult[0]?.count as number) ?? 0;\n\n const rows = (\n await db.query(\n `SELECT * FROM integration_connection ${whereClause} ORDER BY updatedAt DESC LIMIT ? OFFSET ?`,\n [...params, limit, offset]\n )\n ).rows as unknown as ConnectionRow[];\n\n return {\n connections: rows.map(rowToConnection),\n total,\n };\n }\n\n /**\n * Connect a service\n */\n async function connectService(\n input: ConnectServiceInput\n ): Promise<Connection> {\n const id = generateId('conn');\n const now = new Date().toISOString();\n\n await db.execute(\n `INSERT INTO integration_connection (id, integrationId, name, status, credentials, config, createdAt, updatedAt)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,\n [\n id,\n input.integrationId,\n input.name,\n 'PENDING',\n input.credentials ? JSON.stringify(input.credentials) : null,\n input.config ? JSON.stringify(input.config) : null,\n now,\n now,\n ]\n );\n\n // Simulate connection success\n await db.execute(\n `UPDATE integration_connection SET status = 'CONNECTED', updatedAt = ? WHERE id = ?`,\n [now, id]\n );\n\n // Activate integration\n await db.execute(\n `UPDATE integration SET status = 'ACTIVE', updatedAt = ? WHERE id = ?`,\n [now, input.integrationId]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration_connection WHERE id = ?`, [id])\n ).rows as unknown as ConnectionRow[];\n\n return rowToConnection(rows[0]!);\n }\n\n /**\n * Disconnect a service\n */\n async function disconnectService(connectionId: string): Promise<Connection> {\n const now = new Date().toISOString();\n\n await db.execute(\n `UPDATE integration_connection SET status = 'DISCONNECTED', updatedAt = ? WHERE id = ?`,\n [now, connectionId]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration_connection WHERE id = ?`, [\n connectionId,\n ])\n ).rows as unknown as ConnectionRow[];\n\n return rowToConnection(rows[0]!);\n }\n\n /**\n * List sync configs\n */\n async function listSyncConfigs(\n input: ListSyncConfigsInput\n ): Promise<ListSyncConfigsOutput> {\n const { connectionId, status, limit = 20, offset = 0 } = input;\n\n let whereClause = 'WHERE 1=1';\n const params: (string | number)[] = [];\n\n if (connectionId) {\n whereClause += ' AND connectionId = ?';\n params.push(connectionId);\n }\n\n if (status && status !== 'all') {\n whereClause += ' AND status = ?';\n params.push(status);\n }\n\n const countResult = (\n await db.query(\n `SELECT COUNT(*) as count FROM integration_sync_config ${whereClause}`,\n params\n )\n ).rows as DbRow[];\n const total = (countResult[0]?.count as number) ?? 0;\n\n const rows = (\n await db.query(\n `SELECT * FROM integration_sync_config ${whereClause} ORDER BY updatedAt DESC LIMIT ? OFFSET ?`,\n [...params, limit, offset]\n )\n ).rows as unknown as SyncConfigRow[];\n\n return {\n configs: rows.map(rowToSyncConfig),\n total,\n };\n }\n\n /**\n * Configure a sync\n */\n async function configureSync(input: ConfigureSyncInput): Promise<SyncConfig> {\n const id = generateId('sync');\n const now = new Date().toISOString();\n\n await db.execute(\n `INSERT INTO integration_sync_config (id, connectionId, name, sourceEntity, targetEntity, frequency, status, recordsSynced, createdAt, updatedAt)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,\n [\n id,\n input.connectionId,\n input.name,\n input.sourceEntity,\n input.targetEntity,\n input.frequency ?? 'DAILY',\n 'ACTIVE',\n 0,\n now,\n now,\n ]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration_sync_config WHERE id = ?`, [id])\n ).rows as unknown as SyncConfigRow[];\n\n return rowToSyncConfig(rows[0]!);\n }\n\n /**\n * Map fields for a sync\n */\n async function mapFields(input: MapFieldsInput): Promise<FieldMapping[]> {\n const now = new Date().toISOString();\n const mappings: FieldMapping[] = [];\n\n // Clear existing mappings\n await db.execute(\n `DELETE FROM integration_field_mapping WHERE syncConfigId = ?`,\n [input.syncConfigId]\n );\n\n for (const mapping of input.mappings) {\n const id = generateId('fmap');\n\n await db.execute(\n `INSERT INTO integration_field_mapping (id, syncConfigId, sourceField, targetField, transformType, transformConfig, createdAt)\n VALUES (?, ?, ?, ?, ?, ?, ?)`,\n [\n id,\n input.syncConfigId,\n mapping.sourceField,\n mapping.targetField,\n mapping.transformType ?? null,\n mapping.transformConfig\n ? JSON.stringify(mapping.transformConfig)\n : null,\n now,\n ]\n );\n\n const rows = (\n await db.query(`SELECT * FROM integration_field_mapping WHERE id = ?`, [\n id,\n ])\n ).rows as unknown as FieldMappingRow[];\n\n mappings.push(rowToFieldMapping(rows[0]!));\n }\n\n return mappings;\n }\n\n /**\n * Get field mappings for a sync config\n */\n async function getFieldMappings(\n syncConfigId: string\n ): Promise<FieldMapping[]> {\n const rows = (\n await db.query(\n `SELECT * FROM integration_field_mapping WHERE syncConfigId = ?`,\n [syncConfigId]\n )\n ).rows as unknown as FieldMappingRow[];\n\n return rows.map(rowToFieldMapping);\n }\n\n /**\n * Run a sync (simulated)\n */\n async function runSync(syncConfigId: string): Promise<SyncConfig> {\n const now = new Date().toISOString();\n\n // Simulate sync execution\n const recordsSynced = Math.floor(Math.random() * 1000) + 50;\n\n await db.execute(\n `UPDATE integration_sync_config SET lastRunAt = ?, lastRunStatus = 'SUCCESS', recordsSynced = recordsSynced + ?, updatedAt = ? WHERE id = ?`,\n [now, recordsSynced, now, syncConfigId]\n );\n\n // Update connection lastSyncAt\n const config = (\n await db.query(`SELECT * FROM integration_sync_config WHERE id = ?`, [\n syncConfigId,\n ])\n ).rows as unknown as SyncConfigRow[];\n\n if (config[0]) {\n await db.execute(\n `UPDATE integration_connection SET lastSyncAt = ?, updatedAt = ? WHERE id = ?`,\n [now, now, config[0].connectionId]\n );\n }\n\n const rows = (\n await db.query(`SELECT * FROM integration_sync_config WHERE id = ?`, [\n syncConfigId,\n ])\n ).rows as unknown as SyncConfigRow[];\n\n return rowToSyncConfig(rows[0]!);\n }\n\n return {\n listIntegrations,\n createIntegration,\n listConnections,\n connectService,\n disconnectService,\n listSyncConfigs,\n configureSync,\n mapFields,\n getFieldMappings,\n runSync,\n };\n}\n\nexport type IntegrationHandlers = ReturnType<typeof createIntegrationHandlers>;\n"],"mappings":";;;AAQA,MAAM,EAAE,eAAe;AAyLvB,SAAS,iBAAiB,KAAkC;AAC1D,QAAO;EACL,IAAI,IAAI;EACR,WAAW,IAAI;EACf,gBAAgB,IAAI;EACpB,MAAM,IAAI;EACV,aAAa,IAAI,eAAe;EAChC,MAAM,IAAI;EACV,QAAQ,IAAI;EACZ,SAAS,IAAI,WAAW;EACxB,WAAW,IAAI,KAAK,IAAI,UAAU;EAClC,WAAW,IAAI,KAAK,IAAI,UAAU;EACnC;;AAGH,SAAS,gBAAgB,KAAgC;AACvD,QAAO;EACL,IAAI,IAAI;EACR,eAAe,IAAI;EACnB,MAAM,IAAI;EACV,QAAQ,IAAI;EACZ,aAAa,IAAI,cAAc,KAAK,MAAM,IAAI,YAAY,GAAG;EAC7D,QAAQ,IAAI,SAAS,KAAK,MAAM,IAAI,OAAO,GAAG;EAC9C,YAAY,IAAI,aAAa,IAAI,KAAK,IAAI,WAAW,GAAG;EACxD,cAAc,IAAI,gBAAgB;EAClC,WAAW,IAAI,KAAK,IAAI,UAAU;EAClC,WAAW,IAAI,KAAK,IAAI,UAAU;EACnC;;AAGH,SAAS,gBAAgB,KAAgC;AACvD,QAAO;EACL,IAAI,IAAI;EACR,cAAc,IA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