@lssm/example.integration-hub 0.0.0-canary-20251217080011 → 0.0.0-canary-20251219202229

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.
Files changed (209) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/connection/connection.contracts.d.ts +28 -27
  4. package/dist/connection/connection.contracts.d.ts.map +1 -0
  5. package/dist/connection/connection.contracts.js +2 -1
  6. package/dist/connection/connection.contracts.js.map +1 -0
  7. package/dist/connection/connection.enum.d.ts +4 -3
  8. package/dist/connection/connection.enum.d.ts.map +1 -0
  9. package/dist/connection/connection.enum.js +4 -4
  10. package/dist/connection/connection.enum.js.map +1 -0
  11. package/dist/connection/connection.presentation.d.ts +2 -1
  12. package/dist/connection/connection.presentation.d.ts.map +1 -0
  13. package/dist/connection/connection.presentation.js +2 -1
  14. package/dist/connection/connection.presentation.js.map +1 -0
  15. package/dist/connection/connection.schema.d.ts +18 -17
  16. package/dist/connection/connection.schema.d.ts.map +1 -0
  17. package/dist/connection/connection.schema.js +17 -18
  18. package/dist/connection/connection.schema.js.map +1 -0
  19. package/dist/docs/integration-hub.docblock.js +2 -1
  20. package/dist/docs/integration-hub.docblock.js.map +1 -0
  21. package/dist/events.d.ts +2 -1
  22. package/dist/events.d.ts.map +1 -0
  23. package/dist/events.js +44 -45
  24. package/dist/events.js.map +1 -0
  25. package/dist/example.d.ts +2 -1
  26. package/dist/example.d.ts.map +1 -0
  27. package/dist/example.js +2 -1
  28. package/dist/example.js.map +1 -0
  29. package/dist/integration/integration.contracts.d.ts +27 -26
  30. package/dist/integration/integration.contracts.d.ts.map +1 -0
  31. package/dist/integration/integration.contracts.js +2 -1
  32. package/dist/integration/integration.contracts.js.map +1 -0
  33. package/dist/integration/integration.enum.d.ts +4 -3
  34. package/dist/integration/integration.enum.d.ts.map +1 -0
  35. package/dist/integration/integration.enum.js +4 -4
  36. package/dist/integration/integration.enum.js.map +1 -0
  37. package/dist/integration/integration.presentation.d.ts +2 -1
  38. package/dist/integration/integration.presentation.d.ts.map +1 -0
  39. package/dist/integration/integration.presentation.js +2 -1
  40. package/dist/integration/integration.presentation.js.map +1 -0
  41. package/dist/integration/integration.schema.d.ts +18 -17
  42. package/dist/integration/integration.schema.d.ts.map +1 -0
  43. package/dist/integration/integration.schema.js +17 -18
  44. package/dist/integration/integration.schema.js.map +1 -0
  45. package/dist/integration-hub.feature.d.ts +2 -1
  46. package/dist/integration-hub.feature.d.ts.map +1 -0
  47. package/dist/integration-hub.feature.js +2 -1
  48. package/dist/integration-hub.feature.js.map +1 -0
  49. package/dist/libs/contracts/dist/capabilities/openbanking.js +2 -1
  50. package/dist/libs/contracts/dist/capabilities/openbanking.js.map +1 -0
  51. package/dist/libs/contracts/dist/contract-registry/schemas.js +2 -1
  52. package/dist/libs/contracts/dist/contract-registry/schemas.js.map +1 -0
  53. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +2 -1
  54. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
  55. package/dist/libs/contracts/dist/docs/index.js +2 -6
  56. package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
  57. package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
  58. package/dist/libs/contracts/dist/docs/presentations.js +2 -1
  59. package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
  60. package/dist/libs/contracts/dist/docs/registry.js +2 -1
  61. package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
  62. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +2 -1
  63. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
  64. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +2 -1
  65. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
  66. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +2 -1
  67. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
  68. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -1
  69. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
  70. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +2 -1
  71. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
  72. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +2 -1
  73. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
  74. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +2 -1
  75. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
  76. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +2 -1
  77. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
  78. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +2 -1
  79. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
  80. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +2 -1
  81. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
  82. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +2 -1
  83. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
  84. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +2 -1
  85. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
  86. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +2 -1
  87. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
  88. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +2 -1
  89. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
  90. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +2 -1
  91. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
  92. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +2 -1
  93. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
  94. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +2 -1
  95. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
  96. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +2 -1
  97. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
  98. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +2 -1
  99. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
  100. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +2 -1
  101. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
  102. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
  103. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
  104. package/dist/libs/contracts/dist/events.js +2 -1
  105. package/dist/libs/contracts/dist/events.js.map +1 -0
  106. package/dist/libs/contracts/dist/index.js +2 -1
  107. package/dist/libs/contracts/dist/integrations/contracts.js +65 -66
  108. package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -0
  109. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +31 -32
  110. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -0
  111. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +18 -19
  112. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -0
  113. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +32 -33
  114. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -0
  115. package/dist/libs/contracts/dist/integrations/openbanking/models.js +60 -61
  116. package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +1 -0
  117. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +2 -1
  118. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +1 -0
  119. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +2 -1
  120. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +1 -0
  121. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +2 -1
  122. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +1 -0
  123. package/dist/libs/contracts/dist/integrations/providers/gmail.js +2 -1
  124. package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +1 -0
  125. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +2 -1
  126. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +1 -0
  127. package/dist/libs/contracts/dist/integrations/providers/mistral.js +2 -1
  128. package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +1 -0
  129. package/dist/libs/contracts/dist/integrations/providers/postmark.js +2 -1
  130. package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +1 -0
  131. package/dist/libs/contracts/dist/integrations/providers/powens.js +2 -1
  132. package/dist/libs/contracts/dist/integrations/providers/powens.js.map +1 -0
  133. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +2 -1
  134. package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +1 -0
  135. package/dist/libs/contracts/dist/integrations/providers/stripe.js +2 -1
  136. package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +1 -0
  137. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +2 -1
  138. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +1 -0
  139. package/dist/libs/contracts/dist/knowledge/contracts.js +44 -45
  140. package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -0
  141. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +2 -1
  142. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js.map +1 -0
  143. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +2 -1
  144. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js.map +1 -0
  145. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +2 -1
  146. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js.map +1 -0
  147. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +2 -1
  148. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js.map +1 -0
  149. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +2 -1
  150. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js.map +1 -0
  151. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +2 -1
  152. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js.map +1 -0
  153. package/dist/libs/contracts/dist/llm/exporters.js +2 -1
  154. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -0
  155. package/dist/libs/contracts/dist/onboarding-base.js +22 -23
  156. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -0
  157. package/dist/libs/contracts/dist/ownership.js +4 -2
  158. package/dist/libs/contracts/dist/ownership.js.map +1 -0
  159. package/dist/libs/contracts/dist/presentations.v2.js +2 -1
  160. package/dist/libs/contracts/dist/presentations.v2.js.map +1 -0
  161. package/dist/libs/contracts/dist/regenerator/service.js +2 -1
  162. package/dist/libs/contracts/dist/regenerator/service.js.map +1 -0
  163. package/dist/libs/contracts/dist/schema/dist/index.js +3873 -6
  164. package/dist/libs/contracts/dist/schema/dist/index.js.map +1 -0
  165. package/dist/libs/contracts/dist/spec.js +2 -1
  166. package/dist/libs/contracts/dist/spec.js.map +1 -0
  167. package/dist/libs/schema/dist/index.js +4717 -6
  168. package/dist/libs/schema/dist/index.js.map +1 -0
  169. package/dist/sync/sync.contracts.d.ts +128 -127
  170. package/dist/sync/sync.contracts.d.ts.map +1 -0
  171. package/dist/sync/sync.contracts.js +2 -1
  172. package/dist/sync/sync.contracts.js.map +1 -0
  173. package/dist/sync/sync.enum.d.ts +6 -5
  174. package/dist/sync/sync.enum.d.ts.map +1 -0
  175. package/dist/sync/sync.enum.js +6 -6
  176. package/dist/sync/sync.enum.js.map +1 -0
  177. package/dist/sync/sync.presentation.d.ts +2 -1
  178. package/dist/sync/sync.presentation.d.ts.map +1 -0
  179. package/dist/sync/sync.presentation.js +2 -1
  180. package/dist/sync/sync.presentation.js.map +1 -0
  181. package/dist/sync/sync.schema.d.ts +2 -1
  182. package/dist/sync/sync.schema.d.ts.map +1 -0
  183. package/dist/sync/sync.schema.js +58 -59
  184. package/dist/sync/sync.schema.js.map +1 -0
  185. package/dist/sync-engine/index.d.ts +2 -1
  186. package/dist/sync-engine/index.d.ts.map +1 -0
  187. package/dist/sync-engine/index.js +2 -1
  188. package/dist/sync-engine/index.js.map +1 -0
  189. package/package.json +14 -13
  190. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  191. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  192. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  193. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  194. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  195. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  196. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  197. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
  198. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  199. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -34
  200. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  201. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  202. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  203. package/dist/libs/schema/dist/EnumType.js +0 -56
  204. package/dist/libs/schema/dist/FieldType.js +0 -49
  205. package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -236
  206. package/dist/libs/schema/dist/SchemaModel.js +0 -39
  207. package/dist/libs/schema/dist/entity/defineEntity.js +0 -1
  208. package/dist/libs/schema/dist/entity/index.js +0 -2
  209. package/dist/libs/schema/dist/entity/types.js +0 -1
