@memberjunction/core-entities 2.107.0 → 2.109.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.
@@ -8,13 +8,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ContentSourceParamSchema = exports.ContentProcessRunSchema = exports.ContentItemSchema = exports.ContentItemTagSchema = exports.ContentItemAttributeSchema = exports.ContentFileTypeSchema = exports.CompanyIntegrationSchema = exports.CompanyIntegrationRunSchema = exports.CompanyIntegrationRunDetailSchema = exports.CompanyIntegrationRunAPILogSchema = exports.CompanyIntegrationRecordMapSchema = exports.CompanySchema = exports.CommunicationRunSchema = exports.CommunicationProviderSchema = exports.CommunicationProviderMessageTypeSchema = exports.CommunicationLogSchema = exports.CommunicationBaseMessageTypeSchema = exports.AuthorizationSchema = exports.AuthorizationRoleSchema = exports.AuditLogSchema = exports.AuditLogTypeSchema = exports.ApplicationSchema = exports.ApplicationSettingSchema = exports.ApplicationEntitySchema = exports.AIResultCacheSchema = exports.AIPromptSchema = exports.AIPromptTypeSchema = exports.AIPromptCategorySchema = exports.AIModelSchema = exports.AIModelTypeSchema = exports.AIModelActionSchema = exports.AIAgentSchema = exports.AIAgentRequestSchema = exports.AIAgentNoteSchema = exports.AIAgentNoteTypeSchema = exports.AIAgentModelSchema = exports.AIAgentLearningCycleSchema = exports.AIAgentActionSchema = exports.AIActionSchema = exports.ActionSchema = exports.ActionResultCodeSchema = exports.ActionParamSchema = exports.ActionLibrarySchema = exports.ActionFilterSchema = exports.ActionExecutionLogSchema = exports.ActionContextSchema = exports.ActionContextTypeSchema = exports.ActionCategorySchema = exports.ActionAuthorizationSchema = exports.loadModule = void 0;
10
10
  exports.IntegrationSchema = exports.IntegrationURLFormatSchema = exports.GeneratedCodeSchema = exports.GeneratedCodeCategorySchema = exports.FileSchema = exports.FileStorageProviderSchema = exports.FileEntityRecordLinkSchema = exports.FileCategorySchema = exports.ExplorerNavigationItemSchema = exports.ErrorLogSchema = exports.EntitySettingSchema = exports.EntityRelationshipSchema = exports.EntityRelationshipDisplayComponentSchema = exports.EntityRecordDocumentSchema = exports.EntityPermissionSchema = exports.EntityFieldSchema = exports.EntityFieldValueSchema = exports.EntityDocumentSchema = exports.EntityDocumentTypeSchema = exports.EntityDocumentSettingSchema = exports.EntityDocumentRunSchema = exports.EntityCommunicationMessageTypeSchema = exports.EntityCommunicationFieldSchema = exports.EntityAIActionSchema = exports.EntityActionSchema = exports.EntityActionParamSchema = exports.EntityActionInvocationSchema = exports.EntityActionInvocationTypeSchema = exports.EntityActionFilterSchema = exports.EntitySchema = exports.EmployeeSchema = exports.EmployeeSkillSchema = exports.EmployeeRoleSchema = exports.EmployeeCompanyIntegrationSchema = exports.DuplicateRunSchema = exports.DuplicateRunDetailSchema = exports.DuplicateRunDetailMatchSchema = exports.DatasetSchema = exports.DatasetItemSchema = exports.DataContextSchema = exports.DataContextItemSchema = exports.DashboardSchema = exports.DashboardCategorySchema = exports.ConversationSchema = exports.ConversationDetailSchema = exports.ContentTypeSchema = exports.ContentTypeAttributeSchema = exports.ContentSourceSchema = exports.ContentSourceTypeSchema = exports.ContentSourceTypeParamSchema = void 0;
