@memberjunction/server 5.22.0 → 5.24.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/README.md +35 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +11 -0
- package/dist/config.js.map +1 -1
- package/dist/generated/generated.d.ts +610 -4
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +17333 -13889
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/RunViewResolver.d.ts.map +1 -1
- package/dist/generic/RunViewResolver.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/resolvers/AutotagPipelineResolver.d.ts +30 -0
- package/dist/resolvers/AutotagPipelineResolver.d.ts.map +1 -0
- package/dist/resolvers/AutotagPipelineResolver.js +231 -0
- package/dist/resolvers/AutotagPipelineResolver.js.map +1 -0
- package/dist/resolvers/ClientToolRequestResolver.d.ts +43 -0
- package/dist/resolvers/ClientToolRequestResolver.d.ts.map +1 -0
- package/dist/resolvers/ClientToolRequestResolver.js +161 -0
- package/dist/resolvers/ClientToolRequestResolver.js.map +1 -0
- package/dist/resolvers/FetchEntityVectorsResolver.d.ts +29 -0
- package/dist/resolvers/FetchEntityVectorsResolver.d.ts.map +1 -0
- package/dist/resolvers/FetchEntityVectorsResolver.js +222 -0
- package/dist/resolvers/FetchEntityVectorsResolver.js.map +1 -0
- package/dist/resolvers/RunAIAgentResolver.d.ts +21 -0
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +75 -33
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.d.ts +42 -1
- package/dist/resolvers/SearchKnowledgeResolver.d.ts.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.js +239 -13
- package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -1
- package/package.json +63 -63
- package/src/__tests__/search-knowledge-tags.test.ts +415 -0
- package/src/config.ts +11 -0
- package/src/generated/generated.ts +2373 -7
- package/src/generic/RunViewResolver.ts +1 -0
- package/src/index.ts +10 -0
- package/src/resolvers/AutotagPipelineResolver.ts +235 -0
- package/src/resolvers/ClientToolRequestResolver.ts +128 -0
- package/src/resolvers/FetchEntityVectorsResolver.ts +238 -0
- package/src/resolvers/RunAIAgentResolver.ts +97 -56
- package/src/resolvers/SearchKnowledgeResolver.ts +270 -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, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, 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, MJApplicationSettingEntity, MJApplicationEntity, 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, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, 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, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSkillEntity, MJSQLDialectEntity, 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, MJApplicationSettingEntity, MJApplicationEntity, 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, 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, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSkillEntity, MJSQLDialectEntity, 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';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -3217,6 +3217,177 @@ export class MJAIAgentCategoryResolver extends ResolverBase {
|
|
|
3217
3217
|
|
|
3218
3218
|
}
|
|
3219
3219
|
|
|
3220
|
+
//****************************************************************************
|
|
3221
|
+
// ENTITY CLASS for MJ: AI Agent Client Tools
|
|
3222
|
+
//****************************************************************************
|
|
3223
|
+
@ObjectType()
|
|
3224
|
+
export class MJAIAgentClientTool_ {
|
|
3225
|
+
@Field()
|
|
3226
|
+
@MaxLength(36)
|
|
3227
|
+
ID: string;
|
|
3228
|
+
|
|
3229
|
+
@Field()
|
|
3230
|
+
@MaxLength(36)
|
|
3231
|
+
AgentID: string;
|
|
3232
|
+
|
|
3233
|
+
@Field()
|
|
3234
|
+
@MaxLength(36)
|
|
3235
|
+
ClientToolDefinitionID: string;
|
|
3236
|
+
|
|
3237
|
+
@Field(() => Boolean, {description: `When true, the agent expects this tool to always be available on the client. If the client has not registered a handler, agent execution may warn or fail depending on configuration.`})
|
|
3238
|
+
IsRequired: boolean;
|
|
3239
|
+
|
|
3240
|
+
@Field(() => Int, {description: `Sort order for tool listing in prompts. Lower numbers appear first. Tools with the same priority are listed alphabetically.`})
|
|
3241
|
+
Priority: number;
|
|
3242
|
+
|
|
3243
|
+
@Field()
|
|
3244
|
+
_mj__CreatedAt: Date;
|
|
3245
|
+
|
|
3246
|
+
@Field()
|
|
3247
|
+
_mj__UpdatedAt: Date;
|
|
3248
|
+
|
|
3249
|
+
@Field({nullable: true})
|
|
3250
|
+
@MaxLength(255)
|
|
3251
|
+
Agent?: string;
|
|
3252
|
+
|
|
3253
|
+
@Field()
|
|
3254
|
+
@MaxLength(200)
|
|
3255
|
+
ClientToolDefinition: string;
|
|
3256
|
+
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
//****************************************************************************
|
|
3260
|
+
// INPUT TYPE for MJ: AI Agent Client Tools
|
|
3261
|
+
//****************************************************************************
|
|
3262
|
+
@InputType()
|
|
3263
|
+
export class CreateMJAIAgentClientToolInput {
|
|
3264
|
+
@Field({ nullable: true })
|
|
3265
|
+
ID?: string;
|
|
3266
|
+
|
|
3267
|
+
@Field({ nullable: true })
|
|
3268
|
+
AgentID?: string;
|
|
3269
|
+
|
|
3270
|
+
@Field({ nullable: true })
|
|
3271
|
+
ClientToolDefinitionID?: string;
|
|
3272
|
+
|
|
3273
|
+
@Field(() => Boolean, { nullable: true })
|
|
3274
|
+
IsRequired?: boolean;
|
|
3275
|
+
|
|
3276
|
+
@Field(() => Int, { nullable: true })
|
|
3277
|
+
Priority?: number;
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
|
|
3281
|
+
//****************************************************************************
|
|
3282
|
+
// INPUT TYPE for MJ: AI Agent Client Tools
|
|
3283
|
+
//****************************************************************************
|
|
3284
|
+
@InputType()
|
|
3285
|
+
export class UpdateMJAIAgentClientToolInput {
|
|
3286
|
+
@Field()
|
|
3287
|
+
ID: string;
|
|
3288
|
+
|
|
3289
|
+
@Field({ nullable: true })
|
|
3290
|
+
AgentID?: string;
|
|
3291
|
+
|
|
3292
|
+
@Field({ nullable: true })
|
|
3293
|
+
ClientToolDefinitionID?: string;
|
|
3294
|
+
|
|
3295
|
+
@Field(() => Boolean, { nullable: true })
|
|
3296
|
+
IsRequired?: boolean;
|
|
3297
|
+
|
|
3298
|
+
@Field(() => Int, { nullable: true })
|
|
3299
|
+
Priority?: number;
|
|
3300
|
+
|
|
3301
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
3302
|
+
OldValues___?: KeyValuePairInput[];
|
|
3303
|
+
}
|
|
3304
|
+
|
|
3305
|
+
//****************************************************************************
|
|
3306
|
+
// RESOLVER for MJ: AI Agent Client Tools
|
|
3307
|
+
//****************************************************************************
|
|
3308
|
+
@ObjectType()
|
|
3309
|
+
export class RunMJAIAgentClientToolViewResult {
|
|
3310
|
+
@Field(() => [MJAIAgentClientTool_])
|
|
3311
|
+
Results: MJAIAgentClientTool_[];
|
|
3312
|
+
|
|
3313
|
+
@Field(() => String, {nullable: true})
|
|
3314
|
+
UserViewRunID?: string;
|
|
3315
|
+
|
|
3316
|
+
@Field(() => Int, {nullable: true})
|
|
3317
|
+
RowCount: number;
|
|
3318
|
+
|
|
3319
|
+
@Field(() => Int, {nullable: true})
|
|
3320
|
+
TotalRowCount: number;
|
|
3321
|
+
|
|
3322
|
+
@Field(() => Int, {nullable: true})
|
|
3323
|
+
ExecutionTime: number;
|
|
3324
|
+
|
|
3325
|
+
@Field({nullable: true})
|
|
3326
|
+
ErrorMessage?: string;
|
|
3327
|
+
|
|
3328
|
+
@Field(() => Boolean, {nullable: false})
|
|
3329
|
+
Success: boolean;
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
@Resolver(MJAIAgentClientTool_)
|
|
3333
|
+
export class MJAIAgentClientToolResolver extends ResolverBase {
|
|
3334
|
+
@Query(() => RunMJAIAgentClientToolViewResult)
|
|
3335
|
+
async RunMJAIAgentClientToolViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3336
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3337
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
@Query(() => RunMJAIAgentClientToolViewResult)
|
|
3341
|
+
async RunMJAIAgentClientToolViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3342
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3343
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
@Query(() => RunMJAIAgentClientToolViewResult)
|
|
3347
|
+
async RunMJAIAgentClientToolDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3348
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3349
|
+
input.EntityName = 'MJ: AI Agent Client Tools';
|
|
3350
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
3351
|
+
}
|
|
3352
|
+
@Query(() => MJAIAgentClientTool_, { nullable: true })
|
|
3353
|
+
async MJAIAgentClientTool(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentClientTool_ | null> {
|
|
3354
|
+
this.CheckUserReadPermissions('MJ: AI Agent Client Tools', userPayload);
|
|
3355
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3356
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentClientTools')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Client Tools', userPayload, EntityPermissionType.Read, 'AND');
|
|
3357
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
3358
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Client Tools', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
3359
|
+
return result;
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
@Mutation(() => MJAIAgentClientTool_)
|
|
3363
|
+
async CreateMJAIAgentClientTool(
|
|
3364
|
+
@Arg('input', () => CreateMJAIAgentClientToolInput) input: CreateMJAIAgentClientToolInput,
|
|
3365
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
3366
|
+
@PubSub() pubSub: PubSubEngine
|
|
3367
|
+
) {
|
|
3368
|
+
const provider = GetReadWriteProvider(providers);
|
|
3369
|
+
return this.CreateRecord('MJ: AI Agent Client Tools', input, provider, userPayload, pubSub)
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
@Mutation(() => MJAIAgentClientTool_)
|
|
3373
|
+
async UpdateMJAIAgentClientTool(
|
|
3374
|
+
@Arg('input', () => UpdateMJAIAgentClientToolInput) input: UpdateMJAIAgentClientToolInput,
|
|
3375
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
3376
|
+
@PubSub() pubSub: PubSubEngine
|
|
3377
|
+
) {
|
|
3378
|
+
const provider = GetReadWriteProvider(providers);
|
|
3379
|
+
return this.UpdateRecord('MJ: AI Agent Client Tools', input, provider, userPayload, pubSub);
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3382
|
+
@Mutation(() => MJAIAgentClientTool_)
|
|
3383
|
+
async DeleteMJAIAgentClientTool(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3384
|
+
const provider = GetReadWriteProvider(providers);
|
|
3385
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
3386
|
+
return this.DeleteRecord('MJ: AI Agent Client Tools', key, options, provider, userPayload, pubSub);
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3220
3391
|
//****************************************************************************
|
|
3221
3392
|
// ENTITY CLASS for MJ: AI Agent Configurations
|
|
3222
3393
|
//****************************************************************************
|
|
@@ -8668,6 +8839,9 @@ if this limit is exceeded.`})
|
|
|
8668
8839
|
@MaxLength(36)
|
|
8669
8840
|
CategoryID?: string;
|
|
8670
8841
|
|
|
8842
|
+
@Field(() => Boolean, {description: `When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance.`})
|
|
8843
|
+
AllowEphemeralClientTools: boolean;
|
|
8844
|
+
|
|
8671
8845
|
@Field({nullable: true})
|
|
8672
8846
|
@MaxLength(255)
|
|
8673
8847
|
Parent?: string;
|
|
@@ -8730,6 +8904,9 @@ if this limit is exceeded.`})
|
|
|
8730
8904
|
@Field(() => [MJAIAgentModality_])
|
|
8731
8905
|
MJAIAgentModalities_AgentIDArray: MJAIAgentModality_[]; // Link to MJAIAgentModalities
|
|
8732
8906
|
|
|
8907
|
+
@Field(() => [MJAIAgentClientTool_])
|
|
8908
|
+
MJAIAgentClientTools_AgentIDArray: MJAIAgentClientTool_[]; // Link to MJAIAgentClientTools
|
|
8909
|
+
|
|
8733
8910
|
@Field(() => [MJAIAgentNote_])
|
|
8734
8911
|
MJAIAgentNotes_AgentIDArray: MJAIAgentNote_[]; // Link to MJAIAgentNotes
|
|
8735
8912
|
|
|
@@ -8952,6 +9129,9 @@ export class CreateMJAIAgentInput {
|
|
|
8952
9129
|
|
|
8953
9130
|
@Field({ nullable: true })
|
|
8954
9131
|
CategoryID: string | null;
|
|
9132
|
+
|
|
9133
|
+
@Field(() => Boolean, { nullable: true })
|
|
9134
|
+
AllowEphemeralClientTools?: boolean;
|
|
8955
9135
|
}
|
|
8956
9136
|
|
|
8957
9137
|
|
|
@@ -9140,6 +9320,9 @@ export class UpdateMJAIAgentInput {
|
|
|
9140
9320
|
@Field({ nullable: true })
|
|
9141
9321
|
CategoryID?: string | null;
|
|
9142
9322
|
|
|
9323
|
+
@Field(() => Boolean, { nullable: true })
|
|
9324
|
+
AllowEphemeralClientTools?: boolean;
|
|
9325
|
+
|
|
9143
9326
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
9144
9327
|
OldValues___?: KeyValuePairInput[];
|
|
9145
9328
|
}
|
|
@@ -9301,6 +9484,16 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
9301
9484
|
return result;
|
|
9302
9485
|
}
|
|
9303
9486
|
|
|
9487
|
+
@FieldResolver(() => [MJAIAgentClientTool_])
|
|
9488
|
+
async MJAIAgentClientTools_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9489
|
+
this.CheckUserReadPermissions('MJ: AI Agent Client Tools', userPayload);
|
|
9490
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9491
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentClientTools')} WHERE ${provider.QuoteIdentifier('AgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Client Tools', userPayload, EntityPermissionType.Read, 'AND');
|
|
9492
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
9493
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Client Tools', rows, this.GetUserFromPayload(userPayload));
|
|
9494
|
+
return result;
|
|
9495
|
+
}
|
|
9496
|
+
|
|
9304
9497
|
@FieldResolver(() => [MJAIAgentNote_])
|
|
9305
9498
|
async MJAIAgentNotes_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9306
9499
|
this.CheckUserReadPermissions('MJ: AI Agent Notes', userPayload);
|
|
@@ -9677,6 +9870,210 @@ export class MJAIArchitectureResolver extends ResolverBase {
|
|
|
9677
9870
|
|
|
9678
9871
|
}
|
|
9679
9872
|
|
|
9873
|
+
//****************************************************************************
|
|
9874
|
+
// ENTITY CLASS for MJ: AI Client Tool Definitions
|
|
9875
|
+
//****************************************************************************
|
|
9876
|
+
@ObjectType()
|
|
9877
|
+
export class MJAIClientToolDefinition_ {
|
|
9878
|
+
@Field()
|
|
9879
|
+
@MaxLength(36)
|
|
9880
|
+
ID: string;
|
|
9881
|
+
|
|
9882
|
+
@Field({description: `Unique identifier for the client tool (e.g., NavigateToApp, NavigateToRecord). Used to match tool invocations from the LLM to registered handlers on the client.`})
|
|
9883
|
+
@MaxLength(200)
|
|
9884
|
+
Name: string;
|
|
9885
|
+
|
|
9886
|
+
@Field({description: `Human-readable description of what the tool does. This text is injected into the LLM system prompt so it knows when and how to use the tool.`})
|
|
9887
|
+
Description: string;
|
|
9888
|
+
|
|
9889
|
+
@Field({nullable: true, description: `Tool category for grouping and filtering (e.g., navigation, form, display, data).`})
|
|
9890
|
+
@MaxLength(50)
|
|
9891
|
+
Category?: string;
|
|
9892
|
+
|
|
9893
|
+
@Field({nullable: true, description: `JSON Schema defining the input parameters the tool accepts. Included in the LLM prompt so it generates valid parameter objects.`})
|
|
9894
|
+
InputSchemaJSON?: string;
|
|
9895
|
+
|
|
9896
|
+
@Field({nullable: true, description: `JSON Schema describing the return value from the tool. Optional — used for documentation and LLM context.`})
|
|
9897
|
+
OutputSchemaJSON?: string;
|
|
9898
|
+
|
|
9899
|
+
@Field(() => Int, {nullable: true, description: `Default timeout in milliseconds for this tool. Can be overridden per-invocation by the LLM or per-run by execution params. Default is 30000ms (30 seconds).`})
|
|
9900
|
+
DefaultTimeoutMs?: number;
|
|
9901
|
+
|
|
9902
|
+
@Field({nullable: true, description: `When set, the client only sends this tool to the server when the user is in the specified context (e.g., entity-form, dashboard, search). Null means the tool is always available.`})
|
|
9903
|
+
@MaxLength(100)
|
|
9904
|
+
RequiresContextType?: string;
|
|
9905
|
+
|
|
9906
|
+
@Field()
|
|
9907
|
+
_mj__CreatedAt: Date;
|
|
9908
|
+
|
|
9909
|
+
@Field()
|
|
9910
|
+
_mj__UpdatedAt: Date;
|
|
9911
|
+
|
|
9912
|
+
@Field(() => [MJAIAgentClientTool_])
|
|
9913
|
+
MJAIAgentClientTools_ClientToolDefinitionIDArray: MJAIAgentClientTool_[]; // Link to MJAIAgentClientTools
|
|
9914
|
+
|
|
9915
|
+
}
|
|
9916
|
+
|
|
9917
|
+
//****************************************************************************
|
|
9918
|
+
// INPUT TYPE for MJ: AI Client Tool Definitions
|
|
9919
|
+
//****************************************************************************
|
|
9920
|
+
@InputType()
|
|
9921
|
+
export class CreateMJAIClientToolDefinitionInput {
|
|
9922
|
+
@Field({ nullable: true })
|
|
9923
|
+
ID?: string;
|
|
9924
|
+
|
|
9925
|
+
@Field({ nullable: true })
|
|
9926
|
+
Name?: string;
|
|
9927
|
+
|
|
9928
|
+
@Field({ nullable: true })
|
|
9929
|
+
Description?: string;
|
|
9930
|
+
|
|
9931
|
+
@Field({ nullable: true })
|
|
9932
|
+
Category: string | null;
|
|
9933
|
+
|
|
9934
|
+
@Field({ nullable: true })
|
|
9935
|
+
InputSchemaJSON: string | null;
|
|
9936
|
+
|
|
9937
|
+
@Field({ nullable: true })
|
|
9938
|
+
OutputSchemaJSON: string | null;
|
|
9939
|
+
|
|
9940
|
+
@Field(() => Int, { nullable: true })
|
|
9941
|
+
DefaultTimeoutMs?: number | null;
|
|
9942
|
+
|
|
9943
|
+
@Field({ nullable: true })
|
|
9944
|
+
RequiresContextType: string | null;
|
|
9945
|
+
}
|
|
9946
|
+
|
|
9947
|
+
|
|
9948
|
+
//****************************************************************************
|
|
9949
|
+
// INPUT TYPE for MJ: AI Client Tool Definitions
|
|
9950
|
+
//****************************************************************************
|
|
9951
|
+
@InputType()
|
|
9952
|
+
export class UpdateMJAIClientToolDefinitionInput {
|
|
9953
|
+
@Field()
|
|
9954
|
+
ID: string;
|
|
9955
|
+
|
|
9956
|
+
@Field({ nullable: true })
|
|
9957
|
+
Name?: string;
|
|
9958
|
+
|
|
9959
|
+
@Field({ nullable: true })
|
|
9960
|
+
Description?: string;
|
|
9961
|
+
|
|
9962
|
+
@Field({ nullable: true })
|
|
9963
|
+
Category?: string | null;
|
|
9964
|
+
|
|
9965
|
+
@Field({ nullable: true })
|
|
9966
|
+
InputSchemaJSON?: string | null;
|
|
9967
|
+
|
|
9968
|
+
@Field({ nullable: true })
|
|
9969
|
+
OutputSchemaJSON?: string | null;
|
|
9970
|
+
|
|
9971
|
+
@Field(() => Int, { nullable: true })
|
|
9972
|
+
DefaultTimeoutMs?: number | null;
|
|
9973
|
+
|
|
9974
|
+
@Field({ nullable: true })
|
|
9975
|
+
RequiresContextType?: string | null;
|
|
9976
|
+
|
|
9977
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
9978
|
+
OldValues___?: KeyValuePairInput[];
|
|
9979
|
+
}
|
|
9980
|
+
|
|
9981
|
+
//****************************************************************************
|
|
9982
|
+
// RESOLVER for MJ: AI Client Tool Definitions
|
|
9983
|
+
//****************************************************************************
|
|
9984
|
+
@ObjectType()
|
|
9985
|
+
export class RunMJAIClientToolDefinitionViewResult {
|
|
9986
|
+
@Field(() => [MJAIClientToolDefinition_])
|
|
9987
|
+
Results: MJAIClientToolDefinition_[];
|
|
9988
|
+
|
|
9989
|
+
@Field(() => String, {nullable: true})
|
|
9990
|
+
UserViewRunID?: string;
|
|
9991
|
+
|
|
9992
|
+
@Field(() => Int, {nullable: true})
|
|
9993
|
+
RowCount: number;
|
|
9994
|
+
|
|
9995
|
+
@Field(() => Int, {nullable: true})
|
|
9996
|
+
TotalRowCount: number;
|
|
9997
|
+
|
|
9998
|
+
@Field(() => Int, {nullable: true})
|
|
9999
|
+
ExecutionTime: number;
|
|
10000
|
+
|
|
10001
|
+
@Field({nullable: true})
|
|
10002
|
+
ErrorMessage?: string;
|
|
10003
|
+
|
|
10004
|
+
@Field(() => Boolean, {nullable: false})
|
|
10005
|
+
Success: boolean;
|
|
10006
|
+
}
|
|
10007
|
+
|
|
10008
|
+
@Resolver(MJAIClientToolDefinition_)
|
|
10009
|
+
export class MJAIClientToolDefinitionResolver extends ResolverBase {
|
|
10010
|
+
@Query(() => RunMJAIClientToolDefinitionViewResult)
|
|
10011
|
+
async RunMJAIClientToolDefinitionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10012
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10013
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
10014
|
+
}
|
|
10015
|
+
|
|
10016
|
+
@Query(() => RunMJAIClientToolDefinitionViewResult)
|
|
10017
|
+
async RunMJAIClientToolDefinitionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10018
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10019
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
10020
|
+
}
|
|
10021
|
+
|
|
10022
|
+
@Query(() => RunMJAIClientToolDefinitionViewResult)
|
|
10023
|
+
async RunMJAIClientToolDefinitionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10024
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10025
|
+
input.EntityName = 'MJ: AI Client Tool Definitions';
|
|
10026
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
10027
|
+
}
|
|
10028
|
+
@Query(() => MJAIClientToolDefinition_, { nullable: true })
|
|
10029
|
+
async MJAIClientToolDefinition(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIClientToolDefinition_ | null> {
|
|
10030
|
+
this.CheckUserReadPermissions('MJ: AI Client Tool Definitions', userPayload);
|
|
10031
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10032
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIClientToolDefinitions')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Client Tool Definitions', userPayload, EntityPermissionType.Read, 'AND');
|
|
10033
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
10034
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Client Tool Definitions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
10035
|
+
return result;
|
|
10036
|
+
}
|
|
10037
|
+
|
|
10038
|
+
@FieldResolver(() => [MJAIAgentClientTool_])
|
|
10039
|
+
async MJAIAgentClientTools_ClientToolDefinitionIDArray(@Root() mjaiclienttooldefinition_: MJAIClientToolDefinition_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10040
|
+
this.CheckUserReadPermissions('MJ: AI Agent Client Tools', userPayload);
|
|
10041
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10042
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentClientTools')} WHERE ${provider.QuoteIdentifier('ClientToolDefinitionID')}='${mjaiclienttooldefinition_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Client Tools', userPayload, EntityPermissionType.Read, 'AND');
|
|
10043
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
10044
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Client Tools', rows, this.GetUserFromPayload(userPayload));
|
|
10045
|
+
return result;
|
|
10046
|
+
}
|
|
10047
|
+
|
|
10048
|
+
@Mutation(() => MJAIClientToolDefinition_)
|
|
10049
|
+
async CreateMJAIClientToolDefinition(
|
|
10050
|
+
@Arg('input', () => CreateMJAIClientToolDefinitionInput) input: CreateMJAIClientToolDefinitionInput,
|
|
10051
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
10052
|
+
@PubSub() pubSub: PubSubEngine
|
|
10053
|
+
) {
|
|
10054
|
+
const provider = GetReadWriteProvider(providers);
|
|
10055
|
+
return this.CreateRecord('MJ: AI Client Tool Definitions', input, provider, userPayload, pubSub)
|
|
10056
|
+
}
|
|
10057
|
+
|
|
10058
|
+
@Mutation(() => MJAIClientToolDefinition_)
|
|
10059
|
+
async UpdateMJAIClientToolDefinition(
|
|
10060
|
+
@Arg('input', () => UpdateMJAIClientToolDefinitionInput) input: UpdateMJAIClientToolDefinitionInput,
|
|
10061
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
10062
|
+
@PubSub() pubSub: PubSubEngine
|
|
10063
|
+
) {
|
|
10064
|
+
const provider = GetReadWriteProvider(providers);
|
|
10065
|
+
return this.UpdateRecord('MJ: AI Client Tool Definitions', input, provider, userPayload, pubSub);
|
|
10066
|
+
}
|
|
10067
|
+
|
|
10068
|
+
@Mutation(() => MJAIClientToolDefinition_)
|
|
10069
|
+
async DeleteMJAIClientToolDefinition(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10070
|
+
const provider = GetReadWriteProvider(providers);
|
|
10071
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
10072
|
+
return this.DeleteRecord('MJ: AI Client Tool Definitions', key, options, provider, userPayload, pubSub);
|
|
10073
|
+
}
|
|
10074
|
+
|
|
10075
|
+
}
|
|
10076
|
+
|
|
9680
10077
|
//****************************************************************************
|
|
9681
10078
|
// ENTITY CLASS for MJ: AI Configuration Params
|
|
9682
10079
|
//****************************************************************************
|
|
@@ -12501,9 +12898,18 @@ export class MJAIModel_ {
|
|
|
12501
12898
|
@Field(() => [MJAIModelCost_])
|
|
12502
12899
|
MJAIModelCosts_ModelIDArray: MJAIModelCost_[]; // Link to MJAIModelCosts
|
|
12503
12900
|
|
|
12901
|
+
@Field(() => [MJContentType_])
|
|
12902
|
+
MJContentTypes_EmbeddingModelIDArray: MJContentType_[]; // Link to MJContentTypes
|
|
12903
|
+
|
|
12904
|
+
@Field(() => [MJContentItem_])
|
|
12905
|
+
MJContentItems_EmbeddingModelIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
12906
|
+
|
|
12504
12907
|
@Field(() => [MJAIPromptModel_])
|
|
12505
12908
|
MJAIPromptModels_ModelIDArray: MJAIPromptModel_[]; // Link to MJAIPromptModels
|
|
12506
12909
|
|
|
12910
|
+
@Field(() => [MJContentSource_])
|
|
12911
|
+
MJContentSources_EmbeddingModelIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
12912
|
+
|
|
12507
12913
|
@Field(() => [MJAIPromptRun_])
|
|
12508
12914
|
MJAIPromptRuns_OriginalModelIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
12509
12915
|
|
|
@@ -12874,6 +13280,26 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
12874
13280
|
return result;
|
|
12875
13281
|
}
|
|
12876
13282
|
|
|
13283
|
+
@FieldResolver(() => [MJContentType_])
|
|
13284
|
+
async MJContentTypes_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13285
|
+
this.CheckUserReadPermissions('MJ: Content Types', userPayload);
|
|
13286
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13287
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentTypes')} WHERE ${provider.QuoteIdentifier('EmbeddingModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
13288
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
13289
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Types', rows, this.GetUserFromPayload(userPayload));
|
|
13290
|
+
return result;
|
|
13291
|
+
}
|
|
13292
|
+
|
|
13293
|
+
@FieldResolver(() => [MJContentItem_])
|
|
13294
|
+
async MJContentItems_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13295
|
+
this.CheckUserReadPermissions('MJ: Content Items', userPayload);
|
|
13296
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13297
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItems')} WHERE ${provider.QuoteIdentifier('EmbeddingModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
13298
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
13299
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Items', rows, this.GetUserFromPayload(userPayload));
|
|
13300
|
+
return result;
|
|
13301
|
+
}
|
|
13302
|
+
|
|
12877
13303
|
@FieldResolver(() => [MJAIPromptModel_])
|
|
12878
13304
|
async MJAIPromptModels_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12879
13305
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
@@ -12884,6 +13310,16 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
12884
13310
|
return result;
|
|
12885
13311
|
}
|
|
12886
13312
|
|
|
13313
|
+
@FieldResolver(() => [MJContentSource_])
|
|
13314
|
+
async MJContentSources_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13315
|
+
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
13316
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13317
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('EmbeddingModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
13318
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
13319
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
13320
|
+
return result;
|
|
13321
|
+
}
|
|
13322
|
+
|
|
12887
13323
|
@FieldResolver(() => [MJAIPromptRun_])
|
|
12888
13324
|
async MJAIPromptRuns_OriginalModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12889
13325
|
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
@@ -14041,6 +14477,9 @@ export class MJAIPromptRun_ {
|
|
|
14041
14477
|
@MaxLength(36)
|
|
14042
14478
|
RootRerunFromPromptRunID?: string;
|
|
14043
14479
|
|
|
14480
|
+
@Field(() => [MJContentProcessRunPromptRun_])
|
|
14481
|
+
MJContentProcessRunPromptRuns_AIPromptRunIDArray: MJContentProcessRunPromptRun_[]; // Link to MJContentProcessRunPromptRuns
|
|
14482
|
+
|
|
14044
14483
|
@Field(() => [MJAIPromptRun_])
|
|
14045
14484
|
MJAIPromptRuns_RerunFromPromptRunIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
14046
14485
|
|
|
@@ -14626,6 +15065,16 @@ export class MJAIPromptRunResolver extends ResolverBase {
|
|
|
14626
15065
|
return result;
|
|
14627
15066
|
}
|
|
14628
15067
|
|
|
15068
|
+
@FieldResolver(() => [MJContentProcessRunPromptRun_])
|
|
15069
|
+
async MJContentProcessRunPromptRuns_AIPromptRunIDArray(@Root() mjaipromptrun_: MJAIPromptRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15070
|
+
this.CheckUserReadPermissions('MJ: Content Process Run Prompt Runs', userPayload);
|
|
15071
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15072
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRunPromptRuns')} WHERE ${provider.QuoteIdentifier('AIPromptRunID')}='${mjaipromptrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Run Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
15073
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
15074
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Process Run Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
15075
|
+
return result;
|
|
15076
|
+
}
|
|
15077
|
+
|
|
14629
15078
|
@FieldResolver(() => [MJAIPromptRun_])
|
|
14630
15079
|
async MJAIPromptRuns_RerunFromPromptRunIDArray(@Root() mjaipromptrun_: MJAIPromptRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14631
15080
|
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
@@ -26346,6 +26795,221 @@ export class MJContentItemAttributeResolver extends ResolverBase {
|
|
|
26346
26795
|
|
|
26347
26796
|
}
|
|
26348
26797
|
|
|
26798
|
+
//****************************************************************************
|
|
26799
|
+
// ENTITY CLASS for MJ: Content Item Duplicates
|
|
26800
|
+
//****************************************************************************
|
|
26801
|
+
@ObjectType({ description: `Detected duplicate or near-duplicate content items across sources. Each row represents a pair of items with similarity scoring and resolution tracking.` })
|
|
26802
|
+
export class MJContentItemDuplicate_ {
|
|
26803
|
+
@Field()
|
|
26804
|
+
@MaxLength(36)
|
|
26805
|
+
ID: string;
|
|
26806
|
+
|
|
26807
|
+
@Field()
|
|
26808
|
+
@MaxLength(36)
|
|
26809
|
+
ContentItemAID: string;
|
|
26810
|
+
|
|
26811
|
+
@Field()
|
|
26812
|
+
@MaxLength(36)
|
|
26813
|
+
ContentItemBID: string;
|
|
26814
|
+
|
|
26815
|
+
@Field(() => Float, {description: `Cosine similarity (for Vector) or exact match score (1.0 for Checksum/URL). Range 0.0-1.0.`})
|
|
26816
|
+
SimilarityScore: number;
|
|
26817
|
+
|
|
26818
|
+
@Field({description: `How the duplicate was detected: Checksum (identical text hash), Vector (embedding similarity), Title (same title text), URL (same source URL).`})
|
|
26819
|
+
@MaxLength(30)
|
|
26820
|
+
DetectionMethod: string;
|
|
26821
|
+
|
|
26822
|
+
@Field({description: `Current status: Pending (awaiting review), Confirmed (verified duplicate), Dismissed (not a duplicate), Merged (one item was removed).`})
|
|
26823
|
+
@MaxLength(20)
|
|
26824
|
+
Status: string;
|
|
26825
|
+
|
|
26826
|
+
@Field({nullable: true})
|
|
26827
|
+
@MaxLength(36)
|
|
26828
|
+
ResolvedByUserID?: string;
|
|
26829
|
+
|
|
26830
|
+
@Field({nullable: true})
|
|
26831
|
+
ResolvedAt?: Date;
|
|
26832
|
+
|
|
26833
|
+
@Field({nullable: true, description: `How the duplicate was resolved: KeepA (keep first, remove second), KeepB (keep second, remove first), MergeBoth (combine into one), NotDuplicate (false positive).`})
|
|
26834
|
+
@MaxLength(20)
|
|
26835
|
+
Resolution?: string;
|
|
26836
|
+
|
|
26837
|
+
@Field()
|
|
26838
|
+
_mj__CreatedAt: Date;
|
|
26839
|
+
|
|
26840
|
+
@Field()
|
|
26841
|
+
_mj__UpdatedAt: Date;
|
|
26842
|
+
|
|
26843
|
+
@Field({nullable: true})
|
|
26844
|
+
@MaxLength(250)
|
|
26845
|
+
ContentItemA?: string;
|
|
26846
|
+
|
|
26847
|
+
@Field({nullable: true})
|
|
26848
|
+
@MaxLength(250)
|
|
26849
|
+
ContentItemB?: string;
|
|
26850
|
+
|
|
26851
|
+
@Field({nullable: true})
|
|
26852
|
+
@MaxLength(100)
|
|
26853
|
+
ResolvedByUser?: string;
|
|
26854
|
+
|
|
26855
|
+
}
|
|
26856
|
+
|
|
26857
|
+
//****************************************************************************
|
|
26858
|
+
// INPUT TYPE for MJ: Content Item Duplicates
|
|
26859
|
+
//****************************************************************************
|
|
26860
|
+
@InputType()
|
|
26861
|
+
export class CreateMJContentItemDuplicateInput {
|
|
26862
|
+
@Field({ nullable: true })
|
|
26863
|
+
ID?: string;
|
|
26864
|
+
|
|
26865
|
+
@Field({ nullable: true })
|
|
26866
|
+
ContentItemAID?: string;
|
|
26867
|
+
|
|
26868
|
+
@Field({ nullable: true })
|
|
26869
|
+
ContentItemBID?: string;
|
|
26870
|
+
|
|
26871
|
+
@Field(() => Float, { nullable: true })
|
|
26872
|
+
SimilarityScore?: number;
|
|
26873
|
+
|
|
26874
|
+
@Field({ nullable: true })
|
|
26875
|
+
DetectionMethod?: string;
|
|
26876
|
+
|
|
26877
|
+
@Field({ nullable: true })
|
|
26878
|
+
Status?: string;
|
|
26879
|
+
|
|
26880
|
+
@Field({ nullable: true })
|
|
26881
|
+
ResolvedByUserID: string | null;
|
|
26882
|
+
|
|
26883
|
+
@Field({ nullable: true })
|
|
26884
|
+
ResolvedAt: Date | null;
|
|
26885
|
+
|
|
26886
|
+
@Field({ nullable: true })
|
|
26887
|
+
Resolution: string | null;
|
|
26888
|
+
}
|
|
26889
|
+
|
|
26890
|
+
|
|
26891
|
+
//****************************************************************************
|
|
26892
|
+
// INPUT TYPE for MJ: Content Item Duplicates
|
|
26893
|
+
//****************************************************************************
|
|
26894
|
+
@InputType()
|
|
26895
|
+
export class UpdateMJContentItemDuplicateInput {
|
|
26896
|
+
@Field()
|
|
26897
|
+
ID: string;
|
|
26898
|
+
|
|
26899
|
+
@Field({ nullable: true })
|
|
26900
|
+
ContentItemAID?: string;
|
|
26901
|
+
|
|
26902
|
+
@Field({ nullable: true })
|
|
26903
|
+
ContentItemBID?: string;
|
|
26904
|
+
|
|
26905
|
+
@Field(() => Float, { nullable: true })
|
|
26906
|
+
SimilarityScore?: number;
|
|
26907
|
+
|
|
26908
|
+
@Field({ nullable: true })
|
|
26909
|
+
DetectionMethod?: string;
|
|
26910
|
+
|
|
26911
|
+
@Field({ nullable: true })
|
|
26912
|
+
Status?: string;
|
|
26913
|
+
|
|
26914
|
+
@Field({ nullable: true })
|
|
26915
|
+
ResolvedByUserID?: string | null;
|
|
26916
|
+
|
|
26917
|
+
@Field({ nullable: true })
|
|
26918
|
+
ResolvedAt?: Date | null;
|
|
26919
|
+
|
|
26920
|
+
@Field({ nullable: true })
|
|
26921
|
+
Resolution?: string | null;
|
|
26922
|
+
|
|
26923
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
26924
|
+
OldValues___?: KeyValuePairInput[];
|
|
26925
|
+
}
|
|
26926
|
+
|
|
26927
|
+
//****************************************************************************
|
|
26928
|
+
// RESOLVER for MJ: Content Item Duplicates
|
|
26929
|
+
//****************************************************************************
|
|
26930
|
+
@ObjectType()
|
|
26931
|
+
export class RunMJContentItemDuplicateViewResult {
|
|
26932
|
+
@Field(() => [MJContentItemDuplicate_])
|
|
26933
|
+
Results: MJContentItemDuplicate_[];
|
|
26934
|
+
|
|
26935
|
+
@Field(() => String, {nullable: true})
|
|
26936
|
+
UserViewRunID?: string;
|
|
26937
|
+
|
|
26938
|
+
@Field(() => Int, {nullable: true})
|
|
26939
|
+
RowCount: number;
|
|
26940
|
+
|
|
26941
|
+
@Field(() => Int, {nullable: true})
|
|
26942
|
+
TotalRowCount: number;
|
|
26943
|
+
|
|
26944
|
+
@Field(() => Int, {nullable: true})
|
|
26945
|
+
ExecutionTime: number;
|
|
26946
|
+
|
|
26947
|
+
@Field({nullable: true})
|
|
26948
|
+
ErrorMessage?: string;
|
|
26949
|
+
|
|
26950
|
+
@Field(() => Boolean, {nullable: false})
|
|
26951
|
+
Success: boolean;
|
|
26952
|
+
}
|
|
26953
|
+
|
|
26954
|
+
@Resolver(MJContentItemDuplicate_)
|
|
26955
|
+
export class MJContentItemDuplicateResolver extends ResolverBase {
|
|
26956
|
+
@Query(() => RunMJContentItemDuplicateViewResult)
|
|
26957
|
+
async RunMJContentItemDuplicateViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26958
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26959
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
26960
|
+
}
|
|
26961
|
+
|
|
26962
|
+
@Query(() => RunMJContentItemDuplicateViewResult)
|
|
26963
|
+
async RunMJContentItemDuplicateViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26964
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26965
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
26966
|
+
}
|
|
26967
|
+
|
|
26968
|
+
@Query(() => RunMJContentItemDuplicateViewResult)
|
|
26969
|
+
async RunMJContentItemDuplicateDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26970
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26971
|
+
input.EntityName = 'MJ: Content Item Duplicates';
|
|
26972
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
26973
|
+
}
|
|
26974
|
+
@Query(() => MJContentItemDuplicate_, { nullable: true })
|
|
26975
|
+
async MJContentItemDuplicate(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJContentItemDuplicate_ | null> {
|
|
26976
|
+
this.CheckUserReadPermissions('MJ: Content Item Duplicates', userPayload);
|
|
26977
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26978
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemDuplicates')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Duplicates', userPayload, EntityPermissionType.Read, 'AND');
|
|
26979
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
26980
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Content Item Duplicates', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
26981
|
+
return result;
|
|
26982
|
+
}
|
|
26983
|
+
|
|
26984
|
+
@Mutation(() => MJContentItemDuplicate_)
|
|
26985
|
+
async CreateMJContentItemDuplicate(
|
|
26986
|
+
@Arg('input', () => CreateMJContentItemDuplicateInput) input: CreateMJContentItemDuplicateInput,
|
|
26987
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
26988
|
+
@PubSub() pubSub: PubSubEngine
|
|
26989
|
+
) {
|
|
26990
|
+
const provider = GetReadWriteProvider(providers);
|
|
26991
|
+
return this.CreateRecord('MJ: Content Item Duplicates', input, provider, userPayload, pubSub)
|
|
26992
|
+
}
|
|
26993
|
+
|
|
26994
|
+
@Mutation(() => MJContentItemDuplicate_)
|
|
26995
|
+
async UpdateMJContentItemDuplicate(
|
|
26996
|
+
@Arg('input', () => UpdateMJContentItemDuplicateInput) input: UpdateMJContentItemDuplicateInput,
|
|
26997
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
26998
|
+
@PubSub() pubSub: PubSubEngine
|
|
26999
|
+
) {
|
|
27000
|
+
const provider = GetReadWriteProvider(providers);
|
|
27001
|
+
return this.UpdateRecord('MJ: Content Item Duplicates', input, provider, userPayload, pubSub);
|
|
27002
|
+
}
|
|
27003
|
+
|
|
27004
|
+
@Mutation(() => MJContentItemDuplicate_)
|
|
27005
|
+
async DeleteMJContentItemDuplicate(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27006
|
+
const provider = GetReadWriteProvider(providers);
|
|
27007
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
27008
|
+
return this.DeleteRecord('MJ: Content Item Duplicates', key, options, provider, userPayload, pubSub);
|
|
27009
|
+
}
|
|
27010
|
+
|
|
27011
|
+
}
|
|
27012
|
+
|
|
26349
27013
|
//****************************************************************************
|
|
26350
27014
|
// ENTITY CLASS for MJ: Content Item Tags
|
|
26351
27015
|
//****************************************************************************
|
|
@@ -26369,10 +27033,21 @@ export class MJContentItemTag_ {
|
|
|
26369
27033
|
@Field()
|
|
26370
27034
|
_mj__UpdatedAt: Date;
|
|
26371
27035
|
|
|
27036
|
+
@Field(() => Float, {description: `Relevance weight for this tag (0.0-1.0). 1.0 = highly relevant central topic, 0.5 = moderately relevant, 0.1 = tangentially related. Assigned by the LLM during autotagging.`})
|
|
27037
|
+
Weight: number;
|
|
27038
|
+
|
|
27039
|
+
@Field({nullable: true, description: `Optional link to the formal MJ Tag taxonomy. When set, this free-text tag has been matched (via semantic similarity or exact match) to a curated Tag record. NULL means the tag is unmatched free text only.`})
|
|
27040
|
+
@MaxLength(36)
|
|
27041
|
+
TagID?: string;
|
|
27042
|
+
|
|
26372
27043
|
@Field({nullable: true})
|
|
26373
27044
|
@MaxLength(250)
|
|
26374
27045
|
Item?: string;
|
|
26375
27046
|
|
|
27047
|
+
@Field({nullable: true})
|
|
27048
|
+
@MaxLength(255)
|
|
27049
|
+
Tag_Virtual?: string;
|
|
27050
|
+
|
|
26376
27051
|
}
|
|
26377
27052
|
|
|
26378
27053
|
//****************************************************************************
|
|
@@ -26388,6 +27063,12 @@ export class CreateMJContentItemTagInput {
|
|
|
26388
27063
|
|
|
26389
27064
|
@Field({ nullable: true })
|
|
26390
27065
|
Tag?: string;
|
|
27066
|
+
|
|
27067
|
+
@Field(() => Float, { nullable: true })
|
|
27068
|
+
Weight?: number;
|
|
27069
|
+
|
|
27070
|
+
@Field({ nullable: true })
|
|
27071
|
+
TagID: string | null;
|
|
26391
27072
|
}
|
|
26392
27073
|
|
|
26393
27074
|
|
|
@@ -26405,6 +27086,12 @@ export class UpdateMJContentItemTagInput {
|
|
|
26405
27086
|
@Field({ nullable: true })
|
|
26406
27087
|
Tag?: string;
|
|
26407
27088
|
|
|
27089
|
+
@Field(() => Float, { nullable: true })
|
|
27090
|
+
Weight?: number;
|
|
27091
|
+
|
|
27092
|
+
@Field({ nullable: true })
|
|
27093
|
+
TagID?: string | null;
|
|
27094
|
+
|
|
26408
27095
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
26409
27096
|
OldValues___?: KeyValuePairInput[];
|
|
26410
27097
|
}
|
|
@@ -26544,6 +27231,28 @@ export class MJContentItem_ {
|
|
|
26544
27231
|
@Field()
|
|
26545
27232
|
_mj__UpdatedAt: Date;
|
|
26546
27233
|
|
|
27234
|
+
@Field({nullable: true, description: `For entity-sourced content items, links to the Entity Record Document snapshot that was rendered for this item. Provides traceability back to the source entity record via ERD.EntityID + ERD.RecordID. NULL for non-entity sources.`})
|
|
27235
|
+
@MaxLength(36)
|
|
27236
|
+
EntityRecordDocumentID?: string;
|
|
27237
|
+
|
|
27238
|
+
@Field({description: `Vectorization status: Pending (not yet embedded), Processing (currently being embedded), Complete (vector stored), Failed (embedding error), Skipped (excluded from vectorization).`})
|
|
27239
|
+
@MaxLength(20)
|
|
27240
|
+
EmbeddingStatus: string;
|
|
27241
|
+
|
|
27242
|
+
@Field({nullable: true, description: `Timestamp of the most recent successful embedding for this content item.`})
|
|
27243
|
+
LastEmbeddedAt?: Date;
|
|
27244
|
+
|
|
27245
|
+
@Field({nullable: true, description: `The AI model used to generate the most recent embedding for this content item.`})
|
|
27246
|
+
@MaxLength(36)
|
|
27247
|
+
EmbeddingModelID?: string;
|
|
27248
|
+
|
|
27249
|
+
@Field({description: `Autotagging status: Pending (not yet tagged), Processing (LLM is generating tags), Complete (tags assigned), Failed (LLM error), Skipped (excluded from tagging).`})
|
|
27250
|
+
@MaxLength(20)
|
|
27251
|
+
TaggingStatus: string;
|
|
27252
|
+
|
|
27253
|
+
@Field({nullable: true, description: `Timestamp of the most recent successful autotagging run for this content item.`})
|
|
27254
|
+
LastTaggedAt?: Date;
|
|
27255
|
+
|
|
26547
27256
|
@Field({nullable: true})
|
|
26548
27257
|
@MaxLength(255)
|
|
26549
27258
|
ContentSource?: string;
|
|
@@ -26560,12 +27269,26 @@ export class MJContentItem_ {
|
|
|
26560
27269
|
@MaxLength(255)
|
|
26561
27270
|
ContentFileType: string;
|
|
26562
27271
|
|
|
27272
|
+
@Field({nullable: true})
|
|
27273
|
+
@MaxLength(450)
|
|
27274
|
+
EntityRecordDocument?: string;
|
|
27275
|
+
|
|
27276
|
+
@Field({nullable: true})
|
|
27277
|
+
@MaxLength(50)
|
|
27278
|
+
EmbeddingModel?: string;
|
|
27279
|
+
|
|
26563
27280
|
@Field(() => [MJContentItemAttribute_])
|
|
26564
27281
|
MJContentItemAttributes_ContentItemIDArray: MJContentItemAttribute_[]; // Link to MJContentItemAttributes
|
|
26565
27282
|
|
|
26566
27283
|
@Field(() => [MJContentItemTag_])
|
|
26567
27284
|
MJContentItemTags_ItemIDArray: MJContentItemTag_[]; // Link to MJContentItemTags
|
|
26568
27285
|
|
|
27286
|
+
@Field(() => [MJContentItemDuplicate_])
|
|
27287
|
+
MJContentItemDuplicates_ContentItemAIDArray: MJContentItemDuplicate_[]; // Link to MJContentItemDuplicates
|
|
27288
|
+
|
|
27289
|
+
@Field(() => [MJContentItemDuplicate_])
|
|
27290
|
+
MJContentItemDuplicates_ContentItemBIDArray: MJContentItemDuplicate_[]; // Link to MJContentItemDuplicates
|
|
27291
|
+
|
|
26569
27292
|
}
|
|
26570
27293
|
|
|
26571
27294
|
//****************************************************************************
|
|
@@ -26602,6 +27325,24 @@ export class CreateMJContentItemInput {
|
|
|
26602
27325
|
|
|
26603
27326
|
@Field({ nullable: true })
|
|
26604
27327
|
Text: string | null;
|
|
27328
|
+
|
|
27329
|
+
@Field({ nullable: true })
|
|
27330
|
+
EntityRecordDocumentID: string | null;
|
|
27331
|
+
|
|
27332
|
+
@Field({ nullable: true })
|
|
27333
|
+
EmbeddingStatus?: string;
|
|
27334
|
+
|
|
27335
|
+
@Field({ nullable: true })
|
|
27336
|
+
LastEmbeddedAt: Date | null;
|
|
27337
|
+
|
|
27338
|
+
@Field({ nullable: true })
|
|
27339
|
+
EmbeddingModelID: string | null;
|
|
27340
|
+
|
|
27341
|
+
@Field({ nullable: true })
|
|
27342
|
+
TaggingStatus?: string;
|
|
27343
|
+
|
|
27344
|
+
@Field({ nullable: true })
|
|
27345
|
+
LastTaggedAt: Date | null;
|
|
26605
27346
|
}
|
|
26606
27347
|
|
|
26607
27348
|
|
|
@@ -26640,6 +27381,24 @@ export class UpdateMJContentItemInput {
|
|
|
26640
27381
|
@Field({ nullable: true })
|
|
26641
27382
|
Text?: string | null;
|
|
26642
27383
|
|
|
27384
|
+
@Field({ nullable: true })
|
|
27385
|
+
EntityRecordDocumentID?: string | null;
|
|
27386
|
+
|
|
27387
|
+
@Field({ nullable: true })
|
|
27388
|
+
EmbeddingStatus?: string;
|
|
27389
|
+
|
|
27390
|
+
@Field({ nullable: true })
|
|
27391
|
+
LastEmbeddedAt?: Date | null;
|
|
27392
|
+
|
|
27393
|
+
@Field({ nullable: true })
|
|
27394
|
+
EmbeddingModelID?: string | null;
|
|
27395
|
+
|
|
27396
|
+
@Field({ nullable: true })
|
|
27397
|
+
TaggingStatus?: string;
|
|
27398
|
+
|
|
27399
|
+
@Field({ nullable: true })
|
|
27400
|
+
LastTaggedAt?: Date | null;
|
|
27401
|
+
|
|
26643
27402
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
26644
27403
|
OldValues___?: KeyValuePairInput[];
|
|
26645
27404
|
}
|
|
@@ -26721,6 +27480,26 @@ export class MJContentItemResolver extends ResolverBase {
|
|
|
26721
27480
|
return result;
|
|
26722
27481
|
}
|
|
26723
27482
|
|
|
27483
|
+
@FieldResolver(() => [MJContentItemDuplicate_])
|
|
27484
|
+
async MJContentItemDuplicates_ContentItemAIDArray(@Root() mjcontentitem_: MJContentItem_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27485
|
+
this.CheckUserReadPermissions('MJ: Content Item Duplicates', userPayload);
|
|
27486
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27487
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemDuplicates')} WHERE ${provider.QuoteIdentifier('ContentItemAID')}='${mjcontentitem_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Duplicates', userPayload, EntityPermissionType.Read, 'AND');
|
|
27488
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
27489
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Duplicates', rows, this.GetUserFromPayload(userPayload));
|
|
27490
|
+
return result;
|
|
27491
|
+
}
|
|
27492
|
+
|
|
27493
|
+
@FieldResolver(() => [MJContentItemDuplicate_])
|
|
27494
|
+
async MJContentItemDuplicates_ContentItemBIDArray(@Root() mjcontentitem_: MJContentItem_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27495
|
+
this.CheckUserReadPermissions('MJ: Content Item Duplicates', userPayload);
|
|
27496
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27497
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemDuplicates')} WHERE ${provider.QuoteIdentifier('ContentItemBID')}='${mjcontentitem_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Duplicates', userPayload, EntityPermissionType.Read, 'AND');
|
|
27498
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
27499
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Duplicates', rows, this.GetUserFromPayload(userPayload));
|
|
27500
|
+
return result;
|
|
27501
|
+
}
|
|
27502
|
+
|
|
26724
27503
|
@Mutation(() => MJContentItem_)
|
|
26725
27504
|
async CreateMJContentItem(
|
|
26726
27505
|
@Arg('input', () => CreateMJContentItemInput) input: CreateMJContentItemInput,
|
|
@@ -26750,6 +27529,436 @@ export class MJContentItemResolver extends ResolverBase {
|
|
|
26750
27529
|
|
|
26751
27530
|
}
|
|
26752
27531
|
|
|
27532
|
+
//****************************************************************************
|
|
27533
|
+
// ENTITY CLASS for MJ: Content Process Run Details
|
|
27534
|
+
//****************************************************************************
|
|
27535
|
+
@ObjectType({ description: `Per-content-source tracking within a pipeline run. Each source processed during a ContentProcessRun gets one detail record with item counts, timing, token usage, and cost rollups.` })
|
|
27536
|
+
export class MJContentProcessRunDetail_ {
|
|
27537
|
+
@Field()
|
|
27538
|
+
@MaxLength(36)
|
|
27539
|
+
ID: string;
|
|
27540
|
+
|
|
27541
|
+
@Field({description: `The parent pipeline run this detail belongs to.`})
|
|
27542
|
+
@MaxLength(36)
|
|
27543
|
+
ContentProcessRunID: string;
|
|
27544
|
+
|
|
27545
|
+
@Field({description: `The content source being processed in this detail record.`})
|
|
27546
|
+
@MaxLength(36)
|
|
27547
|
+
ContentSourceID: string;
|
|
27548
|
+
|
|
27549
|
+
@Field({description: `The type of content source (RSS Feed, Entity, Website, Cloud Storage, etc.).`})
|
|
27550
|
+
@MaxLength(36)
|
|
27551
|
+
ContentSourceTypeID: string;
|
|
27552
|
+
|
|
27553
|
+
@Field({description: `Processing status: Pending, Running, Completed, Failed, or Skipped.`})
|
|
27554
|
+
@MaxLength(20)
|
|
27555
|
+
Status: string;
|
|
27556
|
+
|
|
27557
|
+
@Field(() => Int, {description: `Total content items processed for this source during the run.`})
|
|
27558
|
+
ItemsProcessed: number;
|
|
27559
|
+
|
|
27560
|
+
@Field(() => Int, {description: `Number of content items successfully tagged by the LLM.`})
|
|
27561
|
+
ItemsTagged: number;
|
|
27562
|
+
|
|
27563
|
+
@Field(() => Int, {description: `Number of content items successfully embedded and upserted to the vector database.`})
|
|
27564
|
+
ItemsVectorized: number;
|
|
27565
|
+
|
|
27566
|
+
@Field(() => Int, {description: `Number of new ContentItemTag records created during LLM tagging.`})
|
|
27567
|
+
TagsCreated: number;
|
|
27568
|
+
|
|
27569
|
+
@Field(() => Int, {description: `Number of errors encountered while processing this source.`})
|
|
27570
|
+
ErrorCount: number;
|
|
27571
|
+
|
|
27572
|
+
@Field({nullable: true, description: `When processing started for this source within the pipeline run.`})
|
|
27573
|
+
StartTime?: Date;
|
|
27574
|
+
|
|
27575
|
+
@Field({nullable: true, description: `When processing completed for this source within the pipeline run.`})
|
|
27576
|
+
EndTime?: Date;
|
|
27577
|
+
|
|
27578
|
+
@Field(() => Int, {description: `Rollup of all tokens used across LLM tagging and embedding calls for this source. Computed from linked AIPromptRun records via the ContentProcessRunPromptRun junction table.`})
|
|
27579
|
+
TotalTokensUsed: number;
|
|
27580
|
+
|
|
27581
|
+
@Field(() => Float, {description: `Rollup of all costs across LLM tagging and embedding calls for this source. Computed from linked AIPromptRun records via the ContentProcessRunPromptRun junction table.`})
|
|
27582
|
+
TotalCost: number;
|
|
27583
|
+
|
|
27584
|
+
@Field()
|
|
27585
|
+
_mj__CreatedAt: Date;
|
|
27586
|
+
|
|
27587
|
+
@Field()
|
|
27588
|
+
_mj__UpdatedAt: Date;
|
|
27589
|
+
|
|
27590
|
+
@Field({nullable: true})
|
|
27591
|
+
@MaxLength(255)
|
|
27592
|
+
ContentProcessRun?: string;
|
|
27593
|
+
|
|
27594
|
+
@Field({nullable: true})
|
|
27595
|
+
@MaxLength(255)
|
|
27596
|
+
ContentSource?: string;
|
|
27597
|
+
|
|
27598
|
+
@Field()
|
|
27599
|
+
@MaxLength(255)
|
|
27600
|
+
ContentSourceType: string;
|
|
27601
|
+
|
|
27602
|
+
@Field(() => [MJContentProcessRunPromptRun_])
|
|
27603
|
+
MJContentProcessRunPromptRuns_ContentProcessRunDetailIDArray: MJContentProcessRunPromptRun_[]; // Link to MJContentProcessRunPromptRuns
|
|
27604
|
+
|
|
27605
|
+
}
|
|
27606
|
+
|
|
27607
|
+
//****************************************************************************
|
|
27608
|
+
// INPUT TYPE for MJ: Content Process Run Details
|
|
27609
|
+
//****************************************************************************
|
|
27610
|
+
@InputType()
|
|
27611
|
+
export class CreateMJContentProcessRunDetailInput {
|
|
27612
|
+
@Field({ nullable: true })
|
|
27613
|
+
ID?: string;
|
|
27614
|
+
|
|
27615
|
+
@Field({ nullable: true })
|
|
27616
|
+
ContentProcessRunID?: string;
|
|
27617
|
+
|
|
27618
|
+
@Field({ nullable: true })
|
|
27619
|
+
ContentSourceID?: string;
|
|
27620
|
+
|
|
27621
|
+
@Field({ nullable: true })
|
|
27622
|
+
ContentSourceTypeID?: string;
|
|
27623
|
+
|
|
27624
|
+
@Field({ nullable: true })
|
|
27625
|
+
Status?: string;
|
|
27626
|
+
|
|
27627
|
+
@Field(() => Int, { nullable: true })
|
|
27628
|
+
ItemsProcessed?: number;
|
|
27629
|
+
|
|
27630
|
+
@Field(() => Int, { nullable: true })
|
|
27631
|
+
ItemsTagged?: number;
|
|
27632
|
+
|
|
27633
|
+
@Field(() => Int, { nullable: true })
|
|
27634
|
+
ItemsVectorized?: number;
|
|
27635
|
+
|
|
27636
|
+
@Field(() => Int, { nullable: true })
|
|
27637
|
+
TagsCreated?: number;
|
|
27638
|
+
|
|
27639
|
+
@Field(() => Int, { nullable: true })
|
|
27640
|
+
ErrorCount?: number;
|
|
27641
|
+
|
|
27642
|
+
@Field({ nullable: true })
|
|
27643
|
+
StartTime: Date | null;
|
|
27644
|
+
|
|
27645
|
+
@Field({ nullable: true })
|
|
27646
|
+
EndTime: Date | null;
|
|
27647
|
+
|
|
27648
|
+
@Field(() => Int, { nullable: true })
|
|
27649
|
+
TotalTokensUsed?: number;
|
|
27650
|
+
|
|
27651
|
+
@Field(() => Float, { nullable: true })
|
|
27652
|
+
TotalCost?: number;
|
|
27653
|
+
}
|
|
27654
|
+
|
|
27655
|
+
|
|
27656
|
+
//****************************************************************************
|
|
27657
|
+
// INPUT TYPE for MJ: Content Process Run Details
|
|
27658
|
+
//****************************************************************************
|
|
27659
|
+
@InputType()
|
|
27660
|
+
export class UpdateMJContentProcessRunDetailInput {
|
|
27661
|
+
@Field()
|
|
27662
|
+
ID: string;
|
|
27663
|
+
|
|
27664
|
+
@Field({ nullable: true })
|
|
27665
|
+
ContentProcessRunID?: string;
|
|
27666
|
+
|
|
27667
|
+
@Field({ nullable: true })
|
|
27668
|
+
ContentSourceID?: string;
|
|
27669
|
+
|
|
27670
|
+
@Field({ nullable: true })
|
|
27671
|
+
ContentSourceTypeID?: string;
|
|
27672
|
+
|
|
27673
|
+
@Field({ nullable: true })
|
|
27674
|
+
Status?: string;
|
|
27675
|
+
|
|
27676
|
+
@Field(() => Int, { nullable: true })
|
|
27677
|
+
ItemsProcessed?: number;
|
|
27678
|
+
|
|
27679
|
+
@Field(() => Int, { nullable: true })
|
|
27680
|
+
ItemsTagged?: number;
|
|
27681
|
+
|
|
27682
|
+
@Field(() => Int, { nullable: true })
|
|
27683
|
+
ItemsVectorized?: number;
|
|
27684
|
+
|
|
27685
|
+
@Field(() => Int, { nullable: true })
|
|
27686
|
+
TagsCreated?: number;
|
|
27687
|
+
|
|
27688
|
+
@Field(() => Int, { nullable: true })
|
|
27689
|
+
ErrorCount?: number;
|
|
27690
|
+
|
|
27691
|
+
@Field({ nullable: true })
|
|
27692
|
+
StartTime?: Date | null;
|
|
27693
|
+
|
|
27694
|
+
@Field({ nullable: true })
|
|
27695
|
+
EndTime?: Date | null;
|
|
27696
|
+
|
|
27697
|
+
@Field(() => Int, { nullable: true })
|
|
27698
|
+
TotalTokensUsed?: number;
|
|
27699
|
+
|
|
27700
|
+
@Field(() => Float, { nullable: true })
|
|
27701
|
+
TotalCost?: number;
|
|
27702
|
+
|
|
27703
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
27704
|
+
OldValues___?: KeyValuePairInput[];
|
|
27705
|
+
}
|
|
27706
|
+
|
|
27707
|
+
//****************************************************************************
|
|
27708
|
+
// RESOLVER for MJ: Content Process Run Details
|
|
27709
|
+
//****************************************************************************
|
|
27710
|
+
@ObjectType()
|
|
27711
|
+
export class RunMJContentProcessRunDetailViewResult {
|
|
27712
|
+
@Field(() => [MJContentProcessRunDetail_])
|
|
27713
|
+
Results: MJContentProcessRunDetail_[];
|
|
27714
|
+
|
|
27715
|
+
@Field(() => String, {nullable: true})
|
|
27716
|
+
UserViewRunID?: string;
|
|
27717
|
+
|
|
27718
|
+
@Field(() => Int, {nullable: true})
|
|
27719
|
+
RowCount: number;
|
|
27720
|
+
|
|
27721
|
+
@Field(() => Int, {nullable: true})
|
|
27722
|
+
TotalRowCount: number;
|
|
27723
|
+
|
|
27724
|
+
@Field(() => Int, {nullable: true})
|
|
27725
|
+
ExecutionTime: number;
|
|
27726
|
+
|
|
27727
|
+
@Field({nullable: true})
|
|
27728
|
+
ErrorMessage?: string;
|
|
27729
|
+
|
|
27730
|
+
@Field(() => Boolean, {nullable: false})
|
|
27731
|
+
Success: boolean;
|
|
27732
|
+
}
|
|
27733
|
+
|
|
27734
|
+
@Resolver(MJContentProcessRunDetail_)
|
|
27735
|
+
export class MJContentProcessRunDetailResolver extends ResolverBase {
|
|
27736
|
+
@Query(() => RunMJContentProcessRunDetailViewResult)
|
|
27737
|
+
async RunMJContentProcessRunDetailViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27738
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27739
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
27740
|
+
}
|
|
27741
|
+
|
|
27742
|
+
@Query(() => RunMJContentProcessRunDetailViewResult)
|
|
27743
|
+
async RunMJContentProcessRunDetailViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27744
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27745
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
27746
|
+
}
|
|
27747
|
+
|
|
27748
|
+
@Query(() => RunMJContentProcessRunDetailViewResult)
|
|
27749
|
+
async RunMJContentProcessRunDetailDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27750
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27751
|
+
input.EntityName = 'MJ: Content Process Run Details';
|
|
27752
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
27753
|
+
}
|
|
27754
|
+
@Query(() => MJContentProcessRunDetail_, { nullable: true })
|
|
27755
|
+
async MJContentProcessRunDetail(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJContentProcessRunDetail_ | null> {
|
|
27756
|
+
this.CheckUserReadPermissions('MJ: Content Process Run Details', userPayload);
|
|
27757
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27758
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRunDetails')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
27759
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
27760
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Content Process Run Details', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
27761
|
+
return result;
|
|
27762
|
+
}
|
|
27763
|
+
|
|
27764
|
+
@FieldResolver(() => [MJContentProcessRunPromptRun_])
|
|
27765
|
+
async MJContentProcessRunPromptRuns_ContentProcessRunDetailIDArray(@Root() mjcontentprocessrundetail_: MJContentProcessRunDetail_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27766
|
+
this.CheckUserReadPermissions('MJ: Content Process Run Prompt Runs', userPayload);
|
|
27767
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27768
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRunPromptRuns')} WHERE ${provider.QuoteIdentifier('ContentProcessRunDetailID')}='${mjcontentprocessrundetail_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Run Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
27769
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
27770
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Process Run Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
27771
|
+
return result;
|
|
27772
|
+
}
|
|
27773
|
+
|
|
27774
|
+
@Mutation(() => MJContentProcessRunDetail_)
|
|
27775
|
+
async CreateMJContentProcessRunDetail(
|
|
27776
|
+
@Arg('input', () => CreateMJContentProcessRunDetailInput) input: CreateMJContentProcessRunDetailInput,
|
|
27777
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
27778
|
+
@PubSub() pubSub: PubSubEngine
|
|
27779
|
+
) {
|
|
27780
|
+
const provider = GetReadWriteProvider(providers);
|
|
27781
|
+
return this.CreateRecord('MJ: Content Process Run Details', input, provider, userPayload, pubSub)
|
|
27782
|
+
}
|
|
27783
|
+
|
|
27784
|
+
@Mutation(() => MJContentProcessRunDetail_)
|
|
27785
|
+
async UpdateMJContentProcessRunDetail(
|
|
27786
|
+
@Arg('input', () => UpdateMJContentProcessRunDetailInput) input: UpdateMJContentProcessRunDetailInput,
|
|
27787
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
27788
|
+
@PubSub() pubSub: PubSubEngine
|
|
27789
|
+
) {
|
|
27790
|
+
const provider = GetReadWriteProvider(providers);
|
|
27791
|
+
return this.UpdateRecord('MJ: Content Process Run Details', input, provider, userPayload, pubSub);
|
|
27792
|
+
}
|
|
27793
|
+
|
|
27794
|
+
@Mutation(() => MJContentProcessRunDetail_)
|
|
27795
|
+
async DeleteMJContentProcessRunDetail(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27796
|
+
const provider = GetReadWriteProvider(providers);
|
|
27797
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
27798
|
+
return this.DeleteRecord('MJ: Content Process Run Details', key, options, provider, userPayload, pubSub);
|
|
27799
|
+
}
|
|
27800
|
+
|
|
27801
|
+
}
|
|
27802
|
+
|
|
27803
|
+
//****************************************************************************
|
|
27804
|
+
// ENTITY CLASS for MJ: Content Process Run Prompt Runs
|
|
27805
|
+
//****************************************************************************
|
|
27806
|
+
@ObjectType({ description: `Links ContentProcessRunDetail records to their associated AIPromptRun records. Each LLM tagging call and embedding call creates an AIPromptRun, and this junction table provides the FK relationship for cost/token analytics.` })
|
|
27807
|
+
export class MJContentProcessRunPromptRun_ {
|
|
27808
|
+
@Field()
|
|
27809
|
+
@MaxLength(36)
|
|
27810
|
+
ID: string;
|
|
27811
|
+
|
|
27812
|
+
@Field({description: `The content process run detail record this prompt run is associated with.`})
|
|
27813
|
+
@MaxLength(36)
|
|
27814
|
+
ContentProcessRunDetailID: string;
|
|
27815
|
+
|
|
27816
|
+
@Field({description: `The AI prompt run record containing token usage, cost, model, vendor, and execution details for this call.`})
|
|
27817
|
+
@MaxLength(36)
|
|
27818
|
+
AIPromptRunID: string;
|
|
27819
|
+
|
|
27820
|
+
@Field({description: `Whether this AIPromptRun was for LLM tagging (Tag) or text embedding (Embed).`})
|
|
27821
|
+
@MaxLength(20)
|
|
27822
|
+
RunType: string;
|
|
27823
|
+
|
|
27824
|
+
@Field()
|
|
27825
|
+
_mj__CreatedAt: Date;
|
|
27826
|
+
|
|
27827
|
+
@Field()
|
|
27828
|
+
_mj__UpdatedAt: Date;
|
|
27829
|
+
|
|
27830
|
+
@Field({nullable: true})
|
|
27831
|
+
@MaxLength(255)
|
|
27832
|
+
AIPromptRun?: string;
|
|
27833
|
+
|
|
27834
|
+
}
|
|
27835
|
+
|
|
27836
|
+
//****************************************************************************
|
|
27837
|
+
// INPUT TYPE for MJ: Content Process Run Prompt Runs
|
|
27838
|
+
//****************************************************************************
|
|
27839
|
+
@InputType()
|
|
27840
|
+
export class CreateMJContentProcessRunPromptRunInput {
|
|
27841
|
+
@Field({ nullable: true })
|
|
27842
|
+
ID?: string;
|
|
27843
|
+
|
|
27844
|
+
@Field({ nullable: true })
|
|
27845
|
+
ContentProcessRunDetailID?: string;
|
|
27846
|
+
|
|
27847
|
+
@Field({ nullable: true })
|
|
27848
|
+
AIPromptRunID?: string;
|
|
27849
|
+
|
|
27850
|
+
@Field({ nullable: true })
|
|
27851
|
+
RunType?: string;
|
|
27852
|
+
}
|
|
27853
|
+
|
|
27854
|
+
|
|
27855
|
+
//****************************************************************************
|
|
27856
|
+
// INPUT TYPE for MJ: Content Process Run Prompt Runs
|
|
27857
|
+
//****************************************************************************
|
|
27858
|
+
@InputType()
|
|
27859
|
+
export class UpdateMJContentProcessRunPromptRunInput {
|
|
27860
|
+
@Field()
|
|
27861
|
+
ID: string;
|
|
27862
|
+
|
|
27863
|
+
@Field({ nullable: true })
|
|
27864
|
+
ContentProcessRunDetailID?: string;
|
|
27865
|
+
|
|
27866
|
+
@Field({ nullable: true })
|
|
27867
|
+
AIPromptRunID?: string;
|
|
27868
|
+
|
|
27869
|
+
@Field({ nullable: true })
|
|
27870
|
+
RunType?: string;
|
|
27871
|
+
|
|
27872
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
27873
|
+
OldValues___?: KeyValuePairInput[];
|
|
27874
|
+
}
|
|
27875
|
+
|
|
27876
|
+
//****************************************************************************
|
|
27877
|
+
// RESOLVER for MJ: Content Process Run Prompt Runs
|
|
27878
|
+
//****************************************************************************
|
|
27879
|
+
@ObjectType()
|
|
27880
|
+
export class RunMJContentProcessRunPromptRunViewResult {
|
|
27881
|
+
@Field(() => [MJContentProcessRunPromptRun_])
|
|
27882
|
+
Results: MJContentProcessRunPromptRun_[];
|
|
27883
|
+
|
|
27884
|
+
@Field(() => String, {nullable: true})
|
|
27885
|
+
UserViewRunID?: string;
|
|
27886
|
+
|
|
27887
|
+
@Field(() => Int, {nullable: true})
|
|
27888
|
+
RowCount: number;
|
|
27889
|
+
|
|
27890
|
+
@Field(() => Int, {nullable: true})
|
|
27891
|
+
TotalRowCount: number;
|
|
27892
|
+
|
|
27893
|
+
@Field(() => Int, {nullable: true})
|
|
27894
|
+
ExecutionTime: number;
|
|
27895
|
+
|
|
27896
|
+
@Field({nullable: true})
|
|
27897
|
+
ErrorMessage?: string;
|
|
27898
|
+
|
|
27899
|
+
@Field(() => Boolean, {nullable: false})
|
|
27900
|
+
Success: boolean;
|
|
27901
|
+
}
|
|
27902
|
+
|
|
27903
|
+
@Resolver(MJContentProcessRunPromptRun_)
|
|
27904
|
+
export class MJContentProcessRunPromptRunResolver extends ResolverBase {
|
|
27905
|
+
@Query(() => RunMJContentProcessRunPromptRunViewResult)
|
|
27906
|
+
async RunMJContentProcessRunPromptRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27907
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27908
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
27909
|
+
}
|
|
27910
|
+
|
|
27911
|
+
@Query(() => RunMJContentProcessRunPromptRunViewResult)
|
|
27912
|
+
async RunMJContentProcessRunPromptRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27913
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27914
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
27915
|
+
}
|
|
27916
|
+
|
|
27917
|
+
@Query(() => RunMJContentProcessRunPromptRunViewResult)
|
|
27918
|
+
async RunMJContentProcessRunPromptRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27919
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27920
|
+
input.EntityName = 'MJ: Content Process Run Prompt Runs';
|
|
27921
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
27922
|
+
}
|
|
27923
|
+
@Query(() => MJContentProcessRunPromptRun_, { nullable: true })
|
|
27924
|
+
async MJContentProcessRunPromptRun(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJContentProcessRunPromptRun_ | null> {
|
|
27925
|
+
this.CheckUserReadPermissions('MJ: Content Process Run Prompt Runs', userPayload);
|
|
27926
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27927
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRunPromptRuns')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Run Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
27928
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
27929
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Content Process Run Prompt Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
27930
|
+
return result;
|
|
27931
|
+
}
|
|
27932
|
+
|
|
27933
|
+
@Mutation(() => MJContentProcessRunPromptRun_)
|
|
27934
|
+
async CreateMJContentProcessRunPromptRun(
|
|
27935
|
+
@Arg('input', () => CreateMJContentProcessRunPromptRunInput) input: CreateMJContentProcessRunPromptRunInput,
|
|
27936
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
27937
|
+
@PubSub() pubSub: PubSubEngine
|
|
27938
|
+
) {
|
|
27939
|
+
const provider = GetReadWriteProvider(providers);
|
|
27940
|
+
return this.CreateRecord('MJ: Content Process Run Prompt Runs', input, provider, userPayload, pubSub)
|
|
27941
|
+
}
|
|
27942
|
+
|
|
27943
|
+
@Mutation(() => MJContentProcessRunPromptRun_)
|
|
27944
|
+
async UpdateMJContentProcessRunPromptRun(
|
|
27945
|
+
@Arg('input', () => UpdateMJContentProcessRunPromptRunInput) input: UpdateMJContentProcessRunPromptRunInput,
|
|
27946
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
27947
|
+
@PubSub() pubSub: PubSubEngine
|
|
27948
|
+
) {
|
|
27949
|
+
const provider = GetReadWriteProvider(providers);
|
|
27950
|
+
return this.UpdateRecord('MJ: Content Process Run Prompt Runs', input, provider, userPayload, pubSub);
|
|
27951
|
+
}
|
|
27952
|
+
|
|
27953
|
+
@Mutation(() => MJContentProcessRunPromptRun_)
|
|
27954
|
+
async DeleteMJContentProcessRunPromptRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27955
|
+
const provider = GetReadWriteProvider(providers);
|
|
27956
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
27957
|
+
return this.DeleteRecord('MJ: Content Process Run Prompt Runs', key, options, provider, userPayload, pubSub);
|
|
27958
|
+
}
|
|
27959
|
+
|
|
27960
|
+
}
|
|
27961
|
+
|
|
26753
27962
|
//****************************************************************************
|
|
26754
27963
|
// ENTITY CLASS for MJ: Content Process Runs
|
|
26755
27964
|
//****************************************************************************
|
|
@@ -26782,10 +27991,42 @@ export class MJContentProcessRun_ {
|
|
|
26782
27991
|
@Field()
|
|
26783
27992
|
_mj__UpdatedAt: Date;
|
|
26784
27993
|
|
|
27994
|
+
@Field({nullable: true, description: `The user who triggered this pipeline run. NULL for system-initiated runs.`})
|
|
27995
|
+
@MaxLength(36)
|
|
27996
|
+
StartedByUserID?: string;
|
|
27997
|
+
|
|
27998
|
+
@Field(() => Int, {nullable: true, description: `Total number of content items to process in this run. Used for progress percentage calculation.`})
|
|
27999
|
+
TotalItemCount?: number;
|
|
28000
|
+
|
|
28001
|
+
@Field(() => Int, {nullable: true, description: `StartRow offset of the last successfully completed batch. Used for resume-from-crash: next batch starts at this offset. Reset to 0 on new runs.`})
|
|
28002
|
+
LastProcessedOffset?: number;
|
|
28003
|
+
|
|
28004
|
+
@Field(() => Int, {nullable: true, description: `Number of content items processed per batch. Configurable per run, default 100.`})
|
|
28005
|
+
BatchSize?: number;
|
|
28006
|
+
|
|
28007
|
+
@Field(() => Int, {nullable: true, description: `Running count of errors encountered during processing. Used by the circuit breaker to halt the pipeline if error rate exceeds the configured threshold.`})
|
|
28008
|
+
ErrorCount?: number;
|
|
28009
|
+
|
|
28010
|
+
@Field({nullable: true, description: `Error details if the run failed. Includes error messages, stack traces, or circuit breaker trigger reason.`})
|
|
28011
|
+
ErrorMessage?: string;
|
|
28012
|
+
|
|
28013
|
+
@Field(() => Boolean, {description: `When set to 1, the pipeline stops after completing the current batch. Used for pause and cancel operations. The Status column reflects the final state (Paused or Cancelled).`})
|
|
28014
|
+
CancellationRequested: boolean;
|
|
28015
|
+
|
|
28016
|
+
@Field({nullable: true, description: `JSON snapshot of the pipeline configuration used for this run. Conforms to the IContentProcessRunConfiguration interface. Includes batch size, rate limits, error thresholds, and duplicate detection settings.`})
|
|
28017
|
+
Configuration?: string;
|
|
28018
|
+
|
|
26785
28019
|
@Field({nullable: true})
|
|
26786
28020
|
@MaxLength(255)
|
|
26787
28021
|
Source?: string;
|
|
26788
28022
|
|
|
28023
|
+
@Field({nullable: true})
|
|
28024
|
+
@MaxLength(100)
|
|
28025
|
+
StartedByUser?: string;
|
|
28026
|
+
|
|
28027
|
+
@Field(() => [MJContentProcessRunDetail_])
|
|
28028
|
+
MJContentProcessRunDetails_ContentProcessRunIDArray: MJContentProcessRunDetail_[]; // Link to MJContentProcessRunDetails
|
|
28029
|
+
|
|
26789
28030
|
}
|
|
26790
28031
|
|
|
26791
28032
|
//****************************************************************************
|
|
@@ -26810,6 +28051,30 @@ export class CreateMJContentProcessRunInput {
|
|
|
26810
28051
|
|
|
26811
28052
|
@Field(() => Int, { nullable: true })
|
|
26812
28053
|
ProcessedItems: number | null;
|
|
28054
|
+
|
|
28055
|
+
@Field({ nullable: true })
|
|
28056
|
+
StartedByUserID: string | null;
|
|
28057
|
+
|
|
28058
|
+
@Field(() => Int, { nullable: true })
|
|
28059
|
+
TotalItemCount: number | null;
|
|
28060
|
+
|
|
28061
|
+
@Field(() => Int, { nullable: true })
|
|
28062
|
+
LastProcessedOffset?: number | null;
|
|
28063
|
+
|
|
28064
|
+
@Field(() => Int, { nullable: true })
|
|
28065
|
+
BatchSize?: number | null;
|
|
28066
|
+
|
|
28067
|
+
@Field(() => Int, { nullable: true })
|
|
28068
|
+
ErrorCount?: number | null;
|
|
28069
|
+
|
|
28070
|
+
@Field({ nullable: true })
|
|
28071
|
+
ErrorMessage: string | null;
|
|
28072
|
+
|
|
28073
|
+
@Field(() => Boolean, { nullable: true })
|
|
28074
|
+
CancellationRequested?: boolean;
|
|
28075
|
+
|
|
28076
|
+
@Field({ nullable: true })
|
|
28077
|
+
Configuration: string | null;
|
|
26813
28078
|
}
|
|
26814
28079
|
|
|
26815
28080
|
|
|
@@ -26836,6 +28101,30 @@ export class UpdateMJContentProcessRunInput {
|
|
|
26836
28101
|
@Field(() => Int, { nullable: true })
|
|
26837
28102
|
ProcessedItems?: number | null;
|
|
26838
28103
|
|
|
28104
|
+
@Field({ nullable: true })
|
|
28105
|
+
StartedByUserID?: string | null;
|
|
28106
|
+
|
|
28107
|
+
@Field(() => Int, { nullable: true })
|
|
28108
|
+
TotalItemCount?: number | null;
|
|
28109
|
+
|
|
28110
|
+
@Field(() => Int, { nullable: true })
|
|
28111
|
+
LastProcessedOffset?: number | null;
|
|
28112
|
+
|
|
28113
|
+
@Field(() => Int, { nullable: true })
|
|
28114
|
+
BatchSize?: number | null;
|
|
28115
|
+
|
|
28116
|
+
@Field(() => Int, { nullable: true })
|
|
28117
|
+
ErrorCount?: number | null;
|
|
28118
|
+
|
|
28119
|
+
@Field({ nullable: true })
|
|
28120
|
+
ErrorMessage?: string | null;
|
|
28121
|
+
|
|
28122
|
+
@Field(() => Boolean, { nullable: true })
|
|
28123
|
+
CancellationRequested?: boolean;
|
|
28124
|
+
|
|
28125
|
+
@Field({ nullable: true })
|
|
28126
|
+
Configuration?: string | null;
|
|
28127
|
+
|
|
26839
28128
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
26840
28129
|
OldValues___?: KeyValuePairInput[];
|
|
26841
28130
|
}
|
|
@@ -26897,6 +28186,16 @@ export class MJContentProcessRunResolver extends ResolverBase {
|
|
|
26897
28186
|
return result;
|
|
26898
28187
|
}
|
|
26899
28188
|
|
|
28189
|
+
@FieldResolver(() => [MJContentProcessRunDetail_])
|
|
28190
|
+
async MJContentProcessRunDetails_ContentProcessRunIDArray(@Root() mjcontentprocessrun_: MJContentProcessRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28191
|
+
this.CheckUserReadPermissions('MJ: Content Process Run Details', userPayload);
|
|
28192
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
28193
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRunDetails')} WHERE ${provider.QuoteIdentifier('ContentProcessRunID')}='${mjcontentprocessrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
28194
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
28195
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Process Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
28196
|
+
return result;
|
|
28197
|
+
}
|
|
28198
|
+
|
|
26900
28199
|
@Mutation(() => MJContentProcessRun_)
|
|
26901
28200
|
async CreateMJContentProcessRun(
|
|
26902
28201
|
@Arg('input', () => CreateMJContentProcessRunInput) input: CreateMJContentProcessRunInput,
|
|
@@ -27279,12 +28578,22 @@ export class MJContentSourceType_ {
|
|
|
27279
28578
|
@Field()
|
|
27280
28579
|
_mj__UpdatedAt: Date;
|
|
27281
28580
|
|
|
28581
|
+
@Field({nullable: true, description: `The registered class name used by ClassFactory to instantiate the provider for this source type (e.g., AutotagLocalFileSystem, AutotagEntity). Must match a @RegisterClass key on a class extending AutotagBase.`})
|
|
28582
|
+
@MaxLength(255)
|
|
28583
|
+
DriverClass?: string;
|
|
28584
|
+
|
|
28585
|
+
@Field({nullable: true, description: `JSON configuration blob for type-level settings. Conforms to the IContentSourceTypeConfiguration interface. Reserved for future type-wide settings shared by all sources of this type.`})
|
|
28586
|
+
Configuration?: string;
|
|
28587
|
+
|
|
27282
28588
|
@Field(() => [MJContentSource_])
|
|
27283
28589
|
MJContentSources_ContentSourceTypeIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
27284
28590
|
|
|
27285
28591
|
@Field(() => [MJContentItem_])
|
|
27286
28592
|
MJContentItems_ContentSourceTypeIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
27287
28593
|
|
|
28594
|
+
@Field(() => [MJContentProcessRunDetail_])
|
|
28595
|
+
MJContentProcessRunDetails_ContentSourceTypeIDArray: MJContentProcessRunDetail_[]; // Link to MJContentProcessRunDetails
|
|
28596
|
+
|
|
27288
28597
|
}
|
|
27289
28598
|
|
|
27290
28599
|
//****************************************************************************
|
|
@@ -27300,6 +28609,12 @@ export class CreateMJContentSourceTypeInput {
|
|
|
27300
28609
|
|
|
27301
28610
|
@Field({ nullable: true })
|
|
27302
28611
|
Description: string | null;
|
|
28612
|
+
|
|
28613
|
+
@Field({ nullable: true })
|
|
28614
|
+
DriverClass: string | null;
|
|
28615
|
+
|
|
28616
|
+
@Field({ nullable: true })
|
|
28617
|
+
Configuration: string | null;
|
|
27303
28618
|
}
|
|
27304
28619
|
|
|
27305
28620
|
|
|
@@ -27317,6 +28632,12 @@ export class UpdateMJContentSourceTypeInput {
|
|
|
27317
28632
|
@Field({ nullable: true })
|
|
27318
28633
|
Description?: string | null;
|
|
27319
28634
|
|
|
28635
|
+
@Field({ nullable: true })
|
|
28636
|
+
DriverClass?: string | null;
|
|
28637
|
+
|
|
28638
|
+
@Field({ nullable: true })
|
|
28639
|
+
Configuration?: string | null;
|
|
28640
|
+
|
|
27320
28641
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
27321
28642
|
OldValues___?: KeyValuePairInput[];
|
|
27322
28643
|
}
|
|
@@ -27398,6 +28719,16 @@ export class MJContentSourceTypeResolver extends ResolverBase {
|
|
|
27398
28719
|
return result;
|
|
27399
28720
|
}
|
|
27400
28721
|
|
|
28722
|
+
@FieldResolver(() => [MJContentProcessRunDetail_])
|
|
28723
|
+
async MJContentProcessRunDetails_ContentSourceTypeIDArray(@Root() mjcontentsourcetype_: MJContentSourceType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28724
|
+
this.CheckUserReadPermissions('MJ: Content Process Run Details', userPayload);
|
|
28725
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
28726
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRunDetails')} WHERE ${provider.QuoteIdentifier('ContentSourceTypeID')}='${mjcontentsourcetype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
28727
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
28728
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Process Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
28729
|
+
return result;
|
|
28730
|
+
}
|
|
28731
|
+
|
|
27401
28732
|
@Mutation(() => MJContentSourceType_)
|
|
27402
28733
|
async CreateMJContentSourceType(
|
|
27403
28734
|
@Arg('input', () => CreateMJContentSourceTypeInput) input: CreateMJContentSourceTypeInput,
|
|
@@ -27462,6 +28793,29 @@ export class MJContentSource_ {
|
|
|
27462
28793
|
@Field()
|
|
27463
28794
|
_mj__UpdatedAt: Date;
|
|
27464
28795
|
|
|
28796
|
+
@Field({nullable: true, description: `Per-source override for the AI embedding model. When NULL, falls back to the ContentType default.`})
|
|
28797
|
+
@MaxLength(36)
|
|
28798
|
+
EmbeddingModelID?: string;
|
|
28799
|
+
|
|
28800
|
+
@Field({nullable: true, description: `Per-source override for the vector index. When NULL, falls back to the ContentType default.`})
|
|
28801
|
+
@MaxLength(36)
|
|
28802
|
+
VectorIndexID?: string;
|
|
28803
|
+
|
|
28804
|
+
@Field({nullable: true, description: `JSON configuration blob for source-instance settings. Conforms to the IContentSourceConfiguration interface. Includes tag taxonomy mode (constrained/auto-grow/free-flow), tag root ID, match threshold, LLM taxonomy sharing, and vectorization toggle.`})
|
|
28805
|
+
Configuration?: string;
|
|
28806
|
+
|
|
28807
|
+
@Field({nullable: true, description: `For Entity-type content sources, the MJ Entity to pull records from. NULL for non-entity sources (files, RSS, websites, etc.).`})
|
|
28808
|
+
@MaxLength(36)
|
|
28809
|
+
EntityID?: string;
|
|
28810
|
+
|
|
28811
|
+
@Field({nullable: true, description: `For Entity-type content sources, the Entity Document template used to render entity records into text for autotagging. The template defines which fields to include, how to format them, and related record inclusion. NULL for non-entity sources.`})
|
|
28812
|
+
@MaxLength(36)
|
|
28813
|
+
EntityDocumentID?: string;
|
|
28814
|
+
|
|
28815
|
+
@Field({nullable: true, description: `Optional link to a MJ Scheduled Action that automatically runs the classification pipeline for this source on a cron schedule.`})
|
|
28816
|
+
@MaxLength(36)
|
|
28817
|
+
ScheduledActionID?: string;
|
|
28818
|
+
|
|
27465
28819
|
@Field()
|
|
27466
28820
|
@MaxLength(255)
|
|
27467
28821
|
ContentType: string;
|
|
@@ -27474,6 +28828,26 @@ export class MJContentSource_ {
|
|
|
27474
28828
|
@MaxLength(255)
|
|
27475
28829
|
ContentFileType: string;
|
|
27476
28830
|
|
|
28831
|
+
@Field({nullable: true})
|
|
28832
|
+
@MaxLength(50)
|
|
28833
|
+
EmbeddingModel?: string;
|
|
28834
|
+
|
|
28835
|
+
@Field({nullable: true})
|
|
28836
|
+
@MaxLength(255)
|
|
28837
|
+
VectorIndex?: string;
|
|
28838
|
+
|
|
28839
|
+
@Field({nullable: true})
|
|
28840
|
+
@MaxLength(255)
|
|
28841
|
+
Entity?: string;
|
|
28842
|
+
|
|
28843
|
+
@Field({nullable: true})
|
|
28844
|
+
@MaxLength(250)
|
|
28845
|
+
EntityDocument?: string;
|
|
28846
|
+
|
|
28847
|
+
@Field({nullable: true})
|
|
28848
|
+
@MaxLength(255)
|
|
28849
|
+
ScheduledAction?: string;
|
|
28850
|
+
|
|
27477
28851
|
@Field(() => [MJContentItem_])
|
|
27478
28852
|
MJContentItems_ContentSourceIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
27479
28853
|
|
|
@@ -27483,6 +28857,9 @@ export class MJContentSource_ {
|
|
|
27483
28857
|
@Field(() => [MJContentSourceParam_])
|
|
27484
28858
|
MJContentSourceParams_ContentSourceIDArray: MJContentSourceParam_[]; // Link to MJContentSourceParams
|
|
27485
28859
|
|
|
28860
|
+
@Field(() => [MJContentProcessRunDetail_])
|
|
28861
|
+
MJContentProcessRunDetails_ContentSourceIDArray: MJContentProcessRunDetail_[]; // Link to MJContentProcessRunDetails
|
|
28862
|
+
|
|
27486
28863
|
}
|
|
27487
28864
|
|
|
27488
28865
|
//****************************************************************************
|
|
@@ -27507,6 +28884,24 @@ export class CreateMJContentSourceInput {
|
|
|
27507
28884
|
|
|
27508
28885
|
@Field({ nullable: true })
|
|
27509
28886
|
URL?: string;
|
|
28887
|
+
|
|
28888
|
+
@Field({ nullable: true })
|
|
28889
|
+
EmbeddingModelID: string | null;
|
|
28890
|
+
|
|
28891
|
+
@Field({ nullable: true })
|
|
28892
|
+
VectorIndexID: string | null;
|
|
28893
|
+
|
|
28894
|
+
@Field({ nullable: true })
|
|
28895
|
+
Configuration: string | null;
|
|
28896
|
+
|
|
28897
|
+
@Field({ nullable: true })
|
|
28898
|
+
EntityID: string | null;
|
|
28899
|
+
|
|
28900
|
+
@Field({ nullable: true })
|
|
28901
|
+
EntityDocumentID: string | null;
|
|
28902
|
+
|
|
28903
|
+
@Field({ nullable: true })
|
|
28904
|
+
ScheduledActionID: string | null;
|
|
27510
28905
|
}
|
|
27511
28906
|
|
|
27512
28907
|
|
|
@@ -27533,6 +28928,24 @@ export class UpdateMJContentSourceInput {
|
|
|
27533
28928
|
@Field({ nullable: true })
|
|
27534
28929
|
URL?: string;
|
|
27535
28930
|
|
|
28931
|
+
@Field({ nullable: true })
|
|
28932
|
+
EmbeddingModelID?: string | null;
|
|
28933
|
+
|
|
28934
|
+
@Field({ nullable: true })
|
|
28935
|
+
VectorIndexID?: string | null;
|
|
28936
|
+
|
|
28937
|
+
@Field({ nullable: true })
|
|
28938
|
+
Configuration?: string | null;
|
|
28939
|
+
|
|
28940
|
+
@Field({ nullable: true })
|
|
28941
|
+
EntityID?: string | null;
|
|
28942
|
+
|
|
28943
|
+
@Field({ nullable: true })
|
|
28944
|
+
EntityDocumentID?: string | null;
|
|
28945
|
+
|
|
28946
|
+
@Field({ nullable: true })
|
|
28947
|
+
ScheduledActionID?: string | null;
|
|
28948
|
+
|
|
27536
28949
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
27537
28950
|
OldValues___?: KeyValuePairInput[];
|
|
27538
28951
|
}
|
|
@@ -27624,6 +29037,16 @@ export class MJContentSourceResolver extends ResolverBase {
|
|
|
27624
29037
|
return result;
|
|
27625
29038
|
}
|
|
27626
29039
|
|
|
29040
|
+
@FieldResolver(() => [MJContentProcessRunDetail_])
|
|
29041
|
+
async MJContentProcessRunDetails_ContentSourceIDArray(@Root() mjcontentsource_: MJContentSource_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29042
|
+
this.CheckUserReadPermissions('MJ: Content Process Run Details', userPayload);
|
|
29043
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29044
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRunDetails')} WHERE ${provider.QuoteIdentifier('ContentSourceID')}='${mjcontentsource_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
29045
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
29046
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Process Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
29047
|
+
return result;
|
|
29048
|
+
}
|
|
29049
|
+
|
|
27627
29050
|
@Mutation(() => MJContentSource_)
|
|
27628
29051
|
async CreateMJContentSource(
|
|
27629
29052
|
@Arg('input', () => CreateMJContentSourceInput) input: CreateMJContentSourceInput,
|
|
@@ -27848,10 +29271,29 @@ export class MJContentType_ {
|
|
|
27848
29271
|
@Field()
|
|
27849
29272
|
_mj__UpdatedAt: Date;
|
|
27850
29273
|
|
|
29274
|
+
@Field({nullable: true, description: `Default AI embedding model for vectorizing content items of this type. Sources can override per-source. If NULL, uses the first available embedding model.`})
|
|
29275
|
+
@MaxLength(36)
|
|
29276
|
+
EmbeddingModelID?: string;
|
|
29277
|
+
|
|
29278
|
+
@Field({nullable: true, description: `Default vector index for storing embeddings of this content type. Sources can override per-source. If NULL, uses the first available vector index.`})
|
|
29279
|
+
@MaxLength(36)
|
|
29280
|
+
VectorIndexID?: string;
|
|
29281
|
+
|
|
29282
|
+
@Field({nullable: true, description: `JSON configuration blob for content-type-level settings. Conforms to the IContentTypeConfiguration interface. Reserved for future type-wide settings such as default tag taxonomy rules and processing options.`})
|
|
29283
|
+
Configuration?: string;
|
|
29284
|
+
|
|
27851
29285
|
@Field()
|
|
27852
29286
|
@MaxLength(50)
|
|
27853
29287
|
AIModel: string;
|
|
27854
29288
|
|
|
29289
|
+
@Field({nullable: true})
|
|
29290
|
+
@MaxLength(50)
|
|
29291
|
+
EmbeddingModel?: string;
|
|
29292
|
+
|
|
29293
|
+
@Field({nullable: true})
|
|
29294
|
+
@MaxLength(255)
|
|
29295
|
+
VectorIndex?: string;
|
|
29296
|
+
|
|
27855
29297
|
@Field(() => [MJContentSource_])
|
|
27856
29298
|
MJContentSources_ContentTypeIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
27857
29299
|
|
|
@@ -27882,6 +29324,15 @@ export class CreateMJContentTypeInput {
|
|
|
27882
29324
|
|
|
27883
29325
|
@Field(() => Int, { nullable: true })
|
|
27884
29326
|
MaxTags?: number;
|
|
29327
|
+
|
|
29328
|
+
@Field({ nullable: true })
|
|
29329
|
+
EmbeddingModelID: string | null;
|
|
29330
|
+
|
|
29331
|
+
@Field({ nullable: true })
|
|
29332
|
+
VectorIndexID: string | null;
|
|
29333
|
+
|
|
29334
|
+
@Field({ nullable: true })
|
|
29335
|
+
Configuration: string | null;
|
|
27885
29336
|
}
|
|
27886
29337
|
|
|
27887
29338
|
|
|
@@ -27908,6 +29359,15 @@ export class UpdateMJContentTypeInput {
|
|
|
27908
29359
|
@Field(() => Int, { nullable: true })
|
|
27909
29360
|
MaxTags?: number;
|
|
27910
29361
|
|
|
29362
|
+
@Field({ nullable: true })
|
|
29363
|
+
EmbeddingModelID?: string | null;
|
|
29364
|
+
|
|
29365
|
+
@Field({ nullable: true })
|
|
29366
|
+
VectorIndexID?: string | null;
|
|
29367
|
+
|
|
29368
|
+
@Field({ nullable: true })
|
|
29369
|
+
Configuration?: string | null;
|
|
29370
|
+
|
|
27911
29371
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
27912
29372
|
OldValues___?: KeyValuePairInput[];
|
|
27913
29373
|
}
|
|
@@ -33332,6 +34792,9 @@ export class MJDuplicateRunDetailMatch_ {
|
|
|
33332
34792
|
@Field()
|
|
33333
34793
|
_mj__UpdatedAt: Date;
|
|
33334
34794
|
|
|
34795
|
+
@Field({nullable: true, description: `JSON metadata snapshot of the matched record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.`})
|
|
34796
|
+
RecordMetadata?: string;
|
|
34797
|
+
|
|
33335
34798
|
@Field()
|
|
33336
34799
|
@MaxLength(500)
|
|
33337
34800
|
DuplicateRunDetail: string;
|
|
@@ -33379,6 +34842,9 @@ export class CreateMJDuplicateRunDetailMatchInput {
|
|
|
33379
34842
|
|
|
33380
34843
|
@Field({ nullable: true })
|
|
33381
34844
|
MergedAt?: Date;
|
|
34845
|
+
|
|
34846
|
+
@Field({ nullable: true })
|
|
34847
|
+
RecordMetadata: string | null;
|
|
33382
34848
|
}
|
|
33383
34849
|
|
|
33384
34850
|
|
|
@@ -33420,6 +34886,9 @@ export class UpdateMJDuplicateRunDetailMatchInput {
|
|
|
33420
34886
|
@Field({ nullable: true })
|
|
33421
34887
|
MergedAt?: Date;
|
|
33422
34888
|
|
|
34889
|
+
@Field({ nullable: true })
|
|
34890
|
+
RecordMetadata?: string | null;
|
|
34891
|
+
|
|
33423
34892
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
33424
34893
|
OldValues___?: KeyValuePairInput[];
|
|
33425
34894
|
}
|
|
@@ -33550,6 +35019,15 @@ export class MJDuplicateRunDetail_ {
|
|
|
33550
35019
|
@Field()
|
|
33551
35020
|
_mj__UpdatedAt: Date;
|
|
33552
35021
|
|
|
35022
|
+
@Field({nullable: true, description: `JSON metadata snapshot of the source record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.`})
|
|
35023
|
+
RecordMetadata?: string;
|
|
35024
|
+
|
|
35025
|
+
@Field({nullable: true, description: `When processing started for this specific record during duplicate detection.`})
|
|
35026
|
+
StartedAt?: Date;
|
|
35027
|
+
|
|
35028
|
+
@Field({nullable: true, description: `When processing completed for this specific record during duplicate detection.`})
|
|
35029
|
+
EndedAt?: Date;
|
|
35030
|
+
|
|
33553
35031
|
@Field()
|
|
33554
35032
|
@MaxLength(255)
|
|
33555
35033
|
DuplicateRun: string;
|
|
@@ -33587,6 +35065,15 @@ export class CreateMJDuplicateRunDetailInput {
|
|
|
33587
35065
|
|
|
33588
35066
|
@Field({ nullable: true })
|
|
33589
35067
|
MergeErrorMessage: string | null;
|
|
35068
|
+
|
|
35069
|
+
@Field({ nullable: true })
|
|
35070
|
+
RecordMetadata: string | null;
|
|
35071
|
+
|
|
35072
|
+
@Field({ nullable: true })
|
|
35073
|
+
StartedAt: Date | null;
|
|
35074
|
+
|
|
35075
|
+
@Field({ nullable: true })
|
|
35076
|
+
EndedAt: Date | null;
|
|
33590
35077
|
}
|
|
33591
35078
|
|
|
33592
35079
|
|
|
@@ -33619,6 +35106,15 @@ export class UpdateMJDuplicateRunDetailInput {
|
|
|
33619
35106
|
@Field({ nullable: true })
|
|
33620
35107
|
MergeErrorMessage?: string | null;
|
|
33621
35108
|
|
|
35109
|
+
@Field({ nullable: true })
|
|
35110
|
+
RecordMetadata?: string | null;
|
|
35111
|
+
|
|
35112
|
+
@Field({ nullable: true })
|
|
35113
|
+
StartedAt?: Date | null;
|
|
35114
|
+
|
|
35115
|
+
@Field({ nullable: true })
|
|
35116
|
+
EndedAt?: Date | null;
|
|
35117
|
+
|
|
33622
35118
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
33623
35119
|
OldValues___?: KeyValuePairInput[];
|
|
33624
35120
|
}
|
|
@@ -33736,9 +35232,9 @@ export class MJDuplicateRun_ {
|
|
|
33736
35232
|
@MaxLength(36)
|
|
33737
35233
|
StartedByUserID: string;
|
|
33738
35234
|
|
|
33739
|
-
@Field()
|
|
35235
|
+
@Field({nullable: true, description: `Optional List ID to narrow the scope of duplicate detection. When NULL, all records in the entity are scanned. When set, only records in the specified list are checked for duplicates.`})
|
|
33740
35236
|
@MaxLength(36)
|
|
33741
|
-
SourceListID
|
|
35237
|
+
SourceListID?: string;
|
|
33742
35238
|
|
|
33743
35239
|
@Field()
|
|
33744
35240
|
StartedAt: Date;
|
|
@@ -33770,6 +35266,21 @@ export class MJDuplicateRun_ {
|
|
|
33770
35266
|
@Field()
|
|
33771
35267
|
_mj__UpdatedAt: Date;
|
|
33772
35268
|
|
|
35269
|
+
@Field(() => Int, {nullable: true, description: `Total entity records to check for duplicates in this run.`})
|
|
35270
|
+
TotalItemCount?: number;
|
|
35271
|
+
|
|
35272
|
+
@Field(() => Int, {nullable: true, description: `Number of records checked so far. Used for progress percentage.`})
|
|
35273
|
+
ProcessedItemCount?: number;
|
|
35274
|
+
|
|
35275
|
+
@Field(() => Int, {nullable: true, description: `Resume cursor for large-scale duplicate detection. Stores the offset of the last completed batch.`})
|
|
35276
|
+
LastProcessedOffset?: number;
|
|
35277
|
+
|
|
35278
|
+
@Field(() => Int, {nullable: true, description: `Number of records processed per batch during duplicate detection.`})
|
|
35279
|
+
BatchSize?: number;
|
|
35280
|
+
|
|
35281
|
+
@Field(() => Boolean, {description: `When set to 1, duplicate detection stops after the current batch. Used for pause/cancel.`})
|
|
35282
|
+
CancellationRequested: boolean;
|
|
35283
|
+
|
|
33773
35284
|
@Field()
|
|
33774
35285
|
@MaxLength(255)
|
|
33775
35286
|
Entity: string;
|
|
@@ -33778,9 +35289,9 @@ export class MJDuplicateRun_ {
|
|
|
33778
35289
|
@MaxLength(100)
|
|
33779
35290
|
StartedByUser: string;
|
|
33780
35291
|
|
|
33781
|
-
@Field()
|
|
35292
|
+
@Field({nullable: true})
|
|
33782
35293
|
@MaxLength(100)
|
|
33783
|
-
SourceList
|
|
35294
|
+
SourceList?: string;
|
|
33784
35295
|
|
|
33785
35296
|
@Field({nullable: true})
|
|
33786
35297
|
@MaxLength(100)
|
|
@@ -33806,7 +35317,7 @@ export class CreateMJDuplicateRunInput {
|
|
|
33806
35317
|
StartedByUserID?: string;
|
|
33807
35318
|
|
|
33808
35319
|
@Field({ nullable: true })
|
|
33809
|
-
SourceListID
|
|
35320
|
+
SourceListID: string | null;
|
|
33810
35321
|
|
|
33811
35322
|
@Field({ nullable: true })
|
|
33812
35323
|
StartedAt?: Date;
|
|
@@ -33828,6 +35339,21 @@ export class CreateMJDuplicateRunInput {
|
|
|
33828
35339
|
|
|
33829
35340
|
@Field({ nullable: true })
|
|
33830
35341
|
ProcessingErrorMessage: string | null;
|
|
35342
|
+
|
|
35343
|
+
@Field(() => Int, { nullable: true })
|
|
35344
|
+
TotalItemCount: number | null;
|
|
35345
|
+
|
|
35346
|
+
@Field(() => Int, { nullable: true })
|
|
35347
|
+
ProcessedItemCount?: number | null;
|
|
35348
|
+
|
|
35349
|
+
@Field(() => Int, { nullable: true })
|
|
35350
|
+
LastProcessedOffset?: number | null;
|
|
35351
|
+
|
|
35352
|
+
@Field(() => Int, { nullable: true })
|
|
35353
|
+
BatchSize?: number | null;
|
|
35354
|
+
|
|
35355
|
+
@Field(() => Boolean, { nullable: true })
|
|
35356
|
+
CancellationRequested?: boolean;
|
|
33831
35357
|
}
|
|
33832
35358
|
|
|
33833
35359
|
|
|
@@ -33846,7 +35372,7 @@ export class UpdateMJDuplicateRunInput {
|
|
|
33846
35372
|
StartedByUserID?: string;
|
|
33847
35373
|
|
|
33848
35374
|
@Field({ nullable: true })
|
|
33849
|
-
SourceListID?: string;
|
|
35375
|
+
SourceListID?: string | null;
|
|
33850
35376
|
|
|
33851
35377
|
@Field({ nullable: true })
|
|
33852
35378
|
StartedAt?: Date;
|
|
@@ -33869,6 +35395,21 @@ export class UpdateMJDuplicateRunInput {
|
|
|
33869
35395
|
@Field({ nullable: true })
|
|
33870
35396
|
ProcessingErrorMessage?: string | null;
|
|
33871
35397
|
|
|
35398
|
+
@Field(() => Int, { nullable: true })
|
|
35399
|
+
TotalItemCount?: number | null;
|
|
35400
|
+
|
|
35401
|
+
@Field(() => Int, { nullable: true })
|
|
35402
|
+
ProcessedItemCount?: number | null;
|
|
35403
|
+
|
|
35404
|
+
@Field(() => Int, { nullable: true })
|
|
35405
|
+
LastProcessedOffset?: number | null;
|
|
35406
|
+
|
|
35407
|
+
@Field(() => Int, { nullable: true })
|
|
35408
|
+
BatchSize?: number | null;
|
|
35409
|
+
|
|
35410
|
+
@Field(() => Boolean, { nullable: true })
|
|
35411
|
+
CancellationRequested?: boolean;
|
|
35412
|
+
|
|
33872
35413
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
33873
35414
|
OldValues___?: KeyValuePairInput[];
|
|
33874
35415
|
}
|
|
@@ -35788,6 +37329,9 @@ export class MJEntity_ {
|
|
|
35788
37329
|
@Field(() => [MJResourceType_])
|
|
35789
37330
|
MJResourceTypes_CategoryEntityIDArray: MJResourceType_[]; // Link to MJResourceTypes
|
|
35790
37331
|
|
|
37332
|
+
@Field(() => [MJContentSource_])
|
|
37333
|
+
MJContentSources_EntityIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
37334
|
+
|
|
35791
37335
|
@Field(() => [MJTestRun_])
|
|
35792
37336
|
MJTestRuns_TargetLogEntityIDArray: MJTestRun_[]; // Link to MJTestRuns
|
|
35793
37337
|
|
|
@@ -36713,6 +38257,16 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
36713
38257
|
return result;
|
|
36714
38258
|
}
|
|
36715
38259
|
|
|
38260
|
+
@FieldResolver(() => [MJContentSource_])
|
|
38261
|
+
async MJContentSources_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38262
|
+
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
38263
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38264
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
38265
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
38266
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
38267
|
+
return result;
|
|
38268
|
+
}
|
|
38269
|
+
|
|
36716
38270
|
@FieldResolver(() => [MJTestRun_])
|
|
36717
38271
|
async MJTestRuns_TargetLogEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
36718
38272
|
this.CheckUserReadPermissions('MJ: Test Runs', userPayload);
|
|
@@ -38825,6 +40379,9 @@ export class MJEntityDocument_ {
|
|
|
38825
40379
|
@Field(() => [MJEntityRecordDocument_])
|
|
38826
40380
|
MJEntityRecordDocuments_EntityDocumentIDArray: MJEntityRecordDocument_[]; // Link to MJEntityRecordDocuments
|
|
38827
40381
|
|
|
40382
|
+
@Field(() => [MJContentSource_])
|
|
40383
|
+
MJContentSources_EntityDocumentIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
40384
|
+
|
|
38828
40385
|
}
|
|
38829
40386
|
|
|
38830
40387
|
//****************************************************************************
|
|
@@ -39002,6 +40559,16 @@ export class MJEntityDocumentResolver extends ResolverBase {
|
|
|
39002
40559
|
return result;
|
|
39003
40560
|
}
|
|
39004
40561
|
|
|
40562
|
+
@FieldResolver(() => [MJContentSource_])
|
|
40563
|
+
async MJContentSources_EntityDocumentIDArray(@Root() mjentitydocument_: MJEntityDocument_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40564
|
+
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
40565
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40566
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('EntityDocumentID')}='${mjentitydocument_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
40567
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
40568
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
40569
|
+
return result;
|
|
40570
|
+
}
|
|
40571
|
+
|
|
39005
40572
|
@Mutation(() => MJEntityDocument_)
|
|
39006
40573
|
async CreateMJEntityDocument(
|
|
39007
40574
|
@Arg('input', () => CreateMJEntityDocumentInput) input: CreateMJEntityDocumentInput,
|
|
@@ -39420,6 +40987,16 @@ export class MJEntityField_ {
|
|
|
39420
40987
|
@Field({nullable: true, description: `JSON configuration for additional fields to join from the related entity into this entity's base view. Supports modes: extend (add to NameField), override (replace NameField), disable (no joins). Schema: { mode?: string, fields?: [{ field: string, alias?: string }] }`})
|
|
39421
40988
|
RelatedEntityJoinFields?: string;
|
|
39422
40989
|
|
|
40990
|
+
@Field({nullable: true, description: `The name of the TypeScript interface/type for this JSON field. When set, CodeGen emits a strongly-typed Object-suffixed accessor using this type instead of only the default string getter/setter.`})
|
|
40991
|
+
@MaxLength(255)
|
|
40992
|
+
JSONType?: string;
|
|
40993
|
+
|
|
40994
|
+
@Field(() => Boolean, {description: `If true, the field holds a JSON array of JSONType items. The Object accessor returns Array<JSONType> | null and the setter accepts Array<JSONType> | null.`})
|
|
40995
|
+
JSONTypeIsArray: boolean;
|
|
40996
|
+
|
|
40997
|
+
@Field({nullable: true, description: `Raw TypeScript code emitted by CodeGen above the entity class definition. Typically contains the interface/type definition referenced by JSONType. Can include imports, multiple types, or any valid TypeScript.`})
|
|
40998
|
+
JSONTypeDefinition?: string;
|
|
40999
|
+
|
|
39423
41000
|
@Field({nullable: true})
|
|
39424
41001
|
FieldCodeName?: string;
|
|
39425
41002
|
|
|
@@ -39605,6 +41182,15 @@ export class CreateMJEntityFieldInput {
|
|
|
39605
41182
|
|
|
39606
41183
|
@Field({ nullable: true })
|
|
39607
41184
|
RelatedEntityJoinFields: string | null;
|
|
41185
|
+
|
|
41186
|
+
@Field({ nullable: true })
|
|
41187
|
+
JSONType: string | null;
|
|
41188
|
+
|
|
41189
|
+
@Field(() => Boolean, { nullable: true })
|
|
41190
|
+
JSONTypeIsArray?: boolean;
|
|
41191
|
+
|
|
41192
|
+
@Field({ nullable: true })
|
|
41193
|
+
JSONTypeDefinition: string | null;
|
|
39608
41194
|
}
|
|
39609
41195
|
|
|
39610
41196
|
|
|
@@ -39742,6 +41328,15 @@ export class UpdateMJEntityFieldInput {
|
|
|
39742
41328
|
@Field({ nullable: true })
|
|
39743
41329
|
RelatedEntityJoinFields?: string | null;
|
|
39744
41330
|
|
|
41331
|
+
@Field({ nullable: true })
|
|
41332
|
+
JSONType?: string | null;
|
|
41333
|
+
|
|
41334
|
+
@Field(() => Boolean, { nullable: true })
|
|
41335
|
+
JSONTypeIsArray?: boolean;
|
|
41336
|
+
|
|
41337
|
+
@Field({ nullable: true })
|
|
41338
|
+
JSONTypeDefinition?: string | null;
|
|
41339
|
+
|
|
39745
41340
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
39746
41341
|
OldValues___?: KeyValuePairInput[];
|
|
39747
41342
|
}
|
|
@@ -40646,6 +42241,9 @@ export class MJEntityRecordDocument_ {
|
|
|
40646
42241
|
@MaxLength(255)
|
|
40647
42242
|
VectorIndex: string;
|
|
40648
42243
|
|
|
42244
|
+
@Field(() => [MJContentItem_])
|
|
42245
|
+
MJContentItems_EntityRecordDocumentIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
42246
|
+
|
|
40649
42247
|
}
|
|
40650
42248
|
|
|
40651
42249
|
//****************************************************************************
|
|
@@ -40775,6 +42373,16 @@ export class MJEntityRecordDocumentResolver extends ResolverBase {
|
|
|
40775
42373
|
return result;
|
|
40776
42374
|
}
|
|
40777
42375
|
|
|
42376
|
+
@FieldResolver(() => [MJContentItem_])
|
|
42377
|
+
async MJContentItems_EntityRecordDocumentIDArray(@Root() mjentityrecorddocument_: MJEntityRecordDocument_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42378
|
+
this.CheckUserReadPermissions('MJ: Content Items', userPayload);
|
|
42379
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42380
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItems')} WHERE ${provider.QuoteIdentifier('EntityRecordDocumentID')}='${mjentityrecorddocument_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
42381
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
42382
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Items', rows, this.GetUserFromPayload(userPayload));
|
|
42383
|
+
return result;
|
|
42384
|
+
}
|
|
42385
|
+
|
|
40778
42386
|
@Mutation(() => MJEntityRecordDocument_)
|
|
40779
42387
|
async CreateMJEntityRecordDocument(
|
|
40780
42388
|
@Arg('input', () => CreateMJEntityRecordDocumentInput) input: CreateMJEntityRecordDocumentInput,
|
|
@@ -44967,6 +46575,201 @@ export class MJIntegrationResolver extends ResolverBase {
|
|
|
44967
46575
|
|
|
44968
46576
|
}
|
|
44969
46577
|
|
|
46578
|
+
//****************************************************************************
|
|
46579
|
+
// ENTITY CLASS for MJ: Knowledge Hub Saved Searches
|
|
46580
|
+
//****************************************************************************
|
|
46581
|
+
@ObjectType({ description: `User-saved search queries for the Knowledge Hub. Stores query text, active filters (JSON), and score thresholds so searches can be recalled or run on a schedule.` })
|
|
46582
|
+
export class MJKnowledgeHubSavedSearch_ {
|
|
46583
|
+
@Field()
|
|
46584
|
+
@MaxLength(36)
|
|
46585
|
+
ID: string;
|
|
46586
|
+
|
|
46587
|
+
@Field()
|
|
46588
|
+
@MaxLength(36)
|
|
46589
|
+
UserID: string;
|
|
46590
|
+
|
|
46591
|
+
@Field()
|
|
46592
|
+
@MaxLength(255)
|
|
46593
|
+
Name: string;
|
|
46594
|
+
|
|
46595
|
+
@Field()
|
|
46596
|
+
@MaxLength(1000)
|
|
46597
|
+
Query: string;
|
|
46598
|
+
|
|
46599
|
+
@Field({nullable: true, description: `JSON object with active filter selections. Keys are filter categories (Entity, Tags), values are arrays of selected option values.`})
|
|
46600
|
+
Filters?: string;
|
|
46601
|
+
|
|
46602
|
+
@Field(() => Float, {nullable: true})
|
|
46603
|
+
MinScore?: number;
|
|
46604
|
+
|
|
46605
|
+
@Field(() => Int, {nullable: true})
|
|
46606
|
+
MaxResults?: number;
|
|
46607
|
+
|
|
46608
|
+
@Field(() => Boolean, {description: `When enabled, the system will notify the user when new results match this saved search (future capability).`})
|
|
46609
|
+
NotifyOnNewResults: boolean;
|
|
46610
|
+
|
|
46611
|
+
@Field()
|
|
46612
|
+
_mj__CreatedAt: Date;
|
|
46613
|
+
|
|
46614
|
+
@Field()
|
|
46615
|
+
_mj__UpdatedAt: Date;
|
|
46616
|
+
|
|
46617
|
+
@Field()
|
|
46618
|
+
@MaxLength(100)
|
|
46619
|
+
User: string;
|
|
46620
|
+
|
|
46621
|
+
}
|
|
46622
|
+
|
|
46623
|
+
//****************************************************************************
|
|
46624
|
+
// INPUT TYPE for MJ: Knowledge Hub Saved Searches
|
|
46625
|
+
//****************************************************************************
|
|
46626
|
+
@InputType()
|
|
46627
|
+
export class CreateMJKnowledgeHubSavedSearchInput {
|
|
46628
|
+
@Field({ nullable: true })
|
|
46629
|
+
ID?: string;
|
|
46630
|
+
|
|
46631
|
+
@Field({ nullable: true })
|
|
46632
|
+
UserID?: string;
|
|
46633
|
+
|
|
46634
|
+
@Field({ nullable: true })
|
|
46635
|
+
Name?: string;
|
|
46636
|
+
|
|
46637
|
+
@Field({ nullable: true })
|
|
46638
|
+
Query?: string;
|
|
46639
|
+
|
|
46640
|
+
@Field({ nullable: true })
|
|
46641
|
+
Filters: string | null;
|
|
46642
|
+
|
|
46643
|
+
@Field(() => Float, { nullable: true })
|
|
46644
|
+
MinScore: number | null;
|
|
46645
|
+
|
|
46646
|
+
@Field(() => Int, { nullable: true })
|
|
46647
|
+
MaxResults?: number | null;
|
|
46648
|
+
|
|
46649
|
+
@Field(() => Boolean, { nullable: true })
|
|
46650
|
+
NotifyOnNewResults?: boolean;
|
|
46651
|
+
}
|
|
46652
|
+
|
|
46653
|
+
|
|
46654
|
+
//****************************************************************************
|
|
46655
|
+
// INPUT TYPE for MJ: Knowledge Hub Saved Searches
|
|
46656
|
+
//****************************************************************************
|
|
46657
|
+
@InputType()
|
|
46658
|
+
export class UpdateMJKnowledgeHubSavedSearchInput {
|
|
46659
|
+
@Field()
|
|
46660
|
+
ID: string;
|
|
46661
|
+
|
|
46662
|
+
@Field({ nullable: true })
|
|
46663
|
+
UserID?: string;
|
|
46664
|
+
|
|
46665
|
+
@Field({ nullable: true })
|
|
46666
|
+
Name?: string;
|
|
46667
|
+
|
|
46668
|
+
@Field({ nullable: true })
|
|
46669
|
+
Query?: string;
|
|
46670
|
+
|
|
46671
|
+
@Field({ nullable: true })
|
|
46672
|
+
Filters?: string | null;
|
|
46673
|
+
|
|
46674
|
+
@Field(() => Float, { nullable: true })
|
|
46675
|
+
MinScore?: number | null;
|
|
46676
|
+
|
|
46677
|
+
@Field(() => Int, { nullable: true })
|
|
46678
|
+
MaxResults?: number | null;
|
|
46679
|
+
|
|
46680
|
+
@Field(() => Boolean, { nullable: true })
|
|
46681
|
+
NotifyOnNewResults?: boolean;
|
|
46682
|
+
|
|
46683
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
46684
|
+
OldValues___?: KeyValuePairInput[];
|
|
46685
|
+
}
|
|
46686
|
+
|
|
46687
|
+
//****************************************************************************
|
|
46688
|
+
// RESOLVER for MJ: Knowledge Hub Saved Searches
|
|
46689
|
+
//****************************************************************************
|
|
46690
|
+
@ObjectType()
|
|
46691
|
+
export class RunMJKnowledgeHubSavedSearchViewResult {
|
|
46692
|
+
@Field(() => [MJKnowledgeHubSavedSearch_])
|
|
46693
|
+
Results: MJKnowledgeHubSavedSearch_[];
|
|
46694
|
+
|
|
46695
|
+
@Field(() => String, {nullable: true})
|
|
46696
|
+
UserViewRunID?: string;
|
|
46697
|
+
|
|
46698
|
+
@Field(() => Int, {nullable: true})
|
|
46699
|
+
RowCount: number;
|
|
46700
|
+
|
|
46701
|
+
@Field(() => Int, {nullable: true})
|
|
46702
|
+
TotalRowCount: number;
|
|
46703
|
+
|
|
46704
|
+
@Field(() => Int, {nullable: true})
|
|
46705
|
+
ExecutionTime: number;
|
|
46706
|
+
|
|
46707
|
+
@Field({nullable: true})
|
|
46708
|
+
ErrorMessage?: string;
|
|
46709
|
+
|
|
46710
|
+
@Field(() => Boolean, {nullable: false})
|
|
46711
|
+
Success: boolean;
|
|
46712
|
+
}
|
|
46713
|
+
|
|
46714
|
+
@Resolver(MJKnowledgeHubSavedSearch_)
|
|
46715
|
+
export class MJKnowledgeHubSavedSearchResolver extends ResolverBase {
|
|
46716
|
+
@Query(() => RunMJKnowledgeHubSavedSearchViewResult)
|
|
46717
|
+
async RunMJKnowledgeHubSavedSearchViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46718
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46719
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
46720
|
+
}
|
|
46721
|
+
|
|
46722
|
+
@Query(() => RunMJKnowledgeHubSavedSearchViewResult)
|
|
46723
|
+
async RunMJKnowledgeHubSavedSearchViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46724
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46725
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
46726
|
+
}
|
|
46727
|
+
|
|
46728
|
+
@Query(() => RunMJKnowledgeHubSavedSearchViewResult)
|
|
46729
|
+
async RunMJKnowledgeHubSavedSearchDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46730
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46731
|
+
input.EntityName = 'MJ: Knowledge Hub Saved Searches';
|
|
46732
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
46733
|
+
}
|
|
46734
|
+
@Query(() => MJKnowledgeHubSavedSearch_, { nullable: true })
|
|
46735
|
+
async MJKnowledgeHubSavedSearch(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJKnowledgeHubSavedSearch_ | null> {
|
|
46736
|
+
this.CheckUserReadPermissions('MJ: Knowledge Hub Saved Searches', userPayload);
|
|
46737
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46738
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwKnowledgeHubSavedSearches')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Knowledge Hub Saved Searches', userPayload, EntityPermissionType.Read, 'AND');
|
|
46739
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
46740
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Knowledge Hub Saved Searches', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
46741
|
+
return result;
|
|
46742
|
+
}
|
|
46743
|
+
|
|
46744
|
+
@Mutation(() => MJKnowledgeHubSavedSearch_)
|
|
46745
|
+
async CreateMJKnowledgeHubSavedSearch(
|
|
46746
|
+
@Arg('input', () => CreateMJKnowledgeHubSavedSearchInput) input: CreateMJKnowledgeHubSavedSearchInput,
|
|
46747
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
46748
|
+
@PubSub() pubSub: PubSubEngine
|
|
46749
|
+
) {
|
|
46750
|
+
const provider = GetReadWriteProvider(providers);
|
|
46751
|
+
return this.CreateRecord('MJ: Knowledge Hub Saved Searches', input, provider, userPayload, pubSub)
|
|
46752
|
+
}
|
|
46753
|
+
|
|
46754
|
+
@Mutation(() => MJKnowledgeHubSavedSearch_)
|
|
46755
|
+
async UpdateMJKnowledgeHubSavedSearch(
|
|
46756
|
+
@Arg('input', () => UpdateMJKnowledgeHubSavedSearchInput) input: UpdateMJKnowledgeHubSavedSearchInput,
|
|
46757
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
46758
|
+
@PubSub() pubSub: PubSubEngine
|
|
46759
|
+
) {
|
|
46760
|
+
const provider = GetReadWriteProvider(providers);
|
|
46761
|
+
return this.UpdateRecord('MJ: Knowledge Hub Saved Searches', input, provider, userPayload, pubSub);
|
|
46762
|
+
}
|
|
46763
|
+
|
|
46764
|
+
@Mutation(() => MJKnowledgeHubSavedSearch_)
|
|
46765
|
+
async DeleteMJKnowledgeHubSavedSearch(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46766
|
+
const provider = GetReadWriteProvider(providers);
|
|
46767
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
46768
|
+
return this.DeleteRecord('MJ: Knowledge Hub Saved Searches', key, options, provider, userPayload, pubSub);
|
|
46769
|
+
}
|
|
46770
|
+
|
|
46771
|
+
}
|
|
46772
|
+
|
|
44970
46773
|
//****************************************************************************
|
|
44971
46774
|
// ENTITY CLASS for MJ: Libraries
|
|
44972
46775
|
//****************************************************************************
|
|
@@ -57547,6 +59350,9 @@ export class MJScheduledAction_ {
|
|
|
57547
59350
|
@Field(() => [MJScheduledActionParam_])
|
|
57548
59351
|
MJScheduledActionParams_ScheduledActionIDArray: MJScheduledActionParam_[]; // Link to MJScheduledActionParams
|
|
57549
59352
|
|
|
59353
|
+
@Field(() => [MJContentSource_])
|
|
59354
|
+
MJContentSources_ScheduledActionIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
59355
|
+
|
|
57550
59356
|
}
|
|
57551
59357
|
|
|
57552
59358
|
//****************************************************************************
|
|
@@ -57716,6 +59522,16 @@ export class MJScheduledActionResolver extends ResolverBase {
|
|
|
57716
59522
|
return result;
|
|
57717
59523
|
}
|
|
57718
59524
|
|
|
59525
|
+
@FieldResolver(() => [MJContentSource_])
|
|
59526
|
+
async MJContentSources_ScheduledActionIDArray(@Root() mjscheduledaction_: MJScheduledAction_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
59527
|
+
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
59528
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
59529
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('ScheduledActionID')}='${mjscheduledaction_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
59530
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
59531
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
59532
|
+
return result;
|
|
59533
|
+
}
|
|
59534
|
+
|
|
57719
59535
|
@Mutation(() => MJScheduledAction_)
|
|
57720
59536
|
async CreateMJScheduledAction(
|
|
57721
59537
|
@Arg('input', () => CreateMJScheduledActionInput) input: CreateMJScheduledActionInput,
|
|
@@ -59192,6 +61008,363 @@ export class MJSQLDialectResolver extends ResolverBase {
|
|
|
59192
61008
|
|
|
59193
61009
|
}
|
|
59194
61010
|
|
|
61011
|
+
//****************************************************************************
|
|
61012
|
+
// ENTITY CLASS for MJ: Tag Audit Logs
|
|
61013
|
+
//****************************************************************************
|
|
61014
|
+
@ObjectType({ description: `Immutable audit trail for all tag taxonomy changes. Each row records a single action with before/after details in JSON.` })
|
|
61015
|
+
export class MJTagAuditLog_ {
|
|
61016
|
+
@Field()
|
|
61017
|
+
@MaxLength(36)
|
|
61018
|
+
ID: string;
|
|
61019
|
+
|
|
61020
|
+
@Field({description: `The tag that was acted upon.`})
|
|
61021
|
+
@MaxLength(36)
|
|
61022
|
+
TagID: string;
|
|
61023
|
+
|
|
61024
|
+
@Field({description: `The type of action performed: Created, Renamed, Moved (parent changed), Merged (into RelatedTagID), Split (from RelatedTagID), Deprecated, Reactivated, Deleted, DescriptionChanged.`})
|
|
61025
|
+
@MaxLength(30)
|
|
61026
|
+
Action: string;
|
|
61027
|
+
|
|
61028
|
+
@Field({nullable: true, description: `JSON object with action-specific details. For Renamed: {"OldName":"...","NewName":"..."}. For Moved: {"OldParentID":"...","NewParentID":"..."}. For Merged: {"ItemsMoved":42}.`})
|
|
61029
|
+
Details?: string;
|
|
61030
|
+
|
|
61031
|
+
@Field({description: `User who performed the action.`})
|
|
61032
|
+
@MaxLength(36)
|
|
61033
|
+
PerformedByUserID: string;
|
|
61034
|
+
|
|
61035
|
+
@Field({nullable: true, description: `For Merged actions: the surviving tag. For Split actions: the source tag. NULL for other actions.`})
|
|
61036
|
+
@MaxLength(36)
|
|
61037
|
+
RelatedTagID?: string;
|
|
61038
|
+
|
|
61039
|
+
@Field()
|
|
61040
|
+
_mj__CreatedAt: Date;
|
|
61041
|
+
|
|
61042
|
+
@Field()
|
|
61043
|
+
_mj__UpdatedAt: Date;
|
|
61044
|
+
|
|
61045
|
+
@Field()
|
|
61046
|
+
@MaxLength(255)
|
|
61047
|
+
Tag: string;
|
|
61048
|
+
|
|
61049
|
+
@Field()
|
|
61050
|
+
@MaxLength(100)
|
|
61051
|
+
PerformedByUser: string;
|
|
61052
|
+
|
|
61053
|
+
@Field({nullable: true})
|
|
61054
|
+
@MaxLength(255)
|
|
61055
|
+
RelatedTag?: string;
|
|
61056
|
+
|
|
61057
|
+
}
|
|
61058
|
+
|
|
61059
|
+
//****************************************************************************
|
|
61060
|
+
// INPUT TYPE for MJ: Tag Audit Logs
|
|
61061
|
+
//****************************************************************************
|
|
61062
|
+
@InputType()
|
|
61063
|
+
export class CreateMJTagAuditLogInput {
|
|
61064
|
+
@Field({ nullable: true })
|
|
61065
|
+
ID?: string;
|
|
61066
|
+
|
|
61067
|
+
@Field({ nullable: true })
|
|
61068
|
+
TagID?: string;
|
|
61069
|
+
|
|
61070
|
+
@Field({ nullable: true })
|
|
61071
|
+
Action?: string;
|
|
61072
|
+
|
|
61073
|
+
@Field({ nullable: true })
|
|
61074
|
+
Details: string | null;
|
|
61075
|
+
|
|
61076
|
+
@Field({ nullable: true })
|
|
61077
|
+
PerformedByUserID?: string;
|
|
61078
|
+
|
|
61079
|
+
@Field({ nullable: true })
|
|
61080
|
+
RelatedTagID: string | null;
|
|
61081
|
+
}
|
|
61082
|
+
|
|
61083
|
+
|
|
61084
|
+
//****************************************************************************
|
|
61085
|
+
// INPUT TYPE for MJ: Tag Audit Logs
|
|
61086
|
+
//****************************************************************************
|
|
61087
|
+
@InputType()
|
|
61088
|
+
export class UpdateMJTagAuditLogInput {
|
|
61089
|
+
@Field()
|
|
61090
|
+
ID: string;
|
|
61091
|
+
|
|
61092
|
+
@Field({ nullable: true })
|
|
61093
|
+
TagID?: string;
|
|
61094
|
+
|
|
61095
|
+
@Field({ nullable: true })
|
|
61096
|
+
Action?: string;
|
|
61097
|
+
|
|
61098
|
+
@Field({ nullable: true })
|
|
61099
|
+
Details?: string | null;
|
|
61100
|
+
|
|
61101
|
+
@Field({ nullable: true })
|
|
61102
|
+
PerformedByUserID?: string;
|
|
61103
|
+
|
|
61104
|
+
@Field({ nullable: true })
|
|
61105
|
+
RelatedTagID?: string | null;
|
|
61106
|
+
|
|
61107
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
61108
|
+
OldValues___?: KeyValuePairInput[];
|
|
61109
|
+
}
|
|
61110
|
+
|
|
61111
|
+
//****************************************************************************
|
|
61112
|
+
// RESOLVER for MJ: Tag Audit Logs
|
|
61113
|
+
//****************************************************************************
|
|
61114
|
+
@ObjectType()
|
|
61115
|
+
export class RunMJTagAuditLogViewResult {
|
|
61116
|
+
@Field(() => [MJTagAuditLog_])
|
|
61117
|
+
Results: MJTagAuditLog_[];
|
|
61118
|
+
|
|
61119
|
+
@Field(() => String, {nullable: true})
|
|
61120
|
+
UserViewRunID?: string;
|
|
61121
|
+
|
|
61122
|
+
@Field(() => Int, {nullable: true})
|
|
61123
|
+
RowCount: number;
|
|
61124
|
+
|
|
61125
|
+
@Field(() => Int, {nullable: true})
|
|
61126
|
+
TotalRowCount: number;
|
|
61127
|
+
|
|
61128
|
+
@Field(() => Int, {nullable: true})
|
|
61129
|
+
ExecutionTime: number;
|
|
61130
|
+
|
|
61131
|
+
@Field({nullable: true})
|
|
61132
|
+
ErrorMessage?: string;
|
|
61133
|
+
|
|
61134
|
+
@Field(() => Boolean, {nullable: false})
|
|
61135
|
+
Success: boolean;
|
|
61136
|
+
}
|
|
61137
|
+
|
|
61138
|
+
@Resolver(MJTagAuditLog_)
|
|
61139
|
+
export class MJTagAuditLogResolver extends ResolverBase {
|
|
61140
|
+
@Query(() => RunMJTagAuditLogViewResult)
|
|
61141
|
+
async RunMJTagAuditLogViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61142
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61143
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
61144
|
+
}
|
|
61145
|
+
|
|
61146
|
+
@Query(() => RunMJTagAuditLogViewResult)
|
|
61147
|
+
async RunMJTagAuditLogViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61148
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61149
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
61150
|
+
}
|
|
61151
|
+
|
|
61152
|
+
@Query(() => RunMJTagAuditLogViewResult)
|
|
61153
|
+
async RunMJTagAuditLogDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61154
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61155
|
+
input.EntityName = 'MJ: Tag Audit Logs';
|
|
61156
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
61157
|
+
}
|
|
61158
|
+
@Query(() => MJTagAuditLog_, { nullable: true })
|
|
61159
|
+
async MJTagAuditLog(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTagAuditLog_ | null> {
|
|
61160
|
+
this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
|
|
61161
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61162
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
61163
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61164
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
61165
|
+
return result;
|
|
61166
|
+
}
|
|
61167
|
+
|
|
61168
|
+
@Mutation(() => MJTagAuditLog_)
|
|
61169
|
+
async CreateMJTagAuditLog(
|
|
61170
|
+
@Arg('input', () => CreateMJTagAuditLogInput) input: CreateMJTagAuditLogInput,
|
|
61171
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
61172
|
+
@PubSub() pubSub: PubSubEngine
|
|
61173
|
+
) {
|
|
61174
|
+
const provider = GetReadWriteProvider(providers);
|
|
61175
|
+
return this.CreateRecord('MJ: Tag Audit Logs', input, provider, userPayload, pubSub)
|
|
61176
|
+
}
|
|
61177
|
+
|
|
61178
|
+
@Mutation(() => MJTagAuditLog_)
|
|
61179
|
+
async UpdateMJTagAuditLog(
|
|
61180
|
+
@Arg('input', () => UpdateMJTagAuditLogInput) input: UpdateMJTagAuditLogInput,
|
|
61181
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
61182
|
+
@PubSub() pubSub: PubSubEngine
|
|
61183
|
+
) {
|
|
61184
|
+
const provider = GetReadWriteProvider(providers);
|
|
61185
|
+
return this.UpdateRecord('MJ: Tag Audit Logs', input, provider, userPayload, pubSub);
|
|
61186
|
+
}
|
|
61187
|
+
|
|
61188
|
+
@Mutation(() => MJTagAuditLog_)
|
|
61189
|
+
async DeleteMJTagAuditLog(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61190
|
+
const provider = GetReadWriteProvider(providers);
|
|
61191
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
61192
|
+
return this.DeleteRecord('MJ: Tag Audit Logs', key, options, provider, userPayload, pubSub);
|
|
61193
|
+
}
|
|
61194
|
+
|
|
61195
|
+
}
|
|
61196
|
+
|
|
61197
|
+
//****************************************************************************
|
|
61198
|
+
// ENTITY CLASS for MJ: Tag Co Occurrences
|
|
61199
|
+
//****************************************************************************
|
|
61200
|
+
@ObjectType({ description: `Materialized co-occurrence counts for tag pairs. Records how many content items share both tags. Used for taxonomy health analysis, merge suggestions, and cross-entity intelligence. Recomputed periodically by the pipeline.` })
|
|
61201
|
+
export class MJTagCoOccurrence_ {
|
|
61202
|
+
@Field()
|
|
61203
|
+
@MaxLength(36)
|
|
61204
|
+
ID: string;
|
|
61205
|
+
|
|
61206
|
+
@Field({description: `First tag in the canonical pair (TagAID < TagBID ensures each pair is stored exactly once).`})
|
|
61207
|
+
@MaxLength(36)
|
|
61208
|
+
TagAID: string;
|
|
61209
|
+
|
|
61210
|
+
@Field()
|
|
61211
|
+
@MaxLength(36)
|
|
61212
|
+
TagBID: string;
|
|
61213
|
+
|
|
61214
|
+
@Field(() => Int, {description: `Number of content items (or entity records via TaggedItem) that are tagged with both TagA and TagB.`})
|
|
61215
|
+
CoOccurrenceCount: number;
|
|
61216
|
+
|
|
61217
|
+
@Field()
|
|
61218
|
+
LastComputedAt: Date;
|
|
61219
|
+
|
|
61220
|
+
@Field()
|
|
61221
|
+
_mj__CreatedAt: Date;
|
|
61222
|
+
|
|
61223
|
+
@Field()
|
|
61224
|
+
_mj__UpdatedAt: Date;
|
|
61225
|
+
|
|
61226
|
+
@Field()
|
|
61227
|
+
@MaxLength(255)
|
|
61228
|
+
TagA: string;
|
|
61229
|
+
|
|
61230
|
+
@Field()
|
|
61231
|
+
@MaxLength(255)
|
|
61232
|
+
TagB: string;
|
|
61233
|
+
|
|
61234
|
+
}
|
|
61235
|
+
|
|
61236
|
+
//****************************************************************************
|
|
61237
|
+
// INPUT TYPE for MJ: Tag Co Occurrences
|
|
61238
|
+
//****************************************************************************
|
|
61239
|
+
@InputType()
|
|
61240
|
+
export class CreateMJTagCoOccurrenceInput {
|
|
61241
|
+
@Field({ nullable: true })
|
|
61242
|
+
ID?: string;
|
|
61243
|
+
|
|
61244
|
+
@Field({ nullable: true })
|
|
61245
|
+
TagAID?: string;
|
|
61246
|
+
|
|
61247
|
+
@Field({ nullable: true })
|
|
61248
|
+
TagBID?: string;
|
|
61249
|
+
|
|
61250
|
+
@Field(() => Int, { nullable: true })
|
|
61251
|
+
CoOccurrenceCount?: number;
|
|
61252
|
+
|
|
61253
|
+
@Field({ nullable: true })
|
|
61254
|
+
LastComputedAt?: Date;
|
|
61255
|
+
}
|
|
61256
|
+
|
|
61257
|
+
|
|
61258
|
+
//****************************************************************************
|
|
61259
|
+
// INPUT TYPE for MJ: Tag Co Occurrences
|
|
61260
|
+
//****************************************************************************
|
|
61261
|
+
@InputType()
|
|
61262
|
+
export class UpdateMJTagCoOccurrenceInput {
|
|
61263
|
+
@Field()
|
|
61264
|
+
ID: string;
|
|
61265
|
+
|
|
61266
|
+
@Field({ nullable: true })
|
|
61267
|
+
TagAID?: string;
|
|
61268
|
+
|
|
61269
|
+
@Field({ nullable: true })
|
|
61270
|
+
TagBID?: string;
|
|
61271
|
+
|
|
61272
|
+
@Field(() => Int, { nullable: true })
|
|
61273
|
+
CoOccurrenceCount?: number;
|
|
61274
|
+
|
|
61275
|
+
@Field({ nullable: true })
|
|
61276
|
+
LastComputedAt?: Date;
|
|
61277
|
+
|
|
61278
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
61279
|
+
OldValues___?: KeyValuePairInput[];
|
|
61280
|
+
}
|
|
61281
|
+
|
|
61282
|
+
//****************************************************************************
|
|
61283
|
+
// RESOLVER for MJ: Tag Co Occurrences
|
|
61284
|
+
//****************************************************************************
|
|
61285
|
+
@ObjectType()
|
|
61286
|
+
export class RunMJTagCoOccurrenceViewResult {
|
|
61287
|
+
@Field(() => [MJTagCoOccurrence_])
|
|
61288
|
+
Results: MJTagCoOccurrence_[];
|
|
61289
|
+
|
|
61290
|
+
@Field(() => String, {nullable: true})
|
|
61291
|
+
UserViewRunID?: string;
|
|
61292
|
+
|
|
61293
|
+
@Field(() => Int, {nullable: true})
|
|
61294
|
+
RowCount: number;
|
|
61295
|
+
|
|
61296
|
+
@Field(() => Int, {nullable: true})
|
|
61297
|
+
TotalRowCount: number;
|
|
61298
|
+
|
|
61299
|
+
@Field(() => Int, {nullable: true})
|
|
61300
|
+
ExecutionTime: number;
|
|
61301
|
+
|
|
61302
|
+
@Field({nullable: true})
|
|
61303
|
+
ErrorMessage?: string;
|
|
61304
|
+
|
|
61305
|
+
@Field(() => Boolean, {nullable: false})
|
|
61306
|
+
Success: boolean;
|
|
61307
|
+
}
|
|
61308
|
+
|
|
61309
|
+
@Resolver(MJTagCoOccurrence_)
|
|
61310
|
+
export class MJTagCoOccurrenceResolver extends ResolverBase {
|
|
61311
|
+
@Query(() => RunMJTagCoOccurrenceViewResult)
|
|
61312
|
+
async RunMJTagCoOccurrenceViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61313
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61314
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
61315
|
+
}
|
|
61316
|
+
|
|
61317
|
+
@Query(() => RunMJTagCoOccurrenceViewResult)
|
|
61318
|
+
async RunMJTagCoOccurrenceViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61319
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61320
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
61321
|
+
}
|
|
61322
|
+
|
|
61323
|
+
@Query(() => RunMJTagCoOccurrenceViewResult)
|
|
61324
|
+
async RunMJTagCoOccurrenceDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61325
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61326
|
+
input.EntityName = 'MJ: Tag Co Occurrences';
|
|
61327
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
61328
|
+
}
|
|
61329
|
+
@Query(() => MJTagCoOccurrence_, { nullable: true })
|
|
61330
|
+
async MJTagCoOccurrence(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTagCoOccurrence_ | null> {
|
|
61331
|
+
this.CheckUserReadPermissions('MJ: Tag Co Occurrences', userPayload);
|
|
61332
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61333
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagCoOccurrences')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Co Occurrences', userPayload, EntityPermissionType.Read, 'AND');
|
|
61334
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61335
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Tag Co Occurrences', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
61336
|
+
return result;
|
|
61337
|
+
}
|
|
61338
|
+
|
|
61339
|
+
@Mutation(() => MJTagCoOccurrence_)
|
|
61340
|
+
async CreateMJTagCoOccurrence(
|
|
61341
|
+
@Arg('input', () => CreateMJTagCoOccurrenceInput) input: CreateMJTagCoOccurrenceInput,
|
|
61342
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
61343
|
+
@PubSub() pubSub: PubSubEngine
|
|
61344
|
+
) {
|
|
61345
|
+
const provider = GetReadWriteProvider(providers);
|
|
61346
|
+
return this.CreateRecord('MJ: Tag Co Occurrences', input, provider, userPayload, pubSub)
|
|
61347
|
+
}
|
|
61348
|
+
|
|
61349
|
+
@Mutation(() => MJTagCoOccurrence_)
|
|
61350
|
+
async UpdateMJTagCoOccurrence(
|
|
61351
|
+
@Arg('input', () => UpdateMJTagCoOccurrenceInput) input: UpdateMJTagCoOccurrenceInput,
|
|
61352
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
61353
|
+
@PubSub() pubSub: PubSubEngine
|
|
61354
|
+
) {
|
|
61355
|
+
const provider = GetReadWriteProvider(providers);
|
|
61356
|
+
return this.UpdateRecord('MJ: Tag Co Occurrences', input, provider, userPayload, pubSub);
|
|
61357
|
+
}
|
|
61358
|
+
|
|
61359
|
+
@Mutation(() => MJTagCoOccurrence_)
|
|
61360
|
+
async DeleteMJTagCoOccurrence(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61361
|
+
const provider = GetReadWriteProvider(providers);
|
|
61362
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
61363
|
+
return this.DeleteRecord('MJ: Tag Co Occurrences', key, options, provider, userPayload, pubSub);
|
|
61364
|
+
}
|
|
61365
|
+
|
|
61366
|
+
}
|
|
61367
|
+
|
|
59195
61368
|
//****************************************************************************
|
|
59196
61369
|
// ENTITY CLASS for MJ: Tagged Items
|
|
59197
61370
|
//****************************************************************************
|
|
@@ -59219,6 +61392,9 @@ export class MJTaggedItem_ {
|
|
|
59219
61392
|
@Field()
|
|
59220
61393
|
_mj__UpdatedAt: Date;
|
|
59221
61394
|
|
|
61395
|
+
@Field(() => Float, {description: `Relevance weight of this tag association (0.0 to 1.0). 1.0 indicates the tag is highly relevant or was manually applied. Lower values indicate decreasing relevance as determined by LLM autotagging. Default 1.0 for manually applied tags.`})
|
|
61396
|
+
Weight: number;
|
|
61397
|
+
|
|
59222
61398
|
@Field()
|
|
59223
61399
|
@MaxLength(255)
|
|
59224
61400
|
Tag: string;
|
|
@@ -59245,6 +61421,9 @@ export class CreateMJTaggedItemInput {
|
|
|
59245
61421
|
|
|
59246
61422
|
@Field({ nullable: true })
|
|
59247
61423
|
RecordID?: string;
|
|
61424
|
+
|
|
61425
|
+
@Field(() => Float, { nullable: true })
|
|
61426
|
+
Weight?: number;
|
|
59248
61427
|
}
|
|
59249
61428
|
|
|
59250
61429
|
|
|
@@ -59265,6 +61444,9 @@ export class UpdateMJTaggedItemInput {
|
|
|
59265
61444
|
@Field({ nullable: true })
|
|
59266
61445
|
RecordID?: string;
|
|
59267
61446
|
|
|
61447
|
+
@Field(() => Float, { nullable: true })
|
|
61448
|
+
Weight?: number;
|
|
61449
|
+
|
|
59268
61450
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
59269
61451
|
OldValues___?: KeyValuePairInput[];
|
|
59270
61452
|
}
|
|
@@ -59385,20 +61567,54 @@ export class MJTag_ {
|
|
|
59385
61567
|
@Field()
|
|
59386
61568
|
_mj__UpdatedAt: Date;
|
|
59387
61569
|
|
|
61570
|
+
@Field({description: `Lifecycle status of the tag: Active (in use), Merged (consolidated into another tag), Deprecated (no longer assigned but preserved), Deleted (soft-deleted).`})
|
|
61571
|
+
@MaxLength(20)
|
|
61572
|
+
Status: string;
|
|
61573
|
+
|
|
61574
|
+
@Field({nullable: true, description: `When Status is Merged, points to the surviving tag this tag was merged into. All TaggedItem and ContentItemTag references are re-pointed during merge.`})
|
|
61575
|
+
@MaxLength(36)
|
|
61576
|
+
MergedIntoTagID?: string;
|
|
61577
|
+
|
|
59388
61578
|
@Field({nullable: true})
|
|
59389
61579
|
@MaxLength(255)
|
|
59390
61580
|
Parent?: string;
|
|
59391
61581
|
|
|
61582
|
+
@Field({nullable: true})
|
|
61583
|
+
@MaxLength(255)
|
|
61584
|
+
MergedIntoTag?: string;
|
|
61585
|
+
|
|
59392
61586
|
@Field({nullable: true})
|
|
59393
61587
|
@MaxLength(36)
|
|
59394
61588
|
RootParentID?: string;
|
|
59395
61589
|
|
|
61590
|
+
@Field({nullable: true})
|
|
61591
|
+
@MaxLength(36)
|
|
61592
|
+
RootMergedIntoTagID?: string;
|
|
61593
|
+
|
|
59396
61594
|
@Field(() => [MJTag_])
|
|
59397
61595
|
MJTags_ParentIDArray: MJTag_[]; // Link to MJTags
|
|
59398
61596
|
|
|
59399
61597
|
@Field(() => [MJTaggedItem_])
|
|
59400
61598
|
MJTaggedItems_TagIDArray: MJTaggedItem_[]; // Link to MJTaggedItems
|
|
59401
61599
|
|
|
61600
|
+
@Field(() => [MJContentItemTag_])
|
|
61601
|
+
MJContentItemTags_TagIDArray: MJContentItemTag_[]; // Link to MJContentItemTags
|
|
61602
|
+
|
|
61603
|
+
@Field(() => [MJTagCoOccurrence_])
|
|
61604
|
+
MJTagCoOccurrences_TagBIDArray: MJTagCoOccurrence_[]; // Link to MJTagCoOccurrences
|
|
61605
|
+
|
|
61606
|
+
@Field(() => [MJTagAuditLog_])
|
|
61607
|
+
MJTagAuditLogs_RelatedTagIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
|
|
61608
|
+
|
|
61609
|
+
@Field(() => [MJTagCoOccurrence_])
|
|
61610
|
+
MJTagCoOccurrences_TagAIDArray: MJTagCoOccurrence_[]; // Link to MJTagCoOccurrences
|
|
61611
|
+
|
|
61612
|
+
@Field(() => [MJTagAuditLog_])
|
|
61613
|
+
MJTagAuditLogs_TagIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
|
|
61614
|
+
|
|
61615
|
+
@Field(() => [MJTag_])
|
|
61616
|
+
MJTags_MergedIntoTagIDArray: MJTag_[]; // Link to MJTags
|
|
61617
|
+
|
|
59402
61618
|
}
|
|
59403
61619
|
|
|
59404
61620
|
//****************************************************************************
|
|
@@ -59420,6 +61636,12 @@ export class CreateMJTagInput {
|
|
|
59420
61636
|
|
|
59421
61637
|
@Field({ nullable: true })
|
|
59422
61638
|
Description: string | null;
|
|
61639
|
+
|
|
61640
|
+
@Field({ nullable: true })
|
|
61641
|
+
Status?: string;
|
|
61642
|
+
|
|
61643
|
+
@Field({ nullable: true })
|
|
61644
|
+
MergedIntoTagID: string | null;
|
|
59423
61645
|
}
|
|
59424
61646
|
|
|
59425
61647
|
|
|
@@ -59443,6 +61665,12 @@ export class UpdateMJTagInput {
|
|
|
59443
61665
|
@Field({ nullable: true })
|
|
59444
61666
|
Description?: string | null;
|
|
59445
61667
|
|
|
61668
|
+
@Field({ nullable: true })
|
|
61669
|
+
Status?: string;
|
|
61670
|
+
|
|
61671
|
+
@Field({ nullable: true })
|
|
61672
|
+
MergedIntoTagID?: string | null;
|
|
61673
|
+
|
|
59446
61674
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
59447
61675
|
OldValues___?: KeyValuePairInput[];
|
|
59448
61676
|
}
|
|
@@ -59524,6 +61752,66 @@ export class MJTagResolver extends ResolverBase {
|
|
|
59524
61752
|
return result;
|
|
59525
61753
|
}
|
|
59526
61754
|
|
|
61755
|
+
@FieldResolver(() => [MJContentItemTag_])
|
|
61756
|
+
async MJContentItemTags_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61757
|
+
this.CheckUserReadPermissions('MJ: Content Item Tags', userPayload);
|
|
61758
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61759
|
+
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');
|
|
61760
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61761
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Tags', rows, this.GetUserFromPayload(userPayload));
|
|
61762
|
+
return result;
|
|
61763
|
+
}
|
|
61764
|
+
|
|
61765
|
+
@FieldResolver(() => [MJTagCoOccurrence_])
|
|
61766
|
+
async MJTagCoOccurrences_TagBIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61767
|
+
this.CheckUserReadPermissions('MJ: Tag Co Occurrences', userPayload);
|
|
61768
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61769
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagCoOccurrences')} WHERE ${provider.QuoteIdentifier('TagBID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Co Occurrences', userPayload, EntityPermissionType.Read, 'AND');
|
|
61770
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61771
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Co Occurrences', rows, this.GetUserFromPayload(userPayload));
|
|
61772
|
+
return result;
|
|
61773
|
+
}
|
|
61774
|
+
|
|
61775
|
+
@FieldResolver(() => [MJTagAuditLog_])
|
|
61776
|
+
async MJTagAuditLogs_RelatedTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61777
|
+
this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
|
|
61778
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61779
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('RelatedTagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
61780
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61781
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
|
|
61782
|
+
return result;
|
|
61783
|
+
}
|
|
61784
|
+
|
|
61785
|
+
@FieldResolver(() => [MJTagCoOccurrence_])
|
|
61786
|
+
async MJTagCoOccurrences_TagAIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61787
|
+
this.CheckUserReadPermissions('MJ: Tag Co Occurrences', userPayload);
|
|
61788
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61789
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagCoOccurrences')} WHERE ${provider.QuoteIdentifier('TagAID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Co Occurrences', userPayload, EntityPermissionType.Read, 'AND');
|
|
61790
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61791
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Co Occurrences', rows, this.GetUserFromPayload(userPayload));
|
|
61792
|
+
return result;
|
|
61793
|
+
}
|
|
61794
|
+
|
|
61795
|
+
@FieldResolver(() => [MJTagAuditLog_])
|
|
61796
|
+
async MJTagAuditLogs_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61797
|
+
this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
|
|
61798
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61799
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
61800
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61801
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
|
|
61802
|
+
return result;
|
|
61803
|
+
}
|
|
61804
|
+
|
|
61805
|
+
@FieldResolver(() => [MJTag_])
|
|
61806
|
+
async MJTags_MergedIntoTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61807
|
+
this.CheckUserReadPermissions('MJ: Tags', userPayload);
|
|
61808
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61809
|
+
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');
|
|
61810
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61811
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tags', rows, this.GetUserFromPayload(userPayload));
|
|
61812
|
+
return result;
|
|
61813
|
+
}
|
|
61814
|
+
|
|
59527
61815
|
@Mutation(() => MJTag_)
|
|
59528
61816
|
async CreateMJTag(
|
|
59529
61817
|
@Arg('input', () => CreateMJTagInput) input: CreateMJTagInput,
|
|
@@ -66835,6 +69123,18 @@ export class MJUser_ {
|
|
|
66835
69123
|
@Field(() => [MJOpenApp_])
|
|
66836
69124
|
MJOpenApps_InstalledByUserIDArray: MJOpenApp_[]; // Link to MJOpenApps
|
|
66837
69125
|
|
|
69126
|
+
@Field(() => [MJContentItemDuplicate_])
|
|
69127
|
+
MJContentItemDuplicates_ResolvedByUserIDArray: MJContentItemDuplicate_[]; // Link to MJContentItemDuplicates
|
|
69128
|
+
|
|
69129
|
+
@Field(() => [MJContentProcessRun_])
|
|
69130
|
+
MJContentProcessRuns_StartedByUserIDArray: MJContentProcessRun_[]; // Link to MJContentProcessRuns
|
|
69131
|
+
|
|
69132
|
+
@Field(() => [MJKnowledgeHubSavedSearch_])
|
|
69133
|
+
MJKnowledgeHubSavedSearches_UserIDArray: MJKnowledgeHubSavedSearch_[]; // Link to MJKnowledgeHubSavedSearches
|
|
69134
|
+
|
|
69135
|
+
@Field(() => [MJTagAuditLog_])
|
|
69136
|
+
MJTagAuditLogs_PerformedByUserIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
|
|
69137
|
+
|
|
66838
69138
|
@Field(() => [MJResourcePermission_])
|
|
66839
69139
|
MJResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
|
|
66840
69140
|
|
|
@@ -67673,6 +69973,46 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
67673
69973
|
return result;
|
|
67674
69974
|
}
|
|
67675
69975
|
|
|
69976
|
+
@FieldResolver(() => [MJContentItemDuplicate_])
|
|
69977
|
+
async MJContentItemDuplicates_ResolvedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
69978
|
+
this.CheckUserReadPermissions('MJ: Content Item Duplicates', userPayload);
|
|
69979
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
69980
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemDuplicates')} WHERE ${provider.QuoteIdentifier('ResolvedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Duplicates', userPayload, EntityPermissionType.Read, 'AND');
|
|
69981
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
69982
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Duplicates', rows, this.GetUserFromPayload(userPayload));
|
|
69983
|
+
return result;
|
|
69984
|
+
}
|
|
69985
|
+
|
|
69986
|
+
@FieldResolver(() => [MJContentProcessRun_])
|
|
69987
|
+
async MJContentProcessRuns_StartedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
69988
|
+
this.CheckUserReadPermissions('MJ: Content Process Runs', userPayload);
|
|
69989
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
69990
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRuns')} WHERE ${provider.QuoteIdentifier('StartedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
69991
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
69992
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
69993
|
+
return result;
|
|
69994
|
+
}
|
|
69995
|
+
|
|
69996
|
+
@FieldResolver(() => [MJKnowledgeHubSavedSearch_])
|
|
69997
|
+
async MJKnowledgeHubSavedSearches_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
69998
|
+
this.CheckUserReadPermissions('MJ: Knowledge Hub Saved Searches', userPayload);
|
|
69999
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
70000
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwKnowledgeHubSavedSearches')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Knowledge Hub Saved Searches', userPayload, EntityPermissionType.Read, 'AND');
|
|
70001
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
70002
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Knowledge Hub Saved Searches', rows, this.GetUserFromPayload(userPayload));
|
|
70003
|
+
return result;
|
|
70004
|
+
}
|
|
70005
|
+
|
|
70006
|
+
@FieldResolver(() => [MJTagAuditLog_])
|
|
70007
|
+
async MJTagAuditLogs_PerformedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
70008
|
+
this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
|
|
70009
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
70010
|
+
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');
|
|
70011
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
70012
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
|
|
70013
|
+
return result;
|
|
70014
|
+
}
|
|
70015
|
+
|
|
67676
70016
|
@FieldResolver(() => [MJResourcePermission_])
|
|
67677
70017
|
async MJResourcePermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67678
70018
|
this.CheckUserReadPermissions('MJ: Resource Permissions', userPayload);
|
|
@@ -68189,6 +70529,12 @@ export class MJVectorIndex_ {
|
|
|
68189
70529
|
@Field(() => [MJEntityDocument_])
|
|
68190
70530
|
MJEntityDocuments_VectorIndexIDArray: MJEntityDocument_[]; // Link to MJEntityDocuments
|
|
68191
70531
|
|
|
70532
|
+
@Field(() => [MJContentType_])
|
|
70533
|
+
MJContentTypes_VectorIndexIDArray: MJContentType_[]; // Link to MJContentTypes
|
|
70534
|
+
|
|
70535
|
+
@Field(() => [MJContentSource_])
|
|
70536
|
+
MJContentSources_VectorIndexIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
70537
|
+
|
|
68192
70538
|
}
|
|
68193
70539
|
|
|
68194
70540
|
//****************************************************************************
|
|
@@ -68338,6 +70684,26 @@ export class MJVectorIndexResolver extends ResolverBase {
|
|
|
68338
70684
|
return result;
|
|
68339
70685
|
}
|
|
68340
70686
|
|
|
70687
|
+
@FieldResolver(() => [MJContentType_])
|
|
70688
|
+
async MJContentTypes_VectorIndexIDArray(@Root() mjvectorindex_: MJVectorIndex_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
70689
|
+
this.CheckUserReadPermissions('MJ: Content Types', userPayload);
|
|
70690
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
70691
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentTypes')} WHERE ${provider.QuoteIdentifier('VectorIndexID')}='${mjvectorindex_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
70692
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
70693
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Types', rows, this.GetUserFromPayload(userPayload));
|
|
70694
|
+
return result;
|
|
70695
|
+
}
|
|
70696
|
+
|
|
70697
|
+
@FieldResolver(() => [MJContentSource_])
|
|
70698
|
+
async MJContentSources_VectorIndexIDArray(@Root() mjvectorindex_: MJVectorIndex_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
70699
|
+
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
70700
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
70701
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('VectorIndexID')}='${mjvectorindex_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
70702
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
70703
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
70704
|
+
return result;
|
|
70705
|
+
}
|
|
70706
|
+
|
|
68341
70707
|
@Mutation(() => MJVectorIndex_)
|
|
68342
70708
|
async CreateMJVectorIndex(
|
|
68343
70709
|
@Arg('input', () => CreateMJVectorIndexInput) input: CreateMJVectorIndexInput,
|