@memberjunction/server 5.45.0 → 5.46.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.
@@ -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, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentSkillEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSubAgentEntity, MJAISkillEntity, 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, MJClusterAnalysisEntity, MJClusterAnalysisClusterEntity, 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, MJConversationWidgetInstanceEntity, 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, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJScopedPromptPartEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, 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, MJUserRoutineRecipientEntity, MJUserRoutineRunEntity, MJUserRoutineEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, 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, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentSkillEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSubAgentEntity, MJAISkillEntity, 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, MJClusterAnalysisEntity, MJClusterAnalysisClusterEntity, 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, MJConversationWidgetInstanceEntity, 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, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJScopedPromptConfigEntity, MJScopedPromptPartEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, 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, MJUserRoutineRecipientEntity, MJUserRoutineRunEntity, MJUserRoutineEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
22
22
 
23
23
 
24
24
  //****************************************************************************
@@ -13865,6 +13865,9 @@ export class MJAIConfiguration_ {
13865
13865
  @Field(() => [MJAIConfiguration_])
13866
13866
  MJAIConfigurations_ParentIDArray: MJAIConfiguration_[]; // Link to MJAIConfigurations
13867
13867
 
13868
+ @Field(() => [MJScopedPromptConfig_])
13869
+ MJScopedPromptConfigs_ConfigurationIDArray: MJScopedPromptConfig_[]; // Link to MJScopedPromptConfigs
13870
+
13868
13871
  }
13869
13872
 
13870
13873
  //****************************************************************************
@@ -14086,6 +14089,16 @@ export class MJAIConfigurationResolver extends ResolverBase {
14086
14089
  return result;
14087
14090
  }
14088
14091
 
14092
+ @FieldResolver(() => [MJScopedPromptConfig_])
14093
+ async MJScopedPromptConfigs_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
14094
+ this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
14095
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
14096
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('ConfigurationID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
14097
+ const rows = await provider.ExecuteSQL(sSQL, [mjaiconfiguration_.ID], undefined, this.GetUserFromPayload(userPayload));
14098
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
14099
+ return result;
14100
+ }
14101
+
14089
14102
  @Mutation(() => MJAIConfiguration_)
