@memberjunction/server 5.30.0 → 5.31.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 (104) hide show
  1. package/dist/agents/skip-sdk.d.ts +17 -1
  2. package/dist/agents/skip-sdk.d.ts.map +1 -1
  3. package/dist/agents/skip-sdk.js +18 -5
  4. package/dist/agents/skip-sdk.js.map +1 -1
  5. package/dist/auth/exampleNewUserSubClass.js +1 -1
  6. package/dist/auth/exampleNewUserSubClass.js.map +1 -1
  7. package/dist/auth/index.js +2 -2
  8. package/dist/auth/index.js.map +1 -1
  9. package/dist/auth/newUsers.js +2 -2
  10. package/dist/auth/newUsers.js.map +1 -1
  11. package/dist/context.js +3 -3
  12. package/dist/context.js.map +1 -1
  13. package/dist/generated/generated.d.ts +218 -8
  14. package/dist/generated/generated.d.ts.map +1 -1
  15. package/dist/generated/generated.js +1267 -52
  16. package/dist/generated/generated.js.map +1 -1
  17. package/dist/generic/ResolverBase.d.ts +5 -5
  18. package/dist/generic/ResolverBase.d.ts.map +1 -1
  19. package/dist/generic/ResolverBase.js +21 -18
  20. package/dist/generic/ResolverBase.js.map +1 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +9 -8
  24. package/dist/index.js.map +1 -1
  25. package/dist/multiTenancy/index.js +1 -1
  26. package/dist/multiTenancy/index.js.map +1 -1
  27. package/dist/resolvers/APIKeyResolver.d.ts.map +1 -1
  28. package/dist/resolvers/APIKeyResolver.js +5 -3
  29. package/dist/resolvers/APIKeyResolver.js.map +1 -1
  30. package/dist/resolvers/AutotagPipelineResolver.d.ts +3 -3
  31. package/dist/resolvers/AutotagPipelineResolver.d.ts.map +1 -1
  32. package/dist/resolvers/AutotagPipelineResolver.js +18 -12
  33. package/dist/resolvers/AutotagPipelineResolver.js.map +1 -1
  34. package/dist/resolvers/ComponentRegistryResolver.d.ts +1 -1
  35. package/dist/resolvers/ComponentRegistryResolver.d.ts.map +1 -1
  36. package/dist/resolvers/ComponentRegistryResolver.js +6 -4
  37. package/dist/resolvers/ComponentRegistryResolver.js.map +1 -1
  38. package/dist/resolvers/FileResolver.js +2 -2
  39. package/dist/resolvers/FileResolver.js.map +1 -1
  40. package/dist/resolvers/GetDataContextDataResolver.d.ts.map +1 -1
  41. package/dist/resolvers/GetDataContextDataResolver.js +1 -2
  42. package/dist/resolvers/GetDataContextDataResolver.js.map +1 -1
  43. package/dist/resolvers/ISAEntityResolver.d.ts.map +1 -1
  44. package/dist/resolvers/ISAEntityResolver.js +2 -5
  45. package/dist/resolvers/ISAEntityResolver.js.map +1 -1
  46. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
  47. package/dist/resolvers/IntegrationDiscoveryResolver.js +75 -66
  48. package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
  49. package/dist/resolvers/SyncDataResolver.d.ts +4 -4
  50. package/dist/resolvers/SyncDataResolver.d.ts.map +1 -1
  51. package/dist/resolvers/SyncDataResolver.js +9 -8
  52. package/dist/resolvers/SyncDataResolver.js.map +1 -1
  53. package/dist/resolvers/SyncRolesUsersResolver.d.ts +6 -6
  54. package/dist/resolvers/SyncRolesUsersResolver.d.ts.map +1 -1
  55. package/dist/resolvers/SyncRolesUsersResolver.js +22 -18
  56. package/dist/resolvers/SyncRolesUsersResolver.js.map +1 -1
  57. package/dist/resolvers/TagGovernanceResolver.d.ts +43 -0
  58. package/dist/resolvers/TagGovernanceResolver.d.ts.map +1 -0
  59. package/dist/resolvers/TagGovernanceResolver.js +245 -0
  60. package/dist/resolvers/TagGovernanceResolver.js.map +1 -0
  61. package/dist/resolvers/TaskResolver.d.ts +1 -1
  62. package/dist/resolvers/TaskResolver.d.ts.map +1 -1
  63. package/dist/resolvers/TaskResolver.js +4 -2
  64. package/dist/resolvers/TaskResolver.js.map +1 -1
  65. package/dist/resolvers/TransactionGroupResolver.d.ts.map +1 -1
  66. package/dist/resolvers/TransactionGroupResolver.js +2 -1
  67. package/dist/resolvers/TransactionGroupResolver.js.map +1 -1
  68. package/dist/rest/EntityCRUDHandler.js +4 -4
  69. package/dist/rest/EntityCRUDHandler.js.map +1 -1
  70. package/dist/rest/RESTEndpointHandler.js +9 -9
  71. package/dist/rest/RESTEndpointHandler.js.map +1 -1
  72. package/dist/rest/ViewOperationsHandler.js +4 -4
  73. package/dist/rest/ViewOperationsHandler.js.map +1 -1
  74. package/dist/services/TaskOrchestrator.d.ts +4 -2
  75. package/dist/services/TaskOrchestrator.d.ts.map +1 -1
  76. package/dist/services/TaskOrchestrator.js +16 -12
  77. package/dist/services/TaskOrchestrator.js.map +1 -1
  78. package/package.json +68 -66
  79. package/src/__tests__/TagGovernanceResolver.test.ts +255 -0
  80. package/src/agents/skip-sdk.ts +30 -7
  81. package/src/auth/exampleNewUserSubClass.ts +1 -1
  82. package/src/auth/index.ts +2 -2
  83. package/src/auth/newUsers.ts +2 -2
  84. package/src/context.ts +3 -3
  85. package/src/generated/generated.ts +872 -41
  86. package/src/generic/ResolverBase.ts +28 -21
  87. package/src/index.ts +9 -9
  88. package/src/multiTenancy/index.ts +1 -1
  89. package/src/resolvers/APIKeyResolver.ts +7 -4
  90. package/src/resolvers/AutotagPipelineResolver.ts +20 -11
  91. package/src/resolvers/ComponentRegistryResolver.ts +8 -5
  92. package/src/resolvers/FileResolver.ts +2 -2
  93. package/src/resolvers/GetDataContextDataResolver.ts +1 -2
  94. package/src/resolvers/ISAEntityResolver.ts +3 -5
  95. package/src/resolvers/IntegrationDiscoveryResolver.ts +83 -66
  96. package/src/resolvers/SyncDataResolver.ts +12 -11
  97. package/src/resolvers/SyncRolesUsersResolver.ts +23 -19
  98. package/src/resolvers/TagGovernanceResolver.ts +189 -0
  99. package/src/resolvers/TaskResolver.ts +5 -3
  100. package/src/resolvers/TransactionGroupResolver.ts +3 -2
  101. package/src/rest/EntityCRUDHandler.ts +4 -4
  102. package/src/rest/RESTEndpointHandler.ts +9 -9
  103. package/src/rest/ViewOperationsHandler.ts +4 -4
  104. package/src/services/TaskOrchestrator.ts +18 -13
@@ -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, 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, MJSearchProviderEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, 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, 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, MJSearchProviderEntity, 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
  //****************************************************************************