@@ -1,17 +1,18 @@
1
- import * as _lssm_lib_schema244 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema105 from "@lssm/lib.schema";
2
2
 
3
3
  //#region src/sync/sync.enum.d.ts
4
4
  /**
5
5
  * Sync direction enum.
6
6
  */
7
- declare const SyncDirectionEnum: _lssm_lib_schema244.EnumType<[string, string, string]>;
7
+ declare const SyncDirectionEnum: _lssm_lib_schema105.EnumType<[string, string, string]>;
8
8
  /**
9
9
  * Sync status enum.
10
10
  */
11
- declare const SyncStatusEnum: _lssm_lib_schema244.EnumType<[string, string, string, string, string]>;
11
+ declare const SyncStatusEnum: _lssm_lib_schema105.EnumType<[string, string, string, string, string]>;
12
12
  /**
13
13
  * Mapping type enum.
14
14
  */
15
- declare const MappingTypeEnum: _lssm_lib_schema244.EnumType<[string, string, string, string, string]>;
15
+ declare const MappingTypeEnum: _lssm_lib_schema105.EnumType<[string, string, string, string, string]>;
16
16
  //#endregion
17
- export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum };
17
+ export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum };
18
+ //# sourceMappingURL=sync.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.enum.d.ts","names":[],"sources":["../../src/sync/sync.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,iBAIX,EAAA,mBAAA,CAJ4B,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;AAS9B;AAWA;;cAXa,gBAMX,mBAAA,CANyB;;;;cAWd,iBAMX,mBAAA,CAN0B"}
@@ -1,11 +1,10 @@
1
- import { defineEnum } from "../libs/schema/dist/EnumType.js";
2
- import "../libs/schema/dist/index.js";
1
+ import { N5 } from "../libs/schema/dist/index.js";
3
2
 
4
3
  //#region src/sync/sync.enum.ts
5
4
  /**
6
5
  * Sync direction enum.
7
6
  */
