@memberjunction/core-entities 5.28.0 → 5.30.0

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 (109) hide show
  1. package/dist/custom/MJConversationDetailEntityExtended.d.ts +31 -0
  2. package/dist/custom/MJConversationDetailEntityExtended.d.ts.map +1 -0
  3. package/dist/custom/MJConversationDetailEntityExtended.js +106 -0
  4. package/dist/custom/MJConversationDetailEntityExtended.js.map +1 -0
  5. package/dist/custom/PermissionProviders/AIAgentPermissionProvider.d.ts +31 -0
  6. package/dist/custom/PermissionProviders/AIAgentPermissionProvider.d.ts.map +1 -0
  7. package/dist/custom/PermissionProviders/AIAgentPermissionProvider.js +151 -0
  8. package/dist/custom/PermissionProviders/AIAgentPermissionProvider.js.map +1 -0
  9. package/dist/custom/PermissionProviders/AccessControlRuleProvider.d.ts +45 -0
  10. package/dist/custom/PermissionProviders/AccessControlRuleProvider.d.ts.map +1 -0
  11. package/dist/custom/PermissionProviders/AccessControlRuleProvider.js +253 -0
  12. package/dist/custom/PermissionProviders/AccessControlRuleProvider.js.map +1 -0
  13. package/dist/custom/PermissionProviders/ApplicationRolePermissionProvider.d.ts +28 -0
  14. package/dist/custom/PermissionProviders/ApplicationRolePermissionProvider.d.ts.map +1 -0
  15. package/dist/custom/PermissionProviders/ApplicationRolePermissionProvider.js +144 -0
  16. package/dist/custom/PermissionProviders/ApplicationRolePermissionProvider.js.map +1 -0
  17. package/dist/custom/PermissionProviders/ArtifactPermissionProvider.d.ts +45 -0
  18. package/dist/custom/PermissionProviders/ArtifactPermissionProvider.d.ts.map +1 -0
  19. package/dist/custom/PermissionProviders/ArtifactPermissionProvider.js +169 -0
  20. package/dist/custom/PermissionProviders/ArtifactPermissionProvider.js.map +1 -0
  21. package/dist/custom/PermissionProviders/CollectionPermissionProvider.d.ts +40 -0
  22. package/dist/custom/PermissionProviders/CollectionPermissionProvider.d.ts.map +1 -0
  23. package/dist/custom/PermissionProviders/CollectionPermissionProvider.js +220 -0
  24. package/dist/custom/PermissionProviders/CollectionPermissionProvider.js.map +1 -0
  25. package/dist/custom/PermissionProviders/DashboardPermissionProvider.d.ts +47 -0
  26. package/dist/custom/PermissionProviders/DashboardPermissionProvider.d.ts.map +1 -0
  27. package/dist/custom/PermissionProviders/DashboardPermissionProvider.js +218 -0
  28. package/dist/custom/PermissionProviders/DashboardPermissionProvider.js.map +1 -0
  29. package/dist/custom/PermissionProviders/EntityPermissionProvider.d.ts +25 -0
  30. package/dist/custom/PermissionProviders/EntityPermissionProvider.d.ts.map +1 -0
  31. package/dist/custom/PermissionProviders/EntityPermissionProvider.js +129 -0
  32. package/dist/custom/PermissionProviders/EntityPermissionProvider.js.map +1 -0
  33. package/dist/custom/PermissionProviders/QueryPermissionProvider.d.ts +24 -0
  34. package/dist/custom/PermissionProviders/QueryPermissionProvider.d.ts.map +1 -0
  35. package/dist/custom/PermissionProviders/QueryPermissionProvider.js +123 -0
  36. package/dist/custom/PermissionProviders/QueryPermissionProvider.js.map +1 -0
  37. package/dist/custom/PermissionProviders/ResourcePermissionProvider.d.ts +39 -0
  38. package/dist/custom/PermissionProviders/ResourcePermissionProvider.d.ts.map +1 -0
  39. package/dist/custom/PermissionProviders/ResourcePermissionProvider.js +193 -0
  40. package/dist/custom/PermissionProviders/ResourcePermissionProvider.js.map +1 -0
  41. package/dist/custom/PermissionProviders/index.d.ts +16 -0
  42. package/dist/custom/PermissionProviders/index.d.ts.map +1 -0
  43. package/dist/custom/PermissionProviders/index.js +41 -0
  44. package/dist/custom/PermissionProviders/index.js.map +1 -0
  45. package/dist/custom/Permissions/BaseShareEntityExtended.d.ts +105 -0
  46. package/dist/custom/Permissions/BaseShareEntityExtended.d.ts.map +1 -0
  47. package/dist/custom/Permissions/BaseShareEntityExtended.js +162 -0
  48. package/dist/custom/Permissions/BaseShareEntityExtended.js.map +1 -0
  49. package/dist/custom/Permissions/MJAccessControlRuleEntityExtended.d.ts +22 -0
  50. package/dist/custom/Permissions/MJAccessControlRuleEntityExtended.d.ts.map +1 -0
  51. package/dist/custom/Permissions/MJAccessControlRuleEntityExtended.js +75 -0
  52. package/dist/custom/Permissions/MJAccessControlRuleEntityExtended.js.map +1 -0
  53. package/dist/custom/Permissions/MJArtifactPermissionEntityExtended.d.ts +22 -0
  54. package/dist/custom/Permissions/MJArtifactPermissionEntityExtended.d.ts.map +1 -0
  55. package/dist/custom/Permissions/MJArtifactPermissionEntityExtended.js +114 -0
  56. package/dist/custom/Permissions/MJArtifactPermissionEntityExtended.js.map +1 -0
  57. package/dist/custom/Permissions/MJCollectionPermissionEntityExtended.d.ts +25 -0
  58. package/dist/custom/Permissions/MJCollectionPermissionEntityExtended.d.ts.map +1 -0
  59. package/dist/custom/Permissions/MJCollectionPermissionEntityExtended.js +101 -0
  60. package/dist/custom/Permissions/MJCollectionPermissionEntityExtended.js.map +1 -0
  61. package/dist/custom/Permissions/MJDashboardPermissionEntityExtended.d.ts +32 -0
  62. package/dist/custom/Permissions/MJDashboardPermissionEntityExtended.d.ts.map +1 -0
  63. package/dist/custom/Permissions/MJDashboardPermissionEntityExtended.js +95 -0
  64. package/dist/custom/Permissions/MJDashboardPermissionEntityExtended.js.map +1 -0
  65. package/dist/custom/Permissions/index.d.ts +13 -0
  66. package/dist/custom/Permissions/index.d.ts.map +1 -0
  67. package/dist/custom/Permissions/index.js +22 -0
  68. package/dist/custom/Permissions/index.js.map +1 -0
  69. package/dist/custom/Permissions/shareNotification.d.ts +72 -0
  70. package/dist/custom/Permissions/shareNotification.d.ts.map +1 -0
  71. package/dist/custom/Permissions/shareNotification.js +98 -0
  72. package/dist/custom/Permissions/shareNotification.js.map +1 -0
  73. package/dist/custom/ResourcePermissions/MJResourcePermissionEntityExtended.d.ts +63 -1
  74. package/dist/custom/ResourcePermissions/MJResourcePermissionEntityExtended.d.ts.map +1 -1
  75. package/dist/custom/ResourcePermissions/MJResourcePermissionEntityExtended.js +244 -27
  76. package/dist/custom/ResourcePermissions/MJResourcePermissionEntityExtended.js.map +1 -1
  77. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.d.ts +7 -0
  78. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.d.ts.map +1 -1
  79. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.js +13 -0
  80. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.js.map +1 -1
  81. package/dist/engines/GeoDataEngine.d.ts +42 -8
  82. package/dist/engines/GeoDataEngine.d.ts.map +1 -1
  83. package/dist/engines/GeoDataEngine.js +191 -36
  84. package/dist/engines/GeoDataEngine.js.map +1 -1
  85. package/dist/engines/MCPEngine.d.ts +20 -1
  86. package/dist/engines/MCPEngine.d.ts.map +1 -1
  87. package/dist/engines/MCPEngine.js +31 -0
  88. package/dist/engines/MCPEngine.js.map +1 -1
  89. package/dist/engines/PermissionEngine.d.ts +142 -0
  90. package/dist/engines/PermissionEngine.d.ts.map +1 -0
  91. package/dist/engines/PermissionEngine.js +343 -0
  92. package/dist/engines/PermissionEngine.js.map +1 -0
  93. package/dist/engines/UserInfoEngine.d.ts +6 -1
  94. package/dist/engines/UserInfoEngine.d.ts.map +1 -1
  95. package/dist/engines/UserInfoEngine.js +21 -5
  96. package/dist/engines/UserInfoEngine.js.map +1 -1
  97. package/dist/engines/conversations.d.ts +35 -0
  98. package/dist/engines/conversations.d.ts.map +1 -1
  99. package/dist/engines/conversations.js +103 -16
  100. package/dist/engines/conversations.js.map +1 -1
  101. package/dist/generated/entity_subclasses.d.ts +1593 -78
  102. package/dist/generated/entity_subclasses.d.ts.map +1 -1
  103. package/dist/generated/entity_subclasses.js +2440 -352
  104. package/dist/generated/entity_subclasses.js.map +1 -1
  105. package/dist/index.d.ts +4 -0
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +8 -0
  108. package/dist/index.js.map +1 -1
  109. package/package.json +5 -5
