@memberjunction/server 5.37.0 → 5.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +79 -12
  2. package/dist/agents/skip-sdk.d.ts.map +1 -1
  3. package/dist/agents/skip-sdk.js +16 -12
  4. package/dist/agents/skip-sdk.js.map +1 -1
  5. package/dist/apolloServer/index.d.ts +0 -8
  6. package/dist/apolloServer/index.d.ts.map +1 -1
  7. package/dist/apolloServer/index.js +61 -0
  8. package/dist/apolloServer/index.js.map +1 -1
  9. package/dist/config.d.ts +68 -0
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +24 -0
  12. package/dist/config.js.map +1 -1
  13. package/dist/context.d.ts.map +1 -1
  14. package/dist/context.js +2 -21
  15. package/dist/context.js.map +1 -1
  16. package/dist/generated/generated.d.ts +172 -5
  17. package/dist/generated/generated.d.ts.map +1 -1
  18. package/dist/generated/generated.js +867 -14
  19. package/dist/generated/generated.js.map +1 -1
  20. package/dist/generic/FireAndForgetHeartbeat.d.ts +51 -0
  21. package/dist/generic/FireAndForgetHeartbeat.d.ts.map +1 -0
  22. package/dist/generic/FireAndForgetHeartbeat.js +44 -0
  23. package/dist/generic/FireAndForgetHeartbeat.js.map +1 -0
  24. package/dist/index.d.ts +3 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +177 -16
  27. package/dist/index.js.map +1 -1
  28. package/dist/logging/NoLog.d.ts +50 -0
  29. package/dist/logging/NoLog.d.ts.map +1 -0
  30. package/dist/logging/NoLog.js +80 -0
  31. package/dist/logging/NoLog.js.map +1 -0
  32. package/dist/logging/bootAudit.d.ts +43 -0
  33. package/dist/logging/bootAudit.d.ts.map +1 -0
  34. package/dist/logging/bootAudit.js +83 -0
  35. package/dist/logging/bootAudit.js.map +1 -0
  36. package/dist/logging/boundaryLogPayload.d.ts +18 -0
  37. package/dist/logging/boundaryLogPayload.d.ts.map +1 -0
  38. package/dist/logging/boundaryLogPayload.js +18 -0
  39. package/dist/logging/boundaryLogPayload.js.map +1 -0
  40. package/dist/logging/secretRedactor.d.ts +23 -0
  41. package/dist/logging/secretRedactor.d.ts.map +1 -0
  42. package/dist/logging/secretRedactor.js +53 -0
  43. package/dist/logging/secretRedactor.js.map +1 -0
  44. package/dist/logging/shortenForLog.d.ts +8 -0
  45. package/dist/logging/shortenForLog.d.ts.map +1 -0
  46. package/dist/logging/shortenForLog.js +21 -0
  47. package/dist/logging/shortenForLog.js.map +1 -0
  48. package/dist/logging/variablesLoggingMiddleware.d.ts +22 -0
  49. package/dist/logging/variablesLoggingMiddleware.d.ts.map +1 -0
  50. package/dist/logging/variablesLoggingMiddleware.js +127 -0
  51. package/dist/logging/variablesLoggingMiddleware.js.map +1 -0
  52. package/dist/resolvers/GetDataResolver.d.ts.map +1 -1
  53. package/dist/resolvers/GetDataResolver.js +8 -4
  54. package/dist/resolvers/GetDataResolver.js.map +1 -1
  55. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts +259 -2
  56. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
  57. package/dist/resolvers/IntegrationDiscoveryResolver.js +1276 -117
  58. package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
  59. package/dist/resolvers/IntegrationProgressResolver.d.ts +90 -0
  60. package/dist/resolvers/IntegrationProgressResolver.d.ts.map +1 -0
  61. package/dist/resolvers/IntegrationProgressResolver.js +196 -0
  62. package/dist/resolvers/IntegrationProgressResolver.js.map +1 -0
  63. package/dist/resolvers/MCPResolver.d.ts.map +1 -1
  64. package/dist/resolvers/MCPResolver.js +19 -14
  65. package/dist/resolvers/MCPResolver.js.map +1 -1
  66. package/dist/resolvers/QueryResolver.d.ts.map +1 -1
  67. package/dist/resolvers/QueryResolver.js +5 -4
  68. package/dist/resolvers/QueryResolver.js.map +1 -1
  69. package/dist/resolvers/QuerySystemUserResolver.d.ts.map +1 -1
  70. package/dist/resolvers/QuerySystemUserResolver.js +6 -18
  71. package/dist/resolvers/QuerySystemUserResolver.js.map +1 -1
  72. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  73. package/dist/resolvers/RunAIAgentResolver.js +32 -64
  74. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  75. package/dist/resolvers/RunTestResolver.d.ts.map +1 -1
  76. package/dist/resolvers/RunTestResolver.js +12 -2
  77. package/dist/resolvers/RunTestResolver.js.map +1 -1
  78. package/dist/resolvers/SearchEntitiesResolver.d.ts +46 -0
  79. package/dist/resolvers/SearchEntitiesResolver.d.ts.map +1 -0
  80. package/dist/resolvers/SearchEntitiesResolver.js +216 -0
  81. package/dist/resolvers/SearchEntitiesResolver.js.map +1 -0
  82. package/dist/resolvers/VectorizeEntityResolver.d.ts.map +1 -1
  83. package/dist/resolvers/VectorizeEntityResolver.js +14 -1
  84. package/dist/resolvers/VectorizeEntityResolver.js.map +1 -1
  85. package/dist/services/ScheduledJobsService.d.ts.map +1 -1
  86. package/dist/services/ScheduledJobsService.js +14 -2
  87. package/dist/services/ScheduledJobsService.js.map +1 -1
  88. package/package.json +75 -74
  89. package/src/__tests__/NoLog.test.ts +76 -0
  90. package/src/__tests__/bootAudit.test.ts +188 -0
  91. package/src/__tests__/boundaryLogPayload.test.ts +31 -0
  92. package/src/__tests__/getDataTokenRedaction.test.ts +84 -0
  93. package/src/__tests__/resolverBase.rls.test.ts +224 -0
  94. package/src/__tests__/secretRedactor.test.ts +163 -0
  95. package/src/__tests__/subscriptionRedaction.test.ts +217 -0
  96. package/src/agents/skip-sdk.ts +16 -13
  97. package/src/apolloServer/index.ts +58 -0
  98. package/src/config.ts +27 -0
  99. package/src/context.ts +2 -19
  100. package/src/generated/generated.ts +627 -15
  101. package/src/generic/FireAndForgetHeartbeat.ts +85 -0
  102. package/src/generic/__tests__/FireAndForgetHeartbeat.test.ts +99 -0
  103. package/src/index.ts +199 -19
  104. package/src/logging/NoLog.ts +88 -0
  105. package/src/logging/bootAudit.ts +117 -0
  106. package/src/logging/boundaryLogPayload.ts +19 -0
  107. package/src/logging/secretRedactor.ts +82 -0
  108. package/src/logging/shortenForLog.ts +17 -0
  109. package/src/logging/variablesLoggingMiddleware.ts +191 -0
  110. package/src/resolvers/GetDataResolver.ts +9 -5
  111. package/src/resolvers/IntegrationDiscoveryResolver.ts +1111 -120
  112. package/src/resolvers/IntegrationProgressResolver.ts +220 -0
  113. package/src/resolvers/MCPResolver.ts +18 -14
  114. package/src/resolvers/QueryResolver.ts +7 -6
  115. package/src/resolvers/QuerySystemUserResolver.ts +11 -25
  116. package/src/resolvers/RunAIAgentResolver.ts +34 -71
  117. package/src/resolvers/RunTestResolver.ts +14 -2
  118. package/src/resolvers/SearchEntitiesResolver.ts +173 -0
  119. package/src/resolvers/VectorizeEntityResolver.ts +14 -1
  120. package/src/resolvers/__tests__/IntegrationProgressResolver.test.ts +170 -0
  121. package/src/services/ScheduledJobsService.ts +15 -2
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../config.js';
18
18
 
