@memberjunction/server 5.30.1 → 5.32.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.
- package/dist/agents/skip-sdk.d.ts +17 -1
- package/dist/agents/skip-sdk.d.ts.map +1 -1
- package/dist/agents/skip-sdk.js +18 -5
- package/dist/agents/skip-sdk.js.map +1 -1
- package/dist/auth/exampleNewUserSubClass.js +1 -1
- package/dist/auth/exampleNewUserSubClass.js.map +1 -1
- package/dist/auth/index.js +2 -2
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/newUsers.js +2 -2
- package/dist/auth/newUsers.js.map +1 -1
- package/dist/context.js +3 -3
- package/dist/context.js.map +1 -1
- package/dist/generated/generated.d.ts +217 -4
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1251 -24
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts +5 -5
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +21 -18
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/multiTenancy/index.js +1 -1
- package/dist/multiTenancy/index.js.map +1 -1
- package/dist/resolvers/APIKeyResolver.d.ts.map +1 -1
- package/dist/resolvers/APIKeyResolver.js +5 -3
- package/dist/resolvers/APIKeyResolver.js.map +1 -1
- package/dist/resolvers/AutotagPipelineResolver.d.ts +3 -3
- package/dist/resolvers/AutotagPipelineResolver.d.ts.map +1 -1
- package/dist/resolvers/AutotagPipelineResolver.js +18 -12
- package/dist/resolvers/AutotagPipelineResolver.js.map +1 -1
- package/dist/resolvers/ComponentRegistryResolver.d.ts +1 -1
- package/dist/resolvers/ComponentRegistryResolver.d.ts.map +1 -1
- package/dist/resolvers/ComponentRegistryResolver.js +6 -4
- package/dist/resolvers/ComponentRegistryResolver.js.map +1 -1
- package/dist/resolvers/FileResolver.js +2 -2
- package/dist/resolvers/FileResolver.js.map +1 -1
- package/dist/resolvers/GetDataContextDataResolver.d.ts.map +1 -1
- package/dist/resolvers/GetDataContextDataResolver.js +1 -2
- package/dist/resolvers/GetDataContextDataResolver.js.map +1 -1
- package/dist/resolvers/ISAEntityResolver.d.ts.map +1 -1
- package/dist/resolvers/ISAEntityResolver.js +2 -5
- package/dist/resolvers/ISAEntityResolver.js.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.js +75 -66
- package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
- package/dist/resolvers/SyncDataResolver.d.ts +4 -4
- package/dist/resolvers/SyncDataResolver.d.ts.map +1 -1
- package/dist/resolvers/SyncDataResolver.js +9 -8
- package/dist/resolvers/SyncDataResolver.js.map +1 -1
- package/dist/resolvers/SyncRolesUsersResolver.d.ts +6 -6
- package/dist/resolvers/SyncRolesUsersResolver.d.ts.map +1 -1
- package/dist/resolvers/SyncRolesUsersResolver.js +22 -18
- package/dist/resolvers/SyncRolesUsersResolver.js.map +1 -1
- package/dist/resolvers/TagGovernanceResolver.d.ts +43 -0
- package/dist/resolvers/TagGovernanceResolver.d.ts.map +1 -0
- package/dist/resolvers/TagGovernanceResolver.js +245 -0
- package/dist/resolvers/TagGovernanceResolver.js.map +1 -0
- package/dist/resolvers/TaskResolver.d.ts +1 -1
- package/dist/resolvers/TaskResolver.d.ts.map +1 -1
- package/dist/resolvers/TaskResolver.js +4 -2
- package/dist/resolvers/TaskResolver.js.map +1 -1
- package/dist/resolvers/TransactionGroupResolver.d.ts.map +1 -1
- package/dist/resolvers/TransactionGroupResolver.js +2 -1
- package/dist/resolvers/TransactionGroupResolver.js.map +1 -1
- package/dist/rest/EntityCRUDHandler.js +4 -4
- package/dist/rest/EntityCRUDHandler.js.map +1 -1
- package/dist/rest/RESTEndpointHandler.js +9 -9
- package/dist/rest/RESTEndpointHandler.js.map +1 -1
- package/dist/rest/ViewOperationsHandler.js +4 -4
- package/dist/rest/ViewOperationsHandler.js.map +1 -1
- package/dist/services/TaskOrchestrator.d.ts +4 -2
- package/dist/services/TaskOrchestrator.d.ts.map +1 -1
- package/dist/services/TaskOrchestrator.js +16 -12
- package/dist/services/TaskOrchestrator.js.map +1 -1
- package/package.json +68 -66
- package/src/__tests__/TagGovernanceResolver.test.ts +255 -0
- package/src/agents/skip-sdk.ts +30 -7
- package/src/auth/exampleNewUserSubClass.ts +1 -1
- package/src/auth/index.ts +2 -2
- package/src/auth/newUsers.ts +2 -2
- package/src/context.ts +3 -3
- package/src/generated/generated.ts +861 -21
- package/src/generic/ResolverBase.ts +28 -21
- package/src/index.ts +9 -9
- package/src/multiTenancy/index.ts +1 -1
- package/src/resolvers/APIKeyResolver.ts +7 -4
- package/src/resolvers/AutotagPipelineResolver.ts +20 -11
- package/src/resolvers/ComponentRegistryResolver.ts +8 -5
- package/src/resolvers/FileResolver.ts +2 -2
- package/src/resolvers/GetDataContextDataResolver.ts +1 -2
- package/src/resolvers/ISAEntityResolver.ts +3 -5
- package/src/resolvers/IntegrationDiscoveryResolver.ts +83 -66
- package/src/resolvers/SyncDataResolver.ts +12 -11
- package/src/resolvers/SyncRolesUsersResolver.ts +23 -19
- package/src/resolvers/TagGovernanceResolver.ts +189 -0
- package/src/resolvers/TaskResolver.ts +5 -3
- package/src/resolvers/TransactionGroupResolver.ts +3 -2
- package/src/rest/EntityCRUDHandler.ts +4 -4
- package/src/rest/RESTEndpointHandler.ts +9 -9
- package/src/rest/ViewOperationsHandler.ts +4 -4
- 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);
|
|
@@ -27580,6 +27593,9 @@ export class MJComponentLibrary_ {
|
|
|
27580
27593
|
@MaxLength(50)
|
|
27581
27594
|
UsageType: string;
|
|
27582
27595
|
|
|
27596
|
+
@Field({nullable: true, description: `Markdown-formatted usage instructions for AI code generators and agents. Injected into prompts when a component references this library. Covers container requirements, initialization patterns, required config options, and common pitfalls. Distinct from Description which is a high-level summary of what the library does.`})
|
|
27597
|
+
UsageInstructions?: string;
|
|
27598
|
+
|
|
27583
27599
|
@Field(() => [MJComponentLibraryLink_])
|
|
27584
27600
|
MJComponentLibraryLinks_LibraryIDArray: MJComponentLibraryLink_[]; // Link to MJComponentLibraryLinks
|
|
27585
27601
|
|
|
@@ -27629,6 +27645,9 @@ export class CreateMJComponentLibraryInput {
|
|
|
27629
27645
|
@Field({ nullable: true })
|
|
27630
27646
|
UsageType?: string;
|
|
27631
27647
|
|
|
27648
|
+
@Field({ nullable: true })
|
|
27649
|
+
UsageInstructions: string | null;
|
|
27650
|
+
|
|
27632
27651
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
27633
27652
|
RestoreContext___?: RestoreContextInput;
|
|
27634
27653
|
}
|
|
@@ -27678,6 +27697,9 @@ export class UpdateMJComponentLibraryInput {
|
|
|
27678
27697
|
@Field({ nullable: true })
|
|
27679
27698
|
UsageType?: string;
|
|
27680
27699
|
|
|
27700
|
+
@Field({ nullable: true })
|
|
27701
|
+
UsageInstructions?: string | null;
|
|
27702
|
+
|
|
27681
27703
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
27682
27704
|
OldValues___?: KeyValuePairInput[];
|
|
27683
27705
|
|
|
@@ -29417,6 +29439,9 @@ export class MJContentItem_ {
|
|
|
29417
29439
|
@Field(() => [MJContentItemDuplicate_])
|
|
29418
29440
|
MJContentItemDuplicates_ContentItemBIDArray: MJContentItemDuplicate_[]; // Link to MJContentItemDuplicates
|
|
29419
29441
|
|
|
29442
|
+
@Field(() => [MJTagSuggestion_])
|
|
29443
|
+
MJTagSuggestions_SourceContentItemIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
|
|
29444
|
+
|
|
29420
29445
|
}
|
|
29421
29446
|
|
|
29422
29447
|
//****************************************************************************
|
|
@@ -29634,6 +29659,16 @@ export class MJContentItemResolver extends ResolverBase {
|
|
|
29634
29659
|
return result;
|
|
29635
29660
|
}
|
|
29636
29661
|
|
|
29662
|
+
@FieldResolver(() => [MJTagSuggestion_])
|
|
29663
|
+
async MJTagSuggestions_SourceContentItemIDArray(@Root() mjcontentitem_: MJContentItem_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29664
|
+
this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
|
|
29665
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29666
|
+
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');
|
|
29667
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
29668
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
|
|
29669
|
+
return result;
|
|
29670
|
+
}
|
|
29671
|
+
|
|
29637
29672
|
@Mutation(() => MJContentItem_)
|
|
29638
29673
|
async CreateMJContentItem(
|
|
29639
29674
|
@Arg('input', () => CreateMJContentItemInput) input: CreateMJContentItemInput,
|
|
@@ -31030,6 +31065,9 @@ export class MJContentSource_ {
|
|
|
31030
31065
|
@Field(() => [MJContentProcessRunDetail_])
|
|
31031
31066
|
MJContentProcessRunDetails_ContentSourceIDArray: MJContentProcessRunDetail_[]; // Link to MJContentProcessRunDetails
|
|
31032
31067
|
|
|
31068
|
+
@Field(() => [MJTagSuggestion_])
|
|
31069
|
+
MJTagSuggestions_SourceContentSourceIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
|
|
31070
|
+
|
|
31033
31071
|
}
|
|
31034
31072
|
|
|
31035
31073
|
//****************************************************************************
|
|
@@ -31223,6 +31261,16 @@ export class MJContentSourceResolver extends ResolverBase {
|
|
|
31223
31261
|
return result;
|
|
31224
31262
|
}
|
|
31225
31263
|
|
|
31264
|
+
@FieldResolver(() => [MJTagSuggestion_])
|
|
31265
|
+
async MJTagSuggestions_SourceContentSourceIDArray(@Root() mjcontentsource_: MJContentSource_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31266
|
+
this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
|
|
31267
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31268
|
+
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');
|
|
31269
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
31270
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
|
|
31271
|
+
return result;
|
|
31272
|
+
}
|
|
31273
|
+
|
|
31226
31274
|
@Mutation(() => MJContentSource_)
|
|
31227
31275
|
async CreateMJContentSource(
|
|
31228
31276
|
@Arg('input', () => CreateMJContentSourceInput) input: CreateMJContentSourceInput,
|
|
@@ -39982,6 +40030,9 @@ export class MJEntity_ {
|
|
|
39982
40030
|
@Field(() => [MJRecordGeoCode_])
|
|
39983
40031
|
MJRecordGeoCodes_EntityIDArray: MJRecordGeoCode_[]; // Link to MJRecordGeoCodes
|
|
39984
40032
|
|
|
40033
|
+
@Field(() => [MJTagScope_])
|
|
40034
|
+
MJTagScopes_ScopeEntityIDArray: MJTagScope_[]; // Link to MJTagScopes
|
|
40035
|
+
|
|
39985
40036
|
@Field(() => [MJGeneratedCode_])
|
|
39986
40037
|
MJGeneratedCodes_LinkedEntityIDArray: MJGeneratedCode_[]; // Link to MJGeneratedCodes
|
|
39987
40038
|
|
|
@@ -40939,6 +40990,16 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
40939
40990
|
return result;
|
|
40940
40991
|
}
|
|
40941
40992
|
|
|
40993
|
+
@FieldResolver(() => [MJTagScope_])
|
|
40994
|
+
async MJTagScopes_ScopeEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40995
|
+
this.CheckUserReadPermissions('MJ: Tag Scopes', userPayload);
|
|
40996
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40997
|
+
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');
|
|
40998
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
40999
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
41000
|
+
return result;
|
|
41001
|
+
}
|
|
41002
|
+
|
|
40942
41003
|
@FieldResolver(() => [MJGeneratedCode_])
|
|
40943
41004
|
async MJGeneratedCodes_LinkedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40944
41005
|
this.CheckUserReadPermissions('MJ: Generated Codes', userPayload);
|
|
@@ -66518,6 +66579,621 @@ export class MJTagCoOccurrenceResolver extends ResolverBase {
|
|
|
66518
66579
|
|
|
66519
66580
|
}
|
|
66520
66581
|
|
|
66582
|
+
//****************************************************************************
|
|
66583
|
+
// ENTITY CLASS for MJ: Tag Scopes
|
|
66584
|
+
//****************************************************************************
|
|
66585
|
+
@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.` })
|
|
66586
|
+
export class MJTagScope_ {
|
|
66587
|
+
@Field()
|
|
66588
|
+
@MaxLength(36)
|
|
66589
|
+
ID: string;
|
|
66590
|
+
|
|
66591
|
+
@Field({description: `The Tag whose visibility this row constrains.`})
|
|
66592
|
+
@MaxLength(36)
|
|
66593
|
+
TagID: string;
|
|
66594
|
+
|
|
66595
|
+
@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.`})
|
|
66596
|
+
@MaxLength(36)
|
|
66597
|
+
ScopeEntityID: string;
|
|
66598
|
+
|
|
66599
|
+
@Field({description: `Primary key value of the scope record. Stored as NVARCHAR(450) to match the polymorphic RecordID convention used by TaggedItem.`})
|
|
66600
|
+
@MaxLength(450)
|
|
66601
|
+
ScopeRecordID: string;
|
|
66602
|
+
|
|
66603
|
+
@Field()
|
|
66604
|
+
_mj__CreatedAt: Date;
|
|
66605
|
+
|
|
66606
|
+
@Field()
|
|
66607
|
+
_mj__UpdatedAt: Date;
|
|
66608
|
+
|
|
66609
|
+
@Field()
|
|
66610
|
+
@MaxLength(255)
|
|
66611
|
+
Tag: string;
|
|
66612
|
+
|
|
66613
|
+
@Field()
|
|
66614
|
+
@MaxLength(255)
|
|
66615
|
+
ScopeEntity: string;
|
|
66616
|
+
|
|
66617
|
+
}
|
|
66618
|
+
|
|
66619
|
+
//****************************************************************************
|
|
66620
|
+
// INPUT TYPE for MJ: Tag Scopes
|
|
66621
|
+
//****************************************************************************
|
|
66622
|
+
@InputType()
|
|
66623
|
+
export class CreateMJTagScopeInput {
|
|
66624
|
+
@Field({ nullable: true })
|
|
66625
|
+
ID?: string;
|
|
66626
|
+
|
|
66627
|
+
@Field({ nullable: true })
|
|
66628
|
+
TagID?: string;
|
|
66629
|
+
|
|
66630
|
+
@Field({ nullable: true })
|
|
66631
|
+
ScopeEntityID?: string;
|
|
66632
|
+
|
|
66633
|
+
@Field({ nullable: true })
|
|
66634
|
+
ScopeRecordID?: string;
|
|
66635
|
+
|
|
66636
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
66637
|
+
RestoreContext___?: RestoreContextInput;
|
|
66638
|
+
}
|
|
66639
|
+
|
|
66640
|
+
|
|
66641
|
+
//****************************************************************************
|
|
66642
|
+
// INPUT TYPE for MJ: Tag Scopes
|
|
66643
|
+
//****************************************************************************
|
|
66644
|
+
@InputType()
|
|
66645
|
+
export class UpdateMJTagScopeInput {
|
|
66646
|
+
@Field()
|
|
66647
|
+
ID: string;
|
|
66648
|
+
|
|
66649
|
+
@Field({ nullable: true })
|
|
66650
|
+
TagID?: string;
|
|
66651
|
+
|
|
66652
|
+
@Field({ nullable: true })
|
|
66653
|
+
ScopeEntityID?: string;
|
|
66654
|
+
|
|
66655
|
+
@Field({ nullable: true })
|
|
66656
|
+
ScopeRecordID?: string;
|
|
66657
|
+
|
|
66658
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
66659
|
+
OldValues___?: KeyValuePairInput[];
|
|
66660
|
+
|
|
66661
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
66662
|
+
RestoreContext___?: RestoreContextInput;
|
|
66663
|
+
}
|
|
66664
|
+
|
|
66665
|
+
//****************************************************************************
|
|
66666
|
+
// RESOLVER for MJ: Tag Scopes
|
|
66667
|
+
//****************************************************************************
|
|
66668
|
+
@ObjectType()
|
|
66669
|
+
export class RunMJTagScopeViewResult {
|
|
66670
|
+
@Field(() => [MJTagScope_])
|
|
66671
|
+
Results: MJTagScope_[];
|
|
66672
|
+
|
|
66673
|
+
@Field(() => String, {nullable: true})
|
|
66674
|
+
UserViewRunID?: string;
|
|
66675
|
+
|
|
66676
|
+
@Field(() => Int, {nullable: true})
|
|
66677
|
+
RowCount: number;
|
|
66678
|
+
|
|
66679
|
+
@Field(() => Int, {nullable: true})
|
|
66680
|
+
TotalRowCount: number;
|
|
66681
|
+
|
|
66682
|
+
@Field(() => Int, {nullable: true})
|
|
66683
|
+
ExecutionTime: number;
|
|
66684
|
+
|
|
66685
|
+
@Field({nullable: true})
|
|
66686
|
+
ErrorMessage?: string;
|
|
66687
|
+
|
|
66688
|
+
@Field(() => Boolean, {nullable: false})
|
|
66689
|
+
Success: boolean;
|
|
66690
|
+
}
|
|
66691
|
+
|
|
66692
|
+
@Resolver(MJTagScope_)
|
|
66693
|
+
export class MJTagScopeResolver extends ResolverBase {
|
|
66694
|
+
@Query(() => RunMJTagScopeViewResult)
|
|
66695
|
+
async RunMJTagScopeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66696
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66697
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
66698
|
+
}
|
|
66699
|
+
|
|
66700
|
+
@Query(() => RunMJTagScopeViewResult)
|
|
66701
|
+
async RunMJTagScopeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66702
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66703
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
66704
|
+
}
|
|
66705
|
+
|
|
66706
|
+
@Query(() => RunMJTagScopeViewResult)
|
|
66707
|
+
async RunMJTagScopeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66708
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66709
|
+
input.EntityName = 'MJ: Tag Scopes';
|
|
66710
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
66711
|
+
}
|
|
66712
|
+
@Query(() => MJTagScope_, { nullable: true })
|
|
66713
|
+
async MJTagScope(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTagScope_ | null> {
|
|
66714
|
+
this.CheckUserReadPermissions('MJ: Tag Scopes', userPayload);
|
|
66715
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66716
|
+
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');
|
|
66717
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
66718
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Tag Scopes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
66719
|
+
return result;
|
|
66720
|
+
}
|
|
66721
|
+
|
|
66722
|
+
@Mutation(() => MJTagScope_)
|
|
66723
|
+
async CreateMJTagScope(
|
|
66724
|
+
@Arg('input', () => CreateMJTagScopeInput) input: CreateMJTagScopeInput,
|
|
66725
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
66726
|
+
@PubSub() pubSub: PubSubEngine
|
|
66727
|
+
) {
|
|
66728
|
+
const provider = GetReadWriteProvider(providers);
|
|
66729
|
+
return this.CreateRecord('MJ: Tag Scopes', input, provider, userPayload, pubSub)
|
|
66730
|
+
}
|
|
66731
|
+
|
|
66732
|
+
@Mutation(() => MJTagScope_)
|
|
66733
|
+
async UpdateMJTagScope(
|
|
66734
|
+
@Arg('input', () => UpdateMJTagScopeInput) input: UpdateMJTagScopeInput,
|
|
66735
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
66736
|
+
@PubSub() pubSub: PubSubEngine
|
|
66737
|
+
) {
|
|
66738
|
+
const provider = GetReadWriteProvider(providers);
|
|
66739
|
+
return this.UpdateRecord('MJ: Tag Scopes', input, provider, userPayload, pubSub);
|
|
66740
|
+
}
|
|
66741
|
+
|
|
66742
|
+
@Mutation(() => MJTagScope_)
|
|
66743
|
+
async DeleteMJTagScope(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66744
|
+
const provider = GetReadWriteProvider(providers);
|
|
66745
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
66746
|
+
return this.DeleteRecord('MJ: Tag Scopes', key, options, provider, userPayload, pubSub);
|
|
66747
|
+
}
|
|
66748
|
+
|
|
66749
|
+
}
|
|
66750
|
+
|
|
66751
|
+
//****************************************************************************
|
|
66752
|
+
// ENTITY CLASS for MJ: Tag Suggestions
|
|
66753
|
+
//****************************************************************************
|
|
66754
|
+
@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.` })
|
|
66755
|
+
export class MJTagSuggestion_ {
|
|
66756
|
+
@Field()
|
|
66757
|
+
@MaxLength(36)
|
|
66758
|
+
ID: string;
|
|
66759
|
+
|
|
66760
|
+
@Field({description: `The proposed tag name as seen by the classifier or analyzer.`})
|
|
66761
|
+
@MaxLength(255)
|
|
66762
|
+
ProposedName: string;
|
|
66763
|
+
|
|
66764
|
+
@Field({nullable: true, description: `Tag under which the suggestion would be created if approved as a new tag. NULL = root.`})
|
|
66765
|
+
@MaxLength(36)
|
|
66766
|
+
ProposedParentID?: string;
|
|
66767
|
+
|
|
66768
|
+
@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.`})
|
|
66769
|
+
@MaxLength(36)
|
|
66770
|
+
BestMatchTagID?: string;
|
|
66771
|
+
|
|
66772
|
+
@Field(() => Float, {nullable: true, description: `Cosine similarity score (0.000-1.000) between the proposed name embedding and BestMatchTagID's embedding, when applicable.`})
|
|
66773
|
+
BestMatchScore?: number;
|
|
66774
|
+
|
|
66775
|
+
@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.`})
|
|
66776
|
+
@MaxLength(50)
|
|
66777
|
+
Reason: string;
|
|
66778
|
+
|
|
66779
|
+
@Field({nullable: true, description: `ContentItem that triggered this suggestion, when item-level. NULL for taxonomy-level suggestions (merge candidates, low-usage alerts).`})
|
|
66780
|
+
@MaxLength(36)
|
|
66781
|
+
SourceContentItemID?: string;
|
|
66782
|
+
|
|
66783
|
+
@Field({nullable: true, description: `ContentSource that triggered this suggestion, when source-attributable.`})
|
|
66784
|
+
@MaxLength(36)
|
|
66785
|
+
SourceContentSourceID?: string;
|
|
66786
|
+
|
|
66787
|
+
@Field({nullable: true, description: `Optional snippet of source text that prompted the suggestion. Useful for reviewer context.`})
|
|
66788
|
+
SourceText?: string;
|
|
66789
|
+
|
|
66790
|
+
@Field({description: `Pending = awaiting review; Approved = accepted as a new tag; Merged = accepted as a merge into BestMatchTagID; Rejected = dismissed.`})
|
|
66791
|
+
@MaxLength(20)
|
|
66792
|
+
Status: string;
|
|
66793
|
+
|
|
66794
|
+
@Field({nullable: true, description: `When Approved or Merged, points to the resulting Tag (the new tag for Approved, the merge target for Merged).`})
|
|
66795
|
+
@MaxLength(36)
|
|
66796
|
+
ResolvedTagID?: string;
|
|
66797
|
+
|
|
66798
|
+
@Field({nullable: true, description: `User who took action on this suggestion.`})
|
|
66799
|
+
@MaxLength(36)
|
|
66800
|
+
ReviewedByUserID?: string;
|
|
66801
|
+
|
|
66802
|
+
@Field({nullable: true, description: `Timestamp of the review action.`})
|
|
66803
|
+
ReviewedAt?: Date;
|
|
66804
|
+
|
|
66805
|
+
@Field({nullable: true, description: `Free-form notes captured at review time. Useful for rejection rationale or merge decisions.`})
|
|
66806
|
+
ReviewerNotes?: string;
|
|
66807
|
+
|
|
66808
|
+
@Field()
|
|
66809
|
+
_mj__CreatedAt: Date;
|
|
66810
|
+
|
|
66811
|
+
@Field()
|
|
66812
|
+
_mj__UpdatedAt: Date;
|
|
66813
|
+
|
|
66814
|
+
@Field({nullable: true})
|
|
66815
|
+
@MaxLength(255)
|
|
66816
|
+
ProposedParent?: string;
|
|
66817
|
+
|
|
66818
|
+
@Field({nullable: true})
|
|
66819
|
+
@MaxLength(255)
|
|
66820
|
+
BestMatchTag?: string;
|
|
66821
|
+
|
|
66822
|
+
@Field({nullable: true})
|
|
66823
|
+
@MaxLength(250)
|
|
66824
|
+
SourceContentItem?: string;
|
|
66825
|
+
|
|
66826
|
+
@Field({nullable: true})
|
|
66827
|
+
@MaxLength(255)
|
|
66828
|
+
SourceContentSource?: string;
|
|
66829
|
+
|
|
66830
|
+
@Field({nullable: true})
|
|
66831
|
+
@MaxLength(255)
|
|
66832
|
+
ResolvedTag?: string;
|
|
66833
|
+
|
|
66834
|
+
@Field({nullable: true})
|
|
66835
|
+
@MaxLength(100)
|
|
66836
|
+
ReviewedByUser?: string;
|
|
66837
|
+
|
|
66838
|
+
}
|
|
66839
|
+
|
|
66840
|
+
//****************************************************************************
|
|
66841
|
+
// INPUT TYPE for MJ: Tag Suggestions
|
|
66842
|
+
//****************************************************************************
|
|
66843
|
+
@InputType()
|
|
66844
|
+
export class CreateMJTagSuggestionInput {
|
|
66845
|
+
@Field({ nullable: true })
|
|
66846
|
+
ID?: string;
|
|
66847
|
+
|
|
66848
|
+
@Field({ nullable: true })
|
|
66849
|
+
ProposedName?: string;
|
|
66850
|
+
|
|
66851
|
+
@Field({ nullable: true })
|
|
66852
|
+
ProposedParentID: string | null;
|
|
66853
|
+
|
|
66854
|
+
@Field({ nullable: true })
|
|
66855
|
+
BestMatchTagID: string | null;
|
|
66856
|
+
|
|
66857
|
+
@Field(() => Float, { nullable: true })
|
|
66858
|
+
BestMatchScore: number | null;
|
|
66859
|
+
|
|
66860
|
+
@Field({ nullable: true })
|
|
66861
|
+
Reason?: string;
|
|
66862
|
+
|
|
66863
|
+
@Field({ nullable: true })
|
|
66864
|
+
SourceContentItemID: string | null;
|
|
66865
|
+
|
|
66866
|
+
@Field({ nullable: true })
|
|
66867
|
+
SourceContentSourceID: string | null;
|
|
66868
|
+
|
|
66869
|
+
@Field({ nullable: true })
|
|
66870
|
+
SourceText: string | null;
|
|
66871
|
+
|
|
66872
|
+
@Field({ nullable: true })
|
|
66873
|
+
Status?: string;
|
|
66874
|
+
|
|
66875
|
+
@Field({ nullable: true })
|
|
66876
|
+
ResolvedTagID: string | null;
|
|
66877
|
+
|
|
66878
|
+
@Field({ nullable: true })
|
|
66879
|
+
ReviewedByUserID: string | null;
|
|
66880
|
+
|
|
66881
|
+
@Field({ nullable: true })
|
|
66882
|
+
ReviewedAt: Date | null;
|
|
66883
|
+
|
|
66884
|
+
@Field({ nullable: true })
|
|
66885
|
+
ReviewerNotes: string | null;
|
|
66886
|
+
|
|
66887
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
66888
|
+
RestoreContext___?: RestoreContextInput;
|
|
66889
|
+
}
|
|
66890
|
+
|
|
66891
|
+
|
|
66892
|
+
//****************************************************************************
|
|
66893
|
+
// INPUT TYPE for MJ: Tag Suggestions
|
|
66894
|
+
//****************************************************************************
|
|
66895
|
+
@InputType()
|
|
66896
|
+
export class UpdateMJTagSuggestionInput {
|
|
66897
|
+
@Field()
|
|
66898
|
+
ID: string;
|
|
66899
|
+
|
|
66900
|
+
@Field({ nullable: true })
|
|
66901
|
+
ProposedName?: string;
|
|
66902
|
+
|
|
66903
|
+
@Field({ nullable: true })
|
|
66904
|
+
ProposedParentID?: string | null;
|
|
66905
|
+
|
|
66906
|
+
@Field({ nullable: true })
|
|
66907
|
+
BestMatchTagID?: string | null;
|
|
66908
|
+
|
|
66909
|
+
@Field(() => Float, { nullable: true })
|
|
66910
|
+
BestMatchScore?: number | null;
|
|
66911
|
+
|
|
66912
|
+
@Field({ nullable: true })
|
|
66913
|
+
Reason?: string;
|
|
66914
|
+
|
|
66915
|
+
@Field({ nullable: true })
|
|
66916
|
+
SourceContentItemID?: string | null;
|
|
66917
|
+
|
|
66918
|
+
@Field({ nullable: true })
|
|
66919
|
+
SourceContentSourceID?: string | null;
|
|
66920
|
+
|
|
66921
|
+
@Field({ nullable: true })
|
|
66922
|
+
SourceText?: string | null;
|
|
66923
|
+
|
|
66924
|
+
@Field({ nullable: true })
|
|
66925
|
+
Status?: string;
|
|
66926
|
+
|
|
66927
|
+
@Field({ nullable: true })
|
|
66928
|
+
ResolvedTagID?: string | null;
|
|
66929
|
+
|
|
66930
|
+
@Field({ nullable: true })
|
|
66931
|
+
ReviewedByUserID?: string | null;
|
|
66932
|
+
|
|
66933
|
+
@Field({ nullable: true })
|
|
66934
|
+
ReviewedAt?: Date | null;
|
|
66935
|
+
|
|
66936
|
+
@Field({ nullable: true })
|
|
66937
|
+
ReviewerNotes?: string | null;
|
|
66938
|
+
|
|
66939
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
66940
|
+
OldValues___?: KeyValuePairInput[];
|
|
66941
|
+
|
|
66942
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
66943
|
+
RestoreContext___?: RestoreContextInput;
|
|
66944
|
+
}
|
|
66945
|
+
|
|
66946
|
+
//****************************************************************************
|
|
66947
|
+
// RESOLVER for MJ: Tag Suggestions
|
|
66948
|
+
//****************************************************************************
|
|
66949
|
+
@ObjectType()
|
|
66950
|
+
export class RunMJTagSuggestionViewResult {
|
|
66951
|
+
@Field(() => [MJTagSuggestion_])
|
|
66952
|
+
Results: MJTagSuggestion_[];
|
|
66953
|
+
|
|
66954
|
+
@Field(() => String, {nullable: true})
|
|
66955
|
+
UserViewRunID?: string;
|
|
66956
|
+
|
|
66957
|
+
@Field(() => Int, {nullable: true})
|
|
66958
|
+
RowCount: number;
|
|
66959
|
+
|
|
66960
|
+
@Field(() => Int, {nullable: true})
|
|
66961
|
+
TotalRowCount: number;
|
|
66962
|
+
|
|
66963
|
+
@Field(() => Int, {nullable: true})
|
|
66964
|
+
ExecutionTime: number;
|
|
66965
|
+
|
|
66966
|
+
@Field({nullable: true})
|
|
66967
|
+
ErrorMessage?: string;
|
|
66968
|
+
|
|
66969
|
+
@Field(() => Boolean, {nullable: false})
|
|
66970
|
+
Success: boolean;
|
|
66971
|
+
}
|
|
66972
|
+
|
|
66973
|
+
@Resolver(MJTagSuggestion_)
|
|
66974
|
+
export class MJTagSuggestionResolver extends ResolverBase {
|
|
66975
|
+
@Query(() => RunMJTagSuggestionViewResult)
|
|
66976
|
+
async RunMJTagSuggestionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66977
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66978
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
66979
|
+
}
|
|
66980
|
+
|
|
66981
|
+
@Query(() => RunMJTagSuggestionViewResult)
|
|
66982
|
+
async RunMJTagSuggestionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66983
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66984
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
66985
|
+
}
|
|
66986
|
+
|
|
66987
|
+
@Query(() => RunMJTagSuggestionViewResult)
|
|
66988
|
+
async RunMJTagSuggestionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66989
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66990
|
+
input.EntityName = 'MJ: Tag Suggestions';
|
|
66991
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
66992
|
+
}
|
|
66993
|
+
@Query(() => MJTagSuggestion_, { nullable: true })
|
|
66994
|
+
async MJTagSuggestion(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTagSuggestion_ | null> {
|
|
66995
|
+
this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
|
|
66996
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66997
|
+
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');
|
|
66998
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
66999
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Tag Suggestions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
67000
|
+
return result;
|
|
67001
|
+
}
|
|
67002
|
+
|
|
67003
|
+
@Mutation(() => MJTagSuggestion_)
|
|
67004
|
+
async CreateMJTagSuggestion(
|
|
67005
|
+
@Arg('input', () => CreateMJTagSuggestionInput) input: CreateMJTagSuggestionInput,
|
|
67006
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67007
|
+
@PubSub() pubSub: PubSubEngine
|
|
67008
|
+
) {
|
|
67009
|
+
const provider = GetReadWriteProvider(providers);
|
|
67010
|
+
return this.CreateRecord('MJ: Tag Suggestions', input, provider, userPayload, pubSub)
|
|
67011
|
+
}
|
|
67012
|
+
|
|
67013
|
+
@Mutation(() => MJTagSuggestion_)
|
|
67014
|
+
async UpdateMJTagSuggestion(
|
|
67015
|
+
@Arg('input', () => UpdateMJTagSuggestionInput) input: UpdateMJTagSuggestionInput,
|
|
67016
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67017
|
+
@PubSub() pubSub: PubSubEngine
|
|
67018
|
+
) {
|
|
67019
|
+
const provider = GetReadWriteProvider(providers);
|
|
67020
|
+
return this.UpdateRecord('MJ: Tag Suggestions', input, provider, userPayload, pubSub);
|
|
67021
|
+
}
|
|
67022
|
+
|
|
67023
|
+
@Mutation(() => MJTagSuggestion_)
|
|
67024
|
+
async DeleteMJTagSuggestion(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67025
|
+
const provider = GetReadWriteProvider(providers);
|
|
67026
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
67027
|
+
return this.DeleteRecord('MJ: Tag Suggestions', key, options, provider, userPayload, pubSub);
|
|
67028
|
+
}
|
|
67029
|
+
|
|
67030
|
+
}
|
|
67031
|
+
|
|
67032
|
+
//****************************************************************************
|
|
67033
|
+
// ENTITY CLASS for MJ: Tag Synonyms
|
|
67034
|
+
//****************************************************************************
|
|
67035
|
+
@ObjectType({ description: `Alternate names that should resolve to a Tag during autotagging. Consulted before exact/fuzzy/semantic match tiers in TagEngine.ResolveTag.` })
|
|
67036
|
+
export class MJTagSynonym_ {
|
|
67037
|
+
@Field()
|
|
67038
|
+
@MaxLength(36)
|
|
67039
|
+
ID: string;
|
|
67040
|
+
|
|
67041
|
+
@Field({description: `The Tag this synonym maps to.`})
|
|
67042
|
+
@MaxLength(36)
|
|
67043
|
+
TagID: string;
|
|
67044
|
+
|
|
67045
|
+
@Field({description: `The alternate name that should resolve to the Tag. Case-insensitive; uniqueness is enforced per-Tag via UQ_TagSynonym_Tag_Synonym.`})
|
|
67046
|
+
@MaxLength(255)
|
|
67047
|
+
Synonym: string;
|
|
67048
|
+
|
|
67049
|
+
@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.`})
|
|
67050
|
+
@MaxLength(20)
|
|
67051
|
+
Source: string;
|
|
67052
|
+
|
|
67053
|
+
@Field()
|
|
67054
|
+
_mj__CreatedAt: Date;
|
|
67055
|
+
|
|
67056
|
+
@Field()
|
|
67057
|
+
_mj__UpdatedAt: Date;
|
|
67058
|
+
|
|
67059
|
+
@Field()
|
|
67060
|
+
@MaxLength(255)
|
|
67061
|
+
Tag: string;
|
|
67062
|
+
|
|
67063
|
+
}
|
|
67064
|
+
|
|
67065
|
+
//****************************************************************************
|
|
67066
|
+
// INPUT TYPE for MJ: Tag Synonyms
|
|
67067
|
+
//****************************************************************************
|
|
67068
|
+
@InputType()
|
|
67069
|
+
export class CreateMJTagSynonymInput {
|
|
67070
|
+
@Field({ nullable: true })
|
|
67071
|
+
ID?: string;
|
|
67072
|
+
|
|
67073
|
+
@Field({ nullable: true })
|
|
67074
|
+
TagID?: string;
|
|
67075
|
+
|
|
67076
|
+
@Field({ nullable: true })
|
|
67077
|
+
Synonym?: string;
|
|
67078
|
+
|
|
67079
|
+
@Field({ nullable: true })
|
|
67080
|
+
Source?: string;
|
|
67081
|
+
|
|
67082
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67083
|
+
RestoreContext___?: RestoreContextInput;
|
|
67084
|
+
}
|
|
67085
|
+
|
|
67086
|
+
|
|
67087
|
+
//****************************************************************************
|
|
67088
|
+
// INPUT TYPE for MJ: Tag Synonyms
|
|
67089
|
+
//****************************************************************************
|
|
67090
|
+
@InputType()
|
|
67091
|
+
export class UpdateMJTagSynonymInput {
|
|
67092
|
+
@Field()
|
|
67093
|
+
ID: string;
|
|
67094
|
+
|
|
67095
|
+
@Field({ nullable: true })
|
|
67096
|
+
TagID?: string;
|
|
67097
|
+
|
|
67098
|
+
@Field({ nullable: true })
|
|
67099
|
+
Synonym?: string;
|
|
67100
|
+
|
|
67101
|
+
@Field({ nullable: true })
|
|
67102
|
+
Source?: string;
|
|
67103
|
+
|
|
67104
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
67105
|
+
OldValues___?: KeyValuePairInput[];
|
|
67106
|
+
|
|
67107
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67108
|
+
RestoreContext___?: RestoreContextInput;
|
|
67109
|
+
}
|
|
67110
|
+
|
|
67111
|
+
//****************************************************************************
|
|
67112
|
+
// RESOLVER for MJ: Tag Synonyms
|
|
67113
|
+
//****************************************************************************
|
|
67114
|
+
@ObjectType()
|
|
67115
|
+
export class RunMJTagSynonymViewResult {
|
|
67116
|
+
@Field(() => [MJTagSynonym_])
|
|
67117
|
+
Results: MJTagSynonym_[];
|
|
67118
|
+
|
|
67119
|
+
@Field(() => String, {nullable: true})
|
|
67120
|
+
UserViewRunID?: string;
|
|
67121
|
+
|
|
67122
|
+
@Field(() => Int, {nullable: true})
|
|
67123
|
+
RowCount: number;
|
|
67124
|
+
|
|
67125
|
+
@Field(() => Int, {nullable: true})
|
|
67126
|
+
TotalRowCount: number;
|
|
67127
|
+
|
|
67128
|
+
@Field(() => Int, {nullable: true})
|
|
67129
|
+
ExecutionTime: number;
|
|
67130
|
+
|
|
67131
|
+
@Field({nullable: true})
|
|
67132
|
+
ErrorMessage?: string;
|
|
67133
|
+
|
|
67134
|
+
@Field(() => Boolean, {nullable: false})
|
|
67135
|
+
Success: boolean;
|
|
67136
|
+
}
|
|
67137
|
+
|
|
67138
|
+
@Resolver(MJTagSynonym_)
|
|
67139
|
+
export class MJTagSynonymResolver extends ResolverBase {
|
|
67140
|
+
@Query(() => RunMJTagSynonymViewResult)
|
|
67141
|
+
async RunMJTagSynonymViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67142
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67143
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
67144
|
+
}
|
|
67145
|
+
|
|
67146
|
+
@Query(() => RunMJTagSynonymViewResult)
|
|
67147
|
+
async RunMJTagSynonymViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67148
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67149
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
67150
|
+
}
|
|
67151
|
+
|
|
67152
|
+
@Query(() => RunMJTagSynonymViewResult)
|
|
67153
|
+
async RunMJTagSynonymDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67154
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67155
|
+
input.EntityName = 'MJ: Tag Synonyms';
|
|
67156
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
67157
|
+
}
|
|
67158
|
+
@Query(() => MJTagSynonym_, { nullable: true })
|
|
67159
|
+
async MJTagSynonym(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTagSynonym_ | null> {
|
|
67160
|
+
this.CheckUserReadPermissions('MJ: Tag Synonyms', userPayload);
|
|
67161
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67162
|
+
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');
|
|
67163
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
67164
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Tag Synonyms', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
67165
|
+
return result;
|
|
67166
|
+
}
|
|
67167
|
+
|
|
67168
|
+
@Mutation(() => MJTagSynonym_)
|
|
67169
|
+
async CreateMJTagSynonym(
|
|
67170
|
+
@Arg('input', () => CreateMJTagSynonymInput) input: CreateMJTagSynonymInput,
|
|
67171
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67172
|
+
@PubSub() pubSub: PubSubEngine
|
|
67173
|
+
) {
|
|
67174
|
+
const provider = GetReadWriteProvider(providers);
|
|
67175
|
+
return this.CreateRecord('MJ: Tag Synonyms', input, provider, userPayload, pubSub)
|
|
67176
|
+
}
|
|
67177
|
+
|
|
67178
|
+
@Mutation(() => MJTagSynonym_)
|
|
67179
|
+
async UpdateMJTagSynonym(
|
|
67180
|
+
@Arg('input', () => UpdateMJTagSynonymInput) input: UpdateMJTagSynonymInput,
|
|
67181
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67182
|
+
@PubSub() pubSub: PubSubEngine
|
|
67183
|
+
) {
|
|
67184
|
+
const provider = GetReadWriteProvider(providers);
|
|
67185
|
+
return this.UpdateRecord('MJ: Tag Synonyms', input, provider, userPayload, pubSub);
|
|
67186
|
+
}
|
|
67187
|
+
|
|
67188
|
+
@Mutation(() => MJTagSynonym_)
|
|
67189
|
+
async DeleteMJTagSynonym(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67190
|
+
const provider = GetReadWriteProvider(providers);
|
|
67191
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
67192
|
+
return this.DeleteRecord('MJ: Tag Synonyms', key, options, provider, userPayload, pubSub);
|
|
67193
|
+
}
|
|
67194
|
+
|
|
67195
|
+
}
|
|
67196
|
+
|
|
66521
67197
|
//****************************************************************************
|
|
66522
67198
|
// ENTITY CLASS for MJ: Tagged Items
|
|
66523
67199
|
//****************************************************************************
|
|
@@ -66734,6 +67410,34 @@ export class MJTag_ {
|
|
|
66734
67410
|
@MaxLength(36)
|
|
66735
67411
|
MergedIntoTagID?: string;
|
|
66736
67412
|
|
|
67413
|
+
@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.`})
|
|
67414
|
+
IsGlobal: boolean;
|
|
67415
|
+
|
|
67416
|
+
@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.`})
|
|
67417
|
+
AllowAutoGrow: boolean;
|
|
67418
|
+
|
|
67419
|
+
@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.`})
|
|
67420
|
+
IsFrozen: boolean;
|
|
67421
|
+
|
|
67422
|
+
@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.`})
|
|
67423
|
+
MaxChildren?: number;
|
|
67424
|
+
|
|
67425
|
+
@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.`})
|
|
67426
|
+
MaxDescendantDepth?: number;
|
|
67427
|
+
|
|
67428
|
+
@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.`})
|
|
67429
|
+
MinWeight?: number;
|
|
67430
|
+
|
|
67431
|
+
@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.`})
|
|
67432
|
+
RequiresReview: boolean;
|
|
67433
|
+
|
|
67434
|
+
@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.`})
|
|
67435
|
+
EmbeddingVector?: string;
|
|
67436
|
+
|
|
67437
|
+
@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.`})
|
|
67438
|
+
@MaxLength(36)
|
|
67439
|
+
EmbeddingModelID?: string;
|
|
67440
|
+
|
|
66737
67441
|
@Field({nullable: true})
|
|
66738
67442
|
@MaxLength(255)
|
|
66739
67443
|
Parent?: string;
|
|
@@ -66742,6 +67446,10 @@ export class MJTag_ {
|
|
|
66742
67446
|
@MaxLength(255)
|
|
66743
67447
|
MergedIntoTag?: string;
|
|
66744
67448
|
|
|
67449
|
+
@Field({nullable: true})
|
|
67450
|
+
@MaxLength(50)
|
|
67451
|
+
EmbeddingModel?: string;
|
|
67452
|
+
|
|
66745
67453
|
@Field({nullable: true})
|
|
66746
67454
|
@MaxLength(36)
|
|
66747
67455
|
RootParentID?: string;
|
|
@@ -66762,18 +67470,33 @@ export class MJTag_ {
|
|
|
66762
67470
|
@Field(() => [MJContentItemTag_])
|
|
66763
67471
|
MJContentItemTags_TagIDArray: MJContentItemTag_[]; // Link to MJContentItemTags
|
|
66764
67472
|
|
|
67473
|
+
@Field(() => [MJTagSynonym_])
|
|
67474
|
+
MJTagSynonyms_TagIDArray: MJTagSynonym_[]; // Link to MJTagSynonyms
|
|
67475
|
+
|
|
66765
67476
|
@Field(() => [MJTagAuditLog_])
|
|
66766
67477
|
MJTagAuditLogs_RelatedTagIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
|
|
66767
67478
|
|
|
66768
67479
|
@Field(() => [MJTagCoOccurrence_])
|
|
66769
67480
|
MJTagCoOccurrences_TagAIDArray: MJTagCoOccurrence_[]; // Link to MJTagCoOccurrences
|
|
66770
67481
|
|
|
66771
|
-
@Field(() => [
|
|
66772
|
-
|
|
67482
|
+
@Field(() => [MJTagScope_])
|
|
67483
|
+
MJTagScopes_TagIDArray: MJTagScope_[]; // Link to MJTagScopes
|
|
67484
|
+
|
|
67485
|
+
@Field(() => [MJTagSuggestion_])
|
|
67486
|
+
MJTagSuggestions_ProposedParentIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
|
|
66773
67487
|
|
|
66774
67488
|
@Field(() => [MJTagAuditLog_])
|
|
66775
67489
|
MJTagAuditLogs_TagIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
|
|
66776
67490
|
|
|
67491
|
+
@Field(() => [MJTag_])
|
|
67492
|
+
MJTags_MergedIntoTagIDArray: MJTag_[]; // Link to MJTags
|
|
67493
|
+
|
|
67494
|
+
@Field(() => [MJTagSuggestion_])
|
|
67495
|
+
MJTagSuggestions_BestMatchTagIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
|
|
67496
|
+
|
|
67497
|
+
@Field(() => [MJTagSuggestion_])
|
|
67498
|
+
MJTagSuggestions_ResolvedTagIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
|
|
67499
|
+
|
|
66777
67500
|
}
|
|
66778
67501
|
|
|
66779
67502
|
//****************************************************************************
|
|
@@ -66802,6 +67525,33 @@ export class CreateMJTagInput {
|
|
|
66802
67525
|
@Field({ nullable: true })
|
|
66803
67526
|
MergedIntoTagID: string | null;
|
|
66804
67527
|
|
|
67528
|
+
@Field(() => Boolean, { nullable: true })
|
|
67529
|
+
IsGlobal?: boolean;
|
|
67530
|
+
|
|
67531
|
+
@Field(() => Boolean, { nullable: true })
|
|
67532
|
+
AllowAutoGrow?: boolean;
|
|
67533
|
+
|
|
67534
|
+
@Field(() => Boolean, { nullable: true })
|
|
67535
|
+
IsFrozen?: boolean;
|
|
67536
|
+
|
|
67537
|
+
@Field(() => Int, { nullable: true })
|
|
67538
|
+
MaxChildren: number | null;
|
|
67539
|
+
|
|
67540
|
+
@Field(() => Int, { nullable: true })
|
|
67541
|
+
MaxDescendantDepth: number | null;
|
|
67542
|
+
|
|
67543
|
+
@Field(() => Float, { nullable: true })
|
|
67544
|
+
MinWeight: number | null;
|
|
67545
|
+
|
|
67546
|
+
@Field(() => Boolean, { nullable: true })
|
|
67547
|
+
RequiresReview?: boolean;
|
|
67548
|
+
|
|
67549
|
+
@Field({ nullable: true })
|
|
67550
|
+
EmbeddingVector: string | null;
|
|
67551
|
+
|
|
67552
|
+
@Field({ nullable: true })
|
|
67553
|
+
EmbeddingModelID: string | null;
|
|
67554
|
+
|
|
66805
67555
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
66806
67556
|
RestoreContext___?: RestoreContextInput;
|
|
66807
67557
|
}
|
|
@@ -66833,6 +67583,33 @@ export class UpdateMJTagInput {
|
|
|
66833
67583
|
@Field({ nullable: true })
|
|
66834
67584
|
MergedIntoTagID?: string | null;
|
|
66835
67585
|
|
|
67586
|
+
@Field(() => Boolean, { nullable: true })
|
|
67587
|
+
IsGlobal?: boolean;
|
|
67588
|
+
|
|
67589
|
+
@Field(() => Boolean, { nullable: true })
|
|
67590
|
+
AllowAutoGrow?: boolean;
|
|
67591
|
+
|
|
67592
|
+
@Field(() => Boolean, { nullable: true })
|
|
67593
|
+
IsFrozen?: boolean;
|
|
67594
|
+
|
|
67595
|
+
@Field(() => Int, { nullable: true })
|
|
67596
|
+
MaxChildren?: number | null;
|
|
67597
|
+
|
|
67598
|
+
@Field(() => Int, { nullable: true })
|
|
67599
|
+
MaxDescendantDepth?: number | null;
|
|
67600
|
+
|
|
67601
|
+
@Field(() => Float, { nullable: true })
|
|
67602
|
+
MinWeight?: number | null;
|
|
67603
|
+
|
|
67604
|
+
@Field(() => Boolean, { nullable: true })
|
|
67605
|
+
RequiresReview?: boolean;
|
|
67606
|
+
|
|
67607
|
+
@Field({ nullable: true })
|
|
67608
|
+
EmbeddingVector?: string | null;
|
|
67609
|
+
|
|
67610
|
+
@Field({ nullable: true })
|
|
67611
|
+
EmbeddingModelID?: string | null;
|
|
67612
|
+
|
|
66836
67613
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
66837
67614
|
OldValues___?: KeyValuePairInput[];
|
|
66838
67615
|
|
|
@@ -66937,6 +67714,16 @@ export class MJTagResolver extends ResolverBase {
|
|
|
66937
67714
|
return result;
|
|
66938
67715
|
}
|
|
66939
67716
|
|
|
67717
|
+
@FieldResolver(() => [MJTagSynonym_])
|
|
67718
|
+
async MJTagSynonyms_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67719
|
+
this.CheckUserReadPermissions('MJ: Tag Synonyms', userPayload);
|
|
67720
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67721
|
+
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');
|
|
67722
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
67723
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Synonyms', rows, this.GetUserFromPayload(userPayload));
|
|
67724
|
+
return result;
|
|
67725
|
+
}
|
|
67726
|
+
|
|
66940
67727
|
@FieldResolver(() => [MJTagAuditLog_])
|
|
66941
67728
|
async MJTagAuditLogs_RelatedTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66942
67729
|
this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
|
|
@@ -66957,13 +67744,23 @@ export class MJTagResolver extends ResolverBase {
|
|
|
66957
67744
|
return result;
|
|
66958
67745
|
}
|
|
66959
67746
|
|
|
66960
|
-
@FieldResolver(() => [
|
|
66961
|
-
async
|
|
66962
|
-
this.CheckUserReadPermissions('MJ:
|
|
67747
|
+
@FieldResolver(() => [MJTagScope_])
|
|
67748
|
+
async MJTagScopes_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67749
|
+
this.CheckUserReadPermissions('MJ: Tag Scopes', userPayload);
|
|
66963
67750
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66964
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
67751
|
+
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');
|
|
66965
67752
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
66966
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
67753
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
67754
|
+
return result;
|
|
67755
|
+
}
|
|
67756
|
+
|
|
67757
|
+
@FieldResolver(() => [MJTagSuggestion_])
|
|
67758
|
+
async MJTagSuggestions_ProposedParentIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67759
|
+
this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
|
|
67760
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67761
|
+
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');
|
|
67762
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
67763
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
|
|
66967
67764
|
return result;
|
|
66968
67765
|
}
|
|
66969
67766
|
|
|
@@ -66977,6 +67774,36 @@ export class MJTagResolver extends ResolverBase {
|
|
|
66977
67774
|
return result;
|
|
66978
67775
|
}
|
|
66979
67776
|
|
|
67777
|
+
@FieldResolver(() => [MJTag_])
|
|
67778
|
+
async MJTags_MergedIntoTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67779
|
+
this.CheckUserReadPermissions('MJ: Tags', userPayload);
|
|
67780
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67781
|
+
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');
|
|
67782
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
67783
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tags', rows, this.GetUserFromPayload(userPayload));
|
|
67784
|
+
return result;
|
|
67785
|
+
}
|
|
67786
|
+
|
|
67787
|
+
@FieldResolver(() => [MJTagSuggestion_])
|
|
67788
|
+
async MJTagSuggestions_BestMatchTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67789
|
+
this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
|
|
67790
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67791
|
+
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');
|
|
67792
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
67793
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
|
|
67794
|
+
return result;
|
|
67795
|
+
}
|
|
67796
|
+
|
|
67797
|
+
@FieldResolver(() => [MJTagSuggestion_])
|
|
67798
|
+
async MJTagSuggestions_ResolvedTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67799
|
+
this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
|
|
67800
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67801
|
+
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');
|
|
67802
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
67803
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
|
|
67804
|
+
return result;
|
|
67805
|
+
}
|
|
67806
|
+
|
|
66980
67807
|
@Mutation(() => MJTag_)
|
|
66981
67808
|
async CreateMJTag(
|
|
66982
67809
|
@Arg('input', () => CreateMJTagInput) input: CreateMJTagInput,
|
|
@@ -74468,12 +75295,12 @@ export class MJUser_ {
|
|
|
74468
75295
|
@Field(() => [MJOAuthAuthorizationState_])
|
|
74469
75296
|
MJOAuthAuthorizationStates_UserIDArray: MJOAuthAuthorizationState_[]; // Link to MJOAuthAuthorizationStates
|
|
74470
75297
|
|
|
74471
|
-
@Field(() => [MJOpenApp_])
|
|
74472
|
-
MJOpenApps_InstalledByUserIDArray: MJOpenApp_[]; // Link to MJOpenApps
|
|
74473
|
-
|
|
74474
75298
|
@Field(() => [MJOpenAppInstallHistory_])
|
|
74475
75299
|
MJOpenAppInstallHistories_ExecutedByUserIDArray: MJOpenAppInstallHistory_[]; // Link to MJOpenAppInstallHistories
|
|
74476
75300
|
|
|
75301
|
+
@Field(() => [MJOpenApp_])
|
|
75302
|
+
MJOpenApps_InstalledByUserIDArray: MJOpenApp_[]; // Link to MJOpenApps
|
|
75303
|
+
|
|
74477
75304
|
@Field(() => [MJContentItemDuplicate_])
|
|
74478
75305
|
MJContentItemDuplicates_ResolvedByUserIDArray: MJContentItemDuplicate_[]; // Link to MJContentItemDuplicates
|
|
74479
75306
|
|
|
@@ -74495,6 +75322,9 @@ export class MJUser_ {
|
|
|
74495
75322
|
@Field(() => [MJResourcePermission_])
|
|
74496
75323
|
MJResourcePermissions_SharedByUserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
|
|
74497
75324
|
|
|
75325
|
+
@Field(() => [MJTagSuggestion_])
|
|
75326
|
+
MJTagSuggestions_ReviewedByUserIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
|
|
75327
|
+
|
|
74498
75328
|
@Field(() => [MJResourcePermission_])
|
|
74499
75329
|
MJResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
|
|
74500
75330
|
|
|
@@ -75325,16 +76155,6 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
75325
76155
|
return result;
|
|
75326
76156
|
}
|
|
75327
76157
|
|
|
75328
|
-
@FieldResolver(() => [MJOpenApp_])
|
|
75329
|
-
async MJOpenApps_InstalledByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75330
|
-
this.CheckUserReadPermissions('MJ: Open Apps', userPayload);
|
|
75331
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75332
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenApps')} WHERE ${provider.QuoteIdentifier('InstalledByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Open Apps', userPayload, EntityPermissionType.Read, 'AND');
|
|
75333
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
75334
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open Apps', rows, this.GetUserFromPayload(userPayload));
|
|
75335
|
-
return result;
|
|
75336
|
-
}
|
|
75337
|
-
|
|
75338
76158
|
@FieldResolver(() => [MJOpenAppInstallHistory_])
|
|
75339
76159
|
async MJOpenAppInstallHistories_ExecutedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75340
76160
|
this.CheckUserReadPermissions('MJ: Open App Install Histories', userPayload);
|
|
@@ -75345,6 +76165,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
75345
76165
|
return result;
|
|
75346
76166
|
}
|
|
75347
76167
|
|
|
76168
|
+
@FieldResolver(() => [MJOpenApp_])
|
|
76169
|
+
async MJOpenApps_InstalledByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76170
|
+
this.CheckUserReadPermissions('MJ: Open Apps', userPayload);
|
|
76171
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76172
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenApps')} WHERE ${provider.QuoteIdentifier('InstalledByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Open Apps', userPayload, EntityPermissionType.Read, 'AND');
|
|
76173
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
76174
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open Apps', rows, this.GetUserFromPayload(userPayload));
|
|
76175
|
+
return result;
|
|
76176
|
+
}
|
|
76177
|
+
|
|
75348
76178
|
@FieldResolver(() => [MJContentItemDuplicate_])
|
|
75349
76179
|
async MJContentItemDuplicates_ResolvedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75350
76180
|
this.CheckUserReadPermissions('MJ: Content Item Duplicates', userPayload);
|
|
@@ -75415,6 +76245,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
75415
76245
|
return result;
|
|
75416
76246
|
}
|
|
75417
76247
|
|
|
76248
|
+
@FieldResolver(() => [MJTagSuggestion_])
|
|
76249
|
+
async MJTagSuggestions_ReviewedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76250
|
+
this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
|
|
76251
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76252
|
+
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');
|
|
76253
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
76254
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
|
|
76255
|
+
return result;
|
|
76256
|
+
}
|
|
76257
|
+
|
|
75418
76258
|
@FieldResolver(() => [MJResourcePermission_])
|
|
75419
76259
|
async MJResourcePermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75420
76260
|
this.CheckUserReadPermissions('MJ: Resource Permissions', userPayload);
|