@lssm/example.integration-hub 1.41.1 → 1.42.2
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/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/connection/connection.enum.d.ts +10 -0
- package/dist/connection/connection.enum.d.ts.map +1 -0
- package/dist/connection/connection.enum.js +17 -1
- package/dist/connection/connection.enum.js.map +1 -0
- package/dist/connection/connection.operation.d.ts +107 -0
- package/dist/connection/connection.operation.d.ts.map +1 -0
- package/dist/connection/connection.operation.js +63 -0
- package/dist/connection/connection.operation.js.map +1 -0
- package/dist/connection/connection.presentation.d.ts +8 -0
- package/dist/connection/connection.presentation.d.ts.map +1 -0
- package/dist/connection/connection.presentation.js +60 -1
- package/dist/connection/connection.presentation.js.map +1 -0
- package/dist/connection/connection.schema.d.ts +68 -0
- package/dist/connection/connection.schema.d.ts.map +1 -0
- package/dist/connection/connection.schema.js +76 -1
- package/dist/connection/connection.schema.js.map +1 -0
- package/dist/connection/index.d.ts +4 -0
- package/dist/connection/index.js +5 -1
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -1
- package/dist/docs/integration-hub.docblock.d.ts +1 -0
- package/dist/docs/integration-hub.docblock.js +61 -5
- package/dist/docs/integration-hub.docblock.js.map +1 -0
- package/dist/events.d.ts +153 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +289 -1
- package/dist/events.js.map +1 -0
- package/dist/example.d.ts +40 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +51 -1
- package/dist/example.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +15 -1
- package/dist/integration/index.d.ts +4 -0
- package/dist/integration/index.js +5 -1
- package/dist/integration/integration.enum.d.ts +10 -0
- package/dist/integration/integration.enum.d.ts.map +1 -0
- package/dist/integration/integration.enum.js +17 -1
- package/dist/integration/integration.enum.js.map +1 -0
- package/dist/integration/integration.operations.d.ts +99 -0
- package/dist/integration/integration.operations.d.ts.map +1 -0
- package/dist/integration/integration.operations.js +57 -0
- package/dist/integration/integration.operations.js.map +1 -0
- package/dist/integration/integration.presentation.d.ts +9 -0
- package/dist/integration/integration.presentation.d.ts.map +1 -0
- package/dist/integration/integration.presentation.js +77 -1
- package/dist/integration/integration.presentation.js.map +1 -0
- package/dist/integration/integration.schema.d.ts +68 -0
- package/dist/integration/integration.schema.d.ts.map +1 -0
- package/dist/integration/integration.schema.js +76 -1
- package/dist/integration/integration.schema.js.map +1 -0
- package/dist/integration-hub.feature.d.ts +8 -0
- package/dist/integration-hub.feature.d.ts.map +1 -0
- package/dist/integration-hub.feature.js +239 -1
- package/dist/integration-hub.feature.js.map +1 -0
- package/dist/sync/index.d.ts +4 -0
- package/dist/sync/index.js +5 -1
- package/dist/sync/sync.enum.d.ts +18 -0
- package/dist/sync/sync.enum.d.ts.map +1 -0
- package/dist/sync/sync.enum.js +35 -1
- package/dist/sync/sync.enum.js.map +1 -0
- package/dist/sync/sync.operations.d.ts +509 -0
- package/dist/sync/sync.operations.d.ts.map +1 -0
- package/dist/sync/sync.operations.js +203 -0
- package/dist/sync/sync.operations.js.map +1 -0
- package/dist/sync/sync.presentation.d.ts +12 -0
- package/dist/sync/sync.presentation.d.ts.map +1 -0
- package/dist/sync/sync.presentation.js +168 -1
- package/dist/sync/sync.presentation.js.map +1 -0
- package/dist/sync/sync.schema.d.ts +356 -0
- package/dist/sync/sync.schema.d.ts.map +1 -0
- package/dist/sync/sync.schema.js +304 -1
- package/dist/sync/sync.schema.js.map +1 -0
- package/dist/sync-engine/index.d.ts +109 -0
- package/dist/sync-engine/index.d.ts.map +1 -0
- package/dist/sync-engine/index.js +148 -1
- package/dist/sync-engine/index.js.map +1 -0
- package/package.json +46 -39
- package/dist/connection/connection.contracts.js +0 -1
- package/dist/integration/integration.contracts.js +0 -1
- package/dist/sync/sync.contracts.js +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Chaman Ventures, SASU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# @lssm/example.integration-hub
|
|
2
2
|
|
|
3
|
+
Website: https://contractspec.lssm.tech/
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
A comprehensive integration hub example demonstrating ContractSpec principles for data synchronization.
|
|
4
7
|
|
|
5
8
|
## Features
|
|
@@ -141,3 +144,13 @@ const run = await executeContract(TriggerSyncContract, {
|
|
|
141
144
|
|
|
142
145
|
|
|
143
146
|
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as _lssm_lib_schema0 from "@lssm/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/connection/connection.enum.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Connection status enum.
|
|
6
|
+
*/
|
|
7
|
+
declare const ConnectionStatusEnum: _lssm_lib_schema0.EnumType<[string, string, string, string, string]>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ConnectionStatusEnum };
|
|
10
|
+
//# sourceMappingURL=connection.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.enum.d.ts","names":[],"sources":["../../src/connection/connection.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,oBAMX,EAAA,iBAAA,CAN+B,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA"}
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
import{defineEnum
|
|
1
|
+
import { defineEnum } from "@lssm/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/connection/connection.enum.ts
|
|
4
|
+
/**
|
|
5
|
+
* Connection status enum.
|
|
6
|
+
*/
|
|
7
|
+
const ConnectionStatusEnum = defineEnum("ConnectionStatus", [
|
|
8
|
+
"PENDING",
|
|
9
|
+
"CONNECTED",
|
|
10
|
+
"DISCONNECTED",
|
|
11
|
+
"ERROR",
|
|
12
|
+
"EXPIRED"
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { ConnectionStatusEnum };
|
|
17
|
+
//# sourceMappingURL=connection.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.enum.js","names":[],"sources":["../../src/connection/connection.enum.ts"],"sourcesContent":["import { defineEnum } from '@lssm/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"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
|
|
2
|
+
import * as _lssm_lib_schema0 from "@lssm/lib.schema";
|
|
3
|
+
|
|
4
|
+
//#region src/connection/connection.operation.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Create a connection to an external system.
|
|
7
|
+
*/
|
|
8
|
+
declare const CreateConnectionContract: _lssm_lib_contracts0.OperationSpec<_lssm_lib_schema0.SchemaModel<{
|
|
9
|
+
integrationId: {
|
|
10
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
authType: {
|
|
18
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
credentials: {
|
|
22
|
+
type: _lssm_lib_schema0.FieldType<unknown, unknown>;
|
|
23
|
+
isOptional: true;
|
|
24
|
+
};
|
|
25
|
+
}>, _lssm_lib_schema0.SchemaModel<{
|
|
26
|
+
id: {
|
|
27
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
28
|
+
isOptional: false;
|
|
29
|
+
};
|
|
30
|
+
integrationId: {
|
|
31
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
32
|
+
isOptional: false;
|
|
33
|
+
};
|
|
34
|
+
name: {
|
|
35
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
36
|
+
isOptional: false;
|
|
37
|
+
};
|
|
38
|
+
status: {
|
|
39
|
+
type: _lssm_lib_schema0.EnumType<[string, string, string, string, string]>;
|
|
40
|
+
isOptional: false;
|
|
41
|
+
};
|
|
42
|
+
authType: {
|
|
43
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
44
|
+
isOptional: false;
|
|
45
|
+
};
|
|
46
|
+
externalAccountName: {
|
|
47
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
48
|
+
isOptional: true;
|
|
49
|
+
};
|
|
50
|
+
connectedAt: {
|
|
51
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
52
|
+
isOptional: true;
|
|
53
|
+
};
|
|
54
|
+
lastHealthCheck: {
|
|
55
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
56
|
+
isOptional: true;
|
|
57
|
+
};
|
|
58
|
+
healthStatus: {
|
|
59
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
60
|
+
isOptional: true;
|
|
61
|
+
};
|
|
62
|
+
}>, {
|
|
63
|
+
key: string;
|
|
64
|
+
version: number;
|
|
65
|
+
when: string;
|
|
66
|
+
payload: _lssm_lib_schema0.SchemaModel<{
|
|
67
|
+
id: {
|
|
68
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
69
|
+
isOptional: false;
|
|
70
|
+
};
|
|
71
|
+
integrationId: {
|
|
72
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
73
|
+
isOptional: false;
|
|
74
|
+
};
|
|
75
|
+
name: {
|
|
76
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
77
|
+
isOptional: false;
|
|
78
|
+
};
|
|
79
|
+
status: {
|
|
80
|
+
type: _lssm_lib_schema0.EnumType<[string, string, string, string, string]>;
|
|
81
|
+
isOptional: false;
|
|
82
|
+
};
|
|
83
|
+
authType: {
|
|
84
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
85
|
+
isOptional: false;
|
|
86
|
+
};
|
|
87
|
+
externalAccountName: {
|
|
88
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
89
|
+
isOptional: true;
|
|
90
|
+
};
|
|
91
|
+
connectedAt: {
|
|
92
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
93
|
+
isOptional: true;
|
|
94
|
+
};
|
|
95
|
+
lastHealthCheck: {
|
|
96
|
+
type: _lssm_lib_schema0.FieldType<Date, string>;
|
|
97
|
+
isOptional: true;
|
|
98
|
+
};
|
|
99
|
+
healthStatus: {
|
|
100
|
+
type: _lssm_lib_schema0.FieldType<string, string>;
|
|
101
|
+
isOptional: true;
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
104
|
+
}[]>;
|
|
105
|
+
//#endregion
|
|
106
|
+
export { CreateConnectionContract };
|
|
107
|
+
//# sourceMappingURL=connection.operation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.operation.d.ts","names":[],"sources":["../../src/connection/connection.operation.ts"],"sourcesContent":[],"mappings":";;;;;;;cAWa,+CAAwB,gCAAA;EAAxB,aAAA,EAAA;IAiDX,IAAA,EAAA,iBAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;qCAjDmC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;UAAA,iBAAA,CAAA;;;;;;;;;;;;oCAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;IAAA,UAAA,EAAA,KAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ConnectionModel, CreateConnectionInputModel } from "./connection.schema.js";
|
|
2
|
+
import { defineCommand } from "@lssm/lib.contracts/operations";
|
|
3
|
+
|
|
4
|
+
//#region src/connection/connection.operation.ts
|
|
5
|
+
const OWNERS = ["@example.integration-hub"];
|
|
6
|
+
/**
|
|
7
|
+
* Create a connection to an external system.
|
|
8
|
+
*/
|
|
9
|
+
const CreateConnectionContract = defineCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
key: "integration.connection.create",
|
|
12
|
+
version: 1,
|
|
13
|
+
stability: "stable",
|
|
14
|
+
owners: [...OWNERS],
|
|
15
|
+
tags: [
|
|
16
|
+
"integration",
|
|
17
|
+
"connection",
|
|
18
|
+
"create"
|
|
19
|
+
],
|
|
20
|
+
description: "Create a connection to an external system.",
|
|
21
|
+
goal: "Authenticate with external systems.",
|
|
22
|
+
context: "Connection setup."
|
|
23
|
+
},
|
|
24
|
+
io: {
|
|
25
|
+
input: CreateConnectionInputModel,
|
|
26
|
+
output: ConnectionModel
|
|
27
|
+
},
|
|
28
|
+
policy: { auth: "user" },
|
|
29
|
+
sideEffects: {
|
|
30
|
+
emits: [{
|
|
31
|
+
key: "integration.connection.created",
|
|
32
|
+
version: 1,
|
|
33
|
+
when: "Connection created",
|
|
34
|
+
payload: ConnectionModel
|
|
35
|
+
}],
|
|
36
|
+
audit: ["integration.connection.created"]
|
|
37
|
+
},
|
|
38
|
+
acceptance: {
|
|
39
|
+
scenarios: [{
|
|
40
|
+
key: "create-connection-happy-path",
|
|
41
|
+
given: ["User is authenticated"],
|
|
42
|
+
when: ["User creates connection with valid credentials"],
|
|
43
|
+
then: ["Connection is created", "ConnectionCreated event is emitted"]
|
|
44
|
+
}],
|
|
45
|
+
examples: [{
|
|
46
|
+
key: "connect-crm",
|
|
47
|
+
input: {
|
|
48
|
+
name: "Salesforce Prod",
|
|
49
|
+
integrationId: "salesforce",
|
|
50
|
+
credentials: { clientId: "xxx" }
|
|
51
|
+
},
|
|
52
|
+
output: {
|
|
53
|
+
id: "conn-123",
|
|
54
|
+
status: "connected",
|
|
55
|
+
connectedAt: "2025-01-01T12:00:00Z"
|
|
56
|
+
}
|
|
57
|
+
}]
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
export { CreateConnectionContract };
|
|
63
|
+
//# sourceMappingURL=connection.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.operation.js","names":[],"sources":["../../src/connection/connection.operation.ts"],"sourcesContent":["import { defineCommand } from '@lssm/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,\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,\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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PresentationSpec } from "@lssm/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/connection/connection.presentation.d.ts
|
|
4
|
+
declare const ConnectionListPresentation: PresentationSpec;
|
|
5
|
+
declare const ConnectionSetupPresentation: PresentationSpec;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { ConnectionListPresentation, ConnectionSetupPresentation };
|
|
8
|
+
//# sourceMappingURL=connection.presentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.presentation.d.ts","names":[],"sources":["../../src/connection/connection.presentation.ts"],"sourcesContent":[],"mappings":";;;cAIa,4BAA4B;cAyB5B,6BAA6B"}
|
|
@@ -1 +1,60 @@
|
|
|
1
|
-
import{ConnectionModel
|
|
1
|
+
import { ConnectionModel } from "./connection.schema.js";
|
|
2
|
+
import { StabilityEnum } from "@lssm/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/connection/connection.presentation.ts
|
|
5
|
+
const ConnectionListPresentation = {
|
|
6
|
+
meta: {
|
|
7
|
+
key: "integration.connection.list",
|
|
8
|
+
version: 1,
|
|
9
|
+
title: "Connection List",
|
|
10
|
+
description: "List of integration connections",
|
|
11
|
+
domain: "integration",
|
|
12
|
+
owners: ["@integration-team"],
|
|
13
|
+
tags: [
|
|
14
|
+
"integration",
|
|
15
|
+
"connection",
|
|
16
|
+
"list"
|
|
17
|
+
],
|
|
18
|
+
stability: StabilityEnum.Experimental,
|
|
19
|
+
goal: "Provide an overview of all established integration connections.",
|
|
20
|
+
context: "The primary management view for integration hubs."
|
|
21
|
+
},
|
|
22
|
+
source: {
|
|
23
|
+
type: "component",
|
|
24
|
+
framework: "react",
|
|
25
|
+
componentKey: "ConnectionList",
|
|
26
|
+
props: ConnectionModel
|
|
27
|
+
},
|
|
28
|
+
targets: ["react", "markdown"],
|
|
29
|
+
policy: { flags: ["integration.enabled"] }
|
|
30
|
+
};
|
|
31
|
+
const ConnectionSetupPresentation = {
|
|
32
|
+
meta: {
|
|
33
|
+
key: "integration.connection.setup",
|
|
34
|
+
version: 1,
|
|
35
|
+
title: "Connection Setup",
|
|
36
|
+
description: "Setup wizard for creating integration connections",
|
|
37
|
+
domain: "integration",
|
|
38
|
+
owners: ["@integration-team"],
|
|
39
|
+
tags: [
|
|
40
|
+
"integration",
|
|
41
|
+
"connection",
|
|
42
|
+
"setup"
|
|
43
|
+
],
|
|
44
|
+
stability: StabilityEnum.Experimental,
|
|
45
|
+
goal: "Guide users through the multi-step process of connecting to a new integration.",
|
|
46
|
+
context: "The onboarding flow for new integrations."
|
|
47
|
+
},
|
|
48
|
+
source: {
|
|
49
|
+
type: "component",
|
|
50
|
+
framework: "react",
|
|
51
|
+
componentKey: "ConnectionSetup",
|
|
52
|
+
props: ConnectionModel
|
|
53
|
+
},
|
|
54
|
+
targets: ["react"],
|
|
55
|
+
policy: { flags: ["integration.enabled"] }
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
export { ConnectionListPresentation, ConnectionSetupPresentation };
|
|
60
|
+
//# sourceMappingURL=connection.presentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.presentation.js","names":["ConnectionListPresentation: PresentationSpec","ConnectionSetupPresentation: PresentationSpec"],"sources":["../../src/connection/connection.presentation.ts"],"sourcesContent":["import type { PresentationSpec } from '@lssm/lib.contracts';\nimport { StabilityEnum } from '@lssm/lib.contracts';\nimport { ConnectionModel } from './connection.schema';\n\nexport const ConnectionListPresentation: PresentationSpec = {\n meta: {\n key: 'integration.connection.list',\n version: 1,\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: PresentationSpec = {\n meta: {\n key: 'integration.connection.setup',\n version: 1,\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":";;;;AAIA,MAAaA,6BAA+C;CAC1D,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;AAED,MAAaC,8BAAgD;CAC3D,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"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as _lssm_lib_schema66 from "@lssm/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/connection/connection.schema.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A connection to an external system.
|
|
6
|
+
*/
|
|
7
|
+
declare const ConnectionModel: _lssm_lib_schema66.SchemaModel<{
|
|
8
|
+
id: {
|
|
9
|
+
type: _lssm_lib_schema66.FieldType<string, string>;
|
|
10
|
+
isOptional: false;
|
|
11
|
+
};
|
|
12
|
+
integrationId: {
|
|
13
|
+
type: _lssm_lib_schema66.FieldType<string, string>;
|
|
14
|
+
isOptional: false;
|
|
15
|
+
};
|
|
16
|
+
name: {
|
|
17
|
+
type: _lssm_lib_schema66.FieldType<string, string>;
|
|
18
|
+
isOptional: false;
|
|
19
|
+
};
|
|
20
|
+
status: {
|
|
21
|
+
type: _lssm_lib_schema66.EnumType<[string, string, string, string, string]>;
|
|
22
|
+
isOptional: false;
|
|
23
|
+
};
|
|
24
|
+
authType: {
|
|
25
|
+
type: _lssm_lib_schema66.FieldType<string, string>;
|
|
26
|
+
isOptional: false;
|
|
27
|
+
};
|
|
28
|
+
externalAccountName: {
|
|
29
|
+
type: _lssm_lib_schema66.FieldType<string, string>;
|
|
30
|
+
isOptional: true;
|
|
31
|
+
};
|
|
32
|
+
connectedAt: {
|
|
33
|
+
type: _lssm_lib_schema66.FieldType<Date, string>;
|
|
34
|
+
isOptional: true;
|
|
35
|
+
};
|
|
36
|
+
lastHealthCheck: {
|
|
37
|
+
type: _lssm_lib_schema66.FieldType<Date, string>;
|
|
38
|
+
isOptional: true;
|
|
39
|
+
};
|
|
40
|
+
healthStatus: {
|
|
41
|
+
type: _lssm_lib_schema66.FieldType<string, string>;
|
|
42
|
+
isOptional: true;
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Input for creating a connection.
|
|
47
|
+
*/
|
|
48
|
+
declare const CreateConnectionInputModel: _lssm_lib_schema66.SchemaModel<{
|
|
49
|
+
integrationId: {
|
|
50
|
+
type: _lssm_lib_schema66.FieldType<string, string>;
|
|
51
|
+
isOptional: false;
|
|
52
|
+
};
|
|
53
|
+
name: {
|
|
54
|
+
type: _lssm_lib_schema66.FieldType<string, string>;
|
|
55
|
+
isOptional: false;
|
|
56
|
+
};
|
|
57
|
+
authType: {
|
|
58
|
+
type: _lssm_lib_schema66.FieldType<string, string>;
|
|
59
|
+
isOptional: false;
|
|
60
|
+
};
|
|
61
|
+
credentials: {
|
|
62
|
+
type: _lssm_lib_schema66.FieldType<unknown, unknown>;
|
|
63
|
+
isOptional: true;
|
|
64
|
+
};
|
|
65
|
+
}>;
|
|
66
|
+
//#endregion
|
|
67
|
+
export { ConnectionModel, CreateConnectionInputModel };
|
|
68
|
+
//# sourceMappingURL=connection.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.schema.d.ts","names":[],"sources":["../../src/connection/connection.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,eAmBX,qBAnB0B,WAmB1B,CAAA;EAAA,EAAA,EAAA;UAAA,kBAAA,CAAA;;;;;;;;;;;EAnB0B,MAAA,EAAA;IAwBf,IAAA,6BAWX,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;gBAXqC,KAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAA1B,+CAA0B;;UAWrC,kBAAA,CAAA"}
|
|
@@ -1 +1,76 @@
|
|
|
1
|
-
import{ConnectionStatusEnum
|
|
1
|
+
import { ConnectionStatusEnum } from "./connection.enum.js";
|
|
2
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@lssm/lib.schema";
|
|
3
|
+
|
|
4
|
+
//#region src/connection/connection.schema.ts
|
|
5
|
+
/**
|
|
6
|
+
* A connection to an external system.
|
|
7
|
+
*/
|
|
8
|
+
const ConnectionModel = defineSchemaModel({
|
|
9
|
+
name: "ConnectionModel",
|
|
10
|
+
fields: {
|
|
11
|
+
id: {
|
|
12
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
13
|
+
isOptional: false
|
|
14
|
+
},
|
|
15
|
+
integrationId: {
|
|
16
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
17
|
+
isOptional: false
|
|
18
|
+
},
|
|
19
|
+
name: {
|
|
20
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
21
|
+
isOptional: false
|
|
22
|
+
},
|
|
23
|
+
status: {
|
|
24
|
+
type: ConnectionStatusEnum,
|
|
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
|
+
}
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* Input for creating a connection.
|
|
51
|
+
*/
|
|
52
|
+
const CreateConnectionInputModel = defineSchemaModel({
|
|
53
|
+
name: "CreateConnectionInput",
|
|
54
|
+
fields: {
|
|
55
|
+
integrationId: {
|
|
56
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
57
|
+
isOptional: false
|
|
58
|
+
},
|
|
59
|
+
name: {
|
|
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
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
export { ConnectionModel, CreateConnectionInputModel };
|
|
76
|
+
//# sourceMappingURL=connection.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.schema.js","names":[],"sources":["../../src/connection/connection.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@lssm/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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ConnectionStatusEnum } from "./connection.enum.js";
|
|
2
|
+
import { CreateConnectionContract } from "./connection.operation.js";
|
|
3
|
+
import { ConnectionModel, CreateConnectionInputModel } from "./connection.schema.js";
|
|
4
|
+
export { ConnectionModel, ConnectionStatusEnum, CreateConnectionContract, CreateConnectionInputModel };
|
package/dist/connection/index.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import{ConnectionStatusEnum
|
|
1
|
+
import { ConnectionStatusEnum } from "./connection.enum.js";
|
|
2
|
+
import { ConnectionModel, CreateConnectionInputModel } from "./connection.schema.js";
|
|
3
|
+
import { CreateConnectionContract } from "./connection.operation.js";
|
|
4
|
+
|
|
5
|
+
export { ConnectionModel, ConnectionStatusEnum, CreateConnectionContract, CreateConnectionInputModel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/docs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./integration-hub.docblock.js";
|
|
1
|
+
import "./integration-hub.docblock.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
import{registerDocBlocks
|
|
1
|
+
import { registerDocBlocks } from "@lssm/lib.contracts/docs";
|
|
2
|
+
|
|
3
|
+
//#region src/docs/integration-hub.docblock.ts
|
|
4
|
+
registerDocBlocks([
|
|
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: [
|
|
13
|
+
"integrations",
|
|
14
|
+
"sync",
|
|
15
|
+
"etl",
|
|
16
|
+
"connectors"
|
|
17
|
+
],
|
|
18
|
+
body: `## Entities
|
|
2
19
|
|
|
3
20
|
- Integration, Connection, SyncConfig, FieldMapping, SyncLog.
|
|
4
21
|
- Sync engine config lives in \`src/sync-engine\` to map remote <-> local entities.
|
|
@@ -22,7 +39,17 @@ import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.exampl
|
|
|
22
39
|
|
|
23
40
|
- Providers remain agnostic; keep mappings declarative for safe regeneration.
|
|
24
41
|
- Feature flags can gate specific providers; metering can track sync volume.
|
|
25
|
-
`
|
|
42
|
+
`
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "docs.examples.integration-hub.goal",
|
|
46
|
+
title: "Integration Hub — Goal",
|
|
47
|
+
summary: "Why this integration hub exists and what success looks like.",
|
|
48
|
+
kind: "goal",
|
|
49
|
+
visibility: "public",
|
|
50
|
+
route: "/docs/examples/integration-hub/goal",
|
|
51
|
+
tags: ["integrations", "goal"],
|
|
52
|
+
body: `## Why it matters
|
|
26
53
|
- Gives a regenerable, provider-agnostic integration hub with explicit mappings.
|
|
27
54
|
- Prevents drift between sync configs, mappings, and event/log outputs.
|
|
28
55
|
|
|
@@ -32,7 +59,17 @@ import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.exampl
|
|
|
32
59
|
|
|
33
60
|
## Success criteria
|
|
34
61
|
- Connections and mappings regenerate safely after spec edits.
|
|
35
|
-
- Sync events and logs provide auditability; payloads are stored and PII-scoped.`
|
|
62
|
+
- Sync events and logs provide auditability; payloads are stored and PII-scoped.`
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "docs.examples.integration-hub.usage",
|
|
66
|
+
title: "Integration Hub — Usage",
|
|
67
|
+
summary: "How to configure connectors, mappings, and scheduled syncs.",
|
|
68
|
+
kind: "usage",
|
|
69
|
+
visibility: "public",
|
|
70
|
+
route: "/docs/examples/integration-hub/usage",
|
|
71
|
+
tags: ["integrations", "usage"],
|
|
72
|
+
body: `## Setup
|
|
36
73
|
1) Seed integrations/connections (if available) or create connector definitions.
|
|
37
74
|
2) Configure sync jobs with Jobs module; store payload archives via Files.
|
|
38
75
|
|
|
@@ -44,7 +81,21 @@ import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.exampl
|
|
|
44
81
|
## Guardrails
|
|
45
82
|
- Keep mappings declarative; avoid hardcoded transforms.
|
|
46
83
|
- Emit events for sync lifecycle; persist logs for audit.
|
|
47
|
-
- Redact sensitive payload paths in presentations.`
|
|
84
|
+
- Redact sensitive payload paths in presentations.`
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "docs.examples.integration-hub.constraints",
|
|
88
|
+
title: "Integration Hub — Constraints & Safety",
|
|
89
|
+
summary: "Internal guidance for sync lifecycle, mappings, and regeneration safety.",
|
|
90
|
+
kind: "reference",
|
|
91
|
+
visibility: "internal",
|
|
92
|
+
route: "/docs/examples/integration-hub/constraints",
|
|
93
|
+
tags: [
|
|
94
|
+
"integrations",
|
|
95
|
+
"constraints",
|
|
96
|
+
"internal"
|
|
97
|
+
],
|
|
98
|
+
body: `## Constraints
|
|
48
99
|
- Mappings and sync states must remain declarative in spec; no hidden code transforms.
|
|
49
100
|
- Events to emit at minimum: sync.started, sync.completed, sync.failed; connection.connected/disconnected.
|
|
50
101
|
- Regeneration should not alter retry/backoff semantics without explicit spec change.
|
|
@@ -56,4 +107,9 @@ import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.exampl
|
|
|
56
107
|
## Verification
|
|
57
108
|
- Include fixtures for mapping changes and sync retries.
|
|
58
109
|
- Validate that scheduled jobs (cron) are spec-driven; Jobs module wiring intact.
|
|
59
|
-
- Ensure Audit/Notifications receive sync lifecycle events.`
|
|
110
|
+
- Ensure Audit/Notifications receive sync lifecycle events.`
|
|
111
|
+
}
|
|
112
|
+
]);
|
|
113
|
+
|
|
114
|
+
//#endregion
|
|
115
|
+
//# sourceMappingURL=integration-hub.docblock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-hub.docblock.js","names":[],"sources":["../../src/docs/integration-hub.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@lssm/lib.contracts/docs';\nimport { registerDocBlocks } from '@lssm/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- 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":";;;AA0GA,kBAvG4C;CAC1C;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAgB;GAAQ;GAAO;GAAa;EACnD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;EAyBP;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"}
|