@lssm/module.audit-trail 0.0.0-canary-20251217083314 → 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 (156) hide show
  1. package/LICENSE +21 -0
  2. package/dist/audit-trail.feature.d.ts +2 -1
  3. package/dist/audit-trail.feature.d.ts.map +1 -0
  4. package/dist/audit-trail.feature.js +2 -1
  5. package/dist/audit-trail.feature.js.map +1 -0
  6. package/dist/contracts/index.d.ts +2 -1
  7. package/dist/contracts/index.d.ts.map +1 -0
  8. package/dist/contracts/index.js +57 -58
  9. package/dist/contracts/index.js.map +1 -0
  10. package/dist/entities/index.d.ts +2 -1
  11. package/dist/entities/index.d.ts.map +1 -0
  12. package/dist/entities/index.js +44 -44
  13. package/dist/entities/index.js.map +1 -0
  14. package/dist/libs/contracts/dist/capabilities/openbanking.js +2 -1
  15. package/dist/libs/contracts/dist/capabilities/openbanking.js.map +1 -0
  16. package/dist/libs/contracts/dist/contract-registry/schemas.js +2 -1
  17. package/dist/libs/contracts/dist/contract-registry/schemas.js.map +1 -0
  18. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +2 -1
  19. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +1 -0
  20. package/dist/libs/contracts/dist/docs/index.js +2 -6
  21. package/dist/libs/contracts/dist/docs/meta.docs.js +30 -0
  22. package/dist/libs/contracts/dist/docs/meta.docs.js.map +1 -0
  23. package/dist/libs/contracts/dist/docs/presentations.js +2 -1
  24. package/dist/libs/contracts/dist/docs/presentations.js.map +1 -0
  25. package/dist/libs/contracts/dist/docs/registry.js +2 -1
  26. package/dist/libs/contracts/dist/docs/registry.js.map +1 -0
  27. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +2 -1
  28. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +1 -0
  29. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +2 -1
  30. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +1 -0
  31. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +2 -1
  32. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +1 -0
  33. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +2 -1
  34. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +1 -0
  35. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +2 -1
  36. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +1 -0
  37. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +2 -1
  38. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +1 -0
  39. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +2 -1
  40. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +1 -0
  41. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +2 -1
  42. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +1 -0
  43. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +2 -1
  44. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +1 -0
  45. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +2 -1
  46. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +1 -0
  47. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +2 -1
  48. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +1 -0
  49. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +2 -1
  50. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +1 -0
  51. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +2 -1
  52. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +1 -0
  53. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +2 -1
  54. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +1 -0
  55. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +2 -1
  56. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +1 -0
  57. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +2 -1
  58. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +1 -0
  59. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +2 -1
  60. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +1 -0
  61. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +2 -1
  62. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +1 -0
  63. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +2 -1
  64. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +1 -0
  65. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +2 -1
  66. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +1 -0
  67. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +97 -0
  68. package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +1 -0
  69. package/dist/libs/contracts/dist/index.js +3 -2
  70. package/dist/libs/contracts/dist/integrations/contracts.js +65 -66
  71. package/dist/libs/contracts/dist/integrations/contracts.js.map +1 -0
  72. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +31 -32
  73. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +1 -0
  74. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +18 -19
  75. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +1 -0
  76. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +32 -33
  77. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +1 -0
  78. package/dist/libs/contracts/dist/integrations/openbanking/models.js +60 -61
  79. package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +1 -0
  80. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +2 -1
  81. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +1 -0
  82. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +2 -1
  83. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +1 -0
  84. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +2 -1
  85. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +1 -0
  86. package/dist/libs/contracts/dist/integrations/providers/gmail.js +2 -1
  87. package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +1 -0
  88. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +2 -1
  89. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +1 -0
  90. package/dist/libs/contracts/dist/integrations/providers/mistral.js +2 -1
  91. package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +1 -0
  92. package/dist/libs/contracts/dist/integrations/providers/postmark.js +2 -1
  93. package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +1 -0
  94. package/dist/libs/contracts/dist/integrations/providers/powens.js +2 -1
  95. package/dist/libs/contracts/dist/integrations/providers/powens.js.map +1 -0
  96. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +2 -1
  97. package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +1 -0
  98. package/dist/libs/contracts/dist/integrations/providers/stripe.js +2 -1
  99. package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +1 -0
  100. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +2 -1
  101. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +1 -0
  102. package/dist/libs/contracts/dist/knowledge/contracts.js +44 -45
  103. package/dist/libs/contracts/dist/knowledge/contracts.js.map +1 -0
  104. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +2 -1
  105. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js.map +1 -0
  106. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +2 -1
  107. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js.map +1 -0
  108. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +2 -1
  109. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js.map +1 -0
  110. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +2 -1
  111. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js.map +1 -0
  112. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +2 -1
  113. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js.map +1 -0
  114. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +2 -1
  115. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js.map +1 -0
  116. package/dist/libs/contracts/dist/llm/exporters.js +2 -1
  117. package/dist/libs/contracts/dist/llm/exporters.js.map +1 -0
  118. package/dist/libs/contracts/dist/onboarding-base.js +22 -23
  119. package/dist/libs/contracts/dist/onboarding-base.js.map +1 -0
  120. package/dist/libs/contracts/dist/ownership.js +4 -2
  121. package/dist/libs/contracts/dist/ownership.js.map +1 -0
  122. package/dist/libs/contracts/dist/presentations.v2.js +2 -1
  123. package/dist/libs/contracts/dist/presentations.v2.js.map +1 -0
  124. package/dist/libs/contracts/dist/regenerator/service.js +2 -1
  125. package/dist/libs/contracts/dist/regenerator/service.js.map +1 -0
  126. package/dist/libs/contracts/dist/schema/dist/index.js +3874 -6
  127. package/dist/libs/contracts/dist/schema/dist/index.js.map +1 -0
  128. package/dist/libs/contracts/dist/spec.js +2 -1
  129. package/dist/libs/contracts/dist/spec.js.map +1 -0
  130. package/dist/libs/schema/dist/index.js +4896 -6
  131. package/dist/libs/schema/dist/index.js.map +1 -0
  132. package/dist/storage/index.d.ts +2 -1
  133. package/dist/storage/index.d.ts.map +1 -0
  134. package/dist/storage/index.js +2 -1
  135. package/dist/storage/index.js.map +1 -0
  136. package/package.json +8 -7
  137. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  138. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  139. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  140. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  141. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  142. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  143. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  144. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
  145. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  146. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -39
  147. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  148. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  149. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  150. package/dist/libs/schema/dist/EnumType.js +0 -56
  151. package/dist/libs/schema/dist/FieldType.js +0 -49
  152. package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -236
  153. package/dist/libs/schema/dist/SchemaModel.js +0 -3
  154. package/dist/libs/schema/dist/entity/defineEntity.js +0 -230
  155. package/dist/libs/schema/dist/entity/index.js +0 -2
  156. package/dist/libs/schema/dist/entity/types.js +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Chaman Ventures, SASU
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -8,4 +8,5 @@ import { FeatureModuleSpec } from "@lssm/lib.contracts";
8
8
  */
9
9
  declare const AuditTrailFeature: FeatureModuleSpec;