14090
14103
  async CreateMJAIConfiguration(
14091
14104
  @Arg('input', () => CreateMJAIConfigurationInput) input: CreateMJAIConfigurationInput,
@@ -16533,6 +16546,9 @@ export class MJAIModel_ {
16533
16546
  @Field(() => [MJAIModel_])
16534
16547
  MJAIModels_PriorVersionIDArray: MJAIModel_[]; // Link to MJAIModels
16535
16548
 
16549
+ @Field(() => [MJScopedPromptConfig_])
16550
+ MJScopedPromptConfigs_ModelIDArray: MJScopedPromptConfig_[]; // Link to MJScopedPromptConfigs
16551
+
16536
16552
  }
16537
16553
 
16538
16554
  //****************************************************************************
@@ -16994,6 +17010,16 @@ export class MJAIModelResolver extends ResolverBase {
16994
17010
  return result;
16995
17011
  }
16996
17012
 
17013
+ @FieldResolver(() => [MJScopedPromptConfig_])
17014
+ async MJScopedPromptConfigs_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
17015
+ this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
17016
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
17017
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('ModelID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
17018
+ const rows = await provider.ExecuteSQL(sSQL, [mjaimodel_.ID], undefined, this.GetUserFromPayload(userPayload));
17019
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
17020
+ return result;
17021
+ }
17022
+
16997
17023
  @Mutation(() => MJAIModel_)
16998
17024
  async CreateMJAIModel(
16999
17025
  @Arg('input', () => CreateMJAIModelInput) input: CreateMJAIModelInput,
@@ -19296,6 +19322,9 @@ export class MJAIPrompt_ {
19296
19322
  @Field(() => [MJScopedPromptPart_])
19297
19323
  MJScopedPromptParts_PromptIDArray: MJScopedPromptPart_[]; // Link to MJScopedPromptParts
19298
19324
 
19325
+ @Field(() => [MJScopedPromptConfig_])
19326
+ MJScopedPromptConfigs_PromptIDArray: MJScopedPromptConfig_[]; // Link to MJScopedPromptConfigs
19327
+
19299
19328
  }
19300
19329
 
19301
19330
  //****************************************************************************
@@ -19859,6 +19888,16 @@ export class MJAIPromptResolver extends ResolverBase {
19859
19888
  return result;
19860
19889
  }
19861
19890
 
19891
+ @FieldResolver(() => [MJScopedPromptConfig_])
19892
+ async MJScopedPromptConfigs_PromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
19893
+ this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
19894
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
19895
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('PromptID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
19896
+ const rows = await provider.ExecuteSQL(sSQL, [mjaiprompt_.ID], undefined, this.GetUserFromPayload(userPayload));
19897
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
19898
+ return result;
19899
+ }
19900
+
19862
19901
  @Mutation(() => MJAIPrompt_)
19863
19902
  async CreateMJAIPrompt(
19864
19903
  @Arg('input', () => CreateMJAIPromptInput) input: CreateMJAIPromptInput,
@@ -21595,6 +21634,9 @@ export class MJAIVendor_ {
21595
21634
  @Field(() => [MJAIAgentRun_])
21596
21635
  MJAIAgentRuns_OverrideVendorIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
21597
21636
 
21637
+ @Field(() => [MJScopedPromptConfig_])
21638
+ MJScopedPromptConfigs_VendorIDArray: MJScopedPromptConfig_[]; // Link to MJScopedPromptConfigs
21639
+
21598
21640
  }
21599
21641
 
21600
21642
  //****************************************************************************
@@ -21780,6 +21822,16 @@ export class MJAIVendorResolver extends ResolverBase {
21780
21822
  return result;
21781
21823
  }
21782
21824
 
21825
+ @FieldResolver(() => [MJScopedPromptConfig_])
21826
+ async MJScopedPromptConfigs_VendorIDArray(@Root() mjaivendor_: MJAIVendor_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
21827
+ this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
21828
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
21829
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('VendorID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
21830
+ const rows = await provider.ExecuteSQL(sSQL, [mjaivendor_.ID], undefined, this.GetUserFromPayload(userPayload));
21831
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
21832
+ return result;
21833
+ }
21834
+
21783
21835
  @Mutation(() => MJAIVendor_)
21784
21836
  async CreateMJAIVendor(
21785
21837
  @Arg('input', () => CreateMJAIVendorInput) input: CreateMJAIVendorInput,
@@ -45673,6 +45725,9 @@ export class MJEntity_ {
45673
45725
  @Field(() => [MJScopedPromptPart_])
45674
45726
  MJScopedPromptParts_PrimaryScopeEntityIDArray: MJScopedPromptPart_[]; // Link to MJScopedPromptParts
45675
45727
 
45728
+ @Field(() => [MJScopedPromptConfig_])
45729
+ MJScopedPromptConfigs_PrimaryScopeEntityIDArray: MJScopedPromptConfig_[]; // Link to MJScopedPromptConfigs
45730
+
45676
45731
  }
45677
45732
 
45678
45733
  //****************************************************************************
@@ -46842,6 +46897,16 @@ export class MJEntityResolverBase extends ResolverBase {
46842
46897
  return result;
46843
46898
  }
46844
46899
 
46900
+ @FieldResolver(() => [MJScopedPromptConfig_])
46901
+ async MJScopedPromptConfigs_PrimaryScopeEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
46902
+ this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
46903
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
46904
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('PrimaryScopeEntityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
46905
+ const rows = await provider.ExecuteSQL(sSQL, [mjentity_.ID], undefined, this.GetUserFromPayload(userPayload));
46906
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
46907
+ return result;
46908
+ }
46909
+
46845
46910
  @Mutation(() => MJEntity_)
46846
46911
  async CreateMJEntity(
46847
46912
  @Arg('input', () => CreateMJEntityInput) input: CreateMJEntityInput,
@@ -78051,6 +78116,346 @@ export class MJSchemaInfoResolver extends ResolverBase {
78051
78116
 
78052
78117
  }
78053
78118
 
78119
+ //****************************************************************************
78120
+ // ENTITY CLASS for MJ: Scoped Prompt Configs
78121
+ //****************************************************************************
78122
+ @ObjectType({ description: `A scope-aware override of an AIPrompt\'s RUN SETTINGS (model/vendor, AI configuration, sampling knobs, response format, effort level). The run-settings sibling of ScopedPromptPart. Narrowed by a polymorphic scope (PrimaryScopeEntity/Record + SecondaryScopes). Resolved by a cached engine via a specificity cascade per PromptID — the most-specific in-scope row wins as a whole row (tie-broken by Priority); each non-null column overrides the prompt default, a NULL column inherits it. Runtime-explicit overrides on the agent run still win. Lets any MJ app tune model/generation behavior per scope by editing rows, not code.` })
78123
+ export class MJScopedPromptConfig_ {
78124
+ @Field()
78125
+ @MaxLength(36)
78126
+ ID: string;
78127
+
78128
+ @Field({description: `The AIPrompt whose run settings this row overrides.`})
78129
+ @MaxLength(36)
78130
+ PromptID: string;
78131
+
78132
+ @Field({nullable: true, description: `Optional human-readable note about this override (authoring aid; not sent to the model).`})
78133
+ Description?: string;
78134
+
78135
+ @Field({nullable: true})
78136
+ @MaxLength(36)
78137
+ PrimaryScopeEntityID?: string;
78138
+
78139
+ @Field({nullable: true, description: `The record ID within the primary scope entity that this override is scoped to. NULL = global (applies regardless of scope). When set with empty SecondaryScopes, the override is primary-scope-only (e.g. org-level).`})
78140
+ @MaxLength(100)
78141
+ PrimaryScopeRecordID?: string;
78142
+
78143
+ @Field({nullable: true, description: `JSON object of additional scope dimensions (e.g. {"ChannelID":"..."}). Empty/NULL with PrimaryScopeRecordID set = primary-scope-only; populated = fully-scoped. Matched (cascading or strict) against the run's SecondaryScopes.`})
78144
+ SecondaryScopes?: string;
78145
+
78146
+ @Field({description: `Lifecycle: Active (live), Provisional (staged; eligible but flaggable as not-yet-final), Archived (excluded from resolution). Only Active and Provisional are eligible for resolution.`})
78147
+ @MaxLength(20)
78148
+ Status: string;
78149
+
78150
+ @Field(() => Int, {description: `Precedence / tie-break for resolution. Higher wins when two rows tie on scope specificity. Default 0.`})
78151
+ Priority: number;
78152
+
78153
+ @Field({nullable: true, description: `Optional model override for this scope. NULL = use the prompt's own model selection. Applied as AIPromptParams.override.modelId.`})
78154
+ @MaxLength(36)
78155
+ ModelID?: string;
78156
+
78157
+ @Field({nullable: true, description: `Optional vendor override paired with ModelID (which inference provider serves the model). NULL = let MJ pick. Applied as AIPromptParams.override.vendorId.`})
78158
+ @MaxLength(36)
78159
+ VendorID?: string;
78160
+
78161
+ @Field({nullable: true, description: `Optional AI Configuration (environment) override for this scope. NULL = inherit. Applied as AIPromptParams.configurationId.`})
78162
+ @MaxLength(36)
78163
+ ConfigurationID?: string;
78164
+
78165
+ @Field(() => Float, {nullable: true, description: `Sampling temperature override. NULL = inherit the prompt default. Applied via AIPromptParams.additionalParameters.`})
78166
+ Temperature?: number;
78167
+
78168
+ @Field(() => Float, {nullable: true, description: `Nucleus-sampling (top-p) override. NULL = inherit. Applied via additionalParameters.`})
78169
+ TopP?: number;
78170
+
78171
+ @Field(() => Int, {nullable: true, description: `Top-k sampling override. NULL = inherit. Applied via additionalParameters.`})
78172
+ TopK?: number;
78173
+
78174
+ @Field(() => Float, {nullable: true, description: `Min-p sampling override. NULL = inherit. Applied via additionalParameters.`})
78175
+ MinP?: number;
78176
+
78177
+ @Field(() => Float, {nullable: true, description: `Frequency-penalty override. NULL = inherit. Applied via additionalParameters.`})
78178
+ FrequencyPenalty?: number;
78179
+
78180
+ @Field(() => Float, {nullable: true, description: `Presence-penalty override. NULL = inherit. Applied via additionalParameters.`})
78181
+ PresencePenalty?: number;
78182
+
78183
+ @Field(() => Int, {nullable: true, description: `Deterministic sampling seed override. NULL = inherit. Applied via additionalParameters.`})
78184
+ Seed?: number;
78185
+
78186
+ @Field({nullable: true, description: `Comma-delimited stop sequences override. NULL = inherit. Applied via additionalParameters.`})
78187
+ @MaxLength(1000)
78188
+ StopSequences?: string;
78189
+
78190
+ @Field({nullable: true, description: `Response-format override: Any, JSON, Markdown, ModelSpecific, or Text. NULL = inherit. Applied via additionalParameters.`})
78191
+ @MaxLength(20)
78192
+ ResponseFormat?: string;
78193
+
78194
+ @Field(() => Int, {nullable: true, description: `Reasoning/effort level override (1-100). NULL = inherit the prompt default. Applied as AIPromptParams.effortLevel.`})
78195
+ EffortLevel?: number;
78196
+
78197
+ @Field()
78198
+ _mj__CreatedAt: Date;
78199
+
78200
+ @Field()
78201
+ _mj__UpdatedAt: Date;
78202
+
78203
+ @Field()
78204
+ @MaxLength(255)
78205
+ Prompt: string;
78206
+
78207
+ @Field({nullable: true})
78208
+ @MaxLength(255)
78209
+ PrimaryScopeEntity?: string;
78210
+
78211
+ @Field({nullable: true})
78212
+ @MaxLength(50)
78213
+ Model?: string;
78214
+
78215
+ @Field({nullable: true})
78216
+ @MaxLength(50)
78217
+ Vendor?: string;
78218
+
78219
+ @Field({nullable: true})
78220
+ @MaxLength(100)
78221
+ Configuration?: string;
78222
+
78223
+ }
78224
+
78225
+ //****************************************************************************
78226
+ // INPUT TYPE for MJ: Scoped Prompt Configs
78227
+ //****************************************************************************
78228
+ @InputType()
78229
+ export class CreateMJScopedPromptConfigInput {
78230
+ @Field({ nullable: true })
78231
+ ID?: string;
78232
+
78233
+ @Field({ nullable: true })
78234
+ PromptID?: string;
78235
+
78236
+ @Field({ nullable: true })
78237
+ Description: string | null;
78238
+
78239
+ @Field({ nullable: true })
78240
+ PrimaryScopeEntityID: string | null;
78241
+
78242
+ @Field({ nullable: true })
78243
+ PrimaryScopeRecordID: string | null;
78244
+
78245
+ @Field({ nullable: true })
78246
+ SecondaryScopes: string | null;
78247
+
78248
+ @Field({ nullable: true })
78249
+ Status?: string;
78250
+
78251
+ @Field(() => Int, { nullable: true })
78252
+ Priority?: number;
78253
+
78254
+ @Field({ nullable: true })
78255
+ ModelID: string | null;
78256
+
78257
+ @Field({ nullable: true })
78258
+ VendorID: string | null;
78259
+
78260
+ @Field({ nullable: true })
78261
+ ConfigurationID: string | null;
78262
+
78263
+ @Field(() => Float, { nullable: true })
78264
+ Temperature: number | null;
78265
+
78266
+ @Field(() => Float, { nullable: true })
78267
+ TopP: number | null;
78268
+
78269
+ @Field(() => Int, { nullable: true })
78270
+ TopK: number | null;
78271
+
78272
+ @Field(() => Float, { nullable: true })
78273
+ MinP: number | null;
78274
+
78275
+ @Field(() => Float, { nullable: true })
78276
+ FrequencyPenalty: number | null;
78277
+
78278
+ @Field(() => Float, { nullable: true })
78279
+ PresencePenalty: number | null;
78280
+
78281
+ @Field(() => Int, { nullable: true })
78282
+ Seed: number | null;
78283
+
78284
+ @Field({ nullable: true })
78285
+ StopSequences: string | null;
78286
+
78287
+ @Field({ nullable: true })
78288
+ ResponseFormat: string | null;
78289
+
78290
+ @Field(() => Int, { nullable: true })
78291
+ EffortLevel: number | null;
78292
+
78293
+ @Field(() => RestoreContextInput, { nullable: true })
78294
+ RestoreContext___?: RestoreContextInput;
78295
+ }
78296
+
78297
+
78298
+ //****************************************************************************
78299
+ // INPUT TYPE for MJ: Scoped Prompt Configs
78300
+ //****************************************************************************
78301
+ @InputType()
78302
+ export class UpdateMJScopedPromptConfigInput {
78303
+ @Field()
78304
+ ID: string;
78305
+
78306
+ @Field({ nullable: true })
78307
+ PromptID?: string;
78308
+
78309
+ @Field({ nullable: true })
78310
+ Description?: string | null;
78311
+
78312
+ @Field({ nullable: true })
78313
+ PrimaryScopeEntityID?: string | null;
78314
+
78315
+ @Field({ nullable: true })
78316
+ PrimaryScopeRecordID?: string | null;
78317
+
78318
+ @Field({ nullable: true })
78319
+ SecondaryScopes?: string | null;
78320
+
78321
+ @Field({ nullable: true })
78322
+ Status?: string;
78323
+
78324
+ @Field(() => Int, { nullable: true })
78325
+ Priority?: number;
78326
+
78327
+ @Field({ nullable: true })
78328
+ ModelID?: string | null;
78329
+
78330
+ @Field({ nullable: true })
78331
+ VendorID?: string | null;
78332
+
78333
+ @Field({ nullable: true })
78334
+ ConfigurationID?: string | null;
78335
+
78336
+ @Field(() => Float, { nullable: true })
78337
+ Temperature?: number | null;
78338
+
78339
+ @Field(() => Float, { nullable: true })
78340
+ TopP?: number | null;
78341
+
78342
+ @Field(() => Int, { nullable: true })
78343
+ TopK?: number | null;
78344
+
78345
+ @Field(() => Float, { nullable: true })
78346
+ MinP?: number | null;
78347
+
78348
+ @Field(() => Float, { nullable: true })
78349
+ FrequencyPenalty?: number | null;
78350
+
78351
+ @Field(() => Float, { nullable: true })
78352
+ PresencePenalty?: number | null;
78353
+
78354
+ @Field(() => Int, { nullable: true })
78355
+ Seed?: number | null;
78356
+
78357
+ @Field({ nullable: true })
78358
+ StopSequences?: string | null;
78359
+
78360
+ @Field({ nullable: true })
78361
+ ResponseFormat?: string | null;
78362
+
78363
+ @Field(() => Int, { nullable: true })
78364
+ EffortLevel?: number | null;
78365
+
78366
+ @Field(() => [KeyValuePairInput], { nullable: true })
78367
+ OldValues___?: KeyValuePairInput[];
78368
+
78369
+ @Field(() => RestoreContextInput, { nullable: true })
78370
+ RestoreContext___?: RestoreContextInput;
78371
+ }
78372
+
78373
+ //****************************************************************************
78374
+ // RESOLVER for MJ: Scoped Prompt Configs
78375
+ //****************************************************************************
78376
+ @ObjectType()
78377
+ export class RunMJScopedPromptConfigViewResult {
78378
+ @Field(() => [MJScopedPromptConfig_])
78379
+ Results: MJScopedPromptConfig_[];
78380
+
78381
+ @Field(() => String, {nullable: true})
78382
+ UserViewRunID?: string;
78383
+
78384
+ @Field(() => Int, {nullable: true})
78385
+ RowCount: number;
78386
+
78387
+ @Field(() => Int, {nullable: true})
78388
+ TotalRowCount: number;
78389
+
78390
+ @Field(() => Int, {nullable: true})
78391
+ ExecutionTime: number;
78392
+
78393
+ @Field({nullable: true})
78394
+ ErrorMessage?: string;
78395
+
78396
+ @Field(() => Boolean, {nullable: false})
78397
+ Success: boolean;
78398
+ }
78399
+
78400
+ @Resolver(MJScopedPromptConfig_)
78401
+ export class MJScopedPromptConfigResolver extends ResolverBase {
78402
+ @Query(() => RunMJScopedPromptConfigViewResult)
78403
+ async RunMJScopedPromptConfigViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
78404
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
78405
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
78406
+ }
78407
+
78408
+ @Query(() => RunMJScopedPromptConfigViewResult)
78409
+ async RunMJScopedPromptConfigViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
78410
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
78411
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
78412
+ }
78413
+
78414
+ @Query(() => RunMJScopedPromptConfigViewResult)
78415
+ async RunMJScopedPromptConfigDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
78416
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
78417
+ input.EntityName = 'MJ: Scoped Prompt Configs';
78418
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
78419
+ }
78420
+ @Query(() => MJScopedPromptConfig_, { nullable: true })
78421
+ async MJScopedPromptConfig(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJScopedPromptConfig_ | null> {
78422
+ this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
78423
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
78424
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
78425
+ const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
78426
+ const result = await this.MapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
78427
+ return result;
78428
+ }
78429
+
78430
+ @Mutation(() => MJScopedPromptConfig_)
78431
+ async CreateMJScopedPromptConfig(
78432
+ @Arg('input', () => CreateMJScopedPromptConfigInput) input: CreateMJScopedPromptConfigInput,
78433
+ @Ctx() { providers, userPayload }: AppContext,
78434
+ @PubSub() pubSub: PubSubEngine
78435
+ ) {
78436
+ const provider = GetReadWriteProvider(providers);
78437
+ return this.CreateRecord('MJ: Scoped Prompt Configs', input, provider, userPayload, pubSub)
78438
+ }
78439
+
78440
+ @Mutation(() => MJScopedPromptConfig_)
78441
+ async UpdateMJScopedPromptConfig(
78442
+ @Arg('input', () => UpdateMJScopedPromptConfigInput) input: UpdateMJScopedPromptConfigInput,
78443
+ @Ctx() { providers, userPayload }: AppContext,
78444
+ @PubSub() pubSub: PubSubEngine
78445
+ ) {
78446
+ const provider = GetReadWriteProvider(providers);
78447
+ return this.UpdateRecord('MJ: Scoped Prompt Configs', input, provider, userPayload, pubSub);
78448
+ }
78449
+
78450
+ @Mutation(() => MJScopedPromptConfig_)
78451
+ async DeleteMJScopedPromptConfig(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
78452
+ const provider = GetReadWriteProvider(providers);
78453
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
78454
+ return this.DeleteRecord('MJ: Scoped Prompt Configs', key, options, provider, userPayload, pubSub);
78455
+ }
78456
+
78457
+ }
78458
+
78054
78459
  //****************************************************************************
78055
78460
  // ENTITY CLASS for MJ: Scoped Prompt Parts
78056
78461
  //****************************************************************************
@@ -137,8 +137,9 @@ export class RecordMergeDetailResult {
137
137
  @Field(() => Boolean)
138
138
  Success: boolean;
139
139
 
140
- @Field(() => Int, { nullable: true })
141
- RecordMergeDeletionLogID?: number;
140
+ // Record Merge Deletion Log IDs are uniqueidentifiers since the v2 GUID migration
141
+ @Field(() => String, { nullable: true })
142
+ RecordMergeDeletionLogID?: string;
142
143
 
143
144
  @Field(() => String, { nullable: true })
144
145
  Message?: string;
@@ -152,8 +153,10 @@ export class RecordMergeResult {
152
153
  @Field(() => String, { nullable: true })
153
154
  OverallStatus: string;
154
155
 
155
- @Field(() => Int, { nullable: true })
156
- RecordMergeLogID: number;
156
+ // Record Merge Log IDs are uniqueidentifiers since the v2 GUID migration —
157
+ // core's RecordMergeResult.RecordMergeLogID is string | null
158
+ @Field(() => String, { nullable: true })
159
+ RecordMergeLogID: string;
157
160
 
158
161
  @Field(() => [RecordMergeDetailResult])
159
162
  RecordStatus: RecordMergeDetailResult[];
@@ -176,7 +179,17 @@ export class RecordMergeResolver extends ResolverBase {
176
179
  try {
177
180
  const md = GetReadWriteProvider(providers);
178
181
  const options = {};
179
- const result = await md.MergeRecords(request, userPayload.userRecord, options);
182
+ // Rehydrate the GraphQL input's plain { KeyValuePairs } objects into CompositeKey
183
+ // class instances — the provider calls CompositeKey methods (.Values(), .GetValueByIndex())
184
+ // on them, so passing the raw input throws
185
+ // "request.SurvivingRecordCompositeKey.Values is not a function".
186
+ const mergeRequest = {
187
+ EntityName: request.EntityName,
188
+ SurvivingRecordCompositeKey: new CompositeKey(request.SurvivingRecordCompositeKey.KeyValuePairs),
189
+ RecordsToMerge: request.RecordsToMerge.map((k) => new CompositeKey(k.KeyValuePairs)),
190
+ ...(request.FieldMap ? { FieldMap: request.FieldMap.map((f) => ({ FieldName: f.FieldName, Value: f.Value })) } : {}),
191
+ };
192
+ const result = await md.MergeRecords(mergeRequest, userPayload.userRecord, options);
180
193
  return result;
181
194
  } catch (e) {
182
195
  LogError(e);
@@ -4,7 +4,7 @@ import { DatabaseProviderBase, LogError, LogStatus, Metadata, RunView, UserInfo,
4
4
  import { MJConversationDetailEntity, MJConversationDetailAttachmentEntity, MJConversationDetailArtifactEntity, MJArtifactVersionEntity, MJAIAgentRequestEntity, ArtifactMetadataEngine } from '@memberjunction/core-entities';
5
5
  import { RouteArtifact } from './artifact-routing.js';
6
6
  import { AgentRunner, ArtifactToolManager } from '@memberjunction/ai-agents';
7
- import { MJAIAgentEntityExtended, MJAIAgentRunEntityExtended, ExecuteAgentResult, ConversationUtility, AttachmentData } from '@memberjunction/ai-core-plus';
7
+ import { MJAIAgentEntityExtended, MJAIAgentRunEntityExtended, ExecuteAgentResult, ConversationUtility, AttachmentData, AgentExecutionStreamingCallback } from '@memberjunction/ai-core-plus';
8
8
  import { AIEngine } from '@memberjunction/aiengine';
9
9
  import { ChatMessage, ChatMessageContent } from '@memberjunction/ai';
10
10
  import { ResolverBase } from '../generic/ResolverBase.js';
@@ -78,6 +78,17 @@ export class AgentStreamingContent {
78
78
 
79
79
  @Field({ nullable: true })
80
80
  agentName?: string;
81
+
82
+ /**
83
+ * Content discriminator passed through from the agent's streaming chunk (see
84
+ * `AgentExecutionStreamingCallback` in @memberjunction/ai-core-plus).
85
+ * 'final-response' marks user-facing reply deltas the conversation client
86
+ * accumulates + renders into the message bubble; chunks without a kind are
87
+ * raw prompt output (e.g. a Loop agent's JSON turn envelope) and are not
88
+ * rendered by the conversation client.
89
+ */
90
+ @Field({ nullable: true })
91
+ kind?: string;
81
92
  }
82
93
 
83
94
  @ObjectType()
@@ -322,8 +333,8 @@ export class RunAIAgentResolver extends ResolverBase {
322
333
  /**
323
334
  * Create streaming content callback
324
335
  */
325
- private createStreamingCallback(pubSub: PubSubEngine, sessionId: string, userPayload: UserPayload, agentRunRef: { current: any }) {
326
- return (chunk: any) => {
336
+ private createStreamingCallback(pubSub: PubSubEngine, sessionId: string, userPayload: UserPayload, agentRunRef: { current: MJAIAgentRunEntityExtended | null }): AgentExecutionStreamingCallback {
337
+ return (chunk) => {
327
338
  // Use the agent run from the ref
328
339
  const agentRun = agentRunRef.current;
329
340
  if (!agentRun) {
@@ -341,7 +352,8 @@ export class RunAIAgentResolver extends ResolverBase {
341
352
  content: chunk.content,
342
353
  isPartial: !chunk.isComplete,
343
354
  stepName: chunk.stepType,
344
- agentName: chunk.modelName
355
+ agentName: chunk.modelName,
356
+ kind: chunk.kind
345
357
  },
346
358
  timestamp: new Date()
347
359
  };