11
- exports.ReportVersionSchema = exports.ReportUserStateSchema = exports.RecordLinkSchema = exports.QueryParameterSchema = exports.PublicLinkSchema = exports.ProjectSchema = exports.EnvironmentSchema = exports.DashboardUserStateSchema = exports.DashboardUserPreferenceSchema = exports.ConversationDetailArtifactSchema = exports.ConversationArtifactSchema = exports.ConversationArtifactVersionSchema = exports.ConversationArtifactPermissionSchema = exports.ComponentSchema = exports.ComponentRegistrySchema = exports.ComponentLibraryLinkSchema = exports.ComponentLibrarySchema = exports.ComponentDependencySchema = exports.CollectionSchema = exports.CollectionArtifactSchema = exports.ArtifactSchema = exports.ArtifactVersionSchema = exports.ArtifactVersionAttributeSchema = exports.ArtifactTypeSchema = exports.AIVendorSchema = exports.AIVendorTypeSchema = exports.AIVendorTypeDefinitionSchema = exports.AIPromptRunSchema = exports.AIPromptModelSchema = exports.AIModelVendorSchema = exports.AIModelPriceUnitTypeSchema = exports.AIModelPriceTypeSchema = exports.AIModelCostSchema = exports.AIConfigurationSchema = exports.AIConfigurationParamSchema = exports.AIAgentTypeSchema = exports.AIAgentStepSchema = exports.AIAgentStepPathSchema = exports.AIAgentRunSchema = exports.AIAgentRunStepSchema = exports.AIAgentRelationshipSchema = exports.AIAgentPromptSchema = exports.AIAgentPermissionSchema = exports.AIAgentArtifactTypeSchema = exports.AccessControlRuleSchema = exports.ListSchema = exports.ListDetailSchema = exports.ListCategorySchema = exports.LibraryItemSchema = exports.LibrarySchema = void 0;
12
- exports.UserRoleSchema = exports.UserRecordLogSchema = exports.UserNotificationSchema = exports.UserFavoriteSchema = exports.UserApplicationSchema = exports.UserApplicationEntitySchema = exports.TemplateSchema = exports.TemplateParamSchema = exports.TemplateContentSchema = exports.TemplateContentTypeSchema = exports.TemplateCategorySchema = exports.TagSchema = exports.TaggedItemSchema = exports.SkillSchema = exports.SchemaInfoSchema = exports.ScheduledActionSchema = exports.ScheduledActionParamSchema = exports.RowLevelSecurityFilterSchema = exports.RoleSchema = exports.ResourceTypeSchema = exports.ResourcePermissionSchema = exports.ResourceLinkSchema = exports.ReportSchema = exports.ReportSnapshotSchema = exports.ReportCategorySchema = exports.RecordMergeLogSchema = exports.RecordMergeDeletionLogSchema = exports.RecordChangeSchema = exports.RecordChangeReplayRunSchema = exports.RecommendationSchema = exports.RecommendationRunSchema = exports.RecommendationProviderSchema = exports.RecommendationItemSchema = exports.QueueSchema = exports.QueueTypeSchema = exports.QueueTaskSchema = exports.QueryPermissionSchema = exports.QueryFieldSchema = exports.QueryEntitySchema = exports.QueryCategorySchema = exports.QuerySchema = exports.OutputTriggerTypeSchema = exports.OutputFormatTypeSchema = exports.OutputDeliveryTypeSchema = exports.TaskSchema = exports.TaskTypeSchema = exports.TaskDependencySchema = exports.ScheduledJobSchema = exports.ScheduledJobTypeSchema = exports.ScheduledJobRunSchema = void 0;
13
- exports.CommunicationRunEntity = exports.CommunicationProviderEntity = exports.CommunicationProviderMessageTypeEntity = exports.CommunicationLogEntity = exports.CommunicationBaseMessageTypeEntity = exports.AuthorizationEntity = exports.AuthorizationRoleEntity = exports.AuditLogEntity = exports.AuditLogTypeEntity = exports.ApplicationEntity = exports.ApplicationSettingEntity = exports.ApplicationEntityEntity = exports.AIResultCacheEntity = exports.AIPromptEntity = exports.AIPromptTypeEntity = exports.AIPromptCategoryEntity = exports.AIModelEntity = exports.AIModelTypeEntity = exports.AIModelActionEntity = exports.AIAgentEntity = exports.AIAgentRequestEntity = exports.AIAgentNoteEntity = exports.AIAgentNoteTypeEntity = exports.AIAgentModelEntity = exports.AIAgentLearningCycleEntity = exports.AIAgentActionEntity = exports.AIActionEntity = exports.ActionEntity = exports.ActionResultCodeEntity = exports.ActionParamEntity = exports.ActionLibraryEntity = exports.ActionFilterEntity = exports.ActionExecutionLogEntity = exports.ActionContextEntity = exports.ActionContextTypeEntity = exports.ActionCategoryEntity = exports.ActionAuthorizationEntity = exports.WorkspaceSchema = exports.WorkspaceItemSchema = exports.WorkflowSchema = exports.WorkflowRunSchema = exports.WorkflowEngineSchema = exports.VersionInstallationSchema = exports.VectorIndexSchema = exports.VectorDatabaseSchema = exports.UserSchema = exports.UserViewSchema = exports.UserViewRunSchema = exports.UserViewRunDetailSchema = exports.UserViewCategorySchema = void 0;
14
- exports.EntityRelationshipDisplayComponentEntity = exports.EntityRecordDocumentEntity = exports.EntityPermissionEntity = exports.EntityFieldEntity = exports.EntityFieldValueEntity = exports.EntityDocumentEntity = exports.EntityDocumentTypeEntity = exports.EntityDocumentSettingEntity = exports.EntityDocumentRunEntity = exports.EntityCommunicationMessageTypeEntity = exports.EntityCommunicationFieldEntity = exports.EntityAIActionEntity = exports.EntityActionEntity = exports.EntityActionParamEntity = exports.EntityActionInvocationEntity = exports.EntityActionInvocationTypeEntity = exports.EntityActionFilterEntity = exports.EntityEntity = exports.EmployeeEntity = exports.EmployeeSkillEntity = exports.EmployeeRoleEntity = exports.EmployeeCompanyIntegrationEntity = exports.DuplicateRunEntity = exports.DuplicateRunDetailEntity = exports.DuplicateRunDetailMatchEntity = exports.DatasetEntity = exports.DatasetItemEntity = exports.DataContextEntity = exports.DataContextItemEntity = exports.DashboardEntity = exports.DashboardCategoryEntity = exports.ConversationEntity = exports.ConversationDetailEntity = exports.ContentTypeEntity = exports.ContentTypeAttributeEntity = exports.ContentSourceEntity = exports.ContentSourceTypeEntity = exports.ContentSourceTypeParamEntity = exports.ContentSourceParamEntity = exports.ContentProcessRunEntity = exports.ContentItemEntity = exports.ContentItemTagEntity = exports.ContentItemAttributeEntity = exports.ContentFileTypeEntity = exports.CompanyIntegrationEntity = exports.CompanyIntegrationRunEntity = exports.CompanyIntegrationRunDetailEntity = exports.CompanyIntegrationRunAPILogEntity = exports.CompanyIntegrationRecordMapEntity = exports.CompanyEntity = void 0;
15
- exports.ConversationArtifactPermissionEntity = exports.ComponentEntity = exports.ComponentRegistryEntity = exports.ComponentLibraryLinkEntity = exports.ComponentLibraryEntity = exports.ComponentDependencyEntity = exports.CollectionEntity = exports.CollectionArtifactEntity = exports.ArtifactEntity = exports.ArtifactVersionEntity = exports.ArtifactVersionAttributeEntity = exports.ArtifactTypeEntity = exports.AIVendorEntity = exports.AIVendorTypeEntity = exports.AIVendorTypeDefinitionEntity = exports.AIPromptRunEntity = exports.AIPromptModelEntity = exports.AIModelVendorEntity = exports.AIModelPriceUnitTypeEntity = exports.AIModelPriceTypeEntity = exports.AIModelCostEntity = exports.AIConfigurationEntity = exports.AIConfigurationParamEntity = exports.AIAgentTypeEntity = exports.AIAgentStepEntity = exports.AIAgentStepPathEntity = exports.AIAgentRunEntity = exports.AIAgentRunStepEntity = exports.AIAgentRelationshipEntity = exports.AIAgentPromptEntity = exports.AIAgentPermissionEntity = exports.AIAgentArtifactTypeEntity = exports.AccessControlRuleEntity = exports.ListEntity = exports.ListDetailEntity = exports.ListCategoryEntity = exports.LibraryItemEntity = exports.LibraryEntity = exports.IntegrationEntity = exports.IntegrationURLFormatEntity = exports.GeneratedCodeEntity = exports.GeneratedCodeCategoryEntity = exports.FileEntity = exports.FileStorageProviderEntity = exports.FileEntityRecordLinkEntity = exports.FileCategoryEntity = exports.ExplorerNavigationItemEntity = exports.ErrorLogEntity = exports.EntitySettingEntity = exports.EntityRelationshipEntity = void 0;
16
- exports.TaggedItemEntity = exports.SkillEntity = exports.SchemaInfoEntity = exports.ScheduledActionEntity = exports.ScheduledActionParamEntity = exports.RowLevelSecurityFilterEntity = exports.RoleEntity = exports.ResourceTypeEntity = exports.ResourcePermissionEntity = exports.ResourceLinkEntity = exports.ReportEntity = exports.ReportSnapshotEntity = exports.ReportCategoryEntity = exports.RecordMergeLogEntity = exports.RecordMergeDeletionLogEntity = exports.RecordChangeEntity = exports.RecordChangeReplayRunEntity = exports.RecommendationEntity = exports.RecommendationRunEntity = exports.RecommendationProviderEntity = exports.RecommendationItemEntity = exports.QueueEntity = exports.QueueTypeEntity = exports.QueueTaskEntity = exports.QueryPermissionEntity = exports.QueryFieldEntity = exports.QueryEntityEntity = exports.QueryCategoryEntity = exports.QueryEntity = exports.OutputTriggerTypeEntity = exports.OutputFormatTypeEntity = exports.OutputDeliveryTypeEntity = exports.TaskEntity = exports.TaskTypeEntity = exports.TaskDependencyEntity = exports.ScheduledJobEntity = exports.ScheduledJobTypeEntity = exports.ScheduledJobRunEntity = exports.ReportVersionEntity = exports.ReportUserStateEntity = exports.RecordLinkEntity = exports.QueryParameterEntity = exports.PublicLinkEntity = exports.ProjectEntity = exports.EnvironmentEntity = exports.DashboardUserStateEntity = exports.DashboardUserPreferenceEntity = exports.ConversationDetailArtifactEntity = exports.ConversationArtifactEntity = exports.ConversationArtifactVersionEntity = void 0;
17
- exports.WorkspaceEntity = exports.WorkspaceItemEntity = exports.WorkflowEntity = exports.WorkflowRunEntity = exports.WorkflowEngineEntity = exports.VersionInstallationEntity = exports.VectorIndexEntity = exports.VectorDatabaseEntity = exports.UserEntity = exports.UserViewEntity = exports.UserViewRunEntity = exports.UserViewRunDetailEntity = exports.UserViewCategoryEntity = exports.UserRoleEntity = exports.UserRecordLogEntity = exports.UserNotificationEntity = exports.UserFavoriteEntity = exports.UserApplicationEntity = exports.UserApplicationEntityEntity = exports.TemplateEntity = exports.TemplateParamEntity = exports.TemplateContentEntity = exports.TemplateContentTypeEntity = exports.TemplateCategoryEntity = exports.TagEntity = void 0;
11
+ exports.QueryParameterSchema = exports.PublicLinkSchema = exports.ProjectSchema = exports.EnvironmentSchema = exports.DashboardUserStateSchema = exports.DashboardUserPreferenceSchema = exports.ConversationDetailArtifactSchema = exports.ConversationArtifactSchema = exports.ConversationArtifactVersionSchema = exports.ConversationArtifactPermissionSchema = exports.ComponentSchema = exports.ComponentRegistrySchema = exports.ComponentLibraryLinkSchema = exports.ComponentLibrarySchema = exports.ComponentDependencySchema = exports.CollectionSchema = exports.CollectionPermissionSchema = exports.CollectionArtifactSchema = exports.ArtifactSchema = exports.ArtifactVersionSchema = exports.ArtifactVersionAttributeSchema = exports.ArtifactTypeSchema = exports.ArtifactPermissionSchema = exports.AIVendorSchema = exports.AIVendorTypeSchema = exports.AIVendorTypeDefinitionSchema = exports.AIPromptRunSchema = exports.AIPromptModelSchema = exports.AIModelVendorSchema = exports.AIModelPriceUnitTypeSchema = exports.AIModelPriceTypeSchema = exports.AIModelCostSchema = exports.AIConfigurationSchema = exports.AIConfigurationParamSchema = exports.AIAgentTypeSchema = exports.AIAgentStepSchema = exports.AIAgentStepPathSchema = exports.AIAgentRunSchema = exports.AIAgentRunStepSchema = exports.AIAgentRelationshipSchema = exports.AIAgentPromptSchema = exports.AIAgentPermissionSchema = exports.AIAgentDataSourceSchema = exports.AIAgentArtifactTypeSchema = exports.AccessControlRuleSchema = exports.ListSchema = exports.ListDetailSchema = exports.ListCategorySchema = exports.LibraryItemSchema = exports.LibrarySchema = void 0;
12
+ exports.UserFavoriteSchema = exports.UserApplicationSchema = exports.UserApplicationEntitySchema = exports.TemplateSchema = exports.TemplateParamSchema = exports.TemplateContentSchema = exports.TemplateContentTypeSchema = exports.TemplateCategorySchema = exports.TagSchema = exports.TaggedItemSchema = exports.SkillSchema = exports.SchemaInfoSchema = exports.ScheduledActionSchema = exports.ScheduledActionParamSchema = exports.RowLevelSecurityFilterSchema = exports.RoleSchema = exports.ResourceTypeSchema = exports.ResourcePermissionSchema = exports.ResourceLinkSchema = exports.ReportSchema = exports.ReportSnapshotSchema = exports.ReportCategorySchema = exports.RecordMergeLogSchema = exports.RecordMergeDeletionLogSchema = exports.RecordChangeSchema = exports.RecordChangeReplayRunSchema = exports.RecommendationSchema = exports.RecommendationRunSchema = exports.RecommendationProviderSchema = exports.RecommendationItemSchema = exports.QueueSchema = exports.QueueTypeSchema = exports.QueueTaskSchema = exports.QueryPermissionSchema = exports.QueryFieldSchema = exports.QueryEntitySchema = exports.QueryCategorySchema = exports.QuerySchema = exports.OutputTriggerTypeSchema = exports.OutputFormatTypeSchema = exports.OutputDeliveryTypeSchema = exports.TaskSchema = exports.TaskTypeSchema = exports.TaskDependencySchema = exports.ScheduledJobSchema = exports.ScheduledJobTypeSchema = exports.ScheduledJobRunSchema = exports.ReportVersionSchema = exports.ReportUserStateSchema = exports.RecordLinkSchema = void 0;
13
+ exports.CommunicationLogEntity = exports.CommunicationBaseMessageTypeEntity = exports.AuthorizationEntity = exports.AuthorizationRoleEntity = exports.AuditLogEntity = exports.AuditLogTypeEntity = exports.ApplicationEntity = exports.ApplicationSettingEntity = exports.ApplicationEntityEntity = exports.AIResultCacheEntity = exports.AIPromptEntity = exports.AIPromptTypeEntity = exports.AIPromptCategoryEntity = exports.AIModelEntity = exports.AIModelTypeEntity = exports.AIModelActionEntity = exports.AIAgentEntity = exports.AIAgentRequestEntity = exports.AIAgentNoteEntity = exports.AIAgentNoteTypeEntity = exports.AIAgentModelEntity = exports.AIAgentLearningCycleEntity = exports.AIAgentActionEntity = exports.AIActionEntity = exports.ActionEntity = exports.ActionResultCodeEntity = exports.ActionParamEntity = exports.ActionLibraryEntity = exports.ActionFilterEntity = exports.ActionExecutionLogEntity = exports.ActionContextEntity = exports.ActionContextTypeEntity = exports.ActionCategoryEntity = exports.ActionAuthorizationEntity = exports.WorkspaceSchema = exports.WorkspaceItemSchema = exports.WorkflowSchema = exports.WorkflowRunSchema = exports.WorkflowEngineSchema = exports.VersionInstallationSchema = exports.VectorIndexSchema = exports.VectorDatabaseSchema = exports.UserSchema = exports.UserViewSchema = exports.UserViewRunSchema = exports.UserViewRunDetailSchema = exports.UserViewCategorySchema = exports.UserRoleSchema = exports.UserRecordLogSchema = exports.UserNotificationSchema = void 0;
14
+ exports.EntityFieldEntity = exports.EntityFieldValueEntity = exports.EntityDocumentEntity = exports.EntityDocumentTypeEntity = exports.EntityDocumentSettingEntity = exports.EntityDocumentRunEntity = exports.EntityCommunicationMessageTypeEntity = exports.EntityCommunicationFieldEntity = exports.EntityAIActionEntity = exports.EntityActionEntity = exports.EntityActionParamEntity = exports.EntityActionInvocationEntity = exports.EntityActionInvocationTypeEntity = exports.EntityActionFilterEntity = exports.EntityEntity = exports.EmployeeEntity = exports.EmployeeSkillEntity = exports.EmployeeRoleEntity = exports.EmployeeCompanyIntegrationEntity = exports.DuplicateRunEntity = exports.DuplicateRunDetailEntity = exports.DuplicateRunDetailMatchEntity = exports.DatasetEntity = exports.DatasetItemEntity = exports.DataContextEntity = exports.DataContextItemEntity = exports.DashboardEntity = exports.DashboardCategoryEntity = exports.ConversationEntity = exports.ConversationDetailEntity = exports.ContentTypeEntity = exports.ContentTypeAttributeEntity = exports.ContentSourceEntity = exports.ContentSourceTypeEntity = exports.ContentSourceTypeParamEntity = exports.ContentSourceParamEntity = exports.ContentProcessRunEntity = exports.ContentItemEntity = exports.ContentItemTagEntity = exports.ContentItemAttributeEntity = exports.ContentFileTypeEntity = exports.CompanyIntegrationEntity = exports.CompanyIntegrationRunEntity = exports.CompanyIntegrationRunDetailEntity = exports.CompanyIntegrationRunAPILogEntity = exports.CompanyIntegrationRecordMapEntity = exports.CompanyEntity = exports.CommunicationRunEntity = exports.CommunicationProviderEntity = exports.CommunicationProviderMessageTypeEntity = void 0;
15
+ exports.CollectionEntity = exports.CollectionPermissionEntity = exports.CollectionArtifactEntity = exports.ArtifactEntity = exports.ArtifactVersionEntity = exports.ArtifactVersionAttributeEntity = exports.ArtifactTypeEntity = exports.ArtifactPermissionEntity = exports.AIVendorEntity = exports.AIVendorTypeEntity = exports.AIVendorTypeDefinitionEntity = exports.AIPromptRunEntity = exports.AIPromptModelEntity = exports.AIModelVendorEntity = exports.AIModelPriceUnitTypeEntity = exports.AIModelPriceTypeEntity = exports.AIModelCostEntity = exports.AIConfigurationEntity = exports.AIConfigurationParamEntity = exports.AIAgentTypeEntity = exports.AIAgentStepEntity = exports.AIAgentStepPathEntity = exports.AIAgentRunEntity = exports.AIAgentRunStepEntity = exports.AIAgentRelationshipEntity = exports.AIAgentPromptEntity = exports.AIAgentPermissionEntity = exports.AIAgentDataSourceEntity = exports.AIAgentArtifactTypeEntity = exports.AccessControlRuleEntity = exports.ListEntity = exports.ListDetailEntity = exports.ListCategoryEntity = exports.LibraryItemEntity = exports.LibraryEntity = exports.IntegrationEntity = exports.IntegrationURLFormatEntity = exports.GeneratedCodeEntity = exports.GeneratedCodeCategoryEntity = exports.FileEntity = exports.FileStorageProviderEntity = exports.FileEntityRecordLinkEntity = exports.FileCategoryEntity = exports.ExplorerNavigationItemEntity = exports.ErrorLogEntity = exports.EntitySettingEntity = exports.EntityRelationshipEntity = exports.EntityRelationshipDisplayComponentEntity = exports.EntityRecordDocumentEntity = exports.EntityPermissionEntity = void 0;
16
+ exports.RoleEntity = exports.ResourceTypeEntity = exports.ResourcePermissionEntity = exports.ResourceLinkEntity = exports.ReportEntity = exports.ReportSnapshotEntity = exports.ReportCategoryEntity = exports.RecordMergeLogEntity = exports.RecordMergeDeletionLogEntity = exports.RecordChangeEntity = exports.RecordChangeReplayRunEntity = exports.RecommendationEntity = exports.RecommendationRunEntity = exports.RecommendationProviderEntity = exports.RecommendationItemEntity = exports.QueueEntity = exports.QueueTypeEntity = exports.QueueTaskEntity = exports.QueryPermissionEntity = exports.QueryFieldEntity = exports.QueryEntityEntity = exports.QueryCategoryEntity = exports.QueryEntity = exports.OutputTriggerTypeEntity = exports.OutputFormatTypeEntity = exports.OutputDeliveryTypeEntity = exports.TaskEntity = exports.TaskTypeEntity = exports.TaskDependencyEntity = exports.ScheduledJobEntity = exports.ScheduledJobTypeEntity = exports.ScheduledJobRunEntity = exports.ReportVersionEntity = exports.ReportUserStateEntity = exports.RecordLinkEntity = exports.QueryParameterEntity = exports.PublicLinkEntity = exports.ProjectEntity = exports.EnvironmentEntity = exports.DashboardUserStateEntity = exports.DashboardUserPreferenceEntity = exports.ConversationDetailArtifactEntity = exports.ConversationArtifactEntity = exports.ConversationArtifactVersionEntity = exports.ConversationArtifactPermissionEntity = exports.ComponentEntity = exports.ComponentRegistryEntity = exports.ComponentLibraryLinkEntity = exports.ComponentLibraryEntity = exports.ComponentDependencyEntity = void 0;
17
+ exports.WorkspaceEntity = exports.WorkspaceItemEntity = exports.WorkflowEntity = exports.WorkflowRunEntity = exports.WorkflowEngineEntity = exports.VersionInstallationEntity = exports.VectorIndexEntity = exports.VectorDatabaseEntity = exports.UserEntity = exports.UserViewEntity = exports.UserViewRunEntity = exports.UserViewRunDetailEntity = exports.UserViewCategoryEntity = exports.UserRoleEntity = exports.UserRecordLogEntity = exports.UserNotificationEntity = exports.UserFavoriteEntity = exports.UserApplicationEntity = exports.UserApplicationEntityEntity = exports.TemplateEntity = exports.TemplateParamEntity = exports.TemplateContentEntity = exports.TemplateContentTypeEntity = exports.TemplateCategoryEntity = exports.TagEntity = exports.TaggedItemEntity = exports.SkillEntity = exports.SchemaInfoEntity = exports.ScheduledActionEntity = exports.ScheduledActionParamEntity = exports.RowLevelSecurityFilterEntity = void 0;
18
18
  const core_1 = require("@memberjunction/core");
19
19
  const global_1 = require("@memberjunction/global");
20
20
  const zod_1 = require("zod");