10
10
  //#endregion
11
- export { AuditTrailFeature };
11
+ export { AuditTrailFeature };
12
+ //# sourceMappingURL=audit-trail.feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-trail.feature.d.ts","names":[],"sources":["../src/audit-trail.feature.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAWa,mBAAmB"}
@@ -54,4 +54,5 @@ const AuditTrailFeature = {
54
54
  };
55
55
 
56
56
  //#endregion
57
- export { AuditTrailFeature };
57
+ export { AuditTrailFeature };
58
+ //# sourceMappingURL=audit-trail.feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-trail.feature.js","names":["AuditTrailFeature: FeatureModuleSpec"],"sources":["../src/audit-trail.feature.ts"],"sourcesContent":["/**\n * Audit Trail Feature Module Specification\n *\n * Defines the feature module for audit logging and compliance.\n */\nimport type { FeatureModuleSpec } from '@lssm/lib.contracts';\n\n/**\n * Audit Trail feature module that bundles audit log querying,\n * export, and statistics capabilities.\n */\nexport const AuditTrailFeature: FeatureModuleSpec = {\n meta: {\n key: 'audit-trail',\n title: 'Audit Trail',\n description: 'Audit logging, querying, export, and compliance reporting',\n domain: 'platform',\n owners: ['@platform.audit-trail'],\n tags: ['audit', 'compliance', 'logging', 'security'],\n stability: 'stable',\n },\n\n // All contract operations included in this feature\n operations: [\n { name: 'audit.logs.export', version: 1 },\n { name: 'audit.logs.query', version: 1 },\n { name: 'audit.logs.get', version: 1 },\n { name: 'audit.trace.get', version: 1 },\n { name: 'audit.stats', version: 1 },\n ],\n\n // No events for this feature - it consumes events, doesn't emit them\n events: [],\n\n // No presentations for this module feature\n presentations: [],\n opToPresentation: [],\n presentationsTargets: [],\n\n // Capability definitions\n capabilities: {\n provides: [{ key: 'audit-trail', version: 1 }],\n requires: [],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,oBAAuC;CAClD,MAAM;EACJ,KAAK;EACL,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,wBAAwB;EACjC,MAAM;GAAC;GAAS;GAAc;GAAW;GAAW;EACpD,WAAW;EACZ;CAGD,YAAY;EACV;GAAE,MAAM;GAAqB,SAAS;GAAG;EACzC;GAAE,MAAM;GAAoB,SAAS;GAAG;EACxC;GAAE,MAAM;GAAkB,SAAS;GAAG;EACtC;GAAE,MAAM;GAAmB,SAAS;GAAG;EACvC;GAAE,MAAM;GAAe,SAAS;GAAG;EACpC;CAGD,QAAQ,EAAE;CAGV,eAAe,EAAE;CACjB,kBAAkB,EAAE;CACpB,sBAAsB,EAAE;CAGxB,cAAc;EACZ,UAAU,CAAC;GAAE,KAAK;GAAe,SAAS;GAAG,CAAC;EAC9C,UAAU,EAAE;EACb;CACF"}
@@ -579,4 +579,5 @@ declare const GetAuditStatsContract: _lssm_lib_contracts0.ContractSpec<_lssm_lib
579
579
  };
580
580
  }>, undefined>;
581
581
  //#endregion
582
- export { AuditExportInputModel, AuditExportOutputModel, AuditLogModel, AuditQueryInputModel, AuditQueryOutputModel, AuditStatsInputModel, AuditStatsOutputModel, ExportAuditLogsContract, ExportFormatEnum, ExportStatusEnum, GetAuditLogContract, GetAuditStatsContract, GetAuditTraceContract, QueryAuditLogsContract };
582
+ export { AuditExportInputModel, AuditExportOutputModel, AuditLogModel, AuditQueryInputModel, AuditQueryOutputModel, AuditStatsInputModel, AuditStatsOutputModel, ExportAuditLogsContract, ExportFormatEnum, ExportStatusEnum, GetAuditLogContract, GetAuditStatsContract, GetAuditTraceContract, QueryAuditLogsContract };
583
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/contracts/index.ts"],"sourcesContent":[],"mappings":";;;;cAWa,iCAAa;;UAmBxB,iBAAA,CAAA;;EAnBW,CAAA;EAmBX,SAAA,EAAA;;;;;;;;;;;;;;;;;;gBAnBwB,IAAA;EAAA,CAAA;EAqBb,UAAA,EAAA;IAuBX,IAAA,6BAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;qCAvB+B,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAyBpB,CAAA;EAQX,OAAA,EAAA;;;;;;;;;;;;;;;;;cAjCW,wCAAoB;;UAuB/B,iBAAA,CAAA;;;EAEgC,OAAA,EAAA;IAUrB,IAAA,6BAIX,CAAA,MAJ2B,EAAA,MAAA,CAAA;IAMhB,UAAA,EAAA,IAAA;EAcX,CAAA;;;;;;;gBAdgC,IAAA;EAAA,CAAA;EAgBrB,KAAA,EAAA;IAOA,IAAA,6BAQX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;qCARiC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAUtB,CAAA;EAQX,IAAA,EAAA;;;;;qCAR+B,KAAA,EAA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OW,6CAAsB,+BAAA;;UAkBjC,iBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAlBiC,iBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuBtB,0CAAmB,+BAAA;;UAuB9B,iBAAA,CAAA;;;;;UAvB8B,iBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BnB,4CAAqB,+BAAA;;UA4BhC,iBAAA,CAAA;;;;;;;cA5BgC,iBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCrB,8CAAuB,+BAAA;;UAkBlC,iBAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;UAlBkC,iBAAA,CAAA;;;;;;;;;;;;;;;cAuBvB,4CAAqB,+BAAA;;UAkBhC,iBAAA,CAAA;;;;;;;;;;;;;UAlBgC,iBAAA,CAAA"}
@@ -1,123 +1,121 @@
1
- import { defineEnum } from "../libs/schema/dist/EnumType.js";
2
- import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
3
- import "../libs/schema/dist/index.js";
4
- import { defineSchemaModel } from "../libs/contracts/dist/schema/dist/SchemaModel.js";
1
+ import { E5, N5 } from "../libs/schema/dist/index.js";
2
+ import { K5 } from "../libs/contracts/dist/schema/dist/index.js";
5
3
  import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
6
4
  import "../libs/contracts/dist/index.js";
7
5
 
8
6
  //#region src/contracts/index.ts
9
7
  const OWNERS = ["platform.audit-trail"];