@@ -588,7 +588,7 @@ export const MJActionSchema = z.object({
588
588
  * * Field Name: Description
589
589
  * * Display Name: Description
590
590
  * * SQL Data Type: nvarchar(MAX)`),
591
- Type: z.union([z.literal('Custom'), z.literal('Generated')]).describe(`
591
+ Type: z.union([z.literal('Custom'), z.literal('Generated'), z.literal('Runtime')]).describe(`
592
592
  * * Field Name: Type
593
593
  * * Display Name: Type
594
594
  * * SQL Data Type: nvarchar(20)
@@ -597,6 +597,7 @@ export const MJActionSchema = z.object({
597
597
  * * Possible Values
598
598
  * * Custom
599
599
  * * Generated
600
+ * * Runtime
600
601
  * * Description: Generated or Custom. Generated means the UserPrompt is used to prompt an AI model to automatically create the code for the Action. Custom means that a custom class has been implemented that subclasses the BaseAction class. The custom class needs to use the @RegisterClass decorator and be included in the MJAPI (or other runtime environment) to be available for execution.`),
601
602
  UserPrompt: z.string().nullable().describe(`
602
603
  * * Field Name: UserPrompt
@@ -620,7 +621,7 @@ export const MJActionSchema = z.object({
620
621
  * * Description: AI's explanation of the code.`),
621
622
  CodeApprovalStatus: z.union([z.literal('Approved'), z.literal('Pending'), z.literal('Rejected')]).describe(`
622
623
  * * Field Name: CodeApprovalStatus
623
- * * Display Name: Code Approval Status
624
+ * * Display Name: Approval Status
624
625
  * * SQL Data Type: nvarchar(20)
625
626
  * * Default Value: Pending
626
627
  * * Value List Type: List
@@ -631,17 +632,17 @@ export const MJActionSchema = z.object({
631
632
  * * Description: An action won't be usable until the code is approved.`),
632
633
  CodeApprovalComments: z.string().nullable().describe(`
633
634
  * * Field Name: CodeApprovalComments
634
- * * Display Name: Code Approval Comments
635
+ * * Display Name: Approval Comments
635
636
  * * SQL Data Type: nvarchar(MAX)
636
637
  * * Description: Optional comments when an individual (or an AI) reviews and approves the code.`),
637
638
  CodeApprovedByUserID: z.string().nullable().describe(`
638
639
  * * Field Name: CodeApprovedByUserID
639
- * * Display Name: Code Approved By
640
+ * * Display Name: Approved By User
640
641
  * * SQL Data Type: uniqueidentifier
641
642
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
642
643
  CodeApprovedAt: z.date().nullable().describe(`
643
644
  * * Field Name: CodeApprovedAt
644
- * * Display Name: Code Approved At
645
+ * * Display Name: Approved At
645
646
  * * SQL Data Type: datetimeoffset
646
647
  * * Description: When the code was approved.`),
647
648
  CodeLocked: z.boolean().describe(`
@@ -689,7 +690,7 @@ export const MJActionSchema = z.object({
689
690
  * * Description: For actions where Type='Custom', this specifies the fully qualified class name of the BaseAction sub-class that should be instantiated to handle the action execution. This provides a more reliable mechanism than relying on the Name field for class instantiation.`),
690
691
  ParentID: z.string().nullable().describe(`
691
692
  * * Field Name: ParentID
692
- * * Display Name: Parent
693
+ * * Display Name: Parent Action
693
694
  * * SQL Data Type: uniqueidentifier
694
695
  * * Related Entity/Foreign Key: MJ: Actions (vwActions.ID)
695
696
  * * Description: Optional ID of the parent action this action inherits from. Used for hierarchical action composition where child actions can specialize parent actions.`),
@@ -709,21 +710,42 @@ export const MJActionSchema = z.object({
709
710
  * * Display Name: Configuration
710
711
  * * SQL Data Type: nvarchar(MAX)
711
712
  * * Description: Optional JSON configuration for the action. For integration actions, contains routing info: integrationName, objectName, verb, and optional connectorConfig. Non-integration actions leave this NULL.`),
713
+ RuntimeActionConfiguration: z.any().nullable().describe(`
714
+ * * Field Name: RuntimeActionConfiguration
715
+ * * Display Name: Runtime Configuration
716
+ * * SQL Data Type: nvarchar(MAX)
717
+ * * JSON Type: MJActionEntity_IRuntimeActionConfiguration
718
+ * * Description: JSON blob holding configuration specific to Type='Runtime' actions: declarative permission scopes (allowedEntities, allowedActions, allowedAgents with id+name pairs), resource limits (maxMemoryMB, maxBridgeCalls), and sandbox options (additionalLibraries, debugMode). Evolvable — new keys can be introduced without schema changes. NULL for non-Runtime actions.`),
719
+ MaxExecutionTimeMS: z.number().nullable().describe(`
720
+ * * Field Name: MaxExecutionTimeMS
721
+ * * Display Name: Max Execution Time (ms)
722
+ * * SQL Data Type: int
723
+ * * Description: Universal maximum execution time in milliseconds for a single action invocation. Enforced by ActionEngine across ALL action types (Custom, Generated, Runtime) via AbortSignal passed through RunActionParams. NULL means use the engine default.`),
724
+ CreatedByAgentID: z.string().nullable().describe(`
725
+ * * Field Name: CreatedByAgentID
726
+ * * Display Name: Created By Agent
727
+ * * SQL Data Type: uniqueidentifier
728
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
729
+ * * Description: Optional reference to the AI Agent that authored this action — populated when an agent (e.g. ActionSmith) dynamically generates a Runtime action. NULL for human-authored Custom/Generated actions. Provides an audit trail linking agent-generated capabilities back to their creator.`),
712
730
  Category: z.string().nullable().describe(`
713
731
  * * Field Name: Category
714
732
  * * Display Name: Category Name
715
733
  * * SQL Data Type: nvarchar(255)`),
716
734
  CodeApprovedByUser: z.string().nullable().describe(`
717
735
  * * Field Name: CodeApprovedByUser
718
- * * Display Name: Code Approved By (User)
736
+ * * Display Name: Approved By User Name
719
737
  * * SQL Data Type: nvarchar(100)`),
720
738
  Parent: z.string().nullable().describe(`
721
739
  * * Field Name: Parent
722
- * * Display Name: Parent Name
740
+ * * Display Name: Parent Action Name
723
741
  * * SQL Data Type: nvarchar(425)`),
724
742
  DefaultCompactPrompt: z.string().nullable().describe(`
725
743
  * * Field Name: DefaultCompactPrompt
726
- * * Display Name: Default Compact Prompt Text
744
+ * * Display Name: Default Compact Prompt Name
745
+ * * SQL Data Type: nvarchar(255)`),
746
+ CreatedByAgent: z.string().nullable().describe(`
747
+ * * Field Name: CreatedByAgent
748
+ * * Display Name: Created By Agent Name
727
749
  * * SQL Data Type: nvarchar(255)`),
728
750
  RootParentID: z.string().nullable().describe(`
729
751
  * * Field Name: RootParentID
@@ -1355,7 +1377,7 @@ export const MJAIAgentExampleSchema = z.object({
1355
1377
  * * Display Name: Comments
1356
1378
  * * SQL Data Type: nvarchar(MAX)
1357
1379
  * * Description: Internal comments about this example, not included in agent context injection.`),
1358
- Status: z.union([z.literal('Active'), z.literal('Pending'), z.literal('Revoked')]).describe(`
1380
+ Status: z.union([z.literal('Active'), z.literal('Archived'), z.literal('Pending'), z.literal('Revoked')]).describe(`
1359
1381
  * * Field Name: Status
1360
1382
  * * Display Name: Status
1361
1383
  * * SQL Data Type: nvarchar(20)
@@ -1363,6 +1385,7 @@ export const MJAIAgentExampleSchema = z.object({
1363
1385
  * * Value List Type: List
1364
1386
  * * Possible Values
1365
1387
  * * Active
1388
+ * * Archived
1366
1389
  * * Pending
1367
1390
  * * Revoked
1368
1391
  * * Description: Status of the example: Pending (awaiting review), Active (in use), or Revoked (disabled).`),
@@ -1732,7 +1755,7 @@ export const MJAIAgentNoteSchema = z.object({
1732
1755
  * * Display Name: Comments
1733
1756
  * * SQL Data Type: nvarchar(MAX)
1734
1757
  * * Description: Internal comments about this note, not included in agent context injection.`),
1735
- Status: z.union([z.literal('Active'), z.literal('Pending'), z.literal('Revoked')]).describe(`
1758
+ Status: z.union([z.literal('Active'), z.literal('Archived'), z.literal('Pending'), z.literal('Revoked')]).describe(`
1736
1759
  * * Field Name: Status
1737
1760
  * * Display Name: Status
1738
1761
  * * SQL Data Type: nvarchar(20)
@@ -1740,6 +1763,7 @@ export const MJAIAgentNoteSchema = z.object({
1740
1763
  * * Value List Type: List
1741
1764
  * * Possible Values
1742
1765
  * * Active
1766
+ * * Archived
1743
1767
  * * Pending
1744
1768
  * * Revoked
1745
1769
  * * Description: Status of the note: Pending (awaiting review), Active (in use), or Revoked (disabled).`),
@@ -1810,6 +1834,40 @@ export const MJAIAgentNoteSchema = z.object({
1810
1834
  * * Display Name: Expires At
1811
1835
  * * SQL Data Type: datetimeoffset
1812
1836
  * * Description: Optional expiration timestamp. Notes past this date are candidates for archival. NULL means no expiration.`),
1837
+ ConsolidatedIntoNoteID: z.string().nullable().describe(`
1838
+ * * Field Name: ConsolidatedIntoNoteID
1839
+ * * Display Name: Consolidated Into Note ID
1840
+ * * SQL Data Type: uniqueidentifier
1841
+ * * Related Entity/Foreign Key: MJ: AI Agent Notes (vwAIAgentNotes.ID)
1842
+ * * Description: Self-referential FK. Points to the consolidated note that replaced this one when revoked during consolidation or contradiction resolution.`),
1843
+ ConsolidationCount: z.number().describe(`
1844
+ * * Field Name: ConsolidationCount
1845
+ * * Display Name: Consolidation Count
1846
+ * * SQL Data Type: int
1847
+ * * Default Value: 0
1848
+ * * Description: Tracks re-summarization depth. 0=raw extraction, 1=first consolidation, etc. Capped at 3 to prevent semantic drift.`),
1849
+ DerivedFromNoteIDs: z.string().nullable().describe(`
1850
+ * * Field Name: DerivedFromNoteIDs
1851
+ * * Display Name: Derived From Note I Ds
1852
+ * * SQL Data Type: nvarchar(MAX)
1853
+ * * Description: JSON array of source note IDs that were consolidated into this note. Enables provenance chain resolution and rollback.`),
1854
+ ProtectionTier: z.union([z.literal('Ephemeral'), z.literal('Immutable'), z.literal('Protected'), z.literal('Standard')]).describe(`
1855
+ * * Field Name: ProtectionTier
1856
+ * * Display Name: Protection Tier
1857
+ * * SQL Data Type: nvarchar(20)
1858
+ * * Default Value: Standard
1859
+ * * Value List Type: List
1860
+ * * Possible Values
1861
+ * * Ephemeral
1862
+ * * Immutable
1863
+ * * Protected
1864
+ * * Standard
1865
+ * * Description: Protection level: Immutable (never consolidated/archived), Protected (no consolidation, extended 365-day retention), Standard (default), Ephemeral (aggressive consolidation, 2x decay rate).`),
1866
+ ImportanceScore: z.number().nullable().describe(`
1867
+ * * Field Name: ImportanceScore
1868
+ * * Display Name: Importance Score
1869
+ * * SQL Data Type: decimal(5, 2)
1870
+ * * Description: Composite importance score (0-10) computed from 7 signals: recency, LLM-importance, relevance, uniqueness, correction boost, goal alignment, user mark. Replaces raw AccessCount for authority and retention decisions.`),
1813
1871
  Agent: z.string().nullable().describe(`
1814
1872
  * * Field Name: Agent
1815
1873
  * * Display Name: Agent
@@ -1846,6 +1904,14 @@ export const MJAIAgentNoteSchema = z.object({
1846
1904
  * * Field Name: PrimaryScopeEntity
1847
1905
  * * Display Name: Primary Scope Entity
1848
1906
  * * SQL Data Type: nvarchar(255)`),
1907
+ ConsolidatedIntoNote: z.string().nullable().describe(`
1908
+ * * Field Name: ConsolidatedIntoNote
1909
+ * * Display Name: Consolidated Into Note
1910
+ * * SQL Data Type: nvarchar(MAX)`),
1911
+ RootConsolidatedIntoNoteID: z.string().nullable().describe(`
1912
+ * * Field Name: RootConsolidatedIntoNoteID
1913
+ * * Display Name: Root Consolidated Into Note ID
1914
+ * * SQL Data Type: uniqueidentifier`),
1849
1915
  });
1850
1916
  /**
1851
1917
  * zod schema definition for the entity MJ: AI Agent Permissions
@@ -2857,6 +2923,11 @@ each time the agent processes a prompt step.`),
2857
2923
  * * Display Name: External Reference ID
2858
2924
  * * SQL Data Type: nvarchar(200)
2859
2925
  * * Description: Optional reference ID from an external system that initiated this agent run. Enables correlation between the caller's agent run and this execution. For example, when Skip SaaS is called via SkipProxyAgent, this stores the MJ-side Agent Run ID.`),
2926
+ CompanyID: z.string().nullable().describe(`
2927
+ * * Field Name: CompanyID
2928
+ * * Display Name: Company ID
2929
+ * * SQL Data Type: uniqueidentifier
2930
+ * * Description: Optional company scope for multi-tenant memory. When populated, Memory Manager uses this to scope extracted notes to the company. Flows from ExecuteAgentParams.companyId at agent invocation time.`),
2860
2931
  Agent: z.string().nullable().describe(`
2861
2932
  * * Field Name: Agent
2862
2933
  * * Display Name: Agent Name
@@ -6938,6 +7009,402 @@ export const MJApplicationSchema = z.object({
6938
7009
  * * Default Value: 1
6939
7010
  * * Description: When true, Path is automatically generated from Name on save. Set to false to manually control the Path value. Defaults to true for new applications.`),
6940
7011
  });
7012
+ /**
7013
+ * zod schema definition for the entity MJ: Archive Configuration Entities
7014
+ */
7015
+ export const MJArchiveConfigurationEntitySchema = z.object({
7016
+ ID: z.string().describe(`
7017
+ * * Field Name: ID
7018
+ * * Display Name: ID
7019
+ * * SQL Data Type: uniqueidentifier
7020
+ * * Default Value: newsequentialid()`),
7021
+ ArchiveConfigurationID: z.string().describe(`
7022
+ * * Field Name: ArchiveConfigurationID
7023
+ * * Display Name: Archive Configuration
7024
+ * * SQL Data Type: uniqueidentifier
7025
+ * * Related Entity/Foreign Key: MJ: Archive Configurations (vwArchiveConfigurations.ID)
7026
+ * * Description: Foreign key to the parent ArchiveConfiguration.`),
7027
+ EntityID: z.string().describe(`
7028
+ * * Field Name: EntityID
7029
+ * * Display Name: Entity
7030
+ * * SQL Data Type: uniqueidentifier
7031
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
7032
+ * * Description: Foreign key to the Entity being archived.`),
7033
+ Mode: z.union([z.literal('ArchiveOnly'), z.literal('HardDelete'), z.literal('StripFields')]).nullable().describe(`
7034
+ * * Field Name: Mode
7035
+ * * Display Name: Archive Mode
7036
+ * * SQL Data Type: nvarchar(20)
7037
+ * * Value List Type: List
7038
+ * * Possible Values
7039
+ * * ArchiveOnly
7040
+ * * HardDelete
7041
+ * * StripFields
7042
+ * * Description: Archive mode override for this entity. NULL inherits from the parent configuration's DefaultMode.`),
7043
+ RetentionDays: z.number().nullable().describe(`
7044
+ * * Field Name: RetentionDays
7045
+ * * Display Name: Retention Days
7046
+ * * SQL Data Type: int
7047
+ * * Description: Retention period override in days. NULL inherits from the parent configuration's DefaultRetentionDays.`),
7048
+ DateField: z.string().describe(`
7049
+ * * Field Name: DateField
7050
+ * * Display Name: Date Field
7051
+ * * SQL Data Type: nvarchar(100)
7052
+ * * Default Value: __mj_CreatedAt
7053
+ * * Description: The date field on the entity used to determine record age for retention policy evaluation. Defaults to __mj_CreatedAt.`),
7054
+ FilterExpression: z.string().nullable().describe(`
7055
+ * * Field Name: FilterExpression
7056
+ * * Display Name: Filter Expression
7057
+ * * SQL Data Type: nvarchar(MAX)
7058
+ * * Description: Optional SQL WHERE clause fragment to further filter which records are eligible for archiving (e.g., "Status = 'Closed'").`),
7059
+ BatchSize: z.number().nullable().describe(`
7060
+ * * Field Name: BatchSize
7061
+ * * Display Name: Batch Size
7062
+ * * SQL Data Type: int
7063
+ * * Description: Batch size override for this entity. NULL inherits from the parent configuration's DefaultBatchSize.`),
7064
+ Priority: z.number().describe(`
7065
+ * * Field Name: Priority
7066
+ * * Display Name: Priority
7067
+ * * SQL Data Type: int
7068
+ * * Default Value: 100
7069
+ * * Description: Processing priority — lower numbers are archived first. Default is 100.`),
7070
+ FieldConfiguration: z.string().describe(`
7071
+ * * Field Name: FieldConfiguration
7072
+ * * Display Name: Field Configuration
7073
+ * * SQL Data Type: nvarchar(MAX)
7074
+ * * Description: JSON configuration specifying which fields to include/exclude in the archive output. Required for all modes.`),
7075
+ DriverClass: z.string().nullable().describe(`
7076
+ * * Field Name: DriverClass
7077
+ * * Display Name: Driver Class
7078
+ * * SQL Data Type: nvarchar(500)
7079
+ * * Description: Optional fully-qualified class name of a custom archive driver to use for this entity, overriding the default archiver.`),
7080
+ ArchiveRelatedRecordChanges: z.boolean().nullable().describe(`
7081
+ * * Field Name: ArchiveRelatedRecordChanges
7082
+ * * Display Name: Archive Related Record Changes
7083
+ * * SQL Data Type: bit
7084
+ * * Description: Override for archiving related Record Changes. NULL inherits from the parent configuration.`),
7085
+ IsActive: z.boolean().describe(`
7086
+ * * Field Name: IsActive
7087
+ * * Display Name: Is Active
7088
+ * * SQL Data Type: bit
7089
+ * * Default Value: 1
7090
+ * * Description: Whether this entity is active within the archive configuration.`),
7091
+ __mj_CreatedAt: z.date().describe(`
7092
+ * * Field Name: __mj_CreatedAt
7093
+ * * Display Name: Created At
7094
+ * * SQL Data Type: datetimeoffset
7095
+ * * Default Value: getutcdate()`),
7096
+ __mj_UpdatedAt: z.date().describe(`
7097
+ * * Field Name: __mj_UpdatedAt
7098
+ * * Display Name: Updated At
7099
+ * * SQL Data Type: datetimeoffset
7100
+ * * Default Value: getutcdate()`),
7101
+ ArchiveConfiguration: z.string().describe(`
7102
+ * * Field Name: ArchiveConfiguration
7103
+ * * Display Name: Archive Configuration Name
7104
+ * * SQL Data Type: nvarchar(255)`),
7105
+ Entity: z.string().describe(`
7106
+ * * Field Name: Entity
7107
+ * * Display Name: Entity Name
7108
+ * * SQL Data Type: nvarchar(255)`),
7109
+ });
7110
+ /**
7111
+ * zod schema definition for the entity MJ: Archive Configurations
7112
+ */
7113
+ export const MJArchiveConfigurationSchema = z.object({
7114
+ ID: z.string().describe(`
7115
+ * * Field Name: ID
7116
+ * * Display Name: ID
7117
+ * * SQL Data Type: uniqueidentifier
7118
+ * * Default Value: newsequentialid()`),
7119
+ Name: z.string().describe(`
7120
+ * * Field Name: Name
7121
+ * * Display Name: Name
7122
+ * * SQL Data Type: nvarchar(255)
7123
+ * * Description: Human-readable name for this archive configuration.`),
7124
+ Description: z.string().nullable().describe(`
7125
+ * * Field Name: Description
7126
+ * * Display Name: Description
7127
+ * * SQL Data Type: nvarchar(MAX)`),
7128
+ StorageAccountID: z.string().nullable().describe(`
7129
+ * * Field Name: StorageAccountID
7130
+ * * Display Name: Storage Account
7131
+ * * SQL Data Type: uniqueidentifier
7132
+ * * Related Entity/Foreign Key: MJ: File Storage Accounts (vwFileStorageAccounts.ID)
7133
+ * * Description: Foreign key to FileStorageAccount — the blob/file storage target for archived data.`),
7134
+ RootPath: z.string().describe(`
7135
+ * * Field Name: RootPath
7136
+ * * Display Name: Root Path
7137
+ * * SQL Data Type: nvarchar(500)
7138
+ * * Description: Root path within the storage account where archive files are written (e.g., "archives/production/").`),
7139
+ ArchiveFormat: z.union([z.literal('CSV'), z.literal('JSON'), z.literal('Parquet')]).describe(`
7140
+ * * Field Name: ArchiveFormat
7141
+ * * Display Name: Archive Format
7142
+ * * SQL Data Type: nvarchar(20)
7143
+ * * Default Value: JSON
7144
+ * * Value List Type: List
7145
+ * * Possible Values
7146
+ * * CSV
7147
+ * * JSON
7148
+ * * Parquet
7149
+ * * Description: Output format for archived records: JSON, Parquet, or CSV.`),
7150
+ IsActive: z.boolean().describe(`
7151
+ * * Field Name: IsActive
7152
+ * * Display Name: Is Active
7153
+ * * SQL Data Type: bit
7154
+ * * Default Value: 0
7155
+ * * Description: Whether this configuration is active and eligible for scheduled archive runs.`),
7156
+ DefaultRetentionDays: z.number().describe(`
7157
+ * * Field Name: DefaultRetentionDays
7158
+ * * Display Name: Default Retention Days
7159
+ * * SQL Data Type: int
7160
+ * * Default Value: 365
7161
+ * * Description: Default number of days after which records become eligible for archiving. Can be overridden per entity.`),
7162
+ DefaultMode: z.union([z.literal('ArchiveOnly'), z.literal('HardDelete'), z.literal('StripFields')]).describe(`
7163
+ * * Field Name: DefaultMode
7164
+ * * Display Name: Default Mode
7165
+ * * SQL Data Type: nvarchar(20)
7166
+ * * Default Value: StripFields
7167
+ * * Value List Type: List
7168
+ * * Possible Values
7169
+ * * ArchiveOnly
7170
+ * * HardDelete
7171
+ * * StripFields
7172
+ * * Description: Default archive mode: StripFields (null out specified fields), HardDelete (delete from source after archiving), ArchiveOnly (copy to storage without modifying source).`),
7173
+ DefaultBatchSize: z.number().describe(`
7174
+ * * Field Name: DefaultBatchSize
7175
+ * * Display Name: Default Batch Size
7176
+ * * SQL Data Type: int
7177
+ * * Default Value: 100
7178
+ * * Description: Default number of records to process per batch during archive runs.`),
7179
+ ArchiveRelatedRecordChanges: z.boolean().describe(`
7180
+ * * Field Name: ArchiveRelatedRecordChanges
7181
+ * * Display Name: Archive Related Record Changes
7182
+ * * SQL Data Type: bit
7183
+ * * Default Value: 1
7184
+ * * Description: When enabled, related Record Changes entries are also archived alongside the source records.`),
7185
+ Status: z.union([z.literal('Disabled'), z.literal('Error'), z.literal('Idle'), z.literal('Running')]).describe(`
7186
+ * * Field Name: Status
7187
+ * * Display Name: Status
7188
+ * * SQL Data Type: nvarchar(20)
7189
+ * * Default Value: Idle
7190
+ * * Value List Type: List
7191
+ * * Possible Values
7192
+ * * Disabled
7193
+ * * Error
7194
+ * * Idle
7195
+ * * Running
7196
+ * * Description: Current operational status of this configuration: Idle, Running, Error, or Disabled.`),
7197
+ CreatedByUserID: z.string().describe(`
7198
+ * * Field Name: CreatedByUserID
7199
+ * * Display Name: Created By User ID
7200
+ * * SQL Data Type: uniqueidentifier
7201
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
7202
+ * * Description: The user who created this archive configuration.`),
7203
+ __mj_CreatedAt: z.date().describe(`
7204
+ * * Field Name: __mj_CreatedAt
7205
+ * * Display Name: Created At
7206
+ * * SQL Data Type: datetimeoffset
7207
+ * * Default Value: getutcdate()`),
7208
+ __mj_UpdatedAt: z.date().describe(`
7209
+ * * Field Name: __mj_UpdatedAt
7210
+ * * Display Name: Updated At
7211
+ * * SQL Data Type: datetimeoffset
7212
+ * * Default Value: getutcdate()`),
7213
+ StorageAccount: z.string().nullable().describe(`
7214
+ * * Field Name: StorageAccount
7215
+ * * Display Name: Storage Account Name
7216
+ * * SQL Data Type: nvarchar(200)`),
7217
+ CreatedByUser: z.string().describe(`
7218
+ * * Field Name: CreatedByUser
7219
+ * * Display Name: Created By User
7220
+ * * SQL Data Type: nvarchar(100)`),
7221
+ });
7222
+ /**
7223
+ * zod schema definition for the entity MJ: Archive Run Details
7224
+ */
7225
+ export const MJArchiveRunDetailSchema = z.object({
7226
+ ID: z.string().describe(`
7227
+ * * Field Name: ID
7228
+ * * Display Name: ID
7229
+ * * SQL Data Type: uniqueidentifier
7230
+ * * Default Value: newsequentialid()`),
7231
+ ArchiveRunID: z.string().describe(`
7232
+ * * Field Name: ArchiveRunID
7233
+ * * Display Name: Archive Run
7234
+ * * SQL Data Type: uniqueidentifier
7235
+ * * Related Entity/Foreign Key: MJ: Archive Runs (vwArchiveRuns.ID)
7236
+ * * Description: Foreign key to the parent ArchiveRun.`),
7237
+ EntityID: z.string().describe(`
7238
+ * * Field Name: EntityID
7239
+ * * Display Name: Entity ID
7240
+ * * SQL Data Type: uniqueidentifier
7241
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
7242
+ * * Description: Foreign key to the Entity this record belongs to.`),
7243
+ RecordID: z.string().describe(`
7244
+ * * Field Name: RecordID
7245
+ * * Display Name: Record ID
7246
+ * * SQL Data Type: nvarchar(750)
7247
+ * * Description: The primary key value of the archived record (string representation to support all key types).`),
7248
+ Status: z.union([z.literal('Failed'), z.literal('Skipped'), z.literal('Success')]).describe(`
7249
+ * * Field Name: Status
7250
+ * * Display Name: Status
7251
+ * * SQL Data Type: nvarchar(50)
7252
+ * * Value List Type: List
7253
+ * * Possible Values
7254
+ * * Failed
7255
+ * * Skipped
7256
+ * * Success
7257
+ * * Description: Outcome for this record: Success, Failed, or Skipped.`),
7258
+ StoragePath: z.string().nullable().describe(`
7259
+ * * Field Name: StoragePath
7260
+ * * Display Name: Storage Path
7261
+ * * SQL Data Type: nvarchar(1000)
7262
+ * * Description: Full path to the archived file in storage (e.g., "archives/production/Users/2026/04/record-id.json").`),
7263
+ BytesArchived: z.number().describe(`
7264
+ * * Field Name: BytesArchived
7265
+ * * Display Name: Bytes Archived
7266
+ * * SQL Data Type: bigint
7267
+ * * Default Value: 0
7268
+ * * Description: Number of bytes written to storage for this record.`),
7269
+ ErrorMessage: z.string().nullable().describe(`
7270
+ * * Field Name: ErrorMessage
7271
+ * * Display Name: Error Message
7272
+ * * SQL Data Type: nvarchar(MAX)
7273
+ * * Description: Error details when Status is Failed.`),
7274
+ ArchivedAt: z.date().nullable().describe(`
7275
+ * * Field Name: ArchivedAt
7276
+ * * Display Name: Archived At
7277
+ * * SQL Data Type: datetimeoffset
7278
+ * * Description: Timestamp when this record was successfully archived.`),
7279
+ VersionStamp: z.date().nullable().describe(`
7280
+ * * Field Name: VersionStamp
7281
+ * * Display Name: Version Stamp
7282
+ * * SQL Data Type: datetimeoffset
7283
+ * * Description: The __mj_UpdatedAt timestamp of the record at the time of archiving, used for conflict detection during restore.`),
7284
+ IsRecordChangeArchive: z.boolean().describe(`
7285
+ * * Field Name: IsRecordChangeArchive
7286
+ * * Display Name: Is Record Change
7287
+ * * SQL Data Type: bit
7288
+ * * Default Value: 0
7289
+ * * Description: When true, this detail row represents an archived Record Change entry rather than a primary entity record.`),
7290
+ __mj_CreatedAt: z.date().describe(`
7291
+ * * Field Name: __mj_CreatedAt
7292
+ * * Display Name: Created At
7293
+ * * SQL Data Type: datetimeoffset
7294
+ * * Default Value: getutcdate()`),
7295
+ __mj_UpdatedAt: z.date().describe(`
7296
+ * * Field Name: __mj_UpdatedAt
7297
+ * * Display Name: Updated At
7298
+ * * SQL Data Type: datetimeoffset
7299
+ * * Default Value: getutcdate()`),
7300
+ ArchiveRun: z.date().describe(`
7301
+ * * Field Name: ArchiveRun
7302
+ * * Display Name: Archive Run Timestamp
7303
+ * * SQL Data Type: datetimeoffset`),
7304
+ Entity: z.string().describe(`
7305
+ * * Field Name: Entity
7306
+ * * Display Name: Entity Name
7307
+ * * SQL Data Type: nvarchar(255)`),
7308
+ });
7309
+ /**
7310
+ * zod schema definition for the entity MJ: Archive Runs
7311
+ */
7312
+ export const MJArchiveRunSchema = z.object({
7313
+ ID: z.string().describe(`
7314
+ * * Field Name: ID
7315
+ * * Display Name: ID
7316
+ * * SQL Data Type: uniqueidentifier
7317
+ * * Default Value: newsequentialid()`),
7318
+ ArchiveConfigurationID: z.string().describe(`
7319
+ * * Field Name: ArchiveConfigurationID
7320
+ * * Display Name: Archive Configuration
7321
+ * * SQL Data Type: uniqueidentifier
7322
+ * * Related Entity/Foreign Key: MJ: Archive Configurations (vwArchiveConfigurations.ID)
7323
+ * * Description: Foreign key to the ArchiveConfiguration that was executed.`),
7324
+ StartedAt: z.date().describe(`
7325
+ * * Field Name: StartedAt
7326
+ * * Display Name: Started At
7327
+ * * SQL Data Type: datetimeoffset
7328
+ * * Default Value: getutcdate()
7329
+ * * Description: Timestamp when the archive run started.`),
7330
+ CompletedAt: z.date().nullable().describe(`
7331
+ * * Field Name: CompletedAt
7332
+ * * Display Name: Completed At
7333
+ * * SQL Data Type: datetimeoffset
7334
+ * * Description: Timestamp when the archive run completed (NULL while still running).`),
7335
+ Status: z.union([z.literal('Cancelled'), z.literal('Complete'), z.literal('Failed'), z.literal('PartialSuccess'), z.literal('Running')]).describe(`
7336
+ * * Field Name: Status
7337
+ * * Display Name: Status
7338
+ * * SQL Data Type: nvarchar(50)
7339
+ * * Default Value: Running
7340
+ * * Value List Type: List
7341
+ * * Possible Values
7342
+ * * Cancelled
7343
+ * * Complete
7344
+ * * Failed
7345
+ * * PartialSuccess
7346
+ * * Running
7347
+ * * Description: Current status: Running, Complete, Failed, Cancelled, or PartialSuccess.`),
7348
+ TotalRecords: z.number().describe(`
7349
+ * * Field Name: TotalRecords
7350
+ * * Display Name: Total Records
7351
+ * * SQL Data Type: int
7352
+ * * Default Value: 0
7353
+ * * Description: Total number of records identified for archiving in this run.`),
7354
+ ArchivedRecords: z.number().describe(`
7355
+ * * Field Name: ArchivedRecords
7356
+ * * Display Name: Archived Records
7357
+ * * SQL Data Type: int
7358
+ * * Default Value: 0
7359
+ * * Description: Number of records successfully archived.`),
7360
+ FailedRecords: z.number().describe(`
7361
+ * * Field Name: FailedRecords
7362
+ * * Display Name: Failed Records
7363
+ * * SQL Data Type: int
7364
+ * * Default Value: 0
7365
+ * * Description: Number of records that failed to archive.`),
7366
+ SkippedRecords: z.number().describe(`
7367
+ * * Field Name: SkippedRecords
7368
+ * * Display Name: Skipped Records
7369
+ * * SQL Data Type: int
7370
+ * * Default Value: 0
7371
+ * * Description: Number of records skipped (e.g., already archived or filtered out).`),
7372
+ TotalBytesArchived: z.number().describe(`
7373
+ * * Field Name: TotalBytesArchived
7374
+ * * Display Name: Total Bytes Archived
7375
+ * * SQL Data Type: bigint
7376
+ * * Default Value: 0
7377
+ * * Description: Total bytes written to archive storage during this run.`),
7378
+ ErrorLog: z.string().nullable().describe(`
7379
+ * * Field Name: ErrorLog
7380
+ * * Display Name: Error Log
7381
+ * * SQL Data Type: nvarchar(MAX)
7382
+ * * Description: Aggregated error log for the run. Contains error details when Status is Failed or PartialSuccess.`),
7383
+ UserID: z.string().describe(`
7384
+ * * Field Name: UserID
7385
+ * * Display Name: Initiated By
7386
+ * * SQL Data Type: uniqueidentifier
7387
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
7388
+ * * Description: The user who initiated this archive run.`),
7389
+ __mj_CreatedAt: z.date().describe(`
7390
+ * * Field Name: __mj_CreatedAt
7391
+ * * Display Name: Created At
7392
+ * * SQL Data Type: datetimeoffset
7393
+ * * Default Value: getutcdate()`),
7394
+ __mj_UpdatedAt: z.date().describe(`
7395
+ * * Field Name: __mj_UpdatedAt
7396
+ * * Display Name: Updated At
7397
+ * * SQL Data Type: datetimeoffset
7398
+ * * Default Value: getutcdate()`),
7399
+ ArchiveConfiguration: z.string().describe(`
7400
+ * * Field Name: ArchiveConfiguration
7401
+ * * Display Name: Configuration Name
7402
+ * * SQL Data Type: nvarchar(255)`),
7403
+ User: z.string().describe(`
7404
+ * * Field Name: User
7405
+ * * Display Name: User Name
7406
+ * * SQL Data Type: nvarchar(100)`),
7407
+ });
6941
7408
  /**
6942
7409
  * zod schema definition for the entity MJ: Artifact Permissions
6943
7410
  */
@@ -7057,7 +7524,7 @@ export const MJArtifactTypeSchema = z.object({
7057
7524
  * * Description: Parent artifact type ID for hierarchical artifact type organization. Child types inherit ExtractRules from parent but can override.`),
7058
7525
  ExtractRules: z.string().nullable().describe(`
7059
7526
  * * Field Name: ExtractRules
7060
- * * Display Name: Extract Rules
7527
+ * * Display Name: Extraction Rules
7061
7528
  * * SQL Data Type: nvarchar(MAX)
7062
7529
  * * Description: JSON array of extraction rules defining how to extract attributes from artifact content. Each rule has: name (string), description (string), type (TypeScript type), standardProperty ('name'|'description'|'displayMarkdown'|'displayHtml'|null), extractor (JavaScript code string). Child types inherit parent rules and can override by name.`),
7063
7530
  DriverClass: z.string().nullable().describe(`
@@ -7080,6 +7547,11 @@ export const MJArtifactTypeSchema = z.object({
7080
7547
  * * File
7081
7548
  * * Text
7082
7549
  * * Description: Classifies whether this artifact type stores text content ('Text', the default for all existing types) or a binary file in MJStorage ('File'). Used by AgentRunner and viewer components to route file-based artifacts correctly.`),
7550
+ ToolLibraryClass: z.string().nullable().describe(`
7551
+ * * Field Name: ToolLibraryClass
7552
+ * * Display Name: Tool Library Class
7553
+ * * SQL Data Type: nvarchar(100)
7554
+ * * Description: Class name for the BaseArtifactToolLibrary subclass that provides type-specific artifact exploration tools for agents. Resolved via ClassFactory. When NULL, ArtifactToolManager uses name-based fallback resolution.`),
7083
7555
  Parent: z.string().nullable().describe(`
7084
7556
  * * Field Name: Parent
7085
7557
  * * Display Name: Parent
@@ -14493,6 +14965,7 @@ export const MJEntityOrganicKeySchema = z.object({
14493
14965
  export const MJEntityPermissionSchema = z.object({
14494
14966
  ID: z.string().describe(`
14495
14967
  * * Field Name: ID
14968
+ * * Display Name: ID
14496
14969
  * * SQL Data Type: uniqueidentifier
14497
14970
  * * Default Value: newsequentialid()`),
14498
14971
  EntityID: z.string().describe(`
@@ -14531,34 +15004,44 @@ export const MJEntityPermissionSchema = z.object({
14531
15004
  * * Description: Whether the role/user can delete records from this entity.`),
14532
15005
  ReadRLSFilterID: z.string().nullable().describe(`
14533
15006
  * * Field Name: ReadRLSFilterID
14534
- * * Display Name: Read RLSFilter ID
15007
+ * * Display Name: Read Filter ID
14535
15008
  * * SQL Data Type: uniqueidentifier
14536
15009
  * * Related Entity/Foreign Key: MJ: Row Level Security Filters (vwRowLevelSecurityFilters.ID)`),
14537
15010
  CreateRLSFilterID: z.string().nullable().describe(`
14538
15011
  * * Field Name: CreateRLSFilterID
14539
- * * Display Name: Create RLSFilter ID
15012
+ * * Display Name: Create Filter ID
14540
15013
  * * SQL Data Type: uniqueidentifier
14541
15014
  * * Related Entity/Foreign Key: MJ: Row Level Security Filters (vwRowLevelSecurityFilters.ID)`),
14542
15015
  UpdateRLSFilterID: z.string().nullable().describe(`
14543
15016
  * * Field Name: UpdateRLSFilterID
14544
- * * Display Name: Update RLSFilter ID
15017
+ * * Display Name: Update Filter ID
14545
15018
  * * SQL Data Type: uniqueidentifier
14546
15019
  * * Related Entity/Foreign Key: MJ: Row Level Security Filters (vwRowLevelSecurityFilters.ID)`),
14547
15020
  DeleteRLSFilterID: z.string().nullable().describe(`
14548
15021
  * * Field Name: DeleteRLSFilterID
14549
- * * Display Name: Delete RLSFilter ID
15022
+ * * Display Name: Delete Filter ID
14550
15023
  * * SQL Data Type: uniqueidentifier
14551
15024
  * * Related Entity/Foreign Key: MJ: Row Level Security Filters (vwRowLevelSecurityFilters.ID)`),
14552
15025
  __mj_CreatedAt: z.date().describe(`
14553
15026
  * * Field Name: __mj_CreatedAt
14554
- * * Display Name: __mj _Created At
15027
+ * * Display Name: Created At
14555
15028
  * * SQL Data Type: datetimeoffset
14556
15029
  * * Default Value: getutcdate()`),
14557
15030
  __mj_UpdatedAt: z.date().describe(`
14558
15031
  * * Field Name: __mj_UpdatedAt
14559
- * * Display Name: __mj _Updated At
15032
+ * * Display Name: Updated At
14560
15033
  * * SQL Data Type: datetimeoffset
14561
15034
  * * Default Value: getutcdate()`),
15035
+ Type: z.union([z.literal('Allow'), z.literal('Deny')]).describe(`
15036
+ * * Field Name: Type
15037
+ * * Display Name: Access Type
15038
+ * * SQL Data Type: nvarchar(10)
15039
+ * * Default Value: Allow
15040
+ * * Value List Type: List
15041
+ * * Possible Values
15042
+ * * Allow
15043
+ * * Deny
15044
+ * * Description: Allow or Deny. Deny rows override any Allow grants on the same (EntityID, RoleID, action) at evaluation time, letting administrators exclude a role from an action another role grants.`),
14562
15045
  Entity: z.string().describe(`
14563
15046
  * * Field Name: Entity
14564
15047
  * * Display Name: Entity
@@ -14569,23 +15052,23 @@ export const MJEntityPermissionSchema = z.object({
14569
15052
  * * SQL Data Type: nvarchar(50)`),
14570
15053
  RoleSQLName: z.string().nullable().describe(`
14571
15054
  * * Field Name: RoleSQLName
14572
- * * Display Name: Role SQLName
15055
+ * * Display Name: Role SQL Name
14573
15056
  * * SQL Data Type: nvarchar(250)`),
14574
15057
  CreateRLSFilter: z.string().nullable().describe(`
14575
15058
  * * Field Name: CreateRLSFilter
14576
- * * Display Name: Create RLSFilter
15059
+ * * Display Name: Create Filter
14577
15060
  * * SQL Data Type: nvarchar(100)`),
14578
15061
  ReadRLSFilter: z.string().nullable().describe(`
14579
15062
  * * Field Name: ReadRLSFilter
14580
- * * Display Name: Read RLSFilter
15063
+ * * Display Name: Read Filter
14581
15064
  * * SQL Data Type: nvarchar(100)`),
14582
15065
  UpdateRLSFilter: z.string().nullable().describe(`
14583
15066
  * * Field Name: UpdateRLSFilter
14584
- * * Display Name: Update RLSFilter
15067
+ * * Display Name: Update Filter
14585
15068
  * * SQL Data Type: nvarchar(100)`),
14586
15069
  DeleteRLSFilter: z.string().nullable().describe(`
14587
15070
  * * Field Name: DeleteRLSFilter
14588
- * * Display Name: Delete RLSFilter
15071
+ * * Display Name: Delete Filter
14589
15072
  * * SQL Data Type: nvarchar(100)`),
14590
15073
  });
14591
15074
  /**
@@ -15679,7 +16162,7 @@ export const MJIntegrationObjectFieldSchema = z.object({
15679
16162
  * * Description: Foreign key to the IntegrationObject this field belongs to`),
15680
16163
  Name: z.string().describe(`
15681
16164
  * * Field Name: Name
15682
- * * Display Name: Name
16165
+ * * Display Name: Field Name
15683
16166
  * * SQL Data Type: nvarchar(255)
15684
16167
  * * Description: Field name as returned by the external API`),
15685
16168
  DisplayName: z.string().nullable().describe(`
@@ -15754,7 +16237,7 @@ export const MJIntegrationObjectFieldSchema = z.object({
15754
16237
  * * Description: Whether this field is required for create/update operations`),
15755
16238
  RelatedIntegrationObjectID: z.string().nullable().describe(`
15756
16239
  * * Field Name: RelatedIntegrationObjectID
15757
- * * Display Name: Related Integration Object ID
16240
+ * * Display Name: Related Integration Object
15758
16241
  * * SQL Data Type: uniqueidentifier
15759
16242
  * * Related Entity/Foreign Key: MJ: Integration Objects (vwIntegrationObjects.ID)
15760
16243
  * * Description: Foreign key to another IntegrationObject, establishing a relationship. Used for DAG-based dependency ordering and template variable resolution in parent APIPath patterns.`),
@@ -15822,7 +16305,7 @@ export const MJIntegrationObjectSchema = z.object({
15822
16305
  * * Description: Primary key`),
15823
16306
  IntegrationID: z.string().describe(`
15824
16307
  * * Field Name: IntegrationID
15825
- * * Display Name: Integration
16308
+ * * Display Name: Integration ID
15826
16309
  * * SQL Data Type: uniqueidentifier
15827
16310
  * * Related Entity/Foreign Key: MJ: Integrations (vwIntegrations.ID)
15828
16311
  * * Description: Foreign key to the Integration that owns this object`),
@@ -15894,7 +16377,7 @@ export const MJIntegrationObjectSchema = z.object({
15894
16377
  * * Description: Whether data can be pushed back to this object via the API`),
15895
16378
  DefaultQueryParams: z.string().nullable().describe(`
15896
16379
  * * Field Name: DefaultQueryParams
15897
- * * Display Name: Default Query Parameters
16380
+ * * Display Name: Default Query Params
15898
16381
  * * SQL Data Type: nvarchar(MAX)
15899
16382
  * * Description: JSON object of default query parameters to include with every API request for this object`),
15900
16383
  Configuration: z.string().nullable().describe(`
@@ -15954,7 +16437,7 @@ export const MJIntegrationObjectSchema = z.object({
15954
16437
  * * Description: When true, this object was dynamically discovered by IntrospectSchema and is not defined in static connector metadata.`),
15955
16438
  Integration: z.string().describe(`
15956
16439
  * * Field Name: Integration
15957
- * * Display Name: Integration Name
16440
+ * * Display Name: Integration
15958
16441
  * * SQL Data Type: nvarchar(100)`),
15959
16442
  });
15960
16443
  /**
@@ -17146,6 +17629,46 @@ export const MJMCPToolExecutionLogSchema = z.object({
17146
17629
  * * Display Name: User
17147
17630
  * * SQL Data Type: nvarchar(100)`),
17148
17631
  });
17632
+ /**
17633
+ * zod schema definition for the entity MJ: MCP Tool Favorites
17634
+ */
17635
+ export const MJMCPToolFavoriteSchema = z.object({
17636
+ ID: z.string().describe(`
17637
+ * * Field Name: ID
17638
+ * * Display Name: ID
17639
+ * * SQL Data Type: uniqueidentifier
17640
+ * * Default Value: newsequentialid()`),
17641
+ UserID: z.string().describe(`
17642
+ * * Field Name: UserID
17643
+ * * Display Name: User
17644
+ * * SQL Data Type: uniqueidentifier
17645
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
17646
+ * * Description: The user who starred this tool. Favorites are per-user; multiple users can favorite the same tool independently. References the MJ User table.`),
17647
+ MCPServerToolID: z.string().describe(`
17648
+ * * Field Name: MCPServerToolID
17649
+ * * Display Name: MCP Server Tool
17650
+ * * SQL Data Type: uniqueidentifier
17651
+ * * Related Entity/Foreign Key: MJ: MCP Server Tools (vwMCPServerTools.ID)
17652
+ * * Description: The MCP Server Tool that has been favorited. Combined with UserID this forms a unique constraint so a user cannot favorite the same tool twice.`),
17653
+ __mj_CreatedAt: z.date().describe(`
17654
+ * * Field Name: __mj_CreatedAt
17655
+ * * Display Name: Created At
17656
+ * * SQL Data Type: datetimeoffset
17657
+ * * Default Value: getutcdate()`),
17658
+ __mj_UpdatedAt: z.date().describe(`
17659
+ * * Field Name: __mj_UpdatedAt
17660
+ * * Display Name: Updated At
17661
+ * * SQL Data Type: datetimeoffset
17662
+ * * Default Value: getutcdate()`),
17663
+ User: z.string().describe(`
17664
+ * * Field Name: User
17665
+ * * Display Name: User Name
17666
+ * * SQL Data Type: nvarchar(100)`),
17667
+ MCPServerTool: z.string().nullable().describe(`
17668
+ * * Field Name: MCPServerTool
17669
+ * * Display Name: Tool Name
17670
+ * * SQL Data Type: nvarchar(255)`),
17671
+ });
17149
17672
  /**
17150
17673
  * zod schema definition for the entity MJ: O Auth Auth Server Metadata Caches
17151
17674
  */
@@ -17878,6 +18401,86 @@ export const MJOutputTriggerTypeSchema = z.object({
17878
18401
  * * SQL Data Type: datetimeoffset
17879
18402
  * * Default Value: getutcdate()`),
17880
18403
  });
18404
+ /**
18405
+ * zod schema definition for the entity MJ: Permission Domains
18406
+ */
18407
+ export const MJPermissionDomainSchema = z.object({
18408
+ ID: z.string().describe(`
18409
+ * * Field Name: ID
18410
+ * * Display Name: ID
18411
+ * * SQL Data Type: uniqueidentifier
18412
+ * * Default Value: newsequentialid()`),
18413
+ Name: z.string().describe(`
18414
+ * * Field Name: Name
18415
+ * * Display Name: Name
18416
+ * * SQL Data Type: nvarchar(200)
18417
+ * * Description: Human-readable unique name for the permission domain (e.g., "Entity Permissions", "Dashboard Permissions"). Used in admin UI and as the domain identifier in PermissionEngine API calls.`),
18418
+ Description: z.string().nullable().describe(`
18419
+ * * Field Name: Description
18420
+ * * Display Name: Description
18421
+ * * SQL Data Type: nvarchar(MAX)
18422
+ * * Description: Detailed description of what this permission domain covers and how permissions are enforced.`),
18423
+ ProviderClassName: z.string().describe(`
18424
+ * * Field Name: ProviderClassName
18425
+ * * Display Name: Provider Class Name
18426
+ * * SQL Data Type: nvarchar(500)
18427
+ * * Description: ClassFactory key used to instantiate this provider. Must match the key passed to @RegisterClass(PermissionProviderBase, 'ClassName'). Convention: prefix with MJ for built-in providers (e.g., MJEntityPermissionProvider).`),
18428
+ SupportedGranteeTypes: z.string().describe(`
18429
+ * * Field Name: SupportedGranteeTypes
18430
+ * * Display Name: Supported Grantee Types
18431
+ * * SQL Data Type: nvarchar(200)
18432
+ * * Description: Comma-delimited list of grantee types this provider supports. Valid tokens: User, Role, Everyone, Public. Example: "User,Role".`),
18433
+ SupportedActions: z.string().describe(`
18434
+ * * Field Name: SupportedActions
18435
+ * * Display Name: Supported Actions
18436
+ * * SQL Data Type: nvarchar(500)
18437
+ * * Description: Comma-delimited list of permission actions this provider can evaluate. Valid tokens: Read, Create, Update, Delete, Share, Execute, Admin. Example: "Read,Create,Update,Delete".`),
18438
+ SupportsDeny: z.boolean().describe(`
18439
+ * * Field Name: SupportsDeny
18440
+ * * Display Name: Supports Deny
18441
+ * * SQL Data Type: bit
18442
+ * * Default Value: 0
18443
+ * * Description: When true, this provider supports explicit Deny records that override Allow grants at the same scope.`),
18444
+ SupportsExpiration: z.boolean().describe(`
18445
+ * * Field Name: SupportsExpiration
18446
+ * * Display Name: Supports Expiration
18447
+ * * SQL Data Type: bit
18448
+ * * Default Value: 0
18449
+ * * Description: When true, this provider supports time-bound permissions with an expiration timestamp.`),
18450
+ SupportsHierarchyInheritance: z.boolean().describe(`
18451
+ * * Field Name: SupportsHierarchyInheritance
18452
+ * * Display Name: Supports Hierarchy Inheritance
18453
+ * * SQL Data Type: bit
18454
+ * * Default Value: 0
18455
+ * * Description: When true, this provider resolves permissions hierarchically (e.g., category-level grants cascade to items within the category).`),
18456
+ IsActive: z.boolean().describe(`
18457
+ * * Field Name: IsActive
18458
+ * * Display Name: Is Active
18459
+ * * SQL Data Type: bit
18460
+ * * Default Value: 1
18461
+ * * Description: When false, the PermissionEngine skips loading this provider at startup. Use to temporarily disable a provider without removing its record.`),
18462
+ DisplayOrder: z.number().describe(`
18463
+ * * Field Name: DisplayOrder
18464
+ * * Display Name: Display Order
18465
+ * * SQL Data Type: int
18466
+ * * Default Value: 100
18467
+ * * Description: Sort order for displaying domains in the Sharing Center admin UI. Lower numbers appear first.`),
18468
+ Icon: z.string().nullable().describe(`
18469
+ * * Field Name: Icon
18470
+ * * Display Name: Icon
18471
+ * * SQL Data Type: nvarchar(100)
18472
+ * * Description: Optional Font Awesome icon class for display in admin UI (e.g., "fa-solid fa-shield").`),
18473
+ __mj_CreatedAt: z.date().describe(`
18474
+ * * Field Name: __mj_CreatedAt
18475
+ * * Display Name: Created At
18476
+ * * SQL Data Type: datetimeoffset
18477
+ * * Default Value: getutcdate()`),
18478
+ __mj_UpdatedAt: z.date().describe(`
18479
+ * * Field Name: __mj_UpdatedAt
18480
+ * * Display Name: Updated At
18481
+ * * SQL Data Type: datetimeoffset
18482
+ * * Default Value: getutcdate()`),
18483
+ });
17881
18484
  /**
17882
18485
  * zod schema definition for the entity MJ: Projects
17883
18486
  */
@@ -19979,12 +20582,12 @@ export const MJResourcePermissionSchema = z.object({
19979
20582
  * * Description: Reference to the type of resource being shared (View, Dashboard, Report, etc.)`),
19980
20583
  ResourceRecordID: z.string().describe(`
19981
20584
  * * Field Name: ResourceRecordID
19982
- * * Display Name: Resource Record ID
20585
+ * * Display Name: Resource Record
19983
20586
  * * SQL Data Type: nvarchar(255)
19984
20587
  * * Description: ID of the specific resource being shared`),
19985
20588
  Type: z.union([z.literal('Role'), z.literal('User')]).describe(`
19986
20589
  * * Field Name: Type
19987
- * * Display Name: Type
20590
+ * * Display Name: Share Type
19988
20591
  * * SQL Data Type: nvarchar(10)
19989
20592
  * * Value List Type: List
19990
20593
  * * Possible Values
@@ -19993,12 +20596,12 @@ export const MJResourcePermissionSchema = z.object({
19993
20596
  * * Description: The level of sharing either Role or User`),
19994
20597
  StartSharingAt: z.date().nullable().describe(`
19995
20598
  * * Field Name: StartSharingAt
19996
- * * Display Name: Start Sharing At
20599
+ * * Display Name: Start Date
19997
20600
  * * SQL Data Type: datetimeoffset
19998
20601
  * * Description: Optional: Date when sharing starts`),
19999
20602
  EndSharingAt: z.date().nullable().describe(`
20000
20603
  * * Field Name: EndSharingAt
20001
- * * Display Name: End Sharing At
20604
+ * * Display Name: End Date
20002
20605
  * * SQL Data Type: datetimeoffset
20003
20606
  * * Description: Optional: Date when sharing ends`),
20004
20607
  RoleID: z.string().nullable().describe(`
@@ -20043,6 +20646,12 @@ export const MJResourcePermissionSchema = z.object({
20043
20646
  * * Requested
20044
20647
  * * Revoked
20045
20648
  * * Description: Status of the resource permission request. Possible values are Requested, Approved, Rejected, or Revoked.`),
20649
+ SharedByUserID: z.string().nullable().describe(`
20650
+ * * Field Name: SharedByUserID
20651
+ * * Display Name: Shared By User ID
20652
+ * * SQL Data Type: uniqueidentifier
20653
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
20654
+ * * Description: The user who granted this permission. NULL when the share pre-dates this column or when the grantor is unknown (e.g., a system-seeded permission).`),
20046
20655
  ResourceType: z.string().describe(`
20047
20656
  * * Field Name: ResourceType
20048
20657
  * * Display Name: Resource Type
@@ -20055,6 +20664,10 @@ export const MJResourcePermissionSchema = z.object({
20055
20664
  * * Field Name: User
20056
20665
  * * Display Name: User
20057
20666
  * * SQL Data Type: nvarchar(100)`),
20667
+ SharedByUser: z.string().nullable().describe(`
20668
+ * * Field Name: SharedByUser
20669
+ * * Display Name: Shared By User
20670
+ * * SQL Data Type: nvarchar(100)`),
20058
20671
  });
20059
20672
  /**
20060
20673
  * zod schema definition for the entity MJ: Resource Types
@@ -25717,6 +26330,11 @@ export { MJActionResultCodeEntity };
25717
26330
  * @public
25718
26331
  */
25719
26332
  let MJActionEntity = class MJActionEntity extends BaseEntity {
26333
+ constructor() {
26334
+ super(...arguments);
26335
+ this._RuntimeActionConfigurationObject_cached = undefined;
26336
+ this._RuntimeActionConfigurationObject_lastRaw = null;
26337
+ }
25720
26338
  /**
25721
26339
  * Loads the MJ: Actions record from the database
25722
26340
  * @param ID: string - primary key value to load the MJ: Actions record.
@@ -25824,6 +26442,7 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
25824
26442
  * * Possible Values
25825
26443
  * * Custom
25826
26444
  * * Generated
26445
+ * * Runtime
25827
26446
  * * Description: Generated or Custom. Generated means the UserPrompt is used to prompt an AI model to automatically create the code for the Action. Custom means that a custom class has been implemented that subclasses the BaseAction class. The custom class needs to use the @RegisterClass decorator and be included in the MJAPI (or other runtime environment) to be available for execution.
25828
26447
  */
25829
26448
  get Type() {
@@ -25882,7 +26501,7 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
25882
26501
  }
25883
26502
  /**
25884
26503
  * * Field Name: CodeApprovalStatus
25885
- * * Display Name: Code Approval Status
26504
+ * * Display Name: Approval Status
25886
26505
  * * SQL Data Type: nvarchar(20)
25887
26506
  * * Default Value: Pending
25888
26507
  * * Value List Type: List
@@ -25900,7 +26519,7 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
25900
26519
  }
25901
26520
  /**
25902
26521
  * * Field Name: CodeApprovalComments
25903
- * * Display Name: Code Approval Comments
26522
+ * * Display Name: Approval Comments
25904
26523
  * * SQL Data Type: nvarchar(MAX)
25905
26524
  * * Description: Optional comments when an individual (or an AI) reviews and approves the code.
25906
26525
  */
@@ -25912,7 +26531,7 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
25912
26531
  }
25913
26532
  /**
25914
26533
  * * Field Name: CodeApprovedByUserID
25915
- * * Display Name: Code Approved By
26534
+ * * Display Name: Approved By User
25916
26535
  * * SQL Data Type: uniqueidentifier
25917
26536
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
25918
26537
  */
@@ -25924,7 +26543,7 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
25924
26543
  }
25925
26544
  /**
25926
26545
  * * Field Name: CodeApprovedAt
25927
- * * Display Name: Code Approved At
26546
+ * * Display Name: Approved At
25928
26547
  * * SQL Data Type: datetimeoffset
25929
26548
  * * Description: When the code was approved.
25930
26549
  */
@@ -26022,7 +26641,7 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
26022
26641
  }
26023
26642
  /**
26024
26643
  * * Field Name: ParentID
26025
- * * Display Name: Parent
26644
+ * * Display Name: Parent Action
26026
26645
  * * SQL Data Type: uniqueidentifier
26027
26646
  * * Related Entity/Foreign Key: MJ: Actions (vwActions.ID)
26028
26647
  * * Description: Optional ID of the parent action this action inherits from. Used for hierarchical action composition where child actions can specialize parent actions.
@@ -26072,6 +26691,62 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
26072
26691
  this.Set('Config', value);
26073
26692
  }
26074
26693
  /**
26694
+ * * Field Name: RuntimeActionConfiguration
26695
+ * * Display Name: Runtime Configuration
26696
+ * * SQL Data Type: nvarchar(MAX)
26697
+ * * JSON Type: MJActionEntity_IRuntimeActionConfiguration
26698
+ * * Description: JSON blob holding configuration specific to Type='Runtime' actions: declarative permission scopes (allowedEntities, allowedActions, allowedAgents with id+name pairs), resource limits (maxMemoryMB, maxBridgeCalls), and sandbox options (additionalLibraries, debugMode). Evolvable — new keys can be introduced without schema changes. NULL for non-Runtime actions.
26699
+ */
26700
+ get RuntimeActionConfiguration() {
26701
+ return this.Get('RuntimeActionConfiguration');
26702
+ }
26703
+ set RuntimeActionConfiguration(value) {
26704
+ this.Set('RuntimeActionConfiguration', value);
26705
+ }
26706
+ /**
26707
+ * Typed accessor for RuntimeActionConfiguration — returns parsed JSON as MJActionEntity_IRuntimeActionConfiguration.
26708
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
26709
+ */
26710
+ get RuntimeActionConfigurationObject() {
26711
+ const raw = this.RuntimeActionConfiguration;
26712
+ if (raw !== this._RuntimeActionConfigurationObject_lastRaw) {
26713
+ this._RuntimeActionConfigurationObject_cached = raw ? JSON.parse(raw) : null;
26714
+ this._RuntimeActionConfigurationObject_lastRaw = raw;
26715
+ }
26716
+ return this._RuntimeActionConfigurationObject_cached;
26717
+ }
26718
+ set RuntimeActionConfigurationObject(value) {
26719
+ const raw = value ? JSON.stringify(value) : null;
26720
+ this.RuntimeActionConfiguration = raw;
26721
+ this._RuntimeActionConfigurationObject_cached = value;
26722
+ this._RuntimeActionConfigurationObject_lastRaw = raw;
26723
+ }
26724
+ /**
26725
+ * * Field Name: MaxExecutionTimeMS
26726
+ * * Display Name: Max Execution Time (ms)
26727
+ * * SQL Data Type: int
26728
+ * * Description: Universal maximum execution time in milliseconds for a single action invocation. Enforced by ActionEngine across ALL action types (Custom, Generated, Runtime) via AbortSignal passed through RunActionParams. NULL means use the engine default.
26729
+ */
26730
+ get MaxExecutionTimeMS() {
26731
+ return this.Get('MaxExecutionTimeMS');
26732
+ }
26733
+ set MaxExecutionTimeMS(value) {
26734
+ this.Set('MaxExecutionTimeMS', value);
26735
+ }
26736
+ /**
26737
+ * * Field Name: CreatedByAgentID
26738
+ * * Display Name: Created By Agent
26739
+ * * SQL Data Type: uniqueidentifier
26740
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
26741
+ * * Description: Optional reference to the AI Agent that authored this action — populated when an agent (e.g. ActionSmith) dynamically generates a Runtime action. NULL for human-authored Custom/Generated actions. Provides an audit trail linking agent-generated capabilities back to their creator.
26742
+ */
26743
+ get CreatedByAgentID() {
26744
+ return this.Get('CreatedByAgentID');
26745
+ }
26746
+ set CreatedByAgentID(value) {
26747
+ this.Set('CreatedByAgentID', value);
26748
+ }
26749
+ /**
26075
26750
  * * Field Name: Category
26076
26751
  * * Display Name: Category Name
26077
26752
  * * SQL Data Type: nvarchar(255)
@@ -26081,7 +26756,7 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
26081
26756
  }
26082
26757
  /**
26083
26758
  * * Field Name: CodeApprovedByUser
26084
- * * Display Name: Code Approved By (User)
26759
+ * * Display Name: Approved By User Name
26085
26760
  * * SQL Data Type: nvarchar(100)
26086
26761
  */
26087
26762
  get CodeApprovedByUser() {
@@ -26089,7 +26764,7 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
26089
26764
  }
26090
26765
  /**
26091
26766
  * * Field Name: Parent
26092
- * * Display Name: Parent Name
26767
+ * * Display Name: Parent Action Name
26093
26768
  * * SQL Data Type: nvarchar(425)
26094
26769
  */
26095
26770
  get Parent() {
@@ -26097,13 +26772,21 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
26097
26772
  }
26098
26773
  /**
26099
26774
  * * Field Name: DefaultCompactPrompt
26100
- * * Display Name: Default Compact Prompt Text
26775
+ * * Display Name: Default Compact Prompt Name
26101
26776
  * * SQL Data Type: nvarchar(255)
26102
26777
  */
26103
26778
  get DefaultCompactPrompt() {
26104
26779
  return this.Get('DefaultCompactPrompt');
26105
26780
  }
26106
26781
  /**
26782
+ * * Field Name: CreatedByAgent
26783
+ * * Display Name: Created By Agent Name
26784
+ * * SQL Data Type: nvarchar(255)
26785
+ */
26786
+ get CreatedByAgent() {
26787
+ return this.Get('CreatedByAgent');
26788
+ }
26789
+ /**
26107
26790
  * * Field Name: RootParentID
26108
26791
  * * Display Name: Root Parent
26109
26792
  * * SQL Data Type: uniqueidentifier
@@ -27801,6 +28484,7 @@ let MJAIAgentExampleEntity = class MJAIAgentExampleEntity extends BaseEntity {
27801
28484
  * * Value List Type: List
27802
28485
  * * Possible Values
27803
28486
  * * Active
28487
+ * * Archived
27804
28488
  * * Pending
27805
28489
  * * Revoked
27806
28490
  * * Description: Status of the example: Pending (awaiting review), Active (in use), or Revoked (disabled).
@@ -28699,6 +29383,7 @@ let MJAIAgentNoteEntity = class MJAIAgentNoteEntity extends BaseEntity {
28699
29383
  * * Value List Type: List
28700
29384
  * * Possible Values
28701
29385
  * * Active
29386
+ * * Archived
28702
29387
  * * Pending
28703
29388
  * * Revoked
28704
29389
  * * Description: Status of the note: Pending (awaiting review), Active (in use), or Revoked (disabled).
@@ -28861,6 +29546,75 @@ let MJAIAgentNoteEntity = class MJAIAgentNoteEntity extends BaseEntity {
28861
29546
  this.Set('ExpiresAt', value);
28862
29547
  }
28863
29548
  /**
29549
+ * * Field Name: ConsolidatedIntoNoteID
29550
+ * * Display Name: Consolidated Into Note ID
29551
+ * * SQL Data Type: uniqueidentifier
29552
+ * * Related Entity/Foreign Key: MJ: AI Agent Notes (vwAIAgentNotes.ID)
29553
+ * * Description: Self-referential FK. Points to the consolidated note that replaced this one when revoked during consolidation or contradiction resolution.
29554
+ */
29555
+ get ConsolidatedIntoNoteID() {
29556
+ return this.Get('ConsolidatedIntoNoteID');
29557
+ }
29558
+ set ConsolidatedIntoNoteID(value) {
29559
+ this.Set('ConsolidatedIntoNoteID', value);
29560
+ }
29561
+ /**
29562
+ * * Field Name: ConsolidationCount
29563
+ * * Display Name: Consolidation Count
29564
+ * * SQL Data Type: int
29565
+ * * Default Value: 0
29566
+ * * Description: Tracks re-summarization depth. 0=raw extraction, 1=first consolidation, etc. Capped at 3 to prevent semantic drift.
29567
+ */
29568
+ get ConsolidationCount() {
29569
+ return this.Get('ConsolidationCount');
29570
+ }
29571
+ set ConsolidationCount(value) {
29572
+ this.Set('ConsolidationCount', value);
29573
+ }
29574
+ /**
29575
+ * * Field Name: DerivedFromNoteIDs
29576
+ * * Display Name: Derived From Note I Ds
29577
+ * * SQL Data Type: nvarchar(MAX)
29578
+ * * Description: JSON array of source note IDs that were consolidated into this note. Enables provenance chain resolution and rollback.
29579
+ */
29580
+ get DerivedFromNoteIDs() {
29581
+ return this.Get('DerivedFromNoteIDs');
29582
+ }
29583
+ set DerivedFromNoteIDs(value) {
29584
+ this.Set('DerivedFromNoteIDs', value);
29585
+ }
29586
+ /**
29587
+ * * Field Name: ProtectionTier
29588
+ * * Display Name: Protection Tier
29589
+ * * SQL Data Type: nvarchar(20)
29590
+ * * Default Value: Standard
29591
+ * * Value List Type: List
29592
+ * * Possible Values
29593
+ * * Ephemeral
29594
+ * * Immutable
29595
+ * * Protected
29596
+ * * Standard
29597
+ * * Description: Protection level: Immutable (never consolidated/archived), Protected (no consolidation, extended 365-day retention), Standard (default), Ephemeral (aggressive consolidation, 2x decay rate).
29598
+ */
29599
+ get ProtectionTier() {
29600
+ return this.Get('ProtectionTier');
29601
+ }
29602
+ set ProtectionTier(value) {
29603
+ this.Set('ProtectionTier', value);
29604
+ }
29605
+ /**
29606
+ * * Field Name: ImportanceScore
29607
+ * * Display Name: Importance Score
29608
+ * * SQL Data Type: decimal(5, 2)
29609
+ * * Description: Composite importance score (0-10) computed from 7 signals: recency, LLM-importance, relevance, uniqueness, correction boost, goal alignment, user mark. Replaces raw AccessCount for authority and retention decisions.
29610
+ */
29611
+ get ImportanceScore() {
29612
+ return this.Get('ImportanceScore');
29613
+ }
29614
+ set ImportanceScore(value) {
29615
+ this.Set('ImportanceScore', value);
29616
+ }
29617
+ /**
28864
29618
  * * Field Name: Agent
28865
29619
  * * Display Name: Agent
28866
29620
  * * SQL Data Type: nvarchar(255)
@@ -28932,6 +29686,22 @@ let MJAIAgentNoteEntity = class MJAIAgentNoteEntity extends BaseEntity {
28932
29686
  get PrimaryScopeEntity() {
28933
29687
  return this.Get('PrimaryScopeEntity');
28934
29688
  }
29689
+ /**
29690
+ * * Field Name: ConsolidatedIntoNote
29691
+ * * Display Name: Consolidated Into Note
29692
+ * * SQL Data Type: nvarchar(MAX)
29693
+ */
29694
+ get ConsolidatedIntoNote() {
29695
+ return this.Get('ConsolidatedIntoNote');
29696
+ }
29697
+ /**
29698
+ * * Field Name: RootConsolidatedIntoNoteID
29699
+ * * Display Name: Root Consolidated Into Note ID
29700
+ * * SQL Data Type: uniqueidentifier
29701
+ */
29702
+ get RootConsolidatedIntoNoteID() {
29703
+ return this.Get('RootConsolidatedIntoNoteID');
29704
+ }
28935
29705
  };
28936
29706
  MJAIAgentNoteEntity = __decorate([
28937
29707
  RegisterClass(BaseEntity, 'MJ: AI Agent Notes')
@@ -31509,6 +32279,18 @@ each time the agent processes a prompt step.
31509
32279
  this.Set('ExternalReferenceID', value);
31510
32280
  }
31511
32281
  /**
32282
+ * * Field Name: CompanyID
32283
+ * * Display Name: Company ID
32284
+ * * SQL Data Type: uniqueidentifier
32285
+ * * Description: Optional company scope for multi-tenant memory. When populated, Memory Manager uses this to scope extracted notes to the company. Flows from ExecuteAgentParams.companyId at agent invocation time.
32286
+ */
32287
+ get CompanyID() {
32288
+ return this.Get('CompanyID');
32289
+ }
32290
+ set CompanyID(value) {
32291
+ this.Set('CompanyID', value);
32292
+ }
32293
+ /**
31512
32294
  * * Field Name: Agent
31513
32295
  * * Display Name: Agent Name
31514
32296
  * * SQL Data Type: nvarchar(255)
@@ -41725,173 +42507,1243 @@ let MJApplicationSettingEntity = class MJApplicationSettingEntity extends BaseEn
41725
42507
  this.Set('ID', value);
41726
42508
  }
41727
42509
  /**
41728
- * * Field Name: ApplicationID
41729
- * * Display Name: Application ID
42510
+ * * Field Name: ApplicationID
42511
+ * * Display Name: Application ID
42512
+ * * SQL Data Type: uniqueidentifier
42513
+ * * Related Entity/Foreign Key: MJ: Applications (vwApplications.ID)
42514
+ */
42515
+ get ApplicationID() {
42516
+ return this.Get('ApplicationID');
42517
+ }
42518
+ set ApplicationID(value) {
42519
+ this.Set('ApplicationID', value);
42520
+ }
42521
+ /**
42522
+ * * Field Name: Name
42523
+ * * Display Name: Name
42524
+ * * SQL Data Type: nvarchar(100)
42525
+ */
42526
+ get Name() {
42527
+ return this.Get('Name');
42528
+ }
42529
+ set Name(value) {
42530
+ this.Set('Name', value);
42531
+ }
42532
+ /**
42533
+ * * Field Name: Value
42534
+ * * Display Name: Value
42535
+ * * SQL Data Type: nvarchar(MAX)
42536
+ * * Description: The setting value, can be simple text, numbers, booleans, or JSON for complex configuration objects.
42537
+ */
42538
+ get Value() {
42539
+ return this.Get('Value');
42540
+ }
42541
+ set Value(value) {
42542
+ this.Set('Value', value);
42543
+ }
42544
+ /**
42545
+ * * Field Name: Comments
42546
+ * * Display Name: Comments
42547
+ * * SQL Data Type: nvarchar(MAX)
42548
+ */
42549
+ get Comments() {
42550
+ return this.Get('Comments');
42551
+ }
42552
+ set Comments(value) {
42553
+ this.Set('Comments', value);
42554
+ }
42555
+ /**
42556
+ * * Field Name: __mj_CreatedAt
42557
+ * * Display Name: __mj _Created At
42558
+ * * SQL Data Type: datetimeoffset
42559
+ * * Default Value: getutcdate()
42560
+ */
42561
+ get __mj_CreatedAt() {
42562
+ return this.Get('__mj_CreatedAt');
42563
+ }
42564
+ /**
42565
+ * * Field Name: __mj_UpdatedAt
42566
+ * * Display Name: __mj _Updated At
42567
+ * * SQL Data Type: datetimeoffset
42568
+ * * Default Value: getutcdate()
42569
+ */
42570
+ get __mj_UpdatedAt() {
42571
+ return this.Get('__mj_UpdatedAt');
42572
+ }
42573
+ /**
42574
+ * * Field Name: Application
42575
+ * * Display Name: Application
42576
+ * * SQL Data Type: nvarchar(100)
42577
+ */
42578
+ get Application() {
42579
+ return this.Get('Application');
42580
+ }
42581
+ };
42582
+ MJApplicationSettingEntity = __decorate([
42583
+ RegisterClass(BaseEntity, 'MJ: Application Settings')
42584
+ ], MJApplicationSettingEntity);
42585
+ export { MJApplicationSettingEntity };
42586
+ /**
42587
+ * MJ: Applications - strongly typed entity sub-class
42588
+ * * Schema: __mj
42589
+ * * Base Table: Application
42590
+ * * Base View: vwApplications
42591
+ * * @description Applications are used to group entities in the user interface for ease of user access
42592
+ * * Primary Key: ID
42593
+ * @extends {BaseEntity}
42594
+ * @class
42595
+ * @public
42596
+ */
42597
+ let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
42598
+ constructor() {
42599
+ super(...arguments);
42600
+ this._DefaultNavItemsObject_cached = undefined;
42601
+ this._DefaultNavItemsObject_lastRaw = null;
42602
+ }
42603
+ /**
42604
+ * Loads the MJ: Applications record from the database
42605
+ * @param ID: string - primary key value to load the MJ: Applications record.
42606
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
42607
+ * @returns {Promise<boolean>} - true if successful, false otherwise
42608
+ * @public
42609
+ * @async
42610
+ * @memberof MJApplicationEntity
42611
+ * @method
42612
+ * @override
42613
+ */
42614
+ async Load(ID, EntityRelationshipsToLoad) {
42615
+ const compositeKey = new CompositeKey();
42616
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
42617
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
42618
+ }
42619
+ /**
42620
+ * * Field Name: ID
42621
+ * * Display Name: ID
42622
+ * * SQL Data Type: uniqueidentifier
42623
+ * * Default Value: newsequentialid()
42624
+ */
42625
+ get ID() {
42626
+ return this.Get('ID');
42627
+ }
42628
+ set ID(value) {
42629
+ this.Set('ID', value);
42630
+ }
42631
+ /**
42632
+ * * Field Name: Name
42633
+ * * Display Name: Name
42634
+ * * SQL Data Type: nvarchar(100)
42635
+ */
42636
+ get Name() {
42637
+ return this.Get('Name');
42638
+ }
42639
+ set Name(value) {
42640
+ this.Set('Name', value);
42641
+ }
42642
+ /**
42643
+ * * Field Name: Description
42644
+ * * Display Name: Description
42645
+ * * SQL Data Type: nvarchar(MAX)
42646
+ */
42647
+ get Description() {
42648
+ return this.Get('Description');
42649
+ }
42650
+ set Description(value) {
42651
+ this.Set('Description', value);
42652
+ }
42653
+ /**
42654
+ * * Field Name: Icon
42655
+ * * Display Name: Icon
42656
+ * * SQL Data Type: nvarchar(500)
42657
+ * * Description: Specify the CSS class information for the display icon for each application.
42658
+ */
42659
+ get Icon() {
42660
+ return this.Get('Icon');
42661
+ }
42662
+ set Icon(value) {
42663
+ this.Set('Icon', value);
42664
+ }
42665
+ /**
42666
+ * * Field Name: DefaultForNewUser
42667
+ * * Display Name: Default For New User
42668
+ * * SQL Data Type: bit
42669
+ * * Default Value: 1
42670
+ * * Description: If turned on, when a new user first uses the MJ Explorer app, the application records with this turned on will have this application included in their selected application list.
42671
+ */
42672
+ get DefaultForNewUser() {
42673
+ return this.Get('DefaultForNewUser');
42674
+ }
42675
+ set DefaultForNewUser(value) {
42676
+ this.Set('DefaultForNewUser', value);
42677
+ }
42678
+ /**
42679
+ * * Field Name: __mj_CreatedAt
42680
+ * * Display Name: Created At
42681
+ * * SQL Data Type: datetimeoffset
42682
+ * * Default Value: getutcdate()
42683
+ */
42684
+ get __mj_CreatedAt() {
42685
+ return this.Get('__mj_CreatedAt');
42686
+ }
42687
+ /**
42688
+ * * Field Name: __mj_UpdatedAt
42689
+ * * Display Name: Updated At
42690
+ * * SQL Data Type: datetimeoffset
42691
+ * * Default Value: getutcdate()
42692
+ */
42693
+ get __mj_UpdatedAt() {
42694
+ return this.Get('__mj_UpdatedAt');
42695
+ }
42696
+ /**
42697
+ * * Field Name: SchemaAutoAddNewEntities
42698
+ * * Display Name: Schema Auto Add New Entities
42699
+ * * SQL Data Type: nvarchar(MAX)
42700
+ * * Description: Comma-delimited list of schema names where entities will be automatically added to the application when created in those schemas
42701
+ */
42702
+ get SchemaAutoAddNewEntities() {
42703
+ return this.Get('SchemaAutoAddNewEntities');
42704
+ }
42705
+ set SchemaAutoAddNewEntities(value) {
42706
+ this.Set('SchemaAutoAddNewEntities', value);
42707
+ }
42708
+ /**
42709
+ * * Field Name: Color
42710
+ * * Display Name: Color
42711
+ * * SQL Data Type: nvarchar(20)
42712
+ * * Description: Hex color code for visual theming (e.g., #4caf50)
42713
+ */
42714
+ get Color() {
42715
+ return this.Get('Color');
42716
+ }
42717
+ set Color(value) {
42718
+ this.Set('Color', value);
42719
+ }
42720
+ /**
42721
+ * * Field Name: DefaultNavItems
42722
+ * * Display Name: Default Nav Items
42723
+ * * SQL Data Type: nvarchar(MAX)
42724
+ * * JSON Type: Array<MJApplicationEntity_IDefaultNavItem>
42725
+ * * Description: JSON array of default navigation items for this application. Parsed by BaseApplication.GetNavItems()
42726
+ */
42727
+ get DefaultNavItems() {
42728
+ return this.Get('DefaultNavItems');
42729
+ }
42730
+ set DefaultNavItems(value) {
42731
+ this.Set('DefaultNavItems', value);
42732
+ }
42733
+ /**
42734
+ * Typed accessor for DefaultNavItems — returns parsed JSON as Array<MJApplicationEntity_IDefaultNavItem>.
42735
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
42736
+ */
42737
+ get DefaultNavItemsObject() {
42738
+ const raw = this.DefaultNavItems;
42739
+ if (raw !== this._DefaultNavItemsObject_lastRaw) {
42740
+ this._DefaultNavItemsObject_cached = raw ? JSON.parse(raw) : null;
42741
+ this._DefaultNavItemsObject_lastRaw = raw;
42742
+ }
42743
+ return this._DefaultNavItemsObject_cached;
42744
+ }
42745
+ set DefaultNavItemsObject(value) {
42746
+ const raw = value ? JSON.stringify(value) : null;
42747
+ this.DefaultNavItems = raw;
42748
+ this._DefaultNavItemsObject_cached = value;
42749
+ this._DefaultNavItemsObject_lastRaw = raw;
42750
+ }
42751
+ /**
42752
+ * * Field Name: ClassName
42753
+ * * Display Name: Class Name
42754
+ * * SQL Data Type: nvarchar(255)
42755
+ * * Description: TypeScript class name for ClassFactory registration (e.g., CRMApplication)
42756
+ */
42757
+ get ClassName() {
42758
+ return this.Get('ClassName');
42759
+ }
42760
+ set ClassName(value) {
42761
+ this.Set('ClassName', value);
42762
+ }
42763
+ /**
42764
+ * * Field Name: DefaultSequence
42765
+ * * Display Name: Default Sequence
42766
+ * * SQL Data Type: int
42767
+ * * Default Value: 100
42768
+ * * Description: Default sequence position when adding this application to a new user's User Applications. Lower values appear first. Used when DefaultForNewUser is true.
42769
+ */
42770
+ get DefaultSequence() {
42771
+ return this.Get('DefaultSequence');
42772
+ }
42773
+ set DefaultSequence(value) {
42774
+ this.Set('DefaultSequence', value);
42775
+ }
42776
+ /**
42777
+ * * Field Name: Status
42778
+ * * Display Name: Status
42779
+ * * SQL Data Type: nvarchar(20)
42780
+ * * Default Value: Active
42781
+ * * Value List Type: List
42782
+ * * Possible Values
42783
+ * * Active
42784
+ * * Deprecated
42785
+ * * Disabled
42786
+ * * Pending
42787
+ * * Description: Application lifecycle status. Pending = not yet ready, Active = available for use, Disabled = temporarily unavailable, Deprecated = being phased out. Only Active applications are shown to users.
42788
+ */
42789
+ get Status() {
42790
+ return this.Get('Status');
42791
+ }
42792
+ set Status(value) {
42793
+ this.Set('Status', value);
42794
+ }
42795
+ /**
42796
+ * * Field Name: NavigationStyle
42797
+ * * Display Name: Navigation Style
42798
+ * * SQL Data Type: nvarchar(20)
42799
+ * * Default Value: App Switcher
42800
+ * * Value List Type: List
42801
+ * * Possible Values
42802
+ * * App Switcher
42803
+ * * Both
42804
+ * * Nav Bar
42805
+ * * Description: How the application appears in navigation. App Switcher = only in dropdown menu, Nav Bar = permanent icon in top nav, Both = shown in both locations.
42806
+ */
42807
+ get NavigationStyle() {
42808
+ return this.Get('NavigationStyle');
42809
+ }
42810
+ set NavigationStyle(value) {
42811
+ this.Set('NavigationStyle', value);
42812
+ }
42813
+ /**
42814
+ * * Field Name: TopNavLocation
42815
+ * * Display Name: Top Nav Location
42816
+ * * SQL Data Type: nvarchar(30)
42817
+ * * Value List Type: List
42818
+ * * Possible Values
42819
+ * * Left of App Switcher
42820
+ * * Left of User Menu
42821
+ * * Description: Position of the permanent nav icon when NavigationStyle is Nav Bar or Both. Left of App Switcher = appears before the app switcher, Left of User Menu = appears near the user avatar. Ignored when NavigationStyle is App Switcher.
42822
+ */
42823
+ get TopNavLocation() {
42824
+ return this.Get('TopNavLocation');
42825
+ }
42826
+ set TopNavLocation(value) {
42827
+ this.Set('TopNavLocation', value);
42828
+ }
42829
+ /**
42830
+ * * Field Name: HideNavBarIconWhenActive
42831
+ * * Display Name: Hide Nav Bar Icon When Active
42832
+ * * SQL Data Type: bit
42833
+ * * Default Value: 0
42834
+ * * Description: When true, the Nav Bar icon for this application is hidden when the application is active. Useful for launcher-style apps like Home that should only be visible when the user is NOT in that app. Only applies when NavigationStyle is Nav Bar or Both.
42835
+ */
42836
+ get HideNavBarIconWhenActive() {
42837
+ return this.Get('HideNavBarIconWhenActive');
42838
+ }
42839
+ set HideNavBarIconWhenActive(value) {
42840
+ this.Set('HideNavBarIconWhenActive', value);
42841
+ }
42842
+ /**
42843
+ * * Field Name: Path
42844
+ * * Display Name: Path
42845
+ * * SQL Data Type: nvarchar(100)
42846
+ * * Description: URL-friendly slug for the application (e.g., "data-explorer" for "Data Explorer"). Used in URLs instead of the full Name. Auto-generated from Name when AutoUpdatePath is true. Must be unique across all applications.
42847
+ */
42848
+ get Path() {
42849
+ return this.Get('Path');
42850
+ }
42851
+ set Path(value) {
42852
+ this.Set('Path', value);
42853
+ }
42854
+ /**
42855
+ * * Field Name: AutoUpdatePath
42856
+ * * Display Name: Auto Update Path
42857
+ * * SQL Data Type: bit
42858
+ * * Default Value: 1
42859
+ * * Description: When true, Path is automatically generated from Name on save. Set to false to manually control the Path value. Defaults to true for new applications.
42860
+ */
42861
+ get AutoUpdatePath() {
42862
+ return this.Get('AutoUpdatePath');
42863
+ }
42864
+ set AutoUpdatePath(value) {
42865
+ this.Set('AutoUpdatePath', value);
42866
+ }
42867
+ };
42868
+ MJApplicationEntity = __decorate([
42869
+ RegisterClass(BaseEntity, 'MJ: Applications')
42870
+ ], MJApplicationEntity);
42871
+ export { MJApplicationEntity };
42872
+ /**
42873
+ * MJ: Archive Configuration Entities - strongly typed entity sub-class
42874
+ * * Schema: __mj
42875
+ * * Base Table: ArchiveConfigurationEntity
42876
+ * * Base View: vwArchiveConfigurationEntities
42877
+ * * @description Per-entity configuration within an archive pipeline. Allows overriding the parent configuration's defaults for mode, retention, batch size, and filtering on a per-entity basis.
42878
+ * * Primary Key: ID
42879
+ * @extends {BaseEntity}
42880
+ * @class
42881
+ * @public
42882
+ */
42883
+ let MJArchiveConfigurationEntityEntity = class MJArchiveConfigurationEntityEntity extends BaseEntity {
42884
+ /**
42885
+ * Loads the MJ: Archive Configuration Entities record from the database
42886
+ * @param ID: string - primary key value to load the MJ: Archive Configuration Entities record.
42887
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
42888
+ * @returns {Promise<boolean>} - true if successful, false otherwise
42889
+ * @public
42890
+ * @async
42891
+ * @memberof MJArchiveConfigurationEntityEntity
42892
+ * @method
42893
+ * @override
42894
+ */
42895
+ async Load(ID, EntityRelationshipsToLoad) {
42896
+ const compositeKey = new CompositeKey();
42897
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
42898
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
42899
+ }
42900
+ /**
42901
+ * * Field Name: ID
42902
+ * * Display Name: ID
42903
+ * * SQL Data Type: uniqueidentifier
42904
+ * * Default Value: newsequentialid()
42905
+ */
42906
+ get ID() {
42907
+ return this.Get('ID');
42908
+ }
42909
+ set ID(value) {
42910
+ this.Set('ID', value);
42911
+ }
42912
+ /**
42913
+ * * Field Name: ArchiveConfigurationID
42914
+ * * Display Name: Archive Configuration
42915
+ * * SQL Data Type: uniqueidentifier
42916
+ * * Related Entity/Foreign Key: MJ: Archive Configurations (vwArchiveConfigurations.ID)
42917
+ * * Description: Foreign key to the parent ArchiveConfiguration.
42918
+ */
42919
+ get ArchiveConfigurationID() {
42920
+ return this.Get('ArchiveConfigurationID');
42921
+ }
42922
+ set ArchiveConfigurationID(value) {
42923
+ this.Set('ArchiveConfigurationID', value);
42924
+ }
42925
+ /**
42926
+ * * Field Name: EntityID
42927
+ * * Display Name: Entity
42928
+ * * SQL Data Type: uniqueidentifier
42929
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
42930
+ * * Description: Foreign key to the Entity being archived.
42931
+ */
42932
+ get EntityID() {
42933
+ return this.Get('EntityID');
42934
+ }
42935
+ set EntityID(value) {
42936
+ this.Set('EntityID', value);
42937
+ }
42938
+ /**
42939
+ * * Field Name: Mode
42940
+ * * Display Name: Archive Mode
42941
+ * * SQL Data Type: nvarchar(20)
42942
+ * * Value List Type: List
42943
+ * * Possible Values
42944
+ * * ArchiveOnly
42945
+ * * HardDelete
42946
+ * * StripFields
42947
+ * * Description: Archive mode override for this entity. NULL inherits from the parent configuration's DefaultMode.
42948
+ */
42949
+ get Mode() {
42950
+ return this.Get('Mode');
42951
+ }
42952
+ set Mode(value) {
42953
+ this.Set('Mode', value);
42954
+ }
42955
+ /**
42956
+ * * Field Name: RetentionDays
42957
+ * * Display Name: Retention Days
42958
+ * * SQL Data Type: int
42959
+ * * Description: Retention period override in days. NULL inherits from the parent configuration's DefaultRetentionDays.
42960
+ */
42961
+ get RetentionDays() {
42962
+ return this.Get('RetentionDays');
42963
+ }
42964
+ set RetentionDays(value) {
42965
+ this.Set('RetentionDays', value);
42966
+ }
42967
+ /**
42968
+ * * Field Name: DateField
42969
+ * * Display Name: Date Field
42970
+ * * SQL Data Type: nvarchar(100)
42971
+ * * Default Value: __mj_CreatedAt
42972
+ * * Description: The date field on the entity used to determine record age for retention policy evaluation. Defaults to __mj_CreatedAt.
42973
+ */
42974
+ get DateField() {
42975
+ return this.Get('DateField');
42976
+ }
42977
+ set DateField(value) {
42978
+ this.Set('DateField', value);
42979
+ }
42980
+ /**
42981
+ * * Field Name: FilterExpression
42982
+ * * Display Name: Filter Expression
42983
+ * * SQL Data Type: nvarchar(MAX)
42984
+ * * Description: Optional SQL WHERE clause fragment to further filter which records are eligible for archiving (e.g., "Status = 'Closed'").
42985
+ */
42986
+ get FilterExpression() {
42987
+ return this.Get('FilterExpression');
42988
+ }
42989
+ set FilterExpression(value) {
42990
+ this.Set('FilterExpression', value);
42991
+ }
42992
+ /**
42993
+ * * Field Name: BatchSize
42994
+ * * Display Name: Batch Size
42995
+ * * SQL Data Type: int
42996
+ * * Description: Batch size override for this entity. NULL inherits from the parent configuration's DefaultBatchSize.
42997
+ */
42998
+ get BatchSize() {
42999
+ return this.Get('BatchSize');
43000
+ }
43001
+ set BatchSize(value) {
43002
+ this.Set('BatchSize', value);
43003
+ }
43004
+ /**
43005
+ * * Field Name: Priority
43006
+ * * Display Name: Priority
43007
+ * * SQL Data Type: int
43008
+ * * Default Value: 100
43009
+ * * Description: Processing priority — lower numbers are archived first. Default is 100.
43010
+ */
43011
+ get Priority() {
43012
+ return this.Get('Priority');
43013
+ }
43014
+ set Priority(value) {
43015
+ this.Set('Priority', value);
43016
+ }
43017
+ /**
43018
+ * * Field Name: FieldConfiguration
43019
+ * * Display Name: Field Configuration
43020
+ * * SQL Data Type: nvarchar(MAX)
43021
+ * * Description: JSON configuration specifying which fields to include/exclude in the archive output. Required for all modes.
43022
+ */
43023
+ get FieldConfiguration() {
43024
+ return this.Get('FieldConfiguration');
43025
+ }
43026
+ set FieldConfiguration(value) {
43027
+ this.Set('FieldConfiguration', value);
43028
+ }
43029
+ /**
43030
+ * * Field Name: DriverClass
43031
+ * * Display Name: Driver Class
43032
+ * * SQL Data Type: nvarchar(500)
43033
+ * * Description: Optional fully-qualified class name of a custom archive driver to use for this entity, overriding the default archiver.
43034
+ */
43035
+ get DriverClass() {
43036
+ return this.Get('DriverClass');
43037
+ }
43038
+ set DriverClass(value) {
43039
+ this.Set('DriverClass', value);
43040
+ }
43041
+ /**
43042
+ * * Field Name: ArchiveRelatedRecordChanges
43043
+ * * Display Name: Archive Related Record Changes
43044
+ * * SQL Data Type: bit
43045
+ * * Description: Override for archiving related Record Changes. NULL inherits from the parent configuration.
43046
+ */
43047
+ get ArchiveRelatedRecordChanges() {
43048
+ return this.Get('ArchiveRelatedRecordChanges');
43049
+ }
43050
+ set ArchiveRelatedRecordChanges(value) {
43051
+ this.Set('ArchiveRelatedRecordChanges', value);
43052
+ }
43053
+ /**
43054
+ * * Field Name: IsActive
43055
+ * * Display Name: Is Active
43056
+ * * SQL Data Type: bit
43057
+ * * Default Value: 1
43058
+ * * Description: Whether this entity is active within the archive configuration.
43059
+ */
43060
+ get IsActive() {
43061
+ return this.Get('IsActive');
43062
+ }
43063
+ set IsActive(value) {
43064
+ this.Set('IsActive', value);
43065
+ }
43066
+ /**
43067
+ * * Field Name: __mj_CreatedAt
43068
+ * * Display Name: Created At
43069
+ * * SQL Data Type: datetimeoffset
43070
+ * * Default Value: getutcdate()
43071
+ */
43072
+ get __mj_CreatedAt() {
43073
+ return this.Get('__mj_CreatedAt');
43074
+ }
43075
+ /**
43076
+ * * Field Name: __mj_UpdatedAt
43077
+ * * Display Name: Updated At
43078
+ * * SQL Data Type: datetimeoffset
43079
+ * * Default Value: getutcdate()
43080
+ */
43081
+ get __mj_UpdatedAt() {
43082
+ return this.Get('__mj_UpdatedAt');
43083
+ }
43084
+ /**
43085
+ * * Field Name: ArchiveConfiguration
43086
+ * * Display Name: Archive Configuration Name
43087
+ * * SQL Data Type: nvarchar(255)
43088
+ */
43089
+ get ArchiveConfiguration() {
43090
+ return this.Get('ArchiveConfiguration');
43091
+ }
43092
+ /**
43093
+ * * Field Name: Entity
43094
+ * * Display Name: Entity Name
43095
+ * * SQL Data Type: nvarchar(255)
43096
+ */
43097
+ get Entity() {
43098
+ return this.Get('Entity');
43099
+ }
43100
+ };
43101
+ MJArchiveConfigurationEntityEntity = __decorate([
43102
+ RegisterClass(BaseEntity, 'MJ: Archive Configuration Entities')
43103
+ ], MJArchiveConfigurationEntityEntity);
43104
+ export { MJArchiveConfigurationEntityEntity };
43105
+ /**
43106
+ * MJ: Archive Configurations - strongly typed entity sub-class
43107
+ * * Schema: __mj
43108
+ * * Base Table: ArchiveConfiguration
43109
+ * * Base View: vwArchiveConfigurations
43110
+ * * @description Top-level configuration for an archive pipeline. Defines the storage target, default retention policy, archive format, and operational mode for archiving entity records.
43111
+ * * Primary Key: ID
43112
+ * @extends {BaseEntity}
43113
+ * @class
43114
+ * @public
43115
+ */
43116
+ let MJArchiveConfigurationEntity = class MJArchiveConfigurationEntity extends BaseEntity {
43117
+ /**
43118
+ * Loads the MJ: Archive Configurations record from the database
43119
+ * @param ID: string - primary key value to load the MJ: Archive Configurations record.
43120
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
43121
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43122
+ * @public
43123
+ * @async
43124
+ * @memberof MJArchiveConfigurationEntity
43125
+ * @method
43126
+ * @override
43127
+ */
43128
+ async Load(ID, EntityRelationshipsToLoad) {
43129
+ const compositeKey = new CompositeKey();
43130
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
43131
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43132
+ }
43133
+ /**
43134
+ * * Field Name: ID
43135
+ * * Display Name: ID
43136
+ * * SQL Data Type: uniqueidentifier
43137
+ * * Default Value: newsequentialid()
43138
+ */
43139
+ get ID() {
43140
+ return this.Get('ID');
43141
+ }
43142
+ set ID(value) {
43143
+ this.Set('ID', value);
43144
+ }
43145
+ /**
43146
+ * * Field Name: Name
43147
+ * * Display Name: Name
43148
+ * * SQL Data Type: nvarchar(255)
43149
+ * * Description: Human-readable name for this archive configuration.
43150
+ */
43151
+ get Name() {
43152
+ return this.Get('Name');
43153
+ }
43154
+ set Name(value) {
43155
+ this.Set('Name', value);
43156
+ }
43157
+ /**
43158
+ * * Field Name: Description
43159
+ * * Display Name: Description
43160
+ * * SQL Data Type: nvarchar(MAX)
43161
+ */
43162
+ get Description() {
43163
+ return this.Get('Description');
43164
+ }
43165
+ set Description(value) {
43166
+ this.Set('Description', value);
43167
+ }
43168
+ /**
43169
+ * * Field Name: StorageAccountID
43170
+ * * Display Name: Storage Account
43171
+ * * SQL Data Type: uniqueidentifier
43172
+ * * Related Entity/Foreign Key: MJ: File Storage Accounts (vwFileStorageAccounts.ID)
43173
+ * * Description: Foreign key to FileStorageAccount — the blob/file storage target for archived data.
43174
+ */
43175
+ get StorageAccountID() {
43176
+ return this.Get('StorageAccountID');
43177
+ }
43178
+ set StorageAccountID(value) {
43179
+ this.Set('StorageAccountID', value);
43180
+ }
43181
+ /**
43182
+ * * Field Name: RootPath
43183
+ * * Display Name: Root Path
43184
+ * * SQL Data Type: nvarchar(500)
43185
+ * * Description: Root path within the storage account where archive files are written (e.g., "archives/production/").
43186
+ */
43187
+ get RootPath() {
43188
+ return this.Get('RootPath');
43189
+ }
43190
+ set RootPath(value) {
43191
+ this.Set('RootPath', value);
43192
+ }
43193
+ /**
43194
+ * * Field Name: ArchiveFormat
43195
+ * * Display Name: Archive Format
43196
+ * * SQL Data Type: nvarchar(20)
43197
+ * * Default Value: JSON
43198
+ * * Value List Type: List
43199
+ * * Possible Values
43200
+ * * CSV
43201
+ * * JSON
43202
+ * * Parquet
43203
+ * * Description: Output format for archived records: JSON, Parquet, or CSV.
43204
+ */
43205
+ get ArchiveFormat() {
43206
+ return this.Get('ArchiveFormat');
43207
+ }
43208
+ set ArchiveFormat(value) {
43209
+ this.Set('ArchiveFormat', value);
43210
+ }
43211
+ /**
43212
+ * * Field Name: IsActive
43213
+ * * Display Name: Is Active
43214
+ * * SQL Data Type: bit
43215
+ * * Default Value: 0
43216
+ * * Description: Whether this configuration is active and eligible for scheduled archive runs.
43217
+ */
43218
+ get IsActive() {
43219
+ return this.Get('IsActive');
43220
+ }
43221
+ set IsActive(value) {
43222
+ this.Set('IsActive', value);
43223
+ }
43224
+ /**
43225
+ * * Field Name: DefaultRetentionDays
43226
+ * * Display Name: Default Retention Days
43227
+ * * SQL Data Type: int
43228
+ * * Default Value: 365
43229
+ * * Description: Default number of days after which records become eligible for archiving. Can be overridden per entity.
43230
+ */
43231
+ get DefaultRetentionDays() {
43232
+ return this.Get('DefaultRetentionDays');
43233
+ }
43234
+ set DefaultRetentionDays(value) {
43235
+ this.Set('DefaultRetentionDays', value);
43236
+ }
43237
+ /**
43238
+ * * Field Name: DefaultMode
43239
+ * * Display Name: Default Mode
43240
+ * * SQL Data Type: nvarchar(20)
43241
+ * * Default Value: StripFields
43242
+ * * Value List Type: List
43243
+ * * Possible Values
43244
+ * * ArchiveOnly
43245
+ * * HardDelete
43246
+ * * StripFields
43247
+ * * Description: Default archive mode: StripFields (null out specified fields), HardDelete (delete from source after archiving), ArchiveOnly (copy to storage without modifying source).
43248
+ */
43249
+ get DefaultMode() {
43250
+ return this.Get('DefaultMode');
43251
+ }
43252
+ set DefaultMode(value) {
43253
+ this.Set('DefaultMode', value);
43254
+ }
43255
+ /**
43256
+ * * Field Name: DefaultBatchSize
43257
+ * * Display Name: Default Batch Size
43258
+ * * SQL Data Type: int
43259
+ * * Default Value: 100
43260
+ * * Description: Default number of records to process per batch during archive runs.
43261
+ */
43262
+ get DefaultBatchSize() {
43263
+ return this.Get('DefaultBatchSize');
43264
+ }
43265
+ set DefaultBatchSize(value) {
43266
+ this.Set('DefaultBatchSize', value);
43267
+ }
43268
+ /**
43269
+ * * Field Name: ArchiveRelatedRecordChanges
43270
+ * * Display Name: Archive Related Record Changes
43271
+ * * SQL Data Type: bit
43272
+ * * Default Value: 1
43273
+ * * Description: When enabled, related Record Changes entries are also archived alongside the source records.
43274
+ */
43275
+ get ArchiveRelatedRecordChanges() {
43276
+ return this.Get('ArchiveRelatedRecordChanges');
43277
+ }
43278
+ set ArchiveRelatedRecordChanges(value) {
43279
+ this.Set('ArchiveRelatedRecordChanges', value);
43280
+ }
43281
+ /**
43282
+ * * Field Name: Status
43283
+ * * Display Name: Status
43284
+ * * SQL Data Type: nvarchar(20)
43285
+ * * Default Value: Idle
43286
+ * * Value List Type: List
43287
+ * * Possible Values
43288
+ * * Disabled
43289
+ * * Error
43290
+ * * Idle
43291
+ * * Running
43292
+ * * Description: Current operational status of this configuration: Idle, Running, Error, or Disabled.
43293
+ */
43294
+ get Status() {
43295
+ return this.Get('Status');
43296
+ }
43297
+ set Status(value) {
43298
+ this.Set('Status', value);
43299
+ }
43300
+ /**
43301
+ * * Field Name: CreatedByUserID
43302
+ * * Display Name: Created By User ID
43303
+ * * SQL Data Type: uniqueidentifier
43304
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
43305
+ * * Description: The user who created this archive configuration.
43306
+ */
43307
+ get CreatedByUserID() {
43308
+ return this.Get('CreatedByUserID');
43309
+ }
43310
+ set CreatedByUserID(value) {
43311
+ this.Set('CreatedByUserID', value);
43312
+ }
43313
+ /**
43314
+ * * Field Name: __mj_CreatedAt
43315
+ * * Display Name: Created At
43316
+ * * SQL Data Type: datetimeoffset
43317
+ * * Default Value: getutcdate()
43318
+ */
43319
+ get __mj_CreatedAt() {
43320
+ return this.Get('__mj_CreatedAt');
43321
+ }
43322
+ /**
43323
+ * * Field Name: __mj_UpdatedAt
43324
+ * * Display Name: Updated At
43325
+ * * SQL Data Type: datetimeoffset
43326
+ * * Default Value: getutcdate()
43327
+ */
43328
+ get __mj_UpdatedAt() {
43329
+ return this.Get('__mj_UpdatedAt');
43330
+ }
43331
+ /**
43332
+ * * Field Name: StorageAccount
43333
+ * * Display Name: Storage Account Name
43334
+ * * SQL Data Type: nvarchar(200)
43335
+ */
43336
+ get StorageAccount() {
43337
+ return this.Get('StorageAccount');
43338
+ }
43339
+ /**
43340
+ * * Field Name: CreatedByUser
43341
+ * * Display Name: Created By User
43342
+ * * SQL Data Type: nvarchar(100)
43343
+ */
43344
+ get CreatedByUser() {
43345
+ return this.Get('CreatedByUser');
43346
+ }
43347
+ };
43348
+ MJArchiveConfigurationEntity = __decorate([
43349
+ RegisterClass(BaseEntity, 'MJ: Archive Configurations')
43350
+ ], MJArchiveConfigurationEntity);
43351
+ export { MJArchiveConfigurationEntity };
43352
+ /**
43353
+ * MJ: Archive Run Details - strongly typed entity sub-class
43354
+ * * Schema: __mj
43355
+ * * Base Table: ArchiveRunDetail
43356
+ * * Base View: vwArchiveRunDetails
43357
+ * * @description Per-record detail for each archive run. Tracks the outcome, storage location, and error information for each individual record processed.
43358
+ * * Primary Key: ID
43359
+ * @extends {BaseEntity}
43360
+ * @class
43361
+ * @public
43362
+ */
43363
+ let MJArchiveRunDetailEntity = class MJArchiveRunDetailEntity extends BaseEntity {
43364
+ /**
43365
+ * Loads the MJ: Archive Run Details record from the database
43366
+ * @param ID: string - primary key value to load the MJ: Archive Run Details record.
43367
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
43368
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43369
+ * @public
43370
+ * @async
43371
+ * @memberof MJArchiveRunDetailEntity
43372
+ * @method
43373
+ * @override
43374
+ */
43375
+ async Load(ID, EntityRelationshipsToLoad) {
43376
+ const compositeKey = new CompositeKey();
43377
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
43378
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43379
+ }
43380
+ /**
43381
+ * * Field Name: ID
43382
+ * * Display Name: ID
43383
+ * * SQL Data Type: uniqueidentifier
43384
+ * * Default Value: newsequentialid()
43385
+ */
43386
+ get ID() {
43387
+ return this.Get('ID');
43388
+ }
43389
+ set ID(value) {
43390
+ this.Set('ID', value);
43391
+ }
43392
+ /**
43393
+ * * Field Name: ArchiveRunID
43394
+ * * Display Name: Archive Run
43395
+ * * SQL Data Type: uniqueidentifier
43396
+ * * Related Entity/Foreign Key: MJ: Archive Runs (vwArchiveRuns.ID)
43397
+ * * Description: Foreign key to the parent ArchiveRun.
43398
+ */
43399
+ get ArchiveRunID() {
43400
+ return this.Get('ArchiveRunID');
43401
+ }
43402
+ set ArchiveRunID(value) {
43403
+ this.Set('ArchiveRunID', value);
43404
+ }
43405
+ /**
43406
+ * * Field Name: EntityID
43407
+ * * Display Name: Entity ID
43408
+ * * SQL Data Type: uniqueidentifier
43409
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
43410
+ * * Description: Foreign key to the Entity this record belongs to.
43411
+ */
43412
+ get EntityID() {
43413
+ return this.Get('EntityID');
43414
+ }
43415
+ set EntityID(value) {
43416
+ this.Set('EntityID', value);
43417
+ }
43418
+ /**
43419
+ * * Field Name: RecordID
43420
+ * * Display Name: Record ID
43421
+ * * SQL Data Type: nvarchar(750)
43422
+ * * Description: The primary key value of the archived record (string representation to support all key types).
43423
+ */
43424
+ get RecordID() {
43425
+ return this.Get('RecordID');
43426
+ }
43427
+ set RecordID(value) {
43428
+ this.Set('RecordID', value);
43429
+ }
43430
+ /**
43431
+ * * Field Name: Status
43432
+ * * Display Name: Status
43433
+ * * SQL Data Type: nvarchar(50)
43434
+ * * Value List Type: List
43435
+ * * Possible Values
43436
+ * * Failed
43437
+ * * Skipped
43438
+ * * Success
43439
+ * * Description: Outcome for this record: Success, Failed, or Skipped.
43440
+ */
43441
+ get Status() {
43442
+ return this.Get('Status');
43443
+ }
43444
+ set Status(value) {
43445
+ this.Set('Status', value);
43446
+ }
43447
+ /**
43448
+ * * Field Name: StoragePath
43449
+ * * Display Name: Storage Path
43450
+ * * SQL Data Type: nvarchar(1000)
43451
+ * * Description: Full path to the archived file in storage (e.g., "archives/production/Users/2026/04/record-id.json").
43452
+ */
43453
+ get StoragePath() {
43454
+ return this.Get('StoragePath');
43455
+ }
43456
+ set StoragePath(value) {
43457
+ this.Set('StoragePath', value);
43458
+ }
43459
+ /**
43460
+ * * Field Name: BytesArchived
43461
+ * * Display Name: Bytes Archived
43462
+ * * SQL Data Type: bigint
43463
+ * * Default Value: 0
43464
+ * * Description: Number of bytes written to storage for this record.
43465
+ */
43466
+ get BytesArchived() {
43467
+ return this.Get('BytesArchived');
43468
+ }
43469
+ set BytesArchived(value) {
43470
+ this.Set('BytesArchived', value);
43471
+ }
43472
+ /**
43473
+ * * Field Name: ErrorMessage
43474
+ * * Display Name: Error Message
43475
+ * * SQL Data Type: nvarchar(MAX)
43476
+ * * Description: Error details when Status is Failed.
43477
+ */
43478
+ get ErrorMessage() {
43479
+ return this.Get('ErrorMessage');
43480
+ }
43481
+ set ErrorMessage(value) {
43482
+ this.Set('ErrorMessage', value);
43483
+ }
43484
+ /**
43485
+ * * Field Name: ArchivedAt
43486
+ * * Display Name: Archived At
43487
+ * * SQL Data Type: datetimeoffset
43488
+ * * Description: Timestamp when this record was successfully archived.
43489
+ */
43490
+ get ArchivedAt() {
43491
+ return this.Get('ArchivedAt');
43492
+ }
43493
+ set ArchivedAt(value) {
43494
+ this.Set('ArchivedAt', value);
43495
+ }
43496
+ /**
43497
+ * * Field Name: VersionStamp
43498
+ * * Display Name: Version Stamp
43499
+ * * SQL Data Type: datetimeoffset
43500
+ * * Description: The __mj_UpdatedAt timestamp of the record at the time of archiving, used for conflict detection during restore.
43501
+ */
43502
+ get VersionStamp() {
43503
+ return this.Get('VersionStamp');
43504
+ }
43505
+ set VersionStamp(value) {
43506
+ this.Set('VersionStamp', value);
43507
+ }
43508
+ /**
43509
+ * * Field Name: IsRecordChangeArchive
43510
+ * * Display Name: Is Record Change
43511
+ * * SQL Data Type: bit
43512
+ * * Default Value: 0
43513
+ * * Description: When true, this detail row represents an archived Record Change entry rather than a primary entity record.
43514
+ */
43515
+ get IsRecordChangeArchive() {
43516
+ return this.Get('IsRecordChangeArchive');
43517
+ }
43518
+ set IsRecordChangeArchive(value) {
43519
+ this.Set('IsRecordChangeArchive', value);
43520
+ }
43521
+ /**
43522
+ * * Field Name: __mj_CreatedAt
43523
+ * * Display Name: Created At
43524
+ * * SQL Data Type: datetimeoffset
43525
+ * * Default Value: getutcdate()
43526
+ */
43527
+ get __mj_CreatedAt() {
43528
+ return this.Get('__mj_CreatedAt');
43529
+ }
43530
+ /**
43531
+ * * Field Name: __mj_UpdatedAt
43532
+ * * Display Name: Updated At
43533
+ * * SQL Data Type: datetimeoffset
43534
+ * * Default Value: getutcdate()
43535
+ */
43536
+ get __mj_UpdatedAt() {
43537
+ return this.Get('__mj_UpdatedAt');
43538
+ }
43539
+ /**
43540
+ * * Field Name: ArchiveRun
43541
+ * * Display Name: Archive Run Timestamp
43542
+ * * SQL Data Type: datetimeoffset
43543
+ */
43544
+ get ArchiveRun() {
43545
+ return this.Get('ArchiveRun');
43546
+ }
43547
+ /**
43548
+ * * Field Name: Entity
43549
+ * * Display Name: Entity Name
43550
+ * * SQL Data Type: nvarchar(255)
43551
+ */
43552
+ get Entity() {
43553
+ return this.Get('Entity');
43554
+ }
43555
+ };
43556
+ MJArchiveRunDetailEntity = __decorate([
43557
+ RegisterClass(BaseEntity, 'MJ: Archive Run Details')
43558
+ ], MJArchiveRunDetailEntity);
43559
+ export { MJArchiveRunDetailEntity };
43560
+ /**
43561
+ * MJ: Archive Runs - strongly typed entity sub-class
43562
+ * * Schema: __mj
43563
+ * * Base Table: ArchiveRun
43564
+ * * Base View: vwArchiveRuns
43565
+ * * @description Tracks each execution of an archive configuration, including timing, aggregate statistics, and overall status.
43566
+ * * Primary Key: ID
43567
+ * @extends {BaseEntity}
43568
+ * @class
43569
+ * @public
43570
+ */
43571
+ let MJArchiveRunEntity = class MJArchiveRunEntity extends BaseEntity {
43572
+ /**
43573
+ * Loads the MJ: Archive Runs record from the database
43574
+ * @param ID: string - primary key value to load the MJ: Archive Runs record.
43575
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
43576
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43577
+ * @public
43578
+ * @async
43579
+ * @memberof MJArchiveRunEntity
43580
+ * @method
43581
+ * @override
43582
+ */
43583
+ async Load(ID, EntityRelationshipsToLoad) {
43584
+ const compositeKey = new CompositeKey();
43585
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
43586
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43587
+ }
43588
+ /**
43589
+ * * Field Name: ID
43590
+ * * Display Name: ID
43591
+ * * SQL Data Type: uniqueidentifier
43592
+ * * Default Value: newsequentialid()
43593
+ */
43594
+ get ID() {
43595
+ return this.Get('ID');
43596
+ }
43597
+ set ID(value) {
43598
+ this.Set('ID', value);
43599
+ }
43600
+ /**
43601
+ * * Field Name: ArchiveConfigurationID
43602
+ * * Display Name: Archive Configuration
41730
43603
  * * SQL Data Type: uniqueidentifier
41731
- * * Related Entity/Foreign Key: MJ: Applications (vwApplications.ID)
43604
+ * * Related Entity/Foreign Key: MJ: Archive Configurations (vwArchiveConfigurations.ID)
43605
+ * * Description: Foreign key to the ArchiveConfiguration that was executed.
41732
43606
  */
41733
- get ApplicationID() {
41734
- return this.Get('ApplicationID');
43607
+ get ArchiveConfigurationID() {
43608
+ return this.Get('ArchiveConfigurationID');
41735
43609
  }
41736
- set ApplicationID(value) {
41737
- this.Set('ApplicationID', value);
43610
+ set ArchiveConfigurationID(value) {
43611
+ this.Set('ArchiveConfigurationID', value);
41738
43612
  }
41739
43613
  /**
41740
- * * Field Name: Name
41741
- * * Display Name: Name
41742
- * * SQL Data Type: nvarchar(100)
43614
+ * * Field Name: StartedAt
43615
+ * * Display Name: Started At
43616
+ * * SQL Data Type: datetimeoffset
43617
+ * * Default Value: getutcdate()
43618
+ * * Description: Timestamp when the archive run started.
41743
43619
  */
41744
- get Name() {
41745
- return this.Get('Name');
43620
+ get StartedAt() {
43621
+ return this.Get('StartedAt');
41746
43622
  }
41747
- set Name(value) {
41748
- this.Set('Name', value);
43623
+ set StartedAt(value) {
43624
+ this.Set('StartedAt', value);
41749
43625
  }
41750
43626
  /**
41751
- * * Field Name: Value
41752
- * * Display Name: Value
41753
- * * SQL Data Type: nvarchar(MAX)
41754
- * * Description: The setting value, can be simple text, numbers, booleans, or JSON for complex configuration objects.
43627
+ * * Field Name: CompletedAt
43628
+ * * Display Name: Completed At
43629
+ * * SQL Data Type: datetimeoffset
43630
+ * * Description: Timestamp when the archive run completed (NULL while still running).
41755
43631
  */
41756
- get Value() {
41757
- return this.Get('Value');
43632
+ get CompletedAt() {
43633
+ return this.Get('CompletedAt');
41758
43634
  }
41759
- set Value(value) {
41760
- this.Set('Value', value);
43635
+ set CompletedAt(value) {
43636
+ this.Set('CompletedAt', value);
41761
43637
  }
41762
43638
  /**
41763
- * * Field Name: Comments
41764
- * * Display Name: Comments
41765
- * * SQL Data Type: nvarchar(MAX)
43639
+ * * Field Name: Status
43640
+ * * Display Name: Status
43641
+ * * SQL Data Type: nvarchar(50)
43642
+ * * Default Value: Running
43643
+ * * Value List Type: List
43644
+ * * Possible Values
43645
+ * * Cancelled
43646
+ * * Complete
43647
+ * * Failed
43648
+ * * PartialSuccess
43649
+ * * Running
43650
+ * * Description: Current status: Running, Complete, Failed, Cancelled, or PartialSuccess.
41766
43651
  */
41767
- get Comments() {
41768
- return this.Get('Comments');
43652
+ get Status() {
43653
+ return this.Get('Status');
41769
43654
  }
41770
- set Comments(value) {
41771
- this.Set('Comments', value);
43655
+ set Status(value) {
43656
+ this.Set('Status', value);
41772
43657
  }
41773
43658
  /**
41774
- * * Field Name: __mj_CreatedAt
41775
- * * Display Name: __mj _Created At
41776
- * * SQL Data Type: datetimeoffset
41777
- * * Default Value: getutcdate()
43659
+ * * Field Name: TotalRecords
43660
+ * * Display Name: Total Records
43661
+ * * SQL Data Type: int
43662
+ * * Default Value: 0
43663
+ * * Description: Total number of records identified for archiving in this run.
41778
43664
  */
41779
- get __mj_CreatedAt() {
41780
- return this.Get('__mj_CreatedAt');
43665
+ get TotalRecords() {
43666
+ return this.Get('TotalRecords');
41781
43667
  }
41782
- /**
41783
- * * Field Name: __mj_UpdatedAt
41784
- * * Display Name: __mj _Updated At
41785
- * * SQL Data Type: datetimeoffset
41786
- * * Default Value: getutcdate()
41787
- */
41788
- get __mj_UpdatedAt() {
41789
- return this.Get('__mj_UpdatedAt');
43668
+ set TotalRecords(value) {
43669
+ this.Set('TotalRecords', value);
41790
43670
  }
41791
43671
  /**
41792
- * * Field Name: Application
41793
- * * Display Name: Application
41794
- * * SQL Data Type: nvarchar(100)
43672
+ * * Field Name: ArchivedRecords
43673
+ * * Display Name: Archived Records
43674
+ * * SQL Data Type: int
43675
+ * * Default Value: 0
43676
+ * * Description: Number of records successfully archived.
41795
43677
  */
41796
- get Application() {
41797
- return this.Get('Application');
43678
+ get ArchivedRecords() {
43679
+ return this.Get('ArchivedRecords');
41798
43680
  }
41799
- };
41800
- MJApplicationSettingEntity = __decorate([
41801
- RegisterClass(BaseEntity, 'MJ: Application Settings')
41802
- ], MJApplicationSettingEntity);
41803
- export { MJApplicationSettingEntity };
41804
- /**
41805
- * MJ: Applications - strongly typed entity sub-class
41806
- * * Schema: __mj
41807
- * * Base Table: Application
41808
- * * Base View: vwApplications
41809
- * * @description Applications are used to group entities in the user interface for ease of user access
41810
- * * Primary Key: ID
41811
- * @extends {BaseEntity}
41812
- * @class
41813
- * @public
41814
- */
41815
- let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
41816
- constructor() {
41817
- super(...arguments);
41818
- this._DefaultNavItemsObject_cached = undefined;
41819
- this._DefaultNavItemsObject_lastRaw = null;
41820
- }
41821
- /**
41822
- * Loads the MJ: Applications record from the database
41823
- * @param ID: string - primary key value to load the MJ: Applications record.
41824
- * @param EntityRelationshipsToLoad - (optional) the relationships to load
41825
- * @returns {Promise<boolean>} - true if successful, false otherwise
41826
- * @public
41827
- * @async
41828
- * @memberof MJApplicationEntity
41829
- * @method
41830
- * @override
41831
- */
41832
- async Load(ID, EntityRelationshipsToLoad) {
41833
- const compositeKey = new CompositeKey();
41834
- compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
41835
- return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43681
+ set ArchivedRecords(value) {
43682
+ this.Set('ArchivedRecords', value);
41836
43683
  }
41837
43684
  /**
41838
- * * Field Name: ID
41839
- * * Display Name: ID
41840
- * * SQL Data Type: uniqueidentifier
41841
- * * Default Value: newsequentialid()
43685
+ * * Field Name: FailedRecords
43686
+ * * Display Name: Failed Records
43687
+ * * SQL Data Type: int
43688
+ * * Default Value: 0
43689
+ * * Description: Number of records that failed to archive.
41842
43690
  */
41843
- get ID() {
41844
- return this.Get('ID');
43691
+ get FailedRecords() {
43692
+ return this.Get('FailedRecords');
41845
43693
  }
41846
- set ID(value) {
41847
- this.Set('ID', value);
43694
+ set FailedRecords(value) {
43695
+ this.Set('FailedRecords', value);
41848
43696
  }
41849
43697
  /**
41850
- * * Field Name: Name
41851
- * * Display Name: Name
41852
- * * SQL Data Type: nvarchar(100)
43698
+ * * Field Name: SkippedRecords
43699
+ * * Display Name: Skipped Records
43700
+ * * SQL Data Type: int
43701
+ * * Default Value: 0
43702
+ * * Description: Number of records skipped (e.g., already archived or filtered out).
41853
43703
  */
41854
- get Name() {
41855
- return this.Get('Name');
43704
+ get SkippedRecords() {
43705
+ return this.Get('SkippedRecords');
41856
43706
  }
41857
- set Name(value) {
41858
- this.Set('Name', value);
43707
+ set SkippedRecords(value) {
43708
+ this.Set('SkippedRecords', value);
41859
43709
  }
41860
43710
  /**
41861
- * * Field Name: Description
41862
- * * Display Name: Description
41863
- * * SQL Data Type: nvarchar(MAX)
43711
+ * * Field Name: TotalBytesArchived
43712
+ * * Display Name: Total Bytes Archived
43713
+ * * SQL Data Type: bigint
43714
+ * * Default Value: 0
43715
+ * * Description: Total bytes written to archive storage during this run.
41864
43716
  */
41865
- get Description() {
41866
- return this.Get('Description');
43717
+ get TotalBytesArchived() {
43718
+ return this.Get('TotalBytesArchived');
41867
43719
  }
41868
- set Description(value) {
41869
- this.Set('Description', value);
43720
+ set TotalBytesArchived(value) {
43721
+ this.Set('TotalBytesArchived', value);
41870
43722
  }
41871
43723
  /**
41872
- * * Field Name: Icon
41873
- * * Display Name: Icon
41874
- * * SQL Data Type: nvarchar(500)
41875
- * * Description: Specify the CSS class information for the display icon for each application.
43724
+ * * Field Name: ErrorLog
43725
+ * * Display Name: Error Log
43726
+ * * SQL Data Type: nvarchar(MAX)
43727
+ * * Description: Aggregated error log for the run. Contains error details when Status is Failed or PartialSuccess.
41876
43728
  */
41877
- get Icon() {
41878
- return this.Get('Icon');
43729
+ get ErrorLog() {
43730
+ return this.Get('ErrorLog');
41879
43731
  }
41880
- set Icon(value) {
41881
- this.Set('Icon', value);
43732
+ set ErrorLog(value) {
43733
+ this.Set('ErrorLog', value);
41882
43734
  }
41883
43735
  /**
41884
- * * Field Name: DefaultForNewUser
41885
- * * Display Name: Default For New User
41886
- * * SQL Data Type: bit
41887
- * * Default Value: 1
41888
- * * Description: If turned on, when a new user first uses the MJ Explorer app, the application records with this turned on will have this application included in their selected application list.
43736
+ * * Field Name: UserID
43737
+ * * Display Name: Initiated By
43738
+ * * SQL Data Type: uniqueidentifier
43739
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
43740
+ * * Description: The user who initiated this archive run.
41889
43741
  */
41890
- get DefaultForNewUser() {
41891
- return this.Get('DefaultForNewUser');
43742
+ get UserID() {
43743
+ return this.Get('UserID');
41892
43744
  }
41893
- set DefaultForNewUser(value) {
41894
- this.Set('DefaultForNewUser', value);
43745
+ set UserID(value) {
43746
+ this.Set('UserID', value);
41895
43747
  }
41896
43748
  /**
41897
43749
  * * Field Name: __mj_CreatedAt
@@ -41912,181 +43764,26 @@ let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
41912
43764
  return this.Get('__mj_UpdatedAt');
41913
43765
  }
41914
43766
  /**
41915
- * * Field Name: SchemaAutoAddNewEntities
41916
- * * Display Name: Schema Auto Add New Entities
41917
- * * SQL Data Type: nvarchar(MAX)
41918
- * * Description: Comma-delimited list of schema names where entities will be automatically added to the application when created in those schemas
41919
- */
41920
- get SchemaAutoAddNewEntities() {
41921
- return this.Get('SchemaAutoAddNewEntities');
41922
- }
41923
- set SchemaAutoAddNewEntities(value) {
41924
- this.Set('SchemaAutoAddNewEntities', value);
41925
- }
41926
- /**
41927
- * * Field Name: Color
41928
- * * Display Name: Color
41929
- * * SQL Data Type: nvarchar(20)
41930
- * * Description: Hex color code for visual theming (e.g., #4caf50)
41931
- */
41932
- get Color() {
41933
- return this.Get('Color');
41934
- }
41935
- set Color(value) {
41936
- this.Set('Color', value);
41937
- }
41938
- /**
41939
- * * Field Name: DefaultNavItems
41940
- * * Display Name: Default Nav Items
41941
- * * SQL Data Type: nvarchar(MAX)
41942
- * * JSON Type: Array<MJApplicationEntity_IDefaultNavItem>
41943
- * * Description: JSON array of default navigation items for this application. Parsed by BaseApplication.GetNavItems()
41944
- */
41945
- get DefaultNavItems() {
41946
- return this.Get('DefaultNavItems');
41947
- }
41948
- set DefaultNavItems(value) {
41949
- this.Set('DefaultNavItems', value);
41950
- }
41951
- /**
41952
- * Typed accessor for DefaultNavItems — returns parsed JSON as Array<MJApplicationEntity_IDefaultNavItem>.
41953
- * Uses lazy parsing with cache invalidation when the underlying raw value changes.
41954
- */
41955
- get DefaultNavItemsObject() {
41956
- const raw = this.DefaultNavItems;
41957
- if (raw !== this._DefaultNavItemsObject_lastRaw) {
41958
- this._DefaultNavItemsObject_cached = raw ? JSON.parse(raw) : null;
41959
- this._DefaultNavItemsObject_lastRaw = raw;
41960
- }
41961
- return this._DefaultNavItemsObject_cached;
41962
- }
41963
- set DefaultNavItemsObject(value) {
41964
- const raw = value ? JSON.stringify(value) : null;
41965
- this.DefaultNavItems = raw;
41966
- this._DefaultNavItemsObject_cached = value;
41967
- this._DefaultNavItemsObject_lastRaw = raw;
41968
- }
41969
- /**
41970
- * * Field Name: ClassName
41971
- * * Display Name: Class Name
43767
+ * * Field Name: ArchiveConfiguration
43768
+ * * Display Name: Configuration Name
41972
43769
  * * SQL Data Type: nvarchar(255)
41973
- * * Description: TypeScript class name for ClassFactory registration (e.g., CRMApplication)
41974
- */
41975
- get ClassName() {
41976
- return this.Get('ClassName');
41977
- }
41978
- set ClassName(value) {
41979
- this.Set('ClassName', value);
41980
- }
41981
- /**
41982
- * * Field Name: DefaultSequence
41983
- * * Display Name: Default Sequence
41984
- * * SQL Data Type: int
41985
- * * Default Value: 100
41986
- * * Description: Default sequence position when adding this application to a new user's User Applications. Lower values appear first. Used when DefaultForNewUser is true.
41987
43770
  */
41988
- get DefaultSequence() {
41989
- return this.Get('DefaultSequence');
41990
- }
41991
- set DefaultSequence(value) {
41992
- this.Set('DefaultSequence', value);
43771
+ get ArchiveConfiguration() {
43772
+ return this.Get('ArchiveConfiguration');
41993
43773
  }
41994
43774
  /**
41995
- * * Field Name: Status
41996
- * * Display Name: Status
41997
- * * SQL Data Type: nvarchar(20)
41998
- * * Default Value: Active
41999
- * * Value List Type: List
42000
- * * Possible Values
42001
- * * Active
42002
- * * Deprecated
42003
- * * Disabled
42004
- * * Pending
42005
- * * Description: Application lifecycle status. Pending = not yet ready, Active = available for use, Disabled = temporarily unavailable, Deprecated = being phased out. Only Active applications are shown to users.
42006
- */
42007
- get Status() {
42008
- return this.Get('Status');
42009
- }
42010
- set Status(value) {
42011
- this.Set('Status', value);
42012
- }
42013
- /**
42014
- * * Field Name: NavigationStyle
42015
- * * Display Name: Navigation Style
42016
- * * SQL Data Type: nvarchar(20)
42017
- * * Default Value: App Switcher
42018
- * * Value List Type: List
42019
- * * Possible Values
42020
- * * App Switcher
42021
- * * Both
42022
- * * Nav Bar
42023
- * * Description: How the application appears in navigation. App Switcher = only in dropdown menu, Nav Bar = permanent icon in top nav, Both = shown in both locations.
42024
- */
42025
- get NavigationStyle() {
42026
- return this.Get('NavigationStyle');
42027
- }
42028
- set NavigationStyle(value) {
42029
- this.Set('NavigationStyle', value);
42030
- }
42031
- /**
42032
- * * Field Name: TopNavLocation
42033
- * * Display Name: Top Nav Location
42034
- * * SQL Data Type: nvarchar(30)
42035
- * * Value List Type: List
42036
- * * Possible Values
42037
- * * Left of App Switcher
42038
- * * Left of User Menu
42039
- * * Description: Position of the permanent nav icon when NavigationStyle is Nav Bar or Both. Left of App Switcher = appears before the app switcher, Left of User Menu = appears near the user avatar. Ignored when NavigationStyle is App Switcher.
42040
- */
42041
- get TopNavLocation() {
42042
- return this.Get('TopNavLocation');
42043
- }
42044
- set TopNavLocation(value) {
42045
- this.Set('TopNavLocation', value);
42046
- }
42047
- /**
42048
- * * Field Name: HideNavBarIconWhenActive
42049
- * * Display Name: Hide Nav Bar Icon When Active
42050
- * * SQL Data Type: bit
42051
- * * Default Value: 0
42052
- * * Description: When true, the Nav Bar icon for this application is hidden when the application is active. Useful for launcher-style apps like Home that should only be visible when the user is NOT in that app. Only applies when NavigationStyle is Nav Bar or Both.
42053
- */
42054
- get HideNavBarIconWhenActive() {
42055
- return this.Get('HideNavBarIconWhenActive');
42056
- }
42057
- set HideNavBarIconWhenActive(value) {
42058
- this.Set('HideNavBarIconWhenActive', value);
42059
- }
42060
- /**
42061
- * * Field Name: Path
42062
- * * Display Name: Path
43775
+ * * Field Name: User
43776
+ * * Display Name: User Name
42063
43777
  * * SQL Data Type: nvarchar(100)
42064
- * * Description: URL-friendly slug for the application (e.g., "data-explorer" for "Data Explorer"). Used in URLs instead of the full Name. Auto-generated from Name when AutoUpdatePath is true. Must be unique across all applications.
42065
- */
42066
- get Path() {
42067
- return this.Get('Path');
42068
- }
42069
- set Path(value) {
42070
- this.Set('Path', value);
42071
- }
42072
- /**
42073
- * * Field Name: AutoUpdatePath
42074
- * * Display Name: Auto Update Path
42075
- * * SQL Data Type: bit
42076
- * * Default Value: 1
42077
- * * Description: When true, Path is automatically generated from Name on save. Set to false to manually control the Path value. Defaults to true for new applications.
42078
43778
  */
42079
- get AutoUpdatePath() {
42080
- return this.Get('AutoUpdatePath');
42081
- }
42082
- set AutoUpdatePath(value) {
42083
- this.Set('AutoUpdatePath', value);
43779
+ get User() {
43780
+ return this.Get('User');
42084
43781
  }
42085
43782
  };
42086
- MJApplicationEntity = __decorate([
42087
- RegisterClass(BaseEntity, 'MJ: Applications')
42088
- ], MJApplicationEntity);
42089
- export { MJApplicationEntity };
43783
+ MJArchiveRunEntity = __decorate([
43784
+ RegisterClass(BaseEntity, 'MJ: Archive Runs')
43785
+ ], MJArchiveRunEntity);
43786
+ export { MJArchiveRunEntity };
42090
43787
  /**
42091
43788
  * MJ: Artifact Permissions - strongly typed entity sub-class
42092
43789
  * * Schema: __mj
@@ -42384,7 +44081,7 @@ let MJArtifactTypeEntity = class MJArtifactTypeEntity extends BaseEntity {
42384
44081
  }
42385
44082
  /**
42386
44083
  * * Field Name: ExtractRules
42387
- * * Display Name: Extract Rules
44084
+ * * Display Name: Extraction Rules
42388
44085
  * * SQL Data Type: nvarchar(MAX)
42389
44086
  * * Description: JSON array of extraction rules defining how to extract attributes from artifact content. Each rule has: name (string), description (string), type (TypeScript type), standardProperty ('name'|'description'|'displayMarkdown'|'displayHtml'|null), extractor (JavaScript code string). Child types inherit parent rules and can override by name.
42390
44087
  */
@@ -42436,6 +44133,18 @@ let MJArtifactTypeEntity = class MJArtifactTypeEntity extends BaseEntity {
42436
44133
  this.Set('ContentCategory', value);
42437
44134
  }
42438
44135
  /**
44136
+ * * Field Name: ToolLibraryClass
44137
+ * * Display Name: Tool Library Class
44138
+ * * SQL Data Type: nvarchar(100)
44139
+ * * Description: Class name for the BaseArtifactToolLibrary subclass that provides type-specific artifact exploration tools for agents. Resolved via ClassFactory. When NULL, ArtifactToolManager uses name-based fallback resolution.
44140
+ */
44141
+ get ToolLibraryClass() {
44142
+ return this.Get('ToolLibraryClass');
44143
+ }
44144
+ set ToolLibraryClass(value) {
44145
+ this.Set('ToolLibraryClass', value);
44146
+ }
44147
+ /**
42439
44148
  * * Field Name: Parent
42440
44149
  * * Display Name: Parent
42441
44150
  * * SQL Data Type: nvarchar(100)
@@ -53991,6 +55700,41 @@ let MJDashboardEntity = class MJDashboardEntity extends BaseEntity {
53991
55700
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
53992
55701
  }
53993
55702
  /**
55703
+ * MJ: Dashboards - Delete method override to wrap in transaction since CascadeDeletes is true.
55704
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
55705
+ * @public
55706
+ * @method
55707
+ * @override
55708
+ * @memberof MJDashboardEntity
55709
+ * @returns {Promise<boolean>} - true if successful, false otherwise
55710
+ */
55711
+ async Delete(options) {
55712
+ if (Metadata.Provider.ProviderType === ProviderType.Database) {
55713
+ // For database providers, use the transaction methods directly
55714
+ const provider = Metadata.Provider;
55715
+ try {
55716
+ await provider.BeginTransaction();
55717
+ const result = await super.Delete(options);
55718
+ if (result) {
55719
+ await provider.CommitTransaction();
55720
+ return true;
55721
+ }
55722
+ else {
55723
+ await provider.RollbackTransaction();
55724
+ return false;
55725
+ }
55726
+ }
55727
+ catch (error) {
55728
+ await provider.RollbackTransaction();
55729
+ throw error;
55730
+ }
55731
+ }
55732
+ else {
55733
+ // For network providers, cascading deletes are handled server-side
55734
+ return super.Delete(options);
55735
+ }
55736
+ }
55737
+ /**
53994
55738
  * * Field Name: ID
53995
55739
  * * Display Name: ID
53996
55740
  * * SQL Data Type: uniqueidentifier
@@ -60823,6 +62567,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
60823
62567
  }
60824
62568
  /**
60825
62569
  * * Field Name: ID
62570
+ * * Display Name: ID
60826
62571
  * * SQL Data Type: uniqueidentifier
60827
62572
  * * Default Value: newsequentialid()
60828
62573
  */
@@ -60910,7 +62655,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
60910
62655
  }
60911
62656
  /**
60912
62657
  * * Field Name: ReadRLSFilterID
60913
- * * Display Name: Read RLSFilter ID
62658
+ * * Display Name: Read Filter ID
60914
62659
  * * SQL Data Type: uniqueidentifier
60915
62660
  * * Related Entity/Foreign Key: MJ: Row Level Security Filters (vwRowLevelSecurityFilters.ID)
60916
62661
  */
@@ -60922,7 +62667,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
60922
62667
  }
60923
62668
  /**
60924
62669
  * * Field Name: CreateRLSFilterID
60925
- * * Display Name: Create RLSFilter ID
62670
+ * * Display Name: Create Filter ID
60926
62671
  * * SQL Data Type: uniqueidentifier
60927
62672
  * * Related Entity/Foreign Key: MJ: Row Level Security Filters (vwRowLevelSecurityFilters.ID)
60928
62673
  */
@@ -60934,7 +62679,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
60934
62679
  }
60935
62680
  /**
60936
62681
  * * Field Name: UpdateRLSFilterID
60937
- * * Display Name: Update RLSFilter ID
62682
+ * * Display Name: Update Filter ID
60938
62683
  * * SQL Data Type: uniqueidentifier
60939
62684
  * * Related Entity/Foreign Key: MJ: Row Level Security Filters (vwRowLevelSecurityFilters.ID)
60940
62685
  */
@@ -60946,7 +62691,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
60946
62691
  }
60947
62692
  /**
60948
62693
  * * Field Name: DeleteRLSFilterID
60949
- * * Display Name: Delete RLSFilter ID
62694
+ * * Display Name: Delete Filter ID
60950
62695
  * * SQL Data Type: uniqueidentifier
60951
62696
  * * Related Entity/Foreign Key: MJ: Row Level Security Filters (vwRowLevelSecurityFilters.ID)
60952
62697
  */
@@ -60958,7 +62703,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
60958
62703
  }
60959
62704
  /**
60960
62705
  * * Field Name: __mj_CreatedAt
60961
- * * Display Name: __mj _Created At
62706
+ * * Display Name: Created At
60962
62707
  * * SQL Data Type: datetimeoffset
60963
62708
  * * Default Value: getutcdate()
60964
62709
  */
@@ -60967,7 +62712,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
60967
62712
  }
60968
62713
  /**
60969
62714
  * * Field Name: __mj_UpdatedAt
60970
- * * Display Name: __mj _Updated At
62715
+ * * Display Name: Updated At
60971
62716
  * * SQL Data Type: datetimeoffset
60972
62717
  * * Default Value: getutcdate()
60973
62718
  */
@@ -60975,6 +62720,23 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
60975
62720
  return this.Get('__mj_UpdatedAt');
60976
62721
  }
60977
62722
  /**
62723
+ * * Field Name: Type
62724
+ * * Display Name: Access Type
62725
+ * * SQL Data Type: nvarchar(10)
62726
+ * * Default Value: Allow
62727
+ * * Value List Type: List
62728
+ * * Possible Values
62729
+ * * Allow
62730
+ * * Deny
62731
+ * * Description: Allow or Deny. Deny rows override any Allow grants on the same (EntityID, RoleID, action) at evaluation time, letting administrators exclude a role from an action another role grants.
62732
+ */
62733
+ get Type() {
62734
+ return this.Get('Type');
62735
+ }
62736
+ set Type(value) {
62737
+ this.Set('Type', value);
62738
+ }
62739
+ /**
60978
62740
  * * Field Name: Entity
60979
62741
  * * Display Name: Entity
60980
62742
  * * SQL Data Type: nvarchar(255)
@@ -60992,7 +62754,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
60992
62754
  }
60993
62755
  /**
60994
62756
  * * Field Name: RoleSQLName
60995
- * * Display Name: Role SQLName
62757
+ * * Display Name: Role SQL Name
60996
62758
  * * SQL Data Type: nvarchar(250)
60997
62759
  */
60998
62760
  get RoleSQLName() {
@@ -61000,7 +62762,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
61000
62762
  }
61001
62763
  /**
61002
62764
  * * Field Name: CreateRLSFilter
61003
- * * Display Name: Create RLSFilter
62765
+ * * Display Name: Create Filter
61004
62766
  * * SQL Data Type: nvarchar(100)
61005
62767
  */
61006
62768
  get CreateRLSFilter() {
@@ -61008,7 +62770,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
61008
62770
  }
61009
62771
  /**
61010
62772
  * * Field Name: ReadRLSFilter
61011
- * * Display Name: Read RLSFilter
62773
+ * * Display Name: Read Filter
61012
62774
  * * SQL Data Type: nvarchar(100)
61013
62775
  */
61014
62776
  get ReadRLSFilter() {
@@ -61016,7 +62778,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
61016
62778
  }
61017
62779
  /**
61018
62780
  * * Field Name: UpdateRLSFilter
61019
- * * Display Name: Update RLSFilter
62781
+ * * Display Name: Update Filter
61020
62782
  * * SQL Data Type: nvarchar(100)
61021
62783
  */
61022
62784
  get UpdateRLSFilter() {
@@ -61024,7 +62786,7 @@ let MJEntityPermissionEntity = class MJEntityPermissionEntity extends BaseEntity
61024
62786
  }
61025
62787
  /**
61026
62788
  * * Field Name: DeleteRLSFilter
61027
- * * Display Name: Delete RLSFilter
62789
+ * * Display Name: Delete Filter
61028
62790
  * * SQL Data Type: nvarchar(100)
61029
62791
  */
61030
62792
  get DeleteRLSFilter() {
@@ -63814,7 +65576,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
63814
65576
  }
63815
65577
  /**
63816
65578
  * * Field Name: Name
63817
- * * Display Name: Name
65579
+ * * Display Name: Field Name
63818
65580
  * * SQL Data Type: nvarchar(255)
63819
65581
  * * Description: Field name as returned by the external API
63820
65582
  */
@@ -63987,7 +65749,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
63987
65749
  }
63988
65750
  /**
63989
65751
  * * Field Name: RelatedIntegrationObjectID
63990
- * * Display Name: Related Integration Object ID
65752
+ * * Display Name: Related Integration Object
63991
65753
  * * SQL Data Type: uniqueidentifier
63992
65754
  * * Related Entity/Foreign Key: MJ: Integration Objects (vwIntegrationObjects.ID)
63993
65755
  * * Description: Foreign key to another IntegrationObject, establishing a relationship. Used for DAG-based dependency ordering and template variable resolution in parent APIPath patterns.
@@ -64148,7 +65910,7 @@ let MJIntegrationObjectEntity = class MJIntegrationObjectEntity extends BaseEnti
64148
65910
  }
64149
65911
  /**
64150
65912
  * * Field Name: IntegrationID
64151
- * * Display Name: Integration
65913
+ * * Display Name: Integration ID
64152
65914
  * * SQL Data Type: uniqueidentifier
64153
65915
  * * Related Entity/Foreign Key: MJ: Integrations (vwIntegrations.ID)
64154
65916
  * * Description: Foreign key to the Integration that owns this object
@@ -64304,7 +66066,7 @@ let MJIntegrationObjectEntity = class MJIntegrationObjectEntity extends BaseEnti
64304
66066
  }
64305
66067
  /**
64306
66068
  * * Field Name: DefaultQueryParams
64307
- * * Display Name: Default Query Parameters
66069
+ * * Display Name: Default Query Params
64308
66070
  * * SQL Data Type: nvarchar(MAX)
64309
66071
  * * Description: JSON object of default query parameters to include with every API request for this object
64310
66072
  */
@@ -64428,7 +66190,7 @@ let MJIntegrationObjectEntity = class MJIntegrationObjectEntity extends BaseEnti
64428
66190
  }
64429
66191
  /**
64430
66192
  * * Field Name: Integration
64431
- * * Display Name: Integration Name
66193
+ * * Display Name: Integration
64432
66194
  * * SQL Data Type: nvarchar(100)
64433
66195
  */
64434
66196
  get Integration() {
@@ -67441,6 +69203,111 @@ MJMCPToolExecutionLogEntity = __decorate([
67441
69203
  RegisterClass(BaseEntity, 'MJ: MCP Tool Execution Logs')
67442
69204
  ], MJMCPToolExecutionLogEntity);
67443
69205
  export { MJMCPToolExecutionLogEntity };
69206
+ /**
69207
+ * MJ: MCP Tool Favorites - strongly typed entity sub-class
69208
+ * * Schema: __mj
69209
+ * * Base Table: MCPToolFavorite
69210
+ * * Base View: vwMCPToolFavorites
69211
+ * * @description Per-user favorite marker for an MCP Server Tool. Each row indicates the user has starred the referenced tool for quick access in the MCP Dashboard Tools tab and in the Test Tool dialog picker. Combined with UserID forms a unique pair so a user cannot favorite the same tool twice.
69212
+ * * Primary Key: ID
69213
+ * @extends {BaseEntity}
69214
+ * @class
69215
+ * @public
69216
+ */
69217
+ let MJMCPToolFavoriteEntity = class MJMCPToolFavoriteEntity extends BaseEntity {
69218
+ /**
69219
+ * Loads the MJ: MCP Tool Favorites record from the database
69220
+ * @param ID: string - primary key value to load the MJ: MCP Tool Favorites record.
69221
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
69222
+ * @returns {Promise<boolean>} - true if successful, false otherwise
69223
+ * @public
69224
+ * @async
69225
+ * @memberof MJMCPToolFavoriteEntity
69226
+ * @method
69227
+ * @override
69228
+ */
69229
+ async Load(ID, EntityRelationshipsToLoad) {
69230
+ const compositeKey = new CompositeKey();
69231
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
69232
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
69233
+ }
69234
+ /**
69235
+ * * Field Name: ID
69236
+ * * Display Name: ID
69237
+ * * SQL Data Type: uniqueidentifier
69238
+ * * Default Value: newsequentialid()
69239
+ */
69240
+ get ID() {
69241
+ return this.Get('ID');
69242
+ }
69243
+ set ID(value) {
69244
+ this.Set('ID', value);
69245
+ }
69246
+ /**
69247
+ * * Field Name: UserID
69248
+ * * Display Name: User
69249
+ * * SQL Data Type: uniqueidentifier
69250
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
69251
+ * * Description: The user who starred this tool. Favorites are per-user; multiple users can favorite the same tool independently. References the MJ User table.
69252
+ */
69253
+ get UserID() {
69254
+ return this.Get('UserID');
69255
+ }
69256
+ set UserID(value) {
69257
+ this.Set('UserID', value);
69258
+ }
69259
+ /**
69260
+ * * Field Name: MCPServerToolID
69261
+ * * Display Name: MCP Server Tool
69262
+ * * SQL Data Type: uniqueidentifier
69263
+ * * Related Entity/Foreign Key: MJ: MCP Server Tools (vwMCPServerTools.ID)
69264
+ * * Description: The MCP Server Tool that has been favorited. Combined with UserID this forms a unique constraint so a user cannot favorite the same tool twice.
69265
+ */
69266
+ get MCPServerToolID() {
69267
+ return this.Get('MCPServerToolID');
69268
+ }
69269
+ set MCPServerToolID(value) {
69270
+ this.Set('MCPServerToolID', value);
69271
+ }
69272
+ /**
69273
+ * * Field Name: __mj_CreatedAt
69274
+ * * Display Name: Created At
69275
+ * * SQL Data Type: datetimeoffset
69276
+ * * Default Value: getutcdate()
69277
+ */
69278
+ get __mj_CreatedAt() {
69279
+ return this.Get('__mj_CreatedAt');
69280
+ }
69281
+ /**
69282
+ * * Field Name: __mj_UpdatedAt
69283
+ * * Display Name: Updated At
69284
+ * * SQL Data Type: datetimeoffset
69285
+ * * Default Value: getutcdate()
69286
+ */
69287
+ get __mj_UpdatedAt() {
69288
+ return this.Get('__mj_UpdatedAt');
69289
+ }
69290
+ /**
69291
+ * * Field Name: User
69292
+ * * Display Name: User Name
69293
+ * * SQL Data Type: nvarchar(100)
69294
+ */
69295
+ get User() {
69296
+ return this.Get('User');
69297
+ }
69298
+ /**
69299
+ * * Field Name: MCPServerTool
69300
+ * * Display Name: Tool Name
69301
+ * * SQL Data Type: nvarchar(255)
69302
+ */
69303
+ get MCPServerTool() {
69304
+ return this.Get('MCPServerTool');
69305
+ }
69306
+ };
69307
+ MJMCPToolFavoriteEntity = __decorate([
69308
+ RegisterClass(BaseEntity, 'MJ: MCP Tool Favorites')
69309
+ ], MJMCPToolFavoriteEntity);
69310
+ export { MJMCPToolFavoriteEntity };
67444
69311
  /**
67445
69312
  * MJ: O Auth Auth Server Metadata Caches - strongly typed entity sub-class
67446
69313
  * * Schema: __mj
@@ -69341,6 +71208,206 @@ MJOutputTriggerTypeEntity = __decorate([
69341
71208
  RegisterClass(BaseEntity, 'MJ: Output Trigger Types')
69342
71209
  ], MJOutputTriggerTypeEntity);
69343
71210
  export { MJOutputTriggerTypeEntity };
71211
+ /**
71212
+ * MJ: Permission Domains - strongly typed entity sub-class
71213
+ * * Schema: __mj
71214
+ * * Base Table: PermissionDomain
71215
+ * * Base View: vwPermissionDomains
71216
+ * * @description Catalog of registered permission subsystems. Each row describes one permission provider; the PermissionEngine uses ProviderClassName as the ClassFactory key to instantiate providers at startup. Enables unified permission queries across all subsystems.
71217
+ * * Primary Key: ID
71218
+ * @extends {BaseEntity}
71219
+ * @class
71220
+ * @public
71221
+ */
71222
+ let MJPermissionDomainEntity = class MJPermissionDomainEntity extends BaseEntity {
71223
+ /**
71224
+ * Loads the MJ: Permission Domains record from the database
71225
+ * @param ID: string - primary key value to load the MJ: Permission Domains record.
71226
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
71227
+ * @returns {Promise<boolean>} - true if successful, false otherwise
71228
+ * @public
71229
+ * @async
71230
+ * @memberof MJPermissionDomainEntity
71231
+ * @method
71232
+ * @override
71233
+ */
71234
+ async Load(ID, EntityRelationshipsToLoad) {
71235
+ const compositeKey = new CompositeKey();
71236
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
71237
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
71238
+ }
71239
+ /**
71240
+ * * Field Name: ID
71241
+ * * Display Name: ID
71242
+ * * SQL Data Type: uniqueidentifier
71243
+ * * Default Value: newsequentialid()
71244
+ */
71245
+ get ID() {
71246
+ return this.Get('ID');
71247
+ }
71248
+ set ID(value) {
71249
+ this.Set('ID', value);
71250
+ }
71251
+ /**
71252
+ * * Field Name: Name
71253
+ * * Display Name: Name
71254
+ * * SQL Data Type: nvarchar(200)
71255
+ * * Description: Human-readable unique name for the permission domain (e.g., "Entity Permissions", "Dashboard Permissions"). Used in admin UI and as the domain identifier in PermissionEngine API calls.
71256
+ */
71257
+ get Name() {
71258
+ return this.Get('Name');
71259
+ }
71260
+ set Name(value) {
71261
+ this.Set('Name', value);
71262
+ }
71263
+ /**
71264
+ * * Field Name: Description
71265
+ * * Display Name: Description
71266
+ * * SQL Data Type: nvarchar(MAX)
71267
+ * * Description: Detailed description of what this permission domain covers and how permissions are enforced.
71268
+ */
71269
+ get Description() {
71270
+ return this.Get('Description');
71271
+ }
71272
+ set Description(value) {
71273
+ this.Set('Description', value);
71274
+ }
71275
+ /**
71276
+ * * Field Name: ProviderClassName
71277
+ * * Display Name: Provider Class Name
71278
+ * * SQL Data Type: nvarchar(500)
71279
+ * * Description: ClassFactory key used to instantiate this provider. Must match the key passed to @RegisterClass(PermissionProviderBase, 'ClassName'). Convention: prefix with MJ for built-in providers (e.g., MJEntityPermissionProvider).
71280
+ */
71281
+ get ProviderClassName() {
71282
+ return this.Get('ProviderClassName');
71283
+ }
71284
+ set ProviderClassName(value) {
71285
+ this.Set('ProviderClassName', value);
71286
+ }
71287
+ /**
71288
+ * * Field Name: SupportedGranteeTypes
71289
+ * * Display Name: Supported Grantee Types
71290
+ * * SQL Data Type: nvarchar(200)
71291
+ * * Description: Comma-delimited list of grantee types this provider supports. Valid tokens: User, Role, Everyone, Public. Example: "User,Role".
71292
+ */
71293
+ get SupportedGranteeTypes() {
71294
+ return this.Get('SupportedGranteeTypes');
71295
+ }
71296
+ set SupportedGranteeTypes(value) {
71297
+ this.Set('SupportedGranteeTypes', value);
71298
+ }
71299
+ /**
71300
+ * * Field Name: SupportedActions
71301
+ * * Display Name: Supported Actions
71302
+ * * SQL Data Type: nvarchar(500)
71303
+ * * Description: Comma-delimited list of permission actions this provider can evaluate. Valid tokens: Read, Create, Update, Delete, Share, Execute, Admin. Example: "Read,Create,Update,Delete".
71304
+ */
71305
+ get SupportedActions() {
71306
+ return this.Get('SupportedActions');
71307
+ }
71308
+ set SupportedActions(value) {
71309
+ this.Set('SupportedActions', value);
71310
+ }
71311
+ /**
71312
+ * * Field Name: SupportsDeny
71313
+ * * Display Name: Supports Deny
71314
+ * * SQL Data Type: bit
71315
+ * * Default Value: 0
71316
+ * * Description: When true, this provider supports explicit Deny records that override Allow grants at the same scope.
71317
+ */
71318
+ get SupportsDeny() {
71319
+ return this.Get('SupportsDeny');
71320
+ }
71321
+ set SupportsDeny(value) {
71322
+ this.Set('SupportsDeny', value);
71323
+ }
71324
+ /**
71325
+ * * Field Name: SupportsExpiration
71326
+ * * Display Name: Supports Expiration
71327
+ * * SQL Data Type: bit
71328
+ * * Default Value: 0
71329
+ * * Description: When true, this provider supports time-bound permissions with an expiration timestamp.
71330
+ */
71331
+ get SupportsExpiration() {
71332
+ return this.Get('SupportsExpiration');
71333
+ }
71334
+ set SupportsExpiration(value) {
71335
+ this.Set('SupportsExpiration', value);
71336
+ }
71337
+ /**
71338
+ * * Field Name: SupportsHierarchyInheritance
71339
+ * * Display Name: Supports Hierarchy Inheritance
71340
+ * * SQL Data Type: bit
71341
+ * * Default Value: 0
71342
+ * * Description: When true, this provider resolves permissions hierarchically (e.g., category-level grants cascade to items within the category).
71343
+ */
71344
+ get SupportsHierarchyInheritance() {
71345
+ return this.Get('SupportsHierarchyInheritance');
71346
+ }
71347
+ set SupportsHierarchyInheritance(value) {
71348
+ this.Set('SupportsHierarchyInheritance', value);
71349
+ }
71350
+ /**
71351
+ * * Field Name: IsActive
71352
+ * * Display Name: Is Active
71353
+ * * SQL Data Type: bit
71354
+ * * Default Value: 1
71355
+ * * Description: When false, the PermissionEngine skips loading this provider at startup. Use to temporarily disable a provider without removing its record.
71356
+ */
71357
+ get IsActive() {
71358
+ return this.Get('IsActive');
71359
+ }
71360
+ set IsActive(value) {
71361
+ this.Set('IsActive', value);
71362
+ }
71363
+ /**
71364
+ * * Field Name: DisplayOrder
71365
+ * * Display Name: Display Order
71366
+ * * SQL Data Type: int
71367
+ * * Default Value: 100
71368
+ * * Description: Sort order for displaying domains in the Sharing Center admin UI. Lower numbers appear first.
71369
+ */
71370
+ get DisplayOrder() {
71371
+ return this.Get('DisplayOrder');
71372
+ }
71373
+ set DisplayOrder(value) {
71374
+ this.Set('DisplayOrder', value);
71375
+ }
71376
+ /**
71377
+ * * Field Name: Icon
71378
+ * * Display Name: Icon
71379
+ * * SQL Data Type: nvarchar(100)
71380
+ * * Description: Optional Font Awesome icon class for display in admin UI (e.g., "fa-solid fa-shield").
71381
+ */
71382
+ get Icon() {
71383
+ return this.Get('Icon');
71384
+ }
71385
+ set Icon(value) {
71386
+ this.Set('Icon', value);
71387
+ }
71388
+ /**
71389
+ * * Field Name: __mj_CreatedAt
71390
+ * * Display Name: Created At
71391
+ * * SQL Data Type: datetimeoffset
71392
+ * * Default Value: getutcdate()
71393
+ */
71394
+ get __mj_CreatedAt() {
71395
+ return this.Get('__mj_CreatedAt');
71396
+ }
71397
+ /**
71398
+ * * Field Name: __mj_UpdatedAt
71399
+ * * Display Name: Updated At
71400
+ * * SQL Data Type: datetimeoffset
71401
+ * * Default Value: getutcdate()
71402
+ */
71403
+ get __mj_UpdatedAt() {
71404
+ return this.Get('__mj_UpdatedAt');
71405
+ }
71406
+ };
71407
+ MJPermissionDomainEntity = __decorate([
71408
+ RegisterClass(BaseEntity, 'MJ: Permission Domains')
71409
+ ], MJPermissionDomainEntity);
71410
+ export { MJPermissionDomainEntity };
69344
71411
  /**
69345
71412
  * MJ: Projects - strongly typed entity sub-class
69346
71413
  * * Schema: __mj
@@ -74688,7 +76755,7 @@ let MJResourcePermissionEntity = class MJResourcePermissionEntity extends BaseEn
74688
76755
  }
74689
76756
  /**
74690
76757
  * * Field Name: ResourceRecordID
74691
- * * Display Name: Resource Record ID
76758
+ * * Display Name: Resource Record
74692
76759
  * * SQL Data Type: nvarchar(255)
74693
76760
  * * Description: ID of the specific resource being shared
74694
76761
  */
@@ -74700,7 +76767,7 @@ let MJResourcePermissionEntity = class MJResourcePermissionEntity extends BaseEn
74700
76767
  }
74701
76768
  /**
74702
76769
  * * Field Name: Type
74703
- * * Display Name: Type
76770
+ * * Display Name: Share Type
74704
76771
  * * SQL Data Type: nvarchar(10)
74705
76772
  * * Value List Type: List
74706
76773
  * * Possible Values
@@ -74716,7 +76783,7 @@ let MJResourcePermissionEntity = class MJResourcePermissionEntity extends BaseEn
74716
76783
  }
74717
76784
  /**
74718
76785
  * * Field Name: StartSharingAt
74719
- * * Display Name: Start Sharing At
76786
+ * * Display Name: Start Date
74720
76787
  * * SQL Data Type: datetimeoffset
74721
76788
  * * Description: Optional: Date when sharing starts
74722
76789
  */
@@ -74728,7 +76795,7 @@ let MJResourcePermissionEntity = class MJResourcePermissionEntity extends BaseEn
74728
76795
  }
74729
76796
  /**
74730
76797
  * * Field Name: EndSharingAt
74731
- * * Display Name: End Sharing At
76798
+ * * Display Name: End Date
74732
76799
  * * SQL Data Type: datetimeoffset
74733
76800
  * * Description: Optional: Date when sharing ends
74734
76801
  */
@@ -74817,6 +76884,19 @@ let MJResourcePermissionEntity = class MJResourcePermissionEntity extends BaseEn
74817
76884
  this.Set('Status', value);
74818
76885
  }
74819
76886
  /**
76887
+ * * Field Name: SharedByUserID
76888
+ * * Display Name: Shared By User ID
76889
+ * * SQL Data Type: uniqueidentifier
76890
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
76891
+ * * Description: The user who granted this permission. NULL when the share pre-dates this column or when the grantor is unknown (e.g., a system-seeded permission).
76892
+ */
76893
+ get SharedByUserID() {
76894
+ return this.Get('SharedByUserID');
76895
+ }
76896
+ set SharedByUserID(value) {
76897
+ this.Set('SharedByUserID', value);
76898
+ }
76899
+ /**
74820
76900
  * * Field Name: ResourceType
74821
76901
  * * Display Name: Resource Type
74822
76902
  * * SQL Data Type: nvarchar(255)
@@ -74840,6 +76920,14 @@ let MJResourcePermissionEntity = class MJResourcePermissionEntity extends BaseEn
74840
76920
  get User() {
74841
76921
  return this.Get('User');
74842
76922
  }
76923
+ /**
76924
+ * * Field Name: SharedByUser
76925
+ * * Display Name: Shared By User
76926
+ * * SQL Data Type: nvarchar(100)
76927
+ */
76928
+ get SharedByUser() {
76929
+ return this.Get('SharedByUser');
76930
+ }
74843
76931
  };
74844
76932
  MJResourcePermissionEntity = __decorate([
74845
76933
  RegisterClass(BaseEntity, 'MJ: Resource Permissions')