@@ -606,6 +606,12 @@ exports.ActionSchema = zod_1.z.object({
606
606
  * * Display Name: Icon Class
607
607
  * * SQL Data Type: nvarchar(100)
608
608
  * * Description: Font Awesome icon class (e.g., fa-cog, fa-play, fa-search) for visual representation of the action.`),
609
+ DefaultCompactPromptID: zod_1.z.string().nullable().describe(`
610
+ * * Field Name: DefaultCompactPromptID
611
+ * * Display Name: Default Compact Prompt ID
612
+ * * SQL Data Type: uniqueidentifier
613
+ * * Related Entity/Foreign Key: AI Prompts (vwAIPrompts.ID)
614
+ * * Description: Default prompt for compacting/summarizing this action's results when used by agents with CompactMode=AISummary. Action designers define how their specific results should be summarized. Can be overridden per agent in AIAgentAction.CompactPromptID.`),
609
615
  Category: zod_1.z.string().nullable().describe(`
610
616
  * * Field Name: Category
611
617
  * * Display Name: Category
@@ -618,6 +624,10 @@ exports.ActionSchema = zod_1.z.object({
618
624
  * * Field Name: Parent
619
625
  * * Display Name: Parent
620
626
  * * SQL Data Type: nvarchar(425)`),
627
+ DefaultCompactPrompt: zod_1.z.string().nullable().describe(`
628
+ * * Field Name: DefaultCompactPrompt
629
+ * * Display Name: Default Compact Prompt
630
+ * * SQL Data Type: nvarchar(255)`),
621
631
  RootParentID: zod_1.z.string().nullable().describe(`
622
632
  * * Field Name: RootParentID
623
633
  * * Display Name: Root Parent ID
@@ -723,6 +733,42 @@ exports.AIAgentActionSchema = zod_1.z.object({
723
733
  * * Display Name: Max Executions Per Run
724
734
  * * SQL Data Type: int
725
735
  * * Description: Maximum number of times this action can be executed per agent run`),
736
+ ResultExpirationTurns: zod_1.z.number().nullable().describe(`
737
+ * * Field Name: ResultExpirationTurns
738
+ * * Display Name: Result Expiration Turns
739
+ * * SQL Data Type: int
740
+ * * Description: Number of conversation turns before action results expire from conversation context. NULL = never expire (default). 0 = expire immediately after next turn.`),
741
+ ResultExpirationMode: zod_1.z.union([zod_1.z.literal('Compact'), zod_1.z.literal('None'), zod_1.z.literal('Remove')]).describe(`
742
+ * * Field Name: ResultExpirationMode
743
+ * * Display Name: Result Expiration Mode
744
+ * * SQL Data Type: nvarchar(20)
745
+ * * Default Value: None
746
+ * * Value List Type: List
747
+ * * Possible Values
748
+ * * Remove
749
+ * * None
750
+ * * Compact
751
+ * * Description: How to handle expired action results: None (no expiration, default), Remove (delete message entirely), Compact (reduce size via CompactMode while preserving key information).`),
752
+ CompactMode: zod_1.z.union([zod_1.z.literal('AI Summary'), zod_1.z.literal('First N Chars')]).nullable().describe(`
753
+ * * Field Name: CompactMode
754
+ * * Display Name: Compact Mode
755
+ * * SQL Data Type: nvarchar(20)
756
+ * * Value List Type: List
757
+ * * Possible Values
758
+ * * AI Summary
759
+ * * First N Chars
760
+ * * Description: How to compact results when ResultExpirationMode=Compact: FirstNChars (truncate to CompactLength characters, fast and free), AISummary (use LLM to intelligently summarize with CompactPromptID or Action.DefaultCompactPromptID).`),
761
+ CompactLength: zod_1.z.number().nullable().describe(`
762
+ * * Field Name: CompactLength
763
+ * * Display Name: Compact Length
764
+ * * SQL Data Type: int
765
+ * * Description: Number of characters to keep when CompactMode=FirstNChars. Required when CompactMode is FirstNChars, ignored otherwise.`),
766
+ CompactPromptID: zod_1.z.string().nullable().describe(`
767
+ * * Field Name: CompactPromptID
768
+ * * Display Name: Compact Prompt ID
769
+ * * SQL Data Type: uniqueidentifier
770
+ * * Related Entity/Foreign Key: AI Prompts (vwAIPrompts.ID)
771
+ * * Description: Optional override for AI summarization prompt when CompactMode=AISummary. Lookup hierarchy: this field -> Action.DefaultCompactPromptID -> system default. Allows agent-specific summarization focus (e.g., technical vs. marketing perspective).`),
726
772
  Agent: zod_1.z.string().nullable().describe(`
727
773
  * * Field Name: Agent
728
774
  * * Display Name: Agent
@@ -731,6 +777,10 @@ exports.AIAgentActionSchema = zod_1.z.object({
731
777
  * * Field Name: Action
732
778
  * * Display Name: Action
733
779
  * * SQL Data Type: nvarchar(425)`),
780
+ CompactPrompt: zod_1.z.string().nullable().describe(`
781
+ * * Field Name: CompactPrompt
782
+ * * Display Name: Compact Prompt
783
+ * * SQL Data Type: nvarchar(255)`),
734
784
  });
735
785
  /**
736
786
  * zod schema definition for the entity AI Agent Learning Cycles
@@ -1261,6 +1311,17 @@ if this limit is exceeded.`),
1261
1311
  * * Related Entity/Foreign Key: Users (vwUsers.ID)
1262
1312
  * * Default Value: ECAFCCEC-6A37-EF11-86D4-000D3A4E707E
1263
1313
  * * Description: The user who owns and created this AI agent. Automatically set to the current user if not specified. Owner has full permissions (view, run, edit, delete) regardless of ACL entries.`),
1314
+ InvocationMode: zod_1.z.union([zod_1.z.literal('Any'), zod_1.z.literal('Sub-Agent'), zod_1.z.literal('Top-Level')]).describe(`
1315
+ * * Field Name: InvocationMode
1316
+ * * Display Name: Invocation Mode
1317
+ * * SQL Data Type: nvarchar(20)
1318
+ * * Default Value: Any
1319
+ * * Value List Type: List
1320
+ * * Possible Values
1321
+ * * Sub-Agent
1322
+ * * Any
1323
+ * * Top-Level
1324
+ * * Description: Controls how the agent can be invoked: Any (default - can be top-level or sub-agent), Top-Level (only callable as primary agent), Sub-Agent (only callable as sub-agent). Used to filter available agents in tools like Sage.`),
1264
1325
  Parent: zod_1.z.string().nullable().describe(`
1265
1326
  * * Field Name: Parent
1266
1327
  * * Display Name: Parent
@@ -3723,6 +3784,11 @@ exports.ConversationDetailSchema = zod_1.z.object({
3723
3784
  * * Complete
3724
3785
  * * Error
3725
3786
  * * Description: Status of the conversation message. Complete indicates finished processing, In-Progress indicates active agent work, Error indicates processing failed.`),
3787
+ SuggestedResponses: zod_1.z.string().nullable().describe(`
3788
+ * * Field Name: SuggestedResponses
3789
+ * * Display Name: Suggested Responses
3790
+ * * SQL Data Type: nvarchar(MAX)
3791
+ * * Description: JSON array of suggested responses that can be displayed to the user for quick replies. Each response object contains: text (display text), allowInput (boolean), iconClass (optional Font Awesome class), and data (optional payload).`),
3726
3792
  Conversation: zod_1.z.string().nullable().describe(`
3727
3793
  * * Field Name: Conversation
3728
3794
  * * Display Name: Conversation
@@ -7480,6 +7546,153 @@ exports.AIAgentArtifactTypeSchema = zod_1.z.object({
7480
7546
  * * Display Name: Artifact Type
7481
7547
  * * SQL Data Type: nvarchar(100)`),
7482
7548
  });
7549
+ /**
7550
+ * zod schema definition for the entity MJ: AI Agent Data Sources
7551
+ */
7552
+ exports.AIAgentDataSourceSchema = zod_1.z.object({
7553
+ ID: zod_1.z.string().describe(`
7554
+ * * Field Name: ID
7555
+ * * Display Name: ID
7556
+ * * SQL Data Type: uniqueidentifier
7557
+ * * Default Value: newsequentialid()`),
7558
+ AgentID: zod_1.z.string().describe(`
7559
+ * * Field Name: AgentID
7560
+ * * Display Name: Agent ID
7561
+ * * SQL Data Type: uniqueidentifier
7562
+ * * Related Entity/Foreign Key: AI Agents (vwAIAgents.ID)`),
7563
+ Name: zod_1.z.string().describe(`
7564
+ * * Field Name: Name
7565
+ * * Display Name: Name
7566
+ * * SQL Data Type: nvarchar(255)
7567
+ * * Description: Variable name for the data in the data parameter (e.g., "ALL_ENTITIES"). Must be unique within an agent.`),
7568
+ Description: zod_1.z.string().nullable().describe(`
7569
+ * * Field Name: Description
7570
+ * * Display Name: Description
7571
+ * * SQL Data Type: nvarchar(MAX)
7572
+ * * Description: Description of what this data source provides`),
7573
+ SourceType: zod_1.z.union([zod_1.z.literal('RunQuery'), zod_1.z.literal('RunView')]).describe(`
7574
+ * * Field Name: SourceType
7575
+ * * Display Name: Source Type
7576
+ * * SQL Data Type: nvarchar(20)
7577
+ * * Default Value: RunView
7578
+ * * Value List Type: List
7579
+ * * Possible Values
7580
+ * * RunQuery
7581
+ * * RunView
7582
+ * * Description: Type of data source: RunView or RunQuery. Determines which parameters are used.`),
7583
+ EntityName: zod_1.z.string().nullable().describe(`
7584
+ * * Field Name: EntityName
7585
+ * * Display Name: Entity Name
7586
+ * * SQL Data Type: nvarchar(255)
7587
+ * * Description: Entity name for RunView data sources (e.g., "Entities", "AI Models")`),
7588
+ ExtraFilter: zod_1.z.string().nullable().describe(`
7589
+ * * Field Name: ExtraFilter
7590
+ * * Display Name: Extra Filter
7591
+ * * SQL Data Type: nvarchar(MAX)
7592
+ * * Description: SQL WHERE clause filter for RunView data sources`),
7593
+ OrderBy: zod_1.z.string().nullable().describe(`
7594
+ * * Field Name: OrderBy
7595
+ * * Display Name: Order By
7596
+ * * SQL Data Type: nvarchar(500)
7597
+ * * Description: SQL ORDER BY clause for RunView data sources`),
7598
+ FieldsToRetrieve: zod_1.z.string().nullable().describe(`
7599
+ * * Field Name: FieldsToRetrieve
7600
+ * * Display Name: Fields To Retrieve
7601
+ * * SQL Data Type: nvarchar(MAX)
7602
+ * * Description: JSON array of field names to return for RunView data sources (e.g., ["ID", "Name", "Description"])`),
7603
+ ResultType: zod_1.z.union([zod_1.z.literal('entity_object'), zod_1.z.literal('simple')]).nullable().describe(`
7604
+ * * Field Name: ResultType
7605
+ * * Display Name: Result Type
7606
+ * * SQL Data Type: nvarchar(20)
7607
+ * * Default Value: simple
7608
+ * * Value List Type: List
7609
+ * * Possible Values
7610
+ * * entity_object
7611
+ * * simple
7612
+ * * Description: Result type for RunView: simple (default) or entity_object`),
7613
+ QueryName: zod_1.z.string().nullable().describe(`
7614
+ * * Field Name: QueryName
7615
+ * * Display Name: Query Name
7616
+ * * SQL Data Type: nvarchar(255)
7617
+ * * Description: Query name for RunQuery data sources`),
7618
+ CategoryPath: zod_1.z.string().nullable().describe(`
7619
+ * * Field Name: CategoryPath
7620
+ * * Display Name: Category Path
7621
+ * * SQL Data Type: nvarchar(500)
7622
+ * * Description: Category path for RunQuery data sources (e.g., "/MJ/AI/Agents/")`),
7623
+ Parameters: zod_1.z.string().nullable().describe(`
7624
+ * * Field Name: Parameters
7625
+ * * Display Name: Parameters
7626
+ * * SQL Data Type: nvarchar(MAX)
7627
+ * * Description: JSON object of parameters for RunQuery data sources (e.g., {"organizationId": "123"})`),
7628
+ MaxRows: zod_1.z.number().nullable().describe(`
7629
+ * * Field Name: MaxRows
7630
+ * * Display Name: Max Rows
7631
+ * * SQL Data Type: int
7632
+ * * Description: Maximum number of rows to return. Applies to both RunView and RunQuery.`),
7633
+ ExecutionOrder: zod_1.z.number().describe(`
7634
+ * * Field Name: ExecutionOrder
7635
+ * * Display Name: Execution Order
7636
+ * * SQL Data Type: int
7637
+ * * Default Value: 0
7638
+ * * Description: Execution order when multiple data sources are defined for an agent (lower numbers execute first)`),
7639
+ Status: zod_1.z.union([zod_1.z.literal('Active'), zod_1.z.literal('Disabled')]).describe(`
7640
+ * * Field Name: Status
7641
+ * * Display Name: Status
7642
+ * * SQL Data Type: nvarchar(20)
7643
+ * * Default Value: Active
7644
+ * * Value List Type: List
7645
+ * * Possible Values
7646
+ * * Active
7647
+ * * Disabled
7648
+ * * Description: Status of the data source: Active or Disabled`),
7649
+ CachePolicy: zod_1.z.union([zod_1.z.literal('None'), zod_1.z.literal('PerAgent'), zod_1.z.literal('PerRun')]).describe(`
7650
+ * * Field Name: CachePolicy
7651
+ * * Display Name: Cache Policy
7652
+ * * SQL Data Type: nvarchar(20)
7653
+ * * Default Value: None
7654
+ * * Value List Type: List
7655
+ * * Possible Values
7656
+ * * PerRun
7657
+ * * PerAgent
7658
+ * * None
7659
+ * * Description: Cache policy: None (no caching), PerRun (cache for duration of agent run), PerAgent (cache across runs with timeout)`),
7660
+ CacheTimeoutSeconds: zod_1.z.number().nullable().describe(`
7661
+ * * Field Name: CacheTimeoutSeconds
7662
+ * * Display Name: Cache Timeout Seconds
7663
+ * * SQL Data Type: int
7664
+ * * Description: Time-to-live in seconds for PerAgent cache policy. Ignored for other cache policies.`),
7665
+ DestinationType: zod_1.z.union([zod_1.z.literal('Context'), zod_1.z.literal('Data'), zod_1.z.literal('Payload')]).describe(`
7666
+ * * Field Name: DestinationType
7667
+ * * Display Name: Destination Type
7668
+ * * SQL Data Type: nvarchar(20)
7669
+ * * Default Value: Data
7670
+ * * Value List Type: List
7671
+ * * Possible Values
7672
+ * * Data
7673
+ * * Context
7674
+ * * Payload
7675
+ * * Description: Destination for the preloaded data: Data (for Nunjucks templates in prompts), Context (for actions only), or Payload (for agent state)`),
7676
+ DestinationPath: zod_1.z.string().nullable().describe(`
7677
+ * * Field Name: DestinationPath
7678
+ * * Display Name: Destination Path
7679
+ * * SQL Data Type: nvarchar(500)
7680
+ * * Description: Path within the destination where data should be injected. Supports nested paths using dot notation (e.g., "config.api.endpoints", "analysis.orders.recent"). If null, uses Name as root-level key.`),
7681
+ __mj_CreatedAt: zod_1.z.date().describe(`
7682
+ * * Field Name: __mj_CreatedAt
7683
+ * * Display Name: Created At
7684
+ * * SQL Data Type: datetimeoffset
7685
+ * * Default Value: getutcdate()`),
7686
+ __mj_UpdatedAt: zod_1.z.date().describe(`
7687
+ * * Field Name: __mj_UpdatedAt
7688
+ * * Display Name: Updated At
7689
+ * * SQL Data Type: datetimeoffset
7690
+ * * Default Value: getutcdate()`),
7691
+ Agent: zod_1.z.string().nullable().describe(`
7692
+ * * Field Name: Agent
7693
+ * * Display Name: Agent
7694
+ * * SQL Data Type: nvarchar(255)`),
7695
+ });
7483
7696
  /**
7484
7697
  * zod schema definition for the entity MJ: AI Agent Permissions
7485
7698
  */