@@ -13386,6 +13386,9 @@ export class MJAIModel_ {
13386
13386
  @Field(() => [MJAIPromptRun_])
13387
13387
  MJAIPromptRuns_ModelIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
13388
13388
 
13389
+ @Field(() => [MJTag_])
13390
+ MJTags_EmbeddingModelIDArray: MJTag_[]; // Link to MJTags
13391
+
13389
13392
  @Field(() => [MJAIModel_])
13390
13393
  MJAIModels_PriorVersionIDArray: MJAIModel_[]; // Link to MJAIModels
13391
13394
 
@@ -13830,6 +13833,16 @@ export class MJAIModelResolver extends ResolverBase {
13830
13833
  return result;
13831
13834
  }
13832
13835
 
13836
+ @FieldResolver(() => [MJTag_])
13837
+ async MJTags_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
13838
+ this.CheckUserReadPermissions('MJ: Tags', userPayload);
13839
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
13840
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTags')} WHERE ${provider.QuoteIdentifier('EmbeddingModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tags', userPayload, EntityPermissionType.Read, 'AND');
13841
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
13842
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tags', rows, this.GetUserFromPayload(userPayload));
13843
+ return result;
13844
+ }
13845
+
13833
13846
  @FieldResolver(() => [MJAIModel_])
13834
13847
  async MJAIModels_PriorVersionIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
13835
13848
  this.CheckUserReadPermissions('MJ: AI Models', userPayload);
@@ -25366,12 +25379,12 @@ export class MJCompanyIntegrationEntityMap_ {
25366
25379
  @MaxLength(255)
25367
25380
  Entity: string;
25368
25381
 
25369
- @Field(() => [MJCompanyIntegrationFieldMap_])
25370
- MJCompanyIntegrationFieldMaps_EntityMapIDArray: MJCompanyIntegrationFieldMap_[]; // Link to MJCompanyIntegrationFieldMaps
25371
-
25372
25382
  @Field(() => [MJCompanyIntegrationSyncWatermark_])
25373
25383
  MJCompanyIntegrationSyncWatermarks_EntityMapIDArray: MJCompanyIntegrationSyncWatermark_[]; // Link to MJCompanyIntegrationSyncWatermarks
25374
25384
 
25385
+ @Field(() => [MJCompanyIntegrationFieldMap_])
25386
+ MJCompanyIntegrationFieldMaps_EntityMapIDArray: MJCompanyIntegrationFieldMap_[]; // Link to MJCompanyIntegrationFieldMaps
25387
+
25375
25388
  }
25376
25389
 
25377
25390
  //****************************************************************************
@@ -25531,16 +25544,6 @@ export class MJCompanyIntegrationEntityMapResolver extends ResolverBase {
25531
25544
  return result;
25532
25545
  }
25533
25546
 
