@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,76 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/connection/connection.enum.ts
|
|
3
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var ConnectionStatusEnum = defineEnum("ConnectionStatus", [
|
|
5
|
+
"PENDING",
|
|
6
|
+
"CONNECTED",
|
|
7
|
+
"DISCONNECTED",
|
|
8
|
+
"ERROR",
|
|
9
|
+
"EXPIRED"
|
|
10
|
+
]);
|
|
3
11
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
isOptional: false
|
|
26
|
-
},
|
|
27
|
-
authType: {
|
|
28
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
29
|
-
isOptional: false
|
|
30
|
-
},
|
|
31
|
-
externalAccountName: {
|
|
32
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
33
|
-
isOptional: true
|
|
34
|
-
},
|
|
35
|
-
connectedAt: {
|
|
36
|
-
type: ScalarTypeEnum.DateTime(),
|
|
37
|
-
isOptional: true
|
|
38
|
-
},
|
|
39
|
-
lastHealthCheck: {
|
|
40
|
-
type: ScalarTypeEnum.DateTime(),
|
|
41
|
-
isOptional: true
|
|
42
|
-
},
|
|
43
|
-
healthStatus: {
|
|
44
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
45
|
-
isOptional: true
|
|
46
|
-
}
|
|
47
|
-
}
|
|
12
|
+
// src/connection/connection.schema.ts
|
|
13
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
14
|
+
var ConnectionModel = defineSchemaModel({
|
|
15
|
+
name: "ConnectionModel",
|
|
16
|
+
fields: {
|
|
17
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
18
|
+
integrationId: {
|
|
19
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
20
|
+
isOptional: false
|
|
21
|
+
},
|
|
22
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
status: { type: ConnectionStatusEnum, isOptional: false },
|
|
24
|
+
authType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
25
|
+
externalAccountName: {
|
|
26
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
27
|
+
isOptional: true
|
|
28
|
+
},
|
|
29
|
+
connectedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
30
|
+
lastHealthCheck: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
31
|
+
healthStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
32
|
+
}
|
|
48
33
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
type: ScalarTypeEnum.NonEmptyString(),
|
|
61
|
-
isOptional: false
|
|
62
|
-
},
|
|
63
|
-
authType: {
|
|
64
|
-
type: ScalarTypeEnum.NonEmptyString(),
|
|
65
|
-
isOptional: false
|
|
66
|
-
},
|
|
67
|
-
credentials: {
|
|
68
|
-
type: ScalarTypeEnum.JSON(),
|
|
69
|
-
isOptional: true
|
|
70
|
-
}
|
|
71
|
-
}
|
|
34
|
+
var CreateConnectionInputModel = defineSchemaModel({
|
|
35
|
+
name: "CreateConnectionInput",
|
|
36
|
+
fields: {
|
|
37
|
+
integrationId: {
|
|
38
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
39
|
+
isOptional: false
|
|
40
|
+
},
|
|
41
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
42
|
+
authType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
43
|
+
credentials: { type: ScalarTypeEnum.JSON(), isOptional: true }
|
|
44
|
+
}
|
|
72
45
|
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
46
|
+
export {
|
|
47
|
+
CreateConnectionInputModel,
|
|
48
|
+
ConnectionModel
|
|
49
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
1
|
+
/**
|
|
2
|
+
* Connection domain - Connection management.
|
|
3
|
+
*/
|
|
4
|
+
export { ConnectionStatusEnum } from './connection.enum';
|
|
5
|
+
export { ConnectionModel, CreateConnectionInputModel, } from './connection.schema';
|
|
6
|
+
export { CreateConnectionContract } from './connection.operation';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connection/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,eAAe,EACf,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/connection/index.js
CHANGED
|
@@ -1,5 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
// @bun
|
|
2
|
+
// src/connection/connection.enum.ts
|
|
3
|
+
import { defineEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var ConnectionStatusEnum = defineEnum("ConnectionStatus", [
|
|
5
|
+
"PENDING",
|
|
6
|
+
"CONNECTED",
|
|
7
|
+
"DISCONNECTED",
|
|
8
|
+
"ERROR",
|
|
9
|
+
"EXPIRED"
|
|
10
|
+
]);
|
|
4
11
|
|
|
5
|
-
|
|
12
|
+
// src/connection/connection.schema.ts
|
|
13
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
14
|
+
var ConnectionModel = defineSchemaModel({
|
|
15
|
+
name: "ConnectionModel",
|
|
16
|
+
fields: {
|
|
17
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
18
|
+
integrationId: {
|
|
19
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
20
|
+
isOptional: false
|
|
21
|
+
},
|
|
22
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
status: { type: ConnectionStatusEnum, isOptional: false },
|
|
24
|
+
authType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
25
|
+
externalAccountName: {
|
|
26
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
27
|
+
isOptional: true
|
|
28
|
+
},
|
|
29
|
+
connectedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
30
|
+
lastHealthCheck: { type: ScalarTypeEnum.DateTime(), isOptional: true },
|
|
31
|
+
healthStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var CreateConnectionInputModel = defineSchemaModel({
|
|
35
|
+
name: "CreateConnectionInput",
|
|
36
|
+
fields: {
|
|
37
|
+
integrationId: {
|
|
38
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
39
|
+
isOptional: false
|
|
40
|
+
},
|
|
41
|
+
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
42
|
+
authType: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
43
|
+
credentials: { type: ScalarTypeEnum.JSON(), isOptional: true }
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// src/connection/connection.operation.ts
|
|
48
|
+
import { defineCommand } from "@contractspec/lib.contracts/operations";
|
|
49
|
+
var OWNERS = ["@example.integration-hub"];
|
|
50
|
+
var CreateConnectionContract = defineCommand({
|
|
51
|
+
meta: {
|
|
52
|
+
key: "integration.connection.create",
|
|
53
|
+
version: "1.0.0",
|
|
54
|
+
stability: "stable",
|
|
55
|
+
owners: [...OWNERS],
|
|
56
|
+
tags: ["integration", "connection", "create"],
|
|
57
|
+
description: "Create a connection to an external system.",
|
|
58
|
+
goal: "Authenticate with external systems.",
|
|
59
|
+
context: "Connection setup."
|
|
60
|
+
},
|
|
61
|
+
io: { input: CreateConnectionInputModel, output: ConnectionModel },
|
|
62
|
+
policy: { auth: "user" },
|
|
63
|
+
sideEffects: {
|
|
64
|
+
emits: [
|
|
65
|
+
{
|
|
66
|
+
key: "integration.connection.created",
|
|
67
|
+
version: "1.0.0",
|
|
68
|
+
when: "Connection created",
|
|
69
|
+
payload: ConnectionModel
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
audit: ["integration.connection.created"]
|
|
73
|
+
},
|
|
74
|
+
acceptance: {
|
|
75
|
+
scenarios: [
|
|
76
|
+
{
|
|
77
|
+
key: "create-connection-happy-path",
|
|
78
|
+
given: ["User is authenticated"],
|
|
79
|
+
when: ["User creates connection with valid credentials"],
|
|
80
|
+
then: ["Connection is created", "ConnectionCreated event is emitted"]
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
examples: [
|
|
84
|
+
{
|
|
85
|
+
key: "connect-crm",
|
|
86
|
+
input: {
|
|
87
|
+
name: "Salesforce Prod",
|
|
88
|
+
integrationId: "salesforce",
|
|
89
|
+
credentials: { clientId: "xxx" }
|
|
90
|
+
},
|
|
91
|
+
output: {
|
|
92
|
+
id: "conn-123",
|
|
93
|
+
status: "connected",
|
|
94
|
+
connectedAt: "2025-01-01T12:00:00Z"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
export {
|
|
101
|
+
CreateConnectionInputModel,
|
|
102
|
+
CreateConnectionContract,
|
|
103
|
+
ConnectionStatusEnum,
|
|
104
|
+
ConnectionModel
|
|
105
|
+
};
|
package/dist/docs/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import './integration-hub.docblock';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC"}
|
package/dist/docs/index.js
CHANGED
|
@@ -1 +1,105 @@
|
|
|
1
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/docs/integration-hub.docblock.ts
|
|
3
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
4
|
+
var integrationHubDocBlocks = [
|
|
5
|
+
{
|
|
6
|
+
id: "docs.examples.integration-hub",
|
|
7
|
+
title: "Integration Hub",
|
|
8
|
+
summary: "Generic integration center with connectors, connections, sync configs, field mappings, and sync logs.",
|
|
9
|
+
kind: "reference",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
route: "/docs/examples/integration-hub",
|
|
12
|
+
tags: ["integrations", "sync", "etl", "connectors"],
|
|
13
|
+
body: `## Entities
|
|
14
|
+
|
|
15
|
+
- Integration, Connection, SyncConfig, FieldMapping, SyncLog.
|
|
16
|
+
- Sync engine config lives in \`src/sync-engine\` to map remote <-> local entities.
|
|
17
|
+
|
|
18
|
+
## Contracts
|
|
19
|
+
|
|
20
|
+
- \`integration.create\`, \`integration.connect\`, \`integration.configureSync\`, \`integration.mapFields\`, \`integration.runSync\`.
|
|
21
|
+
- Uses Jobs module for scheduled syncs and retries; Files module for payload archives.
|
|
22
|
+
|
|
23
|
+
## Events
|
|
24
|
+
|
|
25
|
+
- sync.started/completed/failed, connection.connected/disconnected, mapping.updated.
|
|
26
|
+
- Forward to Notifications and Audit for observability.
|
|
27
|
+
|
|
28
|
+
## UI / Presentations
|
|
29
|
+
|
|
30
|
+
- Dashboard, integration list, connection detail, sync config editor.
|
|
31
|
+
- Templates registered as \`integration-hub\` in Template Registry.
|
|
32
|
+
|
|
33
|
+
## Notes
|
|
34
|
+
|
|
35
|
+
- Providers remain agnostic; keep mappings declarative for safe regeneration.
|
|
36
|
+
- Seed data includes voice integrations for \`ai-voice.gradium\` and \`ai-voice.fal\`.
|
|
37
|
+
- Feature flags can gate specific providers; metering can track sync volume.
|
|
38
|
+
`
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "docs.examples.integration-hub.goal",
|
|
42
|
+
title: "Integration Hub \u2014 Goal",
|
|
43
|
+
summary: "Why this integration hub exists and what success looks like.",
|
|
44
|
+
kind: "goal",
|
|
45
|
+
visibility: "public",
|
|
46
|
+
route: "/docs/examples/integration-hub/goal",
|
|
47
|
+
tags: ["integrations", "goal"],
|
|
48
|
+
body: `## Why it matters
|
|
49
|
+
- Gives a regenerable, provider-agnostic integration hub with explicit mappings.
|
|
50
|
+
- Prevents drift between sync configs, mappings, and event/log outputs.
|
|
51
|
+
|
|
52
|
+
## Business/Product goal
|
|
53
|
+
- Model connectors, connections, sync jobs, and mappings with governance and retries.
|
|
54
|
+
- Support staged provider rollouts via Feature Flags and observability via Audit/Notifications.
|
|
55
|
+
|
|
56
|
+
## Success criteria
|
|
57
|
+
- Connections and mappings regenerate safely after spec edits.
|
|
58
|
+
- Sync events and logs provide auditability; payloads are stored and PII-scoped.`
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "docs.examples.integration-hub.usage",
|
|
62
|
+
title: "Integration Hub \u2014 Usage",
|
|
63
|
+
summary: "How to configure connectors, mappings, and scheduled syncs.",
|
|
64
|
+
kind: "usage",
|
|
65
|
+
visibility: "public",
|
|
66
|
+
route: "/docs/examples/integration-hub/usage",
|
|
67
|
+
tags: ["integrations", "usage"],
|
|
68
|
+
body: `## Setup
|
|
69
|
+
1) Seed integrations/connections (if available) or create connector definitions.
|
|
70
|
+
2) Configure sync jobs with Jobs module; store payload archives via Files.
|
|
71
|
+
|
|
72
|
+
## Extend & regenerate
|
|
73
|
+
1) Add mapping fields or provider configs in the spec; include validation and PII paths.
|
|
74
|
+
2) Regenerate to align UI/API/events/logs; verify Notifications/Audit hooks.
|
|
75
|
+
3) Gate risky providers behind Feature Flags; meter sync volume if needed.
|
|
76
|
+
|
|
77
|
+
## Guardrails
|
|
78
|
+
- Keep mappings declarative; avoid hardcoded transforms.
|
|
79
|
+
- Emit events for sync lifecycle; persist logs for audit.
|
|
80
|
+
- Redact sensitive payload paths in presentations.`
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "docs.examples.integration-hub.constraints",
|
|
84
|
+
title: "Integration Hub \u2014 Constraints & Safety",
|
|
85
|
+
summary: "Internal guidance for sync lifecycle, mappings, and regeneration safety.",
|
|
86
|
+
kind: "reference",
|
|
87
|
+
visibility: "internal",
|
|
88
|
+
route: "/docs/examples/integration-hub/constraints",
|
|
89
|
+
tags: ["integrations", "constraints", "internal"],
|
|
90
|
+
body: `## Constraints
|
|
91
|
+
- Mappings and sync states must remain declarative in spec; no hidden code transforms.
|
|
92
|
+
- Events to emit at minimum: sync.started, sync.completed, sync.failed; connection.connected/disconnected.
|
|
93
|
+
- Regeneration should not alter retry/backoff semantics without explicit spec change.
|
|
94
|
+
|
|
95
|
+
## PII & Payloads
|
|
96
|
+
- Treat payload archives as potentially sensitive; mark policy.pii paths.
|
|
97
|
+
- For MCP/web, avoid exposing raw credentials/tokens; store via provider adapters only.
|
|
98
|
+
|
|
99
|
+
## Verification
|
|
100
|
+
- Include fixtures for mapping changes and sync retries.
|
|
101
|
+
- Validate that scheduled jobs (cron) are spec-driven; Jobs module wiring intact.
|
|
102
|
+
- Ensure Audit/Notifications receive sync lifecycle events.`
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
registerDocBlocks(integrationHubDocBlocks);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=integration-hub.docblock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-hub.docblock.d.ts","sourceRoot":"","sources":["../../src/docs/integration-hub.docblock.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/docs/integration-hub.docblock.ts
|
|
1
3
|
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
tags: [
|
|
13
|
-
"integrations",
|
|
14
|
-
"sync",
|
|
15
|
-
"etl",
|
|
16
|
-
"connectors"
|
|
17
|
-
],
|
|
18
|
-
body: `## Entities
|
|
4
|
+
var integrationHubDocBlocks = [
|
|
5
|
+
{
|
|
6
|
+
id: "docs.examples.integration-hub",
|
|
7
|
+
title: "Integration Hub",
|
|
8
|
+
summary: "Generic integration center with connectors, connections, sync configs, field mappings, and sync logs.",
|
|
9
|
+
kind: "reference",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
route: "/docs/examples/integration-hub",
|
|
12
|
+
tags: ["integrations", "sync", "etl", "connectors"],
|
|
13
|
+
body: `## Entities
|
|
19
14
|
|
|
20
15
|
- Integration, Connection, SyncConfig, FieldMapping, SyncLog.
|
|
21
16
|
- Sync engine config lives in \`src/sync-engine\` to map remote <-> local entities.
|
|
@@ -41,16 +36,16 @@ registerDocBlocks([
|
|
|
41
36
|
- Seed data includes voice integrations for \`ai-voice.gradium\` and \`ai-voice.fal\`.
|
|
42
37
|
- Feature flags can gate specific providers; metering can track sync volume.
|
|
43
38
|
`
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "docs.examples.integration-hub.goal",
|
|
42
|
+
title: "Integration Hub \u2014 Goal",
|
|
43
|
+
summary: "Why this integration hub exists and what success looks like.",
|
|
44
|
+
kind: "goal",
|
|
45
|
+
visibility: "public",
|
|
46
|
+
route: "/docs/examples/integration-hub/goal",
|
|
47
|
+
tags: ["integrations", "goal"],
|
|
48
|
+
body: `## Why it matters
|
|
54
49
|
- Gives a regenerable, provider-agnostic integration hub with explicit mappings.
|
|
55
50
|
- Prevents drift between sync configs, mappings, and event/log outputs.
|
|
56
51
|
|
|
@@ -61,16 +56,16 @@ registerDocBlocks([
|
|
|
61
56
|
## Success criteria
|
|
62
57
|
- Connections and mappings regenerate safely after spec edits.
|
|
63
58
|
- Sync events and logs provide auditability; payloads are stored and PII-scoped.`
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "docs.examples.integration-hub.usage",
|
|
62
|
+
title: "Integration Hub \u2014 Usage",
|
|
63
|
+
summary: "How to configure connectors, mappings, and scheduled syncs.",
|
|
64
|
+
kind: "usage",
|
|
65
|
+
visibility: "public",
|
|
66
|
+
route: "/docs/examples/integration-hub/usage",
|
|
67
|
+
tags: ["integrations", "usage"],
|
|
68
|
+
body: `## Setup
|
|
74
69
|
1) Seed integrations/connections (if available) or create connector definitions.
|
|
75
70
|
2) Configure sync jobs with Jobs module; store payload archives via Files.
|
|
76
71
|
|
|
@@ -83,20 +78,16 @@ registerDocBlocks([
|
|
|
83
78
|
- Keep mappings declarative; avoid hardcoded transforms.
|
|
84
79
|
- Emit events for sync lifecycle; persist logs for audit.
|
|
85
80
|
- Redact sensitive payload paths in presentations.`
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"constraints",
|
|
97
|
-
"internal"
|
|
98
|
-
],
|
|
99
|
-
body: `## Constraints
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "docs.examples.integration-hub.constraints",
|
|
84
|
+
title: "Integration Hub \u2014 Constraints & Safety",
|
|
85
|
+
summary: "Internal guidance for sync lifecycle, mappings, and regeneration safety.",
|
|
86
|
+
kind: "reference",
|
|
87
|
+
visibility: "internal",
|
|
88
|
+
route: "/docs/examples/integration-hub/constraints",
|
|
89
|
+
tags: ["integrations", "constraints", "internal"],
|
|
90
|
+
body: `## Constraints
|
|
100
91
|
- Mappings and sync states must remain declarative in spec; no hidden code transforms.
|
|
101
92
|
- Events to emit at minimum: sync.started, sync.completed, sync.failed; connection.connected/disconnected.
|
|
102
93
|
- Regeneration should not alter retry/backoff semantics without explicit spec change.
|
|
@@ -109,8 +100,6 @@ registerDocBlocks([
|
|
|
109
100
|
- Include fixtures for mapping changes and sync retries.
|
|
110
101
|
- Validate that scheduled jobs (cron) are spec-driven; Jobs module wiring intact.
|
|
111
102
|
- Ensure Audit/Notifications receive sync lifecycle events.`
|
|
112
|
-
|
|
113
|
-
]
|
|
114
|
-
|
|
115
|
-
//#endregion
|
|
116
|
-
//# sourceMappingURL=integration-hub.docblock.js.map
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
registerDocBlocks(integrationHubDocBlocks);
|