@@ -7697,6 +7910,16 @@ exports.AIAgentRelationshipSchema = zod_1.z.object({
7697
7910
  * * Display Name: Sub Agent Output Mapping
7698
7911
  * * SQL Data Type: nvarchar(MAX)
7699
7912
  * * Description: JSON configuration mapping sub-agent result payload paths to parent agent payload paths. Enables controlled merging of sub-agent results. Format: {"subAgentPath": "parentPath", "*": "captureAllPath"}. If null, sub-agent results are not automatically merged into parent payload.`),
7913
+ SubAgentInputMapping: zod_1.z.string().nullable().describe(`
7914
+ * * Field Name: SubAgentInputMapping
7915
+ * * Display Name: Sub Agent Input Mapping
7916
+ * * SQL Data Type: nvarchar(MAX)
7917
+ * * Description: JSON mapping of parent payload paths to sub-agent initial payload paths. Enables structural data transfer from parent to related sub-agent. Format: {"parentPath": "subAgentPath", "parent.nested": "subAgent.field"}. Example: {"searchQuery": "query", "maxResults": "limit"}. If null, sub-agent starts with empty payload (default behavior).`),
7918
+ SubAgentContextPaths: zod_1.z.string().nullable().describe(`
7919
+ * * Field Name: SubAgentContextPaths
7920
+ * * Display Name: Sub Agent Context Paths
7921
+ * * SQL Data Type: nvarchar(MAX)
7922
+ * * Description: JSON array of parent payload paths to send as LLM context to related sub-agent. Sub-agent receives this data in a formatted context message before its task message. Format: ["path1", "path2.nested", "path3.*", "*"]. Use "*" to send entire parent payload. Example: ["userPreferences", "priorFindings.summary", "sources[*]"]. If null, no parent context is sent (default behavior).`),
7700
7923
  Agent: zod_1.z.string().nullable().describe(`
7701
7924
  * * Field Name: Agent
7702
7925
  * * Display Name: Agent
@@ -9534,6 +9757,78 @@ exports.AIVendorSchema = zod_1.z.object({
9534
9757
  * * SQL Data Type: datetimeoffset
9535
9758
  * * Default Value: getutcdate()`),
9536
9759
  });
9760
+ /**
9761
+ * zod schema definition for the entity MJ: Artifact Permissions
9762
+ */
9763
+ exports.ArtifactPermissionSchema = zod_1.z.object({
9764
+ ID: zod_1.z.string().describe(`
9765
+ * * Field Name: ID
9766
+ * * Display Name: ID
9767
+ * * SQL Data Type: uniqueidentifier
9768
+ * * Default Value: newsequentialid()`),
9769
+ ArtifactID: zod_1.z.string().describe(`
9770
+ * * Field Name: ArtifactID
9771
+ * * Display Name: Artifact ID
9772
+ * * SQL Data Type: uniqueidentifier
9773
+ * * Related Entity/Foreign Key: MJ: Artifacts (vwArtifacts.ID)`),
9774
+ UserID: zod_1.z.string().describe(`
9775
+ * * Field Name: UserID
9776
+ * * Display Name: User ID
9777
+ * * SQL Data Type: uniqueidentifier
9778
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)`),
9779
+ CanRead: zod_1.z.boolean().describe(`
9780
+ * * Field Name: CanRead
9781
+ * * Display Name: Can Read
9782
+ * * SQL Data Type: bit
9783
+ * * Default Value: 1
9784
+ * * Description: Whether the user can view/read the artifact`),
9785
+ CanEdit: zod_1.z.boolean().describe(`
9786
+ * * Field Name: CanEdit
9787
+ * * Display Name: Can Edit
9788
+ * * SQL Data Type: bit
9789
+ * * Default Value: 0
9790
+ * * Description: Whether the user can modify the artifact or create new versions`),
9791
+ CanDelete: zod_1.z.boolean().describe(`
9792
+ * * Field Name: CanDelete
9793
+ * * Display Name: Can Delete
9794
+ * * SQL Data Type: bit
9795
+ * * Default Value: 0
9796
+ * * Description: Whether the user can delete the artifact`),
9797
+ CanShare: zod_1.z.boolean().describe(`
9798
+ * * Field Name: CanShare
9799
+ * * Display Name: Can Share
9800
+ * * SQL Data Type: bit
9801
+ * * Default Value: 0
9802
+ * * Description: Whether the user can share the artifact with other users`),
9803
+ SharedByUserID: zod_1.z.string().nullable().describe(`
9804
+ * * Field Name: SharedByUserID
9805
+ * * Display Name: Shared By User ID
9806
+ * * SQL Data Type: uniqueidentifier
9807
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
9808
+ * * Description: Foreign key to the User who shared this artifact (if shared)`),
9809
+ __mj_CreatedAt: zod_1.z.date().describe(`
9810
+ * * Field Name: __mj_CreatedAt
9811
+ * * Display Name: Created At
9812
+ * * SQL Data Type: datetimeoffset
9813
+ * * Default Value: getutcdate()`),
9814
+ __mj_UpdatedAt: zod_1.z.date().describe(`
9815
+ * * Field Name: __mj_UpdatedAt
9816
+ * * Display Name: Updated At
9817
+ * * SQL Data Type: datetimeoffset
9818
+ * * Default Value: getutcdate()`),
9819
+ Artifact: zod_1.z.string().describe(`
9820
+ * * Field Name: Artifact
9821
+ * * Display Name: Artifact
9822
+ * * SQL Data Type: nvarchar(255)`),
9823
+ User: zod_1.z.string().describe(`
9824
+ * * Field Name: User
9825
+ * * Display Name: User
9826
+ * * SQL Data Type: nvarchar(100)`),
9827
+ SharedByUser: zod_1.z.string().nullable().describe(`
9828
+ * * Field Name: SharedByUser
9829
+ * * Display Name: Shared By User
9830
+ * * SQL Data Type: nvarchar(100)`),
9831
+ });
9537
9832
  /**
9538
9833
  * zod schema definition for the entity MJ: Artifact Types
9539
9834
  */
@@ -9834,6 +10129,78 @@ exports.CollectionArtifactSchema = zod_1.z.object({
9834
10129
  * * Display Name: Artifact
9835
10130
  * * SQL Data Type: nvarchar(255)`),
9836
10131
  });
10132
+ /**
10133
+ * zod schema definition for the entity MJ: Collection Permissions
10134
+ */
10135
+ exports.CollectionPermissionSchema = zod_1.z.object({
10136
+ ID: zod_1.z.string().describe(`
10137
+ * * Field Name: ID
10138
+ * * Display Name: ID
10139
+ * * SQL Data Type: uniqueidentifier
10140
+ * * Default Value: newsequentialid()`),
10141
+ CollectionID: zod_1.z.string().describe(`
10142
+ * * Field Name: CollectionID
10143
+ * * Display Name: Collection ID
10144
+ * * SQL Data Type: uniqueidentifier
10145
+ * * Related Entity/Foreign Key: MJ: Collections (vwCollections.ID)`),
10146
+ UserID: zod_1.z.string().describe(`
10147
+ * * Field Name: UserID
10148
+ * * Display Name: User ID
10149
+ * * SQL Data Type: uniqueidentifier
10150
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)`),
10151
+ CanRead: zod_1.z.boolean().describe(`
10152
+ * * Field Name: CanRead
10153
+ * * Display Name: Can Read
10154
+ * * SQL Data Type: bit
10155
+ * * Default Value: 1
10156
+ * * Description: Always 1 - users must have read permission to access a shared collection`),
10157
+ CanShare: zod_1.z.boolean().describe(`
10158
+ * * Field Name: CanShare
10159
+ * * Display Name: Can Share
10160
+ * * SQL Data Type: bit
10161
+ * * Default Value: 0
10162
+ * * Description: Can share this collection with others (but cannot grant more permissions than they have)`),
10163
+ CanEdit: zod_1.z.boolean().describe(`
10164
+ * * Field Name: CanEdit
10165
+ * * Display Name: Can Edit
10166
+ * * SQL Data Type: bit
10167
+ * * Default Value: 0
10168
+ * * Description: Can add/remove artifacts to/from this collection`),
10169
+ CanDelete: zod_1.z.boolean().describe(`
10170
+ * * Field Name: CanDelete
10171
+ * * Display Name: Can Delete
10172
+ * * SQL Data Type: bit
10173
+ * * Default Value: 0
10174
+ * * Description: Can delete the collection, child collections, and artifacts`),
10175
+ SharedByUserID: zod_1.z.string().nullable().describe(`
10176
+ * * Field Name: SharedByUserID
10177
+ * * Display Name: Shared By User ID
10178
+ * * SQL Data Type: uniqueidentifier
10179
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
10180
+ * * Description: The user who shared this collection (NULL if shared by owner)`),
10181
+ __mj_CreatedAt: zod_1.z.date().describe(`
10182
+ * * Field Name: __mj_CreatedAt
10183
+ * * Display Name: Created At
10184
+ * * SQL Data Type: datetimeoffset
10185
+ * * Default Value: getutcdate()`),
10186
+ __mj_UpdatedAt: zod_1.z.date().describe(`
10187
+ * * Field Name: __mj_UpdatedAt
10188
+ * * Display Name: Updated At
10189
+ * * SQL Data Type: datetimeoffset
10190
+ * * Default Value: getutcdate()`),
10191
+ Collection: zod_1.z.string().describe(`
10192
+ * * Field Name: Collection
10193
+ * * Display Name: Collection
10194
+ * * SQL Data Type: nvarchar(255)`),
10195
+ User: zod_1.z.string().describe(`
10196
+ * * Field Name: User
10197
+ * * Display Name: User
10198
+ * * SQL Data Type: nvarchar(100)`),
10199
+ SharedByUser: zod_1.z.string().nullable().describe(`
10200
+ * * Field Name: SharedByUser
10201
+ * * Display Name: Shared By User
10202
+ * * SQL Data Type: nvarchar(100)`),
10203
+ });
9837
10204
  /**
9838
10205
  * zod schema definition for the entity MJ: Collections
9839
10206
  */