25534
- @FieldResolver(() => [MJCompanyIntegrationFieldMap_])
25535
- async MJCompanyIntegrationFieldMaps_EntityMapIDArray(@Root() mjcompanyintegrationentitymap_: MJCompanyIntegrationEntityMap_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
25536
- this.CheckUserReadPermissions('MJ: Company Integration Field Maps', userPayload);
25537
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
25538
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrationFieldMaps')} WHERE ${provider.QuoteIdentifier('EntityMapID')}='${mjcompanyintegrationentitymap_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integration Field Maps', userPayload, EntityPermissionType.Read, 'AND');
25539
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
25540
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integration Field Maps', rows, this.GetUserFromPayload(userPayload));
25541
- return result;
25542
- }
25543
-
25544
25547
  @FieldResolver(() => [MJCompanyIntegrationSyncWatermark_])
25545
25548
  async MJCompanyIntegrationSyncWatermarks_EntityMapIDArray(@Root() mjcompanyintegrationentitymap_: MJCompanyIntegrationEntityMap_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
25546
25549
  this.CheckUserReadPermissions('MJ: Company Integration Sync Watermarks', userPayload);
@@ -25551,6 +25554,16 @@ export class MJCompanyIntegrationEntityMapResolver extends ResolverBase {
25551
25554
  return result;
25552
25555
  }
25553
25556
 
25557
+ @FieldResolver(() => [MJCompanyIntegrationFieldMap_])
25558
+ async MJCompanyIntegrationFieldMaps_EntityMapIDArray(@Root() mjcompanyintegrationentitymap_: MJCompanyIntegrationEntityMap_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
25559
+ this.CheckUserReadPermissions('MJ: Company Integration Field Maps', userPayload);
25560
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
25561
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrationFieldMaps')} WHERE ${provider.QuoteIdentifier('EntityMapID')}='${mjcompanyintegrationentitymap_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integration Field Maps', userPayload, EntityPermissionType.Read, 'AND');
25562
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
25563
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integration Field Maps', rows, this.GetUserFromPayload(userPayload));
25564
+ return result;
25565
+ }
25566
+
25554
25567
  @Mutation(() => MJCompanyIntegrationEntityMap_)
25555
25568
  async CreateMJCompanyIntegrationEntityMap(
25556
25569
  @Arg('input', () => CreateMJCompanyIntegrationEntityMapInput) input: CreateMJCompanyIntegrationEntityMapInput,
@@ -29417,6 +29430,9 @@ export class MJContentItem_ {
29417
29430
  @Field(() => [MJContentItemDuplicate_])
29418
29431
  MJContentItemDuplicates_ContentItemBIDArray: MJContentItemDuplicate_[]; // Link to MJContentItemDuplicates
29419
29432
 
29433
+ @Field(() => [MJTagSuggestion_])
29434
+ MJTagSuggestions_SourceContentItemIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
29435
+
29420
29436
  }
29421
29437
 
29422
29438
  //****************************************************************************
@@ -29634,6 +29650,16 @@ export class MJContentItemResolver extends ResolverBase {
29634
29650
  return result;
29635
29651
  }
29636
29652
 
29653
+ @FieldResolver(() => [MJTagSuggestion_])
29654
+ async MJTagSuggestions_SourceContentItemIDArray(@Root() mjcontentitem_: MJContentItem_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
29655
+ this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
29656
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29657
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagSuggestions')} WHERE ${provider.QuoteIdentifier('SourceContentItemID')}='${mjcontentitem_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Suggestions', userPayload, EntityPermissionType.Read, 'AND');
29658
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29659
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
29660
+ return result;
29661
+ }
29662
+
29637
29663
  @Mutation(() => MJContentItem_)
29638
29664
  async CreateMJContentItem(
29639
29665
  @Arg('input', () => CreateMJContentItemInput) input: CreateMJContentItemInput,
@@ -31030,6 +31056,9 @@ export class MJContentSource_ {
31030
31056
  @Field(() => [MJContentProcessRunDetail_])
31031
31057
  MJContentProcessRunDetails_ContentSourceIDArray: MJContentProcessRunDetail_[]; // Link to MJContentProcessRunDetails
31032
31058
 
31059
+ @Field(() => [MJTagSuggestion_])
31060
+ MJTagSuggestions_SourceContentSourceIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
31061
+
31033
31062
  }
31034
31063
 
31035
31064
  //****************************************************************************
@@ -31223,6 +31252,16 @@ export class MJContentSourceResolver extends ResolverBase {
31223
31252
  return result;
31224
31253
  }
31225
31254
 
31255
+ @FieldResolver(() => [MJTagSuggestion_])
31256
+ async MJTagSuggestions_SourceContentSourceIDArray(@Root() mjcontentsource_: MJContentSource_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
31257
+ this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
31258
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
31259
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagSuggestions')} WHERE ${provider.QuoteIdentifier('SourceContentSourceID')}='${mjcontentsource_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Suggestions', userPayload, EntityPermissionType.Read, 'AND');
31260
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
31261
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
31262
+ return result;
31263
+ }
31264
+
31226
31265
  @Mutation(() => MJContentSource_)
31227
31266
  async CreateMJContentSource(
31228
31267
  @Arg('input', () => CreateMJContentSourceInput) input: CreateMJContentSourceInput,
@@ -39982,6 +40021,9 @@ export class MJEntity_ {
39982
40021
  @Field(() => [MJRecordGeoCode_])
39983
40022
  MJRecordGeoCodes_EntityIDArray: MJRecordGeoCode_[]; // Link to MJRecordGeoCodes
39984
40023
 
40024
+ @Field(() => [MJTagScope_])
40025
+ MJTagScopes_ScopeEntityIDArray: MJTagScope_[]; // Link to MJTagScopes
40026
+
39985
40027
  @Field(() => [MJGeneratedCode_])
39986
40028
  MJGeneratedCodes_LinkedEntityIDArray: MJGeneratedCode_[]; // Link to MJGeneratedCodes
39987
40029
 
@@ -40939,6 +40981,16 @@ export class MJEntityResolverBase extends ResolverBase {
40939
40981
  return result;
40940
40982
  }
40941
40983
 
40984
+ @FieldResolver(() => [MJTagScope_])
40985
+ async MJTagScopes_ScopeEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
40986
+ this.CheckUserReadPermissions('MJ: Tag Scopes', userPayload);
40987
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40988
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagScopes')} WHERE ${provider.QuoteIdentifier('ScopeEntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Scopes', userPayload, EntityPermissionType.Read, 'AND');
40989
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
40990
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Scopes', rows, this.GetUserFromPayload(userPayload));
40991
+ return result;
40992
+ }
40993
+
40942
40994
  @FieldResolver(() => [MJGeneratedCode_])
40943
40995
  async MJGeneratedCodes_LinkedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
40944
40996
  this.CheckUserReadPermissions('MJ: Generated Codes', userPayload);
@@ -66518,6 +66570,621 @@ export class MJTagCoOccurrenceResolver extends ResolverBase {
66518
66570
 
66519
66571
  }
66520
66572
 
66573
+ //****************************************************************************
66574
+ // ENTITY CLASS for MJ: Tag Scopes
66575
+ //****************************************************************************
66576
+ @ObjectType({ description: `Polymorphic junction binding a Tag to one or more (Entity, Record) scope rows. A Tag with one or more TagScope rows is only visible inside those scopes; a Tag with no rows AND IsGlobal=1 is visible everywhere. Mirrors the shape of TaggedItem.` })
66577
+ export class MJTagScope_ {
66578
+ @Field()
66579
+ @MaxLength(36)
66580
+ ID: string;
66581
+
66582
+ @Field({description: `The Tag whose visibility this row constrains.`})
66583
+ @MaxLength(36)
66584
+ TagID: string;
66585
+
66586
+ @Field({description: `Entity that the scope record belongs to (e.g., Companies, AI Agents). Combined with ScopeRecordID identifies the specific tenant or context that may see the tag.`})
66587
+ @MaxLength(36)
66588
+ ScopeEntityID: string;
66589
+
66590
+ @Field({description: `Primary key value of the scope record. Stored as NVARCHAR(450) to match the polymorphic RecordID convention used by TaggedItem.`})
66591
+ @MaxLength(450)
66592
+ ScopeRecordID: string;
66593
+
66594
+ @Field()
66595
+ _mj__CreatedAt: Date;
66596
+
66597
+ @Field()
66598
+ _mj__UpdatedAt: Date;
66599
+
66600
+ @Field()
66601
+ @MaxLength(255)
66602
+ Tag: string;
66603
+
66604
+ @Field()
66605
+ @MaxLength(255)
66606
+ ScopeEntity: string;
66607
+
66608
+ }
66609
+
66610
+ //****************************************************************************
66611
+ // INPUT TYPE for MJ: Tag Scopes
66612
+ //****************************************************************************
66613
+ @InputType()
66614
+ export class CreateMJTagScopeInput {
66615
+ @Field({ nullable: true })
66616
+ ID?: string;
66617
+
66618
+ @Field({ nullable: true })
66619
+ TagID?: string;
66620
+
66621
+ @Field({ nullable: true })
66622
+ ScopeEntityID?: string;
66623
+
66624
+ @Field({ nullable: true })
66625
+ ScopeRecordID?: string;
66626
+
66627
+ @Field(() => RestoreContextInput, { nullable: true })
66628
+ RestoreContext___?: RestoreContextInput;
66629
+ }
66630
+
66631
+
66632
+ //****************************************************************************
66633
+ // INPUT TYPE for MJ: Tag Scopes
66634
+ //****************************************************************************
66635
+ @InputType()
66636
+ export class UpdateMJTagScopeInput {
66637
+ @Field()
66638
+ ID: string;
66639
+
66640
+ @Field({ nullable: true })
66641
+ TagID?: string;
66642
+
66643
+ @Field({ nullable: true })
66644
+ ScopeEntityID?: string;
66645
+
66646
+ @Field({ nullable: true })
66647
+ ScopeRecordID?: string;
66648
+
66649
+ @Field(() => [KeyValuePairInput], { nullable: true })
66650
+ OldValues___?: KeyValuePairInput[];
66651
+
66652
+ @Field(() => RestoreContextInput, { nullable: true })
66653
+ RestoreContext___?: RestoreContextInput;
66654
+ }
66655
+
66656
+ //****************************************************************************
66657
+ // RESOLVER for MJ: Tag Scopes
66658
+ //****************************************************************************
66659
+ @ObjectType()
66660
+ export class RunMJTagScopeViewResult {
66661
+ @Field(() => [MJTagScope_])
66662
+ Results: MJTagScope_[];
66663
+
66664
+ @Field(() => String, {nullable: true})
66665
+ UserViewRunID?: string;
66666
+
66667
+ @Field(() => Int, {nullable: true})
66668
+ RowCount: number;
66669
+
66670
+ @Field(() => Int, {nullable: true})
66671
+ TotalRowCount: number;
66672
+
66673
+ @Field(() => Int, {nullable: true})
66674
+ ExecutionTime: number;
66675
+
66676
+ @Field({nullable: true})
66677
+ ErrorMessage?: string;
66678
+
66679
+ @Field(() => Boolean, {nullable: false})
66680
+ Success: boolean;
66681
+ }
66682
+
66683
+ @Resolver(MJTagScope_)
66684
+ export class MJTagScopeResolver extends ResolverBase {
66685
+ @Query(() => RunMJTagScopeViewResult)
66686
+ async RunMJTagScopeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
66687
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66688
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
66689
+ }
66690
+
66691
+ @Query(() => RunMJTagScopeViewResult)
66692
+ async RunMJTagScopeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
66693
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66694
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
66695
+ }
66696
+
66697
+ @Query(() => RunMJTagScopeViewResult)
66698
+ async RunMJTagScopeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
66699
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66700
+ input.EntityName = 'MJ: Tag Scopes';
66701
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
66702
+ }
66703
+ @Query(() => MJTagScope_, { nullable: true })
66704
+ async MJTagScope(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTagScope_ | null> {
66705
+ this.CheckUserReadPermissions('MJ: Tag Scopes', userPayload);
66706
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66707
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagScopes')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Scopes', userPayload, EntityPermissionType.Read, 'AND');
66708
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
66709
+ const result = await this.MapFieldNamesToCodeNames('MJ: Tag Scopes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
66710
+ return result;
66711
+ }
66712
+
66713
+ @Mutation(() => MJTagScope_)
66714
+ async CreateMJTagScope(
66715
+ @Arg('input', () => CreateMJTagScopeInput) input: CreateMJTagScopeInput,
66716
+ @Ctx() { providers, userPayload }: AppContext,
66717
+ @PubSub() pubSub: PubSubEngine
66718
+ ) {
66719
+ const provider = GetReadWriteProvider(providers);
66720
+ return this.CreateRecord('MJ: Tag Scopes', input, provider, userPayload, pubSub)
66721
+ }
66722
+
66723
+ @Mutation(() => MJTagScope_)
66724
+ async UpdateMJTagScope(
66725
+ @Arg('input', () => UpdateMJTagScopeInput) input: UpdateMJTagScopeInput,
66726
+ @Ctx() { providers, userPayload }: AppContext,
66727
+ @PubSub() pubSub: PubSubEngine
66728
+ ) {
66729
+ const provider = GetReadWriteProvider(providers);
66730
+ return this.UpdateRecord('MJ: Tag Scopes', input, provider, userPayload, pubSub);
66731
+ }
66732
+
66733
+ @Mutation(() => MJTagScope_)
66734
+ async DeleteMJTagScope(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
66735
+ const provider = GetReadWriteProvider(providers);
66736
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
66737
+ return this.DeleteRecord('MJ: Tag Scopes', key, options, provider, userPayload, pubSub);
66738
+ }
66739
+
66740
+ }
66741
+
66742
+ //****************************************************************************
66743
+ // ENTITY CLASS for MJ: Tag Suggestions
66744
+ //****************************************************************************
66745
+ @ObjectType({ description: `Human-in-the-loop review queue for tag changes the autotagger could not commit autonomously: ambiguous matches, governance-blocked auto-grows, low-usage deprecation candidates, and merge candidates from co-occurrence analysis.` })
66746
+ export class MJTagSuggestion_ {
66747
+ @Field()
66748
+ @MaxLength(36)
66749
+ ID: string;
66750
+
66751
+ @Field({description: `The proposed tag name as seen by the classifier or analyzer.`})
66752
+ @MaxLength(255)
66753
+ ProposedName: string;
66754
+
66755
+ @Field({nullable: true, description: `Tag under which the suggestion would be created if approved as a new tag. NULL = root.`})
66756
+ @MaxLength(36)
66757
+ ProposedParentID?: string;
66758
+
66759
+ @Field({nullable: true, description: `When non-null, the existing Tag the system believes is the closest match. The reviewer may accept this as a merge target instead of creating a new tag.`})
66760
+ @MaxLength(36)
66761
+ BestMatchTagID?: string;
66762
+
66763
+ @Field(() => Float, {nullable: true, description: `Cosine similarity score (0.000-1.000) between the proposed name embedding and BestMatchTagID's embedding, when applicable.`})
66764
+ BestMatchScore?: number;
66765
+
66766
+ @Field({description: `Why this suggestion was created. Free-form NVARCHAR for forward compatibility; conventional values include ConstrainedMode, BelowThreshold, ParentFrozen, AutoGrowDisabled, MaxChildrenExceeded, MaxDepthExceeded, BelowMinWeight, RequiresReview, MergeCandidate, LowUsage, WideNode.`})
66767
+ @MaxLength(50)
66768
+ Reason: string;
66769
+
66770
+ @Field({nullable: true, description: `ContentItem that triggered this suggestion, when item-level. NULL for taxonomy-level suggestions (merge candidates, low-usage alerts).`})
66771
+ @MaxLength(36)
66772
+ SourceContentItemID?: string;
66773
+
66774
+ @Field({nullable: true, description: `ContentSource that triggered this suggestion, when source-attributable.`})
66775
+ @MaxLength(36)
66776
+ SourceContentSourceID?: string;
66777
+
66778
+ @Field({nullable: true, description: `Optional snippet of source text that prompted the suggestion. Useful for reviewer context.`})
66779
+ SourceText?: string;
66780
+
66781
+ @Field({description: `Pending = awaiting review; Approved = accepted as a new tag; Merged = accepted as a merge into BestMatchTagID; Rejected = dismissed.`})
66782
+ @MaxLength(20)
66783
+ Status: string;
66784
+
66785
+ @Field({nullable: true, description: `When Approved or Merged, points to the resulting Tag (the new tag for Approved, the merge target for Merged).`})
66786
+ @MaxLength(36)
66787
+ ResolvedTagID?: string;
66788
+
66789
+ @Field({nullable: true, description: `User who took action on this suggestion.`})
66790
+ @MaxLength(36)
66791
+ ReviewedByUserID?: string;
66792
+
66793
+ @Field({nullable: true, description: `Timestamp of the review action.`})
66794
+ ReviewedAt?: Date;
66795
+
66796
+ @Field({nullable: true, description: `Free-form notes captured at review time. Useful for rejection rationale or merge decisions.`})
66797
+ ReviewerNotes?: string;
66798
+
66799
+ @Field()
66800
+ _mj__CreatedAt: Date;
66801
+
66802
+ @Field()
66803
+ _mj__UpdatedAt: Date;
66804
+
66805
+ @Field({nullable: true})
66806
+ @MaxLength(255)
66807
+ ProposedParent?: string;
66808
+
66809
+ @Field({nullable: true})
66810
+ @MaxLength(255)
66811
+ BestMatchTag?: string;
66812
+
66813
+ @Field({nullable: true})
66814
+ @MaxLength(250)
66815
+ SourceContentItem?: string;
66816
+
66817
+ @Field({nullable: true})
66818
+ @MaxLength(255)
66819
+ SourceContentSource?: string;
66820
+
66821
+ @Field({nullable: true})
66822
+ @MaxLength(255)
66823
+ ResolvedTag?: string;
66824
+
66825
+ @Field({nullable: true})
66826
+ @MaxLength(100)
66827
+ ReviewedByUser?: string;
66828
+
66829
+ }
66830
+
66831
+ //****************************************************************************
66832
+ // INPUT TYPE for MJ: Tag Suggestions
66833
+ //****************************************************************************
66834
+ @InputType()
66835
+ export class CreateMJTagSuggestionInput {
66836
+ @Field({ nullable: true })
66837
+ ID?: string;
66838
+
66839
+ @Field({ nullable: true })
66840
+ ProposedName?: string;
66841
+
66842
+ @Field({ nullable: true })
66843
+ ProposedParentID: string | null;
66844
+
66845
+ @Field({ nullable: true })
66846
+ BestMatchTagID: string | null;
66847
+
66848
+ @Field(() => Float, { nullable: true })
66849
+ BestMatchScore: number | null;
66850
+
66851
+ @Field({ nullable: true })
66852
+ Reason?: string;
66853
+
66854
+ @Field({ nullable: true })
66855
+ SourceContentItemID: string | null;
66856
+
66857
+ @Field({ nullable: true })
66858
+ SourceContentSourceID: string | null;
66859
+
66860
+ @Field({ nullable: true })
66861
+ SourceText: string | null;
66862
+
66863
+ @Field({ nullable: true })
66864
+ Status?: string;
66865
+
66866
+ @Field({ nullable: true })
66867
+ ResolvedTagID: string | null;
66868
+
66869
+ @Field({ nullable: true })
66870
+ ReviewedByUserID: string | null;
66871
+
66872
+ @Field({ nullable: true })
66873
+ ReviewedAt: Date | null;
66874
+
66875
+ @Field({ nullable: true })
66876
+ ReviewerNotes: string | null;
66877
+
66878
+ @Field(() => RestoreContextInput, { nullable: true })
66879
+ RestoreContext___?: RestoreContextInput;
66880
+ }
66881
+
66882
+
66883
+ //****************************************************************************
66884
+ // INPUT TYPE for MJ: Tag Suggestions
66885
+ //****************************************************************************
66886
+ @InputType()
66887
+ export class UpdateMJTagSuggestionInput {
66888
+ @Field()
66889
+ ID: string;
66890
+
66891
+ @Field({ nullable: true })
66892
+ ProposedName?: string;
66893
+
66894
+ @Field({ nullable: true })
66895
+ ProposedParentID?: string | null;
66896
+
66897
+ @Field({ nullable: true })
66898
+ BestMatchTagID?: string | null;
66899
+
66900
+ @Field(() => Float, { nullable: true })
66901
+ BestMatchScore?: number | null;
66902
+
66903
+ @Field({ nullable: true })
66904
+ Reason?: string;
66905
+
66906
+ @Field({ nullable: true })
66907
+ SourceContentItemID?: string | null;
66908
+
66909
+ @Field({ nullable: true })
66910
+ SourceContentSourceID?: string | null;
66911
+
66912
+ @Field({ nullable: true })
66913
+ SourceText?: string | null;
66914
+
66915
+ @Field({ nullable: true })
66916
+ Status?: string;
66917
+
66918
+ @Field({ nullable: true })
66919
+ ResolvedTagID?: string | null;
66920
+
66921
+ @Field({ nullable: true })
66922
+ ReviewedByUserID?: string | null;
66923
+
66924
+ @Field({ nullable: true })
66925
+ ReviewedAt?: Date | null;
66926
+
66927
+ @Field({ nullable: true })
66928
+ ReviewerNotes?: string | null;
66929
+
66930
+ @Field(() => [KeyValuePairInput], { nullable: true })
66931
+ OldValues___?: KeyValuePairInput[];
66932
+
66933
+ @Field(() => RestoreContextInput, { nullable: true })
66934
+ RestoreContext___?: RestoreContextInput;
66935
+ }
66936
+
66937
+ //****************************************************************************
66938
+ // RESOLVER for MJ: Tag Suggestions
66939
+ //****************************************************************************
66940
+ @ObjectType()
66941
+ export class RunMJTagSuggestionViewResult {
66942
+ @Field(() => [MJTagSuggestion_])
66943
+ Results: MJTagSuggestion_[];
66944
+
66945
+ @Field(() => String, {nullable: true})
66946
+ UserViewRunID?: string;
66947
+
66948
+ @Field(() => Int, {nullable: true})
66949
+ RowCount: number;
66950
+
66951
+ @Field(() => Int, {nullable: true})
66952
+ TotalRowCount: number;
66953
+
66954
+ @Field(() => Int, {nullable: true})
66955
+ ExecutionTime: number;
66956
+
66957
+ @Field({nullable: true})
66958
+ ErrorMessage?: string;
66959
+
66960
+ @Field(() => Boolean, {nullable: false})
66961
+ Success: boolean;
66962
+ }
66963
+
66964
+ @Resolver(MJTagSuggestion_)
66965
+ export class MJTagSuggestionResolver extends ResolverBase {
66966
+ @Query(() => RunMJTagSuggestionViewResult)
66967
+ async RunMJTagSuggestionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
66968
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66969
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
66970
+ }
66971
+
66972
+ @Query(() => RunMJTagSuggestionViewResult)
66973
+ async RunMJTagSuggestionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
66974
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66975
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
66976
+ }
66977
+
66978
+ @Query(() => RunMJTagSuggestionViewResult)
66979
+ async RunMJTagSuggestionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
66980
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66981
+ input.EntityName = 'MJ: Tag Suggestions';
66982
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
66983
+ }
66984
+ @Query(() => MJTagSuggestion_, { nullable: true })
66985
+ async MJTagSuggestion(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTagSuggestion_ | null> {
66986
+ this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
66987
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66988
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagSuggestions')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Suggestions', userPayload, EntityPermissionType.Read, 'AND');
66989
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
66990
+ const result = await this.MapFieldNamesToCodeNames('MJ: Tag Suggestions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
66991
+ return result;
66992
+ }
66993
+
66994
+ @Mutation(() => MJTagSuggestion_)
66995
+ async CreateMJTagSuggestion(
66996
+ @Arg('input', () => CreateMJTagSuggestionInput) input: CreateMJTagSuggestionInput,
66997
+ @Ctx() { providers, userPayload }: AppContext,
66998
+ @PubSub() pubSub: PubSubEngine
66999
+ ) {
67000
+ const provider = GetReadWriteProvider(providers);
67001
+ return this.CreateRecord('MJ: Tag Suggestions', input, provider, userPayload, pubSub)
67002
+ }
67003
+
67004
+ @Mutation(() => MJTagSuggestion_)
67005
+ async UpdateMJTagSuggestion(
67006
+ @Arg('input', () => UpdateMJTagSuggestionInput) input: UpdateMJTagSuggestionInput,
67007
+ @Ctx() { providers, userPayload }: AppContext,
67008
+ @PubSub() pubSub: PubSubEngine
67009
+ ) {
67010
+ const provider = GetReadWriteProvider(providers);
67011
+ return this.UpdateRecord('MJ: Tag Suggestions', input, provider, userPayload, pubSub);
67012
+ }
67013
+
67014
+ @Mutation(() => MJTagSuggestion_)
67015
+ async DeleteMJTagSuggestion(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
67016
+ const provider = GetReadWriteProvider(providers);
67017
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
67018
+ return this.DeleteRecord('MJ: Tag Suggestions', key, options, provider, userPayload, pubSub);
67019
+ }
67020
+
67021
+ }
67022
+
67023
+ //****************************************************************************
67024
+ // ENTITY CLASS for MJ: Tag Synonyms
67025
+ //****************************************************************************
67026
+ @ObjectType({ description: `Alternate names that should resolve to a Tag during autotagging. Consulted before exact/fuzzy/semantic match tiers in TagEngine.ResolveTag.` })
67027
+ export class MJTagSynonym_ {
67028
+ @Field()
67029
+ @MaxLength(36)
67030
+ ID: string;
67031
+
67032
+ @Field({description: `The Tag this synonym maps to.`})
67033
+ @MaxLength(36)
67034
+ TagID: string;
67035
+
67036
+ @Field({description: `The alternate name that should resolve to the Tag. Case-insensitive; uniqueness is enforced per-Tag via UQ_TagSynonym_Tag_Synonym.`})
67037
+ @MaxLength(255)
67038
+ Synonym: string;
67039
+
67040
+ @Field({description: `How this synonym was introduced. Manual = admin-authored; LLM = suggested by an LLM run; Imported = bulk-loaded; Merged = inherited from a tag merged into this one.`})
67041
+ @MaxLength(20)
67042
+ Source: string;
67043
+
67044
+ @Field()
67045
+ _mj__CreatedAt: Date;
67046
+
67047
+ @Field()
67048
+ _mj__UpdatedAt: Date;
67049
+
67050
+ @Field()
67051
+ @MaxLength(255)
67052
+ Tag: string;
67053
+
67054
+ }
67055
+
67056
+ //****************************************************************************
67057
+ // INPUT TYPE for MJ: Tag Synonyms
67058
+ //****************************************************************************
67059
+ @InputType()
67060
+ export class CreateMJTagSynonymInput {
67061
+ @Field({ nullable: true })
67062
+ ID?: string;
67063
+
67064
+ @Field({ nullable: true })
67065
+ TagID?: string;
67066
+
67067
+ @Field({ nullable: true })
67068
+ Synonym?: string;
67069
+
67070
+ @Field({ nullable: true })
67071
+ Source?: string;
67072
+
67073
+ @Field(() => RestoreContextInput, { nullable: true })
67074
+ RestoreContext___?: RestoreContextInput;
67075
+ }
67076
+
67077
+
67078
+ //****************************************************************************
67079
+ // INPUT TYPE for MJ: Tag Synonyms
67080
+ //****************************************************************************
67081
+ @InputType()
67082
+ export class UpdateMJTagSynonymInput {
67083
+ @Field()
67084
+ ID: string;
67085
+
67086
+ @Field({ nullable: true })
67087
+ TagID?: string;
67088
+
67089
+ @Field({ nullable: true })
67090
+ Synonym?: string;
67091
+
67092
+ @Field({ nullable: true })
67093
+ Source?: string;
67094
+
67095
+ @Field(() => [KeyValuePairInput], { nullable: true })
67096
+ OldValues___?: KeyValuePairInput[];
67097
+
67098
+ @Field(() => RestoreContextInput, { nullable: true })
67099
+ RestoreContext___?: RestoreContextInput;
67100
+ }
67101
+
67102
+ //****************************************************************************
67103
+ // RESOLVER for MJ: Tag Synonyms
67104
+ //****************************************************************************
67105
+ @ObjectType()
67106
+ export class RunMJTagSynonymViewResult {
67107
+ @Field(() => [MJTagSynonym_])
67108
+ Results: MJTagSynonym_[];
67109
+
67110
+ @Field(() => String, {nullable: true})
67111
+ UserViewRunID?: string;
67112
+
67113
+ @Field(() => Int, {nullable: true})
67114
+ RowCount: number;
67115
+
67116
+ @Field(() => Int, {nullable: true})
67117
+ TotalRowCount: number;
67118
+
67119
+ @Field(() => Int, {nullable: true})
67120
+ ExecutionTime: number;
67121
+
67122
+ @Field({nullable: true})
67123
+ ErrorMessage?: string;
67124
+
67125
+ @Field(() => Boolean, {nullable: false})
67126
+ Success: boolean;
67127
+ }
67128
+
67129
+ @Resolver(MJTagSynonym_)
67130
+ export class MJTagSynonymResolver extends ResolverBase {
67131
+ @Query(() => RunMJTagSynonymViewResult)
67132
+ async RunMJTagSynonymViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
67133
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67134
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
67135
+ }
67136
+
67137
+ @Query(() => RunMJTagSynonymViewResult)
67138
+ async RunMJTagSynonymViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
67139
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67140
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
67141
+ }
67142
+
67143
+ @Query(() => RunMJTagSynonymViewResult)
67144
+ async RunMJTagSynonymDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
67145
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67146
+ input.EntityName = 'MJ: Tag Synonyms';
67147
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
67148
+ }
67149
+ @Query(() => MJTagSynonym_, { nullable: true })
67150
+ async MJTagSynonym(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTagSynonym_ | null> {
67151
+ this.CheckUserReadPermissions('MJ: Tag Synonyms', userPayload);
67152
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67153
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagSynonyms')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Synonyms', userPayload, EntityPermissionType.Read, 'AND');
67154
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
67155
+ const result = await this.MapFieldNamesToCodeNames('MJ: Tag Synonyms', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
67156
+ return result;
67157
+ }
67158
+
67159
+ @Mutation(() => MJTagSynonym_)
67160
+ async CreateMJTagSynonym(
67161
+ @Arg('input', () => CreateMJTagSynonymInput) input: CreateMJTagSynonymInput,
67162
+ @Ctx() { providers, userPayload }: AppContext,
67163
+ @PubSub() pubSub: PubSubEngine
67164
+ ) {
67165
+ const provider = GetReadWriteProvider(providers);
67166
+ return this.CreateRecord('MJ: Tag Synonyms', input, provider, userPayload, pubSub)
67167
+ }
67168
+
67169
+ @Mutation(() => MJTagSynonym_)
67170
+ async UpdateMJTagSynonym(
67171
+ @Arg('input', () => UpdateMJTagSynonymInput) input: UpdateMJTagSynonymInput,
67172
+ @Ctx() { providers, userPayload }: AppContext,
67173
+ @PubSub() pubSub: PubSubEngine
67174
+ ) {
67175
+ const provider = GetReadWriteProvider(providers);
67176
+ return this.UpdateRecord('MJ: Tag Synonyms', input, provider, userPayload, pubSub);
67177
+ }
67178
+
67179
+ @Mutation(() => MJTagSynonym_)
67180
+ async DeleteMJTagSynonym(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
67181
+ const provider = GetReadWriteProvider(providers);
67182
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
67183
+ return this.DeleteRecord('MJ: Tag Synonyms', key, options, provider, userPayload, pubSub);
67184
+ }
67185
+
67186
+ }
67187
+
66521
67188
  //****************************************************************************
66522
67189
  // ENTITY CLASS for MJ: Tagged Items
66523
67190
  //****************************************************************************
@@ -66734,6 +67401,34 @@ export class MJTag_ {
66734
67401
  @MaxLength(36)
66735
67402
  MergedIntoTagID?: string;
66736
67403
 
67404
+ @Field(() => Boolean, {description: `When 1, the tag is visible to every tenant/scope. When 0, the tag is only visible to the (Entity, Record) pairs listed in TagScope. Cannot be set together with TagScope rows — enforced in entity Save() override.`})
67405
+ IsGlobal: boolean;
67406
+
67407
+ @Field(() => Boolean, {description: `When 1, the autotagger may auto-create new child tags under this node when running in AutoGrow or FreeFlow mode. When 0, new children must come through the TagSuggestion review queue.`})
67408
+ AllowAutoGrow: boolean;
67409
+
67410
+ @Field(() => Boolean, {description: `When 1, this subtree is locked: no new children may be created under this node or any descendant, regardless of taxonomy mode. Existing children remain editable.`})
67411
+ IsFrozen: boolean;
67412
+
67413
+ @Field(() => Int, {nullable: true, description: `Optional cap on the number of direct children allowed under this tag. NULL = unlimited. Auto-grow is blocked once this cap is reached and routed to the TagSuggestion queue.`})
67414
+ MaxChildren?: number;
67415
+
67416
+ @Field(() => Int, {nullable: true, description: `Optional cap on the depth of the subtree rooted at this tag. NULL = unlimited. 0 = leaf-only (no children at all). Enforced via ancestor walk during auto-grow.`})
67417
+ MaxDescendantDepth?: number;
67418
+
67419
+ @Field(() => Float, {nullable: true, description: `Optional minimum classifier confidence (0.00-1.00) required for this tag to be applied. Items below this floor are routed to the TagSuggestion queue instead of being tagged.`})
67420
+ MinWeight?: number;
67421
+
67422
+ @Field(() => Boolean, {description: `When 1, every classifier-applied use of this tag is routed to the TagSuggestion queue for human approval before being persisted as a ContentItemTag → TaggedItem.`})
67423
+ RequiresReview: boolean;
67424
+
67425
+ @Field({nullable: true, description: `JSON-encoded numeric vector representing the tag's embedding under the model identified by EmbeddingModelID. Refreshed automatically on Save() when Name or Description changes. Used to seed the in-memory tag vector cache without a cold-start LLM round-trip.`})
67426
+ EmbeddingVector?: string;
67427
+
67428
+ @Field({nullable: true, description: `AI model whose embedding produced EmbeddingVector. When the configured tag-embedding model differs from this value, the cached vector is treated as stale and recomputed.`})
67429
+ @MaxLength(36)
67430
+ EmbeddingModelID?: string;
67431
+
66737
67432
  @Field({nullable: true})
66738
67433
  @MaxLength(255)
66739
67434
  Parent?: string;
@@ -66742,6 +67437,10 @@ export class MJTag_ {
66742
67437
  @MaxLength(255)
66743
67438
  MergedIntoTag?: string;
66744
67439
 
67440
+ @Field({nullable: true})
67441
+ @MaxLength(50)
67442
+ EmbeddingModel?: string;
67443
+
66745
67444
  @Field({nullable: true})
66746
67445
  @MaxLength(36)
66747
67446
  RootParentID?: string;
@@ -66756,11 +67455,14 @@ export class MJTag_ {
66756
67455
  @Field(() => [MJTaggedItem_])
66757
67456
  MJTaggedItems_TagIDArray: MJTaggedItem_[]; // Link to MJTaggedItems
66758
67457
 
67458
+ @Field(() => [MJContentItemTag_])
67459
+ MJContentItemTags_TagIDArray: MJContentItemTag_[]; // Link to MJContentItemTags
67460
+
66759
67461
  @Field(() => [MJTagCoOccurrence_])
66760
67462
  MJTagCoOccurrences_TagBIDArray: MJTagCoOccurrence_[]; // Link to MJTagCoOccurrences
66761
67463
 
66762
- @Field(() => [MJContentItemTag_])
66763
- MJContentItemTags_TagIDArray: MJContentItemTag_[]; // Link to MJContentItemTags
67464
+ @Field(() => [MJTagSynonym_])
67465
+ MJTagSynonyms_TagIDArray: MJTagSynonym_[]; // Link to MJTagSynonyms
66764
67466
 
66765
67467
  @Field(() => [MJTagAuditLog_])
66766
67468
  MJTagAuditLogs_RelatedTagIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
@@ -66768,12 +67470,24 @@ export class MJTag_ {
66768
67470
  @Field(() => [MJTagCoOccurrence_])
66769
67471
  MJTagCoOccurrences_TagAIDArray: MJTagCoOccurrence_[]; // Link to MJTagCoOccurrences
66770
67472
 
66771
- @Field(() => [MJTag_])
66772
- MJTags_MergedIntoTagIDArray: MJTag_[]; // Link to MJTags
67473
+ @Field(() => [MJTagSuggestion_])
67474
+ MJTagSuggestions_ProposedParentIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
67475
+
67476
+ @Field(() => [MJTagScope_])
67477
+ MJTagScopes_TagIDArray: MJTagScope_[]; // Link to MJTagScopes
66773
67478
 
66774
67479
  @Field(() => [MJTagAuditLog_])
66775
67480
  MJTagAuditLogs_TagIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
66776
67481
 
67482
+ @Field(() => [MJTag_])
67483
+ MJTags_MergedIntoTagIDArray: MJTag_[]; // Link to MJTags
67484
+
67485
+ @Field(() => [MJTagSuggestion_])
67486
+ MJTagSuggestions_BestMatchTagIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
67487
+
67488
+ @Field(() => [MJTagSuggestion_])
67489
+ MJTagSuggestions_ResolvedTagIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
67490
+
66777
67491
  }
66778
67492
 
66779
67493
  //****************************************************************************
@@ -66802,6 +67516,33 @@ export class CreateMJTagInput {
66802
67516
  @Field({ nullable: true })
66803
67517
  MergedIntoTagID: string | null;
66804
67518
 
67519
+ @Field(() => Boolean, { nullable: true })
67520
+ IsGlobal?: boolean;
67521
+
67522
+ @Field(() => Boolean, { nullable: true })
67523
+ AllowAutoGrow?: boolean;
67524
+
67525
+ @Field(() => Boolean, { nullable: true })
67526
+ IsFrozen?: boolean;
67527
+
67528
+ @Field(() => Int, { nullable: true })
67529
+ MaxChildren: number | null;
67530
+
67531
+ @Field(() => Int, { nullable: true })
67532
+ MaxDescendantDepth: number | null;
67533
+
67534
+ @Field(() => Float, { nullable: true })
67535
+ MinWeight: number | null;
67536
+
67537
+ @Field(() => Boolean, { nullable: true })
67538
+ RequiresReview?: boolean;
67539
+
67540
+ @Field({ nullable: true })
67541
+ EmbeddingVector: string | null;
67542
+
67543
+ @Field({ nullable: true })
67544
+ EmbeddingModelID: string | null;
67545
+
66805
67546
  @Field(() => RestoreContextInput, { nullable: true })
66806
67547
  RestoreContext___?: RestoreContextInput;
66807
67548
  }
@@ -66833,6 +67574,33 @@ export class UpdateMJTagInput {
66833
67574
  @Field({ nullable: true })
66834
67575
  MergedIntoTagID?: string | null;
66835
67576
 
67577
+ @Field(() => Boolean, { nullable: true })
67578
+ IsGlobal?: boolean;
67579
+
67580
+ @Field(() => Boolean, { nullable: true })
67581
+ AllowAutoGrow?: boolean;
67582
+
67583
+ @Field(() => Boolean, { nullable: true })
67584
+ IsFrozen?: boolean;
67585
+
67586
+ @Field(() => Int, { nullable: true })
67587
+ MaxChildren?: number | null;
67588
+
67589
+ @Field(() => Int, { nullable: true })
67590
+ MaxDescendantDepth?: number | null;
67591
+
67592
+ @Field(() => Float, { nullable: true })
67593
+ MinWeight?: number | null;
67594
+
67595
+ @Field(() => Boolean, { nullable: true })
67596
+ RequiresReview?: boolean;
67597
+
67598
+ @Field({ nullable: true })
67599
+ EmbeddingVector?: string | null;
67600
+
67601
+ @Field({ nullable: true })
67602
+ EmbeddingModelID?: string | null;
67603
+
66836
67604
  @Field(() => [KeyValuePairInput], { nullable: true })
66837
67605
  OldValues___?: KeyValuePairInput[];
66838
67606
 
@@ -66917,6 +67685,16 @@ export class MJTagResolver extends ResolverBase {
66917
67685
  return result;
66918
67686
  }
66919
67687
 
67688
+ @FieldResolver(() => [MJContentItemTag_])
67689
+ async MJContentItemTags_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
67690
+ this.CheckUserReadPermissions('MJ: Content Item Tags', userPayload);
67691
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67692
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemTags')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Tags', userPayload, EntityPermissionType.Read, 'AND');
67693
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
67694
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Tags', rows, this.GetUserFromPayload(userPayload));
67695
+ return result;
67696
+ }
67697
+
66920
67698
  @FieldResolver(() => [MJTagCoOccurrence_])
66921
67699
  async MJTagCoOccurrences_TagBIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
66922
67700
  this.CheckUserReadPermissions('MJ: Tag Co Occurrences', userPayload);
@@ -66927,13 +67705,13 @@ export class MJTagResolver extends ResolverBase {
66927
67705
  return result;
66928
67706
  }
66929
67707
 
66930
- @FieldResolver(() => [MJContentItemTag_])
66931
- async MJContentItemTags_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
66932
- this.CheckUserReadPermissions('MJ: Content Item Tags', userPayload);
67708
+ @FieldResolver(() => [MJTagSynonym_])
67709
+ async MJTagSynonyms_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
67710
+ this.CheckUserReadPermissions('MJ: Tag Synonyms', userPayload);
66933
67711
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66934
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemTags')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Tags', userPayload, EntityPermissionType.Read, 'AND');
67712
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagSynonyms')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Synonyms', userPayload, EntityPermissionType.Read, 'AND');
66935
67713
  const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
66936
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Tags', rows, this.GetUserFromPayload(userPayload));
67714
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Synonyms', rows, this.GetUserFromPayload(userPayload));
66937
67715
  return result;
66938
67716
  }
66939
67717
 
@@ -66957,13 +67735,23 @@ export class MJTagResolver extends ResolverBase {
66957
67735
  return result;
66958
67736
  }
66959
67737
 
66960
- @FieldResolver(() => [MJTag_])
66961
- async MJTags_MergedIntoTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
66962
- this.CheckUserReadPermissions('MJ: Tags', userPayload);
67738
+ @FieldResolver(() => [MJTagSuggestion_])
67739
+ async MJTagSuggestions_ProposedParentIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
67740
+ this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
66963
67741
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
66964
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTags')} WHERE ${provider.QuoteIdentifier('MergedIntoTagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tags', userPayload, EntityPermissionType.Read, 'AND');
67742
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagSuggestions')} WHERE ${provider.QuoteIdentifier('ProposedParentID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Suggestions', userPayload, EntityPermissionType.Read, 'AND');
66965
67743
  const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
66966
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tags', rows, this.GetUserFromPayload(userPayload));
67744
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
67745
+ return result;
67746
+ }
67747
+
67748
+ @FieldResolver(() => [MJTagScope_])
67749
+ async MJTagScopes_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
67750
+ this.CheckUserReadPermissions('MJ: Tag Scopes', userPayload);
67751
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67752
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagScopes')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Scopes', userPayload, EntityPermissionType.Read, 'AND');
67753
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
67754
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Scopes', rows, this.GetUserFromPayload(userPayload));
66967
67755
  return result;