8
- const SyncDirectionEnum = defineEnum("SyncDirection", [
7
+ const SyncDirectionEnum = N5("SyncDirection", [
9
8
  "INBOUND",
10
9
  "OUTBOUND",
11
10
  "BIDIRECTIONAL"
@@ -13,7 +12,7 @@ const SyncDirectionEnum = defineEnum("SyncDirection", [
13
12
  /**
14
13
  * Sync status enum.
15
14
  */
16
- const SyncStatusEnum = defineEnum("SyncStatus", [
15
+ const SyncStatusEnum = N5("SyncStatus", [
17
16
  "PENDING",
18
17
  "RUNNING",
19
18
  "COMPLETED",
@@ -23,7 +22,7 @@ const SyncStatusEnum = defineEnum("SyncStatus", [
23
22
  /**
24
23
  * Mapping type enum.
25
24
  */
26
- const MappingTypeEnum = defineEnum("MappingType", [
25
+ const MappingTypeEnum = N5("MappingType", [
27
26
  "DIRECT",
28
27
  "TRANSFORM",
29
28
  "LOOKUP",
@@ -32,4 +31,5 @@ const MappingTypeEnum = defineEnum("MappingType", [
32
31
  ]);
33
32
 
34
33
  //#endregion
35
- export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum };
34
+ export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum };
35
+ //# sourceMappingURL=sync.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.enum.js","names":["defineEnum"],"sources":["../../src/sync/sync.enum.ts"],"sourcesContent":["import { defineEnum } from '@lssm/lib.schema';\n\n/**\n * Sync direction enum.\n */\nexport const SyncDirectionEnum = defineEnum('SyncDirection', [\n 'INBOUND',\n 'OUTBOUND',\n 'BIDIRECTIONAL',\n]);\n\n/**\n * Sync status enum.\n */\nexport const SyncStatusEnum = defineEnum('SyncStatus', [\n 'PENDING',\n 'RUNNING',\n 'COMPLETED',\n 'FAILED',\n 'CANCELLED',\n]);\n\n/**\n * Mapping type enum.\n */\nexport const MappingTypeEnum = defineEnum('MappingType', [\n 'DIRECT',\n 'TRANSFORM',\n 'LOOKUP',\n 'CONSTANT',\n 'COMPUTED',\n]);\n"],"mappings":";;;;;;AAKA,MAAa,oBAAoBA,GAAW,iBAAiB;CAC3D;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,iBAAiBA,GAAW,cAAc;CACrD;CACA;CACA;CACA;CACA;CACD,CAAC;;;;AAKF,MAAa,kBAAkBA,GAAW,eAAe;CACvD;CACA;CACA;CACA;CACA;CACD,CAAC"}
@@ -8,4 +8,5 @@ declare const SyncRunListPresentation: PresentationDescriptorV2;
8
8
  declare const SyncRunDetailPresentation: PresentationDescriptorV2;
9
9
  declare const SyncActivityPresentation: PresentationDescriptorV2;
10
10
  //#endregion
11
- export { FieldMappingEditorPresentation, SyncActivityPresentation, SyncConfigEditorPresentation, SyncConfigListPresentation, SyncRunDetailPresentation, SyncRunListPresentation };
11
+ export { FieldMappingEditorPresentation, SyncActivityPresentation, SyncConfigEditorPresentation, SyncConfigListPresentation, SyncRunDetailPresentation, SyncRunListPresentation };
12
+ //# sourceMappingURL=sync.presentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.presentation.d.ts","names":[],"sources":["../../src/sync/sync.presentation.ts"],"sourcesContent":[],"mappings":";;;cAOa,4BAA4B;cAqB5B,8BAA8B;AArB9B,cA0CA,8BA1C4B,EA0CI,wBAvB5C;AAEY,cA0CA,uBAvBZ,EAuBqC,wBA1CK;AAqB9B,cA0CA,yBAvBZ,EAuBuC,wBA1CK;AAqBhC,cA0CA,wBA1CyB,EA0CC,wBAvBtC"}
@@ -139,4 +139,5 @@ const SyncActivityPresentation = {
139
139
  };
140
140
 
141
141
  //#endregion
142
- export { FieldMappingEditorPresentation, SyncActivityPresentation, SyncConfigEditorPresentation, SyncConfigListPresentation, SyncRunDetailPresentation, SyncRunListPresentation };
142
+ export { FieldMappingEditorPresentation, SyncActivityPresentation, SyncConfigEditorPresentation, SyncConfigListPresentation, SyncRunDetailPresentation, SyncRunListPresentation };
143
+ //# sourceMappingURL=sync.presentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.presentation.js","names":["SyncConfigListPresentation: PresentationDescriptorV2","SyncConfigEditorPresentation: PresentationDescriptorV2","FieldMappingEditorPresentation: PresentationDescriptorV2","SyncRunListPresentation: PresentationDescriptorV2","SyncRunDetailPresentation: PresentationDescriptorV2","SyncActivityPresentation: PresentationDescriptorV2"],"sources":["../../src/sync/sync.presentation.ts"],"sourcesContent":["import type { PresentationDescriptorV2 } from '@lssm/lib.contracts';\nimport {\n SyncConfigModel,\n SyncRunModel,\n FieldMappingModel,\n} from './sync.schema';\n\nexport const SyncConfigListPresentation: PresentationDescriptorV2 = {\n meta: {\n name: 'integration.syncConfig.list',\n version: 1,\n description: 'List of sync configurations',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'config', 'list'],\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncConfigList',\n props: SyncConfigModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const SyncConfigEditorPresentation: PresentationDescriptorV2 = {\n meta: {\n name: 'integration.syncConfig.editor',\n version: 1,\n description: 'Editor for sync configuration settings',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'config', 'editor'],\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncConfigEditor',\n props: SyncConfigModel,\n },\n targets: ['react'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const FieldMappingEditorPresentation: PresentationDescriptorV2 = {\n meta: {\n name: 'integration.fieldMapping.editor',\n version: 1,\n description: 'Visual field mapping editor',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'field-mapping', 'editor'],\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'FieldMappingEditor',\n props: FieldMappingModel,\n },\n targets: ['react'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const SyncRunListPresentation: PresentationDescriptorV2 = {\n meta: {\n name: 'integration.syncRun.list',\n version: 1,\n description: 'History of sync runs',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'runs', 'history'],\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncRunList',\n props: SyncRunModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const SyncRunDetailPresentation: PresentationDescriptorV2 = {\n meta: {\n name: 'integration.syncRun.detail',\n version: 1,\n description: 'Detailed view of a sync run with logs',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'run', 'detail'],\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncRunDetail',\n props: SyncRunModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n\nexport const SyncActivityPresentation: PresentationDescriptorV2 = {\n meta: {\n name: 'integration.sync.activity',\n version: 1,\n description: 'Real-time sync activity monitor',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'activity', 'realtime'],\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'SyncActivity',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.sync.enabled'],\n },\n};\n"],"mappings":";;;AAOA,MAAaA,6BAAuD;CAClE,MAAM;EACJ,MAAM;EACN,SAAS;EACT,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAQ;GAAU;GAAO;EAChD;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,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MAAaC,2BAAqD;CAChE,MAAM;EACJ,MAAM;EACN,SAAS;EACT,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAQ;GAAY;GAAW;EACtD;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF"}
@@ -352,4 +352,5 @@ declare const ListSyncRunsOutputModel: _lssm_lib_schema247.SchemaModel<{
352
352
  };
353
353
  }>;
354
354
  //#endregion
355
- export { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel };
355
+ export { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel };
356
+ //# sourceMappingURL=sync.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.schema.d.ts","names":[],"sources":["../../src/sync/sync.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAUa,cAAA,iBAaX,sBAb4B,WAa5B,CAAA;EAAA,EAAA,EAAA;UAAA,mBAAA,CAAA;;;;;qBAb4B;EAAA,CAAA;EAkBjB,WAAA,EAAA;IAmBX,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;;cAnBW,eAAe,sBAAA,WAAA,CAAA;EAAA,EAAA,EAAA;IAwBf,IAAA,EALX,mBAAA,CAAA,SAyBA,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;;;qBApBuB;EAAA,CAAA;EAyBZ,YAAA,EAAA;IAeX,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;uCAfqC,CAAA,OAAA,EAAA,OAAA,CAAA;IAAA,UAAA,EAAA,KAAA;EAoB1B,CAAA;EAgBX,YAAA,EAAA;;;;;;;;;uCAhBoC,KAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAqBzB,CAAA;EAOX,aAAA,EAAA;;;2CAPgC,CAAA,MAAA,EAAA,MAAA,CAAA;QAAA,UAAA,EAAA,KAAA;MAYrB,CAAA;MAgBX,WAAA,EAAA;;;;iBAhBiC,EAAA;QAAA,IAAA,+BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;QAqBtB,UAAA,EAAA,KAMX;MAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAzGW,kCAAY;;UAoBvB,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,gDAA0B;;UAerC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,+CAAyB;;UAgBpC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,2CAAqB;;UAOhC,mBAAA,CAAA;;;;;;;;;;;;;;;cAKW,4CAAsB;;UAgBjC,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;cAKW,6CAAuB;;;;cAMlC,mBAAA,CAAA"}
@@ -1,25 +1,23 @@
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";
1
+ import { E5, K5 } from "../libs/schema/dist/index.js";
4
2
  import { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum } from "./sync.enum.js";
5
3
 
6
4
  //#region src/sync/sync.schema.ts
7
5
  /**
8
6
  * A field mapping configuration.
9
7
  */
10
- const FieldMappingModel = defineSchemaModel({
8
+ const FieldMappingModel = K5({
11
9
  name: "FieldMappingModel",
12
10
  fields: {
13
11
  id: {
14
- type: ScalarTypeEnum.String_unsecure(),
12
+ type: E5.String_unsecure(),
15
13
  isOptional: false
16
14
  },
17
15
  sourceField: {
18
- type: ScalarTypeEnum.String_unsecure(),
16
+ type: E5.String_unsecure(),
19
17
  isOptional: false
20
18
  },
21
19
  targetField: {
22
- type: ScalarTypeEnum.String_unsecure(),
20
+ type: E5.String_unsecure(),
23
21
  isOptional: false
24
22
  },
25
23
  mappingType: {
@@ -27,11 +25,11 @@ const FieldMappingModel = defineSchemaModel({
27
25
  isOptional: false
28
26
  },
29
27
  transformExpression: {
30
- type: ScalarTypeEnum.String_unsecure(),
28
+ type: E5.String_unsecure(),
31
29
  isOptional: true
32
30
  },
33
31
  isRequired: {
34
- type: ScalarTypeEnum.Boolean(),
32
+ type: E5.Boolean(),
35
33
  isOptional: false
36
34
  }
37
35
  }
@@ -39,23 +37,23 @@ const FieldMappingModel = defineSchemaModel({
39
37
  /**
40
38
  * A sync configuration.
41
39
  */
42
- const SyncConfigModel = defineSchemaModel({
40
+ const SyncConfigModel = K5({
43
41
  name: "SyncConfigModel",
44
42
  fields: {
45
43
  id: {
46
- type: ScalarTypeEnum.String_unsecure(),
44
+ type: E5.String_unsecure(),
47
45
  isOptional: false
48
46
  },
49
47
  integrationId: {
50
- type: ScalarTypeEnum.String_unsecure(),
48
+ type: E5.String_unsecure(),
51
49
  isOptional: false
52
50
  },
53
51
  connectionId: {
54
- type: ScalarTypeEnum.String_unsecure(),
52
+ type: E5.String_unsecure(),
55
53
  isOptional: false
56
54
  },
57
55
  name: {
58
- type: ScalarTypeEnum.String_unsecure(),
56
+ type: E5.String_unsecure(),
59
57
  isOptional: false
60
58
  },
61
59
  direction: {
@@ -63,27 +61,27 @@ const SyncConfigModel = defineSchemaModel({
63
61
  isOptional: false
64
62
  },
65
63
  sourceObject: {
66
- type: ScalarTypeEnum.String_unsecure(),
64
+ type: E5.String_unsecure(),
67
65
  isOptional: false
68
66
  },
69
67
  targetObject: {
70
- type: ScalarTypeEnum.String_unsecure(),
68
+ type: E5.String_unsecure(),
71
69
  isOptional: false
72
70
  },
73
71
  scheduleEnabled: {
74
- type: ScalarTypeEnum.Boolean(),
72
+ type: E5.Boolean(),
75
73
  isOptional: false
76
74
  },
77
75
  scheduleCron: {
78
- type: ScalarTypeEnum.String_unsecure(),
76
+ type: E5.String_unsecure(),
79
77
  isOptional: true
80
78
  },
81
79
  isActive: {
82
- type: ScalarTypeEnum.Boolean(),
80
+ type: E5.Boolean(),
83
81
  isOptional: false
84
82
  },
85
83
  lastSyncAt: {
86
- type: ScalarTypeEnum.DateTime(),
84
+ type: E5.DateTime(),
87
85
  isOptional: true
88
86
  },
89
87
  fieldMappings: {
@@ -96,15 +94,15 @@ const SyncConfigModel = defineSchemaModel({
96
94
  /**
97
95
  * A sync run.
98
96
  */
99
- const SyncRunModel = defineSchemaModel({
97
+ const SyncRunModel = K5({
100
98
  name: "SyncRunModel",
101
99
  fields: {
102
100
  id: {
103
- type: ScalarTypeEnum.String_unsecure(),
101
+ type: E5.String_unsecure(),
104
102
  isOptional: false
105
103
  },
106
104
  syncConfigId: {
107
- type: ScalarTypeEnum.String_unsecure(),
105
+ type: E5.String_unsecure(),
108
106
  isOptional: false
109
107
  },
110
108
  status: {
@@ -116,39 +114,39 @@ const SyncRunModel = defineSchemaModel({
116
114
  isOptional: false
117
115
  },
118
116
  trigger: {
119
- type: ScalarTypeEnum.String_unsecure(),
117
+ type: E5.String_unsecure(),
120
118
  isOptional: false
121
119
  },
122
120
  recordsProcessed: {
123
- type: ScalarTypeEnum.Int_unsecure(),
121
+ type: E5.Int_unsecure(),
124
122
  isOptional: false
125
123
  },
126
124
  recordsCreated: {
127
- type: ScalarTypeEnum.Int_unsecure(),
125
+ type: E5.Int_unsecure(),
128
126
  isOptional: false
129
127
  },
130
128
  recordsUpdated: {
131
- type: ScalarTypeEnum.Int_unsecure(),
129
+ type: E5.Int_unsecure(),
132
130
  isOptional: false
133
131
  },
134
132
  recordsFailed: {
135
- type: ScalarTypeEnum.Int_unsecure(),
133
+ type: E5.Int_unsecure(),
136
134
  isOptional: false
137
135
  },
138
136
  errorMessage: {
139
- type: ScalarTypeEnum.String_unsecure(),
137
+ type: E5.String_unsecure(),
140
138
  isOptional: true
141
139
  },
142
140
  startedAt: {
143
- type: ScalarTypeEnum.DateTime(),
141
+ type: E5.DateTime(),
144
142
  isOptional: true
145
143
  },
146
144
  completedAt: {
147
- type: ScalarTypeEnum.DateTime(),
145
+ type: E5.DateTime(),
148
146
  isOptional: true
149
147
  },
150
148
  createdAt: {
151
- type: ScalarTypeEnum.DateTime(),
149
+ type: E5.DateTime(),
152
150
  isOptional: false
153
151
  }
154
152
  }
@@ -156,19 +154,19 @@ const SyncRunModel = defineSchemaModel({
156
154
  /**
157
155
  * Input for creating a sync config.
158
156
  */
159
- const CreateSyncConfigInputModel = defineSchemaModel({
157
+ const CreateSyncConfigInputModel = K5({
160
158
  name: "CreateSyncConfigInput",
161
159
  fields: {
162
160
  integrationId: {
163
- type: ScalarTypeEnum.String_unsecure(),
161
+ type: E5.String_unsecure(),
164
162
  isOptional: false
165
163
  },
166
164
  connectionId: {
167
- type: ScalarTypeEnum.String_unsecure(),
165
+ type: E5.String_unsecure(),
168
166
  isOptional: false
169
167
  },
170
168
  name: {
171
- type: ScalarTypeEnum.NonEmptyString(),
169
+ type: E5.NonEmptyString(),
172
170
  isOptional: false
173
171
  },
174
172
  direction: {
@@ -176,19 +174,19 @@ const CreateSyncConfigInputModel = defineSchemaModel({
176
174
  isOptional: false
177
175
  },
178
176
  sourceObject: {
179
- type: ScalarTypeEnum.NonEmptyString(),
177
+ type: E5.NonEmptyString(),
180
178
  isOptional: false
181
179
  },
182
180
  targetObject: {
183
- type: ScalarTypeEnum.NonEmptyString(),
181
+ type: E5.NonEmptyString(),
184
182
  isOptional: false
185
183
  },
186
184
  scheduleEnabled: {
187
- type: ScalarTypeEnum.Boolean(),
185
+ type: E5.Boolean(),
188
186
  isOptional: true
189
187
  },
190
188
  scheduleCron: {
191
- type: ScalarTypeEnum.String_unsecure(),
189
+ type: E5.String_unsecure(),
192
190
  isOptional: true
193
191
  }
194
192
  }
@@ -196,19 +194,19 @@ const CreateSyncConfigInputModel = defineSchemaModel({
196
194
  /**
197
195
  * Input for adding a field mapping.
198
196
  */
199
- const AddFieldMappingInputModel = defineSchemaModel({
197
+ const AddFieldMappingInputModel = K5({
200
198
  name: "AddFieldMappingInput",
201
199
  fields: {
202
200
  syncConfigId: {
203
- type: ScalarTypeEnum.String_unsecure(),
201
+ type: E5.String_unsecure(),
204
202
  isOptional: false
205
203
  },
206
204
  sourceField: {
207
- type: ScalarTypeEnum.NonEmptyString(),
205
+ type: E5.NonEmptyString(),
208
206
  isOptional: false
209
207
  },
210
208
  targetField: {
211
- type: ScalarTypeEnum.NonEmptyString(),
209
+ type: E5.NonEmptyString(),
212
210
  isOptional: false
213
211
  },
214
212
  mappingType: {
@@ -216,23 +214,23 @@ const AddFieldMappingInputModel = defineSchemaModel({
216
214
  isOptional: false
217
215
  },
218
216
  transformExpression: {
219
- type: ScalarTypeEnum.String_unsecure(),
217
+ type: E5.String_unsecure(),
220
218
  isOptional: true
221
219
  },
222
220
  lookupConfig: {
223
- type: ScalarTypeEnum.JSON(),
221
+ type: E5.JSON(),
224
222
  isOptional: true
225
223
  },
226
224
  constantValue: {
227
- type: ScalarTypeEnum.JSON(),
225
+ type: E5.JSON(),
228
226
  isOptional: true
229
227
  },
230
228
  isRequired: {
231
- type: ScalarTypeEnum.Boolean(),
229
+ type: E5.Boolean(),
232
230
  isOptional: true
233
231
  },
234
232
  defaultValue: {
235
- type: ScalarTypeEnum.JSON(),
233
+ type: E5.JSON(),
236
234
  isOptional: true
237
235
  }
238
236
  }
@@ -240,11 +238,11 @@ const AddFieldMappingInputModel = defineSchemaModel({
240
238
  /**
241
239
  * Input for triggering a sync.
242
240
  */
243
- const TriggerSyncInputModel = defineSchemaModel({
241
+ const TriggerSyncInputModel = K5({
244
242
  name: "TriggerSyncInput",
245
243
  fields: {
246
244
  syncConfigId: {
247
- type: ScalarTypeEnum.String_unsecure(),
245
+ type: E5.String_unsecure(),
248
246
  isOptional: false
249
247
  },
250
248
  direction: {
@@ -252,7 +250,7 @@ const TriggerSyncInputModel = defineSchemaModel({
252
250
  isOptional: true
253
251
  },
254
252
  fullSync: {
255
- type: ScalarTypeEnum.Boolean(),
253
+ type: E5.Boolean(),
256
254
  isOptional: true
257
255
  }
258
256
  }
@@ -260,11 +258,11 @@ const TriggerSyncInputModel = defineSchemaModel({
260
258
  /**
261
259
  * Input for listing sync runs.
262
260
  */
263
- const ListSyncRunsInputModel = defineSchemaModel({
261
+ const ListSyncRunsInputModel = K5({
264
262
  name: "ListSyncRunsInput",
265
263
  fields: {
266
264
  syncConfigId: {
267
- type: ScalarTypeEnum.String_unsecure(),
265
+ type: E5.String_unsecure(),
268
266
  isOptional: false
269
267
  },
270
268
  status: {
@@ -272,12 +270,12 @@ const ListSyncRunsInputModel = defineSchemaModel({
272
270
  isOptional: true
273
271
  },
274
272
  limit: {
275
- type: ScalarTypeEnum.Int_unsecure(),
273
+ type: E5.Int_unsecure(),
276
274
  isOptional: true,
277
275
  defaultValue: 20
278
276
  },
279
277
  offset: {
280
- type: ScalarTypeEnum.Int_unsecure(),
278
+ type: E5.Int_unsecure(),
281
279
  isOptional: true,
282
280
  defaultValue: 0
283
281
  }
@@ -286,7 +284,7 @@ const ListSyncRunsInputModel = defineSchemaModel({
286
284
  /**
287
285
  * Output for listing sync runs.
288
286
  */
289
- const ListSyncRunsOutputModel = defineSchemaModel({
287
+ const ListSyncRunsOutputModel = K5({
290
288
  name: "ListSyncRunsOutput",
291
289
  fields: {
292
290
  runs: {
@@ -295,11 +293,12 @@ const ListSyncRunsOutputModel = defineSchemaModel({
295
293
  isOptional: false
296
294
  },
297
295
  total: {
298
- type: ScalarTypeEnum.Int_unsecure(),
296
+ type: E5.Int_unsecure(),
299
297
  isOptional: false
300
298
  }
301
299
  }
302
300
  });
303
301
 
304
302
  //#endregion
305
- export { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel };
303
+ export { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel };
304
+ //# sourceMappingURL=sync.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.schema.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../../src/sync/sync.schema.ts"],"sourcesContent":["import { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport {\n SyncDirectionEnum,\n SyncStatusEnum,\n MappingTypeEnum,\n} from './sync.enum';\n\n/**\n * A field mapping configuration.\n */\nexport const FieldMappingModel = defineSchemaModel({\n name: 'FieldMappingModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceField: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n targetField: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mappingType: { type: MappingTypeEnum, isOptional: false },\n transformExpression: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n isRequired: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n});\n\n/**\n * A sync configuration.\n */\nexport const SyncConfigModel = defineSchemaModel({\n name: 'SyncConfigModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n integrationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n direction: { type: SyncDirectionEnum, isOptional: false },\n sourceObject: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n targetObject: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n scheduleEnabled: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n scheduleCron: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n isActive: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n lastSyncAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n fieldMappings: { type: FieldMappingModel, isArray: true, isOptional: true },\n },\n});\n\n/**\n * A sync run.\n */\nexport const SyncRunModel = defineSchemaModel({\n name: 'SyncRunModel',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n syncConfigId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: SyncStatusEnum, isOptional: false },\n direction: { type: SyncDirectionEnum, isOptional: false },\n trigger: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n recordsProcessed: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n recordsCreated: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n recordsUpdated: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n recordsFailed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n errorMessage: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Input for creating a sync config.\n */\nexport const CreateSyncConfigInputModel = defineSchemaModel({\n name: 'CreateSyncConfigInput',\n fields: {\n integrationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n direction: { type: SyncDirectionEnum, isOptional: false },\n sourceObject: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n targetObject: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n scheduleEnabled: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n scheduleCron: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n/**\n * Input for adding a field mapping.\n */\nexport const AddFieldMappingInputModel = defineSchemaModel({\n name: 'AddFieldMappingInput',\n fields: {\n syncConfigId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n sourceField: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n targetField: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n mappingType: { type: MappingTypeEnum, isOptional: false },\n transformExpression: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n lookupConfig: { type: ScalarTypeEnum.JSON(), isOptional: true },\n constantValue: { type: ScalarTypeEnum.JSON(), isOptional: true },\n isRequired: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n defaultValue: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\n/**\n * Input for triggering a sync.\n */\nexport const TriggerSyncInputModel = defineSchemaModel({\n name: 'TriggerSyncInput',\n fields: {\n syncConfigId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n direction: { type: SyncDirectionEnum, isOptional: true },\n fullSync: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n },\n});\n\n/**\n * Input for listing sync runs.\n */\nexport const ListSyncRunsInputModel = defineSchemaModel({\n name: 'ListSyncRunsInput',\n fields: {\n syncConfigId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: SyncStatusEnum, isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n});\n\n/**\n * Output for listing sync runs.\n */\nexport const ListSyncRunsOutputModel = defineSchemaModel({\n name: 'ListSyncRunsOutput',\n fields: {\n runs: { type: SyncRunModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n"],"mappings":";;;;;;;AAUA,MAAa,oBAAoBA,GAAkB;CACjD,MAAM;CACN,QAA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"}
@@ -105,4 +105,5 @@ declare function createSyncEngine(transformer?: IFieldTransformer): ISyncEngine;
105
105
  declare function computeChecksum(data: Record<string, unknown>): string;
106
106
  declare function hasChanges(sourceChecksum: string | undefined, targetChecksum: string | undefined): boolean;
107
107
  //#endregion
108
- export { BasicFieldTransformer, BasicSyncEngine, FieldMapping, IFieldTransformer, ISyncEngine, LookupConfig, SourceRecord, SyncConfig, SyncContext, SyncError, SyncResult, TargetRecord, computeChecksum, createSyncEngine, hasChanges };
108
+ export { BasicFieldTransformer, BasicSyncEngine, FieldMapping, IFieldTransformer, ISyncEngine, LookupConfig, SourceRecord, SyncConfig, SyncContext, SyncError, SyncResult, TargetRecord, computeChecksum, createSyncEngine, hasChanges };
109
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/sync-engine/index.ts"],"sourcesContent":[],"mappings":";;AAQA;AAWA;AAMA;AAYA;AAUiB,UAvCA,YAAA,CA+CP;EAGO,WAAA,EAAS,MAAA;EAOT,WAAA,EAAA,MAAY;EAMZ,WAAA,EAAA,QAAY,GAAA,WAEf,GAAA,QAAA,GAAA,UAAA,GAAA,UAAA;EAMG,mBAAW,CAAA,EAAA,MAAA;EAIZ,YAAA,CAAA,EAtEC,YAsED;EAAsB,aAAA,CAAA,EAAA,OAAA;EAAR,UAAA,EAAA,OAAA;EAMZ,YAAA,CAAA,EAAA,OAAA;;AAEL,UAxEI,YAAA,CAwEJ;EACR,YAAA,EAAA,MAAA;EAMO,WAAA,EAAA,MAAA;EACE,WAAA,EAAA,MAAA;;AAC0B,UA3EvB,UAAA,CA2EuB;EAKvB,EAAA,EAAA,MAAA;EAIJ,SAAA,EAAA,SAAA,GAAA,UAAsB,GAAW,eAAA;EAoDjC,YAAA,EAAA,MAAgB;EAGD,YAAA,EAAA,MAAA;EAIN,aAAA,EA1IL,YA0IK,EAAA;EAAsB,SAAA,EAAA,OAAA;EAAR,cAAA,EAAA,OAAA;EAuBlB,aAAA,EAAA,OAAA;EACJ,YAAA,CAAA,EA9JG,MA8JH,CAAA,MAAA,EAAA,OAAA,CAAA;;AAET,UA7JY,WAAA,CA6JZ;EA+DO,KAAA,EAAA,MAAA;EACE,MAAA,EA3NJ,UA2NI;EACiB,UAAA,EAAA;IAlGS,EAAA,EAAA,MAAA;IAAW,QAAA,EAAA,MAAA;IAmLnC,WAAA,CAAA,EAzSE,MAySc,CAAA,MAAe,EAAA,OAAA,CAAA;EAM/B,CAAA;AAahB;UAxTiB,UAAA;;;;;;;;UAQP;;UAGO,SAAA;;;;;;UAOA,YAAA;;QAET;;;UAIS,YAAA;;QAET;;;UAMS,WAAA;;;;gBAID,cAAc,QAAQ;;;;gCAMpB,wBACJ,yBACD,cACR;;;;yBAMO,wBACE;;YACiB;;;UAKd,iBAAA;;;cAIJ,qBAAA,YAAiC;;;cAoDjC,eAAA,YAA2B;;4BAGZ;gBAIN,cAAc,QAAQ;gCAuB1B,wBACJ,0BACA,cACT;yBA+DO,wBACE;;YACiB;;;;;;iBAiFf,gBAAA,eAA+B,oBAAoB;iBAMnD,eAAA,OAAsB;iBAatB,UAAA"}
@@ -143,4 +143,5 @@ function hasChanges(sourceChecksum, targetChecksum) {
143
143
  }
144
144
 
145
145
  //#endregion
146
- export { BasicFieldTransformer, BasicSyncEngine, computeChecksum, createSyncEngine, hasChanges };
146
+ export { BasicFieldTransformer, BasicSyncEngine, computeChecksum, createSyncEngine, hasChanges };
147
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["targetData: Record<string, unknown>","value: unknown","errors: SyncError[]","current: unknown"],"sources":["../../src/sync-engine/index.ts"],"sourcesContent":["/**\n * Sync Engine\n *\n * Core sync logic for the Integration Hub.\n */\n\n// ============ Types ============\n\nexport interface FieldMapping {\n sourceField: string;\n targetField: string;\n mappingType: 'DIRECT' | 'TRANSFORM' | 'LOOKUP' | 'CONSTANT' | 'COMPUTED';\n transformExpression?: string;\n lookupConfig?: LookupConfig;\n constantValue?: unknown;\n isRequired: boolean;\n defaultValue?: unknown;\n}\n\nexport interface LookupConfig {\n sourceObject: string;\n lookupField: string;\n returnField: string;\n}\n\nexport interface SyncConfig {\n id: string;\n direction: 'INBOUND' | 'OUTBOUND' | 'BIDIRECTIONAL';\n sourceObject: string;\n targetObject: string;\n fieldMappings: FieldMapping[];\n createNew: boolean;\n updateExisting: boolean;\n deleteRemoved: boolean;\n sourceFilter?: Record<string, unknown>;\n}\n\nexport interface SyncContext {\n runId: string;\n config: SyncConfig;\n connection: {\n id: string;\n authType: string;\n credentials?: Record<string, unknown>;\n };\n}\n\nexport interface SyncResult {\n success: boolean;\n recordsProcessed: number;\n recordsCreated: number;\n recordsUpdated: number;\n recordsDeleted: number;\n recordsFailed: number;\n recordsSkipped: number;\n errors: SyncError[];\n}\n\nexport interface SyncError {\n recordId?: string;\n field?: string;\n message: string;\n code: string;\n}\n\nexport interface SourceRecord {\n id: string;\n data: Record<string, unknown>;\n checksum?: string;\n}\n\nexport interface TargetRecord {\n id: string;\n data: Record<string, unknown>;\n checksum?: string;\n}\n\n// ============ Sync Engine Interface ============\n\nexport interface ISyncEngine {\n /**\n * Execute a sync operation.\n */\n sync(context: SyncContext): Promise<SyncResult>;\n\n /**\n * Transform a source record to target format.\n */\n transformRecord(\n sourceRecord: SourceRecord,\n mappings: FieldMapping[],\n context: SyncContext\n ): TargetRecord;\n\n /**\n * Validate a transformed record.\n */\n validateRecord(\n record: TargetRecord,\n mappings: FieldMapping[]\n ): { valid: boolean; errors: SyncError[] };\n}\n\n// ============ Field Transformer ============\n\nexport interface IFieldTransformer {\n transform(value: unknown, expression: string): unknown;\n}\n\nexport class BasicFieldTransformer implements IFieldTransformer {\n transform(value: unknown, expression: string): unknown {\n // Simple expression evaluation\n // In production, use a proper expression language\n try {\n if (expression.startsWith('uppercase')) {\n return typeof value === 'string' ? value.toUpperCase() : value;\n }\n if (expression.startsWith('lowercase')) {\n return typeof value === 'string' ? value.toLowerCase() : value;\n }\n if (expression.startsWith('trim')) {\n return typeof value === 'string' ? value.trim() : value;\n }\n if (expression.startsWith('default:')) {\n const defaultVal = expression.replace('default:', '');\n return value ?? JSON.parse(defaultVal);\n }\n if (expression.startsWith('concat:')) {\n const separator = expression.replace('concat:', '') || ' ';\n if (Array.isArray(value)) {\n return value.join(separator);\n }\n return value;\n }\n if (expression.startsWith('split:')) {\n const separator = expression.replace('split:', '') || ',';\n if (typeof value === 'string') {\n return value.split(separator);\n }\n return value;\n }\n if (expression.startsWith('number')) {\n return Number(value);\n }\n if (expression.startsWith('boolean')) {\n return Boolean(value);\n }\n if (expression.startsWith('string')) {\n return String(value);\n }\n\n // Return as-is if no transformation matches\n return value;\n } catch {\n return value;\n }\n }\n}\n\n// ============ Basic Sync Engine ============\n\nexport class BasicSyncEngine implements ISyncEngine {\n private transformer: IFieldTransformer;\n\n constructor(transformer?: IFieldTransformer) {\n this.transformer = transformer ?? new BasicFieldTransformer();\n }\n\n async sync(context: SyncContext): Promise<SyncResult> {\n const result: SyncResult = {\n success: true,\n recordsProcessed: 0,\n recordsCreated: 0,\n recordsUpdated: 0,\n recordsDeleted: 0,\n recordsFailed: 0,\n recordsSkipped: 0,\n errors: [],\n };\n\n // In a real implementation, this would:\n // 1. Fetch records from source\n // 2. Transform each record\n // 3. Validate each record\n // 4. Upsert to target\n // 5. Track sync records for deduplication\n\n return result;\n }\n\n transformRecord(\n sourceRecord: SourceRecord,\n mappings: FieldMapping[],\n _context: SyncContext\n ): TargetRecord {\n const targetData: Record<string, unknown> = {};\n\n for (const mapping of mappings) {\n let value: unknown;\n\n switch (mapping.mappingType) {\n case 'DIRECT':\n value = this.getNestedValue(sourceRecord.data, mapping.sourceField);\n break;\n\n case 'TRANSFORM':\n const sourceValue = this.getNestedValue(\n sourceRecord.data,\n mapping.sourceField\n );\n value = mapping.transformExpression\n ? this.transformer.transform(\n sourceValue,\n mapping.transformExpression\n )\n : sourceValue;\n break;\n\n case 'CONSTANT':\n value = mapping.constantValue;\n break;\n\n case 'LOOKUP':\n // In production, this would fetch from a lookup table\n value = this.getNestedValue(sourceRecord.data, mapping.sourceField);\n break;\n\n case 'COMPUTED':\n // In production, this would evaluate a computed expression\n value = mapping.transformExpression\n ? this.evaluateComputed(\n sourceRecord.data,\n mapping.transformExpression\n )\n : null;\n break;\n\n default:\n value = this.getNestedValue(sourceRecord.data, mapping.sourceField);\n }\n\n // Apply default value if needed\n if (value === undefined || value === null) {\n value = mapping.defaultValue;\n }\n\n // Set the target field\n this.setNestedValue(targetData, mapping.targetField, value);\n }\n\n return {\n id: sourceRecord.id,\n data: targetData,\n };\n }\n\n validateRecord(\n record: TargetRecord,\n mappings: FieldMapping[]\n ): { valid: boolean; errors: SyncError[] } {\n const errors: SyncError[] = [];\n\n for (const mapping of mappings) {\n if (mapping.isRequired) {\n const value = this.getNestedValue(record.data, mapping.targetField);\n if (value === undefined || value === null) {\n errors.push({\n recordId: record.id,\n field: mapping.targetField,\n message: `Required field ${mapping.targetField} is missing`,\n code: 'REQUIRED_FIELD_MISSING',\n });\n }\n }\n }\n\n return {\n valid: errors.length === 0,\n errors,\n };\n }\n\n private getNestedValue(obj: Record<string, unknown>, path: string): unknown {\n const parts = path.split('.');\n let current: unknown = obj;\n\n for (const part of parts) {\n if (current === null || current === undefined) {\n return undefined;\n }\n current = (current as Record<string, unknown>)[part];\n }\n\n return current;\n }\n\n private setNestedValue(\n obj: Record<string, unknown>,\n path: string,\n value: unknown\n ): void {\n const parts = path.split('.');\n let current = obj;\n\n for (let i = 0; i < parts.length - 1; i++) {\n const part = parts[i];\n if (part === undefined) continue;\n if (!(part in current)) {\n current[part] = {};\n }\n current = current[part] as Record<string, unknown>;\n }\n\n const lastPart = parts[parts.length - 1];\n if (lastPart !== undefined) {\n current[lastPart] = value;\n }\n }\n\n private evaluateComputed(\n data: Record<string, unknown>,\n expression: string\n ): unknown {\n // Simple computed field evaluation\n // In production, use a proper expression evaluator\n try {\n // Support simple field references like ${field.path}\n const result = expression.replace(/\\$\\{([^}]+)\\}/g, (_, path) => {\n const value = this.getNestedValue(data, path);\n return String(value ?? '');\n });\n return result;\n } catch {\n return null;\n }\n }\n}\n\n// ============ Factory ============\n\nexport function createSyncEngine(transformer?: IFieldTransformer): ISyncEngine {\n return new BasicSyncEngine(transformer);\n}\n\n// ============ Checksum Utilities ============\n\nexport function computeChecksum(data: Record<string, unknown>): string {\n // Simple checksum based on JSON serialization\n // In production, use a proper hash function\n const str = JSON.stringify(data, Object.keys(data).sort());\n let hash = 0;\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash = hash & hash;\n }\n return hash.toString(16);\n}\n\nexport function hasChanges(\n sourceChecksum: string | undefined,\n targetChecksum: string | undefined\n): boolean {\n if (!sourceChecksum || !targetChecksum) {\n return true;\n }\n return sourceChecksum !== targetChecksum;\n}\n"],"mappings":";AA6GA,IAAa,wBAAb,MAAgE;CAC9D,UAAU,OAAgB,YAA6B;AAGrD,MAAI;AACF,OAAI,WAAW,WAAW,YAAY,CACpC,QAAO,OAAO,UAAU,WAAW,MAAM,aAAa,GAAG;AAE3D,OAAI,WAAW,WAAW,YAAY,CACpC,QAAO,OAAO,UAAU,WAAW,MAAM,aAAa,GAAG;AAE3D,OAAI,WAAW,WAAW,OAAO,CAC/B,QAAO,OAAO,UAAU,WAAW,MAAM,MAAM,GAAG;AAEpD,OAAI,WAAW,WAAW,WAAW,EAAE;IACrC,MAAM,aAAa,WAAW,QAAQ,YAAY,GAAG;AACrD,WAAO,SAAS,KAAK,MAAM,WAAW;;AAExC,OAAI,WAAW,WAAW,UAAU,EAAE;IACpC,MAAM,YAAY,WAAW,QAAQ,WAAW,GAAG,IAAI;AACvD,QAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,MAAM,KAAK,UAAU;AAE9B,WAAO;;AAET,OAAI,WAAW,WAAW,SAAS,EAAE;IACnC,MAAM,YAAY,WAAW,QAAQ,UAAU,GA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AM,OAAO,KAAK,KAAK,CAAC,MAAM,CAAC;CAC1D,IAAI,OAAO;AACX,MAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;EACnC,MAAM,OAAO,IAAI,WAAW,EAAE;AAC9B,UAAQ,QAAQ,KAAK,OAAO;AAC5B,SAAO,OAAO;;AAEhB,QAAO,KAAK,SAAS,GAAG;;AAG1B,SAAgB,WACd,gBACA,gBACS;AACT,KAAI,CAAC,kBAAkB,CAAC,eACtB,QAAO;AAET,QAAO,mBAAmB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/example.integration-hub",
3
- "version": "0.0.0-canary-20251217080011",
3
+ "version": "0.0.0-canary-20251219202229",
4
4
  "description": "Integration Hub example with sync engine and field mappings for ContractSpec",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -18,20 +18,20 @@
18
18
  "lint:check": "eslint src"
19
19
  },
20
20
  "dependencies": {
21
- "@lssm/lib.schema": "0.0.0-canary-20251217080011",
22
- "@lssm/lib.contracts": "0.0.0-canary-20251217080011",
23
- "@lssm/lib.bus": "0.0.0-canary-20251217080011",
24
- "@lssm/lib.identity-rbac": "0.0.0-canary-20251217080011",
25
- "@lssm/lib.files": "0.0.0-canary-20251217080011",
26
- "@lssm/lib.feature-flags": "0.0.0-canary-20251217080011",
27
- "@lssm/lib.jobs": "0.0.0-canary-20251217080011",
28
- "@lssm/module.audit-trail": "0.0.0-canary-20251217080011",
29
- "@lssm/module.notifications": "0.0.0-canary-20251217080011",
21
+ "@lssm/lib.schema": "0.0.0-canary-20251219202229",
22
+ "@lssm/lib.contracts": "0.0.0-canary-20251219202229",
23
+ "@lssm/lib.bus": "0.0.0-canary-20251219202229",
24
+ "@lssm/lib.identity-rbac": "0.0.0-canary-20251219202229",
25
+ "@lssm/lib.files": "0.0.0-canary-20251219202229",
26
+ "@lssm/lib.feature-flags": "0.0.0-canary-20251219202229",
27
+ "@lssm/lib.jobs": "0.0.0-canary-20251219202229",
28
+ "@lssm/module.audit-trail": "0.0.0-canary-20251219202229",
29
+ "@lssm/module.notifications": "0.0.0-canary-20251219202229",
30
30
  "zod": "^4.1.13"
31
31
  },
32
32
  "devDependencies": {
33
- "@lssm/tool.typescript": "0.0.0-canary-20251217080011",
34
- "@lssm/tool.tsdown": "0.0.0-canary-20251217080011",
33
+ "@lssm/tool.typescript": "0.0.0-canary-20251219202229",
34
+ "@lssm/tool.tsdown": "0.0.0-canary-20251219202229",
35
35
  "typescript": "^5.9.3"
36
36
  },
37
37
  "exports": {
@@ -91,5 +91,6 @@
91
91
  "./sync/sync.schema": "./dist/sync/sync.schema.js",
92
92
  "./*": "./*"
93
93
  }
94
- }
94
+ },
95
+ "license": "MIT"
95
96
  }
@@ -1,16 +0,0 @@
1
- import { registerDocBlocks } from "./registry.js";
2
-
3
- //#region ../../libs/contracts/dist/docs/PUBLISHING.docblock.js
4
- const PUBLISHING_DocBlocks = [{
5
- id: "docs.PUBLISHING",
6
- title: "Publishing ContractSpec Libraries",
7
- summary: "This guide describes how we release the ContractSpec libraries to npm. We use a dual-track release system: **Stable** (manual) and **Canary** (automatic).",
8
- kind: "reference",
9
- visibility: "public",
10
- route: "/docs/PUBLISHING",
11
- tags: ["PUBLISHING"],
12
- body: "# Publishing ContractSpec Libraries\n\nThis guide describes how we release the ContractSpec libraries to npm. We use a dual-track release system: **Stable** (manual) and **Canary** (automatic).\n\n## Release Tracks\n\n| Track | Branch | npm Tag | Frequency | Versioning | Use Case |\n|-------|--------|---------|-----------|------------|----------|\n| **Stable** | `release` | `latest` | Manual | SemVer (e.g., `1.7.4`) | Production, external users |\n| **Canary** | `main` | `canary` | Every Push | Snapshot (e.g., `1.7.4-canary...`) | Dev, internal testing |\n\n## Prerequisites\n\n- ✅ `NPM_TOKEN` secret is configured in GitHub (owner or automation token with _publish_ scope).\n- ✅ `GITHUB_TOKEN` (built-in) has permissions to create PRs (enabled by default in new repos).\n- ✅ For stable releases: `release` branch exists and is protected.\n\n## Canary Workflow (Automatic)\n\nEvery commit pushed to `main` triggers the `.github/workflows/publish-canary.yml` workflow.\n\n1. **Trigger**: Push to `main`.\n2. **Versioning**: Runs `changeset version --snapshot canary` to generate a temporary snapshot version.\n3. **Publish**: Packages are published to npm with the `canary` tag using `changeset publish --tag canary`.\n\n### Consuming Canary Builds\n\nTo install the latest bleeding-edge version:\n\n```bash\nnpm install @lssm/lib.contracts@canary\n# or\nbun add @lssm/lib.contracts@canary\n```\n\n## Stable Release Workflow (Manual)\n\nStable releases are managed via the `release` branch using the standard [Changesets Action](https://github.com/changesets/action).\n\n1. **Develop on `main`**: Create features and fixes.\n2. **Add Changesets**: Run `bun changeset` to document changes and impact (major/minor/patch).\n3. **Merge to `release`**: When ready to ship, open a PR from `main` to `release` or merge manually.\n4. **\"Version Packages\" PR**:\n - The GitHub Action detects new changesets and automatically creates a Pull Request titled **\"Version Packages\"**.\n - This PR contains the version bumps and updated `CHANGELOG.md` files.\n5. **Merge & Publish**:\n - Review and merge the \"Version Packages\" PR.\n - The Action runs again, detects the versions have been bumped, builds the libraries, and publishes them to npm with the `latest` tag.\n\n### Publishing Steps\n\n1. Ensure all changesets are present on `main`.\n2. Merge `main` into `release`:\n ```bash\n git checkout release\n git pull origin release\n git merge main\n git push origin release\n ```\n3. Go to GitHub Pull Requests. You will see a **\"Version Packages\"** PR created by the bot.\n4. Merge that PR.\n5. The release is now live on npm!\n\n## Manual Verification (Optional)\n\nBefore publishing a new version you can run:\n\n```bash\nbun run build:not-apps\nnpx npm-packlist --json packages/libs/contracts\n```\n\n## Rollback\n\nIf a publish fails mid-way, re-run the workflow once the issue is fixed. Already published packages are skipped automatically. Use `npm deprecate <package>@<version>` if we need to warn consumers about a broken release.\n"
13
- }];
14
- registerDocBlocks(PUBLISHING_DocBlocks);
15
-
16
- //#endregion