10
- const AuditLogModel = defineSchemaModel({
8
+ const AuditLogModel = K5({
11
9
  name: "AuditLog",
12
10
  description: "Detailed audit log entry",
13
11
  fields: {
14
12
  id: {
15
- type: ScalarTypeEnum.String_unsecure(),
13
+ type: E5.String_unsecure(),
16
14
  isOptional: false
17
15
  },
18
16
  eventName: {
19
- type: ScalarTypeEnum.String_unsecure(),
17
+ type: E5.String_unsecure(),
20
18
  isOptional: false
21
19
  },
22
20
  eventVersion: {
23
- type: ScalarTypeEnum.Int_unsecure(),
21
+ type: E5.Int_unsecure(),
24
22
  isOptional: false
25
23
  },
26
24
  payload: {
27
- type: ScalarTypeEnum.JSONObject(),
25
+ type: E5.JSONObject(),
28
26
  isOptional: false
29
27
  },
30
28
  actorId: {
31
- type: ScalarTypeEnum.String_unsecure(),
29
+ type: E5.String_unsecure(),
32
30
  isOptional: true
33
31
  },
34
32
  actorType: {
35
- type: ScalarTypeEnum.String_unsecure(),
33
+ type: E5.String_unsecure(),
36
34
  isOptional: true
37
35
  },
38
36
  actorEmail: {
39
- type: ScalarTypeEnum.EmailAddress(),
37
+ type: E5.EmailAddress(),
40
38
  isOptional: true
41
39
  },
42
40
  targetId: {
43
- type: ScalarTypeEnum.String_unsecure(),
41
+ type: E5.String_unsecure(),
44
42
  isOptional: true
45
43
  },
46
44
  targetType: {
47
- type: ScalarTypeEnum.String_unsecure(),
45
+ type: E5.String_unsecure(),
48
46
  isOptional: true
49
47
  },
50
48
  orgId: {
51
- type: ScalarTypeEnum.String_unsecure(),
49
+ type: E5.String_unsecure(),
52
50
  isOptional: true
53
51
  },
54
52
  traceId: {
55
- type: ScalarTypeEnum.String_unsecure(),
53
+ type: E5.String_unsecure(),
56
54
  isOptional: true
57
55
  },
58
56
  clientIp: {
59
- type: ScalarTypeEnum.String_unsecure(),
57
+ type: E5.String_unsecure(),
60
58
  isOptional: true
61
59
  },
62
60
  occurredAt: {
63
- type: ScalarTypeEnum.DateTime(),
61
+ type: E5.DateTime(),
64
62
  isOptional: false
65
63
  },
66
64
  recordedAt: {
67
- type: ScalarTypeEnum.DateTime(),
65
+ type: E5.DateTime(),
68
66
  isOptional: false
69
67
  }
70
68
  }
71
69
  });
72
- const AuditQueryInputModel = defineSchemaModel({
70
+ const AuditQueryInputModel = K5({
73
71
  name: "AuditQueryInput",
74
72
  description: "Input for querying audit logs",
75
73
  fields: {
76
74
  eventName: {
77
- type: ScalarTypeEnum.String_unsecure(),
75
+ type: E5.String_unsecure(),
78
76
  isOptional: true
79
77
  },
80
78
  actorId: {
81
- type: ScalarTypeEnum.String_unsecure(),
79
+ type: E5.String_unsecure(),
82
80
  isOptional: true
83
81
  },
84
82
  targetId: {
85
- type: ScalarTypeEnum.String_unsecure(),
83
+ type: E5.String_unsecure(),
86
84
  isOptional: true
87
85
  },
88
86
  targetType: {
89
- type: ScalarTypeEnum.String_unsecure(),
87
+ type: E5.String_unsecure(),
90
88
  isOptional: true
91
89
  },
92
90
  orgId: {
93
- type: ScalarTypeEnum.String_unsecure(),
91
+ type: E5.String_unsecure(),
94
92
  isOptional: true
95
93
  },
96
94
  traceId: {
97
- type: ScalarTypeEnum.String_unsecure(),
95
+ type: E5.String_unsecure(),
98
96
  isOptional: true
99
97
  },
100
98
  from: {
101
- type: ScalarTypeEnum.DateTime(),
99
+ type: E5.DateTime(),
102
100
  isOptional: true
103
101
  },
104
102
  to: {
105
- type: ScalarTypeEnum.DateTime(),
103
+ type: E5.DateTime(),
106
104
  isOptional: true
107
105
  },
108
106
  limit: {
109
- type: ScalarTypeEnum.Int_unsecure(),
107
+ type: E5.Int_unsecure(),
110
108
  isOptional: true,
111
109
  defaultValue: 100
112
110
  },
113
111
  offset: {
114
- type: ScalarTypeEnum.Int_unsecure(),
112
+ type: E5.Int_unsecure(),
115
113
  isOptional: true,
116
114
  defaultValue: 0
117
115
  }
118
116
  }
119
117
  });
120
- const AuditQueryOutputModel = defineSchemaModel({
118
+ const AuditQueryOutputModel = K5({
121
119
  name: "AuditQueryOutput",
122
120
  description: "Output from querying audit logs",
123
121
  fields: {
@@ -127,34 +125,34 @@ const AuditQueryOutputModel = defineSchemaModel({
127
125
  isOptional: false
128
126
  },
129
127
  total: {
130
- type: ScalarTypeEnum.Int_unsecure(),
128
+ type: E5.Int_unsecure(),
131
129
  isOptional: false
132
130
  },
133
131
  hasMore: {
134
- type: ScalarTypeEnum.Boolean(),
132
+ type: E5.Boolean(),
135
133
  isOptional: false
136
134
  }
137
135
  }
138
136
  });
139
- const ExportFormatEnum = defineEnum("ExportFormat", [
137
+ const ExportFormatEnum = N5("ExportFormat", [
140
138
  "json",
141
139
  "csv",
142
140
  "parquet"
143
141
  ]);
144
- const AuditExportInputModel = defineSchemaModel({
142
+ const AuditExportInputModel = K5({
145
143
  name: "AuditExportInput",
146
144
  description: "Input for exporting audit logs",
147
145
  fields: {
148
146
  orgId: {
149
- type: ScalarTypeEnum.String_unsecure(),
147
+ type: E5.String_unsecure(),
150
148
  isOptional: false
151
149
  },
152
150
  from: {
153
- type: ScalarTypeEnum.DateTime(),
151
+ type: E5.DateTime(),
154
152
  isOptional: false
155
153
  },
156
154
  to: {
157
- type: ScalarTypeEnum.DateTime(),
155
+ type: E5.DateTime(),
158
156
  isOptional: false
159
157
  },
160
158
  format: {
@@ -163,24 +161,24 @@ const AuditExportInputModel = defineSchemaModel({
163
161
  defaultValue: "json"
164
162
  },
165
163
  eventNames: {
166
- type: ScalarTypeEnum.String_unsecure(),
164
+ type: E5.String_unsecure(),
167
165
  isArray: true,
168
166
  isOptional: true
169
167
  }
170
168
  }
171
169
  });
172
- const ExportStatusEnum = defineEnum("ExportStatus", [
170
+ const ExportStatusEnum = N5("ExportStatus", [
173
171
  "pending",
174
172
  "processing",
175
173
  "completed",
176
174
  "failed"
177
175
  ]);
178
- const AuditExportOutputModel = defineSchemaModel({
176
+ const AuditExportOutputModel = K5({
179
177
  name: "AuditExportOutput",
180
178
  description: "Output from initiating an audit export",
181
179
  fields: {
182
180
  exportId: {
183
- type: ScalarTypeEnum.String_unsecure(),
181
+ type: E5.String_unsecure(),
184
182
  isOptional: false
185
183
  },
186
184
  status: {
@@ -188,47 +186,47 @@ const AuditExportOutputModel = defineSchemaModel({
188
186
  isOptional: false
189
187
  },
190
188
  downloadUrl: {
191
- type: ScalarTypeEnum.URL(),
189
+ type: E5.URL(),
192
190
  isOptional: true
193
191
  }
194
192
  }
195
193
  });
196
- const AuditStatsInputModel = defineSchemaModel({
194
+ const AuditStatsInputModel = K5({
197
195
  name: "AuditStatsInput",
198
196
  description: "Input for getting audit statistics",
199
197
  fields: {
200
198
  orgId: {
201
- type: ScalarTypeEnum.String_unsecure(),
199
+ type: E5.String_unsecure(),
202
200
  isOptional: true
203
201
  },
204
202
  from: {
205
- type: ScalarTypeEnum.DateTime(),
203
+ type: E5.DateTime(),
206
204
  isOptional: true
207
205
  },
208
206
  to: {
209
- type: ScalarTypeEnum.DateTime(),
207
+ type: E5.DateTime(),
210
208
  isOptional: true
211
209
  }
212
210
  }
213
211
  });
214
- const AuditStatsOutputModel = defineSchemaModel({
212
+ const AuditStatsOutputModel = K5({
215
213
  name: "AuditStatsOutput",
216
214
  description: "Audit log statistics",
217
215
  fields: {
218
216
  totalLogs: {
219
- type: ScalarTypeEnum.Int_unsecure(),
217
+ type: E5.Int_unsecure(),
220
218
  isOptional: false
221
219
  },
222
220
  uniqueActors: {
223
- type: ScalarTypeEnum.Int_unsecure(),
221
+ type: E5.Int_unsecure(),
224
222
  isOptional: false
225
223
  },
226
224
  uniqueTargets: {
227
- type: ScalarTypeEnum.Int_unsecure(),
225
+ type: E5.Int_unsecure(),
228
226
  isOptional: false
229
227
  },
230
228
  eventCounts: {
231
- type: ScalarTypeEnum.JSONObject(),
229
+ type: E5.JSONObject(),
232
230
  isOptional: false
233
231
  }
234
232
  }
@@ -276,10 +274,10 @@ const GetAuditLogContract = defineQuery({
276
274
  context: "Log detail view."
277
275
  },
278
276
  io: {
279
- input: defineSchemaModel({
277
+ input: K5({
280
278
  name: "GetAuditLogInput",
281
279
  fields: { logId: {
282
- type: ScalarTypeEnum.String_unsecure(),
280
+ type: E5.String_unsecure(),
283
281
  isOptional: false
284
282
  } }
285
283
  }),
@@ -306,14 +304,14 @@ const GetAuditTraceContract = defineQuery({
306
304
  context: "Request tracing, debugging."
307
305
  },
308
306
  io: {
309
- input: defineSchemaModel({
307
+ input: K5({
310
308
  name: "GetAuditTraceInput",
311
309
  fields: { traceId: {
312
- type: ScalarTypeEnum.String_unsecure(),
310
+ type: E5.String_unsecure(),
313
311
  isOptional: false
314
312
  } }
315
313
  }),
316
- output: defineSchemaModel({
314
+ output: K5({
317
315
  name: "GetAuditTraceOutput",
318
316
  fields: { logs: {
319
317
  type: AuditLogModel,
@@ -370,4 +368,5 @@ const GetAuditStatsContract = defineQuery({
370
368
  });
371
369
 
372
370
  //#endregion
373
- export { AuditExportInputModel, AuditExportOutputModel, AuditLogModel, AuditQueryInputModel, AuditQueryOutputModel, AuditStatsInputModel, AuditStatsOutputModel, ExportAuditLogsContract, ExportFormatEnum, ExportStatusEnum, GetAuditLogContract, GetAuditStatsContract, GetAuditTraceContract, QueryAuditLogsContract };
371
+ export { AuditExportInputModel, AuditExportOutputModel, AuditLogModel, AuditQueryInputModel, AuditQueryOutputModel, AuditStatsInputModel, AuditStatsOutputModel, ExportAuditLogsContract, ExportFormatEnum, ExportStatusEnum, GetAuditLogContract, GetAuditStatsContract, GetAuditTraceContract, QueryAuditLogsContract };
372
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["defineSchemaModel","ScalarTypeEnum","defineEnum"],"sources":["../../src/contracts/index.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n defineSchemaModel,\n} from '@lssm/lib.contracts';\nimport { ScalarTypeEnum, defineEnum } from '@lssm/lib.schema';\n\nconst OWNERS = ['platform.audit-trail'] as const;\n\n// ============ Schemas ============\n\nexport const AuditLogModel = defineSchemaModel({\n name: 'AuditLog',\n description: 'Detailed audit log entry',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n eventName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n eventVersion: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n payload: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n actorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n actorType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n actorEmail: { type: ScalarTypeEnum.EmailAddress(), isOptional: true },\n targetId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n targetType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n clientIp: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n occurredAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n recordedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const AuditQueryInputModel = defineSchemaModel({\n name: 'AuditQueryInput',\n description: 'Input for querying audit logs',\n fields: {\n eventName: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n actorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n targetId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n targetType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n from: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n to: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 100,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n});\n\nexport const AuditQueryOutputModel = defineSchemaModel({\n name: 'AuditQueryOutput',\n description: 'Output from querying audit logs',\n fields: {\n logs: { type: AuditLogModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n});\n\nexport const ExportFormatEnum = defineEnum('ExportFormat', [\n 'json',\n 'csv',\n 'parquet',\n]);\n\nexport const AuditExportInputModel = defineSchemaModel({\n name: 'AuditExportInput',\n description: 'Input for exporting audit logs',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n from: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n to: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n format: { type: ExportFormatEnum, isOptional: true, defaultValue: 'json' },\n eventNames: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: true,\n },\n },\n});\n\nexport const ExportStatusEnum = defineEnum('ExportStatus', [\n 'pending',\n 'processing',\n 'completed',\n 'failed',\n]);\n\nexport const AuditExportOutputModel = defineSchemaModel({\n name: 'AuditExportOutput',\n description: 'Output from initiating an audit export',\n fields: {\n exportId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ExportStatusEnum, isOptional: false },\n downloadUrl: { type: ScalarTypeEnum.URL(), isOptional: true },\n },\n});\n\nexport const AuditStatsInputModel = defineSchemaModel({\n name: 'AuditStatsInput',\n description: 'Input for getting audit statistics',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n from: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n to: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n\nexport const AuditStatsOutputModel = defineSchemaModel({\n name: 'AuditStatsOutput',\n description: 'Audit log statistics',\n fields: {\n totalLogs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n uniqueActors: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n uniqueTargets: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n eventCounts: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n },\n});\n\n// ============ Contracts ============\n\n/**\n * Query audit logs.\n */\nexport const QueryAuditLogsContract = defineQuery({\n meta: {\n name: 'audit.logs.query',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['audit', 'logs', 'query'],\n description: 'Query audit logs with filters.',\n goal: 'Enable searching and filtering of audit history.',\n context: 'Admin dashboard, compliance reporting, debugging.',\n },\n io: {\n input: AuditQueryInputModel,\n output: AuditQueryOutputModel,\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Get audit log by ID.\n */\nexport const GetAuditLogContract = defineQuery({\n meta: {\n name: 'audit.logs.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['audit', 'logs', 'get'],\n description: 'Get a specific audit log by ID.',\n goal: 'View detailed audit log entry.',\n context: 'Log detail view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetAuditLogInput',\n fields: {\n logId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: AuditLogModel,\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Get audit logs by trace ID.\n */\nexport const GetAuditTraceContract = defineQuery({\n meta: {\n name: 'audit.trace.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['audit', 'trace', 'get'],\n description: 'Get all audit logs for a trace.',\n goal: 'View complete request trace for debugging.',\n context: 'Request tracing, debugging.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetAuditTraceInput',\n fields: {\n traceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: defineSchemaModel({\n name: 'GetAuditTraceOutput',\n fields: {\n logs: { type: AuditLogModel, isArray: true, isOptional: false },\n },\n }),\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Export audit logs.\n */\nexport const ExportAuditLogsContract = defineCommand({\n meta: {\n name: 'audit.logs.export',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['audit', 'logs', 'export'],\n description: 'Export audit logs for compliance reporting.',\n goal: 'Generate audit reports for compliance.',\n context: 'Compliance reporting, external audits.',\n },\n io: {\n input: AuditExportInputModel,\n output: AuditExportOutputModel,\n },\n policy: {\n auth: 'admin',\n },\n});\n\n/**\n * Get audit statistics.\n */\nexport const GetAuditStatsContract = defineQuery({\n meta: {\n name: 'audit.stats',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['audit', 'stats'],\n description: 'Get audit log statistics.',\n goal: 'Monitor audit activity levels.',\n context: 'Admin dashboard, monitoring.',\n },\n io: {\n input: AuditStatsInputModel,\n output: AuditStatsOutputModel,\n },\n policy: {\n auth: 'admin',\n },\n});\n"],"mappings":";;;;;;AAOA,MAAM,SAAS,CAAC,uBAAuB;AAIvC,MAAa,gBAAgBA,GAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAMC,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,WAAW;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,cAAc;GAAE,MAAMA,GAAe,cAAc;GAAE,YAAY;GAAO;EACxE,SAAS;GAAE,MAAMA,GAAe,YAAY;GAAE,YAAY;GAAO;EACjE,SAAS;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACrE,WAAW;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,YAAY;GAAE,MAAMA,GAAe,cAAc;GAAE,YAAY;GAAM;EACrE,UAAU;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACtE,YAAY;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACxE,OAAO;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACnE,SAAS;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACrE,UAAU;GAAE,MAAMA,GAAe,iBAAiB;GAAE,YAAY;GAAM;EACtE,YAAY;GAAE,MAAMA,GAAe,UAAU;GAAE,YAAY;GAAO;EAClE,YAAY;GAAE,MAAMA,GAAe,UAAU;GAAE,YAAY;GAAO;EACnE;CACF,CAAC;AAEF,MAAa,uBAAuBD,GAAkB;CACpD,MAAM;CACN,aAAa;CACb,QAAQ;E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,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,SACP;CACF,CAAC"}
@@ -87,4 +87,5 @@ declare const auditTrailEntities: (_lssm_lib_schema147.EntitySpec<{
87
87
  */
88
88
  declare const auditTrailSchemaContribution: ModuleSchemaContribution;
89
89
  //#endregion
90
- export { AuditLogArchiveEntity, AuditLogEntity, auditTrailEntities, auditTrailSchemaContribution };
90
+ export { AuditLogArchiveEntity, AuditLogEntity, auditTrailEntities, auditTrailSchemaContribution };
91
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/entities/index.ts"],"sourcesContent":[],"mappings":";;;;;;;AAMa,cAAA,cAqFX,sBArFyB,UAqFzB,CAAA;EAAA,EAAA,EAAA,mBAAA,CAAA,iBAAA;;;;;;;;;;;;;;;;;;;;;;;AAKF;;cAAa,2CAAqB;MA+BhC,mBAAA,CAAA;;;;;;;;;oDA/BgC;EAAA,SAAA,uCAAA;AAoClC,CAAA,CAAA;;;;cAAa,yCAAkB;MAA0C,mBAAA,CAAA;;;;;;;;;;;;;;;;;6CAA1C;EAAA,QAAA,uCAAA;;;;MAAA,mBAAA,CAAA;;;;;;;;;EAKlB,WAAA,uCAA8B;;;;;;cAA9B,8BAA8B"}
@@ -1,114 +1,113 @@
1
- import { defineEntity, field, index } from "../libs/schema/dist/entity/defineEntity.js";
2
- import "../libs/schema/dist/index.js";
1
+ import { L5, _5, b5 } from "../libs/schema/dist/index.js";
3
2
 
4
3
  //#region src/entities/index.ts
5
4
  /**
6
5
  * AuditLog entity - main audit log entry.
7
6
  */
8
- const AuditLogEntity = defineEntity({
7
+ const AuditLogEntity = L5({
9
8
  name: "AuditLog",
10
9
  description: "Audit log entry for tracking system events.",
11
10
  schema: "lssm_audit",
12
11
  map: "audit_log",
13
12
  fields: {
14
- id: field.id({ description: "Unique audit log ID" }),
15
- eventName: field.string({ description: "Event name/type" }),
16
- eventVersion: field.int({ description: "Event version" }),
17
- payload: field.json({ description: "Event payload (may be redacted)" }),
18
- actorId: field.string({
13
+ id: _5.id({ description: "Unique audit log ID" }),
14
+ eventName: _5.string({ description: "Event name/type" }),
15
+ eventVersion: _5.int({ description: "Event version" }),
16
+ payload: _5.json({ description: "Event payload (may be redacted)" }),
17
+ actorId: _5.string({
19
18
  isOptional: true,
20
19
  description: "User/service that triggered the event"
21
20
  }),
22
- actorType: field.string({
21
+ actorType: _5.string({
23
22
  isOptional: true,
24
23
  description: "Actor type (user, system, service)"
25
24
  }),
26
- actorEmail: field.string({
25
+ actorEmail: _5.string({
27
26
  isOptional: true,
28
27
  description: "Actor email (for searchability)"
29
28
  }),
30
- targetId: field.string({
29
+ targetId: _5.string({
31
30
  isOptional: true,
32
31
  description: "Resource affected by the event"
33
32
  }),
34
- targetType: field.string({
33
+ targetType: _5.string({
35
34
  isOptional: true,
36
35
  description: "Resource type"
37
36
  }),
38
- orgId: field.string({
37
+ orgId: _5.string({
39
38
  isOptional: true,
40
39
  description: "Organization context"
41
40
  }),
42
- tenantId: field.string({
41
+ tenantId: _5.string({
43
42
  isOptional: true,
44
43
  description: "Tenant context"
45
44
  }),
46
- traceId: field.string({
45
+ traceId: _5.string({
47
46
  isOptional: true,
48
47
  description: "Distributed trace ID"
49
48
  }),
50
- spanId: field.string({
49
+ spanId: _5.string({
51
50
  isOptional: true,
52
51
  description: "Span ID"
53
52
  }),
54
- requestId: field.string({
53
+ requestId: _5.string({
55
54
  isOptional: true,
56
55
  description: "Request ID"
57
56
  }),
58
- sessionId: field.string({
57
+ sessionId: _5.string({
59
58
  isOptional: true,
60
59
  description: "Session ID"
61
60
  }),
62
- clientIp: field.string({
61
+ clientIp: _5.string({
63
62
  isOptional: true,
64
63
  description: "Client IP address"
65
64
  }),
66
- userAgent: field.string({
65
+ userAgent: _5.string({
67
66
  isOptional: true,
68
67
  description: "User agent string"
69
68
  }),
70
- tags: field.json({
69
+ tags: _5.json({
71
70
  isOptional: true,
72
71
  description: "Custom tags for filtering"
73
72
  }),
74
- metadata: field.json({
73
+ metadata: _5.json({
75
74
  isOptional: true,
76
75
  description: "Additional metadata"
77
76
  }),
78
- occurredAt: field.dateTime({ description: "When the event occurred" }),
79
- recordedAt: field.createdAt({ description: "When the log was recorded" })
77
+ occurredAt: _5.dateTime({ description: "When the event occurred" }),
78
+ recordedAt: _5.createdAt({ description: "When the log was recorded" })
80
79
  },
81
80
  indexes: [
82
- index.on(["actorId", "occurredAt"]),
83
- index.on(["targetId", "occurredAt"]),
84
- index.on(["orgId", "occurredAt"]),
85
- index.on(["eventName", "occurredAt"]),
86
- index.on(["traceId"]),
87
- index.on(["occurredAt"])
81
+ b5.on(["actorId", "occurredAt"]),
82
+ b5.on(["targetId", "occurredAt"]),
83
+ b5.on(["orgId", "occurredAt"]),
84
+ b5.on(["eventName", "occurredAt"]),
85
+ b5.on(["traceId"]),
86
+ b5.on(["occurredAt"])
88
87
  ]
89
88
  });
90
89
  /**
91
90
  * AuditLogArchive entity - archived logs for long-term retention.
92
91
  */
93
- const AuditLogArchiveEntity = defineEntity({
92
+ const AuditLogArchiveEntity = L5({
94
93
  name: "AuditLogArchive",
95
94
  description: "Archived audit logs for long-term retention.",
96
95
  schema: "lssm_audit",
97
96
  map: "audit_log_archive",
98
97
  fields: {
99
- id: field.id(),
100
- batchId: field.string({ description: "Archive batch ID" }),
101
- logCount: field.int({ description: "Number of logs in batch" }),
102
- fromDate: field.dateTime({ description: "Earliest log in batch" }),
103
- toDate: field.dateTime({ description: "Latest log in batch" }),
104
- storagePath: field.string({ description: "Path to archived data" }),
105
- storageType: field.string({ description: "Storage type (s3, gcs, file)" }),
106
- compressedSize: field.int({ description: "Compressed size in bytes" }),
107
- checksum: field.string({ description: "SHA-256 checksum" }),
108
- retainUntil: field.dateTime({ description: "When archive can be deleted" }),
109
- createdAt: field.createdAt()
98
+ id: _5.id(),
99
+ batchId: _5.string({ description: "Archive batch ID" }),
100
+ logCount: _5.int({ description: "Number of logs in batch" }),
101
+ fromDate: _5.dateTime({ description: "Earliest log in batch" }),
102
+ toDate: _5.dateTime({ description: "Latest log in batch" }),
103
+ storagePath: _5.string({ description: "Path to archived data" }),
104
+ storageType: _5.string({ description: "Storage type (s3, gcs, file)" }),
105
+ compressedSize: _5.int({ description: "Compressed size in bytes" }),
106
+ checksum: _5.string({ description: "SHA-256 checksum" }),
107
+ retainUntil: _5.dateTime({ description: "When archive can be deleted" }),
108
+ createdAt: _5.createdAt()
110
109
  },
111
- indexes: [index.on(["fromDate", "toDate"]), index.on(["retainUntil"])]
110
+ indexes: [b5.on(["fromDate", "toDate"]), b5.on(["retainUntil"])]
112
111
  });
113
112
  /**
114
113
  * All audit trail entities for schema composition.
@@ -123,4 +122,5 @@ const auditTrailSchemaContribution = {
123
122
  };
124
123
 
125
124
  //#endregion
126
- export { AuditLogArchiveEntity, AuditLogEntity, auditTrailEntities, auditTrailSchemaContribution };
125
+ export { AuditLogArchiveEntity, AuditLogEntity, auditTrailEntities, auditTrailSchemaContribution };
126
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["defineEntity","field","index","auditTrailSchemaContribution: ModuleSchemaContribution"],"sources":["../../src/entities/index.ts"],"sourcesContent":["import { defineEntity, field, index } from '@lssm/lib.schema';\nimport type { ModuleSchemaContribution } from '@lssm/lib.schema';\n\n/**\n * AuditLog entity - main audit log entry.\n */\nexport const AuditLogEntity = defineEntity({\n name: 'AuditLog',\n description: 'Audit log entry for tracking system events.',\n schema: 'lssm_audit',\n map: 'audit_log',\n fields: {\n id: field.id({ description: 'Unique audit log ID' }),\n\n // Event info\n eventName: field.string({ description: 'Event name/type' }),\n eventVersion: field.int({ description: 'Event version' }),\n payload: field.json({ description: 'Event payload (may be redacted)' }),\n\n // Actor info\n actorId: field.string({\n isOptional: true,\n description: 'User/service that triggered the event',\n }),\n actorType: field.string({\n isOptional: true,\n description: 'Actor type (user, system, service)',\n }),\n actorEmail: field.string({\n isOptional: true,\n description: 'Actor email (for searchability)',\n }),\n\n // Target info\n targetId: field.string({\n isOptional: true,\n description: 'Resource affected by the event',\n }),\n targetType: field.string({\n isOptional: true,\n description: 'Resource type',\n }),\n\n // Context\n orgId: field.string({\n isOptional: true,\n description: 'Organization context',\n }),\n tenantId: field.string({ isOptional: true, description: 'Tenant context' }),\n\n // Tracing\n traceId: field.string({\n isOptional: true,\n description: 'Distributed trace ID',\n }),\n spanId: field.string({ isOptional: true, description: 'Span ID' }),\n requestId: field.string({ isOptional: true, description: 'Request ID' }),\n sessionId: field.string({ isOptional: true, description: 'Session ID' }),\n\n // Client info\n clientIp: field.string({\n isOptional: true,\n description: 'Client IP address',\n }),\n userAgent: field.string({\n isOptional: true,\n description: 'User agent string',\n }),\n\n // Metadata\n tags: field.json({\n isOptional: true,\n description: 'Custom tags for filtering',\n }),\n metadata: field.json({\n isOptional: true,\n description: 'Additional metadata',\n }),\n\n // Timestamps\n occurredAt: field.dateTime({ description: 'When the event occurred' }),\n recordedAt: field.createdAt({ description: 'When the log was recorded' }),\n },\n indexes: [\n index.on(['actorId', 'occurredAt']),\n index.on(['targetId', 'occurredAt']),\n index.on(['orgId', 'occurredAt']),\n index.on(['eventName', 'occurredAt']),\n index.on(['traceId']),\n index.on(['occurredAt']),\n ],\n});\n\n/**\n * AuditLogArchive entity - archived logs for long-term retention.\n */\nexport const AuditLogArchiveEntity = defineEntity({\n name: 'AuditLogArchive',\n description: 'Archived audit logs for long-term retention.',\n schema: 'lssm_audit',\n map: 'audit_log_archive',\n fields: {\n id: field.id(),\n\n // Batch info\n batchId: field.string({ description: 'Archive batch ID' }),\n logCount: field.int({ description: 'Number of logs in batch' }),\n\n // Time range\n fromDate: field.dateTime({ description: 'Earliest log in batch' }),\n toDate: field.dateTime({ description: 'Latest log in batch' }),\n\n // Storage\n storagePath: field.string({ description: 'Path to archived data' }),\n storageType: field.string({ description: 'Storage type (s3, gcs, file)' }),\n compressedSize: field.int({ description: 'Compressed size in bytes' }),\n\n // Integrity\n checksum: field.string({ description: 'SHA-256 checksum' }),\n\n // Retention\n retainUntil: field.dateTime({ description: 'When archive can be deleted' }),\n\n // Timestamps\n createdAt: field.createdAt(),\n },\n indexes: [index.on(['fromDate', 'toDate']), index.on(['retainUntil'])],\n});\n\n/**\n * All audit trail entities for schema composition.\n */\nexport const auditTrailEntities = [AuditLogEntity, AuditLogArchiveEntity];\n\n/**\n * Module schema contribution for audit trail.\n */\nexport const auditTrailSchemaContribution: ModuleSchemaContribution = {\n moduleId: '@lssm/module.audit-trail',\n entities: auditTrailEntities,\n};\n"],"mappings":";;;;;;AAMA,MAAa,iBAAiBA,GAAa;CACzC,MAAM;CACN,aAAa;CACb,QAAQ;CACR,KAAK;CACL,QAAQ;EACN,IAAIC,GAAM,GAAG,EAAE,aAAa,uBAAuB,CAAC;EAGpD,WAAWA,GAAM,OAAO,EAAE,aAAa,mBAAmB,CAAC;EAC3D,cAAcA,GAAM,IAAI,EAAE,aAAa,iBAAiB,CAAC;EACzD,SAASA,GAAM,KAAK,EAAE,aAAa,mCAAmC,CAAC;EAGvE,SAASA,GAAM,OAAO;GACpB,YAAY;GACZ,aAAa;GACd,CAAC;EACF,WAAWA,GAAM,OAAO;GACtB,YAAY;GACZ,aAAa;GACd,CAAC;EACF,YAAYA,GAAM,OAAO;GACvB,YAAY;GACZ,aAAa;GACd,CAAC;EAGF,UAAUA,GAAM,OAAO;GACrB,YAAY;GACZ,aAAa;GACd,CAAC;EACF,YAAYA,GAAM,OAAO;GACvB,YAAY;GACZ,aAAa;GACd,CAAC;EAGF,OAAOA,GAAM,OAAO;GAClB,YAAY;GACZ,aAAa;GACd,CAAC;EACF,UAAUA,GAAM,OAAO;GAAE,YAAY;GAAM,aAAa;GAAkB,CAAC;EAG3E,SAASA,GAAM,OAAO;GACpB,YAAY;GACZ,aAAa;GACd,CAAC;EACF,QAAQA,GAAM,OAAO;GAAE,YAAY;GAAM,aAAa;GAAW,CAAC;EAClE,WAAWA,GAAM,OAAO;GAAE,YAAY;GAAM,aA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C;EAG3D,aAAaA,GAAM,SAAS,EAAE,aAAa,+BAA+B,CAAC;EAG3E,WAAWA,GAAM,WAAW;EAC7B;CACD,SAAS,CAACC,GAAM,GAAG,CAAC,YAAY,SAAS,CAAC,EAAEA,GAAM,GAAG,CAAC,cAAc,CAAC,CAAC;CACvE,CAAC;;;;AAKF,MAAa,qBAAqB,CAAC,gBAAgB,sBAAsB;;;;AAKzE,MAAaC,+BAAyD;CACpE,UAAU;CACV,UAAU;CACX"}
@@ -85,4 +85,5 @@ const openBankingBalancesReadCapability = {
85
85
  }]
86
86
  };
87
87
 
88
- //#endregion
88
+ //#endregion
89
+ //# sourceMappingURL=openbanking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openbanking.js","names":[],"sources":["../../../../../../../libs/contracts/dist/capabilities/openbanking.js"],"sourcesContent":["import { StabilityEnum } from \"../ownership.js\";\n\n//#region src/capabilities/openbanking.ts\nconst OWNERS = [\"platform.finance\"];\nconst TAGS = [\"open-banking\", \"finance\"];\nconst openBankingAccountsReadCapability = {\n\tmeta: {\n\t\tkey: \"openbanking.accounts.read\",\n\t\tversion: 1,\n\t\tkind: \"integration\",\n\t\ttitle: \"Open Banking Accounts (Read)\",\n\t\tdescription: \"Provides read-only access to linked bank accounts, including account summaries and metadata.\",\n\t\tdomain: \"finance\",\n\t\towners: [...OWNERS],\n\t\ttags: [...TAGS],\n\t\tstability: StabilityEnum.Experimental\n\t},\n\tprovides: [\n\t\t{\n\t\t\tsurface: \"operation\",\n\t\t\tname: \"openbanking.accounts.list\",\n\t\t\tversion: 1,\n\t\t\tdescription: \"List bank accounts linked to a Powens open banking connection.\"\n\t\t},\n\t\t{\n\t\t\tsurface: \"operation\",\n\t\t\tname: \"openbanking.accounts.get\",\n\t\t\tversion: 1,\n\t\t\tdescription: \"Retrieve the canonical bank account record for a specific account.\"\n\t\t},\n\t\t{\n\t\t\tsurface: \"operation\",\n\t\t\tname: \"openbanking.accounts.sync\",\n\t\t\tversion: 1,\n\t\t\tdescription: \"Trigger a refresh of bank account metadata from the open banking provider.\"\n\t\t}\n\t]\n};\nconst openBankingTransactionsReadCapability = {\n\tmeta: {\n\t\tkey: \"openbanking.transactions.read\",\n\t\tversion: 1,\n\t\tkind: \"integration\",\n\t\ttitle: \"Open Banking Transactions (Read)\",\n\t\tdescription: \"Enables retrieval of transaction history for linked bank accounts via open banking providers.\",\n\t\tdomain: \"finance\",\n\t\towners: [...OWNERS],\n\t\ttags: [...TAGS, \"transactions\"],\n\t\tstability: StabilityEnum.Experimental\n\t},\n\tprovides: [{\n\t\tsurface: \"operation\",\n\t\tname: \"openbanking.transactions.list\",\n\t\tversion: 1,\n\t\tdescription: \"List transactions for a given bank account with optional date filtering.\"\n\t}, {\n\t\tsurface: \"operation\",\n\t\tname: \"openbanking.transactions.sync\",\n\t\tversion: 1,\n\t\tdescription: \"Synchronise transactions from the open banking provider into the canonical ledger.\"\n\t}]\n};\nconst openBankingBalancesReadCapability = {\n\tmeta: {\n\t\tkey: \"openbanking.balances.read\",\n\t\tversion: 1,\n\t\tkind: \"integration\",\n\t\ttitle: \"Open Banking Balances (Read)\",\n\t\tdescription: \"Allows querying of current and available balances for linked bank accounts via open banking providers.\",\n\t\tdomain: \"finance\",\n\t\towners: [...OWNERS],\n\t\ttags: [...TAGS, \"balances\"],\n\t\tstability: StabilityEnum.Experimental\n\t},\n\tprovides: [{\n\t\tsurface: \"operation\",\n\t\tname: \"openbanking.balances.get\",\n\t\tversion: 1,\n\t\tdescription: \"Retrieve the latest known balances for a specified bank account.\"\n\t}, {\n\t\tsurface: \"operation\",\n\t\tname: \"openbanking.balances.refresh\",\n\t\tversion: 1,\n\t\tdescription: \"Force a balance refresh from the open banking provider.\"\n\t}]\n};\nfunction registerOpenBankingCapabilities(registry) {\n\treturn registry.register(openBankingAccountsReadCapability).register(openBankingTransactionsReadCapability).register(openBankingBalancesReadCapability);\n}\n\n//#endregion\nexport { openBankingAccountsReadCapability, openBankingBalancesReadCapability, openBankingTransactionsReadCapability, registerOpenBankingCapabilities };\n//# sourceMappingURL=openbanking.js.map"],"mappings":";;;AAGA,MAAM,SAAS,CAAC,mBAAmB;AACnC,MAAM,OAAO,CAAC,gBAAgB,UAAU;AACxC,MAAM,oCAAoC;CACzC,MAAM;EACL,KAAK;EACL,SAAS;EACT,MAAM;EACN,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,GAAG,KAAK;EACf,WAAW,cAAc;EACzB;CACD,UAAU;EACT;GACC,SAAS;GACT,MAAM;GACN,SAAS;GACT,aAAa;GACb;EACD;GACC,SAAS;GACT,MAAM;GACN,SAAS;GACT,aAAa;GACb;EACD;GACC,SAAS;GACT,MAAM;GACN,SAAS;GACT,aAAa;GACb;EACD;CACD;AACD,MAAM,wCAAwC;CAC7C,MAAM;EACL,KAAK;EACL,SAAS;EACT,MAAM;EACN,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,GAAG,MAAM,eAAe;EAC/B,WAAW,cAAc;EACzB;CACD,UAAU,CAAC;EACV,SAAS;EACT,MAAM;EACN,SAAS;EACT,aAAa;EACb,EAAE;EACF,SAAS;EACT,MAAM;EACN,SAAS;EACT,aAAa;EACb,CAAC;CACF;AACD,MAAM,oCAAoC;CACzC,MAAM;EACL,KAAK;EACL,SAAS;EACT,MAAM;EACN,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,GAAG,MAAM,WAAW;EAC3B,WAAW,cAAc;EACzB;CACD,UAAU,CAAC;EACV,SAAS;EACT,MAAM;EACN,SAAS;EACT,aAAa;EACb,EAAE;EACF,SAAS;EACT,MAAM;EACN,SAAS;EACT,aAAa;EACb,CAAC;CACF"}
@@ -57,4 +57,5 @@ const ContractRegistryManifestSchema = z.object({
57
57
  });
58
58
 
59
59
  //#endregion
60
- export { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema };
60
+ export { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema };
61
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","names":[],"sources":["../../../../../../../libs/contracts/dist/contract-registry/schemas.js"],"sourcesContent":["import { StabilityEnum } from \"../ownership.js\";\nimport z from \"zod\";\n\n//#region src/contract-registry/schemas.ts\nconst ContractRegistryItemTypeValues = [\n\t\"contractspec:operation\",\n\t\"contractspec:event\",\n\t\"contractspec:presentation\",\n\t\"contractspec:form\",\n\t\"contractspec:feature\",\n\t\"contractspec:workflow\",\n\t\"contractspec:template\",\n\t\"contractspec:integration\",\n\t\"contractspec:data-view\",\n\t\"contractspec:migration\",\n\t\"contractspec:telemetry\",\n\t\"contractspec:experiment\",\n\t\"contractspec:app-config\",\n\t\"contractspec:knowledge\"\n];\nconst ContractRegistryItemTypeSchema = z.enum(ContractRegistryItemTypeValues);\nconst ContractRegistryFileSchema = z.object({\n\tpath: z.string().min(1),\n\ttype: z.string().min(1),\n\tcontent: z.string().optional()\n});\nconst ContractRegistryItemSchema = z.object({\n\tname: z.string().min(1),\n\ttype: ContractRegistryItemTypeSchema,\n\tversion: z.number().int().nonnegative(),\n\ttitle: z.string().min(1),\n\tdescription: z.string().min(1),\n\tmeta: z.object({\n\t\tstability: z.enum([\n\t\t\tStabilityEnum.Idea,\n\t\t\tStabilityEnum.InCreation,\n\t\t\tStabilityEnum.Experimental,\n\t\t\tStabilityEnum.Beta,\n\t\t\tStabilityEnum.Stable,\n\t\t\tStabilityEnum.Deprecated\n\t\t]),\n\t\towners: z.array(z.string().min(1)).default([]),\n\t\ttags: z.array(z.string().min(1)).default([])\n\t}),\n\tdependencies: z.array(z.string().min(1)).optional(),\n\tregistryDependencies: z.array(z.string().min(1)).optional(),\n\tfiles: z.array(ContractRegistryFileSchema).min(1),\n\tschema: z.object({\n\t\tinput: z.unknown().optional(),\n\t\toutput: z.unknown().optional()\n\t}).optional()\n});\nconst ContractRegistryManifestSchema = z.object({\n\t$schema: z.string().min(1).optional(),\n\tname: z.string().min(1),\n\thomepage: z.string().min(1).optional(),\n\titems: z.array(ContractRegistryItemSchema)\n});\n\n//#endregion\nexport { ContractRegistryFileSchema, ContractRegistryItemSchema, ContractRegistryItemTypeSchema, ContractRegistryManifestSchema };\n//# sourceMappingURL=schemas.js.map"],"mappings":";;;;AAoBA,MAAM,iCAAiC,EAAE,KAhBF;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,CAC4E;AAC7E,MAAM,6BAA6B,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,SAAS,EAAE,QAAQ,CAAC,UAAU;CAC9B,CAAC;AACF,MAAM,6BAA6B,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,MAAM;CACN,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa;CACvC,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE;CACxB,aAAa,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC9B,MAAM,EAAE,OAAO;EACd,WAAW,EAAE,KAAK;GACjB,cAAc;GACd,cAAc;GACd,cAAc;GACd,cAAc;GACd,cAAc;GACd,cAAc;GACd,CAAC;EACF,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;EAC9C,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;EAC5C,CAAC;CACF,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,UAAU;CACnD,sBAAsB,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,CAA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