66968
67756
  }
66969
67757
 
@@ -66977,6 +67765,36 @@ export class MJTagResolver extends ResolverBase {
66977
67765
  return result;
66978
67766
  }
66979
67767
 
67768
+ @FieldResolver(() => [MJTag_])
67769
+ async MJTags_MergedIntoTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
67770
+ this.CheckUserReadPermissions('MJ: Tags', userPayload);
67771
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67772
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTags')} WHERE ${provider.QuoteIdentifier('MergedIntoTagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tags', userPayload, EntityPermissionType.Read, 'AND');
67773
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
67774
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tags', rows, this.GetUserFromPayload(userPayload));
67775
+ return result;
67776
+ }
67777
+
67778
+ @FieldResolver(() => [MJTagSuggestion_])
67779
+ async MJTagSuggestions_BestMatchTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
67780
+ this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
67781
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67782
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagSuggestions')} WHERE ${provider.QuoteIdentifier('BestMatchTagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Suggestions', userPayload, EntityPermissionType.Read, 'AND');
67783
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
67784
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
67785
+ return result;
67786
+ }
67787
+
67788
+ @FieldResolver(() => [MJTagSuggestion_])
67789
+ async MJTagSuggestions_ResolvedTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
67790
+ this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
67791
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
67792
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagSuggestions')} WHERE ${provider.QuoteIdentifier('ResolvedTagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Suggestions', userPayload, EntityPermissionType.Read, 'AND');
67793
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
67794
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
67795
+ return result;
67796
+ }
67797
+
66980
67798
  @Mutation(() => MJTag_)
