@memberjunction/server 5.49.0 → 5.51.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 +1 -1
- package/dist/agentSessions/SessionManager.d.ts.map +1 -1
- package/dist/agentSessions/SessionManager.js +6 -1
- package/dist/agentSessions/SessionManager.js.map +1 -1
- package/dist/auth/newUsers.d.ts.map +1 -1
- package/dist/auth/newUsers.js +6 -4
- package/dist/auth/newUsers.js.map +1 -1
- package/dist/generated/generated.d.ts +259 -14
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1380 -73
- package/dist/generated/generated.js.map +1 -1
- package/dist/realtimeWidget/WidgetSessionService.d.ts +12 -1
- package/dist/realtimeWidget/WidgetSessionService.d.ts.map +1 -1
- package/dist/realtimeWidget/WidgetSessionService.js +23 -8
- package/dist/realtimeWidget/WidgetSessionService.js.map +1 -1
- package/dist/realtimeWidget/widgetGuestElevation.d.ts +22 -0
- package/dist/realtimeWidget/widgetGuestElevation.d.ts.map +1 -1
- package/dist/realtimeWidget/widgetGuestElevation.js +36 -0
- package/dist/realtimeWidget/widgetGuestElevation.js.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.js +9 -4
- package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts +21 -0
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts.map +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.js +75 -16
- package/dist/resolvers/RealtimeClientSessionResolver.js.map +1 -1
- package/package.json +91 -89
- package/src/__tests__/RealtimeClientSessionResolver.test.ts +420 -0
- package/src/__tests__/SessionManager.test.ts +62 -0
- package/src/__tests__/WidgetSessionService.test.ts +96 -0
- package/src/__tests__/widgetGuestElevation.test.ts +70 -2
- package/src/agentSessions/SessionManager.ts +6 -1
- package/src/auth/newUsers.ts +6 -5
- package/src/generated/generated.ts +967 -55
- package/src/realtimeWidget/WidgetSessionService.ts +24 -8
- package/src/realtimeWidget/widgetGuestElevation.ts +41 -0
- package/src/resolvers/IntegrationDiscoveryResolver.ts +9 -4
- package/src/resolvers/RealtimeClientSessionResolver.ts +84 -16
|
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentSkillEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSubAgentEntity, MJAISkillEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJClusterAnalysisEntity, MJClusterAnalysisClusterEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationWidgetInstanceEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJScopedPromptConfigEntity, MJScopedPromptPartEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJThemeEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserRoutineRecipientEntity, MJUserRoutineRunEntity, MJUserRoutineEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
21
|
+
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentSkillEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSearchScopeEntity, MJAISkillSubAgentEntity, MJAISkillEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJClusterAnalysisEntity, MJClusterAnalysisClusterEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemChunkEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationCompactionRunEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationWidgetInstanceEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJScopedPromptConfigEntity, MJScopedPromptPartEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJThemeEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserRoutineRecipientEntity, MJUserRoutineRunEntity, MJUserRoutineEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -8223,9 +8223,6 @@ each time the agent processes a prompt step.`})
|
|
|
8223
8223
|
@Field(() => [MJAIAgentRequest_])
|
|
8224
8224
|
MJAIAgentRequests_ResumingAgentRunIDArray: MJAIAgentRequest_[]; // Link to MJAIAgentRequests
|
|
8225
8225
|
|
|
8226
|
-
@Field(() => [MJAIPromptRun_])
|
|
8227
|
-
MJAIPromptRuns_AgentRunIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
8228
|
-
|
|
8229
8226
|
@Field(() => [MJAIAgentRun_])
|
|
8230
8227
|
MJAIAgentRuns_LastRunIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
8231
8228
|
|
|
@@ -8689,16 +8686,6 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
8689
8686
|
return result;
|
|
8690
8687
|
}
|
|
8691
8688
|
|
|
8692
|
-
@FieldResolver(() => [MJAIPromptRun_])
|
|
8693
|
-
async MJAIPromptRuns_AgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8694
|
-
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
8695
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8696
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('AgentRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
8697
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjaiagentrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
8698
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
8699
|
-
return result;
|
|
8700
|
-
}
|
|
8701
|
-
|
|
8702
8689
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
8703
8690
|
async MJAIAgentRuns_LastRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8704
8691
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -17998,10 +17985,6 @@ export class MJAIPromptRun_ {
|
|
|
17998
17985
|
@Field(() => Int, {nullable: true, description: `Execution order for parallel child runs and result selector runs. Used to track the sequence of execution within a parallel run group. NULL for single runs and parallel parent runs.`})
|
|
17999
17986
|
ExecutionOrder?: number;
|
|
18000
17987
|
|
|
18001
|
-
@Field({nullable: true, description: `Optional reference to the AIAgentRun that initiated this prompt execution. Links prompt runs to their parent agent runs for comprehensive execution tracking.`})
|
|
18002
|
-
@MaxLength(36)
|
|
18003
|
-
AgentRunID?: string;
|
|
18004
|
-
|
|
18005
17988
|
@Field(() => Float, {nullable: true, description: `The cost of this specific prompt execution as reported by the AI provider. This does not include costs from child executions. The currency is specified in CostCurrency field.`})
|
|
18006
17989
|
Cost?: number;
|
|
18007
17990
|
|
|
@@ -18239,10 +18222,6 @@ export class MJAIPromptRun_ {
|
|
|
18239
18222
|
@MaxLength(255)
|
|
18240
18223
|
Parent?: string;
|
|
18241
18224
|
|
|
18242
|
-
@Field({nullable: true})
|
|
18243
|
-
@MaxLength(255)
|
|
18244
|
-
AgentRun?: string;
|
|
18245
|
-
|
|
18246
18225
|
@Field({nullable: true})
|
|
18247
18226
|
@MaxLength(50)
|
|
18248
18227
|
OriginalModel?: string;
|
|
@@ -18295,8 +18274,8 @@ export class MJAIPromptRun_ {
|
|
|
18295
18274
|
@Field(() => [MJUserRoutineRun_])
|
|
18296
18275
|
MJUserRoutineRuns_PromptRunIDArray: MJUserRoutineRun_[]; // Link to MJUserRoutineRuns
|
|
18297
18276
|
|
|
18298
|
-
@Field(() => [
|
|
18299
|
-
|
|
18277
|
+
@Field(() => [MJConversationCompactionRun_])
|
|
18278
|
+
MJConversationCompactionRuns_PromptRunIDArray: MJConversationCompactionRun_[]; // Link to MJConversationCompactionRuns
|
|
18300
18279
|
|
|
18301
18280
|
}
|
|
18302
18281
|
|
|
@@ -18365,9 +18344,6 @@ export class CreateMJAIPromptRunInput {
|
|
|
18365
18344
|
@Field(() => Int, { nullable: true })
|
|
18366
18345
|
ExecutionOrder: number | null;
|
|
18367
18346
|
|
|
18368
|
-
@Field({ nullable: true })
|
|
18369
|
-
AgentRunID: string | null;
|
|
18370
|
-
|
|
18371
18347
|
@Field(() => Float, { nullable: true })
|
|
18372
18348
|
Cost: number | null;
|
|
18373
18349
|
|
|
@@ -18636,9 +18612,6 @@ export class UpdateMJAIPromptRunInput {
|
|
|
18636
18612
|
@Field(() => Int, { nullable: true })
|
|
18637
18613
|
ExecutionOrder?: number | null;
|
|
18638
18614
|
|
|
18639
|
-
@Field({ nullable: true })
|
|
18640
|
-
AgentRunID?: string | null;
|
|
18641
|
-
|
|
18642
18615
|
@Field(() => Float, { nullable: true })
|
|
18643
18616
|
Cost?: number | null;
|
|
18644
18617
|
|
|
@@ -18981,13 +18954,13 @@ export class MJAIPromptRunResolver extends ResolverBase {
|
|
|
18981
18954
|
return result;
|
|
18982
18955
|
}
|
|
18983
18956
|
|
|
18984
|
-
@FieldResolver(() => [
|
|
18985
|
-
async
|
|
18986
|
-
this.CheckUserReadPermissions('MJ: Conversation
|
|
18957
|
+
@FieldResolver(() => [MJConversationCompactionRun_])
|
|
18958
|
+
async MJConversationCompactionRuns_PromptRunIDArray(@Root() mjaipromptrun_: MJAIPromptRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
18959
|
+
this.CheckUserReadPermissions('MJ: Conversation Compaction Runs', userPayload);
|
|
18987
18960
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18988
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
18961
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationCompactionRuns')} WHERE ${provider.QuoteIdentifier('PromptRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Compaction Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
18989
18962
|
const rows = await provider.ExecuteSQL(sSQL, [mjaipromptrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
18990
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation
|
|
18963
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Compaction Runs', rows, this.GetUserFromPayload(userPayload));
|
|
18991
18964
|
return result;
|
|
18992
18965
|
}
|
|
18993
18966
|
|
|
@@ -20958,6 +20931,211 @@ export class MJAISkillPermissionResolver extends ResolverBase {
|
|
|
20958
20931
|
|
|
20959
20932
|
}
|
|
20960
20933
|
|
|
20934
|
+
//****************************************************************************
|
|
20935
|
+
// ENTITY CLASS for MJ: AI Skill Search Scopes
|
|
20936
|
+
//****************************************************************************
|
|
20937
|
+
@ObjectType({ description: `Search Scopes an AI Skill may reach when activated, honoured when AISkill.SearchScopeAccess = \'Assigned\'. Mirrors AIAgentSearchScope: Status plus an optional StartAt/EndAt window time-box a grant, and Priority/IsDefault pick among several. An empty table means no skill grants any scope - the pre-migration behaviour.` })
|
|
20938
|
+
export class MJAISkillSearchScope_ {
|
|
20939
|
+
@Field()
|
|
20940
|
+
@MaxLength(36)
|
|
20941
|
+
ID: string;
|
|
20942
|
+
|
|
20943
|
+
@Field({description: `The skill this grant belongs to.`})
|
|
20944
|
+
@MaxLength(36)
|
|
20945
|
+
SkillID: string;
|
|
20946
|
+
|
|
20947
|
+
@Field({description: `The Search Scope this skill may reach.`})
|
|
20948
|
+
@MaxLength(36)
|
|
20949
|
+
SearchScopeID: string;
|
|
20950
|
+
|
|
20951
|
+
@Field({description: `Active or Inactive. Inactive rows are ignored during resolution.`})
|
|
20952
|
+
@MaxLength(20)
|
|
20953
|
+
Status: string;
|
|
20954
|
+
|
|
20955
|
+
@Field({nullable: true, description: `Optional start of the window in which this grant is honoured. NULL = no lower bound. Evaluated against the current time on every resolution, so a window opening or closing needs no cache invalidation.`})
|
|
20956
|
+
StartAt?: Date;
|
|
20957
|
+
|
|
20958
|
+
@Field({nullable: true, description: `Optional end of the window in which this grant is honoured. NULL = no upper bound.`})
|
|
20959
|
+
EndAt?: Date;
|
|
20960
|
+
|
|
20961
|
+
@Field(() => Int, {nullable: true, description: `Lower numbers win when several granted scopes are candidates and none is marked IsDefault.`})
|
|
20962
|
+
Priority?: number;
|
|
20963
|
+
|
|
20964
|
+
@Field(() => Boolean, {description: `When set, this scope is chosen for the skill ahead of Priority ordering.`})
|
|
20965
|
+
IsDefault: boolean;
|
|
20966
|
+
|
|
20967
|
+
@Field()
|
|
20968
|
+
_mj__CreatedAt: Date;
|
|
20969
|
+
|
|
20970
|
+
@Field()
|
|
20971
|
+
_mj__UpdatedAt: Date;
|
|
20972
|
+
|
|
20973
|
+
@Field()
|
|
20974
|
+
@MaxLength(255)
|
|
20975
|
+
Skill: string;
|
|
20976
|
+
|
|
20977
|
+
@Field()
|
|
20978
|
+
@MaxLength(200)
|
|
20979
|
+
SearchScope: string;
|
|
20980
|
+
|
|
20981
|
+
}
|
|
20982
|
+
|
|
20983
|
+
//****************************************************************************
|
|
20984
|
+
// INPUT TYPE for MJ: AI Skill Search Scopes
|
|
20985
|
+
//****************************************************************************
|
|
20986
|
+
@InputType()
|
|
20987
|
+
export class CreateMJAISkillSearchScopeInput {
|
|
20988
|
+
@Field({ nullable: true })
|
|
20989
|
+
ID?: string;
|
|
20990
|
+
|
|
20991
|
+
@Field({ nullable: true })
|
|
20992
|
+
SkillID?: string;
|
|
20993
|
+
|
|
20994
|
+
@Field({ nullable: true })
|
|
20995
|
+
SearchScopeID?: string;
|
|
20996
|
+
|
|
20997
|
+
@Field({ nullable: true })
|
|
20998
|
+
Status?: string;
|
|
20999
|
+
|
|
21000
|
+
@Field({ nullable: true })
|
|
21001
|
+
StartAt: Date | null;
|
|
21002
|
+
|
|
21003
|
+
@Field({ nullable: true })
|
|
21004
|
+
EndAt: Date | null;
|
|
21005
|
+
|
|
21006
|
+
@Field(() => Int, { nullable: true })
|
|
21007
|
+
Priority: number | null;
|
|
21008
|
+
|
|
21009
|
+
@Field(() => Boolean, { nullable: true })
|
|
21010
|
+
IsDefault?: boolean;
|
|
21011
|
+
|
|
21012
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
21013
|
+
RestoreContext___?: RestoreContextInput;
|
|
21014
|
+
}
|
|
21015
|
+
|
|
21016
|
+
|
|
21017
|
+
//****************************************************************************
|
|
21018
|
+
// INPUT TYPE for MJ: AI Skill Search Scopes
|
|
21019
|
+
//****************************************************************************
|
|
21020
|
+
@InputType()
|
|
21021
|
+
export class UpdateMJAISkillSearchScopeInput {
|
|
21022
|
+
@Field()
|
|
21023
|
+
ID: string;
|
|
21024
|
+
|
|
21025
|
+
@Field({ nullable: true })
|
|
21026
|
+
SkillID?: string;
|
|
21027
|
+
|
|
21028
|
+
@Field({ nullable: true })
|
|
21029
|
+
SearchScopeID?: string;
|
|
21030
|
+
|
|
21031
|
+
@Field({ nullable: true })
|
|
21032
|
+
Status?: string;
|
|
21033
|
+
|
|
21034
|
+
@Field({ nullable: true })
|
|
21035
|
+
StartAt?: Date | null;
|
|
21036
|
+
|
|
21037
|
+
@Field({ nullable: true })
|
|
21038
|
+
EndAt?: Date | null;
|
|
21039
|
+
|
|
21040
|
+
@Field(() => Int, { nullable: true })
|
|
21041
|
+
Priority?: number | null;
|
|
21042
|
+
|
|
21043
|
+
@Field(() => Boolean, { nullable: true })
|
|
21044
|
+
IsDefault?: boolean;
|
|
21045
|
+
|
|
21046
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
21047
|
+
OldValues___?: KeyValuePairInput[];
|
|
21048
|
+
|
|
21049
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
21050
|
+
RestoreContext___?: RestoreContextInput;
|
|
21051
|
+
}
|
|
21052
|
+
|
|
21053
|
+
//****************************************************************************
|
|
21054
|
+
// RESOLVER for MJ: AI Skill Search Scopes
|
|
21055
|
+
//****************************************************************************
|
|
21056
|
+
@ObjectType()
|
|
21057
|
+
export class RunMJAISkillSearchScopeViewResult {
|
|
21058
|
+
@Field(() => [MJAISkillSearchScope_])
|
|
21059
|
+
Results: MJAISkillSearchScope_[];
|
|
21060
|
+
|
|
21061
|
+
@Field(() => String, {nullable: true})
|
|
21062
|
+
UserViewRunID?: string;
|
|
21063
|
+
|
|
21064
|
+
@Field(() => Int, {nullable: true})
|
|
21065
|
+
RowCount: number;
|
|
21066
|
+
|
|
21067
|
+
@Field(() => Int, {nullable: true})
|
|
21068
|
+
TotalRowCount: number;
|
|
21069
|
+
|
|
21070
|
+
@Field(() => Int, {nullable: true})
|
|
21071
|
+
ExecutionTime: number;
|
|
21072
|
+
|
|
21073
|
+
@Field({nullable: true})
|
|
21074
|
+
ErrorMessage?: string;
|
|
21075
|
+
|
|
21076
|
+
@Field(() => Boolean, {nullable: false})
|
|
21077
|
+
Success: boolean;
|
|
21078
|
+
}
|
|
21079
|
+
|
|
21080
|
+
@Resolver(MJAISkillSearchScope_)
|
|
21081
|
+
export class MJAISkillSearchScopeResolver extends ResolverBase {
|
|
21082
|
+
@Query(() => RunMJAISkillSearchScopeViewResult)
|
|
21083
|
+
async RunMJAISkillSearchScopeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
21084
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
21085
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
21086
|
+
}
|
|
21087
|
+
|
|
21088
|
+
@Query(() => RunMJAISkillSearchScopeViewResult)
|
|
21089
|
+
async RunMJAISkillSearchScopeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
21090
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
21091
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
21092
|
+
}
|
|
21093
|
+
|
|
21094
|
+
@Query(() => RunMJAISkillSearchScopeViewResult)
|
|
21095
|
+
async RunMJAISkillSearchScopeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
21096
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
21097
|
+
input.EntityName = 'MJ: AI Skill Search Scopes';
|
|
21098
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
21099
|
+
}
|
|
21100
|
+
@Query(() => MJAISkillSearchScope_, { nullable: true })
|
|
21101
|
+
async MJAISkillSearchScope(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAISkillSearchScope_ | null> {
|
|
21102
|
+
this.CheckUserReadPermissions('MJ: AI Skill Search Scopes', userPayload);
|
|
21103
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
21104
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAISkillSearchScopes')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Skill Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
21105
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
21106
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Skill Search Scopes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
21107
|
+
return result;
|
|
21108
|
+
}
|
|
21109
|
+
|
|
21110
|
+
@Mutation(() => MJAISkillSearchScope_)
|
|
21111
|
+
async CreateMJAISkillSearchScope(
|
|
21112
|
+
@Arg('input', () => CreateMJAISkillSearchScopeInput) input: CreateMJAISkillSearchScopeInput,
|
|
21113
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
21114
|
+
@PubSub() pubSub: PubSubEngine
|
|
21115
|
+
) {
|
|
21116
|
+
const provider = GetReadWriteProvider(providers);
|
|
21117
|
+
return this.CreateRecord('MJ: AI Skill Search Scopes', input, provider, userPayload, pubSub)
|
|
21118
|
+
}
|
|
21119
|
+
|
|
21120
|
+
@Mutation(() => MJAISkillSearchScope_)
|
|
21121
|
+
async UpdateMJAISkillSearchScope(
|
|
21122
|
+
@Arg('input', () => UpdateMJAISkillSearchScopeInput) input: UpdateMJAISkillSearchScopeInput,
|
|
21123
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
21124
|
+
@PubSub() pubSub: PubSubEngine
|
|
21125
|
+
) {
|
|
21126
|
+
const provider = GetReadWriteProvider(providers);
|
|
21127
|
+
return this.UpdateRecord('MJ: AI Skill Search Scopes', input, provider, userPayload, pubSub);
|
|
21128
|
+
}
|
|
21129
|
+
|
|
21130
|
+
@Mutation(() => MJAISkillSearchScope_)
|
|
21131
|
+
async DeleteMJAISkillSearchScope(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
21132
|
+
const provider = GetReadWriteProvider(providers);
|
|
21133
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
21134
|
+
return this.DeleteRecord('MJ: AI Skill Search Scopes', key, options, provider, userPayload, pubSub);
|
|
21135
|
+
}
|
|
21136
|
+
|
|
21137
|
+
}
|
|
21138
|
+
|
|
20961
21139
|
//****************************************************************************
|
|
20962
21140
|
// ENTITY CLASS for MJ: AI Skill Sub Agents
|
|
20963
21141
|
//****************************************************************************
|
|
@@ -21166,6 +21344,10 @@ export class MJAISkill_ {
|
|
|
21166
21344
|
@MaxLength(20)
|
|
21167
21345
|
ActivationMode: string;
|
|
21168
21346
|
|
|
21347
|
+
@Field({nullable: true, description: `Which Search Scopes this skill may reach when activated. None = grants no retrieval scope; Assigned = only scopes listed in AISkillSearchScope; All = any active scope. NULL behaves as None so existing skills are unaffected. Mirrors AIAgent.SearchScopeAccess so a skill and an agent are interchangeable principals to SearchScopePermissionResolver.`})
|
|
21348
|
+
@MaxLength(20)
|
|
21349
|
+
SearchScopeAccess?: string;
|
|
21350
|
+
|
|
21169
21351
|
@Field()
|
|
21170
21352
|
@MaxLength(100)
|
|
21171
21353
|
CreatedByUser: string;
|
|
@@ -21182,6 +21364,12 @@ export class MJAISkill_ {
|
|
|
21182
21364
|
@Field(() => [MJAISkillPermission_])
|
|
21183
21365
|
MJAISkillPermissions_SkillIDArray: MJAISkillPermission_[]; // Link to MJAISkillPermissions
|
|
21184
21366
|
|
|
21367
|
+
@Field(() => [MJSearchExecutionLog_])
|
|
21368
|
+
MJSearchExecutionLogs_AISkillIDArray: MJSearchExecutionLog_[]; // Link to MJSearchExecutionLogs
|
|
21369
|
+
|
|
21370
|
+
@Field(() => [MJAISkillSearchScope_])
|
|
21371
|
+
MJAISkillSearchScopes_SkillIDArray: MJAISkillSearchScope_[]; // Link to MJAISkillSearchScopes
|
|
21372
|
+
|
|
21185
21373
|
}
|
|
21186
21374
|
|
|
21187
21375
|
//****************************************************************************
|
|
@@ -21219,6 +21407,9 @@ export class CreateMJAISkillInput {
|
|
|
21219
21407
|
@Field({ nullable: true })
|
|
21220
21408
|
ActivationMode?: string;
|
|
21221
21409
|
|
|
21410
|
+
@Field({ nullable: true })
|
|
21411
|
+
SearchScopeAccess: string | null;
|
|
21412
|
+
|
|
21222
21413
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
21223
21414
|
RestoreContext___?: RestoreContextInput;
|
|
21224
21415
|
}
|
|
@@ -21259,6 +21450,9 @@ export class UpdateMJAISkillInput {
|
|
|
21259
21450
|
@Field({ nullable: true })
|
|
21260
21451
|
ActivationMode?: string;
|
|
21261
21452
|
|
|
21453
|
+
@Field({ nullable: true })
|
|
21454
|
+
SearchScopeAccess?: string | null;
|
|
21455
|
+
|
|
21262
21456
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
21263
21457
|
OldValues___?: KeyValuePairInput[];
|
|
21264
21458
|
|
|
@@ -21363,6 +21557,26 @@ export class MJAISkillResolver extends ResolverBase {
|
|
|
21363
21557
|
return result;
|
|
21364
21558
|
}
|
|
21365
21559
|
|
|
21560
|
+
@FieldResolver(() => [MJSearchExecutionLog_])
|
|
21561
|
+
async MJSearchExecutionLogs_AISkillIDArray(@Root() mjaiskill_: MJAISkill_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
21562
|
+
this.CheckUserReadPermissions('MJ: Search Execution Logs', userPayload);
|
|
21563
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
21564
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchExecutionLogs')} WHERE ${provider.QuoteIdentifier('AISkillID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
21565
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiskill_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
21566
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Execution Logs', rows, this.GetUserFromPayload(userPayload));
|
|
21567
|
+
return result;
|
|
21568
|
+
}
|
|
21569
|
+
|
|
21570
|
+
@FieldResolver(() => [MJAISkillSearchScope_])
|
|
21571
|
+
async MJAISkillSearchScopes_SkillIDArray(@Root() mjaiskill_: MJAISkill_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
21572
|
+
this.CheckUserReadPermissions('MJ: AI Skill Search Scopes', userPayload);
|
|
21573
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
21574
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAISkillSearchScopes')} WHERE ${provider.QuoteIdentifier('SkillID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Skill Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
21575
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiskill_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
21576
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Skill Search Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
21577
|
+
return result;
|
|
21578
|
+
}
|
|
21579
|
+
|
|
21366
21580
|
@Mutation(() => MJAISkill_)
|
|
21367
21581
|
async CreateMJAISkill(
|
|
21368
21582
|
@Arg('input', () => CreateMJAISkillInput) input: CreateMJAISkillInput,
|
|
@@ -34078,6 +34292,356 @@ export class MJContentItemAttributeResolver extends ResolverBase {
|
|
|
34078
34292
|
|
|
34079
34293
|
}
|
|
34080
34294
|
|
|
34295
|
+
//****************************************************************************
|
|
34296
|
+
// ENTITY CLASS for MJ: Content Item Chunks
|
|
34297
|
+
//****************************************************************************
|
|
34298
|
+
@ObjectType({ description: `Represents an individual chunk of a Content Item\'s text that was embedded as a distinct vector. When a Content Item is too large to embed as a single vector it is split into ordered chunks; each chunk becomes one row here, linking the stored vector back to the specific portion of the parent Content Item it represents.` })
|
|
34299
|
+
export class MJContentItemChunk_ {
|
|
34300
|
+
@Field()
|
|
34301
|
+
@MaxLength(36)
|
|
34302
|
+
ID: string;
|
|
34303
|
+
|
|
34304
|
+
@Field()
|
|
34305
|
+
@MaxLength(36)
|
|
34306
|
+
ContentItemID: string;
|
|
34307
|
+
|
|
34308
|
+
@Field(() => Int, {description: `Zero-based ordinal position of this chunk within the parent Content Item, preserving the original order in which the text was split.`})
|
|
34309
|
+
Sequence: number;
|
|
34310
|
+
|
|
34311
|
+
@Field({nullable: true, description: `The chunk of extracted text (from the parent Content Item) that was embedded to produce this chunk's vector. NULL for media-only segments (for example an image, or a video window with no transcript), where the embedded payload is the media itself and any readable representation lives in Description/Transcript.`})
|
|
34312
|
+
Text?: string;
|
|
34313
|
+
|
|
34314
|
+
@Field({nullable: true, description: `The identifier of this chunk's vector record in the vector database (e.g. Pinecone) — the deterministic key MemberJunction assigns and upserts the chunk's embedding under. Provides traceability from the chunk back to its stored vector.`})
|
|
34315
|
+
@MaxLength(100)
|
|
34316
|
+
VectorRecordID?: string;
|
|
34317
|
+
|
|
34318
|
+
@Field({description: `Embedding lifecycle state of this chunk: Pending (default), Processing, Active, Complete, Processed, Failed, or Skipped.`})
|
|
34319
|
+
@MaxLength(20)
|
|
34320
|
+
EmbeddingStatus: string;
|
|
34321
|
+
|
|
34322
|
+
@Field({description: `Tagging lifecycle state of this chunk: Pending (default), Processing, Active, Complete, Processed, Failed, or Skipped.`})
|
|
34323
|
+
@MaxLength(20)
|
|
34324
|
+
TaggingStatus: string;
|
|
34325
|
+
|
|
34326
|
+
@Field({nullable: true, description: `Deletion lifecycle state of this chunk's vector: NULL when not slated for deletion, Pending when vector removal is queued, or Deleted once the vector has been removed from the vector database.`})
|
|
34327
|
+
@MaxLength(20)
|
|
34328
|
+
DeleteStatus?: string;
|
|
34329
|
+
|
|
34330
|
+
@Field({nullable: true, description: `Timestamp of the last successful embedding of this chunk.`})
|
|
34331
|
+
LastEmbeddedAt?: Date;
|
|
34332
|
+
|
|
34333
|
+
@Field({nullable: true, description: `Timestamp of the last successful tagging of this chunk.`})
|
|
34334
|
+
LastTaggedAt?: Date;
|
|
34335
|
+
|
|
34336
|
+
@Field({nullable: true, description: `Timestamp of the last successful deletion of this chunk's vector from the vector database.`})
|
|
34337
|
+
LastDeletedAt?: Date;
|
|
34338
|
+
|
|
34339
|
+
@Field()
|
|
34340
|
+
_mj__CreatedAt: Date;
|
|
34341
|
+
|
|
34342
|
+
@Field()
|
|
34343
|
+
_mj__UpdatedAt: Date;
|
|
34344
|
+
|
|
34345
|
+
@Field({description: `The modality of this chunk's embedded payload: text (default), image, audio, video, or multimodal (text and media fused into a single vector). Determines which vector index the chunk's embedding belongs to, since a multimodal embedding model produces vectors of a different dimension than a text model, and is used at retrieval time to merge results per modality rather than taking a single global top-k.`})
|
|
34346
|
+
@MaxLength(20)
|
|
34347
|
+
Modality: string;
|
|
34348
|
+
|
|
34349
|
+
@Field(() => Int, {nullable: true, description: `Inclusive character offset where this chunk begins within the parent Content Item's extracted text. Together with EndOffset this is the provenance link that resolves a search hit back to the exact passage in the source document. NULL for media segments, which are positioned by StartMs/EndMs instead.`})
|
|
34350
|
+
StartOffset?: number;
|
|
34351
|
+
|
|
34352
|
+
@Field(() => Int, {nullable: true, description: `Exclusive character offset where this chunk ends within the parent Content Item's extracted text. See StartOffset. NULL for media segments.`})
|
|
34353
|
+
EndOffset?: number;
|
|
34354
|
+
|
|
34355
|
+
@Field(() => Int, {nullable: true, description: `Start of this chunk's time window, in milliseconds from the beginning of the parent audio or video asset. Set by transcript- or window-based segmentation; enables time-windowed playback deep-links from a search result (for example 14:22-15:05 of a session recording). NULL for text segments.`})
|
|
34356
|
+
StartMs?: number;
|
|
34357
|
+
|
|
34358
|
+
@Field(() => Int, {nullable: true, description: `End of this chunk's time window, in milliseconds from the beginning of the parent audio or video asset. See StartMs. NULL for text segments.`})
|
|
34359
|
+
EndMs?: number;
|
|
34360
|
+
|
|
34361
|
+
@Field(() => Int, {nullable: true, description: `One-based page number this chunk came from, for paginated sources such as PDFs or slide decks. Provides citation-grade provenance alongside the character offsets. NULL when the source is not paginated.`})
|
|
34362
|
+
PageNumber?: number;
|
|
34363
|
+
|
|
34364
|
+
@Field({nullable: true, description: `Human-readable label for this segment — a document heading for structure-based segmentation, or a generated chapter title for topic- and transcript-based segmentation. Displayed with search results and prepended to the embedded text so a chunk's vector carries its own topic.`})
|
|
34365
|
+
@MaxLength(500)
|
|
34366
|
+
SegmentTitle?: string;
|
|
34367
|
+
|
|
34368
|
+
@Field({nullable: true, description: `An AI-generated description of this chunk's content, primarily for non-text segments. Retrieval of a media chunk otherwise yields only a pointer (an asset and a time window) that an agent cannot reason over; this column is the readable representation that an agent reads, a cross-encoder reranks, and lexical search matches. A short summary of it may be mirrored into the vector record's metadata for display and filtering, but the full text belongs here.`})
|
|
34369
|
+
Description?: string;
|
|
34370
|
+
|
|
34371
|
+
@Field({nullable: true, description: `The verbatim transcript covering this chunk's time window, for audio and video segments, including speaker labels where the source provides them. Distinct from Description, which is a generated summary: this is what was actually said, and it is what makes a recording findable by lexical search.`})
|
|
34372
|
+
Transcript?: string;
|
|
34373
|
+
|
|
34374
|
+
@Field({nullable: true, description: `Registration key of the segmentation strategy that produced this chunk (for example StructuralText, SemanticText, Transcript, or FixedWindow). Provenance: when a Content Source's configured strategy changes, this identifies which chunks were produced by the previous strategy and therefore need re-chunking.`})
|
|
34375
|
+
@MaxLength(100)
|
|
34376
|
+
SegmenterKey?: string;
|
|
34377
|
+
|
|
34378
|
+
@Field({nullable: true, description: `Optional self-reference to another chunk of the same Content Item that is the parent of this one, expressing a chapter to sub-chapter hierarchy — for example a five-minute chapter of a recording and the individual speaker turns within it, or a document section and its subsections. NULL for top-level segments.`})
|
|
34379
|
+
@MaxLength(36)
|
|
34380
|
+
ParentChunkID?: string;
|
|
34381
|
+
|
|
34382
|
+
@Field({nullable: true})
|
|
34383
|
+
@MaxLength(250)
|
|
34384
|
+
ContentItem?: string;
|
|
34385
|
+
|
|
34386
|
+
@Field({nullable: true})
|
|
34387
|
+
@MaxLength(36)
|
|
34388
|
+
RootParentChunkID?: string;
|
|
34389
|
+
|
|
34390
|
+
@Field(() => [MJContentItemChunk_])
|
|
34391
|
+
MJContentItemChunks_ParentChunkIDArray: MJContentItemChunk_[]; // Link to MJContentItemChunks
|
|
34392
|
+
|
|
34393
|
+
}
|
|
34394
|
+
|
|
34395
|
+
//****************************************************************************
|
|
34396
|
+
// INPUT TYPE for MJ: Content Item Chunks
|
|
34397
|
+
//****************************************************************************
|
|
34398
|
+
@InputType()
|
|
34399
|
+
export class CreateMJContentItemChunkInput {
|
|
34400
|
+
@Field({ nullable: true })
|
|
34401
|
+
ID?: string;
|
|
34402
|
+
|
|
34403
|
+
@Field({ nullable: true })
|
|
34404
|
+
ContentItemID?: string;
|
|
34405
|
+
|
|
34406
|
+
@Field(() => Int, { nullable: true })
|
|
34407
|
+
Sequence?: number;
|
|
34408
|
+
|
|
34409
|
+
@Field({ nullable: true })
|
|
34410
|
+
Text: string | null;
|
|
34411
|
+
|
|
34412
|
+
@Field({ nullable: true })
|
|
34413
|
+
VectorRecordID: string | null;
|
|
34414
|
+
|
|
34415
|
+
@Field({ nullable: true })
|
|
34416
|
+
EmbeddingStatus?: string;
|
|
34417
|
+
|
|
34418
|
+
@Field({ nullable: true })
|
|
34419
|
+
TaggingStatus?: string;
|
|
34420
|
+
|
|
34421
|
+
@Field({ nullable: true })
|
|
34422
|
+
DeleteStatus: string | null;
|
|
34423
|
+
|
|
34424
|
+
@Field({ nullable: true })
|
|
34425
|
+
LastEmbeddedAt: Date | null;
|
|
34426
|
+
|
|
34427
|
+
@Field({ nullable: true })
|
|
34428
|
+
LastTaggedAt: Date | null;
|
|
34429
|
+
|
|
34430
|
+
@Field({ nullable: true })
|
|
34431
|
+
LastDeletedAt: Date | null;
|
|
34432
|
+
|
|
34433
|
+
@Field({ nullable: true })
|
|
34434
|
+
Modality?: string;
|
|
34435
|
+
|
|
34436
|
+
@Field(() => Int, { nullable: true })
|
|
34437
|
+
StartOffset: number | null;
|
|
34438
|
+
|
|
34439
|
+
@Field(() => Int, { nullable: true })
|
|
34440
|
+
EndOffset: number | null;
|
|
34441
|
+
|
|
34442
|
+
@Field(() => Int, { nullable: true })
|
|
34443
|
+
StartMs: number | null;
|
|
34444
|
+
|
|
34445
|
+
@Field(() => Int, { nullable: true })
|
|
34446
|
+
EndMs: number | null;
|
|
34447
|
+
|
|
34448
|
+
@Field(() => Int, { nullable: true })
|
|
34449
|
+
PageNumber: number | null;
|
|
34450
|
+
|
|
34451
|
+
@Field({ nullable: true })
|
|
34452
|
+
SegmentTitle: string | null;
|
|
34453
|
+
|
|
34454
|
+
@Field({ nullable: true })
|
|
34455
|
+
Description: string | null;
|
|
34456
|
+
|
|
34457
|
+
@Field({ nullable: true })
|
|
34458
|
+
Transcript: string | null;
|
|
34459
|
+
|
|
34460
|
+
@Field({ nullable: true })
|
|
34461
|
+
SegmenterKey: string | null;
|
|
34462
|
+
|
|
34463
|
+
@Field({ nullable: true })
|
|
34464
|
+
ParentChunkID: string | null;
|
|
34465
|
+
|
|
34466
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
34467
|
+
RestoreContext___?: RestoreContextInput;
|
|
34468
|
+
}
|
|
34469
|
+
|
|
34470
|
+
|
|
34471
|
+
//****************************************************************************
|
|
34472
|
+
// INPUT TYPE for MJ: Content Item Chunks
|
|
34473
|
+
//****************************************************************************
|
|
34474
|
+
@InputType()
|
|
34475
|
+
export class UpdateMJContentItemChunkInput {
|
|
34476
|
+
@Field()
|
|
34477
|
+
ID: string;
|
|
34478
|
+
|
|
34479
|
+
@Field({ nullable: true })
|
|
34480
|
+
ContentItemID?: string;
|
|
34481
|
+
|
|
34482
|
+
@Field(() => Int, { nullable: true })
|
|
34483
|
+
Sequence?: number;
|
|
34484
|
+
|
|
34485
|
+
@Field({ nullable: true })
|
|
34486
|
+
Text?: string | null;
|
|
34487
|
+
|
|
34488
|
+
@Field({ nullable: true })
|
|
34489
|
+
VectorRecordID?: string | null;
|
|
34490
|
+
|
|
34491
|
+
@Field({ nullable: true })
|
|
34492
|
+
EmbeddingStatus?: string;
|
|
34493
|
+
|
|
34494
|
+
@Field({ nullable: true })
|
|
34495
|
+
TaggingStatus?: string;
|
|
34496
|
+
|
|
34497
|
+
@Field({ nullable: true })
|
|
34498
|
+
DeleteStatus?: string | null;
|
|
34499
|
+
|
|
34500
|
+
@Field({ nullable: true })
|
|
34501
|
+
LastEmbeddedAt?: Date | null;
|
|
34502
|
+
|
|
34503
|
+
@Field({ nullable: true })
|
|
34504
|
+
LastTaggedAt?: Date | null;
|
|
34505
|
+
|
|
34506
|
+
@Field({ nullable: true })
|
|
34507
|
+
LastDeletedAt?: Date | null;
|
|
34508
|
+
|
|
34509
|
+
@Field({ nullable: true })
|
|
34510
|
+
Modality?: string;
|
|
34511
|
+
|
|
34512
|
+
@Field(() => Int, { nullable: true })
|
|
34513
|
+
StartOffset?: number | null;
|
|
34514
|
+
|
|
34515
|
+
@Field(() => Int, { nullable: true })
|
|
34516
|
+
EndOffset?: number | null;
|
|
34517
|
+
|
|
34518
|
+
@Field(() => Int, { nullable: true })
|
|
34519
|
+
StartMs?: number | null;
|
|
34520
|
+
|
|
34521
|
+
@Field(() => Int, { nullable: true })
|
|
34522
|
+
EndMs?: number | null;
|
|
34523
|
+
|
|
34524
|
+
@Field(() => Int, { nullable: true })
|
|
34525
|
+
PageNumber?: number | null;
|
|
34526
|
+
|
|
34527
|
+
@Field({ nullable: true })
|
|
34528
|
+
SegmentTitle?: string | null;
|
|
34529
|
+
|
|
34530
|
+
@Field({ nullable: true })
|
|
34531
|
+
Description?: string | null;
|
|
34532
|
+
|
|
34533
|
+
@Field({ nullable: true })
|
|
34534
|
+
Transcript?: string | null;
|
|
34535
|
+
|
|
34536
|
+
@Field({ nullable: true })
|
|
34537
|
+
SegmenterKey?: string | null;
|
|
34538
|
+
|
|
34539
|
+
@Field({ nullable: true })
|
|
34540
|
+
ParentChunkID?: string | null;
|
|
34541
|
+
|
|
34542
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
34543
|
+
OldValues___?: KeyValuePairInput[];
|
|
34544
|
+
|
|
34545
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
34546
|
+
RestoreContext___?: RestoreContextInput;
|
|
34547
|
+
}
|
|
34548
|
+
|
|
34549
|
+
//****************************************************************************
|
|
34550
|
+
// RESOLVER for MJ: Content Item Chunks
|
|
34551
|
+
//****************************************************************************
|
|
34552
|
+
@ObjectType()
|
|
34553
|
+
export class RunMJContentItemChunkViewResult {
|
|
34554
|
+
@Field(() => [MJContentItemChunk_])
|
|
34555
|
+
Results: MJContentItemChunk_[];
|
|
34556
|
+
|
|
34557
|
+
@Field(() => String, {nullable: true})
|
|
34558
|
+
UserViewRunID?: string;
|
|
34559
|
+
|
|
34560
|
+
@Field(() => Int, {nullable: true})
|
|
34561
|
+
RowCount: number;
|
|
34562
|
+
|
|
34563
|
+
@Field(() => Int, {nullable: true})
|
|
34564
|
+
TotalRowCount: number;
|
|
34565
|
+
|
|
34566
|
+
@Field(() => Int, {nullable: true})
|
|
34567
|
+
ExecutionTime: number;
|
|
34568
|
+
|
|
34569
|
+
@Field({nullable: true})
|
|
34570
|
+
ErrorMessage?: string;
|
|
34571
|
+
|
|
34572
|
+
@Field(() => Boolean, {nullable: false})
|
|
34573
|
+
Success: boolean;
|
|
34574
|
+
}
|
|
34575
|
+
|
|
34576
|
+
@Resolver(MJContentItemChunk_)
|
|
34577
|
+
export class MJContentItemChunkResolver extends ResolverBase {
|
|
34578
|
+
@Query(() => RunMJContentItemChunkViewResult)
|
|
34579
|
+
async RunMJContentItemChunkViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34580
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34581
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
34582
|
+
}
|
|
34583
|
+
|
|
34584
|
+
@Query(() => RunMJContentItemChunkViewResult)
|
|
34585
|
+
async RunMJContentItemChunkViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34586
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34587
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
34588
|
+
}
|
|
34589
|
+
|
|
34590
|
+
@Query(() => RunMJContentItemChunkViewResult)
|
|
34591
|
+
async RunMJContentItemChunkDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34592
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34593
|
+
input.EntityName = 'MJ: Content Item Chunks';
|
|
34594
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
34595
|
+
}
|
|
34596
|
+
@Query(() => MJContentItemChunk_, { nullable: true })
|
|
34597
|
+
async MJContentItemChunk(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJContentItemChunk_ | null> {
|
|
34598
|
+
this.CheckUserReadPermissions('MJ: Content Item Chunks', userPayload);
|
|
34599
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34600
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemChunks')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Chunks', userPayload, EntityPermissionType.Read, 'AND');
|
|
34601
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
34602
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Content Item Chunks', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
34603
|
+
return result;
|
|
34604
|
+
}
|
|
34605
|
+
|
|
34606
|
+
@FieldResolver(() => [MJContentItemChunk_])
|
|
34607
|
+
async MJContentItemChunks_ParentChunkIDArray(@Root() mjcontentitemchunk_: MJContentItemChunk_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34608
|
+
this.CheckUserReadPermissions('MJ: Content Item Chunks', userPayload);
|
|
34609
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34610
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemChunks')} WHERE ${provider.QuoteIdentifier('ParentChunkID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Chunks', userPayload, EntityPermissionType.Read, 'AND');
|
|
34611
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcontentitemchunk_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
34612
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Chunks', rows, this.GetUserFromPayload(userPayload));
|
|
34613
|
+
return result;
|
|
34614
|
+
}
|
|
34615
|
+
|
|
34616
|
+
@Mutation(() => MJContentItemChunk_)
|
|
34617
|
+
async CreateMJContentItemChunk(
|
|
34618
|
+
@Arg('input', () => CreateMJContentItemChunkInput) input: CreateMJContentItemChunkInput,
|
|
34619
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
34620
|
+
@PubSub() pubSub: PubSubEngine
|
|
34621
|
+
) {
|
|
34622
|
+
const provider = GetReadWriteProvider(providers);
|
|
34623
|
+
return this.CreateRecord('MJ: Content Item Chunks', input, provider, userPayload, pubSub)
|
|
34624
|
+
}
|
|
34625
|
+
|
|
34626
|
+
@Mutation(() => MJContentItemChunk_)
|
|
34627
|
+
async UpdateMJContentItemChunk(
|
|
34628
|
+
@Arg('input', () => UpdateMJContentItemChunkInput) input: UpdateMJContentItemChunkInput,
|
|
34629
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
34630
|
+
@PubSub() pubSub: PubSubEngine
|
|
34631
|
+
) {
|
|
34632
|
+
const provider = GetReadWriteProvider(providers);
|
|
34633
|
+
return this.UpdateRecord('MJ: Content Item Chunks', input, provider, userPayload, pubSub);
|
|
34634
|
+
}
|
|
34635
|
+
|
|
34636
|
+
@Mutation(() => MJContentItemChunk_)
|
|
34637
|
+
async DeleteMJContentItemChunk(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34638
|
+
const provider = GetReadWriteProvider(providers);
|
|
34639
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
34640
|
+
return this.DeleteRecord('MJ: Content Item Chunks', key, options, provider, userPayload, pubSub);
|
|
34641
|
+
}
|
|
34642
|
+
|
|
34643
|
+
}
|
|
34644
|
+
|
|
34081
34645
|
//****************************************************************************
|
|
34082
34646
|
// ENTITY CLASS for MJ: Content Item Duplicates
|
|
34083
34647
|
//****************************************************************************
|
|
@@ -34571,6 +35135,18 @@ export class MJContentItem_ {
|
|
|
34571
35135
|
@Field({nullable: true, description: `Timestamp of the most recent successful autotagging run for this content item.`})
|
|
34572
35136
|
LastTaggedAt?: Date;
|
|
34573
35137
|
|
|
35138
|
+
@Field({nullable: true, description: `The identifier of this Content Item's vector record in the vector database (e.g. Pinecone) — the deterministic key MemberJunction assigns and upserts the embedding under when the item is embedded as a single vector. Provides traceability from the Content Item back to its stored vector. For chunked items, per-chunk identifiers are tracked on the ContentItemChunk entity instead.`})
|
|
35139
|
+
@MaxLength(100)
|
|
35140
|
+
VectorRecordID?: string;
|
|
35141
|
+
|
|
35142
|
+
@Field({nullable: true, description: `Optional self-reference to another Content Item that is the parent of this one, enabling a content-item hierarchy (e.g. a document and its sub-pages, or a site and its crawled pages). NULL for top-level items.`})
|
|
35143
|
+
@MaxLength(36)
|
|
35144
|
+
ParentID?: string;
|
|
35145
|
+
|
|
35146
|
+
@Field({nullable: true, description: `Optional display/clickable URL for this Content Item (e.g. a canonical or human-facing link), distinct from the source URL used for ingestion.`})
|
|
35147
|
+
@MaxLength(2000)
|
|
35148
|
+
DisplayLink?: string;
|
|
35149
|
+
|
|
34574
35150
|
@Field({nullable: true})
|
|
34575
35151
|
@MaxLength(255)
|
|
34576
35152
|
ContentSource?: string;
|
|
@@ -34595,6 +35171,14 @@ export class MJContentItem_ {
|
|
|
34595
35171
|
@MaxLength(50)
|
|
34596
35172
|
EmbeddingModel?: string;
|
|
34597
35173
|
|
|
35174
|
+
@Field({nullable: true})
|
|
35175
|
+
@MaxLength(250)
|
|
35176
|
+
Parent?: string;
|
|
35177
|
+
|
|
35178
|
+
@Field({nullable: true})
|
|
35179
|
+
@MaxLength(36)
|
|
35180
|
+
RootParentID?: string;
|
|
35181
|
+
|
|
34598
35182
|
@Field(() => [MJContentItemAttribute_])
|
|
34599
35183
|
MJContentItemAttributes_ContentItemIDArray: MJContentItemAttribute_[]; // Link to MJContentItemAttributes
|
|
34600
35184
|
|
|
@@ -34607,9 +35191,15 @@ export class MJContentItem_ {
|
|
|
34607
35191
|
@Field(() => [MJContentItemDuplicate_])
|
|
34608
35192
|
MJContentItemDuplicates_ContentItemBIDArray: MJContentItemDuplicate_[]; // Link to MJContentItemDuplicates
|
|
34609
35193
|
|
|
35194
|
+
@Field(() => [MJContentItem_])
|
|
35195
|
+
MJContentItems_ParentIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
35196
|
+
|
|
34610
35197
|
@Field(() => [MJTagSuggestion_])
|
|
34611
35198
|
MJTagSuggestions_SourceContentItemIDArray: MJTagSuggestion_[]; // Link to MJTagSuggestions
|
|
34612
35199
|
|
|
35200
|
+
@Field(() => [MJContentItemChunk_])
|
|
35201
|
+
MJContentItemChunks_ContentItemIDArray: MJContentItemChunk_[]; // Link to MJContentItemChunks
|
|
35202
|
+
|
|
34613
35203
|
}
|
|
34614
35204
|
|
|
34615
35205
|
//****************************************************************************
|
|
@@ -34665,6 +35255,15 @@ export class CreateMJContentItemInput {
|
|
|
34665
35255
|
@Field({ nullable: true })
|
|
34666
35256
|
LastTaggedAt: Date | null;
|
|
34667
35257
|
|
|
35258
|
+
@Field({ nullable: true })
|
|
35259
|
+
VectorRecordID: string | null;
|
|
35260
|
+
|
|
35261
|
+
@Field({ nullable: true })
|
|
35262
|
+
ParentID: string | null;
|
|
35263
|
+
|
|
35264
|
+
@Field({ nullable: true })
|
|
35265
|
+
DisplayLink: string | null;
|
|
35266
|
+
|
|
34668
35267
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
34669
35268
|
RestoreContext___?: RestoreContextInput;
|
|
34670
35269
|
}
|
|
@@ -34723,6 +35322,15 @@ export class UpdateMJContentItemInput {
|
|
|
34723
35322
|
@Field({ nullable: true })
|
|
34724
35323
|
LastTaggedAt?: Date | null;
|
|
34725
35324
|
|
|
35325
|
+
@Field({ nullable: true })
|
|
35326
|
+
VectorRecordID?: string | null;
|
|
35327
|
+
|
|
35328
|
+
@Field({ nullable: true })
|
|
35329
|
+
ParentID?: string | null;
|
|
35330
|
+
|
|
35331
|
+
@Field({ nullable: true })
|
|
35332
|
+
DisplayLink?: string | null;
|
|
35333
|
+
|
|
34726
35334
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
34727
35335
|
OldValues___?: KeyValuePairInput[];
|
|
34728
35336
|
|
|
@@ -34827,6 +35435,16 @@ export class MJContentItemResolver extends ResolverBase {
|
|
|
34827
35435
|
return result;
|
|
34828
35436
|
}
|
|
34829
35437
|
|
|
35438
|
+
@FieldResolver(() => [MJContentItem_])
|
|
35439
|
+
async MJContentItems_ParentIDArray(@Root() mjcontentitem_: MJContentItem_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35440
|
+
this.CheckUserReadPermissions('MJ: Content Items', userPayload);
|
|
35441
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35442
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItems')} WHERE ${provider.QuoteIdentifier('ParentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
35443
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcontentitem_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
35444
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Items', rows, this.GetUserFromPayload(userPayload));
|
|
35445
|
+
return result;
|
|
35446
|
+
}
|
|
35447
|
+
|
|
34830
35448
|
@FieldResolver(() => [MJTagSuggestion_])
|
|
34831
35449
|
async MJTagSuggestions_SourceContentItemIDArray(@Root() mjcontentitem_: MJContentItem_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34832
35450
|
this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
|
|
@@ -34837,6 +35455,16 @@ export class MJContentItemResolver extends ResolverBase {
|
|
|
34837
35455
|
return result;
|
|
34838
35456
|
}
|
|
34839
35457
|
|
|
35458
|
+
@FieldResolver(() => [MJContentItemChunk_])
|
|
35459
|
+
async MJContentItemChunks_ContentItemIDArray(@Root() mjcontentitem_: MJContentItem_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35460
|
+
this.CheckUserReadPermissions('MJ: Content Item Chunks', userPayload);
|
|
35461
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35462
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemChunks')} WHERE ${provider.QuoteIdentifier('ContentItemID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Chunks', userPayload, EntityPermissionType.Read, 'AND');
|
|
35463
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcontentitem_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
35464
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Chunks', rows, this.GetUserFromPayload(userPayload));
|
|
35465
|
+
return result;
|
|
35466
|
+
}
|
|
35467
|
+
|
|
34840
35468
|
@Mutation(() => MJContentItem_)
|
|
34841
35469
|
async CreateMJContentItem(
|
|
34842
35470
|
@Arg('input', () => CreateMJContentItemInput) input: CreateMJContentItemInput,
|
|
@@ -36189,6 +36817,14 @@ export class MJContentSource_ {
|
|
|
36189
36817
|
@MaxLength(36)
|
|
36190
36818
|
ScheduledActionID?: string;
|
|
36191
36819
|
|
|
36820
|
+
@Field({nullable: true, description: `Registration key of the segmentation strategy used to split this source's content into embeddable chunks — for example StructuralText (document headings), AdaptiveBoundary (target size closing on the nearest natural break), SemanticText (LLM-detected topic boundaries), Transcript (audio/video chapters), PagedContent (one segment per page), or FixedWindow (uniform windows). NULL falls back to the Content Type's value, then to a built-in default.`})
|
|
36821
|
+
@MaxLength(100)
|
|
36822
|
+
SegmenterKey?: string;
|
|
36823
|
+
|
|
36824
|
+
@Field({nullable: true, description: `Registration key of the content-cleaning strategy applied to this source before segmentation — for example Html (CSS-selector-driven extraction that drops navigation, sidebars, and advertising) or PlainText (whitespace normalization only). Cleaning is separate from segmentation because the two change for different reasons: a new site template needs new selectors, not a new chunking strategy. NULL falls back to the Content Type's value, then to a default inferred from the content's mime type.`})
|
|
36825
|
+
@MaxLength(100)
|
|
36826
|
+
CleanerKey?: string;
|
|
36827
|
+
|
|
36192
36828
|
@Field()
|
|
36193
36829
|
@MaxLength(255)
|
|
36194
36830
|
ContentType: string;
|
|
@@ -36279,6 +36915,12 @@ export class CreateMJContentSourceInput {
|
|
|
36279
36915
|
@Field({ nullable: true })
|
|
36280
36916
|
ScheduledActionID: string | null;
|
|
36281
36917
|
|
|
36918
|
+
@Field({ nullable: true })
|
|
36919
|
+
SegmenterKey: string | null;
|
|
36920
|
+
|
|
36921
|
+
@Field({ nullable: true })
|
|
36922
|
+
CleanerKey: string | null;
|
|
36923
|
+
|
|
36282
36924
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
36283
36925
|
RestoreContext___?: RestoreContextInput;
|
|
36284
36926
|
}
|
|
@@ -36325,6 +36967,12 @@ export class UpdateMJContentSourceInput {
|
|
|
36325
36967
|
@Field({ nullable: true })
|
|
36326
36968
|
ScheduledActionID?: string | null;
|
|
36327
36969
|
|
|
36970
|
+
@Field({ nullable: true })
|
|
36971
|
+
SegmenterKey?: string | null;
|
|
36972
|
+
|
|
36973
|
+
@Field({ nullable: true })
|
|
36974
|
+
CleanerKey?: string | null;
|
|
36975
|
+
|
|
36328
36976
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
36329
36977
|
OldValues___?: KeyValuePairInput[];
|
|
36330
36978
|
|
|
@@ -36680,6 +37328,14 @@ export class MJContentType_ {
|
|
|
36680
37328
|
@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.`})
|
|
36681
37329
|
Configuration?: string;
|
|
36682
37330
|
|
|
37331
|
+
@Field({nullable: true, description: `Default segmentation strategy for content of this type, used when a Content Source does not specify its own SegmenterKey. See ContentSource.SegmenterKey for the available strategies.`})
|
|
37332
|
+
@MaxLength(100)
|
|
37333
|
+
SegmenterKey?: string;
|
|
37334
|
+
|
|
37335
|
+
@Field({nullable: true, description: `Default content-cleaning strategy for content of this type, used when a Content Source does not specify its own CleanerKey. See ContentSource.CleanerKey.`})
|
|
37336
|
+
@MaxLength(100)
|
|
37337
|
+
CleanerKey?: string;
|
|
37338
|
+
|
|
36683
37339
|
@Field()
|
|
36684
37340
|
@MaxLength(50)
|
|
36685
37341
|
AIModel: string;
|
|
@@ -36732,6 +37388,12 @@ export class CreateMJContentTypeInput {
|
|
|
36732
37388
|
@Field({ nullable: true })
|
|
36733
37389
|
Configuration: string | null;
|
|
36734
37390
|
|
|
37391
|
+
@Field({ nullable: true })
|
|
37392
|
+
SegmenterKey: string | null;
|
|
37393
|
+
|
|
37394
|
+
@Field({ nullable: true })
|
|
37395
|
+
CleanerKey: string | null;
|
|
37396
|
+
|
|
36735
37397
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
36736
37398
|
RestoreContext___?: RestoreContextInput;
|
|
36737
37399
|
}
|
|
@@ -36769,6 +37431,12 @@ export class UpdateMJContentTypeInput {
|
|
|
36769
37431
|
@Field({ nullable: true })
|
|
36770
37432
|
Configuration?: string | null;
|
|
36771
37433
|
|
|
37434
|
+
@Field({ nullable: true })
|
|
37435
|
+
SegmenterKey?: string | null;
|
|
37436
|
+
|
|
37437
|
+
@Field({ nullable: true })
|
|
37438
|
+
CleanerKey?: string | null;
|
|
37439
|
+
|
|
36772
37440
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
36773
37441
|
OldValues___?: KeyValuePairInput[];
|
|
36774
37442
|
|
|
@@ -37477,6 +38145,165 @@ export class MJConversationArtifactResolver extends ResolverBase {
|
|
|
37477
38145
|
|
|
37478
38146
|
}
|
|
37479
38147
|
|
|
38148
|
+
//****************************************************************************
|
|
38149
|
+
// ENTITY CLASS for MJ: Conversation Compaction Runs
|
|
38150
|
+
//****************************************************************************
|
|
38151
|
+
@ObjectType({ description: `Links a conversation detail boundary row to the AI Prompt Run that produced its compaction summary. Audit-only join table replacing the former ConversationDetail.SummaryPromptRunID FK to break the CodeGen cycle.` })
|
|
38152
|
+
export class MJConversationCompactionRun_ {
|
|
38153
|
+
@Field()
|
|
38154
|
+
@MaxLength(36)
|
|
38155
|
+
ID: string;
|
|
38156
|
+
|
|
38157
|
+
@Field({description: `The conversation detail row whose SummaryOfEarlierConversation was produced by this compaction run.`})
|
|
38158
|
+
@MaxLength(36)
|
|
38159
|
+
ConversationDetailID: string;
|
|
38160
|
+
|
|
38161
|
+
@Field({description: `The AI Prompt Run that generated the compaction summary (model, tokens, cost, prompt version).`})
|
|
38162
|
+
@MaxLength(36)
|
|
38163
|
+
PromptRunID: string;
|
|
38164
|
+
|
|
38165
|
+
@Field()
|
|
38166
|
+
_mj__CreatedAt: Date;
|
|
38167
|
+
|
|
38168
|
+
@Field()
|
|
38169
|
+
_mj__UpdatedAt: Date;
|
|
38170
|
+
|
|
38171
|
+
@Field({nullable: true})
|
|
38172
|
+
@MaxLength(100)
|
|
38173
|
+
ConversationDetail?: string;
|
|
38174
|
+
|
|
38175
|
+
@Field({nullable: true})
|
|
38176
|
+
@MaxLength(255)
|
|
38177
|
+
PromptRun?: string;
|
|
38178
|
+
|
|
38179
|
+
}
|
|
38180
|
+
|
|
38181
|
+
//****************************************************************************
|
|
38182
|
+
// INPUT TYPE for MJ: Conversation Compaction Runs
|
|
38183
|
+
//****************************************************************************
|
|
38184
|
+
@InputType()
|
|
38185
|
+
export class CreateMJConversationCompactionRunInput {
|
|
38186
|
+
@Field({ nullable: true })
|
|
38187
|
+
ID?: string;
|
|
38188
|
+
|
|
38189
|
+
@Field({ nullable: true })
|
|
38190
|
+
ConversationDetailID?: string;
|
|
38191
|
+
|
|
38192
|
+
@Field({ nullable: true })
|
|
38193
|
+
PromptRunID?: string;
|
|
38194
|
+
|
|
38195
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
38196
|
+
RestoreContext___?: RestoreContextInput;
|
|
38197
|
+
}
|
|
38198
|
+
|
|
38199
|
+
|
|
38200
|
+
//****************************************************************************
|
|
38201
|
+
// INPUT TYPE for MJ: Conversation Compaction Runs
|
|
38202
|
+
//****************************************************************************
|
|
38203
|
+
@InputType()
|
|
38204
|
+
export class UpdateMJConversationCompactionRunInput {
|
|
38205
|
+
@Field()
|
|
38206
|
+
ID: string;
|
|
38207
|
+
|
|
38208
|
+
@Field({ nullable: true })
|
|
38209
|
+
ConversationDetailID?: string;
|
|
38210
|
+
|
|
38211
|
+
@Field({ nullable: true })
|
|
38212
|
+
PromptRunID?: string;
|
|
38213
|
+
|
|
38214
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
38215
|
+
OldValues___?: KeyValuePairInput[];
|
|
38216
|
+
|
|
38217
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
38218
|
+
RestoreContext___?: RestoreContextInput;
|
|
38219
|
+
}
|
|
38220
|
+
|
|
38221
|
+
//****************************************************************************
|
|
38222
|
+
// RESOLVER for MJ: Conversation Compaction Runs
|
|
38223
|
+
//****************************************************************************
|
|
38224
|
+
@ObjectType()
|
|
38225
|
+
export class RunMJConversationCompactionRunViewResult {
|
|
38226
|
+
@Field(() => [MJConversationCompactionRun_])
|
|
38227
|
+
Results: MJConversationCompactionRun_[];
|
|
38228
|
+
|
|
38229
|
+
@Field(() => String, {nullable: true})
|
|
38230
|
+
UserViewRunID?: string;
|
|
38231
|
+
|
|
38232
|
+
@Field(() => Int, {nullable: true})
|
|
38233
|
+
RowCount: number;
|
|
38234
|
+
|
|
38235
|
+
@Field(() => Int, {nullable: true})
|
|
38236
|
+
TotalRowCount: number;
|
|
38237
|
+
|
|
38238
|
+
@Field(() => Int, {nullable: true})
|
|
38239
|
+
ExecutionTime: number;
|
|
38240
|
+
|
|
38241
|
+
@Field({nullable: true})
|
|
38242
|
+
ErrorMessage?: string;
|
|
38243
|
+
|
|
38244
|
+
@Field(() => Boolean, {nullable: false})
|
|
38245
|
+
Success: boolean;
|
|
38246
|
+
}
|
|
38247
|
+
|
|
38248
|
+
@Resolver(MJConversationCompactionRun_)
|
|
38249
|
+
export class MJConversationCompactionRunResolver extends ResolverBase {
|
|
38250
|
+
@Query(() => RunMJConversationCompactionRunViewResult)
|
|
38251
|
+
async RunMJConversationCompactionRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38252
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38253
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
38254
|
+
}
|
|
38255
|
+
|
|
38256
|
+
@Query(() => RunMJConversationCompactionRunViewResult)
|
|
38257
|
+
async RunMJConversationCompactionRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38258
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38259
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
38260
|
+
}
|
|
38261
|
+
|
|
38262
|
+
@Query(() => RunMJConversationCompactionRunViewResult)
|
|
38263
|
+
async RunMJConversationCompactionRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38264
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38265
|
+
input.EntityName = 'MJ: Conversation Compaction Runs';
|
|
38266
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
38267
|
+
}
|
|
38268
|
+
@Query(() => MJConversationCompactionRun_, { nullable: true })
|
|
38269
|
+
async MJConversationCompactionRun(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJConversationCompactionRun_ | null> {
|
|
38270
|
+
this.CheckUserReadPermissions('MJ: Conversation Compaction Runs', userPayload);
|
|
38271
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38272
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationCompactionRuns')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Compaction Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
38273
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
38274
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Conversation Compaction Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
38275
|
+
return result;
|
|
38276
|
+
}
|
|
38277
|
+
|
|
38278
|
+
@Mutation(() => MJConversationCompactionRun_)
|
|
38279
|
+
async CreateMJConversationCompactionRun(
|
|
38280
|
+
@Arg('input', () => CreateMJConversationCompactionRunInput) input: CreateMJConversationCompactionRunInput,
|
|
38281
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
38282
|
+
@PubSub() pubSub: PubSubEngine
|
|
38283
|
+
) {
|
|
38284
|
+
const provider = GetReadWriteProvider(providers);
|
|
38285
|
+
return this.CreateRecord('MJ: Conversation Compaction Runs', input, provider, userPayload, pubSub)
|
|
38286
|
+
}
|
|
38287
|
+
|
|
38288
|
+
@Mutation(() => MJConversationCompactionRun_)
|
|
38289
|
+
async UpdateMJConversationCompactionRun(
|
|
38290
|
+
@Arg('input', () => UpdateMJConversationCompactionRunInput) input: UpdateMJConversationCompactionRunInput,
|
|
38291
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
38292
|
+
@PubSub() pubSub: PubSubEngine
|
|
38293
|
+
) {
|
|
38294
|
+
const provider = GetReadWriteProvider(providers);
|
|
38295
|
+
return this.UpdateRecord('MJ: Conversation Compaction Runs', input, provider, userPayload, pubSub);
|
|
38296
|
+
}
|
|
38297
|
+
|
|
38298
|
+
@Mutation(() => MJConversationCompactionRun_)
|
|
38299
|
+
async DeleteMJConversationCompactionRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38300
|
+
const provider = GetReadWriteProvider(providers);
|
|
38301
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
38302
|
+
return this.DeleteRecord('MJ: Conversation Compaction Runs', key, options, provider, userPayload, pubSub);
|
|
38303
|
+
}
|
|
38304
|
+
|
|
38305
|
+
}
|
|
38306
|
+
|
|
37480
38307
|
//****************************************************************************
|
|
37481
38308
|
// ENTITY CLASS for MJ: Conversation Detail Artifacts
|
|
37482
38309
|
//****************************************************************************
|
|
@@ -38219,10 +39046,6 @@ export class MJConversationDetail_ {
|
|
|
38219
39046
|
@Field(() => Int, {description: `Monotonic, per-conversation ordinal assigned on insert (1-based). Provides a stable symbolic handle used by conversation-history retrieval tools and by the sequence markers embedded in compaction summaries. A summary stored in SummaryOfEarlierConversation on a given row covers all rows with a lower Sequence in the same conversation.`})
|
|
38220
39047
|
Sequence: number;
|
|
38221
39048
|
|
|
38222
|
-
@Field({nullable: true, description: `When SummaryOfEarlierConversation is populated by a cross-turn compaction, this links to the AIPromptRun that produced it (model, tokens, cost, prompt version). Null for ordinary (non-summary) rows.`})
|
|
38223
|
-
@MaxLength(36)
|
|
38224
|
-
SummaryPromptRunID?: string;
|
|
38225
|
-
|
|
38226
39049
|
@Field({nullable: true})
|
|
38227
39050
|
@MaxLength(255)
|
|
38228
39051
|
Conversation?: string;
|
|
@@ -38251,10 +39074,6 @@ export class MJConversationDetail_ {
|
|
|
38251
39074
|
@MaxLength(255)
|
|
38252
39075
|
TestRun?: string;
|
|
38253
39076
|
|
|
38254
|
-
@Field({nullable: true})
|
|
38255
|
-
@MaxLength(255)
|
|
38256
|
-
SummaryPromptRun?: string;
|
|
38257
|
-
|
|
38258
39077
|
@Field({nullable: true})
|
|
38259
39078
|
@MaxLength(36)
|
|
38260
39079
|
RootParentID?: string;
|
|
@@ -38286,6 +39105,9 @@ export class MJConversationDetail_ {
|
|
|
38286
39105
|
@Field(() => [MJTask_])
|
|
38287
39106
|
MJTasks_ConversationDetailIDArray: MJTask_[]; // Link to MJTasks
|
|
38288
39107
|
|
|
39108
|
+
@Field(() => [MJConversationCompactionRun_])
|
|
39109
|
+
MJConversationCompactionRuns_ConversationDetailIDArray: MJConversationCompactionRun_[]; // Link to MJConversationCompactionRuns
|
|
39110
|
+
|
|
38289
39111
|
}
|
|
38290
39112
|
|
|
38291
39113
|
//****************************************************************************
|
|
@@ -38383,12 +39205,6 @@ export class CreateMJConversationDetailInput {
|
|
|
38383
39205
|
@Field({ nullable: true })
|
|
38384
39206
|
MediaType: string | null;
|
|
38385
39207
|
|
|
38386
|
-
@Field(() => Int, { nullable: true })
|
|
38387
|
-
Sequence?: number;
|
|
38388
|
-
|
|
38389
|
-
@Field({ nullable: true })
|
|
38390
|
-
SummaryPromptRunID: string | null;
|
|
38391
|
-
|
|
38392
39208
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
38393
39209
|
RestoreContext___?: RestoreContextInput;
|
|
38394
39210
|
}
|
|
@@ -38489,12 +39305,6 @@ export class UpdateMJConversationDetailInput {
|
|
|
38489
39305
|
@Field({ nullable: true })
|
|
38490
39306
|
MediaType?: string | null;
|
|
38491
39307
|
|
|
38492
|
-
@Field(() => Int, { nullable: true })
|
|
38493
|
-
Sequence?: number;
|
|
38494
|
-
|
|
38495
|
-
@Field({ nullable: true })
|
|
38496
|
-
SummaryPromptRunID?: string | null;
|
|
38497
|
-
|
|
38498
39308
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
38499
39309
|
OldValues___?: KeyValuePairInput[];
|
|
38500
39310
|
|
|
@@ -38649,6 +39459,16 @@ export class MJConversationDetailResolver extends ResolverBase {
|
|
|
38649
39459
|
return result;
|
|
38650
39460
|
}
|
|
38651
39461
|
|
|
39462
|
+
@FieldResolver(() => [MJConversationCompactionRun_])
|
|
39463
|
+
async MJConversationCompactionRuns_ConversationDetailIDArray(@Root() mjconversationdetail_: MJConversationDetail_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39464
|
+
this.CheckUserReadPermissions('MJ: Conversation Compaction Runs', userPayload);
|
|
39465
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39466
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationCompactionRuns')} WHERE ${provider.QuoteIdentifier('ConversationDetailID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Compaction Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
39467
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjconversationdetail_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
39468
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Compaction Runs', rows, this.GetUserFromPayload(userPayload));
|
|
39469
|
+
return result;
|
|
39470
|
+
}
|
|
39471
|
+
|
|
38652
39472
|
@Mutation(() => MJConversationDetail_)
|
|
38653
39473
|
async CreateMJConversationDetail(
|
|
38654
39474
|
@Arg('input', () => CreateMJConversationDetailInput) input: CreateMJConversationDetailInput,
|
|
@@ -78973,6 +79793,17 @@ export class MJSearchExecutionLog_ {
|
|
|
78973
79793
|
@Field()
|
|
78974
79794
|
_mj__UpdatedAt: Date;
|
|
78975
79795
|
|
|
79796
|
+
@Field({nullable: true, description: `The AI Skill on whose behalf this search ran, or NULL for a search with no active skill. Mirrors AIAgentID: since a skill is a search principal in its own right (AISkill.SearchScopeAccess plus MJ: AI Skill Search Scopes rows can reach a scope the user's own roles do not grant), the log must record which skill was active or the entitlement decision cannot be reconstructed.`})
|
|
79797
|
+
@MaxLength(36)
|
|
79798
|
+
AISkillID?: string;
|
|
79799
|
+
|
|
79800
|
+
@Field({nullable: true, description: `The tenant this search ran for, taken from SearchContext.PrimaryScopeRecordID. Lets a multi-tenant deployment partition, filter and retain search audit history per customer. NULL for untenanted searches. Named for the existing primary-scope concept rather than OrganizationID because a scope's primary scope may be a Company, Client or Practice.`})
|
|
79801
|
+
@MaxLength(36)
|
|
79802
|
+
PrimaryScopeRecordID?: string;
|
|
79803
|
+
|
|
79804
|
+
@Field({nullable: true, description: `Serialized ScopeExplanation recording WHY this search could reach what it reached: the entitlement decision and the grant that produced it, every dimension with its provenance (CallerSupplied / ServerDerived / Default / DiscardedCaller / Absent), and each lane's rendered filter with its active-or-skipped status and reason. Identical in shape to the value returned by SearchEngine.ExplainScope(), so the dry-run an administrator previews before running a search is the same structure the audit log stores afterwards. NULL when the engine did not capture a decision (older writers, or a failure before scope resolution).`})
|
|
79805
|
+
ScopeDecisionJSON?: string;
|
|
79806
|
+
|
|
78976
79807
|
@Field({nullable: true})
|
|
78977
79808
|
@MaxLength(200)
|
|
78978
79809
|
SearchScope?: string;
|
|
@@ -78985,6 +79816,10 @@ export class MJSearchExecutionLog_ {
|
|
|
78985
79816
|
@MaxLength(255)
|
|
78986
79817
|
AIAgent?: string;
|
|
78987
79818
|
|
|
79819
|
+
@Field({nullable: true})
|
|
79820
|
+
@MaxLength(255)
|
|
79821
|
+
AISkill?: string;
|
|
79822
|
+
|
|
78988
79823
|
}
|
|
78989
79824
|
|
|
78990
79825
|
//****************************************************************************
|
|
@@ -79028,6 +79863,15 @@ export class CreateMJSearchExecutionLogInput {
|
|
|
79028
79863
|
@Field({ nullable: true })
|
|
79029
79864
|
ProvidersJSON: string | null;
|
|
79030
79865
|
|
|
79866
|
+
@Field({ nullable: true })
|
|
79867
|
+
AISkillID: string | null;
|
|
79868
|
+
|
|
79869
|
+
@Field({ nullable: true })
|
|
79870
|
+
PrimaryScopeRecordID: string | null;
|
|
79871
|
+
|
|
79872
|
+
@Field({ nullable: true })
|
|
79873
|
+
ScopeDecisionJSON: string | null;
|
|
79874
|
+
|
|
79031
79875
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
79032
79876
|
RestoreContext___?: RestoreContextInput;
|
|
79033
79877
|
}
|
|
@@ -79074,6 +79918,15 @@ export class UpdateMJSearchExecutionLogInput {
|
|
|
79074
79918
|
@Field({ nullable: true })
|
|
79075
79919
|
ProvidersJSON?: string | null;
|
|
79076
79920
|
|
|
79921
|
+
@Field({ nullable: true })
|
|
79922
|
+
AISkillID?: string | null;
|
|
79923
|
+
|
|
79924
|
+
@Field({ nullable: true })
|
|
79925
|
+
PrimaryScopeRecordID?: string | null;
|
|
79926
|
+
|
|
79927
|
+
@Field({ nullable: true })
|
|
79928
|
+
ScopeDecisionJSON?: string | null;
|
|
79929
|
+
|
|
79077
79930
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
79078
79931
|
OldValues___?: KeyValuePairInput[];
|
|
79079
79932
|
|
|
@@ -79458,6 +80311,9 @@ export class MJSearchScopeEntity_ {
|
|
|
79458
80311
|
@Field()
|
|
79459
80312
|
_mj__UpdatedAt: Date;
|
|
79460
80313
|
|
|
80314
|
+
@Field({nullable: true, description: `JSON array of column or alias names the rendered ExtraFilter MUST reference for this lane to be considered safe, e.g. ["OrganizationID","ContentSourceID"]. Checked against the RENDERED filter at search time: if one is missing the lane is SKIPPED rather than queried, because a partially-rendered filter (an {% if %} clause dropped when its dimension was absent or discarded) is still valid SQL and silently widens the search. Same concept and same engine check as SearchScopeExternalIndex.RequiredMetadataKeys, applied to the SQL lane. NULL = no contract declared, which is the pre-migration behaviour.`})
|
|
80315
|
+
RequiredMetadataKeys?: string;
|
|
80316
|
+
|
|
79461
80317
|
@Field()
|
|
79462
80318
|
@MaxLength(200)
|
|
79463
80319
|
SearchScope: string;
|
|
@@ -79488,6 +80344,9 @@ export class CreateMJSearchScopeEntityInput {
|
|
|
79488
80344
|
@Field({ nullable: true })
|
|
79489
80345
|
UserSearchString: string | null;
|
|
79490
80346
|
|
|
80347
|
+
@Field({ nullable: true })
|
|
80348
|
+
RequiredMetadataKeys: string | null;
|
|
80349
|
+
|
|
79491
80350
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
79492
80351
|
RestoreContext___?: RestoreContextInput;
|
|
79493
80352
|
}
|
|
@@ -79513,6 +80372,9 @@ export class UpdateMJSearchScopeEntityInput {
|
|
|
79513
80372
|
@Field({ nullable: true })
|
|
79514
80373
|
UserSearchString?: string | null;
|
|
79515
80374
|
|
|
80375
|
+
@Field({ nullable: true })
|
|
80376
|
+
RequiredMetadataKeys?: string | null;
|
|
80377
|
+
|
|
79516
80378
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
79517
80379
|
OldValues___?: KeyValuePairInput[];
|
|
79518
80380
|
|
|
@@ -79643,6 +80505,9 @@ export class MJSearchScopeExternalIndex_ {
|
|
|
79643
80505
|
@Field()
|
|
79644
80506
|
_mj__UpdatedAt: Date;
|
|
79645
80507
|
|
|
80508
|
+
@Field({nullable: true, description: `JSON array of metadata key names the rendered MetadataFilter MUST constrain on for this lane to be considered safe, e.g. ["OrganizationID","ContentSourceID"]. Checked against the RENDERED filter at search time: if a key is missing the lane is SKIPPED rather than queried, because a partially-rendered filter silently widens the search. This also documents the ingest contract — these are the labels the writer must stamp on every document in the index, since a filter on a key that was never written either matches nothing or (on providers that ignore unknown keys) matches everything. NULL = no contract declared, which is the pre-migration behaviour.`})
|
|
80509
|
+
RequiredMetadataKeys?: string;
|
|
80510
|
+
|
|
79646
80511
|
@Field()
|
|
79647
80512
|
@MaxLength(200)
|
|
79648
80513
|
SearchScope: string;
|
|
@@ -79679,6 +80544,9 @@ export class CreateMJSearchScopeExternalIndexInput {
|
|
|
79679
80544
|
@Field({ nullable: true })
|
|
79680
80545
|
MetadataFilter: string | null;
|
|
79681
80546
|
|
|
80547
|
+
@Field({ nullable: true })
|
|
80548
|
+
RequiredMetadataKeys: string | null;
|
|
80549
|
+
|
|
79682
80550
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
79683
80551
|
RestoreContext___?: RestoreContextInput;
|
|
79684
80552
|
}
|
|
@@ -79710,6 +80578,9 @@ export class UpdateMJSearchScopeExternalIndexInput {
|
|
|
79710
80578
|
@Field({ nullable: true })
|
|
79711
80579
|
MetadataFilter?: string | null;
|
|
79712
80580
|
|
|
80581
|
+
@Field({ nullable: true })
|
|
80582
|
+
RequiredMetadataKeys?: string | null;
|
|
80583
|
+
|
|
79713
80584
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
79714
80585
|
OldValues___?: KeyValuePairInput[];
|
|
79715
80586
|
|
|
@@ -79834,6 +80705,16 @@ export class MJSearchScopePermission_ {
|
|
|
79834
80705
|
@Field()
|
|
79835
80706
|
_mj__UpdatedAt: Date;
|
|
79836
80707
|
|
|
80708
|
+
@Field({nullable: true, description: `Optional start of the window in which this grant applies. NULL = no lower bound. SearchScopePermission was the only member of this family without a time window, so temporary grants previously needed a bespoke mechanism.`})
|
|
80709
|
+
StartAt?: Date;
|
|
80710
|
+
|
|
80711
|
+
@Field({nullable: true, description: `Optional end of the window in which this grant applies. NULL = no upper bound.`})
|
|
80712
|
+
EndAt?: Date;
|
|
80713
|
+
|
|
80714
|
+
@Field({nullable: true, description: `Optional tenant this grant is limited to, matched against SearchContext.PrimaryScopeRecordID at search time and type-checkable against the scope's own PrimaryScopeEntityID. NULL = applies to every tenant, which is the pre-migration behaviour for all existing rows. Deliberately NOT called OrganizationID: MJ is domain-agnostic and a scope's primary scope may be a Company, Client or Practice, so this reuses the existing primary-scope concept rather than inventing a parallel tenancy column.`})
|
|
80715
|
+
@MaxLength(36)
|
|
80716
|
+
PrimaryScopeRecordID?: string;
|
|
80717
|
+
|
|
79837
80718
|
@Field()
|
|
79838
80719
|
@MaxLength(200)
|
|
79839
80720
|
SearchScope: string;
|
|
@@ -79868,6 +80749,15 @@ export class CreateMJSearchScopePermissionInput {
|
|
|
79868
80749
|
@Field({ nullable: true })
|
|
79869
80750
|
PermissionLevel?: string;
|
|
79870
80751
|
|
|
80752
|
+
@Field({ nullable: true })
|
|
80753
|
+
StartAt: Date | null;
|
|
80754
|
+
|
|
80755
|
+
@Field({ nullable: true })
|
|
80756
|
+
EndAt: Date | null;
|
|
80757
|
+
|
|
80758
|
+
@Field({ nullable: true })
|
|
80759
|
+
PrimaryScopeRecordID: string | null;
|
|
80760
|
+
|
|
79871
80761
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
79872
80762
|
RestoreContext___?: RestoreContextInput;
|
|
79873
80763
|
}
|
|
@@ -79893,6 +80783,15 @@ export class UpdateMJSearchScopePermissionInput {
|
|
|
79893
80783
|
@Field({ nullable: true })
|
|
79894
80784
|
PermissionLevel?: string;
|
|
79895
80785
|
|
|
80786
|
+
@Field({ nullable: true })
|
|
80787
|
+
StartAt?: Date | null;
|
|
80788
|
+
|
|
80789
|
+
@Field({ nullable: true })
|
|
80790
|
+
EndAt?: Date | null;
|
|
80791
|
+
|
|
80792
|
+
@Field({ nullable: true })
|
|
80793
|
+
PrimaryScopeRecordID?: string | null;
|
|
80794
|
+
|
|
79896
80795
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
79897
80796
|
OldValues___?: KeyValuePairInput[];
|
|
79898
80797
|
|
|
@@ -80631,6 +81530,9 @@ export class MJSearchScope_ {
|
|
|
80631
81530
|
@Field(() => [MJSearchExecutionLog_])
|
|
80632
81531
|
MJSearchExecutionLogs_SearchScopeIDArray: MJSearchExecutionLog_[]; // Link to MJSearchExecutionLogs
|
|
80633
81532
|
|
|
81533
|
+
@Field(() => [MJAISkillSearchScope_])
|
|
81534
|
+
MJAISkillSearchScopes_SearchScopeIDArray: MJAISkillSearchScope_[]; // Link to MJAISkillSearchScopes
|
|
81535
|
+
|
|
80634
81536
|
}
|
|
80635
81537
|
|
|
80636
81538
|
//****************************************************************************
|
|
@@ -80870,6 +81772,16 @@ export class MJSearchScopeResolver extends ResolverBase {
|
|
|
80870
81772
|
return result;
|
|
80871
81773
|
}
|
|
80872
81774
|
|
|
81775
|
+
@FieldResolver(() => [MJAISkillSearchScope_])
|
|
81776
|
+
async MJAISkillSearchScopes_SearchScopeIDArray(@Root() mjsearchscope_: MJSearchScope_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
81777
|
+
this.CheckUserReadPermissions('MJ: AI Skill Search Scopes', userPayload);
|
|
81778
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
81779
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAISkillSearchScopes')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Skill Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
81780
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjsearchscope_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
81781
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Skill Search Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
81782
|
+
return result;
|
|
81783
|
+
}
|
|
81784
|
+
|
|
80873
81785
|
@Mutation(() => MJSearchScope_)
|
|
80874
81786
|
async CreateMJSearchScope(
|
|
80875
81787
|
@Arg('input', () => CreateMJSearchScopeInput) input: CreateMJSearchScopeInput,
|