@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
|
@@ -1,244 +1,115 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/integration-hub.feature.ts
|
|
1
3
|
import { defineFeature } from "@contractspec/lib.contracts";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
version: "1.0.0"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
key: "integration.fieldMapping.editor",
|
|
114
|
-
version: "1.0.0"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
key: "integration.syncRun.viewList",
|
|
118
|
-
version: "1.0.0"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
key: "integration.syncRun.detail",
|
|
122
|
-
version: "1.0.0"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
key: "integration.health",
|
|
126
|
-
version: "1.0.0"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
key: "integration.sync.activity",
|
|
130
|
-
version: "1.0.0"
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
opToPresentation: [
|
|
134
|
-
{
|
|
135
|
-
op: {
|
|
136
|
-
key: "integration.syncConfig.create",
|
|
137
|
-
version: "1.0.0"
|
|
138
|
-
},
|
|
139
|
-
pres: {
|
|
140
|
-
key: "integration.syncConfig.editor",
|
|
141
|
-
version: "1.0.0"
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
op: {
|
|
146
|
-
key: "integration.fieldMapping.add",
|
|
147
|
-
version: "1.0.0"
|
|
148
|
-
},
|
|
149
|
-
pres: {
|
|
150
|
-
key: "integration.fieldMapping.editor",
|
|
151
|
-
version: "1.0.0"
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
op: {
|
|
156
|
-
key: "integration.syncRun.list",
|
|
157
|
-
version: "1.0.0"
|
|
158
|
-
},
|
|
159
|
-
pres: {
|
|
160
|
-
key: "integration.syncRun.viewList",
|
|
161
|
-
version: "1.0.0"
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
],
|
|
165
|
-
presentationsTargets: [
|
|
166
|
-
{
|
|
167
|
-
key: "integration.list",
|
|
168
|
-
version: "1.0.0",
|
|
169
|
-
targets: ["react", "markdown"]
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
key: "integration.detail",
|
|
173
|
-
version: "1.0.0",
|
|
174
|
-
targets: ["react", "markdown"]
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
key: "integration.syncConfig.list",
|
|
178
|
-
version: "1.0.0",
|
|
179
|
-
targets: ["react", "markdown"]
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
key: "integration.syncConfig.editor",
|
|
183
|
-
version: "1.0.0",
|
|
184
|
-
targets: ["react"]
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
key: "integration.fieldMapping.editor",
|
|
188
|
-
version: "1.0.0",
|
|
189
|
-
targets: ["react"]
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
key: "integration.syncRun.viewList",
|
|
193
|
-
version: "1.0.0",
|
|
194
|
-
targets: ["react", "markdown"]
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
key: "integration.syncRun.detail",
|
|
198
|
-
version: "1.0.0",
|
|
199
|
-
targets: ["react", "markdown"]
|
|
200
|
-
}
|
|
201
|
-
],
|
|
202
|
-
capabilities: {
|
|
203
|
-
requires: [
|
|
204
|
-
{
|
|
205
|
-
key: "identity",
|
|
206
|
-
version: "1.0.0"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
key: "audit-trail",
|
|
210
|
-
version: "1.0.0"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
key: "feature-flags",
|
|
214
|
-
version: "1.0.0"
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
key: "jobs",
|
|
218
|
-
version: "1.0.0"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
key: "files",
|
|
222
|
-
version: "1.0.0"
|
|
223
|
-
}
|
|
224
|
-
],
|
|
225
|
-
provides: [
|
|
226
|
-
{
|
|
227
|
-
key: "integration",
|
|
228
|
-
version: "1.0.0"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
key: "sync",
|
|
232
|
-
version: "1.0.0"
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
key: "etl",
|
|
236
|
-
version: "1.0.0"
|
|
237
|
-
}
|
|
238
|
-
]
|
|
239
|
-
}
|
|
4
|
+
var IntegrationHubFeature = defineFeature({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "integration-hub",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
title: "Integration Hub",
|
|
9
|
+
description: "Connect and sync data with external systems through configurable integrations",
|
|
10
|
+
domain: "integration",
|
|
11
|
+
owners: ["@integration-team"],
|
|
12
|
+
tags: ["integration", "sync", "etl", "connectors"],
|
|
13
|
+
stability: "experimental"
|
|
14
|
+
},
|
|
15
|
+
operations: [
|
|
16
|
+
{ key: "integration.create", version: "1.0.0" },
|
|
17
|
+
{ key: "integration.connection.create", version: "1.0.0" },
|
|
18
|
+
{ key: "integration.syncConfig.create", version: "1.0.0" },
|
|
19
|
+
{ key: "integration.fieldMapping.add", version: "1.0.0" },
|
|
20
|
+
{ key: "integration.sync.trigger", version: "1.0.0" },
|
|
21
|
+
{ key: "integration.syncRun.list", version: "1.0.0" }
|
|
22
|
+
],
|
|
23
|
+
events: [
|
|
24
|
+
{ key: "integration.created", version: "1.0.0" },
|
|
25
|
+
{ key: "integration.connection.created", version: "1.0.0" },
|
|
26
|
+
{ key: "integration.connection.statusChanged", version: "1.0.0" },
|
|
27
|
+
{ key: "integration.syncConfig.created", version: "1.0.0" },
|
|
28
|
+
{ key: "integration.sync.started", version: "1.0.0" },
|
|
29
|
+
{ key: "integration.sync.completed", version: "1.0.0" },
|
|
30
|
+
{ key: "integration.sync.failed", version: "1.0.0" },
|
|
31
|
+
{ key: "integration.record.synced", version: "1.0.0" },
|
|
32
|
+
{ key: "integration.fieldMapping.added", version: "1.0.0" }
|
|
33
|
+
],
|
|
34
|
+
presentations: [
|
|
35
|
+
{ key: "integration.list", version: "1.0.0" },
|
|
36
|
+
{ key: "integration.detail", version: "1.0.0" },
|
|
37
|
+
{ key: "integration.connection.list", version: "1.0.0" },
|
|
38
|
+
{ key: "integration.connection.setup", version: "1.0.0" },
|
|
39
|
+
{ key: "integration.syncConfig.list", version: "1.0.0" },
|
|
40
|
+
{ key: "integration.syncConfig.editor", version: "1.0.0" },
|
|
41
|
+
{ key: "integration.fieldMapping.editor", version: "1.0.0" },
|
|
42
|
+
{ key: "integration.syncRun.viewList", version: "1.0.0" },
|
|
43
|
+
{ key: "integration.syncRun.detail", version: "1.0.0" },
|
|
44
|
+
{ key: "integration.health", version: "1.0.0" },
|
|
45
|
+
{ key: "integration.sync.activity", version: "1.0.0" }
|
|
46
|
+
],
|
|
47
|
+
opToPresentation: [
|
|
48
|
+
{
|
|
49
|
+
op: { key: "integration.syncConfig.create", version: "1.0.0" },
|
|
50
|
+
pres: { key: "integration.syncConfig.editor", version: "1.0.0" }
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
op: { key: "integration.fieldMapping.add", version: "1.0.0" },
|
|
54
|
+
pres: { key: "integration.fieldMapping.editor", version: "1.0.0" }
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
op: { key: "integration.syncRun.list", version: "1.0.0" },
|
|
58
|
+
pres: { key: "integration.syncRun.viewList", version: "1.0.0" }
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
presentationsTargets: [
|
|
62
|
+
{
|
|
63
|
+
key: "integration.list",
|
|
64
|
+
version: "1.0.0",
|
|
65
|
+
targets: ["react", "markdown"]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
key: "integration.detail",
|
|
69
|
+
version: "1.0.0",
|
|
70
|
+
targets: ["react", "markdown"]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: "integration.syncConfig.list",
|
|
74
|
+
version: "1.0.0",
|
|
75
|
+
targets: ["react", "markdown"]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
key: "integration.syncConfig.editor",
|
|
79
|
+
version: "1.0.0",
|
|
80
|
+
targets: ["react"]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
key: "integration.fieldMapping.editor",
|
|
84
|
+
version: "1.0.0",
|
|
85
|
+
targets: ["react"]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
key: "integration.syncRun.viewList",
|
|
89
|
+
version: "1.0.0",
|
|
90
|
+
targets: ["react", "markdown"]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
key: "integration.syncRun.detail",
|
|
94
|
+
version: "1.0.0",
|
|
95
|
+
targets: ["react", "markdown"]
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
capabilities: {
|
|
99
|
+
requires: [
|
|
100
|
+
{ key: "identity", version: "1.0.0" },
|
|
101
|
+
{ key: "audit-trail", version: "1.0.0" },
|
|
102
|
+
{ key: "feature-flags", version: "1.0.0" },
|
|
103
|
+
{ key: "jobs", version: "1.0.0" },
|
|
104
|
+
{ key: "files", version: "1.0.0" }
|
|
105
|
+
],
|
|
106
|
+
provides: [
|
|
107
|
+
{ key: "integration", version: "1.0.0" },
|
|
108
|
+
{ key: "sync", version: "1.0.0" },
|
|
109
|
+
{ key: "etl", version: "1.0.0" }
|
|
110
|
+
]
|
|
111
|
+
}
|
|
240
112
|
});
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
//# sourceMappingURL=integration-hub.feature.js.map
|
|
113
|
+
export {
|
|
114
|
+
IntegrationHubFeature
|
|
115
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/connection/connection.enum.ts
|
|
2
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
3
|
+
var ConnectionStatusEnum = defineEnum("ConnectionStatus", [
|
|
4
|
+
"PENDING",
|
|
5
|
+
"CONNECTED",
|
|
6
|
+
"DISCONNECTED",
|
|
7
|
+
"ERROR",
|
|
8
|
+
"EXPIRED"
|
|
9
|
+
]);
|
|
10
|
+
export {
|
|
11
|
+
ConnectionStatusEnum
|
|
12
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// src/connection/connection.enum.ts
|
|
2
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
3
|
+
var ConnectionStatusEnum = defineEnum("ConnectionStatus", [
|
|
4
|
+
"PENDING",
|
|
5
|
+
"CONNECTED",
|
|
6
|
+
"DISCONNECTED",
|
|
7
|
+
"ERROR",
|
|
8
|
+
"EXPIRED"
|
|
9
|
+
]);
|
|
10
|
+
|
|
11
|
+
// src/connection/connection.schema.ts
|
|
12
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
13
|
+
var ConnectionModel = defineSchemaModel({
|
|
14
|
+
name: "ConnectionModel",
|
|
15
|
+
fields: {
|
|
16
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
17
|
+
integrationId: {
|
|
18
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
19
|
+
isOptional: false
|
|
20
|
+
},
|
|
21
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
status: { type: ConnectionStatusEnum, isOptional: false },
|
|
23
|
+
authType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
+
externalAccountName: {
|
|
25
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
26
|
+
isOptional: true
|
|
27
|
+
},
|
|
28
|
+
connectedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
29
|
+
lastHealthCheck: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
30
|
+
healthStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
var CreateConnectionInputModel = defineSchemaModel({
|
|
34
|
+
name: "CreateConnectionInput",
|
|
35
|
+
fields: {
|
|
36
|
+
integrationId: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: false
|
|
39
|
+
},
|
|
40
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
41
|
+
authType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
42
|
+
credentials: { type: ScalarTypeEnum.JSON(), isOptional: true }
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// src/connection/connection.operation.ts
|
|
47
|
+
import { defineCommand } from "@contractspec/lib.contracts/operations";
|
|
48
|
+
var OWNERS = ["@example.integration-hub"];
|
|
49
|
+
var CreateConnectionContract = defineCommand({
|
|
50
|
+
meta: {
|
|
51
|
+
key: "integration.connection.create",
|
|
52
|
+
version: "1.0.0",
|
|
53
|
+
stability: "stable",
|
|
54
|
+
owners: [...OWNERS],
|
|
55
|
+
tags: ["integration", "connection", "create"],
|
|
56
|
+
description: "Create a connection to an external system.",
|
|
57
|
+
goal: "Authenticate with external systems.",
|
|
58
|
+
context: "Connection setup."
|
|
59
|
+
},
|
|
60
|
+
io: { input: CreateConnectionInputModel, output: ConnectionModel },
|
|
61
|
+
policy: { auth: "user" },
|
|
62
|
+
sideEffects: {
|
|
63
|
+
emits: [
|
|
64
|
+
{
|
|
65
|
+
key: "integration.connection.created",
|
|
66
|
+
version: "1.0.0",
|
|
67
|
+
when: "Connection created",
|
|
68
|
+
payload: ConnectionModel
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
audit: ["integration.connection.created"]
|
|
72
|
+
},
|
|
73
|
+
acceptance: {
|
|
74
|
+
scenarios: [
|
|
75
|
+
{
|
|
76
|
+
key: "create-connection-happy-path",
|
|
77
|
+
given: ["User is authenticated"],
|
|
78
|
+
when: ["User creates connection with valid credentials"],
|
|
79
|
+
then: ["Connection is created", "ConnectionCreated event is emitted"]
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
examples: [
|
|
83
|
+
{
|
|
84
|
+
key: "connect-crm",
|
|
85
|
+
input: {
|
|
86
|
+
name: "Salesforce Prod",
|
|
87
|
+
integrationId: "salesforce",
|
|
88
|
+
credentials: { clientId: "xxx" }
|
|
89
|
+
},
|
|
90
|
+
output: {
|
|
91
|
+
id: "conn-123",
|
|
92
|
+
status: "connected",
|
|
93
|
+
connectedAt: "2025-01-01T12:00:00Z"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
export {
|
|
100
|
+
CreateConnectionContract
|
|
101
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// src/connection/connection.enum.ts
|
|
2
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
3
|
+
var ConnectionStatusEnum = defineEnum("ConnectionStatus", [
|
|
4
|
+
"PENDING",
|
|
5
|
+
"CONNECTED",
|
|
6
|
+
"DISCONNECTED",
|
|
7
|
+
"ERROR",
|
|
8
|
+
"EXPIRED"
|
|
9
|
+
]);
|
|
10
|
+
|
|
11
|
+
// src/connection/connection.schema.ts
|
|
12
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
13
|
+
var ConnectionModel = defineSchemaModel({
|
|
14
|
+
name: "ConnectionModel",
|
|
15
|
+
fields: {
|
|
16
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
17
|
+
integrationId: {
|
|
18
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
19
|
+
isOptional: false
|
|
20
|
+
},
|
|
21
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
status: { type: ConnectionStatusEnum, isOptional: false },
|
|
23
|
+
authType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
+
externalAccountName: {
|
|
25
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
26
|
+
isOptional: true
|
|
27
|
+
},
|
|
28
|
+
connectedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
29
|
+
lastHealthCheck: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
30
|
+
healthStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
var CreateConnectionInputModel = defineSchemaModel({
|
|
34
|
+
name: "CreateConnectionInput",
|
|
35
|
+
fields: {
|
|
36
|
+
integrationId: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: false
|
|
39
|
+
},
|
|
40
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
41
|
+
authType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
42
|
+
credentials: { type: ScalarTypeEnum.JSON(), isOptional: true }
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// src/connection/connection.presentation.ts
|
|
47
|
+
import { definePresentation, StabilityEnum } from "@contractspec/lib.contracts";
|
|
48
|
+
var ConnectionListPresentation = definePresentation({
|
|
49
|
+
meta: {
|
|
50
|
+
key: "integration.connection.list",
|
|
51
|
+
version: "1.0.0",
|
|
52
|
+
title: "Connection List",
|
|
53
|
+
description: "List of integration connections",
|
|
54
|
+
domain: "integration",
|
|
55
|
+
owners: ["@integration-team"],
|
|
56
|
+
tags: ["integration", "connection", "list"],
|
|
57
|
+
stability: StabilityEnum.Experimental,
|
|
58
|
+
goal: "Provide an overview of all established integration connections.",
|
|
59
|
+
context: "The primary management view for integration hubs."
|
|
60
|
+
},
|
|
61
|
+
source: {
|
|
62
|
+
type: "component",
|
|
63
|
+
framework: "react",
|
|
64
|
+
componentKey: "ConnectionList",
|
|
65
|
+
props: ConnectionModel
|
|
66
|
+
},
|
|
67
|
+
targets: ["react", "markdown"],
|
|
68
|
+
policy: {
|
|
69
|
+
flags: ["integration.enabled"]
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
var ConnectionSetupPresentation = definePresentation({
|
|
73
|
+
meta: {
|
|
74
|
+
key: "integration.connection.setup",
|
|
75
|
+
version: "1.0.0",
|
|
76
|
+
title: "Connection Setup",
|
|
77
|
+
description: "Setup wizard for creating integration connections",
|
|
78
|
+
domain: "integration",
|
|
79
|
+
owners: ["@integration-team"],
|
|
80
|
+
tags: ["integration", "connection", "setup"],
|
|
81
|
+
stability: StabilityEnum.Experimental,
|
|
82
|
+
goal: "Guide users through the multi-step process of connecting to a new integration.",
|
|
83
|
+
context: "The onboarding flow for new integrations."
|
|
84
|
+
},
|
|
85
|
+
source: {
|
|
86
|
+
type: "component",
|
|
87
|
+
framework: "react",
|
|
88
|
+
componentKey: "ConnectionSetup",
|
|
89
|
+
props: ConnectionModel
|
|
90
|
+
},
|
|
91
|
+
targets: ["react"],
|
|
92
|
+
policy: {
|
|
93
|
+
flags: ["integration.enabled"]
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
export {
|
|
97
|
+
ConnectionSetupPresentation,
|
|
98
|
+
ConnectionListPresentation
|
|
99
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// src/connection/connection.enum.ts
|
|
2
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
3
|
+
var ConnectionStatusEnum = defineEnum("ConnectionStatus", [
|
|
4
|
+
"PENDING",
|
|
5
|
+
"CONNECTED",
|
|
6
|
+
"DISCONNECTED",
|
|
7
|
+
"ERROR",
|
|
8
|
+
"EXPIRED"
|
|
9
|
+
]);
|
|
10
|
+
|
|
11
|
+
// src/connection/connection.schema.ts
|
|
12
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
13
|
+
var ConnectionModel = defineSchemaModel({
|
|
14
|
+
name: "ConnectionModel",
|
|
15
|
+
fields: {
|
|
16
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
17
|
+
integrationId: {
|
|
18
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
19
|
+
isOptional: false
|
|
20
|
+
},
|
|
21
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
status: { type: ConnectionStatusEnum, isOptional: false },
|
|
23
|
+
authType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
24
|
+
externalAccountName: {
|
|
25
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
26
|
+
isOptional: true
|
|
27
|
+
},
|
|
28
|
+
connectedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
29
|
+
lastHealthCheck: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
30
|
+
healthStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
var CreateConnectionInputModel = defineSchemaModel({
|
|
34
|
+
name: "CreateConnectionInput",
|
|
35
|
+
fields: {
|
|
36
|
+
integrationId: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: false
|
|
39
|
+
},
|
|
40
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
41
|
+
authType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
42
|
+
credentials: { type: ScalarTypeEnum.JSON(), isOptional: true }
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
CreateConnectionInputModel,
|
|
47
|
+
ConnectionModel
|
|
48
|
+
};
|