66981
67799
  async CreateMJTag(
66982
67800
  @Arg('input', () => CreateMJTagInput) input: CreateMJTagInput,
@@ -74474,6 +75292,9 @@ export class MJUser_ {
74474
75292
  @Field(() => [MJOpenAppInstallHistory_])
74475
75293
  MJOpenAppInstallHistories_ExecutedByUserIDArray: MJOpenAppInstallHistory_[]; // Link to MJOpenAppInstallHistories
74476
75294
 
75295
+ @Field(() => [MJTagAuditLog_])
75296
+ MJTagAuditLogs_PerformedByUserIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
75297
+
74477
75298
  @Field(() => [MJContentItemDuplicate_])
74478
75299
  MJContentItemDuplicates_ResolvedByUserIDArray: MJContentItemDuplicate_[]; // Link to MJContentItemDuplicates
74479
75300
 
@@ -74483,9 +75304,6 @@ export class MJUser_ {
74483
75304
  @Field(() => [MJKnowledgeHubSavedSearch_])
74484
75305
  MJKnowledgeHubSavedSearches_UserIDArray: MJKnowledgeHubSavedSearch_[]; // Link to MJKnowledgeHubSavedSearches
74485
75306
 
74486
- @Field(() => [MJTagAuditLog_])
74487
- MJTagAuditLogs_PerformedByUserIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
74488
-
74489
75307
  @Field(() => [MJArchiveConfiguration_])
74490
75308
  MJArchiveConfigurations_CreatedByUserIDArray: MJArchiveConfiguration_[]; // Link to MJArchiveConfigurations
74491
75309
 
@@ -74495,6 +75313,9 @@ export class MJUser_ {
74495
75313
  @Field(() => [MJResourcePermission_])
74496
75314
  MJResourcePermissions_SharedByUserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
74497
75315
 
75316
+ @Field(() => [MJTagSuggestion_])
75317
+ MJTagSuggestions_ReviewedByUserIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
75318
+
74498
75319
  @Field(() => [MJResourcePermission_])
74499
75320
  MJResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
74500
75321
 
@@ -75345,6 +76166,16 @@ export class MJUserResolverBase extends ResolverBase {
75345
76166
  return result;
75346
76167
  }
75347
76168
 
76169
+ @FieldResolver(() => [MJTagAuditLog_])
76170
+ async MJTagAuditLogs_PerformedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
76171
+ this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
76172
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
76173
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('PerformedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
76174
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
76175
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
76176
+ return result;
76177
+ }
76178
+
75348
76179
  @FieldResolver(() => [MJContentItemDuplicate_])
75349
76180
  async MJContentItemDuplicates_ResolvedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
75350
76181
  this.CheckUserReadPermissions('MJ: Content Item Duplicates', userPayload);
@@ -75375,16 +76206,6 @@ export class MJUserResolverBase extends ResolverBase {
75375
76206
  return result;
75376
76207
  }
75377
76208
 
75378
- @FieldResolver(() => [MJTagAuditLog_])
75379
- async MJTagAuditLogs_PerformedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
75380
- this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
75381
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
75382
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('PerformedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
75383
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
75384
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
75385
- return result;
75386
- }
75387
-
75388
76209
  @FieldResolver(() => [MJArchiveConfiguration_])
75389
76210
  async MJArchiveConfigurations_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
75390
76211
  this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
@@ -75415,6 +76236,16 @@ export class MJUserResolverBase extends ResolverBase {
75415
76236
  return result;
75416
76237
  }
75417
76238
 
76239
+ @FieldResolver(() => [MJTagSuggestion_])
76240
+ async MJTagSuggestions_ReviewedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
76241
+ this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
76242
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
76243
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagSuggestions')} WHERE ${provider.QuoteIdentifier('ReviewedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Suggestions', userPayload, EntityPermissionType.Read, 'AND');
76244
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
76245
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
76246
+ return result;
76247
+ }
76248
+
75418
76249
  @FieldResolver(() => [MJResourcePermission_])
75419
76250
  async MJResourcePermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
75420
76251
  this.CheckUserReadPermissions('MJ: Resource Permissions', userPayload);