@lssm/example.integration-hub 0.0.0-canary-20251210171026 → 0.0.0-canary-20251212210835
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./integration-hub.docblock.js";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{id:`docs.examples.integration-hub`,title:`Integration Hub`,summary:`Generic integration center with connectors, connections, sync configs, field mappings, and sync logs.`,kind:`reference`,visibility:`public`,route:`/docs/examples/integration-hub`,tags:[`integrations`,`sync`,`etl`,`connectors`],body:`## Entities
|
|
2
|
+
|
|
3
|
+
- Integration, Connection, SyncConfig, FieldMapping, SyncLog.
|
|
4
|
+
- Sync engine config lives in \`src/sync-engine\` to map remote <-> local entities.
|
|
5
|
+
|
|
6
|
+
## Contracts
|
|
7
|
+
|
|
8
|
+
- \`integration.create\`, \`integration.connect\`, \`integration.configureSync\`, \`integration.mapFields\`, \`integration.runSync\`.
|
|
9
|
+
- Uses Jobs module for scheduled syncs and retries; Files module for payload archives.
|
|
10
|
+
|
|
11
|
+
## Events
|
|
12
|
+
|
|
13
|
+
- sync.started/completed/failed, connection.connected/disconnected, mapping.updated.
|
|
14
|
+
- Forward to Notifications and Audit for observability.
|
|
15
|
+
|
|
16
|
+
## UI / Presentations
|
|
17
|
+
|
|
18
|
+
- Dashboard, integration list, connection detail, sync config editor.
|
|
19
|
+
- Templates registered as \`integration-hub\` in Template Registry.
|
|
20
|
+
|
|
21
|
+
## Notes
|
|
22
|
+
|
|
23
|
+
- Providers remain agnostic; keep mappings declarative for safe regeneration.
|
|
24
|
+
- Feature flags can gate specific providers; metering can track sync volume.
|
|
25
|
+
`},{id:`docs.examples.integration-hub.goal`,title:`Integration Hub — Goal`,summary:`Why this integration hub exists and what success looks like.`,kind:`goal`,visibility:`public`,route:`/docs/examples/integration-hub/goal`,tags:[`integrations`,`goal`],body:`## Why it matters
|
|
26
|
+
- Gives a regenerable, provider-agnostic integration hub with explicit mappings.
|
|
27
|
+
- Prevents drift between sync configs, mappings, and event/log outputs.
|
|
28
|
+
|
|
29
|
+
## Business/Product goal
|
|
30
|
+
- Model connectors, connections, sync jobs, and mappings with governance and retries.
|
|
31
|
+
- Support staged provider rollouts via Feature Flags and observability via Audit/Notifications.
|
|
32
|
+
|
|
33
|
+
## Success criteria
|
|
34
|
+
- Connections and mappings regenerate safely after spec edits.
|
|
35
|
+
- Sync events and logs provide auditability; payloads are stored and PII-scoped.`},{id:`docs.examples.integration-hub.usage`,title:`Integration Hub — Usage`,summary:`How to configure connectors, mappings, and scheduled syncs.`,kind:`usage`,visibility:`public`,route:`/docs/examples/integration-hub/usage`,tags:[`integrations`,`usage`],body:`## Setup
|
|
36
|
+
1) Seed integrations/connections (if available) or create connector definitions.
|
|
37
|
+
2) Configure sync jobs with Jobs module; store payload archives via Files.
|
|
38
|
+
|
|
39
|
+
## Extend & regenerate
|
|
40
|
+
1) Add mapping fields or provider configs in the spec; include validation and PII paths.
|
|
41
|
+
2) Regenerate to align UI/API/events/logs; verify Notifications/Audit hooks.
|
|
42
|
+
3) Gate risky providers behind Feature Flags; meter sync volume if needed.
|
|
43
|
+
|
|
44
|
+
## Guardrails
|
|
45
|
+
- Keep mappings declarative; avoid hardcoded transforms.
|
|
46
|
+
- Emit events for sync lifecycle; persist logs for audit.
|
|
47
|
+
- Redact sensitive payload paths in presentations.`},{id:`docs.examples.integration-hub.constraints`,title:`Integration Hub — Constraints & Safety`,summary:`Internal guidance for sync lifecycle, mappings, and regeneration safety.`,kind:`reference`,visibility:`internal`,route:`/docs/examples/integration-hub/constraints`,tags:[`integrations`,`constraints`,`internal`],body:`## Constraints
|
|
48
|
+
- Mappings and sync states must remain declarative in spec; no hidden code transforms.
|
|
49
|
+
- Events to emit at minimum: sync.started, sync.completed, sync.failed; connection.connected/disconnected.
|
|
50
|
+
- Regeneration should not alter retry/backoff semantics without explicit spec change.
|
|
51
|
+
|
|
52
|
+
## PII & Payloads
|
|
53
|
+
- Treat payload archives as potentially sensitive; mark policy.pii paths.
|
|
54
|
+
- For MCP/web, avoid exposing raw credentials/tokens; store via provider adapters only.
|
|
55
|
+
|
|
56
|
+
## Verification
|
|
57
|
+
- Include fixtures for mapping changes and sync retries.
|
|
58
|
+
- Validate that scheduled jobs (cron) are spec-driven; Jobs module wiring intact.
|
|
59
|
+
- Ensure Audit/Notifications receive sync lifecycle events.`}]);
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ConnectionCreatedEvent as e,ConnectionStatusChangedEvent as t,IntegrationCreatedEvent as n,IntegrationHubEvents as r,RecordSyncedEvent as i,SyncCompletedEvent as a,SyncConfigCreatedEvent as o,SyncFailedEvent as s,SyncStartedEvent as c}from"./events.js";import{IntegrationHubFeature as l}from"./feature.js";import{ConnectionEntity as u,ConnectionStatusEnum as d,FieldMappingEntity as f,IntegrationEntity as p,IntegrationStatusEnum as m,MappingTypeEnum as h,SyncConfigEntity as g,SyncDirectionEnum as _,SyncLogEntity as v,SyncRecordEntity as y,SyncRunEntity as b,SyncStatusEnum as x,integrationHubEntities as S,integrationHubSchemaContribution as C}from"./entities/index.js";import{AddFieldMappingContract as w,AddFieldMappingInputModel as T,ConnectionModel as E,CreateConnectionContract as D,CreateConnectionInputModel as O,CreateIntegrationContract as k,CreateIntegrationInputModel as A,CreateSyncConfigContract as j,CreateSyncConfigInputModel as M,FieldMappingModel as N,IntegrationModel as P,ListSyncRunsContract as F,ListSyncRunsInputModel as I,ListSyncRunsOutputModel as L,SyncConfigModel as ee,SyncRunModel as R,TriggerSyncContract as z,TriggerSyncInputModel as B}from"./contracts/index.js";import{handleAddFieldMapping as V,handleCreateConnection as H,handleCreateIntegration as U,handleCreateSyncConfig as W,handleListSyncRuns as G,handleTriggerSync as K,mockIntegrationStore as q}from"./handlers/index.js";import{ConnectionListPresentation as J,ConnectionSetupPresentation as Y,FieldMappingEditorPresentation as X,IntegrationDetailPresentation as Z,IntegrationHealthPresentation as Q,IntegrationHubPresentations as $,IntegrationListPresentation as te,SyncActivityPresentation as ne,SyncConfigEditorPresentation as re,SyncConfigListPresentation as ie,SyncRunDetailPresentation as ae,SyncRunListPresentation as oe}from"./presentations/index.js";import{BasicFieldTransformer as se,BasicSyncEngine as ce,computeChecksum as le,createSyncEngine as ue,hasChanges as de}from"./sync-engine/index.js";import{identityRbacSchemaContribution as fe}from"@lssm/lib.identity-rbac";import{auditTrailSchemaContribution as pe}from"@lssm/module.audit-trail";import{featureFlagsSchemaContribution as me}from"@lssm/lib.feature-flags";import{filesSchemaContribution as he}from"@lssm/lib.files";import{jobsSchemaContribution as ge}from"@lssm/lib.jobs";const _e={modules:[fe,pe,me,he,ge,C],provider:`postgresql`,outputPath:`./prisma/schema/generated.prisma`};export{w as AddFieldMappingContract,T as AddFieldMappingInputModel,se as BasicFieldTransformer,ce as BasicSyncEngine,e as ConnectionCreatedEvent,u as ConnectionEntity,J as ConnectionListPresentation,E as ConnectionModel,Y as ConnectionSetupPresentation,t as ConnectionStatusChangedEvent,d as ConnectionStatusEnum,D as CreateConnectionContract,O as CreateConnectionInputModel,k as CreateIntegrationContract,A as CreateIntegrationInputModel,j as CreateSyncConfigContract,M as CreateSyncConfigInputModel,X as FieldMappingEditorPresentation,f as FieldMappingEntity,N as FieldMappingModel,n as IntegrationCreatedEvent,Z as IntegrationDetailPresentation,p as IntegrationEntity,Q as IntegrationHealthPresentation,r as IntegrationHubEvents,l as IntegrationHubFeature,$ as IntegrationHubPresentations,te as IntegrationListPresentation,P as IntegrationModel,m as IntegrationStatusEnum,F as ListSyncRunsContract,I as ListSyncRunsInputModel,L as ListSyncRunsOutputModel,h as MappingTypeEnum,i as RecordSyncedEvent,ne as SyncActivityPresentation,a as SyncCompletedEvent,o as SyncConfigCreatedEvent,re as SyncConfigEditorPresentation,g as SyncConfigEntity,ie as SyncConfigListPresentation,ee as SyncConfigModel,_ as SyncDirectionEnum,s as SyncFailedEvent,v as SyncLogEntity,y as SyncRecordEntity,ae as SyncRunDetailPresentation,b as SyncRunEntity,oe as SyncRunListPresentation,R as SyncRunModel,c as SyncStartedEvent,x as SyncStatusEnum,z as TriggerSyncContract,B as TriggerSyncInputModel,le as computeChecksum,ue as createSyncEngine,V as handleAddFieldMapping,H as handleCreateConnection,U as handleCreateIntegration,W as handleCreateSyncConfig,G as handleListSyncRuns,K as handleTriggerSync,de as hasChanges,S as integrationHubEntities,C as integrationHubSchemaContribution,q as mockIntegrationStore,_e as schemaComposition};
|
|
1
|
+
import{ConnectionCreatedEvent as e,ConnectionStatusChangedEvent as t,IntegrationCreatedEvent as n,IntegrationHubEvents as r,RecordSyncedEvent as i,SyncCompletedEvent as a,SyncConfigCreatedEvent as o,SyncFailedEvent as s,SyncStartedEvent as c}from"./events.js";import{IntegrationHubFeature as l}from"./feature.js";import{ConnectionEntity as u,ConnectionStatusEnum as d,FieldMappingEntity as f,IntegrationEntity as p,IntegrationStatusEnum as m,MappingTypeEnum as h,SyncConfigEntity as g,SyncDirectionEnum as _,SyncLogEntity as v,SyncRecordEntity as y,SyncRunEntity as b,SyncStatusEnum as x,integrationHubEntities as S,integrationHubSchemaContribution as C}from"./entities/index.js";import{AddFieldMappingContract as w,AddFieldMappingInputModel as T,ConnectionModel as E,CreateConnectionContract as D,CreateConnectionInputModel as O,CreateIntegrationContract as k,CreateIntegrationInputModel as A,CreateSyncConfigContract as j,CreateSyncConfigInputModel as M,FieldMappingModel as N,IntegrationModel as P,ListSyncRunsContract as F,ListSyncRunsInputModel as I,ListSyncRunsOutputModel as L,SyncConfigModel as ee,SyncRunModel as R,TriggerSyncContract as z,TriggerSyncInputModel as B}from"./contracts/index.js";import{handleAddFieldMapping as V,handleCreateConnection as H,handleCreateIntegration as U,handleCreateSyncConfig as W,handleListSyncRuns as G,handleTriggerSync as K,mockIntegrationStore as q}from"./handlers/index.js";import{ConnectionListPresentation as J,ConnectionSetupPresentation as Y,FieldMappingEditorPresentation as X,IntegrationDetailPresentation as Z,IntegrationHealthPresentation as Q,IntegrationHubPresentations as $,IntegrationListPresentation as te,SyncActivityPresentation as ne,SyncConfigEditorPresentation as re,SyncConfigListPresentation as ie,SyncRunDetailPresentation as ae,SyncRunListPresentation as oe}from"./presentations/index.js";import{BasicFieldTransformer as se,BasicSyncEngine as ce,computeChecksum as le,createSyncEngine as ue,hasChanges as de}from"./sync-engine/index.js";import"./docs/index.js";import{identityRbacSchemaContribution as fe}from"@lssm/lib.identity-rbac";import{auditTrailSchemaContribution as pe}from"@lssm/module.audit-trail";import{featureFlagsSchemaContribution as me}from"@lssm/lib.feature-flags";import{filesSchemaContribution as he}from"@lssm/lib.files";import{jobsSchemaContribution as ge}from"@lssm/lib.jobs";const _e={modules:[fe,pe,me,he,ge,C],provider:`postgresql`,outputPath:`./prisma/schema/generated.prisma`};export{w as AddFieldMappingContract,T as AddFieldMappingInputModel,se as BasicFieldTransformer,ce as BasicSyncEngine,e as ConnectionCreatedEvent,u as ConnectionEntity,J as ConnectionListPresentation,E as ConnectionModel,Y as ConnectionSetupPresentation,t as ConnectionStatusChangedEvent,d as ConnectionStatusEnum,D as CreateConnectionContract,O as CreateConnectionInputModel,k as CreateIntegrationContract,A as CreateIntegrationInputModel,j as CreateSyncConfigContract,M as CreateSyncConfigInputModel,X as FieldMappingEditorPresentation,f as FieldMappingEntity,N as FieldMappingModel,n as IntegrationCreatedEvent,Z as IntegrationDetailPresentation,p as IntegrationEntity,Q as IntegrationHealthPresentation,r as IntegrationHubEvents,l as IntegrationHubFeature,$ as IntegrationHubPresentations,te as IntegrationListPresentation,P as IntegrationModel,m as IntegrationStatusEnum,F as ListSyncRunsContract,I as ListSyncRunsInputModel,L as ListSyncRunsOutputModel,h as MappingTypeEnum,i as RecordSyncedEvent,ne as SyncActivityPresentation,a as SyncCompletedEvent,o as SyncConfigCreatedEvent,re as SyncConfigEditorPresentation,g as SyncConfigEntity,ie as SyncConfigListPresentation,ee as SyncConfigModel,_ as SyncDirectionEnum,s as SyncFailedEvent,v as SyncLogEntity,y as SyncRecordEntity,ae as SyncRunDetailPresentation,b as SyncRunEntity,oe as SyncRunListPresentation,R as SyncRunModel,c as SyncStartedEvent,x as SyncStatusEnum,z as TriggerSyncContract,B as TriggerSyncInputModel,le as computeChecksum,ue as createSyncEngine,V as handleAddFieldMapping,H as handleCreateConnection,U as handleCreateIntegration,W as handleCreateSyncConfig,G as handleListSyncRuns,K as handleTriggerSync,de as hasChanges,S as integrationHubEntities,C as integrationHubSchemaContribution,q as mockIntegrationStore,_e as schemaComposition};
|