19
19
 
20
20
 
21
- import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentClientToolEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
21
+ import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentClientToolEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
22
22
 
23
23
 
24
24
  //****************************************************************************
@@ -7593,6 +7593,12 @@ each time the agent processes a prompt step.`})
7593
7593
  @MaxLength(36)
7594
7594
  CompanyID?: string;
7595
7595
 
7596
+ @Field(() => Int, {nullable: true, description: `Total input tokens served from the AI provider's prompt cache (cache reads / hits) across this agent run, summed from child prompt runs' TokensCacheReadRollup and sub-agent runs' TotalCacheReadTokensUsed. Counts only; the cost impact (cache reads are billed at a steep discount) is reflected in TotalCost. The cache counterpart of TotalPromptTokensUsed.`})
7597
+ TotalCacheReadTokensUsed?: number;
7598
+
7599
+ @Field(() => Int, {nullable: true, description: `Total input tokens written to the AI provider's prompt cache (cache writes / creation) across this agent run, summed from child prompt runs' TokensCacheWriteRollup and sub-agent runs' TotalCacheWriteTokensUsed. Populated for providers that bill cache creation (e.g. Anthropic); 0 or NULL otherwise. The cache counterpart of TotalCompletionTokensUsed.`})
7600
+ TotalCacheWriteTokensUsed?: number;
7601
+
7596
7602
  @Field({nullable: true})
7597
7603
  @MaxLength(255)
7598
7604
  Agent?: string;
@@ -7814,6 +7820,12 @@ export class CreateMJAIAgentRunInput {
7814
7820
  @Field({ nullable: true })
7815
7821
  CompanyID: string | null;
7816
7822
 
7823
+ @Field(() => Int, { nullable: true })
7824
+ TotalCacheReadTokensUsed: number | null;
7825
+
7826
+ @Field(() => Int, { nullable: true })
7827
+ TotalCacheWriteTokensUsed: number | null;
7828
+
7817
7829
  @Field(() => RestoreContextInput, { nullable: true })
7818
7830
  RestoreContext___?: RestoreContextInput;
7819
7831
  }