@@ -9889,6 +10256,12 @@ exports.CollectionSchema = zod_1.z.object({
9889
10256
  * * Display Name: Updated At
9890
10257
  * * SQL Data Type: datetimeoffset
9891
10258
  * * Default Value: getutcdate()`),
10259
+ OwnerID: zod_1.z.string().nullable().describe(`
10260
+ * * Field Name: OwnerID
10261
+ * * Display Name: Owner ID
10262
+ * * SQL Data Type: uniqueidentifier
10263
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
10264
+ * * Description: The user who owns this collection and has full permissions`),
9892
10265
  Environment: zod_1.z.string().describe(`
9893
10266
  * * Field Name: Environment
9894
10267
  * * Display Name: Environment
@@ -9897,6 +10270,10 @@ exports.CollectionSchema = zod_1.z.object({
9897
10270
  * * Field Name: Parent
9898
10271
  * * Display Name: Parent
9899
10272
  * * SQL Data Type: nvarchar(255)`),
10273
+ Owner: zod_1.z.string().nullable().describe(`
10274
+ * * Field Name: Owner
10275
+ * * Display Name: Owner
10276
+ * * SQL Data Type: nvarchar(100)`),
9900
10277
  RootParentID: zod_1.z.string().nullable().describe(`
9901
10278
  * * Field Name: RootParentID
9902
10279
  * * Display Name: Root Parent ID
@@ -16525,6 +16902,19 @@ let ActionEntity = class ActionEntity extends core_1.BaseEntity {
16525
16902
  this.Set('IconClass', value);
16526
16903
  }
16527
16904
  /**
16905
+ * * Field Name: DefaultCompactPromptID
16906
+ * * Display Name: Default Compact Prompt ID
16907
+ * * SQL Data Type: uniqueidentifier
16908
+ * * Related Entity/Foreign Key: AI Prompts (vwAIPrompts.ID)
16909
+ * * Description: Default prompt for compacting/summarizing this action's results when used by agents with CompactMode=AISummary. Action designers define how their specific results should be summarized. Can be overridden per agent in AIAgentAction.CompactPromptID.
16910
+ */
16911
+ get DefaultCompactPromptID() {
16912
+ return this.Get('DefaultCompactPromptID');
16913
+ }
16914
+ set DefaultCompactPromptID(value) {
16915
+ this.Set('DefaultCompactPromptID', value);
16916
+ }
16917
+ /**
16528
16918
  * * Field Name: Category
16529
16919
  * * Display Name: Category
16530
16920
  * * SQL Data Type: nvarchar(255)
@@ -16549,6 +16939,14 @@ let ActionEntity = class ActionEntity extends core_1.BaseEntity {
16549
16939
  return this.Get('Parent');
16550
16940
  }
16551
16941
  /**
16942
+ * * Field Name: DefaultCompactPrompt
16943
+ * * Display Name: Default Compact Prompt
16944
+ * * SQL Data Type: nvarchar(255)
16945
+ */
16946
+ get DefaultCompactPrompt() {
16947
+ return this.Get('DefaultCompactPrompt');
16948
+ }
16949
+ /**
16552
16950
  * * Field Name: RootParentID
16553
16951
  * * Display Name: Root Parent ID
16554
16952
  * * SQL Data Type: uniqueidentifier
@@ -16722,22 +17120,43 @@ let AIAgentActionEntity = class AIAgentActionEntity extends core_1.BaseEntity {
16722
17120
  }
16723
17121
  /**
16724
17122
  * Validate() method override for AI Agent Actions entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
17123
+ * * CompactLength: This rule ensures that if a value is provided for CompactLength, it must be greater than zero. If CompactLength is left empty, no rule applies.
16725
17124
  * * MaxExecutionsPerRun: This rule ensures that if the maximum executions per run is specified, the number must be greater than zero. If it is not specified, no restriction applies.
16726
17125
  * * MinExecutionsPerRun: This rule ensures that if a minimum executions per run value is provided, it must be zero or greater.
17126
+ * * ResultExpirationTurns: This rule ensures that if the ResultExpirationTurns field has a value, it must be zero or greater (it cannot be negative). If ResultExpirationTurns is left empty, there is no restriction.
17127
+ * * Table-Level: This rule ensures that if the compact mode is set to 'First N Chars', a compact length must be specified. For any other compact mode, the compact length can be left empty.
17128
+ * * Table-Level: This rule ensures that if the result expiration mode is set to 'Compact', a compact mode value must also be provided. If the result expiration mode is not 'Compact', compact mode can be left empty.
16727
17129
  * * Table-Level: This rule ensures that if both minimum and maximum executions per run are specified, the minimum cannot be greater than the maximum. If either value is not specified, the rule is not enforced.
17130
+ * * Table-Level: This rule ensures that if the result expiration mode is set to 'Compact', then CompactMode, CompactLength, and CompactPromptID must all be empty (null). If the expiration mode is not 'Compact', these fields may be filled in.
16728
17131
  * @public
16729
17132
  * @method
16730
17133
  * @override
16731
17134
  */
16732
17135
  Validate() {
16733
17136
  const result = super.Validate();
17137
+ this.ValidateCompactLengthGreaterThanZero(result);
16734
17138
  this.ValidateMaxExecutionsPerRunGreaterThanZero(result);
16735
17139
  this.ValidateMinExecutionsPerRunIsNonNegative(result);
17140
+ this.ValidateResultExpirationTurnsNonNegative(result);
17141
+ this.ValidateCompactLengthRequiredForFirstNCharsMode(result);
17142
+ this.ValidateCompactModeWhenResultExpirationModeIsCompact(result);
16736
17143
  this.ValidateMinExecutionsPerRunIsLessThanOrEqualToMaxExecutionsPerRun(result);
17144
+ this.ValidateResultExpirationModeRequiresCompactFieldsEmpty(result);
16737
17145
  result.Success = result.Success && (result.Errors.length === 0);
16738
17146
  return result;
16739
17147
  }
16740
17148
  /**
17149
+ * This rule ensures that if a value is provided for CompactLength, it must be greater than zero. If CompactLength is left empty, no rule applies.
17150
+ * @param result - the ValidationResult object to add any errors or warnings to
17151
+ * @public
17152
+ * @method
17153
+ */
17154
+ ValidateCompactLengthGreaterThanZero(result) {
17155
+ if (this.CompactLength != null && this.CompactLength <= 0) {
17156
+ result.Errors.push(new core_1.ValidationErrorInfo("CompactLength", "CompactLength must be greater than zero if specified.", this.CompactLength, core_1.ValidationErrorType.Failure));
17157
+ }
17158
+ }
17159
+ /**
16741
17160
  * This rule ensures that if the maximum executions per run is specified, the number must be greater than zero. If it is not specified, no restriction applies.
16742
17161
  * @param result - the ValidationResult object to add any errors or warnings to
16743
17162
  * @public
@@ -16760,6 +17179,39 @@ let AIAgentActionEntity = class AIAgentActionEntity extends core_1.BaseEntity {
16760
17179
  }
16761
17180
  }
16762
17181
  /**
17182
+ * This rule ensures that if the ResultExpirationTurns field has a value, it must be zero or greater (it cannot be negative). If ResultExpirationTurns is left empty, there is no restriction.
17183
+ * @param result - the ValidationResult object to add any errors or warnings to
17184
+ * @public
17185
+ * @method
17186
+ */
17187
+ ValidateResultExpirationTurnsNonNegative(result) {
17188
+ if (this.ResultExpirationTurns != null && this.ResultExpirationTurns < 0) {
17189
+ result.Errors.push(new core_1.ValidationErrorInfo("ResultExpirationTurns", "If provided, ResultExpirationTurns must be zero or greater.", this.ResultExpirationTurns, core_1.ValidationErrorType.Failure));
17190
+ }
17191
+ }
17192
+ /**
17193
+ * This rule ensures that if the compact mode is set to 'First N Chars', a compact length must be specified. For any other compact mode, the compact length can be left empty.
17194
+ * @param result - the ValidationResult object to add any errors or warnings to
17195
+ * @public
17196
+ * @method
17197
+ */
17198
+ ValidateCompactLengthRequiredForFirstNCharsMode(result) {
17199
+ if (this.CompactMode === "First N Chars" && this.CompactLength == null) {
17200
+ result.Errors.push(new core_1.ValidationErrorInfo("CompactLength", "When CompactMode is set to 'First N Chars', CompactLength must be specified.", this.CompactLength, core_1.ValidationErrorType.Failure));
17201
+ }
17202
+ }
17203
+ /**
17204
+ * This rule ensures that if the result expiration mode is set to 'Compact', a compact mode value must also be provided. If the result expiration mode is not 'Compact', compact mode can be left empty.
17205
+ * @param result - the ValidationResult object to add any errors or warnings to
17206
+ * @public
17207
+ * @method
17208
+ */
17209
+ ValidateCompactModeWhenResultExpirationModeIsCompact(result) {
17210
+ if (this.ResultExpirationMode === "Compact" && this.CompactMode == null) {
17211
+ result.Errors.push(new core_1.ValidationErrorInfo("CompactMode", "CompactMode must be specified when ResultExpirationMode is 'Compact'.", this.CompactMode, core_1.ValidationErrorType.Failure));
17212
+ }
17213
+ }
17214
+ /**
16763
17215
  * This rule ensures that if both minimum and maximum executions per run are specified, the minimum cannot be greater than the maximum. If either value is not specified, the rule is not enforced.
16764
17216
  * @param result - the ValidationResult object to add any errors or warnings to
16765
17217
  * @public
@@ -16771,6 +17223,19 @@ let AIAgentActionEntity = class AIAgentActionEntity extends core_1.BaseEntity {
16771
17223
  }
16772
17224
  }
16773
17225
  /**
17226
+ * This rule ensures that if the result expiration mode is set to 'Compact', then CompactMode, CompactLength, and CompactPromptID must all be empty (null). If the expiration mode is not 'Compact', these fields may be filled in.
17227
+ * @param result - the ValidationResult object to add any errors or warnings to
17228
+ * @public
17229
+ * @method
17230
+ */
17231
+ ValidateResultExpirationModeRequiresCompactFieldsEmpty(result) {
17232
+ if (this.ResultExpirationMode === "Compact") {
17233
+ if (this.CompactMode != null || this.CompactLength != null || this.CompactPromptID != null) {
17234
+ result.Errors.push(new core_1.ValidationErrorInfo("ResultExpirationMode", "When ResultExpirationMode is set to 'Compact', the fields CompactMode, CompactLength, and CompactPromptID must be empty.", this.ResultExpirationMode, core_1.ValidationErrorType.Failure));
17235
+ }
17236
+ }
17237
+ }
17238
+ /**
16774
17239
  * * Field Name: ID
16775
17240
  * * Display Name: ID
16776
17241
  * * SQL Data Type: uniqueidentifier
@@ -16869,6 +17334,77 @@ let AIAgentActionEntity = class AIAgentActionEntity extends core_1.BaseEntity {
16869
17334
  this.Set('MaxExecutionsPerRun', value);
16870
17335
  }
16871
17336
  /**
17337
+ * * Field Name: ResultExpirationTurns
17338
+ * * Display Name: Result Expiration Turns
17339
+ * * SQL Data Type: int
17340
+ * * Description: Number of conversation turns before action results expire from conversation context. NULL = never expire (default). 0 = expire immediately after next turn.
17341
+ */
17342
+ get ResultExpirationTurns() {
17343
+ return this.Get('ResultExpirationTurns');
17344
+ }
17345
+ set ResultExpirationTurns(value) {
17346
+ this.Set('ResultExpirationTurns', value);
17347
+ }
17348
+ /**
17349
+ * * Field Name: ResultExpirationMode
17350
+ * * Display Name: Result Expiration Mode
17351
+ * * SQL Data Type: nvarchar(20)
17352
+ * * Default Value: None
17353
+ * * Value List Type: List
17354
+ * * Possible Values
17355
+ * * Remove
17356
+ * * None
17357
+ * * Compact
17358
+ * * Description: How to handle expired action results: None (no expiration, default), Remove (delete message entirely), Compact (reduce size via CompactMode while preserving key information).
17359
+ */
17360
+ get ResultExpirationMode() {
17361
+ return this.Get('ResultExpirationMode');
17362
+ }
17363
+ set ResultExpirationMode(value) {
17364
+ this.Set('ResultExpirationMode', value);
17365
+ }
17366
+ /**
17367
+ * * Field Name: CompactMode
17368
+ * * Display Name: Compact Mode
17369
+ * * SQL Data Type: nvarchar(20)
17370
+ * * Value List Type: List
17371
+ * * Possible Values
17372
+ * * AI Summary
17373
+ * * First N Chars
17374
+ * * Description: How to compact results when ResultExpirationMode=Compact: FirstNChars (truncate to CompactLength characters, fast and free), AISummary (use LLM to intelligently summarize with CompactPromptID or Action.DefaultCompactPromptID).
17375
+ */
17376
+ get CompactMode() {
17377
+ return this.Get('CompactMode');
17378
+ }
17379
+ set CompactMode(value) {
17380
+ this.Set('CompactMode', value);
17381
+ }
17382
+ /**
17383
+ * * Field Name: CompactLength
17384
+ * * Display Name: Compact Length
17385
+ * * SQL Data Type: int
17386
+ * * Description: Number of characters to keep when CompactMode=FirstNChars. Required when CompactMode is FirstNChars, ignored otherwise.
17387
+ */
17388
+ get CompactLength() {
17389
+ return this.Get('CompactLength');
17390
+ }
17391
+ set CompactLength(value) {
17392
+ this.Set('CompactLength', value);
17393
+ }
17394
+ /**
17395
+ * * Field Name: CompactPromptID
17396
+ * * Display Name: Compact Prompt ID
17397
+ * * SQL Data Type: uniqueidentifier
17398
+ * * Related Entity/Foreign Key: AI Prompts (vwAIPrompts.ID)
17399
+ * * Description: Optional override for AI summarization prompt when CompactMode=AISummary. Lookup hierarchy: this field -> Action.DefaultCompactPromptID -> system default. Allows agent-specific summarization focus (e.g., technical vs. marketing perspective).
17400
+ */
17401
+ get CompactPromptID() {
17402
+ return this.Get('CompactPromptID');
17403
+ }
17404
+ set CompactPromptID(value) {
17405
+ this.Set('CompactPromptID', value);
17406
+ }
17407
+ /**
16872
17408
  * * Field Name: Agent
16873
17409
  * * Display Name: Agent
16874
17410
  * * SQL Data Type: nvarchar(255)
@@ -16884,6 +17420,14 @@ let AIAgentActionEntity = class AIAgentActionEntity extends core_1.BaseEntity {
16884
17420
  get Action() {
16885
17421
  return this.Get('Action');
16886
17422
  }
17423
+ /**
17424
+ * * Field Name: CompactPrompt
17425
+ * * Display Name: Compact Prompt
17426
+ * * SQL Data Type: nvarchar(255)
17427
+ */
17428
+ get CompactPrompt() {
17429
+ return this.Get('CompactPrompt');
17430
+ }
16887
17431
  };
16888
17432
  exports.AIAgentActionEntity = AIAgentActionEntity;
16889
17433
  exports.AIAgentActionEntity = AIAgentActionEntity = __decorate([
@@ -18236,6 +18780,24 @@ if this limit is exceeded.
18236
18780
  this.Set('OwnerUserID', value);
18237
18781
  }
18238
18782
  /**
18783
+ * * Field Name: InvocationMode
18784
+ * * Display Name: Invocation Mode
18785
+ * * SQL Data Type: nvarchar(20)
18786
+ * * Default Value: Any
18787
+ * * Value List Type: List
18788
+ * * Possible Values
18789
+ * * Sub-Agent
18790
+ * * Any
18791
+ * * Top-Level
18792
+ * * Description: Controls how the agent can be invoked: Any (default - can be top-level or sub-agent), Top-Level (only callable as primary agent), Sub-Agent (only callable as sub-agent). Used to filter available agents in tools like Sage.
18793
+ */
18794
+ get InvocationMode() {
18795
+ return this.Get('InvocationMode');
18796
+ }
18797
+ set InvocationMode(value) {
18798
+ this.Set('InvocationMode', value);
18799
+ }
18800
+ /**
18239
18801
  * * Field Name: Parent
18240
18802
  * * Display Name: Parent
18241
18803
  * * SQL Data Type: nvarchar(255)
@@ -24604,6 +25166,18 @@ let ConversationDetailEntity = class ConversationDetailEntity extends core_1.Bas
24604
25166
  this.Set('Status', value);
24605
25167
  }
24606
25168
  /**
25169
+ * * Field Name: SuggestedResponses
25170
+ * * Display Name: Suggested Responses
25171
+ * * SQL Data Type: nvarchar(MAX)
25172
+ * * Description: JSON array of suggested responses that can be displayed to the user for quick replies. Each response object contains: text (display text), allowInput (boolean), iconClass (optional Font Awesome class), and data (optional payload).
25173
+ */
25174
+ get SuggestedResponses() {
25175
+ return this.Get('SuggestedResponses');
25176
+ }
25177
+ set SuggestedResponses(value) {
25178
+ this.Set('SuggestedResponses', value);
25179
+ }
25180
+ /**
24607
25181
  * * Field Name: Conversation
24608
25182
  * * Display Name: Conversation
24609
25183
  * * SQL Data Type: nvarchar(255)
@@ -33898,25 +34472,25 @@ exports.AIAgentArtifactTypeEntity = AIAgentArtifactTypeEntity = __decorate([
33898
34472
  (0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: AI Agent Artifact Types')
33899
34473
  ], AIAgentArtifactTypeEntity);
33900
34474
  /**
33901
- * MJ: AI Agent Permissions - strongly typed entity sub-class
34475
+ * MJ: AI Agent Data Sources - strongly typed entity sub-class
33902
34476
  * * Schema: __mj
33903
- * * Base Table: AIAgentPermission
33904
- * * Base View: vwAIAgentPermissions
33905
- * * @description Defines access control permissions for AI agents using an ACL (Access Control List) model. Permissions can be granted to individual users or roles.
34477
+ * * Base Table: AIAgentDataSource
34478
+ * * Base View: vwAIAgentDataSources
34479
+ * * @description Defines data sources that should be preloaded into the data parameter before agent execution. Supports both RunView and RunQuery sources with configurable caching.
33906
34480
  * * Primary Key: ID
33907
34481
  * @extends {BaseEntity}
33908
34482
  * @class
33909
34483
  * @public
33910
34484
  */
33911
- let AIAgentPermissionEntity = class AIAgentPermissionEntity extends core_1.BaseEntity {
34485
+ let AIAgentDataSourceEntity = class AIAgentDataSourceEntity extends core_1.BaseEntity {
33912
34486
  /**
33913
- * Loads the MJ: AI Agent Permissions record from the database
33914
- * @param ID: string - primary key value to load the MJ: AI Agent Permissions record.
34487
+ * Loads the MJ: AI Agent Data Sources record from the database
34488
+ * @param ID: string - primary key value to load the MJ: AI Agent Data Sources record.
33915
34489
  * @param EntityRelationshipsToLoad - (optional) the relationships to load
33916
34490
  * @returns {Promise<boolean>} - true if successful, false otherwise
33917
34491
  * @public
33918
34492
  * @async
33919
- * @memberof AIAgentPermissionEntity
34493
+ * @memberof AIAgentDataSourceEntity
33920
34494
  * @method
33921
34495
  * @override
33922
34496
  */
@@ -33926,29 +34500,53 @@ let AIAgentPermissionEntity = class AIAgentPermissionEntity extends core_1.BaseE
33926
34500
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
33927
34501
  }
33928
34502
  /**
33929
- * Validate() method override for MJ: AI Agent Permissions entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
33930
- * * Table-Level: This rule ensures that either a Role or a User is specified, but not both at the same time. You must provide one or the other, but never both, and neither can be left blank at the same time.
34503
+ * Validate() method override for MJ: AI Agent Data Sources entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
34504
+ * * Table-Level: This rule ensures that if the cache policy is set to 'PerAgent', a cache timeout value must be provided. For other cache policies, providing a cache timeout is optional.
34505
+ * * Table-Level: This rule makes sure that if the source type is 'RunView', the entity name must be provided. If the source type is anything else, the entity name can be left blank.
34506
+ * * Table-Level: This rule ensures that when the Source Type is set to 'RunQuery', a Query Name must be provided. If Source Type is anything other than 'RunQuery', Query Name is optional.
33931
34507
  * @public
33932
34508
  * @method
33933
34509
  * @override
33934
34510
  */
33935
34511
  Validate() {
33936
34512
  const result = super.Validate();
33937
- this.ValidateRoleIDAndUserIDExclusive(result);
34513
+ this.ValidateCacheTimeoutSecondsRequiredForPerAgentPolicy(result);
34514
+ this.ValidateEntityNameRequiredWhenSourceTypeRunView(result);
34515
+ this.ValidateQueryNameRequiredWhenSourceTypeIsRunQuery(result);
33938
34516
  result.Success = result.Success && (result.Errors.length === 0);
33939
34517
  return result;
33940
34518
  }
33941
34519
  /**
33942
- * This rule ensures that either a Role or a User is specified, but not both at the same time. You must provide one or the other, but never both, and neither can be left blank at the same time.
34520
+ * This rule ensures that if the cache policy is set to 'PerAgent', a cache timeout value must be provided. For other cache policies, providing a cache timeout is optional.
33943
34521
  * @param result - the ValidationResult object to add any errors or warnings to
33944
34522
  * @public
33945
34523
  * @method
33946
34524
  */
33947
- ValidateRoleIDAndUserIDExclusive(result) {
33948
- const hasRole = this.RoleID !== null;
33949
- const hasUser = this.UserID !== null;
33950
- if ((hasRole && hasUser) || (!hasRole && !hasUser)) {
33951
- result.Errors.push(new core_1.ValidationErrorInfo("RoleID/UserID", "You must specify either a Role or a User, but not both and not neither.", `RoleID: $${this.RoleID}, UserID: $${this.UserID}`, core_1.ValidationErrorType.Failure));
34525
+ ValidateCacheTimeoutSecondsRequiredForPerAgentPolicy(result) {
34526
+ if (this.CachePolicy === "PerAgent" && this.CacheTimeoutSeconds == null) {
34527
+ result.Errors.push(new core_1.ValidationErrorInfo("CacheTimeoutSeconds", "When the cache policy is set to 'PerAgent', you must specify a cache timeout value.", this.CacheTimeoutSeconds, core_1.ValidationErrorType.Failure));
34528
+ }
34529
+ }
34530
+ /**
34531
+ * This rule makes sure that if the source type is 'RunView', the entity name must be provided. If the source type is anything else, the entity name can be left blank.
34532
+ * @param result - the ValidationResult object to add any errors or warnings to
34533
+ * @public
34534
+ * @method
34535
+ */
34536
+ ValidateEntityNameRequiredWhenSourceTypeRunView(result) {
34537
+ if (this.SourceType === "RunView" && this.EntityName == null) {
34538
+ result.Errors.push(new core_1.ValidationErrorInfo("EntityName", "EntityName is required when SourceType is 'RunView'.", this.EntityName, core_1.ValidationErrorType.Failure));
34539
+ }
34540
+ }
34541
+ /**
34542
+ * This rule ensures that when the Source Type is set to 'RunQuery', a Query Name must be provided. If Source Type is anything other than 'RunQuery', Query Name is optional.
34543
+ * @param result - the ValidationResult object to add any errors or warnings to
34544
+ * @public
34545
+ * @method
34546
+ */
34547
+ ValidateQueryNameRequiredWhenSourceTypeIsRunQuery(result) {
34548
+ if (this.SourceType === "RunQuery" && this.QueryName == null) {
34549
+ result.Errors.push(new core_1.ValidationErrorInfo("QueryName", "The query name must be provided when Source Type is 'RunQuery'.", this.QueryName, core_1.ValidationErrorType.Failure));
33952
34550
  }
33953
34551
  }
33954
34552
  /**
@@ -33976,94 +34574,447 @@ let AIAgentPermissionEntity = class AIAgentPermissionEntity extends core_1.BaseE
33976
34574
  this.Set('AgentID', value);
33977
34575
  }
33978
34576
  /**
33979
- * * Field Name: RoleID
33980
- * * Display Name: Role ID
33981
- * * SQL Data Type: uniqueidentifier
33982
- * * Related Entity/Foreign Key: Roles (vwRoles.ID)
33983
- * * Description: The role this permission is granted to. Either RoleID or UserID must be specified, but not both.
34577
+ * * Field Name: Name
34578
+ * * Display Name: Name
34579
+ * * SQL Data Type: nvarchar(255)
34580
+ * * Description: Variable name for the data in the data parameter (e.g., "ALL_ENTITIES"). Must be unique within an agent.
33984
34581
  */
33985
- get RoleID() {
33986
- return this.Get('RoleID');
34582
+ get Name() {
34583
+ return this.Get('Name');
33987
34584
  }
33988
- set RoleID(value) {
33989
- this.Set('RoleID', value);
34585
+ set Name(value) {
34586
+ this.Set('Name', value);
33990
34587
  }
33991
34588
  /**
33992
- * * Field Name: UserID
33993
- * * Display Name: User ID
33994
- * * SQL Data Type: uniqueidentifier
33995
- * * Related Entity/Foreign Key: Users (vwUsers.ID)
33996
- * * Description: The user this permission is granted to. Either RoleID or UserID must be specified, but not both.
34589
+ * * Field Name: Description
34590
+ * * Display Name: Description
34591
+ * * SQL Data Type: nvarchar(MAX)
34592
+ * * Description: Description of what this data source provides
33997
34593
  */
33998
- get UserID() {
33999
- return this.Get('UserID');
34594
+ get Description() {
34595
+ return this.Get('Description');
34000
34596
  }
34001
- set UserID(value) {
34002
- this.Set('UserID', value);
34597
+ set Description(value) {
34598
+ this.Set('Description', value);
34003
34599
  }
34004
34600
  /**
34005
- * * Field Name: CanView
34006
- * * Display Name: Can View
34007
- * * SQL Data Type: bit
34008
- * * Default Value: 0
34009
- * * Description: Grants permission to view the agent configuration and details.
34601
+ * * Field Name: SourceType
34602
+ * * Display Name: Source Type
34603
+ * * SQL Data Type: nvarchar(20)
34604
+ * * Default Value: RunView
34605
+ * * Value List Type: List
34606
+ * * Possible Values
34607
+ * * RunQuery
34608
+ * * RunView
34609
+ * * Description: Type of data source: RunView or RunQuery. Determines which parameters are used.
34010
34610
  */
34011
- get CanView() {
34012
- return this.Get('CanView');
34611
+ get SourceType() {
34612
+ return this.Get('SourceType');
34013
34613
  }
34014
- set CanView(value) {
34015
- this.Set('CanView', value);
34614
+ set SourceType(value) {
34615
+ this.Set('SourceType', value);
34016
34616
  }
34017
34617
  /**
34018
- * * Field Name: CanRun
34019
- * * Display Name: Can Run
34020
- * * SQL Data Type: bit
34021
- * * Default Value: 0
34022
- * * Description: Grants permission to execute/run the agent. Typically implies CanView as well.
34618
+ * * Field Name: EntityName
34619
+ * * Display Name: Entity Name
34620
+ * * SQL Data Type: nvarchar(255)
34621
+ * * Description: Entity name for RunView data sources (e.g., "Entities", "AI Models")
34023
34622
  */
34024
- get CanRun() {
34025
- return this.Get('CanRun');
34623
+ get EntityName() {
34624
+ return this.Get('EntityName');
34026
34625
  }
34027
- set CanRun(value) {
34028
- this.Set('CanRun', value);
34626
+ set EntityName(value) {
34627
+ this.Set('EntityName', value);
34029
34628
  }
34030
34629
  /**
34031
- * * Field Name: CanEdit
34032
- * * Display Name: Can Edit
34033
- * * SQL Data Type: bit
34034
- * * Default Value: 0
34035
- * * Description: Grants permission to modify the agent configuration, prompts, and settings. Typically implies CanView and CanRun as well.
34630
+ * * Field Name: ExtraFilter
34631
+ * * Display Name: Extra Filter
34632
+ * * SQL Data Type: nvarchar(MAX)
34633
+ * * Description: SQL WHERE clause filter for RunView data sources
34036
34634
  */
34037
- get CanEdit() {
34038
- return this.Get('CanEdit');
34635
+ get ExtraFilter() {
34636
+ return this.Get('ExtraFilter');
34039
34637
  }
34040
- set CanEdit(value) {
34041
- this.Set('CanEdit', value);
34638
+ set ExtraFilter(value) {
34639
+ this.Set('ExtraFilter', value);
34042
34640
  }
34043
34641
  /**
34044
- * * Field Name: CanDelete
34045
- * * Display Name: Can Delete
34046
- * * SQL Data Type: bit
34047
- * * Default Value: 0
34048
- * * Description: Grants permission to delete the agent. Typically implies all other permissions as well.
34642
+ * * Field Name: OrderBy
34643
+ * * Display Name: Order By
34644
+ * * SQL Data Type: nvarchar(500)
34645
+ * * Description: SQL ORDER BY clause for RunView data sources
34049
34646
  */
34050
- get CanDelete() {
34051
- return this.Get('CanDelete');
34647
+ get OrderBy() {
34648
+ return this.Get('OrderBy');
34052
34649
  }
34053
- set CanDelete(value) {
34054
- this.Set('CanDelete', value);
34650
+ set OrderBy(value) {
34651
+ this.Set('OrderBy', value);
34055
34652
  }
34056
34653
  /**
34057
- * * Field Name: Comments
34058
- * * Display Name: Comments
34654
+ * * Field Name: FieldsToRetrieve
34655
+ * * Display Name: Fields To Retrieve
34059
34656
  * * SQL Data Type: nvarchar(MAX)
34060
- * * Description: Optional comments explaining why this permission was granted or any special notes.
34657
+ * * Description: JSON array of field names to return for RunView data sources (e.g., ["ID", "Name", "Description"])
34061
34658
  */
34062
- get Comments() {
34063
- return this.Get('Comments');
34659
+ get FieldsToRetrieve() {
34660
+ return this.Get('FieldsToRetrieve');
34064
34661
  }
34065
- set Comments(value) {
34066
- this.Set('Comments', value);
34662
+ set FieldsToRetrieve(value) {
34663
+ this.Set('FieldsToRetrieve', value);
34664
+ }
34665
+ /**
34666
+ * * Field Name: ResultType
34667
+ * * Display Name: Result Type
34668
+ * * SQL Data Type: nvarchar(20)
34669
+ * * Default Value: simple
34670
+ * * Value List Type: List
34671
+ * * Possible Values
34672
+ * * entity_object
34673
+ * * simple
34674
+ * * Description: Result type for RunView: simple (default) or entity_object
34675
+ */
34676
+ get ResultType() {
34677
+ return this.Get('ResultType');
34678
+ }
34679
+ set ResultType(value) {
34680
+ this.Set('ResultType', value);
34681
+ }
34682
+ /**
34683
+ * * Field Name: QueryName
34684
+ * * Display Name: Query Name
34685
+ * * SQL Data Type: nvarchar(255)
34686
+ * * Description: Query name for RunQuery data sources
34687
+ */
34688
+ get QueryName() {
34689
+ return this.Get('QueryName');
34690
+ }
34691
+ set QueryName(value) {
34692
+ this.Set('QueryName', value);
34693
+ }
34694
+ /**
34695
+ * * Field Name: CategoryPath
34696
+ * * Display Name: Category Path
34697
+ * * SQL Data Type: nvarchar(500)
34698
+ * * Description: Category path for RunQuery data sources (e.g., "/MJ/AI/Agents/")
34699
+ */
34700
+ get CategoryPath() {
34701
+ return this.Get('CategoryPath');
34702
+ }
34703
+ set CategoryPath(value) {
34704
+ this.Set('CategoryPath', value);
34705
+ }
34706
+ /**
34707
+ * * Field Name: Parameters
34708
+ * * Display Name: Parameters
34709
+ * * SQL Data Type: nvarchar(MAX)
34710
+ * * Description: JSON object of parameters for RunQuery data sources (e.g., {"organizationId": "123"})
34711
+ */
34712
+ get Parameters() {
34713
+ return this.Get('Parameters');
34714
+ }
34715
+ set Parameters(value) {
34716
+ this.Set('Parameters', value);
34717
+ }
34718
+ /**
34719
+ * * Field Name: MaxRows
34720
+ * * Display Name: Max Rows
34721
+ * * SQL Data Type: int
34722
+ * * Description: Maximum number of rows to return. Applies to both RunView and RunQuery.
34723
+ */
34724
+ get MaxRows() {
34725
+ return this.Get('MaxRows');
34726
+ }
34727
+ set MaxRows(value) {
34728
+ this.Set('MaxRows', value);
34729
+ }
34730
+ /**
34731
+ * * Field Name: ExecutionOrder
34732
+ * * Display Name: Execution Order
34733
+ * * SQL Data Type: int
34734
+ * * Default Value: 0
34735
+ * * Description: Execution order when multiple data sources are defined for an agent (lower numbers execute first)
34736
+ */
34737
+ get ExecutionOrder() {
34738
+ return this.Get('ExecutionOrder');
34739
+ }
34740
+ set ExecutionOrder(value) {
34741
+ this.Set('ExecutionOrder', value);
34742
+ }
34743
+ /**
34744
+ * * Field Name: Status
34745
+ * * Display Name: Status
34746
+ * * SQL Data Type: nvarchar(20)
34747
+ * * Default Value: Active
34748
+ * * Value List Type: List
34749
+ * * Possible Values
34750
+ * * Active
34751
+ * * Disabled
34752
+ * * Description: Status of the data source: Active or Disabled
34753
+ */
34754
+ get Status() {
34755
+ return this.Get('Status');
34756
+ }
34757
+ set Status(value) {
34758
+ this.Set('Status', value);
34759
+ }
34760
+ /**
34761
+ * * Field Name: CachePolicy
34762
+ * * Display Name: Cache Policy
34763
+ * * SQL Data Type: nvarchar(20)
34764
+ * * Default Value: None
34765
+ * * Value List Type: List
34766
+ * * Possible Values
34767
+ * * PerRun
34768
+ * * PerAgent
34769
+ * * None
34770
+ * * Description: Cache policy: None (no caching), PerRun (cache for duration of agent run), PerAgent (cache across runs with timeout)
34771
+ */
34772
+ get CachePolicy() {
34773
+ return this.Get('CachePolicy');
34774
+ }
34775
+ set CachePolicy(value) {
34776
+ this.Set('CachePolicy', value);
34777
+ }
34778
+ /**
34779
+ * * Field Name: CacheTimeoutSeconds
34780
+ * * Display Name: Cache Timeout Seconds
34781
+ * * SQL Data Type: int
34782
+ * * Description: Time-to-live in seconds for PerAgent cache policy. Ignored for other cache policies.
34783
+ */
34784
+ get CacheTimeoutSeconds() {
34785
+ return this.Get('CacheTimeoutSeconds');
34786
+ }
34787
+ set CacheTimeoutSeconds(value) {
34788
+ this.Set('CacheTimeoutSeconds', value);
34789
+ }
34790
+ /**
34791
+ * * Field Name: DestinationType
34792
+ * * Display Name: Destination Type
34793
+ * * SQL Data Type: nvarchar(20)
34794
+ * * Default Value: Data
34795
+ * * Value List Type: List
34796
+ * * Possible Values
34797
+ * * Data
34798
+ * * Context
34799
+ * * Payload
34800
+ * * Description: Destination for the preloaded data: Data (for Nunjucks templates in prompts), Context (for actions only), or Payload (for agent state)
34801
+ */
34802
+ get DestinationType() {
34803
+ return this.Get('DestinationType');
34804
+ }
34805
+ set DestinationType(value) {
34806
+ this.Set('DestinationType', value);
34807
+ }
34808
+ /**
34809
+ * * Field Name: DestinationPath
34810
+ * * Display Name: Destination Path
34811
+ * * SQL Data Type: nvarchar(500)
34812
+ * * Description: Path within the destination where data should be injected. Supports nested paths using dot notation (e.g., "config.api.endpoints", "analysis.orders.recent"). If null, uses Name as root-level key.
34813
+ */
34814
+ get DestinationPath() {
34815
+ return this.Get('DestinationPath');
34816
+ }
34817
+ set DestinationPath(value) {
34818
+ this.Set('DestinationPath', value);
34819
+ }
34820
+ /**
34821
+ * * Field Name: __mj_CreatedAt
34822
+ * * Display Name: Created At
34823
+ * * SQL Data Type: datetimeoffset
34824
+ * * Default Value: getutcdate()
34825
+ */
34826
+ get __mj_CreatedAt() {
34827
+ return this.Get('__mj_CreatedAt');
34828
+ }
34829
+ /**
34830
+ * * Field Name: __mj_UpdatedAt
34831
+ * * Display Name: Updated At
34832
+ * * SQL Data Type: datetimeoffset
34833
+ * * Default Value: getutcdate()
34834
+ */
34835
+ get __mj_UpdatedAt() {
34836
+ return this.Get('__mj_UpdatedAt');
34837
+ }
34838
+ /**
34839
+ * * Field Name: Agent
34840
+ * * Display Name: Agent
34841
+ * * SQL Data Type: nvarchar(255)
34842
+ */
34843
+ get Agent() {
34844
+ return this.Get('Agent');
34845
+ }
34846
+ };
34847
+ exports.AIAgentDataSourceEntity = AIAgentDataSourceEntity;
34848
+ exports.AIAgentDataSourceEntity = AIAgentDataSourceEntity = __decorate([
34849
+ (0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: AI Agent Data Sources')
34850
+ ], AIAgentDataSourceEntity);
34851
+ /**
34852
+ * MJ: AI Agent Permissions - strongly typed entity sub-class
34853
+ * * Schema: __mj
34854
+ * * Base Table: AIAgentPermission
34855
+ * * Base View: vwAIAgentPermissions
34856
+ * * @description Defines access control permissions for AI agents using an ACL (Access Control List) model. Permissions can be granted to individual users or roles.
34857
+ * * Primary Key: ID
34858
+ * @extends {BaseEntity}
34859
+ * @class
34860
+ * @public
34861
+ */
34862
+ let AIAgentPermissionEntity = class AIAgentPermissionEntity extends core_1.BaseEntity {
34863
+ /**
34864
+ * Loads the MJ: AI Agent Permissions record from the database
34865
+ * @param ID: string - primary key value to load the MJ: AI Agent Permissions record.
34866
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
34867
+ * @returns {Promise<boolean>} - true if successful, false otherwise
34868
+ * @public
34869
+ * @async
34870
+ * @memberof AIAgentPermissionEntity
34871
+ * @method
34872
+ * @override
34873
+ */
34874
+ async Load(ID, EntityRelationshipsToLoad) {
34875
+ const compositeKey = new core_1.CompositeKey();
34876
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
34877
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
34878
+ }
34879
+ /**
34880
+ * Validate() method override for MJ: AI Agent Permissions entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
34881
+ * * Table-Level: This rule ensures that either a Role or a User is specified, but not both at the same time. You must provide one or the other, but never both, and neither can be left blank at the same time.
34882
+ * @public
34883
+ * @method
34884
+ * @override
34885
+ */
34886
+ Validate() {
34887
+ const result = super.Validate();
34888
+ this.ValidateRoleIDAndUserIDExclusive(result);
34889
+ result.Success = result.Success && (result.Errors.length === 0);
34890
+ return result;
34891
+ }
34892
+ /**
34893
+ * This rule ensures that either a Role or a User is specified, but not both at the same time. You must provide one or the other, but never both, and neither can be left blank at the same time.
34894
+ * @param result - the ValidationResult object to add any errors or warnings to
34895
+ * @public
34896
+ * @method
34897
+ */
34898
+ ValidateRoleIDAndUserIDExclusive(result) {
34899
+ const hasRole = this.RoleID !== null;
34900
+ const hasUser = this.UserID !== null;
34901
+ if ((hasRole && hasUser) || (!hasRole && !hasUser)) {
34902
+ result.Errors.push(new core_1.ValidationErrorInfo("RoleID/UserID", "You must specify either a Role or a User, but not both and not neither.", `RoleID: $${this.RoleID}, UserID: $${this.UserID}`, core_1.ValidationErrorType.Failure));
34903
+ }
34904
+ }
34905
+ /**
34906
+ * * Field Name: ID
34907
+ * * Display Name: ID
34908
+ * * SQL Data Type: uniqueidentifier
34909
+ * * Default Value: newsequentialid()
34910
+ */
34911
+ get ID() {
34912
+ return this.Get('ID');
34913
+ }
34914
+ set ID(value) {
34915
+ this.Set('ID', value);
34916
+ }
34917
+ /**
34918
+ * * Field Name: AgentID
34919
+ * * Display Name: Agent ID
34920
+ * * SQL Data Type: uniqueidentifier
34921
+ * * Related Entity/Foreign Key: AI Agents (vwAIAgents.ID)
34922
+ */
34923
+ get AgentID() {
34924
+ return this.Get('AgentID');
34925
+ }
34926
+ set AgentID(value) {
34927
+ this.Set('AgentID', value);
34928
+ }
34929
+ /**
34930
+ * * Field Name: RoleID
34931
+ * * Display Name: Role ID
34932
+ * * SQL Data Type: uniqueidentifier
34933
+ * * Related Entity/Foreign Key: Roles (vwRoles.ID)
34934
+ * * Description: The role this permission is granted to. Either RoleID or UserID must be specified, but not both.
34935
+ */
34936
+ get RoleID() {
34937
+ return this.Get('RoleID');
34938
+ }
34939
+ set RoleID(value) {
34940
+ this.Set('RoleID', value);
34941
+ }
34942
+ /**
34943
+ * * Field Name: UserID
34944
+ * * Display Name: User ID
34945
+ * * SQL Data Type: uniqueidentifier
34946
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
34947
+ * * Description: The user this permission is granted to. Either RoleID or UserID must be specified, but not both.
34948
+ */
34949
+ get UserID() {
34950
+ return this.Get('UserID');
34951
+ }
34952
+ set UserID(value) {
34953
+ this.Set('UserID', value);
34954
+ }
34955
+ /**
34956
+ * * Field Name: CanView
34957
+ * * Display Name: Can View
34958
+ * * SQL Data Type: bit
34959
+ * * Default Value: 0
34960
+ * * Description: Grants permission to view the agent configuration and details.
34961
+ */
34962
+ get CanView() {
34963
+ return this.Get('CanView');
34964
+ }
34965
+ set CanView(value) {
34966
+ this.Set('CanView', value);
34967
+ }
34968
+ /**
34969
+ * * Field Name: CanRun
34970
+ * * Display Name: Can Run
34971
+ * * SQL Data Type: bit
34972
+ * * Default Value: 0
34973
+ * * Description: Grants permission to execute/run the agent. Typically implies CanView as well.
34974
+ */
34975
+ get CanRun() {
34976
+ return this.Get('CanRun');
34977
+ }
34978
+ set CanRun(value) {
34979
+ this.Set('CanRun', value);
34980
+ }
34981
+ /**
34982
+ * * Field Name: CanEdit
34983
+ * * Display Name: Can Edit
34984
+ * * SQL Data Type: bit
34985
+ * * Default Value: 0
34986
+ * * Description: Grants permission to modify the agent configuration, prompts, and settings. Typically implies CanView and CanRun as well.
34987
+ */
34988
+ get CanEdit() {
34989
+ return this.Get('CanEdit');
34990
+ }
34991
+ set CanEdit(value) {
34992
+ this.Set('CanEdit', value);
34993
+ }
34994
+ /**
34995
+ * * Field Name: CanDelete
34996
+ * * Display Name: Can Delete
34997
+ * * SQL Data Type: bit
34998
+ * * Default Value: 0
34999
+ * * Description: Grants permission to delete the agent. Typically implies all other permissions as well.
35000
+ */
35001
+ get CanDelete() {
35002
+ return this.Get('CanDelete');
35003
+ }
35004
+ set CanDelete(value) {
35005
+ this.Set('CanDelete', value);
35006
+ }
35007
+ /**
35008
+ * * Field Name: Comments
35009
+ * * Display Name: Comments
35010
+ * * SQL Data Type: nvarchar(MAX)
35011
+ * * Description: Optional comments explaining why this permission was granted or any special notes.
35012
+ */
35013
+ get Comments() {
35014
+ return this.Get('Comments');
35015
+ }
35016
+ set Comments(value) {
35017
+ this.Set('Comments', value);
34067
35018
  }
34068
35019
  /**
34069
35020
  * * Field Name: __mj_CreatedAt
@@ -34454,6 +35405,30 @@ let AIAgentRelationshipEntity = class AIAgentRelationshipEntity extends core_1.B
34454
35405
  this.Set('SubAgentOutputMapping', value);
34455
35406
  }
34456
35407
  /**
35408
+ * * Field Name: SubAgentInputMapping
35409
+ * * Display Name: Sub Agent Input Mapping
35410
+ * * SQL Data Type: nvarchar(MAX)
35411
+ * * Description: JSON mapping of parent payload paths to sub-agent initial payload paths. Enables structural data transfer from parent to related sub-agent. Format: {"parentPath": "subAgentPath", "parent.nested": "subAgent.field"}. Example: {"searchQuery": "query", "maxResults": "limit"}. If null, sub-agent starts with empty payload (default behavior).
35412
+ */
35413
+ get SubAgentInputMapping() {
35414
+ return this.Get('SubAgentInputMapping');
35415
+ }
35416
+ set SubAgentInputMapping(value) {
35417
+ this.Set('SubAgentInputMapping', value);
35418
+ }
35419
+ /**
35420
+ * * Field Name: SubAgentContextPaths
35421
+ * * Display Name: Sub Agent Context Paths
35422
+ * * SQL Data Type: nvarchar(MAX)
35423
+ * * Description: JSON array of parent payload paths to send as LLM context to related sub-agent. Sub-agent receives this data in a formatted context message before its task message. Format: ["path1", "path2.nested", "path3.*", "*"]. Use "*" to send entire parent payload. Example: ["userPreferences", "priorFindings.summary", "sources[*]"]. If null, no parent context is sent (default behavior).
35424
+ */
35425
+ get SubAgentContextPaths() {
35426
+ return this.Get('SubAgentContextPaths');
35427
+ }
35428
+ set SubAgentContextPaths(value) {
35429
+ this.Set('SubAgentContextPaths', value);
35430
+ }
35431
+ /**
34457
35432
  * * Field Name: Agent
34458
35433
  * * Display Name: Agent
34459
35434
  * * SQL Data Type: nvarchar(255)
@@ -39196,6 +40171,182 @@ exports.AIVendorEntity = AIVendorEntity;
39196
40171
  exports.AIVendorEntity = AIVendorEntity = __decorate([
39197
40172
  (0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: AI Vendors')
39198
40173
  ], AIVendorEntity);
40174
+ /**
40175
+ * MJ: Artifact Permissions - strongly typed entity sub-class
40176
+ * * Schema: __mj
40177
+ * * Base Table: ArtifactPermission
40178
+ * * Base View: vwArtifactPermissions
40179
+ * * @description Manages user permissions for artifacts with granular access control (Read, Edit, Delete, Share)
40180
+ * * Primary Key: ID
40181
+ * @extends {BaseEntity}
40182
+ * @class
40183
+ * @public
40184
+ */
40185
+ let ArtifactPermissionEntity = class ArtifactPermissionEntity extends core_1.BaseEntity {
40186
+ /**
40187
+ * Loads the MJ: Artifact Permissions record from the database
40188
+ * @param ID: string - primary key value to load the MJ: Artifact Permissions record.
40189
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
40190
+ * @returns {Promise<boolean>} - true if successful, false otherwise
40191
+ * @public
40192
+ * @async
40193
+ * @memberof ArtifactPermissionEntity
40194
+ * @method
40195
+ * @override
40196
+ */
40197
+ async Load(ID, EntityRelationshipsToLoad) {
40198
+ const compositeKey = new core_1.CompositeKey();
40199
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
40200
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
40201
+ }
40202
+ /**
40203
+ * * Field Name: ID
40204
+ * * Display Name: ID
40205
+ * * SQL Data Type: uniqueidentifier
40206
+ * * Default Value: newsequentialid()
40207
+ */
40208
+ get ID() {
40209
+ return this.Get('ID');
40210
+ }
40211
+ set ID(value) {
40212
+ this.Set('ID', value);
40213
+ }
40214
+ /**
40215
+ * * Field Name: ArtifactID
40216
+ * * Display Name: Artifact ID
40217
+ * * SQL Data Type: uniqueidentifier
40218
+ * * Related Entity/Foreign Key: MJ: Artifacts (vwArtifacts.ID)
40219
+ */
40220
+ get ArtifactID() {
40221
+ return this.Get('ArtifactID');
40222
+ }
40223
+ set ArtifactID(value) {
40224
+ this.Set('ArtifactID', value);
40225
+ }
40226
+ /**
40227
+ * * Field Name: UserID
40228
+ * * Display Name: User ID
40229
+ * * SQL Data Type: uniqueidentifier
40230
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
40231
+ */
40232
+ get UserID() {
40233
+ return this.Get('UserID');
40234
+ }
40235
+ set UserID(value) {
40236
+ this.Set('UserID', value);
40237
+ }
40238
+ /**
40239
+ * * Field Name: CanRead
40240
+ * * Display Name: Can Read
40241
+ * * SQL Data Type: bit
40242
+ * * Default Value: 1
40243
+ * * Description: Whether the user can view/read the artifact
40244
+ */
40245
+ get CanRead() {
40246
+ return this.Get('CanRead');
40247
+ }
40248
+ set CanRead(value) {
40249
+ this.Set('CanRead', value);
40250
+ }
40251
+ /**
40252
+ * * Field Name: CanEdit
40253
+ * * Display Name: Can Edit
40254
+ * * SQL Data Type: bit
40255
+ * * Default Value: 0
40256
+ * * Description: Whether the user can modify the artifact or create new versions
40257
+ */
40258
+ get CanEdit() {
40259
+ return this.Get('CanEdit');
40260
+ }
40261
+ set CanEdit(value) {
40262
+ this.Set('CanEdit', value);
40263
+ }
40264
+ /**
40265
+ * * Field Name: CanDelete
40266
+ * * Display Name: Can Delete
40267
+ * * SQL Data Type: bit
40268
+ * * Default Value: 0
40269
+ * * Description: Whether the user can delete the artifact
40270
+ */
40271
+ get CanDelete() {
40272
+ return this.Get('CanDelete');
40273
+ }
40274
+ set CanDelete(value) {
40275
+ this.Set('CanDelete', value);
40276
+ }
40277
+ /**
40278
+ * * Field Name: CanShare
40279
+ * * Display Name: Can Share
40280
+ * * SQL Data Type: bit
40281
+ * * Default Value: 0
40282
+ * * Description: Whether the user can share the artifact with other users
40283
+ */
40284
+ get CanShare() {
40285
+ return this.Get('CanShare');
40286
+ }
40287
+ set CanShare(value) {
40288
+ this.Set('CanShare', value);
40289
+ }
40290
+ /**
40291
+ * * Field Name: SharedByUserID
40292
+ * * Display Name: Shared By User ID
40293
+ * * SQL Data Type: uniqueidentifier
40294
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
40295
+ * * Description: Foreign key to the User who shared this artifact (if shared)
40296
+ */
40297
+ get SharedByUserID() {
40298
+ return this.Get('SharedByUserID');
40299
+ }
40300
+ set SharedByUserID(value) {
40301
+ this.Set('SharedByUserID', value);
40302
+ }
40303
+ /**
40304
+ * * Field Name: __mj_CreatedAt
40305
+ * * Display Name: Created At
40306
+ * * SQL Data Type: datetimeoffset
40307
+ * * Default Value: getutcdate()
40308
+ */
40309
+ get __mj_CreatedAt() {
40310
+ return this.Get('__mj_CreatedAt');
40311
+ }
40312
+ /**
40313
+ * * Field Name: __mj_UpdatedAt
40314
+ * * Display Name: Updated At
40315
+ * * SQL Data Type: datetimeoffset
40316
+ * * Default Value: getutcdate()
40317
+ */
40318
+ get __mj_UpdatedAt() {
40319
+ return this.Get('__mj_UpdatedAt');
40320
+ }
40321
+ /**
40322
+ * * Field Name: Artifact
40323
+ * * Display Name: Artifact
40324
+ * * SQL Data Type: nvarchar(255)
40325
+ */
40326
+ get Artifact() {
40327
+ return this.Get('Artifact');
40328
+ }
40329
+ /**
40330
+ * * Field Name: User
40331
+ * * Display Name: User
40332
+ * * SQL Data Type: nvarchar(100)
40333
+ */
40334
+ get User() {
40335
+ return this.Get('User');
40336
+ }
40337
+ /**
40338
+ * * Field Name: SharedByUser
40339
+ * * Display Name: Shared By User
40340
+ * * SQL Data Type: nvarchar(100)
40341
+ */
40342
+ get SharedByUser() {
40343
+ return this.Get('SharedByUser');
40344
+ }
40345
+ };
40346
+ exports.ArtifactPermissionEntity = ArtifactPermissionEntity;
40347
+ exports.ArtifactPermissionEntity = ArtifactPermissionEntity = __decorate([
40348
+ (0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: Artifact Permissions')
40349
+ ], ArtifactPermissionEntity);
39199
40350
  /**
39200
40351
  * MJ: Artifact Types - strongly typed entity sub-class
39201
40352
  * * Schema: __mj
@@ -39961,6 +41112,182 @@ exports.CollectionArtifactEntity = CollectionArtifactEntity;
39961
41112
  exports.CollectionArtifactEntity = CollectionArtifactEntity = __decorate([
39962
41113
  (0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: Collection Artifacts')
39963
41114
  ], CollectionArtifactEntity);
41115
+ /**
41116
+ * MJ: Collection Permissions - strongly typed entity sub-class
41117
+ * * Schema: __mj
41118
+ * * Base Table: CollectionPermission
41119
+ * * Base View: vwCollectionPermissions
41120
+ * * @description Manages sharing permissions for collections, allowing granular access control
41121
+ * * Primary Key: ID
41122
+ * @extends {BaseEntity}
41123
+ * @class
41124
+ * @public
41125
+ */
41126
+ let CollectionPermissionEntity = class CollectionPermissionEntity extends core_1.BaseEntity {
41127
+ /**
41128
+ * Loads the MJ: Collection Permissions record from the database
41129
+ * @param ID: string - primary key value to load the MJ: Collection Permissions record.
41130
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
41131
+ * @returns {Promise<boolean>} - true if successful, false otherwise
41132
+ * @public
41133
+ * @async
41134
+ * @memberof CollectionPermissionEntity
41135
+ * @method
41136
+ * @override
41137
+ */
41138
+ async Load(ID, EntityRelationshipsToLoad) {
41139
+ const compositeKey = new core_1.CompositeKey();
41140
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
41141
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
41142
+ }
41143
+ /**
41144
+ * * Field Name: ID
41145
+ * * Display Name: ID
41146
+ * * SQL Data Type: uniqueidentifier
41147
+ * * Default Value: newsequentialid()
41148
+ */
41149
+ get ID() {
41150
+ return this.Get('ID');
41151
+ }
41152
+ set ID(value) {
41153
+ this.Set('ID', value);
41154
+ }
41155
+ /**
41156
+ * * Field Name: CollectionID
41157
+ * * Display Name: Collection ID
41158
+ * * SQL Data Type: uniqueidentifier
41159
+ * * Related Entity/Foreign Key: MJ: Collections (vwCollections.ID)
41160
+ */
41161
+ get CollectionID() {
41162
+ return this.Get('CollectionID');
41163
+ }
41164
+ set CollectionID(value) {
41165
+ this.Set('CollectionID', value);
41166
+ }
41167
+ /**
41168
+ * * Field Name: UserID
41169
+ * * Display Name: User ID
41170
+ * * SQL Data Type: uniqueidentifier
41171
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
41172
+ */
41173
+ get UserID() {
41174
+ return this.Get('UserID');
41175
+ }
41176
+ set UserID(value) {
41177
+ this.Set('UserID', value);
41178
+ }
41179
+ /**
41180
+ * * Field Name: CanRead
41181
+ * * Display Name: Can Read
41182
+ * * SQL Data Type: bit
41183
+ * * Default Value: 1
41184
+ * * Description: Always 1 - users must have read permission to access a shared collection
41185
+ */
41186
+ get CanRead() {
41187
+ return this.Get('CanRead');
41188
+ }
41189
+ set CanRead(value) {
41190
+ this.Set('CanRead', value);
41191
+ }
41192
+ /**
41193
+ * * Field Name: CanShare
41194
+ * * Display Name: Can Share
41195
+ * * SQL Data Type: bit
41196
+ * * Default Value: 0
41197
+ * * Description: Can share this collection with others (but cannot grant more permissions than they have)
41198
+ */
41199
+ get CanShare() {
41200
+ return this.Get('CanShare');
41201
+ }
41202
+ set CanShare(value) {
41203
+ this.Set('CanShare', value);
41204
+ }
41205
+ /**
41206
+ * * Field Name: CanEdit
41207
+ * * Display Name: Can Edit
41208
+ * * SQL Data Type: bit
41209
+ * * Default Value: 0
41210
+ * * Description: Can add/remove artifacts to/from this collection
41211
+ */
41212
+ get CanEdit() {
41213
+ return this.Get('CanEdit');
41214
+ }
41215
+ set CanEdit(value) {
41216
+ this.Set('CanEdit', value);
41217
+ }
41218
+ /**
41219
+ * * Field Name: CanDelete
41220
+ * * Display Name: Can Delete
41221
+ * * SQL Data Type: bit
41222
+ * * Default Value: 0
41223
+ * * Description: Can delete the collection, child collections, and artifacts
41224
+ */
41225
+ get CanDelete() {
41226
+ return this.Get('CanDelete');
41227
+ }
41228
+ set CanDelete(value) {
41229
+ this.Set('CanDelete', value);
41230
+ }
41231
+ /**
41232
+ * * Field Name: SharedByUserID
41233
+ * * Display Name: Shared By User ID
41234
+ * * SQL Data Type: uniqueidentifier
41235
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
41236
+ * * Description: The user who shared this collection (NULL if shared by owner)
41237
+ */
41238
+ get SharedByUserID() {
41239
+ return this.Get('SharedByUserID');
41240
+ }
41241
+ set SharedByUserID(value) {
41242
+ this.Set('SharedByUserID', value);
41243
+ }
41244
+ /**
41245
+ * * Field Name: __mj_CreatedAt
41246
+ * * Display Name: Created At
41247
+ * * SQL Data Type: datetimeoffset
41248
+ * * Default Value: getutcdate()
41249
+ */
41250
+ get __mj_CreatedAt() {
41251
+ return this.Get('__mj_CreatedAt');
41252
+ }
41253
+ /**
41254
+ * * Field Name: __mj_UpdatedAt
41255
+ * * Display Name: Updated At
41256
+ * * SQL Data Type: datetimeoffset
41257
+ * * Default Value: getutcdate()
41258
+ */
41259
+ get __mj_UpdatedAt() {
41260
+ return this.Get('__mj_UpdatedAt');
41261
+ }
41262
+ /**
41263
+ * * Field Name: Collection
41264
+ * * Display Name: Collection
41265
+ * * SQL Data Type: nvarchar(255)
41266
+ */
41267
+ get Collection() {
41268
+ return this.Get('Collection');
41269
+ }
41270
+ /**
41271
+ * * Field Name: User
41272
+ * * Display Name: User
41273
+ * * SQL Data Type: nvarchar(100)
41274
+ */
41275
+ get User() {
41276
+ return this.Get('User');
41277
+ }
41278
+ /**
41279
+ * * Field Name: SharedByUser
41280
+ * * Display Name: Shared By User
41281
+ * * SQL Data Type: nvarchar(100)
41282
+ */
41283
+ get SharedByUser() {
41284
+ return this.Get('SharedByUser');
41285
+ }
41286
+ };
41287
+ exports.CollectionPermissionEntity = CollectionPermissionEntity;
41288
+ exports.CollectionPermissionEntity = CollectionPermissionEntity = __decorate([
41289
+ (0, global_1.RegisterClass)(core_1.BaseEntity, 'MJ: Collection Permissions')
41290
+ ], CollectionPermissionEntity);
39964
41291
  /**
39965
41292
  * MJ: Collections - strongly typed entity sub-class
39966
41293
  * * Schema: __mj
@@ -40105,6 +41432,19 @@ let CollectionEntity = class CollectionEntity extends core_1.BaseEntity {
40105
41432
  return this.Get('__mj_UpdatedAt');
40106
41433
  }
40107
41434
  /**
41435
+ * * Field Name: OwnerID
41436
+ * * Display Name: Owner ID
41437
+ * * SQL Data Type: uniqueidentifier
41438
+ * * Related Entity/Foreign Key: Users (vwUsers.ID)
41439
+ * * Description: The user who owns this collection and has full permissions
41440
+ */
41441
+ get OwnerID() {
41442
+ return this.Get('OwnerID');
41443
+ }
41444
+ set OwnerID(value) {
41445
+ this.Set('OwnerID', value);
41446
+ }
41447
+ /**
40108
41448
  * * Field Name: Environment
40109
41449
  * * Display Name: Environment
40110
41450
  * * SQL Data Type: nvarchar(255)
@@ -40121,6 +41461,14 @@ let CollectionEntity = class CollectionEntity extends core_1.BaseEntity {
40121
41461
  return this.Get('Parent');
40122
41462
  }
40123
41463
  /**
41464
+ * * Field Name: Owner
41465
+ * * Display Name: Owner
41466
+ * * SQL Data Type: nvarchar(100)
41467
+ */
41468
+ get Owner() {
41469
+ return this.Get('Owner');
41470
+ }
41471
+ /**
40124
41472
  * * Field Name: RootParentID
40125
41473
  * * Display Name: Root Parent ID
40126
41474
  * * SQL Data Type: uniqueidentifier