@lssm/example.integration-hub 0.0.0-canary-20251217060834 → 0.0.0-canary-20251217072406
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/connection/connection.contracts.d.ts +1 -1
- package/dist/connection/connection.contracts.js +41 -1
- package/dist/connection/connection.enum.d.ts +2 -2
- package/dist/connection/connection.enum.js +17 -1
- package/dist/connection/connection.presentation.js +50 -1
- package/dist/connection/connection.schema.js +77 -1
- package/dist/connection/index.js +5 -1
- package/dist/docs/index.js +1 -1
- package/dist/docs/integration-hub.docblock.js +61 -5
- package/dist/events.d.ts +1 -1
- package/dist/events.js +246 -1
- package/dist/example.js +50 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +15 -1
- package/dist/integration/index.js +5 -1
- package/dist/integration/integration.contracts.d.ts +24 -24
- package/dist/integration/integration.contracts.js +37 -1
- package/dist/integration/integration.enum.js +17 -1
- package/dist/integration/integration.presentation.js +63 -1
- package/dist/integration/integration.schema.d.ts +16 -16
- package/dist/integration/integration.schema.js +77 -1
- package/dist/integration-hub.feature.js +237 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -0
- package/dist/libs/contracts/dist/client/index.js +5 -0
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -0
- package/dist/libs/contracts/dist/client/react/form-render.js +4 -0
- package/dist/libs/contracts/dist/client/react/index.js +4 -0
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -0
- package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -0
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/index.js +29 -0
- package/dist/libs/contracts/dist/docs/presentations.js +71 -0
- package/dist/libs/contracts/dist/docs/registry.js +44 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +80 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +57 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +357 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +79 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +84 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +45 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +40 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +69 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +62 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +155 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +101 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -0
- package/dist/libs/contracts/dist/events.js +10 -0
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -0
- package/dist/libs/contracts/dist/index.js +71 -0
- package/dist/libs/contracts/dist/install.js +2 -0
- package/dist/libs/contracts/dist/integrations/contracts.js +377 -0
- package/dist/libs/contracts/dist/integrations/index.js +18 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -0
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -0
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -0
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -0
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -0
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -0
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -0
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -0
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -0
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -0
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -0
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -0
- package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -0
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -0
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -0
- package/dist/libs/contracts/dist/jsonschema.js +1 -0
- package/dist/libs/contracts/dist/knowledge/contracts.js +306 -0
- package/dist/libs/contracts/dist/knowledge/index.js +7 -0
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -0
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -0
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -0
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -0
- package/dist/libs/contracts/dist/llm/exporters.js +19 -0
- package/dist/libs/contracts/dist/llm/index.js +2 -0
- package/dist/libs/contracts/dist/llm/prompts.js +1 -0
- package/dist/libs/contracts/dist/onboarding-base.js +196 -0
- package/dist/libs/contracts/dist/openapi.js +1 -0
- package/dist/libs/contracts/dist/ownership.js +21 -0
- package/dist/libs/contracts/dist/presentations.js +1 -0
- package/dist/libs/contracts/dist/presentations.v2.js +11 -0
- package/dist/libs/contracts/dist/prompt.js +1 -0
- package/dist/libs/contracts/dist/promptRegistry.js +1 -0
- package/dist/libs/contracts/dist/regenerator/index.js +1 -0
- package/dist/libs/contracts/dist/regenerator/service.js +6 -0
- package/dist/libs/contracts/dist/registry.js +2 -0
- package/dist/libs/contracts/dist/resources.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -0
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -0
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -0
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +34 -0
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -0
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/index.js +6 -0
- package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -0
- package/dist/libs/contracts/dist/server/index.js +8 -0
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -0
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -0
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -0
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -0
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -0
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -0
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -0
- package/dist/libs/contracts/dist/server/rest-express.js +1 -0
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -0
- package/dist/libs/contracts/dist/spec.js +34 -0
- package/dist/libs/contracts/dist/telemetry/index.js +1 -0
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -0
- package/dist/libs/contracts/dist/tests/index.js +1 -0
- package/dist/libs/contracts/dist/tests/runner.js +2 -0
- package/dist/libs/contracts/dist/workflow/index.js +1 -0
- package/dist/libs/contracts/dist/workflow/runner.js +1 -0
- package/dist/libs/schema/dist/EnumType.js +56 -0
- package/dist/libs/schema/dist/FieldType.js +49 -0
- package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -0
- package/dist/libs/schema/dist/SchemaModel.js +39 -0
- package/dist/libs/schema/dist/entity/defineEntity.js +1 -0
- package/dist/libs/schema/dist/entity/index.js +2 -0
- package/dist/libs/schema/dist/entity/types.js +1 -0
- package/dist/libs/schema/dist/index.js +6 -0
- package/dist/sync/index.js +5 -1
- package/dist/sync/sync.contracts.d.ts +125 -125
- package/dist/sync/sync.contracts.js +130 -1
- package/dist/sync/sync.enum.d.ts +4 -4
- package/dist/sync/sync.enum.js +35 -1
- package/dist/sync/sync.presentation.js +142 -1
- package/dist/sync/sync.schema.js +305 -1
- package/dist/sync-engine/index.js +146 -1
- package/package.json +12 -12
|
@@ -1 +1,41 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineCommand } from "../libs/contracts/dist/spec.js";
|
|
2
|
+
import { ConnectionModel, CreateConnectionInputModel } from "./connection.schema.js";
|
|
3
|
+
|
|
4
|
+
//#region src/connection/connection.contracts.ts
|
|
5
|
+
const OWNERS = ["@example.integration-hub"];
|
|
6
|
+
/**
|
|
7
|
+
* Create a connection to an external system.
|
|
8
|
+
*/
|
|
9
|
+
const CreateConnectionContract = defineCommand({
|
|
10
|
+
meta: {
|
|
11
|
+
name: "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
|
+
name: "integration.connection.created",
|
|
32
|
+
version: 1,
|
|
33
|
+
when: "Connection created",
|
|
34
|
+
payload: ConnectionModel
|
|
35
|
+
}],
|
|
36
|
+
audit: ["integration.connection.created"]
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { CreateConnectionContract };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema65 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/connection/connection.enum.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Connection status enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const ConnectionStatusEnum:
|
|
7
|
+
declare const ConnectionStatusEnum: _lssm_lib_schema65.EnumType<[string, string, string, string, string]>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { ConnectionStatusEnum };
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
import{defineEnum
|
|
1
|
+
import { defineEnum } from "../libs/schema/dist/EnumType.js";
|
|
2
|
+
import "../libs/schema/dist/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/connection/connection.enum.ts
|
|
5
|
+
/**
|
|
6
|
+
* Connection status enum.
|
|
7
|
+
*/
|
|
8
|
+
const ConnectionStatusEnum = defineEnum("ConnectionStatus", [
|
|
9
|
+
"PENDING",
|
|
10
|
+
"CONNECTED",
|
|
11
|
+
"DISCONNECTED",
|
|
12
|
+
"ERROR",
|
|
13
|
+
"EXPIRED"
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ConnectionStatusEnum };
|
|
@@ -1 +1,50 @@
|
|
|
1
|
-
import{ConnectionModel
|
|
1
|
+
import { ConnectionModel } from "./connection.schema.js";
|
|
2
|
+
|
|
3
|
+
//#region src/connection/connection.presentation.ts
|
|
4
|
+
const ConnectionListPresentation = {
|
|
5
|
+
meta: {
|
|
6
|
+
name: "integration.connection.list",
|
|
7
|
+
version: 1,
|
|
8
|
+
description: "List of integration connections",
|
|
9
|
+
domain: "integration",
|
|
10
|
+
owners: ["@integration-team"],
|
|
11
|
+
tags: [
|
|
12
|
+
"integration",
|
|
13
|
+
"connection",
|
|
14
|
+
"list"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
source: {
|
|
18
|
+
type: "component",
|
|
19
|
+
framework: "react",
|
|
20
|
+
componentKey: "ConnectionList",
|
|
21
|
+
props: ConnectionModel
|
|
22
|
+
},
|
|
23
|
+
targets: ["react", "markdown"],
|
|
24
|
+
policy: { flags: ["integration.enabled"] }
|
|
25
|
+
};
|
|
26
|
+
const ConnectionSetupPresentation = {
|
|
27
|
+
meta: {
|
|
28
|
+
name: "integration.connection.setup",
|
|
29
|
+
version: 1,
|
|
30
|
+
description: "Setup wizard for creating integration connections",
|
|
31
|
+
domain: "integration",
|
|
32
|
+
owners: ["@integration-team"],
|
|
33
|
+
tags: [
|
|
34
|
+
"integration",
|
|
35
|
+
"connection",
|
|
36
|
+
"setup"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
source: {
|
|
40
|
+
type: "component",
|
|
41
|
+
framework: "react",
|
|
42
|
+
componentKey: "ConnectionSetup",
|
|
43
|
+
props: ConnectionModel
|
|
44
|
+
},
|
|
45
|
+
targets: ["react"],
|
|
46
|
+
policy: { flags: ["integration.enabled"] }
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { ConnectionListPresentation, ConnectionSetupPresentation };
|
|
@@ -1 +1,77 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
|
|
3
|
+
import "../libs/schema/dist/index.js";
|
|
4
|
+
import { ConnectionStatusEnum } from "./connection.enum.js";
|
|
5
|
+
|
|
6
|
+
//#region src/connection/connection.schema.ts
|
|
7
|
+
/**
|
|
8
|
+
* A connection to an external system.
|
|
9
|
+
*/
|
|
10
|
+
const ConnectionModel = defineSchemaModel({
|
|
11
|
+
name: "ConnectionModel",
|
|
12
|
+
fields: {
|
|
13
|
+
id: {
|
|
14
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
15
|
+
isOptional: false
|
|
16
|
+
},
|
|
17
|
+
integrationId: {
|
|
18
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
19
|
+
isOptional: false
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
23
|
+
isOptional: false
|
|
24
|
+
},
|
|
25
|
+
status: {
|
|
26
|
+
type: ConnectionStatusEnum,
|
|
27
|
+
isOptional: false
|
|
28
|
+
},
|
|
29
|
+
authType: {
|
|
30
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
31
|
+
isOptional: false
|
|
32
|
+
},
|
|
33
|
+
externalAccountName: {
|
|
34
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
35
|
+
isOptional: true
|
|
36
|
+
},
|
|
37
|
+
connectedAt: {
|
|
38
|
+
type: ScalarTypeEnum.DateTime(),
|
|
39
|
+
isOptional: true
|
|
40
|
+
},
|
|
41
|
+
lastHealthCheck: {
|
|
42
|
+
type: ScalarTypeEnum.DateTime(),
|
|
43
|
+
isOptional: true
|
|
44
|
+
},
|
|
45
|
+
healthStatus: {
|
|
46
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
47
|
+
isOptional: true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Input for creating a connection.
|
|
53
|
+
*/
|
|
54
|
+
const CreateConnectionInputModel = defineSchemaModel({
|
|
55
|
+
name: "CreateConnectionInput",
|
|
56
|
+
fields: {
|
|
57
|
+
integrationId: {
|
|
58
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
59
|
+
isOptional: false
|
|
60
|
+
},
|
|
61
|
+
name: {
|
|
62
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
63
|
+
isOptional: false
|
|
64
|
+
},
|
|
65
|
+
authType: {
|
|
66
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
67
|
+
isOptional: false
|
|
68
|
+
},
|
|
69
|
+
credentials: {
|
|
70
|
+
type: ScalarTypeEnum.JSON(),
|
|
71
|
+
isOptional: true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
export { ConnectionModel, 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.contracts.js";
|
|
4
|
+
|
|
5
|
+
export { ConnectionModel, ConnectionStatusEnum, CreateConnectionContract, CreateConnectionInputModel };
|
package/dist/docs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./integration-hub.docblock.js";
|
|
1
|
+
import "./integration-hub.docblock.js";
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
-
import{registerDocBlocks
|
|
1
|
+
import { registerDocBlocks } from "../libs/contracts/dist/docs/registry.js";
|
|
2
|
+
import "../libs/contracts/dist/docs/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/docs/integration-hub.docblock.ts
|
|
5
|
+
registerDocBlocks([
|
|
6
|
+
{
|
|
7
|
+
id: "docs.examples.integration-hub",
|
|
8
|
+
title: "Integration Hub",
|
|
9
|
+
summary: "Generic integration center with connectors, connections, sync configs, field mappings, and sync logs.",
|
|
10
|
+
kind: "reference",
|
|
11
|
+
visibility: "public",
|
|
12
|
+
route: "/docs/examples/integration-hub",
|
|
13
|
+
tags: [
|
|
14
|
+
"integrations",
|
|
15
|
+
"sync",
|
|
16
|
+
"etl",
|
|
17
|
+
"connectors"
|
|
18
|
+
],
|
|
19
|
+
body: `## Entities
|
|
2
20
|
|
|
3
21
|
- Integration, Connection, SyncConfig, FieldMapping, SyncLog.
|
|
4
22
|
- Sync engine config lives in \`src/sync-engine\` to map remote <-> local entities.
|
|
@@ -22,7 +40,17 @@ import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.exampl
|
|
|
22
40
|
|
|
23
41
|
- Providers remain agnostic; keep mappings declarative for safe regeneration.
|
|
24
42
|
- Feature flags can gate specific providers; metering can track sync volume.
|
|
25
|
-
`
|
|
43
|
+
`
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "docs.examples.integration-hub.goal",
|
|
47
|
+
title: "Integration Hub — Goal",
|
|
48
|
+
summary: "Why this integration hub exists and what success looks like.",
|
|
49
|
+
kind: "goal",
|
|
50
|
+
visibility: "public",
|
|
51
|
+
route: "/docs/examples/integration-hub/goal",
|
|
52
|
+
tags: ["integrations", "goal"],
|
|
53
|
+
body: `## Why it matters
|
|
26
54
|
- Gives a regenerable, provider-agnostic integration hub with explicit mappings.
|
|
27
55
|
- Prevents drift between sync configs, mappings, and event/log outputs.
|
|
28
56
|
|
|
@@ -32,7 +60,17 @@ import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.exampl
|
|
|
32
60
|
|
|
33
61
|
## Success criteria
|
|
34
62
|
- Connections and mappings regenerate safely after spec edits.
|
|
35
|
-
- Sync events and logs provide auditability; payloads are stored and PII-scoped.`
|
|
63
|
+
- Sync events and logs provide auditability; payloads are stored and PII-scoped.`
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "docs.examples.integration-hub.usage",
|
|
67
|
+
title: "Integration Hub — Usage",
|
|
68
|
+
summary: "How to configure connectors, mappings, and scheduled syncs.",
|
|
69
|
+
kind: "usage",
|
|
70
|
+
visibility: "public",
|
|
71
|
+
route: "/docs/examples/integration-hub/usage",
|
|
72
|
+
tags: ["integrations", "usage"],
|
|
73
|
+
body: `## Setup
|
|
36
74
|
1) Seed integrations/connections (if available) or create connector definitions.
|
|
37
75
|
2) Configure sync jobs with Jobs module; store payload archives via Files.
|
|
38
76
|
|
|
@@ -44,7 +82,21 @@ import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.exampl
|
|
|
44
82
|
## Guardrails
|
|
45
83
|
- Keep mappings declarative; avoid hardcoded transforms.
|
|
46
84
|
- Emit events for sync lifecycle; persist logs for audit.
|
|
47
|
-
- Redact sensitive payload paths in presentations.`
|
|
85
|
+
- Redact sensitive payload paths in presentations.`
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "docs.examples.integration-hub.constraints",
|
|
89
|
+
title: "Integration Hub — Constraints & Safety",
|
|
90
|
+
summary: "Internal guidance for sync lifecycle, mappings, and regeneration safety.",
|
|
91
|
+
kind: "reference",
|
|
92
|
+
visibility: "internal",
|
|
93
|
+
route: "/docs/examples/integration-hub/constraints",
|
|
94
|
+
tags: [
|
|
95
|
+
"integrations",
|
|
96
|
+
"constraints",
|
|
97
|
+
"internal"
|
|
98
|
+
],
|
|
99
|
+
body: `## Constraints
|
|
48
100
|
- Mappings and sync states must remain declarative in spec; no hidden code transforms.
|
|
49
101
|
- Events to emit at minimum: sync.started, sync.completed, sync.failed; connection.connected/disconnected.
|
|
50
102
|
- Regeneration should not alter retry/backoff semantics without explicit spec change.
|
|
@@ -56,4 +108,8 @@ import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.exampl
|
|
|
56
108
|
## Verification
|
|
57
109
|
- Include fixtures for mapping changes and sync retries.
|
|
58
110
|
- Validate that scheduled jobs (cron) are spec-driven; Jobs module wiring intact.
|
|
59
|
-
- Ensure Audit/Notifications receive sync lifecycle events.`
|
|
111
|
+
- Ensure Audit/Notifications receive sync lifecycle events.`
|
|
112
|
+
}
|
|
113
|
+
]);
|
|
114
|
+
|
|
115
|
+
//#endregion
|
package/dist/events.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
|
|
2
1
|
import * as _lssm_lib_schema0 from "@lssm/lib.schema";
|
|
2
|
+
import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/events.d.ts
|
|
5
5
|
declare const IntegrationCreatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema0.SchemaModel<{
|
package/dist/events.js
CHANGED
|
@@ -1 +1,246 @@
|
|
|
1
|
-
import{defineEvent
|
|
1
|
+
import { defineEvent } from "./libs/contracts/dist/events.js";
|
|
2
|
+
import "./libs/contracts/dist/index.js";
|
|
3
|
+
import { ScalarTypeEnum } from "./libs/schema/dist/ScalarTypeEnum.js";
|
|
4
|
+
import { defineSchemaModel } from "./libs/schema/dist/SchemaModel.js";
|
|
5
|
+
import "./libs/schema/dist/index.js";
|
|
6
|
+
|
|
7
|
+
//#region src/events.ts
|
|
8
|
+
const IntegrationCreatedPayload = defineSchemaModel({
|
|
9
|
+
name: "IntegrationCreatedPayload",
|
|
10
|
+
description: "Payload when an integration is created",
|
|
11
|
+
fields: {
|
|
12
|
+
integrationId: {
|
|
13
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
+
isOptional: false
|
|
15
|
+
},
|
|
16
|
+
type: {
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
+
isOptional: false
|
|
19
|
+
},
|
|
20
|
+
createdAt: {
|
|
21
|
+
type: ScalarTypeEnum.DateTime(),
|
|
22
|
+
isOptional: false
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const IntegrationCreatedEvent = defineEvent({
|
|
27
|
+
name: "integration.created",
|
|
28
|
+
version: 1,
|
|
29
|
+
description: "Fired when a new integration is created",
|
|
30
|
+
payload: IntegrationCreatedPayload
|
|
31
|
+
});
|
|
32
|
+
const ConnectionCreatedPayload = defineSchemaModel({
|
|
33
|
+
name: "ConnectionCreatedPayload",
|
|
34
|
+
description: "Payload when a connection is established",
|
|
35
|
+
fields: {
|
|
36
|
+
connectionId: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: false
|
|
39
|
+
},
|
|
40
|
+
integrationId: {
|
|
41
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
42
|
+
isOptional: false
|
|
43
|
+
},
|
|
44
|
+
status: {
|
|
45
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
46
|
+
isOptional: false
|
|
47
|
+
},
|
|
48
|
+
createdAt: {
|
|
49
|
+
type: ScalarTypeEnum.DateTime(),
|
|
50
|
+
isOptional: false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
const ConnectionCreatedEvent = defineEvent({
|
|
55
|
+
name: "integration.connection.created",
|
|
56
|
+
version: 1,
|
|
57
|
+
description: "Fired when a new connection is established",
|
|
58
|
+
payload: ConnectionCreatedPayload
|
|
59
|
+
});
|
|
60
|
+
const ConnectionStatusChangedPayload = defineSchemaModel({
|
|
61
|
+
name: "ConnectionStatusChangedPayload",
|
|
62
|
+
description: "Payload when a connection status changes",
|
|
63
|
+
fields: {
|
|
64
|
+
connectionId: {
|
|
65
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
66
|
+
isOptional: false
|
|
67
|
+
},
|
|
68
|
+
previousStatus: {
|
|
69
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
70
|
+
isOptional: false
|
|
71
|
+
},
|
|
72
|
+
newStatus: {
|
|
73
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
74
|
+
isOptional: false
|
|
75
|
+
},
|
|
76
|
+
changedAt: {
|
|
77
|
+
type: ScalarTypeEnum.DateTime(),
|
|
78
|
+
isOptional: false
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const ConnectionStatusChangedEvent = defineEvent({
|
|
83
|
+
name: "integration.connection.statusChanged",
|
|
84
|
+
version: 1,
|
|
85
|
+
description: "Fired when a connection status changes",
|
|
86
|
+
payload: ConnectionStatusChangedPayload
|
|
87
|
+
});
|
|
88
|
+
const SyncConfigCreatedPayload = defineSchemaModel({
|
|
89
|
+
name: "SyncConfigCreatedPayload",
|
|
90
|
+
description: "Payload when a sync configuration is created",
|
|
91
|
+
fields: {
|
|
92
|
+
syncConfigId: {
|
|
93
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
94
|
+
isOptional: false
|
|
95
|
+
},
|
|
96
|
+
connectionId: {
|
|
97
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
98
|
+
isOptional: false
|
|
99
|
+
},
|
|
100
|
+
createdAt: {
|
|
101
|
+
type: ScalarTypeEnum.DateTime(),
|
|
102
|
+
isOptional: false
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
const SyncConfigCreatedEvent = defineEvent({
|
|
107
|
+
name: "integration.syncConfig.created",
|
|
108
|
+
version: 1,
|
|
109
|
+
description: "Fired when a sync configuration is created",
|
|
110
|
+
payload: SyncConfigCreatedPayload
|
|
111
|
+
});
|
|
112
|
+
const SyncStartedPayload = defineSchemaModel({
|
|
113
|
+
name: "SyncStartedPayload",
|
|
114
|
+
description: "Payload when a sync run starts",
|
|
115
|
+
fields: {
|
|
116
|
+
syncRunId: {
|
|
117
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
118
|
+
isOptional: false
|
|
119
|
+
},
|
|
120
|
+
syncConfigId: {
|
|
121
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
122
|
+
isOptional: false
|
|
123
|
+
},
|
|
124
|
+
startedAt: {
|
|
125
|
+
type: ScalarTypeEnum.DateTime(),
|
|
126
|
+
isOptional: false
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
const SyncStartedEvent = defineEvent({
|
|
131
|
+
name: "integration.sync.started",
|
|
132
|
+
version: 1,
|
|
133
|
+
description: "Fired when a sync run starts",
|
|
134
|
+
payload: SyncStartedPayload
|
|
135
|
+
});
|
|
136
|
+
const SyncCompletedPayload = defineSchemaModel({
|
|
137
|
+
name: "SyncCompletedPayload",
|
|
138
|
+
description: "Payload when a sync run completes successfully",
|
|
139
|
+
fields: {
|
|
140
|
+
syncRunId: {
|
|
141
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
142
|
+
isOptional: false
|
|
143
|
+
},
|
|
144
|
+
syncConfigId: {
|
|
145
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
146
|
+
isOptional: false
|
|
147
|
+
},
|
|
148
|
+
recordsProcessed: {
|
|
149
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
150
|
+
isOptional: false
|
|
151
|
+
},
|
|
152
|
+
completedAt: {
|
|
153
|
+
type: ScalarTypeEnum.DateTime(),
|
|
154
|
+
isOptional: false
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
const SyncCompletedEvent = defineEvent({
|
|
159
|
+
name: "integration.sync.completed",
|
|
160
|
+
version: 1,
|
|
161
|
+
description: "Fired when a sync run completes successfully",
|
|
162
|
+
payload: SyncCompletedPayload
|
|
163
|
+
});
|
|
164
|
+
const SyncFailedPayload = defineSchemaModel({
|
|
165
|
+
name: "SyncFailedPayload",
|
|
166
|
+
description: "Payload when a sync run fails",
|
|
167
|
+
fields: {
|
|
168
|
+
syncRunId: {
|
|
169
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
170
|
+
isOptional: false
|
|
171
|
+
},
|
|
172
|
+
syncConfigId: {
|
|
173
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
174
|
+
isOptional: false
|
|
175
|
+
},
|
|
176
|
+
error: {
|
|
177
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
178
|
+
isOptional: false
|
|
179
|
+
},
|
|
180
|
+
failedAt: {
|
|
181
|
+
type: ScalarTypeEnum.DateTime(),
|
|
182
|
+
isOptional: false
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
const SyncFailedEvent = defineEvent({
|
|
187
|
+
name: "integration.sync.failed",
|
|
188
|
+
version: 1,
|
|
189
|
+
description: "Fired when a sync run fails",
|
|
190
|
+
payload: SyncFailedPayload
|
|
191
|
+
});
|
|
192
|
+
const RecordSyncedPayload = defineSchemaModel({
|
|
193
|
+
name: "RecordSyncedPayload",
|
|
194
|
+
description: "Payload when a single record is synced",
|
|
195
|
+
fields: {
|
|
196
|
+
syncRunId: {
|
|
197
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
198
|
+
isOptional: false
|
|
199
|
+
},
|
|
200
|
+
recordId: {
|
|
201
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
202
|
+
isOptional: false
|
|
203
|
+
},
|
|
204
|
+
sourceId: {
|
|
205
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
206
|
+
isOptional: false
|
|
207
|
+
},
|
|
208
|
+
targetId: {
|
|
209
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
210
|
+
isOptional: false
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
const RecordSyncedEvent = defineEvent({
|
|
215
|
+
name: "integration.record.synced",
|
|
216
|
+
version: 1,
|
|
217
|
+
description: "Fired when a single record is synced",
|
|
218
|
+
payload: RecordSyncedPayload
|
|
219
|
+
});
|
|
220
|
+
const FieldMappingAddedPayload = defineSchemaModel({
|
|
221
|
+
name: "FieldMappingAddedPayload",
|
|
222
|
+
description: "Payload when a field mapping is added to a sync config",
|
|
223
|
+
fields: {
|
|
224
|
+
syncConfigId: {
|
|
225
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
226
|
+
isOptional: false
|
|
227
|
+
},
|
|
228
|
+
sourceField: {
|
|
229
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
230
|
+
isOptional: false
|
|
231
|
+
},
|
|
232
|
+
targetField: {
|
|
233
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
234
|
+
isOptional: false
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
const FieldMappingAddedEvent = defineEvent({
|
|
239
|
+
name: "integration.fieldMapping.added",
|
|
240
|
+
version: 1,
|
|
241
|
+
description: "Fired when a field mapping is added to a sync config",
|
|
242
|
+
payload: FieldMappingAddedPayload
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
//#endregion
|
|
246
|
+
export { ConnectionCreatedEvent, ConnectionStatusChangedEvent, FieldMappingAddedEvent, IntegrationCreatedEvent, RecordSyncedEvent, SyncCompletedEvent, SyncConfigCreatedEvent, SyncFailedEvent, SyncStartedEvent };
|
package/dist/example.js
CHANGED
|
@@ -1 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/example.ts
|
|
2
|
+
const example = {
|
|
3
|
+
id: "integration-hub",
|
|
4
|
+
title: "Integration Hub",
|
|
5
|
+
summary: "Provider-agnostic integration center with connectors, connections, field mappings, and sync logs.",
|
|
6
|
+
tags: [
|
|
7
|
+
"integrations",
|
|
8
|
+
"sync",
|
|
9
|
+
"etl",
|
|
10
|
+
"connectors"
|
|
11
|
+
],
|
|
12
|
+
kind: "template",
|
|
13
|
+
visibility: "public",
|
|
14
|
+
docs: {
|
|
15
|
+
rootDocId: "docs.examples.integration-hub",
|
|
16
|
+
goalDocId: "docs.examples.integration-hub.goal",
|
|
17
|
+
usageDocId: "docs.examples.integration-hub.usage",
|
|
18
|
+
constraintsDocId: "docs.examples.integration-hub.constraints"
|
|
19
|
+
},
|
|
20
|
+
entrypoints: {
|
|
21
|
+
packageName: "@lssm/example.integration-hub",
|
|
22
|
+
feature: "./feature",
|
|
23
|
+
contracts: "./contracts",
|
|
24
|
+
presentations: "./presentations",
|
|
25
|
+
handlers: "./handlers",
|
|
26
|
+
docs: "./docs"
|
|
27
|
+
},
|
|
28
|
+
surfaces: {
|
|
29
|
+
templates: true,
|
|
30
|
+
sandbox: {
|
|
31
|
+
enabled: true,
|
|
32
|
+
modes: [
|
|
33
|
+
"playground",
|
|
34
|
+
"specs",
|
|
35
|
+
"builder",
|
|
36
|
+
"markdown",
|
|
37
|
+
"evolution"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
studio: {
|
|
41
|
+
enabled: true,
|
|
42
|
+
installable: true
|
|
43
|
+
},
|
|
44
|
+
mcp: { enabled: true }
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var example_default = example;
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { example_default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { CreateConnectionContract } from "./connection/connection.contracts.js";
|
|
2
2
|
import { ConnectionStatusEnum } from "./connection/connection.enum.js";
|
|
3
3
|
import { ConnectionModel, CreateConnectionInputModel } from "./connection/connection.schema.js";
|
|
4
|
-
import "./connection/index.js";
|
|
5
4
|
import { IntegrationStatusEnum } from "./integration/integration.enum.js";
|
|
6
5
|
import { CreateIntegrationInputModel, IntegrationModel } from "./integration/integration.schema.js";
|
|
7
6
|
import { CreateIntegrationContract } from "./integration/integration.contracts.js";
|
|
8
|
-
import "./integration/index.js";
|
|
9
7
|
import { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum } from "./sync/sync.enum.js";
|
|
10
8
|
import { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel } from "./sync/sync.schema.js";
|
|
11
9
|
import { AddFieldMappingContract, CreateSyncConfigContract, ListSyncRunsContract, TriggerSyncContract } from "./sync/sync.contracts.js";
|
|
12
|
-
import "./sync/index.js";
|
|
13
10
|
import { BasicFieldTransformer, BasicSyncEngine, FieldMapping, IFieldTransformer, ISyncEngine, LookupConfig, SourceRecord, SyncConfig, SyncContext, SyncError, SyncResult, TargetRecord, computeChecksum, createSyncEngine, hasChanges } from "./sync-engine/index.js";
|
|
14
11
|
export { AddFieldMappingContract, AddFieldMappingInputModel, BasicFieldTransformer, BasicSyncEngine, ConnectionModel, ConnectionStatusEnum, CreateConnectionContract, CreateConnectionInputModel, CreateIntegrationContract, CreateIntegrationInputModel, CreateSyncConfigContract, CreateSyncConfigInputModel, FieldMapping, FieldMappingModel, IFieldTransformer, ISyncEngine, IntegrationModel, IntegrationStatusEnum, ListSyncRunsContract, ListSyncRunsInputModel, ListSyncRunsOutputModel, LookupConfig, MappingTypeEnum, SourceRecord, SyncConfig, SyncConfigModel, SyncContext, SyncDirectionEnum, SyncError, SyncResult, SyncRunModel, SyncStatusEnum, TargetRecord, TriggerSyncContract, TriggerSyncInputModel, computeChecksum, createSyncEngine, hasChanges };
|