@@ -7956,6 +7968,12 @@ export class UpdateMJAIAgentRunInput {
7956
7968
  @Field({ nullable: true })
7957
7969
  CompanyID?: string | null;
7958
7970
 
7971
+ @Field(() => Int, { nullable: true })
7972
+ TotalCacheReadTokensUsed?: number | null;
7973
+
7974
+ @Field(() => Int, { nullable: true })
7975
+ TotalCacheWriteTokensUsed?: number | null;
7976
+
7959
7977
  @Field(() => [KeyValuePairInput], { nullable: true })
7960
7978
  OldValues___?: KeyValuePairInput[];
7961
7979
 
@@ -9570,6 +9588,9 @@ if this limit is exceeded.`})
9570
9588
  @Field(() => [MJAction_])
9571
9589
  MJActions_CreatedByAgentIDArray: MJAction_[]; // Link to MJActions
9572
9590
 
9591
+ @Field(() => [MJConversation_])
9592
+ MJConversations_DefaultAgentIDArray: MJConversation_[]; // Link to MJConversations
9593
+
9573
9594
  }
9574
9595
 
9575
9596
  //****************************************************************************
@@ -10295,6 +10316,16 @@ export class MJAIAgentResolver extends ResolverBase {
10295
10316
  return result;
10296
10317
  }
10297
10318
 
10319
+ @FieldResolver(() => [MJConversation_])
10320
+ async MJConversations_DefaultAgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
10321
+ this.CheckUserReadPermissions('MJ: Conversations', userPayload);
10322
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
10323
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversations')} WHERE ${provider.QuoteIdentifier('DefaultAgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversations', userPayload, EntityPermissionType.Read, 'AND');
10324
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
10325
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
10326
+ return result;
10327
+ }
10328
+
10298
10329
  @Mutation(() => MJAIAgent_)
10299
10330
  async CreateMJAIAgent(
10300
10331
  @Arg('input', () => CreateMJAIAgentInput) input: CreateMJAIAgentInput,
@@ -12230,6 +12261,12 @@ export class MJAIModelCost_ {
12230
12261
  @Field()
12231
12262
  _mj__UpdatedAt: Date;
12232
12263
 
12264
+ @Field(() => Float, {nullable: true, description: `Optional price per unit for input tokens served from the AI provider's prompt cache (cache reads / hits), expressed in the same currency and UnitType (e.g. per 1M tokens) as InputPricePerUnit. When NULL, cache-read tokens are priced at InputPricePerUnit. Cache reads are usually far cheaper than uncached input (e.g. ~0.1x for Anthropic/Gemini, ~0.5x for OpenAI).`})
12265
+ CacheReadPricePerUnit?: number;
12266
+
12267
+ @Field(() => Float, {nullable: true, description: `Optional price per unit for input tokens written to the AI provider's prompt cache (cache writes / creation), expressed in the same currency and UnitType as InputPricePerUnit. When NULL, cache-write tokens are priced at InputPricePerUnit. Populated for providers that bill cache creation separately (e.g. Anthropic, ~1.25x input); leave NULL for providers that do not (OpenAI, Gemini), which also report 0 cache-write tokens.`})
12268
+ CacheWritePricePerUnit?: number;
12269
+
12233
12270
  @Field()
12234
12271
  @MaxLength(50)
12235
12272
  Model: string;
@@ -12292,6 +12329,12 @@ export class CreateMJAIModelCostInput {
12292
12329
  @Field({ nullable: true })
12293
12330
  Comments: string | null;
12294
12331
 
12332
+ @Field(() => Float, { nullable: true })
12333
+ CacheReadPricePerUnit: number | null;
12334
+
12335
+ @Field(() => Float, { nullable: true })
12336
+ CacheWritePricePerUnit: number | null;
12337
+
12295
12338
  @Field(() => RestoreContextInput, { nullable: true })
12296
12339
  RestoreContext___?: RestoreContextInput;
12297
12340
  }
@@ -12341,6 +12384,12 @@ export class UpdateMJAIModelCostInput {
12341
12384
  @Field({ nullable: true })
12342
12385
  Comments?: string | null;
12343
12386
 
12387
+ @Field(() => Float, { nullable: true })
12388
+ CacheReadPricePerUnit?: number | null;
12389
+
12390
+ @Field(() => Float, { nullable: true })
12391
+ CacheWritePricePerUnit?: number | null;
12392
+
12344
12393
  @Field(() => [KeyValuePairInput], { nullable: true })
12345
12394
  OldValues___?: KeyValuePairInput[];
12346
12395
 
@@ -15223,6 +15272,18 @@ export class MJAIPromptRun_ {
15223
15272
  @Field({nullable: true, description: `The assistant prefill text that was used during this prompt execution. Records whether native prefill or fallback was applied. NULL means no prefill was used.`})
15224
15273
  AssistantPrefill?: string;
15225
15274
 
15275
+ @Field(() => Int, {nullable: true, description: `Number of input tokens served from the AI provider's prompt cache (a cache READ / hit) for this run, as reported by the provider. Counts only; no cost is derived here. NULL if the provider did not report cache reads or caching did not engage. Distinct from CacheHit/CacheKey, which track MemberJunction's own result cache.`})
15276
+ TokensCacheRead?: number;
15277
+
15278
+ @Field(() => Int, {nullable: true, description: `Number of input tokens written to the AI provider's prompt cache (a cache WRITE / creation) for this run, as reported by the provider. Populated for providers that report cache writes (e.g. Anthropic cache_creation_input_tokens); NULL or 0 for providers that do not bill/report writes (OpenAI, Gemini, Groq, Cerebras). Counts only; no cost is derived here.`})
15279
+ TokensCacheWrite?: number;
15280
+
15281
+ @Field(() => Int, {nullable: true, description: `Rollup of TokensCacheRead across this prompt run and all of its descendant prompt runs (e.g. the individual attempts behind a parallel / multi-attempt / failover consolidation). For a leaf run this equals TokensCacheRead. Use this (not TokensCacheRead) when aggregating cache reads up a prompt-run or agent-run hierarchy so fan-out provider calls are not under-counted.`})
15282
+ TokensCacheReadRollup?: number;
15283
+
15284
+ @Field(() => Int, {nullable: true, description: `Rollup of TokensCacheWrite across this prompt run and all of its descendant prompt runs. For a leaf run this equals TokensCacheWrite. Mirrors TokensUsedRollup/TokensPromptRollup; populated for providers that report cache writes (e.g. Anthropic), otherwise 0 or NULL.`})
15285
+ TokensCacheWriteRollup?: number;
15286
+
15226
15287
  @Field()
15227
15288
  @MaxLength(255)
15228
15289
  Prompt: string;
@@ -15550,6 +15611,18 @@ export class CreateMJAIPromptRunInput {
15550
15611
  @Field({ nullable: true })
15551
15612
  AssistantPrefill: string | null;
15552
15613
 
15614
+ @Field(() => Int, { nullable: true })
15615
+ TokensCacheRead: number | null;
15616
+
15617
+ @Field(() => Int, { nullable: true })
15618
+ TokensCacheWrite: number | null;
15619
+
15620
+ @Field(() => Int, { nullable: true })
15621
+ TokensCacheReadRollup: number | null;
15622
+
15623
+ @Field(() => Int, { nullable: true })
15624
+ TokensCacheWriteRollup: number | null;
15625
+
15553
15626
  @Field(() => RestoreContextInput, { nullable: true })
15554
15627
  RestoreContext___?: RestoreContextInput;
15555
15628
  }
@@ -15809,6 +15882,18 @@ export class UpdateMJAIPromptRunInput {
15809
15882
  @Field({ nullable: true })
15810
15883
  AssistantPrefill?: string | null;
15811
15884
 
15885
+ @Field(() => Int, { nullable: true })
15886
+ TokensCacheRead?: number | null;
15887
+
15888
+ @Field(() => Int, { nullable: true })
15889
+ TokensCacheWrite?: number | null;
15890
+
15891
+ @Field(() => Int, { nullable: true })
15892
+ TokensCacheReadRollup?: number | null;
15893
+
15894
+ @Field(() => Int, { nullable: true })
15895
+ TokensCacheWriteRollup?: number | null;
15896
+
15812
15897
  @Field(() => [KeyValuePairInput], { nullable: true })
15813
15898
  OldValues___?: KeyValuePairInput[];
15814
15899
 
@@ -19982,6 +20067,9 @@ export class MJApplication_ {
19982
20067
  @Field(() => [MJDashboardUserPreference_])
19983
20068
  MJDashboardUserPreferences_ApplicationIDArray: MJDashboardUserPreference_[]; // Link to MJDashboardUserPreferences
19984
20069
 
20070
+ @Field(() => [MJConversation_])
20071
+ MJConversations_ApplicationIDArray: MJConversation_[]; // Link to MJConversations
20072
+
19985
20073
  }
19986
20074
 
19987
20075
  //****************************************************************************
@@ -20229,6 +20317,16 @@ export class MJApplicationResolver extends ResolverBase {
20229
20317
  return result;
20230
20318
  }
20231
20319
 
20320
+ @FieldResolver(() => [MJConversation_])
20321
+ async MJConversations_ApplicationIDArray(@Root() mjapplication_: MJApplication_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
20322
+ this.CheckUserReadPermissions('MJ: Conversations', userPayload);
20323
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
20324
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversations')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversations', userPayload, EntityPermissionType.Read, 'AND');
20325
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
20326
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
20327
+ return result;
20328
+ }
20329
+
20232
20330
  @Mutation(() => MJApplication_)
20233
20331
  async CreateMJApplication(
20234
20332
  @Arg('input', () => CreateMJApplicationInput) input: CreateMJApplicationInput,
@@ -21885,8 +21983,9 @@ export class MJArtifactUse_ {
21885
21983
  @Field()
21886
21984
  _mj__UpdatedAt: Date;
21887
21985
 
21888
- @Field(() => Int)
21889
- ArtifactVersion: number;
21986
+ @Field({nullable: true})
21987
+ @MaxLength(255)
21988
+ ArtifactVersion?: string;
21890
21989
 
21891
21990
  @Field()
21892
21991
  @MaxLength(100)
@@ -22066,8 +22165,9 @@ export class MJArtifactVersionAttribute_ {
22066
22165
  @Field()
22067
22166
  _mj__UpdatedAt: Date;
22068
22167
 
22069
- @Field(() => Int)
22070
- ArtifactVersion: number;
22168
+ @Field({nullable: true})
22169
+ @MaxLength(255)
22170
+ ArtifactVersion?: string;
22071
22171
 
22072
22172
  }
22073
22173
 
@@ -23716,8 +23816,9 @@ export class MJCollectionArtifact_ {
23716
23816
  @MaxLength(255)
23717
23817
  Collection: string;
23718
23818
 
23719
- @Field(() => Int)
23720
- ArtifactVersion: number;
23819
+ @Field({nullable: true})
23820
+ @MaxLength(255)
23821
+ ArtifactVersion?: string;
23721
23822
 
23722
23823
  }
23723
23824
 
@@ -28638,6 +28739,9 @@ export class MJComponent_ {
28638
28739
  @Field(() => [MJComponentDependency_])
28639
28740
  MJComponentDependencies_DependencyComponentIDArray: MJComponentDependency_[]; // Link to MJComponentDependencies
28640
28741
 
28742
+ @Field(() => [MJEntityFormOverride_])
28743
+ MJEntityFormOverrides_ComponentIDArray: MJEntityFormOverride_[]; // Link to MJEntityFormOverrides
28744
+
28641
28745
  }
28642
28746
 
28643
28747
  //****************************************************************************
@@ -28911,6 +29015,16 @@ export class MJComponentResolver extends ResolverBase {
28911
29015
  return result;
28912
29016
  }
28913
29017
 
29018
+ @FieldResolver(() => [MJEntityFormOverride_])
29019
+ async MJEntityFormOverrides_ComponentIDArray(@Root() mjcomponent_: MJComponent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
29020
+ this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
29021
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29022
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('ComponentID')}='${mjcomponent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
29023
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29024
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
29025
+ return result;
29026
+ }
29027
+
28914
29028
  @Mutation(() => MJComponent_)
28915
29029
  async CreateMJComponent(
28916
29030
  @Arg('input', () => CreateMJComponentInput) input: CreateMJComponentInput,
@@ -32687,8 +32801,9 @@ export class MJConversationDetailArtifact_ {
32687
32801
  @Field()
32688
32802
  ConversationDetail: string;
32689
32803
 
32690
- @Field(() => Int)
32691
- ArtifactVersion: number;
32804
+ @Field({nullable: true})
32805
+ @MaxLength(255)
32806
+ ArtifactVersion?: string;
32692
32807
 
32693
32808
  }
32694
32809
 
@@ -32827,7 +32942,7 @@ export class MJConversationDetailArtifactResolver extends ResolverBase {
32827
32942
  //****************************************************************************
32828
32943
  // ENTITY CLASS for MJ: Conversation Detail Attachments
32829
32944
  //****************************************************************************
32830
- @ObjectType({ description: `Stores attachments (images, videos, audio, documents) for conversation messages. Supports both inline base64 storage for small files and reference to MJStorage for large files.` })
32945
+ @ObjectType({ description: `DEPRECATED: file uploads now flow through ConversationArtifactVersion so they share storage, identity, versioning, permissions, and the artifact-tool dispatch path. Table, generated entity class, GraphQL types, and stored procedures all remain functional — runtime use produces a console warning per the framework\'s standard handling of Status=\'Deprecated\'. See packages/AI/Agents/docs/ARTIFACT_TOOLS_GUIDE.md for migration guidance. Originally: Stores attachments (images, videos, audio, documents) for conversation messages.` })
32831
32946
  export class MJConversationDetailAttachment_ {
32832
32947
  @Field()
32833
32948
  @MaxLength(36)
@@ -32898,8 +33013,9 @@ export class MJConversationDetailAttachment_ {
32898
33013
  @MaxLength(500)
32899
33014
  File?: string;
32900
33015
 
32901
- @Field(() => Int, {nullable: true})
32902
- ArtifactVersion?: number;
33016
+ @Field({nullable: true})
33017
+ @MaxLength(255)
33018
+ ArtifactVersion?: string;
32903
33019
 
32904
33020
  }
32905
33021
 
@@ -33813,11 +33929,11 @@ export class MJConversation_ {
33813
33929
  @Field(() => Boolean, {description: `Indicates if this conversation has been archived and should not appear in active lists.`})
33814
33930
  IsArchived: boolean;
33815
33931
 
33816
- @Field({nullable: true})
33932
+ @Field({nullable: true, description: `Generic 'what is this conversation about?' pointer. Names the Entity whose record this conversation references (e.g. MJ: Components when the conversation was started in the Form Builder cockpit about a specific form). Paired with LinkedRecordID via the CK_Conversation_LinkBinding cross-column CHECK — both NULL or both populated. Surfaces use this to filter their conversation list to entries about the currently-loaded record (e.g. 'show prior conversations about THIS form'). Reusable beyond Form Builder by any future dashboard / record-context surface that wants the same UX without further schema work.`})
33817
33933
  @MaxLength(36)
33818
33934
  LinkedEntityID?: string;
33819
33935
 
33820
- @Field({nullable: true, description: `ID of a related record this conversation is about (support ticket, order, etc.).`})
33936
+ @Field({nullable: true, description: `The primary key of the record this conversation is about, serialized as a string so any entity type can be referenced regardless of its PK shape (UUID, int, composite). Used together with LinkedEntityID — see CK_Conversation_LinkBinding. Wide enough (NVARCHAR(500) in the baseline schema) to handle chunky composite keys. Surfaces query by (LinkedEntityID, LinkedRecordID) — or by LinkedRecordID IN (...) when a lineage of records shares conversation context (e.g. multiple Component versions of the same form lineage).`})
33821
33937
  @MaxLength(500)
33822
33938
  LinkedRecordID?: string;
33823
33939
 
@@ -33850,6 +33966,21 @@ export class MJConversation_ {
33850
33966
  @MaxLength(36)
33851
33967
  TestRunID?: string;
33852
33968
 
33969
+ @Field({description: `Controls where this conversation surfaces in the UI. Global = appears in the main Chat app (no application binding). Application = scoped to a specific Application's embedded chat surface (e.g. the Form Builder cockpit); hidden from the main chat list by default. Both = explicitly promoted to appear in BOTH the main chat list and the bound Application's embedded surface. Defaults to Global so pre-existing conversations stay visible in main chat. Paired with ApplicationID via a cross-column CHECK constraint: Global => ApplicationID IS NULL; Application or Both => ApplicationID IS NOT NULL.`})
33970
+ @MaxLength(20)
33971
+ ApplicationScope: string;
33972
+
33973
+ @Field({nullable: true, description: `Optional Application this conversation is bound to. Required when ApplicationScope is 'Application' or 'Both'; must be NULL when ApplicationScope is 'Global'. Enforced by the CK_Conversation_ScopeAppBinding cross-column CHECK. Used by embedded chat surfaces (e.g. the Form Builder cockpit) to filter their conversation list to just their own application's conversations.`})
33974
+ @MaxLength(36)
33975
+ ApplicationID?: string;
33976
+
33977
+ @Field({nullable: true, description: `Optional per-conversation default AI agent. When set, the message router targets this agent for non-mention, non-continuity messages instead of falling through to the embedder-supplied default (e.g. Form Builder) or to Sage. Lets a user pin a conversation to a specific specialist agent (e.g. Research Agent) so Sage is never invoked for that thread. Routing precedence: @mention > continuity (last responder) > Conversation.DefaultAgentID > embedder's defaultAgentId input > Sage fallback.`})
33978
+ @MaxLength(36)
33979
+ DefaultAgentID?: string;
33980
+
33981
+ @Field({nullable: true, description: `Free-form JSON extensibility column. Apps that want to attach conversation-scoped metadata (UI state, draft notes, custom analytics tags, etc.) can stuff it here without a schema change. **Namespace your keys** to avoid collisions across apps — store e.g. {"form-builder.lastPreviewRecordId":"...","my-app.fooFlag":true} rather than top-level lastPreviewRecordId. Core MJ code paths do NOT read this column; it's purely for downstream apps. NVARCHAR(MAX) so callers can store arbitrarily large blobs, but treat that as a smell — heavy data belongs in a real entity, not a JSON dump.`})
33982
+ AdditionalData?: string;
33983
+
33853
33984
  @Field()
33854
33985
  @MaxLength(100)
33855
33986
  User: string;
@@ -33874,6 +34005,14 @@ export class MJConversation_ {
33874
34005
  @MaxLength(255)
33875
34006
  TestRun?: string;
33876
34007
 
34008
+ @Field({nullable: true})
34009
+ @MaxLength(100)
34010
+ Application?: string;
34011
+
34012
+ @Field({nullable: true})
34013
+ @MaxLength(255)
34014
+ DefaultAgent?: string;
34015
+
33877
34016
  @Field(() => [MJConversationDetail_])
33878
34017
  MJConversationDetails_ConversationIDArray: MJConversationDetail_[]; // Link to MJConversationDetails
33879
34018
 
@@ -33944,6 +34083,18 @@ export class CreateMJConversationInput {
33944
34083
  @Field({ nullable: true })
33945
34084
  TestRunID: string | null;
33946
34085
 
34086
+ @Field({ nullable: true })
34087
+ ApplicationScope?: string;
34088
+
34089
+ @Field({ nullable: true })
34090
+ ApplicationID: string | null;
34091
+
34092
+ @Field({ nullable: true })
34093
+ DefaultAgentID: string | null;
34094
+
34095
+ @Field({ nullable: true })
34096
+ AdditionalData: string | null;
34097
+
33947
34098
  @Field(() => RestoreContextInput, { nullable: true })
33948
34099
  RestoreContext___?: RestoreContextInput;
33949
34100
  }
@@ -33999,6 +34150,18 @@ export class UpdateMJConversationInput {
33999
34150
  @Field({ nullable: true })
34000
34151
  TestRunID?: string | null;
34001
34152
 
34153
+ @Field({ nullable: true })
34154
+ ApplicationScope?: string;
34155
+
34156
+ @Field({ nullable: true })
34157
+ ApplicationID?: string | null;
34158
+
34159
+ @Field({ nullable: true })
34160
+ DefaultAgentID?: string | null;
34161
+
34162
+ @Field({ nullable: true })
34163
+ AdditionalData?: string | null;
34164
+
34002
34165
  @Field(() => [KeyValuePairInput], { nullable: true })
34003
34166
  OldValues___?: KeyValuePairInput[];
34004
34167
 
@@ -40426,6 +40589,9 @@ export class MJEntity_ {
40426
40589
  @Field(() => [MJTestRun_])
40427
40590
  MJTestRuns_TargetLogEntityIDArray: MJTestRun_[]; // Link to MJTestRuns
40428
40591
 
40592
+ @Field(() => [MJEntityFormOverride_])
40593
+ MJEntityFormOverrides_EntityIDArray: MJEntityFormOverride_[]; // Link to MJEntityFormOverrides
40594
+
40429
40595
  }
40430
40596
 
40431
40597
  //****************************************************************************
@@ -41473,6 +41639,16 @@ export class MJEntityResolverBase extends ResolverBase {
41473
41639
  return result;
41474
41640
  }
41475
41641
 
41642
+ @FieldResolver(() => [MJEntityFormOverride_])
41643
+ async MJEntityFormOverrides_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
41644
+ this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
41645
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
41646
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
41647
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
41648
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
41649
+ return result;
41650
+ }
41651
+
41476
41652
  @Mutation(() => MJEntity_)
41477
41653
  async CreateMJEntity(
41478
41654
  @Arg('input', () => CreateMJEntityInput) input: CreateMJEntityInput,
@@ -44124,7 +44300,7 @@ export class MJEntityField_ {
44124
44300
  @MaxLength(20)
44125
44301
  ValueListType: string;
44126
44302
 
44127
- @Field({nullable: true, description: `Defines extended behaviors for a field such as for Email, Web URLs, Code, etc.`})
44303
+ @Field({nullable: true, description: `Defines extended behaviors for a field such as Email, Web URLs, Code, Markdown, HTML, and Icon. When set to 'Icon', the field's values are treated as icon CSS classes (e.g. Font Awesome) for per-row display in the UI.`})
44128
44304
  @MaxLength(50)
44129
44305
  ExtendedType?: string;
44130
44306
 
@@ -44763,6 +44939,250 @@ export class MJEntityFieldResolver extends ResolverBase {
44763
44939
 
44764
44940
  }
44765
44941
 
44942
+ //****************************************************************************
44943
+ // ENTITY CLASS for MJ: Entity Form Overrides
44944
+ //****************************************************************************
44945
+ @ObjectType({ description: `Points an Entity at a Component to serve as its form at runtime. Scoped to User > Role > Global with priority-based resolution. When present and Active, takes precedence over the entity\'s @RegisterClass-registered or CodeGen-generated Angular form.` })
44946
+ export class MJEntityFormOverride_ {
44947
+ @Field()
44948
+ @MaxLength(36)
44949
+ ID: string;
44950
+
44951
+ @Field({description: `Foreign key to Entity — which entity this override is for.`})
44952
+ @MaxLength(36)
44953
+ EntityID: string;
44954
+
44955
+ @Field({description: `Foreign key to Component — the component that renders the form. Must declare componentRole='form' and implement the FormHostProps contract.`})
44956
+ @MaxLength(36)
44957
+ ComponentID: string;
44958
+
44959
+ @Field({description: `Human-readable label for this override (e.g., "CSR Customer Form", "Compact Mobile Variant").`})
44960
+ @MaxLength(255)
44961
+ Name: string;
44962
+
44963
+ @Field({nullable: true, description: `Optional longer description of what this override is for and when it applies.`})
44964
+ Description?: string;
44965
+
44966
+ @Field({description: `Resolution tier: User (requires UserID), Role (requires RoleID), or Global. The resolver evaluates in that order — a User row beats a Role row beats a Global row.`})
44967
+ @MaxLength(20)
44968
+ Scope: string;
44969
+
44970
+ @Field({nullable: true, description: `Required when Scope='User'. The single user this override applies to.`})
44971
+ @MaxLength(36)
44972
+ UserID?: string;
44973
+
44974
+ @Field({nullable: true, description: `Required when Scope='Role'. The role whose members see this override.`})
44975
+ @MaxLength(36)
44976
+ RoleID?: string;
44977
+
44978
+ @Field(() => Int, {description: `Higher value wins within a scope tier. Ties broken by __mj_CreatedAt DESC. No IsDefault — Priority is the only mechanism.`})
44979
+ Priority: number;
44980
+
44981
+ @Field({description: `Active = eligible for resolution. Inactive = ignored. Pending = AI-authored, awaiting human activation (resolver treats as Inactive).`})
44982
+ @MaxLength(20)
44983
+ Status: string;
44984
+
44985
+ @Field({nullable: true, description: `Optional free-form commentary about this override — e.g. who authored it, why it exists, what should change before it goes Global, links to related discussions. Does not affect resolution.`})
44986
+ Notes?: string;
44987
+
44988
+ @Field()
44989
+ _mj__CreatedAt: Date;
44990
+
44991
+ @Field()
44992
+ _mj__UpdatedAt: Date;
44993
+
44994
+ @Field()
44995
+ @MaxLength(255)
44996
+ Entity: string;
44997
+
44998
+ @Field()
44999
+ @MaxLength(500)
45000
+ Component: string;
45001
+
45002
+ @Field({nullable: true})
45003
+ @MaxLength(100)
45004
+ User?: string;
45005
+
45006
+ @Field({nullable: true})
45007
+ @MaxLength(50)
45008
+ Role?: string;
45009
+
45010
+ }
45011
+
45012
+ //****************************************************************************
45013
+ // INPUT TYPE for MJ: Entity Form Overrides
45014
+ //****************************************************************************
45015
+ @InputType()
45016
+ export class CreateMJEntityFormOverrideInput {
45017
+ @Field({ nullable: true })
45018
+ ID?: string;
45019
+
45020
+ @Field({ nullable: true })
45021
+ EntityID?: string;
45022
+
45023
+ @Field({ nullable: true })
45024
+ ComponentID?: string;
45025
+
45026
+ @Field({ nullable: true })
45027
+ Name?: string;
45028
+
45029
+ @Field({ nullable: true })
45030
+ Description: string | null;
45031
+
45032
+ @Field({ nullable: true })
45033
+ Scope?: string;
45034
+
45035
+ @Field({ nullable: true })
45036
+ UserID: string | null;
45037
+
45038
+ @Field({ nullable: true })
45039
+ RoleID: string | null;
45040
+
45041
+ @Field(() => Int, { nullable: true })
45042
+ Priority?: number;
45043
+
45044
+ @Field({ nullable: true })
45045
+ Status?: string;
45046
+
45047
+ @Field({ nullable: true })
45048
+ Notes: string | null;
45049
+
45050
+ @Field(() => RestoreContextInput, { nullable: true })
45051
+ RestoreContext___?: RestoreContextInput;
45052
+ }
45053
+
45054
+
45055
+ //****************************************************************************
45056
+ // INPUT TYPE for MJ: Entity Form Overrides
45057
+ //****************************************************************************
45058
+ @InputType()
45059
+ export class UpdateMJEntityFormOverrideInput {
45060
+ @Field()
45061
+ ID: string;
45062
+
45063
+ @Field({ nullable: true })
45064
+ EntityID?: string;
45065
+
45066
+ @Field({ nullable: true })
45067
+ ComponentID?: string;
45068
+
45069
+ @Field({ nullable: true })
45070
+ Name?: string;
45071
+
45072
+ @Field({ nullable: true })
45073
+ Description?: string | null;
45074
+
45075
+ @Field({ nullable: true })
45076
+ Scope?: string;
45077
+
45078
+ @Field({ nullable: true })
45079
+ UserID?: string | null;
45080
+
45081
+ @Field({ nullable: true })
45082
+ RoleID?: string | null;
45083
+
45084
+ @Field(() => Int, { nullable: true })
45085
+ Priority?: number;
45086
+
45087
+ @Field({ nullable: true })
45088
+ Status?: string;
45089
+
45090
+ @Field({ nullable: true })
45091
+ Notes?: string | null;
45092
+
45093
+ @Field(() => [KeyValuePairInput], { nullable: true })
45094
+ OldValues___?: KeyValuePairInput[];
45095
+
45096
+ @Field(() => RestoreContextInput, { nullable: true })
45097
+ RestoreContext___?: RestoreContextInput;
45098
+ }
45099
+
45100
+ //****************************************************************************
45101
+ // RESOLVER for MJ: Entity Form Overrides
45102
+ //****************************************************************************
45103
+ @ObjectType()
45104
+ export class RunMJEntityFormOverrideViewResult {
45105
+ @Field(() => [MJEntityFormOverride_])
45106
+ Results: MJEntityFormOverride_[];
45107
+
45108
+ @Field(() => String, {nullable: true})
45109
+ UserViewRunID?: string;
45110
+
45111
+ @Field(() => Int, {nullable: true})
45112
+ RowCount: number;
45113
+
45114
+ @Field(() => Int, {nullable: true})
45115
+ TotalRowCount: number;
45116
+
45117
+ @Field(() => Int, {nullable: true})
45118
+ ExecutionTime: number;
45119
+
45120
+ @Field({nullable: true})
45121
+ ErrorMessage?: string;
45122
+
45123
+ @Field(() => Boolean, {nullable: false})
45124
+ Success: boolean;
45125
+ }
45126
+
45127
+ @Resolver(MJEntityFormOverride_)
45128
+ export class MJEntityFormOverrideResolver extends ResolverBase {
45129
+ @Query(() => RunMJEntityFormOverrideViewResult)
45130
+ async RunMJEntityFormOverrideViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
45131
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
45132
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
45133
+ }
45134
+
45135
+ @Query(() => RunMJEntityFormOverrideViewResult)
45136
+ async RunMJEntityFormOverrideViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
45137
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
45138
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
45139
+ }
45140
+
45141
+ @Query(() => RunMJEntityFormOverrideViewResult)
45142
+ async RunMJEntityFormOverrideDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
45143
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
45144
+ input.EntityName = 'MJ: Entity Form Overrides';
45145
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
45146
+ }
45147
+ @Query(() => MJEntityFormOverride_, { nullable: true })
45148
+ async MJEntityFormOverride(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJEntityFormOverride_ | null> {
45149
+ this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
45150
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
45151
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
45152
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
45153
+ const result = await this.MapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
45154
+ return result;
45155
+ }
45156
+
45157
+ @Mutation(() => MJEntityFormOverride_)
45158
+ async CreateMJEntityFormOverride(
45159
+ @Arg('input', () => CreateMJEntityFormOverrideInput) input: CreateMJEntityFormOverrideInput,
45160
+ @Ctx() { providers, userPayload }: AppContext,
45161
+ @PubSub() pubSub: PubSubEngine
45162
+ ) {
45163
+ const provider = GetReadWriteProvider(providers);
45164
+ return this.CreateRecord('MJ: Entity Form Overrides', input, provider, userPayload, pubSub)
45165
+ }
45166
+
45167
+ @Mutation(() => MJEntityFormOverride_)
45168
+ async UpdateMJEntityFormOverride(
45169
+ @Arg('input', () => UpdateMJEntityFormOverrideInput) input: UpdateMJEntityFormOverrideInput,
45170
+ @Ctx() { providers, userPayload }: AppContext,
45171
+ @PubSub() pubSub: PubSubEngine
45172
+ ) {
45173
+ const provider = GetReadWriteProvider(providers);
45174
+ return this.UpdateRecord('MJ: Entity Form Overrides', input, provider, userPayload, pubSub);
45175
+ }
45176
+
45177
+ @Mutation(() => MJEntityFormOverride_)
45178
+ async DeleteMJEntityFormOverride(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
45179
+ const provider = GetReadWriteProvider(providers);
45180
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
45181
+ return this.DeleteRecord('MJ: Entity Form Overrides', key, options, provider, userPayload, pubSub);
45182
+ }
45183
+
45184
+ }
45185
+
44766
45186
  //****************************************************************************
44767
45187
  // ENTITY CLASS for MJ: Entity Organic Key Related Entities
44768
45188
  //****************************************************************************
@@ -49279,6 +49699,10 @@ export class MJIntegrationObjectField_ {
49279
49699
  @Field(() => Boolean, {description: `When true, this field was dynamically discovered by IntrospectSchema and is not defined in static connector metadata.`})
49280
49700
  IsCustom: boolean;
49281
49701
 
49702
+ @Field({description: `Provenance of this IntegrationObjectField row: Declared (from static research/docs), Discovered (from runtime API introspection), Custom (customer-defined custom field, e.g., HubSpot custom property on standard object). Drives merge precedence — discovered/runtime wins for type/constraints; declared wins for description/label/sequence/category.`})
49703
+ @MaxLength(20)
49704
+ MetadataSource: string;
49705
+
49282
49706
  @Field()
49283
49707
  @MaxLength(255)
49284
49708
  IntegrationObject: string;
@@ -49360,6 +49784,9 @@ export class CreateMJIntegrationObjectFieldInput {
49360
49784
  @Field(() => Boolean, { nullable: true })
49361
49785
  IsCustom?: boolean;
49362
49786
 
49787
+ @Field({ nullable: true })
49788
+ MetadataSource?: string;
49789
+
49363
49790
  @Field(() => RestoreContextInput, { nullable: true })
49364
49791
  RestoreContext___?: RestoreContextInput;
49365
49792
  }
@@ -49436,6 +49863,9 @@ export class UpdateMJIntegrationObjectFieldInput {
49436
49863
  @Field(() => Boolean, { nullable: true })
49437
49864
  IsCustom?: boolean;
49438
49865
 
49866
+ @Field({ nullable: true })
49867
+ MetadataSource?: string;
49868
+
49439
49869
  @Field(() => [KeyValuePairInput], { nullable: true })
49440
49870
  OldValues___?: KeyValuePairInput[];
49441
49871
 
@@ -49615,6 +50045,59 @@ export class MJIntegrationObject_ {
49615
50045
  @Field(() => Boolean, {description: `When true, this object was dynamically discovered by IntrospectSchema and is not defined in static connector metadata.`})
49616
50046
  IsCustom: boolean;
49617
50047
 
50048
+ @Field({nullable: true, description: `HTTP path template for create operations. Generic CRUD in BaseRESTIntegrationConnector substitutes parent IDs into {var} placeholders. NULL means create not supported via metadata-driven path.`})
50049
+ CreateAPIPath?: string;
50050
+
50051
+ @Field({nullable: true, description: `HTTP method for create (typically POST). NULL means create not supported via metadata-driven path.`})
50052
+ @MaxLength(20)
50053
+ CreateMethod?: string;
50054
+
50055
+ @Field({nullable: true, description: `Request body shape for create: flat (top-level fields), wrapped (under CreateBodyKey), or literal (connector overrides CreateRecord and supplies own body).`})
50056
+ @MaxLength(50)
50057
+ CreateBodyShape?: string;
50058
+
50059
+ @Field({nullable: true, description: `Wrapper key for create body when CreateBodyShape=wrapped. Example: 'member' for YourMembership which wraps body as {member:{...}}.`})
50060
+ @MaxLength(100)
50061
+ CreateBodyKey?: string;
50062
+
50063
+ @Field({nullable: true, description: `Where the created record ID is found in the create response: path (URL of returned Location header), body (parsed from JSON response), header (specific named header).`})
50064
+ @MaxLength(20)
50065
+ CreateIDLocation?: string;
50066
+
50067
+ @Field({nullable: true, description: `HTTP path template for update operations. Typically contains {ID} placeholder substituted with the record ExternalID at runtime.`})
50068
+ UpdateAPIPath?: string;
50069
+
50070
+ @Field({nullable: true, description: `HTTP method for update (typically PATCH or PUT).`})
50071
+ @MaxLength(20)
50072
+ UpdateMethod?: string;
50073
+
50074
+ @Field({nullable: true, description: `Request body shape for update: flat | wrapped | literal. See CreateBodyShape.`})
50075
+ @MaxLength(50)
50076
+ UpdateBodyShape?: string;
50077
+
50078
+ @Field({nullable: true, description: `Wrapper key for update body when UpdateBodyShape=wrapped.`})
50079
+ @MaxLength(100)
50080
+ UpdateBodyKey?: string;
50081
+
50082
+ @Field({nullable: true, description: `For update: where the target record ID is located in the request — typically 'path' (substituted into UpdateAPIPath URL template).`})
50083
+ @MaxLength(20)
50084
+ UpdateIDLocation?: string;
50085
+
50086
+ @Field({nullable: true, description: `HTTP path template for delete operations. Typically contains {ID} placeholder. NULL means delete not supported via metadata-driven path. (Existing DeleteMethod column carries the verb.)`})
50087
+ DeleteAPIPath?: string;
50088
+
50089
+ @Field({nullable: true, description: `For delete: where the target record ID is located — typically 'path'.`})
50090
+ @MaxLength(20)
50091
+ DeleteIDLocation?: string;
50092
+
50093
+ @Field({nullable: true, description: `Vendor field name marking "last changed" — drives incremental sync filter when SupportsIncrementalSync=1. The exact filter syntax (e.g., $filter=Modified gt {value} or modified_since={value}) lives in Configuration.incrementalFilterFormat. Provable-only: leave NULL if docs do not name a watermark field.`})
50094
+ @MaxLength(255)
50095
+ IncrementalWatermarkField?: string;
50096
+
50097
+ @Field({description: `Provenance of this IntegrationObject row: Declared (from static research/docs), Discovered (from runtime API introspection like Salesforce /describe), Custom (genuinely customer-created, e.g., HubSpot custom objects). Drives merge precedence in IntegrationSchemaSync.`})
50098
+ @MaxLength(20)
50099
+ MetadataSource: string;
50100
+
49618
50101
  @Field()
49619
50102
  @MaxLength(100)
49620
50103
  Integration: string;
@@ -49695,6 +50178,48 @@ export class CreateMJIntegrationObjectInput {
49695
50178
  @Field(() => Boolean, { nullable: true })
49696
50179
  IsCustom?: boolean;
49697
50180
 
50181
+ @Field({ nullable: true })
50182
+ CreateAPIPath: string | null;
50183
+
50184
+ @Field({ nullable: true })
50185
+ CreateMethod: string | null;
50186
+
50187
+ @Field({ nullable: true })
50188
+ CreateBodyShape: string | null;
50189
+
50190
+ @Field({ nullable: true })
50191
+ CreateBodyKey: string | null;
50192
+
50193
+ @Field({ nullable: true })
50194
+ CreateIDLocation: string | null;
50195
+
50196
+ @Field({ nullable: true })
50197
+ UpdateAPIPath: string | null;
50198
+
50199
+ @Field({ nullable: true })
50200
+ UpdateMethod: string | null;
50201
+
50202
+ @Field({ nullable: true })
50203
+ UpdateBodyShape: string | null;
50204
+
50205
+ @Field({ nullable: true })
50206
+ UpdateBodyKey: string | null;
50207
+
50208
+ @Field({ nullable: true })
50209
+ UpdateIDLocation: string | null;
50210
+
50211
+ @Field({ nullable: true })
50212
+ DeleteAPIPath: string | null;
50213
+
50214
+ @Field({ nullable: true })
50215
+ DeleteIDLocation: string | null;
50216
+
50217
+ @Field({ nullable: true })
50218
+ IncrementalWatermarkField: string | null;
50219
+
50220
+ @Field({ nullable: true })
50221
+ MetadataSource?: string;
50222
+
49698
50223
  @Field(() => RestoreContextInput, { nullable: true })
49699
50224
  RestoreContext___?: RestoreContextInput;
49700
50225
  }
@@ -49768,6 +50293,48 @@ export class UpdateMJIntegrationObjectInput {
49768
50293
  @Field(() => Boolean, { nullable: true })
49769
50294
  IsCustom?: boolean;
49770
50295
 
50296
+ @Field({ nullable: true })
50297
+ CreateAPIPath?: string | null;
50298
+
50299
+ @Field({ nullable: true })
50300
+ CreateMethod?: string | null;
50301
+
50302
+ @Field({ nullable: true })
50303
+ CreateBodyShape?: string | null;
50304
+
50305
+ @Field({ nullable: true })
50306
+ CreateBodyKey?: string | null;
50307
+
50308
+ @Field({ nullable: true })
50309
+ CreateIDLocation?: string | null;
50310
+
50311
+ @Field({ nullable: true })
50312
+ UpdateAPIPath?: string | null;
50313
+
50314
+ @Field({ nullable: true })
50315
+ UpdateMethod?: string | null;
50316
+
50317
+ @Field({ nullable: true })
50318
+ UpdateBodyShape?: string | null;
50319
+
50320
+ @Field({ nullable: true })
50321
+ UpdateBodyKey?: string | null;
50322
+
50323
+ @Field({ nullable: true })
50324
+ UpdateIDLocation?: string | null;
50325
+
50326
+ @Field({ nullable: true })
50327
+ DeleteAPIPath?: string | null;
50328
+
50329
+ @Field({ nullable: true })
50330
+ DeleteIDLocation?: string | null;
50331
+
50332
+ @Field({ nullable: true })
50333
+ IncrementalWatermarkField?: string | null;
50334
+
50335
+ @Field({ nullable: true })
50336
+ MetadataSource?: string;
50337
+
49771
50338
  @Field(() => [KeyValuePairInput], { nullable: true })
49772
50339
  OldValues___?: KeyValuePairInput[];
49773
50340
 
@@ -63767,6 +64334,9 @@ export class MJRole_ {
63767
64334
  @Field(() => [MJSearchScopePermission_])
63768
64335
  MJSearchScopePermissions_RoleIDArray: MJSearchScopePermission_[]; // Link to MJSearchScopePermissions
63769
64336
 
64337
+ @Field(() => [MJEntityFormOverride_])
64338
+ MJEntityFormOverrides_RoleIDArray: MJEntityFormOverride_[]; // Link to MJEntityFormOverrides
64339
+
63770
64340
  }
63771
64341
 
63772
64342
  //****************************************************************************
@@ -63998,6 +64568,16 @@ export class MJRoleResolver extends ResolverBase {
63998
64568
  return result;
63999
64569
  }
64000
64570
 
64571
+ @FieldResolver(() => [MJEntityFormOverride_])
64572
+ async MJEntityFormOverrides_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
64573
+ this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
64574
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
64575
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('RoleID')}='${mjrole_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
64576
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
64577
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
64578
+ return result;
64579
+ }
64580
+
64001
64581
  @Mutation(() => MJRole_)
64002
64582
  async CreateMJRole(
64003
64583
  @Arg('input', () => CreateMJRoleInput) input: CreateMJRoleInput,
@@ -65278,6 +65858,9 @@ export class MJScheduledJob_ {
65278
65858
  @Field()
65279
65859
  _mj__UpdatedAt: Date;
65280
65860
 
65861
+ @Field(() => Boolean, {description: `When true AND LastRunAt IS NULL, the scheduler sets NextRunAt to now() instead of the next cron tick on initialization, so the job runs on the next polling cycle. Useful for newly-seeded jobs that should not wait up to a full cron interval before their first execution.`})
65862
+ RunImmediatelyIfNeverRun: boolean;
65863
+
65281
65864
  @Field()
65282
65865
  @MaxLength(100)
65283
65866
  JobType: string;
@@ -65381,6 +65964,9 @@ export class CreateMJScheduledJobInput {
65381
65964
  @Field({ nullable: true })
65382
65965
  ConcurrencyMode?: string;
65383
65966
 
65967
+ @Field(() => Boolean, { nullable: true })
65968
+ RunImmediatelyIfNeverRun?: boolean;
65969
+
65384
65970
  @Field(() => RestoreContextInput, { nullable: true })
65385
65971
  RestoreContext___?: RestoreContextInput;
65386
65972
  }
@@ -65469,6 +66055,9 @@ export class UpdateMJScheduledJobInput {
65469
66055
  @Field({ nullable: true })
65470
66056
  ConcurrencyMode?: string;
65471
66057
 
66058
+ @Field(() => Boolean, { nullable: true })
66059
+ RunImmediatelyIfNeverRun?: boolean;
66060
+
65472
66061
  @Field(() => [KeyValuePairInput], { nullable: true })
65473
66062
  OldValues___?: KeyValuePairInput[];
65474
66063
 
@@ -69260,6 +69849,10 @@ export class MJTagSynonym_ {
69260
69849
  @Field()
69261
69850
  _mj__UpdatedAt: Date;
69262
69851
 
69852
+ @Field({description: `Approval state of the synonym. Active = resolves to its tag during classification. Pending = proposed (e.g. by the LLM or a bulk import) and awaiting human review; does not resolve until approved. Rejected = reviewed and declined; retained for audit and to suppress re-proposal.`})
69853
+ @MaxLength(20)
69854
+ Status: string;
69855
+
69263
69856
  @Field()
69264
69857
  @MaxLength(255)
69265
69858
  Tag: string;
@@ -69283,6 +69876,9 @@ export class CreateMJTagSynonymInput {
69283
69876
  @Field({ nullable: true })
69284
69877
  Source?: string;
69285
69878
 
69879
+ @Field({ nullable: true })
69880
+ Status?: string;
69881
+
69286
69882
  @Field(() => RestoreContextInput, { nullable: true })
69287
69883
  RestoreContext___?: RestoreContextInput;
69288
69884
  }
@@ -69305,6 +69901,9 @@ export class UpdateMJTagSynonymInput {
69305
69901
  @Field({ nullable: true })
69306
69902
  Source?: string;
69307
69903
 
69904
+ @Field({ nullable: true })
69905
+ Status?: string;
69906
+
69308
69907
  @Field(() => [KeyValuePairInput], { nullable: true })
69309
69908
  OldValues___?: KeyValuePairInput[];
69310
69909
 
@@ -77655,6 +78254,9 @@ export class MJUser_ {
77655
78254
  @Field(() => [MJList_])
77656
78255
  MJLists_LastRefreshedByUserIDArray: MJList_[]; // Link to MJLists
77657
78256
 
78257
+ @Field(() => [MJEntityFormOverride_])
78258
+ MJEntityFormOverrides_UserIDArray: MJEntityFormOverride_[]; // Link to MJEntityFormOverrides
78259
+
77658
78260
  }
77659
78261
 
77660
78262
  //****************************************************************************
@@ -78800,6 +79402,16 @@ export class MJUserResolverBase extends ResolverBase {
78800
79402
  return result;
78801
79403
  }
78802
79404
 
79405
+ @FieldResolver(() => [MJEntityFormOverride_])
79406
+ async MJEntityFormOverrides_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
79407
+ this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
79408
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
79409
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
79410
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
79411
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
79412
+ return result;
79413
+ }
79414
+
78803
79415
  @Mutation(() => MJUser_)
78804
79416
  async CreateMJUser(
78805
79417
  @Arg('input', () => CreateMJUserInput) input: CreateMJUserInput,