@memberjunction/server 6.1.0-edge.0 → 6.1.0-edge.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/exampleNewUserSubClass.js +1 -1
- package/dist/auth/exampleNewUserSubClass.js.map +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +9 -5
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/magicLink/MagicLinkService.js +1 -1
- package/dist/auth/magicLink/MagicLinkService.js.map +1 -1
- package/dist/auth/newUsers.js +1 -1
- package/dist/auth/newUsers.js.map +1 -1
- package/dist/context.js +2 -2
- package/dist/context.js.map +1 -1
- package/dist/generated/generated.d.ts +208 -646
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1123 -3773
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts +19 -3
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +51 -17
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +100 -42
- package/dist/index.js.map +1 -1
- package/dist/logging/secretRedactor.d.ts +9 -0
- package/dist/logging/secretRedactor.d.ts.map +1 -1
- package/dist/logging/secretRedactor.js +39 -0
- package/dist/logging/secretRedactor.js.map +1 -1
- package/dist/middleware/BaseServerMiddleware.d.ts +5 -0
- package/dist/middleware/BaseServerMiddleware.d.ts.map +1 -1
- package/dist/middleware/BaseServerMiddleware.js +5 -0
- package/dist/middleware/BaseServerMiddleware.js.map +1 -1
- package/dist/realtimeWidget/WidgetSessionService.js +1 -1
- package/dist/realtimeWidget/WidgetSessionService.js.map +1 -1
- package/dist/realtimeWidget/widgetGuestElevation.js +1 -1
- package/dist/realtimeWidget/widgetGuestElevation.js.map +1 -1
- package/dist/resolvers/ActionResolver.d.ts.map +1 -1
- package/dist/resolvers/ActionResolver.js +12 -0
- package/dist/resolvers/ActionResolver.js.map +1 -1
- package/dist/resolvers/ComponentRegistryResolver.js +1 -1
- package/dist/resolvers/ComponentRegistryResolver.js.map +1 -1
- package/dist/resolvers/EntityPermissionResolver.js +1 -1
- package/dist/resolvers/EntityPermissionResolver.js.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts +9 -0
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.js +3 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
- package/dist/resolvers/PotentialDuplicateRecordResolver.js +1 -1
- package/dist/resolvers/PotentialDuplicateRecordResolver.js.map +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts +10 -0
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts.map +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.js +5 -0
- package/dist/resolvers/RealtimeClientSessionResolver.js.map +1 -1
- package/dist/resolvers/SearchEntitiesResolver.js +1 -1
- package/dist/resolvers/SearchEntitiesResolver.js.map +1 -1
- package/dist/resolvers/SqlLoggingConfigResolver.d.ts.map +1 -1
- package/dist/resolvers/SqlLoggingConfigResolver.js +1 -1
- package/dist/resolvers/SqlLoggingConfigResolver.js.map +1 -1
- package/dist/resolvers/SyncRolesUsersResolver.js +2 -2
- package/dist/resolvers/SyncRolesUsersResolver.js.map +1 -1
- package/dist/resolvers/TaskGraphFrameResolver.d.ts +85 -0
- package/dist/resolvers/TaskGraphFrameResolver.d.ts.map +1 -0
- package/dist/resolvers/TaskGraphFrameResolver.js +163 -0
- package/dist/resolvers/TaskGraphFrameResolver.js.map +1 -0
- package/dist/resolvers/UserFavoriteResolver.js +1 -1
- package/dist/resolvers/UserFavoriteResolver.js.map +1 -1
- package/dist/rest/OAuthCallbackHandler.js +1 -1
- package/dist/rest/OAuthCallbackHandler.js.map +1 -1
- package/dist/rest/RESTEndpointHandler.d.ts +0 -4
- package/dist/rest/RESTEndpointHandler.d.ts.map +1 -1
- package/dist/rest/RESTEndpointHandler.js +1 -15
- package/dist/rest/RESTEndpointHandler.js.map +1 -1
- package/dist/rest/SignatureWebhookHandler.js +1 -1
- package/dist/rest/SignatureWebhookHandler.js.map +1 -1
- package/dist/services/DurableEntityActionTaskSubmitter.d.ts +26 -0
- package/dist/services/DurableEntityActionTaskSubmitter.d.ts.map +1 -0
- package/dist/services/DurableEntityActionTaskSubmitter.js +55 -0
- package/dist/services/DurableEntityActionTaskSubmitter.js.map +1 -0
- package/dist/services/ScheduledJobsService.js +1 -1
- package/dist/services/ScheduledJobsService.js.map +1 -1
- package/dist/services/StartTaskGraphDispatcher.d.ts +33 -0
- package/dist/services/StartTaskGraphDispatcher.d.ts.map +1 -0
- package/dist/services/StartTaskGraphDispatcher.js +46 -0
- package/dist/services/StartTaskGraphDispatcher.js.map +1 -0
- package/dist/services/TaskGraphActionRunner.d.ts +34 -0
- package/dist/services/TaskGraphActionRunner.d.ts.map +1 -0
- package/dist/services/TaskGraphActionRunner.js +95 -0
- package/dist/services/TaskGraphActionRunner.js.map +1 -0
- package/dist/services/TaskGraphAgentRunner.d.ts +28 -0
- package/dist/services/TaskGraphAgentRunner.d.ts.map +1 -0
- package/dist/services/TaskGraphAgentRunner.js +104 -0
- package/dist/services/TaskGraphAgentRunner.js.map +1 -0
- package/dist/services/TaskGraphContinuationDeliverer.d.ts +70 -0
- package/dist/services/TaskGraphContinuationDeliverer.d.ts.map +1 -0
- package/dist/services/TaskGraphContinuationDeliverer.js +162 -0
- package/dist/services/TaskGraphContinuationDeliverer.js.map +1 -0
- package/dist/services/TaskGraphPromptRunner.d.ts +31 -0
- package/dist/services/TaskGraphPromptRunner.d.ts.map +1 -0
- package/dist/services/TaskGraphPromptRunner.js +134 -0
- package/dist/services/TaskGraphPromptRunner.js.map +1 -0
- package/dist/services/TaskGraphProviderFactory.d.ts +39 -0
- package/dist/services/TaskGraphProviderFactory.d.ts.map +1 -0
- package/dist/services/TaskGraphProviderFactory.js +28 -0
- package/dist/services/TaskGraphProviderFactory.js.map +1 -0
- package/dist/telephony/RingCentralTelephonyService.js +1 -1
- package/dist/telephony/RingCentralTelephonyService.js.map +1 -1
- package/dist/telephony/TwilioTelephonyRouter.js +1 -1
- package/dist/telephony/TwilioTelephonyRouter.js.map +1 -1
- package/dist/telephony/VonageTelephonyRouter.js +1 -1
- package/dist/telephony/VonageTelephonyRouter.js.map +1 -1
- package/package.json +92 -89
- package/src/__tests__/RealtimeClientSessionResolver.test.ts +1 -1
- package/src/__tests__/ResolverBase.frozenRecordMapping.test.ts +133 -0
- package/src/__tests__/ResolverBase.transportMapping.test.ts +289 -0
- package/src/__tests__/SessionManager.test.ts +1 -1
- package/src/__tests__/TaskGraphContinuationDeliverer.test.ts +249 -0
- package/src/__tests__/TaskGraphFrameResolver.test.ts +136 -0
- package/src/__tests__/WidgetSessionService.test.ts +1 -1
- package/src/__tests__/databaseAbstraction.test.ts +1 -1
- package/src/__tests__/magicLinkService.provisionLog.test.ts +1 -1
- package/src/__tests__/resolverBase.rls.test.ts +3 -0
- package/src/__tests__/secretRedactor.failOpen.test.ts +135 -0
- package/src/__tests__/widgetGuestElevation.test.ts +1 -1
- package/src/auth/exampleNewUserSubClass.ts +1 -1
- package/src/auth/index.ts +10 -6
- package/src/auth/magicLink/MagicLinkService.ts +1 -1
- package/src/auth/newUsers.ts +1 -1
- package/src/context.ts +2 -2
- package/src/generated/generated.ts +955 -2735
- package/src/generic/ResolverBase.ts +52 -17
- package/src/index.ts +108 -43
- package/src/logging/secretRedactor.ts +43 -0
- package/src/middleware/BaseServerMiddleware.ts +5 -0
- package/src/realtimeWidget/WidgetSessionService.ts +1 -1
- package/src/realtimeWidget/widgetGuestElevation.ts +1 -1
- package/src/resolvers/ActionResolver.ts +13 -0
- package/src/resolvers/ComponentRegistryResolver.ts +1 -1
- package/src/resolvers/EntityPermissionResolver.ts +1 -1
- package/src/resolvers/IntegrationDiscoveryResolver.ts +12 -2
- package/src/resolvers/PotentialDuplicateRecordResolver.ts +1 -1
- package/src/resolvers/RealtimeClientSessionResolver.ts +13 -0
- package/src/resolvers/SearchEntitiesResolver.ts +1 -1
- package/src/resolvers/SqlLoggingConfigResolver.ts +1 -2
- package/src/resolvers/SyncRolesUsersResolver.ts +2 -2
- package/src/resolvers/TaskGraphFrameResolver.ts +160 -0
- package/src/resolvers/UserFavoriteResolver.ts +1 -1
- package/src/rest/OAuthCallbackHandler.ts +1 -1
- package/src/rest/RESTEndpointHandler.ts +1 -15
- package/src/rest/SignatureWebhookHandler.ts +1 -1
- package/src/services/DurableEntityActionTaskSubmitter.ts +78 -0
- package/src/services/ScheduledJobsService.ts +1 -1
- package/src/services/StartTaskGraphDispatcher.ts +78 -0
- package/src/services/TaskGraphActionRunner.ts +99 -0
- package/src/services/TaskGraphAgentRunner.ts +115 -0
- package/src/services/TaskGraphContinuationDeliverer.ts +181 -0
- package/src/services/TaskGraphPromptRunner.ts +144 -0
- package/src/services/TaskGraphProviderFactory.ts +53 -0
- package/src/telephony/RingCentralTelephonyService.ts +1 -1
- package/src/telephony/TwilioTelephonyRouter.ts +1 -1
- package/src/telephony/VonageTelephonyRouter.ts +1 -1
- package/dist/resolvers/ReportResolver.d.ts +0 -24
- package/dist/resolvers/ReportResolver.d.ts.map +0 -1
- package/dist/resolvers/ReportResolver.js +0 -198
- package/dist/resolvers/ReportResolver.js.map +0 -1
- package/dist/resolvers/TaskResolver.d.ts +0 -31
- package/dist/resolvers/TaskResolver.d.ts.map +0 -1
- package/dist/resolvers/TaskResolver.js +0 -157
- package/dist/resolvers/TaskResolver.js.map +0 -1
- package/dist/services/TaskOrchestrator.d.ts +0 -130
- package/dist/services/TaskOrchestrator.d.ts.map +0 -1
- package/dist/services/TaskOrchestrator.js +0 -692
- package/dist/services/TaskOrchestrator.js.map +0 -1
- package/src/resolvers/ReportResolver.ts +0 -165
- package/src/resolvers/TaskResolver.ts +0 -148
- package/src/resolvers/__tests__/ReportResolver.test.ts +0 -279
- package/src/services/TaskOrchestrator.ts +0 -873
|
@@ -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, 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,
|
|
21
|
+
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentCredentialEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentHarnessEntity, 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, 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, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, 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, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -1050,10 +1050,6 @@ export class MJActionExecutionLog_ {
|
|
|
1050
1050
|
@MaxLength(100)
|
|
1051
1051
|
User: string;
|
|
1052
1052
|
|
|
1053
|
-
@Field({nullable: true})
|
|
1054
|
-
@MaxLength(425)
|
|
1055
|
-
EntityAction?: string;
|
|
1056
|
-
|
|
1057
1053
|
@Field({nullable: true})
|
|
1058
1054
|
@MaxLength(255)
|
|
1059
1055
|
EntityActionInvocationType?: string;
|
|
@@ -1687,9 +1683,6 @@ export class MJActionParam_ {
|
|
|
1687
1683
|
@Field(() => [MJEntityActionParam_])
|
|
1688
1684
|
MJEntityActionParams_ActionParamIDArray: MJEntityActionParam_[]; // Link to MJEntityActionParams
|
|
1689
1685
|
|
|
1690
|
-
@Field(() => [MJScheduledActionParam_])
|
|
1691
|
-
MJScheduledActionParams_ActionParamIDArray: MJScheduledActionParam_[]; // Link to MJScheduledActionParams
|
|
1692
|
-
|
|
1693
1686
|
}
|
|
1694
1687
|
|
|
1695
1688
|
//****************************************************************************
|
|
@@ -1847,16 +1840,6 @@ export class MJActionParamResolver extends ResolverBase {
|
|
|
1847
1840
|
return result;
|
|
1848
1841
|
}
|
|
1849
1842
|
|
|
1850
|
-
@FieldResolver(() => [MJScheduledActionParam_])
|
|
1851
|
-
async MJScheduledActionParams_ActionParamIDArray(@Root() mjactionparam_: MJActionParam_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1852
|
-
this.CheckUserReadPermissions('MJ: Scheduled Action Params', userPayload);
|
|
1853
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1854
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledActionParams')} WHERE ${provider.QuoteIdentifier('ActionParamID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Action Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
1855
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjactionparam_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
1856
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Action Params', rows, this.GetUserFromPayload(userPayload));
|
|
1857
|
-
return result;
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
1843
|
@Mutation(() => MJActionParam_)
|
|
1861
1844
|
async CreateMJActionParam(
|
|
1862
1845
|
@Arg('input', () => CreateMJActionParamInput) input: CreateMJActionParamInput,
|
|
@@ -2196,9 +2179,6 @@ export class MJAction_ {
|
|
|
2196
2179
|
@Field(() => [MJMCPServerTool_])
|
|
2197
2180
|
MJMCPServerTools_GeneratedActionIDArray: MJMCPServerTool_[]; // Link to MJMCPServerTools
|
|
2198
2181
|
|
|
2199
|
-
@Field(() => [MJScheduledAction_])
|
|
2200
|
-
MJScheduledActions_ActionIDArray: MJScheduledAction_[]; // Link to MJScheduledActions
|
|
2201
|
-
|
|
2202
2182
|
@Field(() => [MJActionContext_])
|
|
2203
2183
|
MJActionContexts_ActionIDArray: MJActionContext_[]; // Link to MJActionContexts
|
|
2204
2184
|
|
|
@@ -2223,6 +2203,9 @@ export class MJAction_ {
|
|
|
2223
2203
|
@Field(() => [MJAISkillAction_])
|
|
2224
2204
|
MJAISkillActions_ActionIDArray: MJAISkillAction_[]; // Link to MJAISkillActions
|
|
2225
2205
|
|
|
2206
|
+
@Field(() => [MJTask_])
|
|
2207
|
+
MJTasks_ActionIDArray: MJTask_[]; // Link to MJTasks
|
|
2208
|
+
|
|
2226
2209
|
}
|
|
2227
2210
|
|
|
2228
2211
|
//****************************************************************************
|
|
@@ -2504,16 +2487,6 @@ export class MJActionResolver extends ResolverBase {
|
|
|
2504
2487
|
return result;
|
|
2505
2488
|
}
|
|
2506
2489
|
|
|
2507
|
-
@FieldResolver(() => [MJScheduledAction_])
|
|
2508
|
-
async MJScheduledActions_ActionIDArray(@Root() mjaction_: MJAction_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2509
|
-
this.CheckUserReadPermissions('MJ: Scheduled Actions', userPayload);
|
|
2510
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2511
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledActions')} WHERE ${provider.QuoteIdentifier('ActionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
2512
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjaction_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
2513
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Actions', rows, this.GetUserFromPayload(userPayload));
|
|
2514
|
-
return result;
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
2490
|
@FieldResolver(() => [MJActionContext_])
|
|
2518
2491
|
async MJActionContexts_ActionIDArray(@Root() mjaction_: MJAction_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2519
2492
|
this.CheckUserReadPermissions('MJ: Action Contexts', userPayload);
|
|
@@ -2594,6 +2567,16 @@ export class MJActionResolver extends ResolverBase {
|
|
|
2594
2567
|
return result;
|
|
2595
2568
|
}
|
|
2596
2569
|
|
|
2570
|
+
@FieldResolver(() => [MJTask_])
|
|
2571
|
+
async MJTasks_ActionIDArray(@Root() mjaction_: MJAction_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2572
|
+
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
2573
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2574
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTasks')} WHERE ${provider.QuoteIdentifier('ActionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
2575
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaction_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
2576
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows, this.GetUserFromPayload(userPayload));
|
|
2577
|
+
return result;
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2597
2580
|
@Mutation(() => MJAction_)
|
|
2598
2581
|
async CreateMJAction(
|
|
2599
2582
|
@Arg('input', () => CreateMJActionInput) input: CreateMJActionInput,
|
|
@@ -4331,6 +4314,204 @@ export class MJAIAgentConfigurationResolver extends ResolverBase {
|
|
|
4331
4314
|
|
|
4332
4315
|
}
|
|
4333
4316
|
|
|
4317
|
+
//****************************************************************************
|
|
4318
|
+
// ENTITY CLASS for MJ: AI Agent Credentials
|
|
4319
|
+
//****************************************************************************
|
|
4320
|
+
@ObjectType({ description: `Credentials an agent carries into its harness sandbox, injected as environment variables at session creation. Custody of the secret itself stays in Credential/CredentialEngine - this table records only the GRANT EDGE, in the same reviewable style as AIAgentAction. Distinct from AICredentialBinding, which is inference-selection plumbing for AIPromptRunner failover when MJ itself executes a prompt.` })
|
|
4321
|
+
export class MJAIAgentCredential_ {
|
|
4322
|
+
@Field()
|
|
4323
|
+
@MaxLength(36)
|
|
4324
|
+
ID: string;
|
|
4325
|
+
|
|
4326
|
+
@Field()
|
|
4327
|
+
@MaxLength(36)
|
|
4328
|
+
AgentID: string;
|
|
4329
|
+
|
|
4330
|
+
@Field()
|
|
4331
|
+
@MaxLength(36)
|
|
4332
|
+
CredentialID: string;
|
|
4333
|
+
|
|
4334
|
+
@Field({description: `What this credential is for. HarnessLLM is the API key the harness uses to reach its own model vendor; when absent, the runtime falls back to vendor-scoped AICredentialBinding rows for AIAgentHarness.AIVendorID. Integration is any other granted secret the agent needs inside the sandbox, such as a source-control or ticketing token.`})
|
|
4335
|
+
@MaxLength(50)
|
|
4336
|
+
Purpose: string;
|
|
4337
|
+
|
|
4338
|
+
@Field({nullable: true, description: `Environment variable the adapter sets inside the sandbox for this credential, e.g. ANTHROPIC_API_KEY or GITHUB_TOKEN. NULL lets the adapter choose, which is the normal case for HarnessLLM because the adapter knows its own vendor's variable name.`})
|
|
4339
|
+
@MaxLength(100)
|
|
4340
|
+
EnvVariableName?: string;
|
|
4341
|
+
|
|
4342
|
+
@Field(() => Int, {description: `Failover ordering within a Purpose - lower runs first. Lets an agent carry a primary and a standby key for the same purpose without a schema change.`})
|
|
4343
|
+
Priority: number;
|
|
4344
|
+
|
|
4345
|
+
@Field({description: `Whether this grant is live. Revoked withdraws the credential from future sessions while preserving the record that it was once granted, which is the point of auditing a credential grant at all. Pending stages a grant that is not yet in force.`})
|
|
4346
|
+
@MaxLength(20)
|
|
4347
|
+
Status: string;
|
|
4348
|
+
|
|
4349
|
+
@Field()
|
|
4350
|
+
_mj__CreatedAt: Date;
|
|
4351
|
+
|
|
4352
|
+
@Field()
|
|
4353
|
+
_mj__UpdatedAt: Date;
|
|
4354
|
+
|
|
4355
|
+
@Field({nullable: true})
|
|
4356
|
+
@MaxLength(255)
|
|
4357
|
+
Agent?: string;
|
|
4358
|
+
|
|
4359
|
+
@Field()
|
|
4360
|
+
@MaxLength(200)
|
|
4361
|
+
Credential: string;
|
|
4362
|
+
|
|
4363
|
+
}
|
|
4364
|
+
|
|
4365
|
+
//****************************************************************************
|
|
4366
|
+
// INPUT TYPE for MJ: AI Agent Credentials
|
|
4367
|
+
//****************************************************************************
|
|
4368
|
+
@InputType()
|
|
4369
|
+
export class CreateMJAIAgentCredentialInput {
|
|
4370
|
+
@Field({ nullable: true })
|
|
4371
|
+
ID?: string;
|
|
4372
|
+
|
|
4373
|
+
@Field({ nullable: true })
|
|
4374
|
+
AgentID?: string;
|
|
4375
|
+
|
|
4376
|
+
@Field({ nullable: true })
|
|
4377
|
+
CredentialID?: string;
|
|
4378
|
+
|
|
4379
|
+
@Field({ nullable: true })
|
|
4380
|
+
Purpose?: string;
|
|
4381
|
+
|
|
4382
|
+
@Field({ nullable: true })
|
|
4383
|
+
EnvVariableName: string | null;
|
|
4384
|
+
|
|
4385
|
+
@Field(() => Int, { nullable: true })
|
|
4386
|
+
Priority?: number;
|
|
4387
|
+
|
|
4388
|
+
@Field({ nullable: true })
|
|
4389
|
+
Status?: string;
|
|
4390
|
+
|
|
4391
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
4392
|
+
RestoreContext___?: RestoreContextInput;
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
|
|
4396
|
+
//****************************************************************************
|
|
4397
|
+
// INPUT TYPE for MJ: AI Agent Credentials
|
|
4398
|
+
//****************************************************************************
|
|
4399
|
+
@InputType()
|
|
4400
|
+
export class UpdateMJAIAgentCredentialInput {
|
|
4401
|
+
@Field()
|
|
4402
|
+
ID: string;
|
|
4403
|
+
|
|
4404
|
+
@Field({ nullable: true })
|
|
4405
|
+
AgentID?: string;
|
|
4406
|
+
|
|
4407
|
+
@Field({ nullable: true })
|
|
4408
|
+
CredentialID?: string;
|
|
4409
|
+
|
|
4410
|
+
@Field({ nullable: true })
|
|
4411
|
+
Purpose?: string;
|
|
4412
|
+
|
|
4413
|
+
@Field({ nullable: true })
|
|
4414
|
+
EnvVariableName?: string | null;
|
|
4415
|
+
|
|
4416
|
+
@Field(() => Int, { nullable: true })
|
|
4417
|
+
Priority?: number;
|
|
4418
|
+
|
|
4419
|
+
@Field({ nullable: true })
|
|
4420
|
+
Status?: string;
|
|
4421
|
+
|
|
4422
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
4423
|
+
OldValues___?: KeyValuePairInput[];
|
|
4424
|
+
|
|
4425
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
4426
|
+
RestoreContext___?: RestoreContextInput;
|
|
4427
|
+
}
|
|
4428
|
+
|
|
4429
|
+
//****************************************************************************
|
|
4430
|
+
// RESOLVER for MJ: AI Agent Credentials
|
|
4431
|
+
//****************************************************************************
|
|
4432
|
+
@ObjectType()
|
|
4433
|
+
export class RunMJAIAgentCredentialViewResult {
|
|
4434
|
+
@Field(() => [MJAIAgentCredential_])
|
|
4435
|
+
Results: MJAIAgentCredential_[];
|
|
4436
|
+
|
|
4437
|
+
@Field(() => String, {nullable: true})
|
|
4438
|
+
UserViewRunID?: string;
|
|
4439
|
+
|
|
4440
|
+
@Field(() => Int, {nullable: true})
|
|
4441
|
+
RowCount: number;
|
|
4442
|
+
|
|
4443
|
+
@Field(() => Int, {nullable: true})
|
|
4444
|
+
TotalRowCount: number;
|
|
4445
|
+
|
|
4446
|
+
@Field(() => Int, {nullable: true})
|
|
4447
|
+
ExecutionTime: number;
|
|
4448
|
+
|
|
4449
|
+
@Field({nullable: true})
|
|
4450
|
+
ErrorMessage?: string;
|
|
4451
|
+
|
|
4452
|
+
@Field(() => Boolean, {nullable: false})
|
|
4453
|
+
Success: boolean;
|
|
4454
|
+
}
|
|
4455
|
+
|
|
4456
|
+
@Resolver(MJAIAgentCredential_)
|
|
4457
|
+
export class MJAIAgentCredentialResolver extends ResolverBase {
|
|
4458
|
+
@Query(() => RunMJAIAgentCredentialViewResult)
|
|
4459
|
+
async RunMJAIAgentCredentialViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4460
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4461
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
4462
|
+
}
|
|
4463
|
+
|
|
4464
|
+
@Query(() => RunMJAIAgentCredentialViewResult)
|
|
4465
|
+
async RunMJAIAgentCredentialViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4466
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4467
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
4468
|
+
}
|
|
4469
|
+
|
|
4470
|
+
@Query(() => RunMJAIAgentCredentialViewResult)
|
|
4471
|
+
async RunMJAIAgentCredentialDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4472
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4473
|
+
input.EntityName = 'MJ: AI Agent Credentials';
|
|
4474
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
4475
|
+
}
|
|
4476
|
+
@Query(() => MJAIAgentCredential_, { nullable: true })
|
|
4477
|
+
async MJAIAgentCredential(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentCredential_ | null> {
|
|
4478
|
+
this.CheckUserReadPermissions('MJ: AI Agent Credentials', userPayload);
|
|
4479
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4480
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentCredentials')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Credentials', userPayload, EntityPermissionType.Read, 'AND');
|
|
4481
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
4482
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Credentials', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
4483
|
+
return result;
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4486
|
+
@Mutation(() => MJAIAgentCredential_)
|
|
4487
|
+
async CreateMJAIAgentCredential(
|
|
4488
|
+
@Arg('input', () => CreateMJAIAgentCredentialInput) input: CreateMJAIAgentCredentialInput,
|
|
4489
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
4490
|
+
@PubSub() pubSub: PubSubEngine
|
|
4491
|
+
) {
|
|
4492
|
+
const provider = GetReadWriteProvider(providers);
|
|
4493
|
+
return this.CreateRecord('MJ: AI Agent Credentials', input, provider, userPayload, pubSub)
|
|
4494
|
+
}
|
|
4495
|
+
|
|
4496
|
+
@Mutation(() => MJAIAgentCredential_)
|
|
4497
|
+
async UpdateMJAIAgentCredential(
|
|
4498
|
+
@Arg('input', () => UpdateMJAIAgentCredentialInput) input: UpdateMJAIAgentCredentialInput,
|
|
4499
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
4500
|
+
@PubSub() pubSub: PubSubEngine
|
|
4501
|
+
) {
|
|
4502
|
+
const provider = GetReadWriteProvider(providers);
|
|
4503
|
+
return this.UpdateRecord('MJ: AI Agent Credentials', input, provider, userPayload, pubSub);
|
|
4504
|
+
}
|
|
4505
|
+
|
|
4506
|
+
@Mutation(() => MJAIAgentCredential_)
|
|
4507
|
+
async DeleteMJAIAgentCredential(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4508
|
+
const provider = GetReadWriteProvider(providers);
|
|
4509
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
4510
|
+
return this.DeleteRecord('MJ: AI Agent Credentials', key, options, provider, userPayload, pubSub);
|
|
4511
|
+
}
|
|
4512
|
+
|
|
4513
|
+
}
|
|
4514
|
+
|
|
4334
4515
|
//****************************************************************************
|
|
4335
4516
|
// ENTITY CLASS for MJ: AI Agent Data Sources
|
|
4336
4517
|
//****************************************************************************
|
|
@@ -5012,6 +5193,233 @@ export class MJAIAgentExampleResolver extends ResolverBase {
|
|
|
5012
5193
|
|
|
5013
5194
|
}
|
|
5014
5195
|
|
|
5196
|
+
//****************************************************************************
|
|
5197
|
+
// ENTITY CLASS for MJ: AI Agent Harnesses
|
|
5198
|
+
//****************************************************************************
|
|
5199
|
+
@ObjectType({ description: `Registry of external agent harnesses this installation can launch as the reasoning substrate for an MJ agent (Claude Code, Codex CLI, OpenCode, Pi, Cline). A row makes a harness AVAILABLE; an agent opts in by naming it in AIAgent.TypeConfiguration. Empty table = no agent can run on a harness, which is the pre-migration behaviour.` })
|
|
5200
|
+
export class MJAIAgentHarness_ {
|
|
5201
|
+
@Field()
|
|
5202
|
+
@MaxLength(36)
|
|
5203
|
+
ID: string;
|
|
5204
|
+
|
|
5205
|
+
@Field({description: `Unique name of the harness, e.g. Claude Code, Codex CLI, OpenCode, Pi, Cline. This is a LOOKUP KEY, not a label: an agent selects its harness by this name in AIAgent.TypeConfiguration ("harnessName"), so duplicates would make selection ambiguous at run time.`})
|
|
5206
|
+
@MaxLength(100)
|
|
5207
|
+
Name: string;
|
|
5208
|
+
|
|
5209
|
+
@Field({nullable: true, description: `Human-readable description of the harness - what it is good at, what it requires to be installed, and any deployment caveats.`})
|
|
5210
|
+
Description?: string;
|
|
5211
|
+
|
|
5212
|
+
@Field({description: `ClassFactory registration key for the BaseHarnessAdapter subclass that drives this harness (e.g. ClaudeCodeAdapter, CodexAdapter, StdioJsonAdapter). Resolved at run time, so a customer can register a proprietary adapter without forking core - the same extension mechanism AI model vendor drivers use.`})
|
|
5213
|
+
@MaxLength(255)
|
|
5214
|
+
DriverClass: string;
|
|
5215
|
+
|
|
5216
|
+
@Field({nullable: true, description: `Path to the harness CLI binary or entry point when the adapter shells out. NULL when the adapter embeds a vendor SDK and therefore launches nothing.`})
|
|
5217
|
+
@MaxLength(500)
|
|
5218
|
+
ExecutablePath?: string;
|
|
5219
|
+
|
|
5220
|
+
@Field({nullable: true})
|
|
5221
|
+
@MaxLength(36)
|
|
5222
|
+
AIVendorID?: string;
|
|
5223
|
+
|
|
5224
|
+
@Field({nullable: true})
|
|
5225
|
+
@MaxLength(36)
|
|
5226
|
+
AIModelID?: string;
|
|
5227
|
+
|
|
5228
|
+
@Field({nullable: true, description: `Default model passed to the harness where the harness supports being told which model to use. NULL leaves the harness on its own default.`})
|
|
5229
|
+
@MaxLength(255)
|
|
5230
|
+
DefaultModel?: string;
|
|
5231
|
+
|
|
5232
|
+
@Field({nullable: true, description: `Strongly-typed JSON of what this harness can do (the IHarnessCapabilitySettings interface, bound via JSONType metadata): session continuity (SessionResume), turn-protocol support (StructuredOutput), in-sandbox permission interception (PermissionHooks), and whether the harness can act as an MCP client for the read-only loopback (McpClient). The runtime gates behaviour on these - when SessionResume is false the adapter must replay prior context into a fresh invocation each turn, which costs extra tokens and has to be budgeted for. Held as JSON so a new capability needs no schema migration, just an added property on the interface. NULL/omitted = not supported.`})
|
|
5233
|
+
CapabilitySettings?: string;
|
|
5234
|
+
|
|
5235
|
+
@Field({description: `Whether this harness may be launched. Inactive keeps the row and its history for auditing while taking the harness out of service - preferable to deleting it, which would orphan agents configured to use it.`})
|
|
5236
|
+
@MaxLength(20)
|
|
5237
|
+
Status: string;
|
|
5238
|
+
|
|
5239
|
+
@Field()
|
|
5240
|
+
_mj__CreatedAt: Date;
|
|
5241
|
+
|
|
5242
|
+
@Field()
|
|
5243
|
+
_mj__UpdatedAt: Date;
|
|
5244
|
+
|
|
5245
|
+
@Field({nullable: true})
|
|
5246
|
+
@MaxLength(50)
|
|
5247
|
+
AIVendor?: string;
|
|
5248
|
+
|
|
5249
|
+
@Field({nullable: true})
|
|
5250
|
+
@MaxLength(50)
|
|
5251
|
+
AIModel?: string;
|
|
5252
|
+
|
|
5253
|
+
}
|
|
5254
|
+
|
|
5255
|
+
//****************************************************************************
|
|
5256
|
+
// INPUT TYPE for MJ: AI Agent Harnesses
|
|
5257
|
+
//****************************************************************************
|
|
5258
|
+
@InputType()
|
|
5259
|
+
export class CreateMJAIAgentHarnessInput {
|
|
5260
|
+
@Field({ nullable: true })
|
|
5261
|
+
ID?: string;
|
|
5262
|
+
|
|
5263
|
+
@Field({ nullable: true })
|
|
5264
|
+
Name?: string;
|
|
5265
|
+
|
|
5266
|
+
@Field({ nullable: true })
|
|
5267
|
+
Description: string | null;
|
|
5268
|
+
|
|
5269
|
+
@Field({ nullable: true })
|
|
5270
|
+
DriverClass?: string;
|
|
5271
|
+
|
|
5272
|
+
@Field({ nullable: true })
|
|
5273
|
+
ExecutablePath: string | null;
|
|
5274
|
+
|
|
5275
|
+
@Field({ nullable: true })
|
|
5276
|
+
AIVendorID: string | null;
|
|
5277
|
+
|
|
5278
|
+
@Field({ nullable: true })
|
|
5279
|
+
AIModelID: string | null;
|
|
5280
|
+
|
|
5281
|
+
@Field({ nullable: true })
|
|
5282
|
+
DefaultModel: string | null;
|
|
5283
|
+
|
|
5284
|
+
@Field({ nullable: true })
|
|
5285
|
+
CapabilitySettings: string | null;
|
|
5286
|
+
|
|
5287
|
+
@Field({ nullable: true })
|
|
5288
|
+
Status?: string;
|
|
5289
|
+
|
|
5290
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
5291
|
+
RestoreContext___?: RestoreContextInput;
|
|
5292
|
+
}
|
|
5293
|
+
|
|
5294
|
+
|
|
5295
|
+
//****************************************************************************
|
|
5296
|
+
// INPUT TYPE for MJ: AI Agent Harnesses
|
|
5297
|
+
//****************************************************************************
|
|
5298
|
+
@InputType()
|
|
5299
|
+
export class UpdateMJAIAgentHarnessInput {
|
|
5300
|
+
@Field()
|
|
5301
|
+
ID: string;
|
|
5302
|
+
|
|
5303
|
+
@Field({ nullable: true })
|
|
5304
|
+
Name?: string;
|
|
5305
|
+
|
|
5306
|
+
@Field({ nullable: true })
|
|
5307
|
+
Description?: string | null;
|
|
5308
|
+
|
|
5309
|
+
@Field({ nullable: true })
|
|
5310
|
+
DriverClass?: string;
|
|
5311
|
+
|
|
5312
|
+
@Field({ nullable: true })
|
|
5313
|
+
ExecutablePath?: string | null;
|
|
5314
|
+
|
|
5315
|
+
@Field({ nullable: true })
|
|
5316
|
+
AIVendorID?: string | null;
|
|
5317
|
+
|
|
5318
|
+
@Field({ nullable: true })
|
|
5319
|
+
AIModelID?: string | null;
|
|
5320
|
+
|
|
5321
|
+
@Field({ nullable: true })
|
|
5322
|
+
DefaultModel?: string | null;
|
|
5323
|
+
|
|
5324
|
+
@Field({ nullable: true })
|
|
5325
|
+
CapabilitySettings?: string | null;
|
|
5326
|
+
|
|
5327
|
+
@Field({ nullable: true })
|
|
5328
|
+
Status?: string;
|
|
5329
|
+
|
|
5330
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
5331
|
+
OldValues___?: KeyValuePairInput[];
|
|
5332
|
+
|
|
5333
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
5334
|
+
RestoreContext___?: RestoreContextInput;
|
|
5335
|
+
}
|
|
5336
|
+
|
|
5337
|
+
//****************************************************************************
|
|
5338
|
+
// RESOLVER for MJ: AI Agent Harnesses
|
|
5339
|
+
//****************************************************************************
|
|
5340
|
+
@ObjectType()
|
|
5341
|
+
export class RunMJAIAgentHarnessViewResult {
|
|
5342
|
+
@Field(() => [MJAIAgentHarness_])
|
|
5343
|
+
Results: MJAIAgentHarness_[];
|
|
5344
|
+
|
|
5345
|
+
@Field(() => String, {nullable: true})
|
|
5346
|
+
UserViewRunID?: string;
|
|
5347
|
+
|
|
5348
|
+
@Field(() => Int, {nullable: true})
|
|
5349
|
+
RowCount: number;
|
|
5350
|
+
|
|
5351
|
+
@Field(() => Int, {nullable: true})
|
|
5352
|
+
TotalRowCount: number;
|
|
5353
|
+
|
|
5354
|
+
@Field(() => Int, {nullable: true})
|
|
5355
|
+
ExecutionTime: number;
|
|
5356
|
+
|
|
5357
|
+
@Field({nullable: true})
|
|
5358
|
+
ErrorMessage?: string;
|
|
5359
|
+
|
|
5360
|
+
@Field(() => Boolean, {nullable: false})
|
|
5361
|
+
Success: boolean;
|
|
5362
|
+
}
|
|
5363
|
+
|
|
5364
|
+
@Resolver(MJAIAgentHarness_)
|
|
5365
|
+
export class MJAIAgentHarnessResolver extends ResolverBase {
|
|
5366
|
+
@Query(() => RunMJAIAgentHarnessViewResult)
|
|
5367
|
+
async RunMJAIAgentHarnessViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5368
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5369
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
5370
|
+
}
|
|
5371
|
+
|
|
5372
|
+
@Query(() => RunMJAIAgentHarnessViewResult)
|
|
5373
|
+
async RunMJAIAgentHarnessViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5374
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5375
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
5376
|
+
}
|
|
5377
|
+
|
|
5378
|
+
@Query(() => RunMJAIAgentHarnessViewResult)
|
|
5379
|
+
async RunMJAIAgentHarnessDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5380
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5381
|
+
input.EntityName = 'MJ: AI Agent Harnesses';
|
|
5382
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
5383
|
+
}
|
|
5384
|
+
@Query(() => MJAIAgentHarness_, { nullable: true })
|
|
5385
|
+
async MJAIAgentHarness(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentHarness_ | null> {
|
|
5386
|
+
this.CheckUserReadPermissions('MJ: AI Agent Harnesses', userPayload);
|
|
5387
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5388
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentHarnesses')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Harnesses', userPayload, EntityPermissionType.Read, 'AND');
|
|
5389
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5390
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Harnesses', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
5391
|
+
return result;
|
|
5392
|
+
}
|
|
5393
|
+
|
|
5394
|
+
@Mutation(() => MJAIAgentHarness_)
|
|
5395
|
+
async CreateMJAIAgentHarness(
|
|
5396
|
+
@Arg('input', () => CreateMJAIAgentHarnessInput) input: CreateMJAIAgentHarnessInput,
|
|
5397
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5398
|
+
@PubSub() pubSub: PubSubEngine
|
|
5399
|
+
) {
|
|
5400
|
+
const provider = GetReadWriteProvider(providers);
|
|
5401
|
+
return this.CreateRecord('MJ: AI Agent Harnesses', input, provider, userPayload, pubSub)
|
|
5402
|
+
}
|
|
5403
|
+
|
|
5404
|
+
@Mutation(() => MJAIAgentHarness_)
|
|
5405
|
+
async UpdateMJAIAgentHarness(
|
|
5406
|
+
@Arg('input', () => UpdateMJAIAgentHarnessInput) input: UpdateMJAIAgentHarnessInput,
|
|
5407
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5408
|
+
@PubSub() pubSub: PubSubEngine
|
|
5409
|
+
) {
|
|
5410
|
+
const provider = GetReadWriteProvider(providers);
|
|
5411
|
+
return this.UpdateRecord('MJ: AI Agent Harnesses', input, provider, userPayload, pubSub);
|
|
5412
|
+
}
|
|
5413
|
+
|
|
5414
|
+
@Mutation(() => MJAIAgentHarness_)
|
|
5415
|
+
async DeleteMJAIAgentHarness(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5416
|
+
const provider = GetReadWriteProvider(providers);
|
|
5417
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
5418
|
+
return this.DeleteRecord('MJ: AI Agent Harnesses', key, options, provider, userPayload, pubSub);
|
|
5419
|
+
}
|
|
5420
|
+
|
|
5421
|
+
}
|
|
5422
|
+
|
|
5015
5423
|
//****************************************************************************
|
|
5016
5424
|
// ENTITY CLASS for MJ: AI Agent Learning Cycles
|
|
5017
5425
|
//****************************************************************************
|
|
@@ -7126,6 +7534,10 @@ export class MJAIAgentRequest_ {
|
|
|
7126
7534
|
@MaxLength(20)
|
|
7127
7535
|
ResponseSource?: string;
|
|
7128
7536
|
|
|
7537
|
+
@Field({nullable: true, description: `The workflow step (MJ: Tasks row) waiting on this request, when it came from a task graph rather than from a running agent. Distinct from OriginatingAgentRunStepID: a task graph outlives the agent run that submitted it, so the task — not the run — is what resumes when a person answers. NULL for requests raised by a run directly.`})
|
|
7538
|
+
@MaxLength(36)
|
|
7539
|
+
OriginatingTaskID?: string;
|
|
7540
|
+
|
|
7129
7541
|
@Field({nullable: true})
|
|
7130
7542
|
@MaxLength(255)
|
|
7131
7543
|
Agent?: string;
|
|
@@ -7154,6 +7566,10 @@ export class MJAIAgentRequest_ {
|
|
|
7154
7566
|
@MaxLength(255)
|
|
7155
7567
|
ResumingAgentRun?: string;
|
|
7156
7568
|
|
|
7569
|
+
@Field({nullable: true})
|
|
7570
|
+
@MaxLength(255)
|
|
7571
|
+
OriginatingTask?: string;
|
|
7572
|
+
|
|
7157
7573
|
}
|
|
7158
7574
|
|
|
7159
7575
|
//****************************************************************************
|
|
@@ -7218,6 +7634,9 @@ export class CreateMJAIAgentRequestInput {
|
|
|
7218
7634
|
@Field({ nullable: true })
|
|
7219
7635
|
ResponseSource: string | null;
|
|
7220
7636
|
|
|
7637
|
+
@Field({ nullable: true })
|
|
7638
|
+
OriginatingTaskID: string | null;
|
|
7639
|
+
|
|
7221
7640
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
7222
7641
|
RestoreContext___?: RestoreContextInput;
|
|
7223
7642
|
}
|
|
@@ -7285,6 +7704,9 @@ export class UpdateMJAIAgentRequestInput {
|
|
|
7285
7704
|
@Field({ nullable: true })
|
|
7286
7705
|
ResponseSource?: string | null;
|
|
7287
7706
|
|
|
7707
|
+
@Field({ nullable: true })
|
|
7708
|
+
OriginatingTaskID?: string | null;
|
|
7709
|
+
|
|
7288
7710
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
7289
7711
|
OldValues___?: KeyValuePairInput[];
|
|
7290
7712
|
|
|
@@ -8216,6 +8638,13 @@ each time the agent processes a prompt step.`})
|
|
|
8216
8638
|
@Field(() => Boolean, {description: `1 when this run executed under plan mode (whether via the per-request planMode flag or the agent's RequirePlanMode setting). Drives plan-mode indicators in the run UX and supports plan-drift auditing (comparing the approved plan against the steps that actually executed).`})
|
|
8217
8639
|
PlanMode: boolean;
|
|
8218
8640
|
|
|
8641
|
+
@Field({nullable: true, description: `Session identifier reported by the external harness backing this run. Kept for two reasons that outlive the run: resuming the session across turns, and correlating this run with the vendor's own session logs when diagnosing behaviour INSIDE the sandbox, where MJ's audit trail necessarily stops at the turn boundary. NULL for every run not backed by a harness.`})
|
|
8642
|
+
@MaxLength(255)
|
|
8643
|
+
ExternalSessionID?: string;
|
|
8644
|
+
|
|
8645
|
+
@Field(() => Int, {description: `How many task-graph continuations led to this run. 0 (the default, and the value every ordinary run carries) means the run was not started by a finished graph. A run started because a graph declared continuation='reinvoke' records its source graph's depth plus one, and any graph that run subsequently submits inherits that value — which is what allows MAX_REINVOKE_DEPTH to bound a chain of graph-reinvokes-agent-emits-graph. Without a durable value here the cap could never fire, because a reinvoked agent has no other way to learn it was a continuation. Distinct from ParentRunID, which tracks sub-agent lineage within a single turn; a continuation is a NEW top-level turn caused by work that already completed.`})
|
|
8646
|
+
ContinuationDepth: number;
|
|
8647
|
+
|
|
8219
8648
|
@Field({nullable: true})
|
|
8220
8649
|
@MaxLength(255)
|
|
8221
8650
|
Agent?: string;
|
|
@@ -8308,6 +8737,9 @@ each time the agent processes a prompt step.`})
|
|
|
8308
8737
|
@Field(() => [MJExperimentSession_])
|
|
8309
8738
|
MJExperimentSessions_AgentRunIDArray: MJExperimentSession_[]; // Link to MJExperimentSessions
|
|
8310
8739
|
|
|
8740
|
+
@Field(() => [MJTask_])
|
|
8741
|
+
MJTasks_AgentRunIDArray: MJTask_[]; // Link to MJTasks
|
|
8742
|
+
|
|
8311
8743
|
@Field(() => [MJUserRoutineRun_])
|
|
8312
8744
|
MJUserRoutineRuns_AgentRunIDArray: MJUserRoutineRun_[]; // Link to MJUserRoutineRuns
|
|
8313
8745
|
|
|
@@ -8465,6 +8897,12 @@ export class CreateMJAIAgentRunInput {
|
|
|
8465
8897
|
@Field(() => Boolean, { nullable: true })
|
|
8466
8898
|
PlanMode?: boolean;
|
|
8467
8899
|
|
|
8900
|
+
@Field({ nullable: true })
|
|
8901
|
+
ExternalSessionID: string | null;
|
|
8902
|
+
|
|
8903
|
+
@Field(() => Int, { nullable: true })
|
|
8904
|
+
ContinuationDepth?: number;
|
|
8905
|
+
|
|
8468
8906
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
8469
8907
|
RestoreContext___?: RestoreContextInput;
|
|
8470
8908
|
}
|
|
@@ -8622,6 +9060,12 @@ export class UpdateMJAIAgentRunInput {
|
|
|
8622
9060
|
@Field(() => Boolean, { nullable: true })
|
|
8623
9061
|
PlanMode?: boolean;
|
|
8624
9062
|
|
|
9063
|
+
@Field({ nullable: true })
|
|
9064
|
+
ExternalSessionID?: string | null;
|
|
9065
|
+
|
|
9066
|
+
@Field(() => Int, { nullable: true })
|
|
9067
|
+
ContinuationDepth?: number;
|
|
9068
|
+
|
|
8625
9069
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
8626
9070
|
OldValues___?: KeyValuePairInput[];
|
|
8627
9071
|
|
|
@@ -8806,6 +9250,16 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
8806
9250
|
return result;
|
|
8807
9251
|
}
|
|
8808
9252
|
|
|
9253
|
+
@FieldResolver(() => [MJTask_])
|
|
9254
|
+
async MJTasks_AgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9255
|
+
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
9256
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9257
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTasks')} WHERE ${provider.QuoteIdentifier('AgentRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
9258
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiagentrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
9259
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows, this.GetUserFromPayload(userPayload));
|
|
9260
|
+
return result;
|
|
9261
|
+
}
|
|
9262
|
+
|
|
8809
9263
|
@FieldResolver(() => [MJUserRoutineRun_])
|
|
8810
9264
|
async MJUserRoutineRuns_AgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8811
9265
|
this.CheckUserReadPermissions('MJ: User Routine Runs', userPayload);
|
|
@@ -11729,6 +12183,9 @@ if this limit is exceeded.`})
|
|
|
11729
12183
|
@Field(() => [MJAISkillSubAgent_])
|
|
11730
12184
|
MJAISkillSubAgents_SubAgentIDArray: MJAISkillSubAgent_[]; // Link to MJAISkillSubAgents
|
|
11731
12185
|
|
|
12186
|
+
@Field(() => [MJAIAgentCredential_])
|
|
12187
|
+
MJAIAgentCredentials_AgentIDArray: MJAIAgentCredential_[]; // Link to MJAIAgentCredentials
|
|
12188
|
+
|
|
11732
12189
|
}
|
|
11733
12190
|
|
|
11734
12191
|
//****************************************************************************
|
|
@@ -12648,6 +13105,16 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
12648
13105
|
return result;
|
|
12649
13106
|
}
|
|
12650
13107
|
|
|
13108
|
+
@FieldResolver(() => [MJAIAgentCredential_])
|
|
13109
|
+
async MJAIAgentCredentials_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13110
|
+
this.CheckUserReadPermissions('MJ: AI Agent Credentials', userPayload);
|
|
13111
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13112
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentCredentials')} WHERE ${provider.QuoteIdentifier('AgentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Credentials', userPayload, EntityPermissionType.Read, 'AND');
|
|
13113
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiagent_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13114
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Credentials', rows, this.GetUserFromPayload(userPayload));
|
|
13115
|
+
return result;
|
|
13116
|
+
}
|
|
13117
|
+
|
|
12651
13118
|
@Mutation(() => MJAIAgent_)
|
|
12652
13119
|
async CreateMJAIAgent(
|
|
12653
13120
|
@Arg('input', () => CreateMJAIAgentInput) input: CreateMJAIAgentInput,
|
|
@@ -16063,6 +16530,9 @@ export class MJAIModelType_ {
|
|
|
16063
16530
|
@Field({nullable: true, description: `Default fallback instruction text used when PrefillFallbackMode is SystemInstruction and the provider does not support native prefill. Use {{prefill}} as a placeholder for the actual prefill text. Example: "IMPORTANT: You must begin your response with exactly: {{prefill}}". Individual AI Model Vendor records can override this. If null, a generic fallback is used.`})
|
|
16064
16531
|
PrefillFallbackText?: string;
|
|
16065
16532
|
|
|
16533
|
+
@Field({nullable: true, description: `Type-wide default of the per-modality model-configuration bag (JSON, IAIModelConfiguration shape: LLM / Realtime / Vision / Audio sections). Base layer of the ModelConfiguration cascade — AIModel and AIModelVendor rows inherit from it per key and may override. NULL = contributes nothing.`})
|
|
16534
|
+
ModelConfiguration?: string;
|
|
16535
|
+
|
|
16066
16536
|
@Field()
|
|
16067
16537
|
@MaxLength(50)
|
|
16068
16538
|
DefaultInputModality: string;
|
|
@@ -16105,6 +16575,9 @@ export class CreateMJAIModelTypeInput {
|
|
|
16105
16575
|
@Field({ nullable: true })
|
|
16106
16576
|
PrefillFallbackText: string | null;
|
|
16107
16577
|
|
|
16578
|
+
@Field({ nullable: true })
|
|
16579
|
+
ModelConfiguration: string | null;
|
|
16580
|
+
|
|
16108
16581
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
16109
16582
|
RestoreContext___?: RestoreContextInput;
|
|
16110
16583
|
}
|
|
@@ -16136,6 +16609,9 @@ export class UpdateMJAIModelTypeInput {
|
|
|
16136
16609
|
@Field({ nullable: true })
|
|
16137
16610
|
PrefillFallbackText?: string | null;
|
|
16138
16611
|
|
|
16612
|
+
@Field({ nullable: true })
|
|
16613
|
+
ModelConfiguration?: string | null;
|
|
16614
|
+
|
|
16139
16615
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
16140
16616
|
OldValues___?: KeyValuePairInput[];
|
|
16141
16617
|
|
|
@@ -16327,6 +16803,9 @@ export class MJAIModelVendor_ {
|
|
|
16327
16803
|
@Field({nullable: true, description: `Model-specific fallback instruction text used when PrefillFallbackMode is SystemInstruction and the provider does not support native prefill. Overrides the AI Model Type default. Use {{prefill}} as a placeholder. Allows tuning the fallback instruction per model since different models respond better to different phrasing.`})
|
|
16328
16804
|
PrefillFallbackText?: string;
|
|
16329
16805
|
|
|
16806
|
+
@Field({nullable: true, description: `Most-specific layer of the per-modality model-configuration bag (JSON, IAIModelConfiguration shape) — configuration for THIS model on THIS provider. Deep-merges per key over the model and type layers. NULL = inherit the merged model/type configuration unchanged.`})
|
|
16807
|
+
ModelConfiguration?: string;
|
|
16808
|
+
|
|
16330
16809
|
@Field()
|
|
16331
16810
|
@MaxLength(50)
|
|
16332
16811
|
Model: string;
|
|
@@ -16397,6 +16876,9 @@ export class CreateMJAIModelVendorInput {
|
|
|
16397
16876
|
@Field({ nullable: true })
|
|
16398
16877
|
PrefillFallbackText: string | null;
|
|
16399
16878
|
|
|
16879
|
+
@Field({ nullable: true })
|
|
16880
|
+
ModelConfiguration: string | null;
|
|
16881
|
+
|
|
16400
16882
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
16401
16883
|
RestoreContext___?: RestoreContextInput;
|
|
16402
16884
|
}
|
|
@@ -16455,6 +16937,9 @@ export class UpdateMJAIModelVendorInput {
|
|
|
16455
16937
|
@Field({ nullable: true })
|
|
16456
16938
|
PrefillFallbackText?: string | null;
|
|
16457
16939
|
|
|
16940
|
+
@Field({ nullable: true })
|
|
16941
|
+
ModelConfiguration?: string | null;
|
|
16942
|
+
|
|
16458
16943
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
16459
16944
|
OldValues___?: KeyValuePairInput[];
|
|
16460
16945
|
|
|
@@ -16612,6 +17097,9 @@ export class MJAIModel_ {
|
|
|
16612
17097
|
@Field({nullable: true, description: `Model-level fallback instruction text used when PrefillFallbackMode is SystemInstruction and the provider does not support native prefill. Overrides the AI Model Type default, can be further overridden per-vendor in AI Model Vendor. Use {{prefill}} as a placeholder.`})
|
|
16613
17098
|
PrefillFallbackText?: string;
|
|
16614
17099
|
|
|
17100
|
+
@Field({nullable: true, description: `Per-model layer of the per-modality model-configuration bag (JSON, IAIModelConfiguration shape). Deep-merges per key over the AIModelType default; AIModelVendor rows may override per key on top. NULL = inherit the type default unchanged.`})
|
|
17101
|
+
ModelConfiguration?: string;
|
|
17102
|
+
|
|
16615
17103
|
@Field()
|
|
16616
17104
|
@MaxLength(50)
|
|
16617
17105
|
AIModelType: string;
|
|
@@ -16720,6 +17208,9 @@ export class MJAIModel_ {
|
|
|
16720
17208
|
@Field(() => [MJScopedPromptConfig_])
|
|
16721
17209
|
MJScopedPromptConfigs_ModelIDArray: MJScopedPromptConfig_[]; // Link to MJScopedPromptConfigs
|
|
16722
17210
|
|
|
17211
|
+
@Field(() => [MJAIAgentHarness_])
|
|
17212
|
+
MJAIAgentHarnesses_AIModelIDArray: MJAIAgentHarness_[]; // Link to MJAIAgentHarnesses
|
|
17213
|
+
|
|
16723
17214
|
}
|
|
16724
17215
|
|
|
16725
17216
|
//****************************************************************************
|
|
@@ -16766,6 +17257,9 @@ export class CreateMJAIModelInput {
|
|
|
16766
17257
|
@Field({ nullable: true })
|
|
16767
17258
|
PrefillFallbackText: string | null;
|
|
16768
17259
|
|
|
17260
|
+
@Field({ nullable: true })
|
|
17261
|
+
ModelConfiguration: string | null;
|
|
17262
|
+
|
|
16769
17263
|
@Field({ nullable: true })
|
|
16770
17264
|
Vendor: string | null;
|
|
16771
17265
|
|
|
@@ -16836,6 +17330,9 @@ export class UpdateMJAIModelInput {
|
|
|
16836
17330
|
@Field({ nullable: true })
|
|
16837
17331
|
PrefillFallbackText?: string | null;
|
|
16838
17332
|
|
|
17333
|
+
@Field({ nullable: true })
|
|
17334
|
+
ModelConfiguration?: string | null;
|
|
17335
|
+
|
|
16839
17336
|
@Field({ nullable: true })
|
|
16840
17337
|
Vendor?: string | null;
|
|
16841
17338
|
|
|
@@ -17191,6 +17688,16 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
17191
17688
|
return result;
|
|
17192
17689
|
}
|
|
17193
17690
|
|
|
17691
|
+
@FieldResolver(() => [MJAIAgentHarness_])
|
|
17692
|
+
async MJAIAgentHarnesses_AIModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17693
|
+
this.CheckUserReadPermissions('MJ: AI Agent Harnesses', userPayload);
|
|
17694
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17695
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentHarnesses')} WHERE ${provider.QuoteIdentifier('AIModelID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Harnesses', userPayload, EntityPermissionType.Read, 'AND');
|
|
17696
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaimodel_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
17697
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Harnesses', rows, this.GetUserFromPayload(userPayload));
|
|
17698
|
+
return result;
|
|
17699
|
+
}
|
|
17700
|
+
|
|
17194
17701
|
@Mutation(() => MJAIModel_)
|
|
17195
17702
|
async CreateMJAIModel(
|
|
17196
17703
|
@Arg('input', () => CreateMJAIModelInput) input: CreateMJAIModelInput,
|
|
@@ -19504,6 +20011,9 @@ export class MJAIPrompt_ {
|
|
|
19504
20011
|
@Field(() => [MJAIAgentType_])
|
|
19505
20012
|
MJAIAgentTypes_ConversationSummaryPromptIDArray: MJAIAgentType_[]; // Link to MJAIAgentTypes
|
|
19506
20013
|
|
|
20014
|
+
@Field(() => [MJTask_])
|
|
20015
|
+
MJTasks_PromptIDArray: MJTask_[]; // Link to MJTasks
|
|
20016
|
+
|
|
19507
20017
|
}
|
|
19508
20018
|
|
|
19509
20019
|
//****************************************************************************
|
|
@@ -20107,6 +20617,16 @@ export class MJAIPromptResolver extends ResolverBase {
|
|
|
20107
20617
|
return result;
|
|
20108
20618
|
}
|
|
20109
20619
|
|
|
20620
|
+
@FieldResolver(() => [MJTask_])
|
|
20621
|
+
async MJTasks_PromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20622
|
+
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
20623
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20624
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTasks')} WHERE ${provider.QuoteIdentifier('PromptID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
20625
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiprompt_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
20626
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows, this.GetUserFromPayload(userPayload));
|
|
20627
|
+
return result;
|
|
20628
|
+
}
|
|
20629
|
+
|
|
20110
20630
|
@Mutation(() => MJAIPrompt_)
|
|
20111
20631
|
async CreateMJAIPrompt(
|
|
20112
20632
|
@Arg('input', () => CreateMJAIPromptInput) input: CreateMJAIPromptInput,
|
|
@@ -22087,6 +22607,9 @@ export class MJAIVendor_ {
|
|
|
22087
22607
|
@Field(() => [MJScopedPromptConfig_])
|
|
22088
22608
|
MJScopedPromptConfigs_VendorIDArray: MJScopedPromptConfig_[]; // Link to MJScopedPromptConfigs
|
|
22089
22609
|
|
|
22610
|
+
@Field(() => [MJAIAgentHarness_])
|
|
22611
|
+
MJAIAgentHarnesses_AIVendorIDArray: MJAIAgentHarness_[]; // Link to MJAIAgentHarnesses
|
|
22612
|
+
|
|
22090
22613
|
}
|
|
22091
22614
|
|
|
22092
22615
|
//****************************************************************************
|
|
@@ -22282,6 +22805,16 @@ export class MJAIVendorResolver extends ResolverBase {
|
|
|
22282
22805
|
return result;
|
|
22283
22806
|
}
|
|
22284
22807
|
|
|
22808
|
+
@FieldResolver(() => [MJAIAgentHarness_])
|
|
22809
|
+
async MJAIAgentHarnesses_AIVendorIDArray(@Root() mjaivendor_: MJAIVendor_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22810
|
+
this.CheckUserReadPermissions('MJ: AI Agent Harnesses', userPayload);
|
|
22811
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22812
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentHarnesses')} WHERE ${provider.QuoteIdentifier('AIVendorID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Harnesses', userPayload, EntityPermissionType.Read, 'AND');
|
|
22813
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaivendor_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
22814
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Harnesses', rows, this.GetUserFromPayload(userPayload));
|
|
22815
|
+
return result;
|
|
22816
|
+
}
|
|
22817
|
+
|
|
22285
22818
|
@Mutation(() => MJAIVendor_)
|
|
22286
22819
|
async CreateMJAIVendor(
|
|
22287
22820
|
@Arg('input', () => CreateMJAIVendorInput) input: CreateMJAIVendorInput,
|
|
@@ -36915,10 +37448,6 @@ export class MJContentSource_ {
|
|
|
36915
37448
|
@MaxLength(36)
|
|
36916
37449
|
EntityDocumentID?: string;
|
|
36917
37450
|
|
|
36918
|
-
@Field({nullable: true, description: `Optional link to a MJ Scheduled Action that automatically runs the classification pipeline for this source on a cron schedule.`})
|
|
36919
|
-
@MaxLength(36)
|
|
36920
|
-
ScheduledActionID?: string;
|
|
36921
|
-
|
|
36922
37451
|
@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.`})
|
|
36923
37452
|
@MaxLength(100)
|
|
36924
37453
|
SegmenterKey?: string;
|
|
@@ -36927,6 +37456,10 @@ export class MJContentSource_ {
|
|
|
36927
37456
|
@MaxLength(100)
|
|
36928
37457
|
CleanerKey?: string;
|
|
36929
37458
|
|
|
37459
|
+
@Field({nullable: true, description: `Optional link to the Scheduled Job that runs this content source on a recurring basis. Replaces the retired ScheduledActionID link; the job is of type Action and carries its action + parameters in ScheduledJob.Configuration.`})
|
|
37460
|
+
@MaxLength(36)
|
|
37461
|
+
ScheduledJobID?: string;
|
|
37462
|
+
|
|
36930
37463
|
@Field()
|
|
36931
37464
|
@MaxLength(255)
|
|
36932
37465
|
ContentType: string;
|
|
@@ -36956,8 +37489,8 @@ export class MJContentSource_ {
|
|
|
36956
37489
|
EntityDocument?: string;
|
|
36957
37490
|
|
|
36958
37491
|
@Field({nullable: true})
|
|
36959
|
-
@MaxLength(
|
|
36960
|
-
|
|
37492
|
+
@MaxLength(200)
|
|
37493
|
+
ScheduledJob?: string;
|
|
36961
37494
|
|
|
36962
37495
|
@Field(() => [MJContentItem_])
|
|
36963
37496
|
MJContentItems_ContentSourceIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
@@ -37014,15 +37547,15 @@ export class CreateMJContentSourceInput {
|
|
|
37014
37547
|
@Field({ nullable: true })
|
|
37015
37548
|
EntityDocumentID: string | null;
|
|
37016
37549
|
|
|
37017
|
-
@Field({ nullable: true })
|
|
37018
|
-
ScheduledActionID: string | null;
|
|
37019
|
-
|
|
37020
37550
|
@Field({ nullable: true })
|
|
37021
37551
|
SegmenterKey: string | null;
|
|
37022
37552
|
|
|
37023
37553
|
@Field({ nullable: true })
|
|
37024
37554
|
CleanerKey: string | null;
|
|
37025
37555
|
|
|
37556
|
+
@Field({ nullable: true })
|
|
37557
|
+
ScheduledJobID: string | null;
|
|
37558
|
+
|
|
37026
37559
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
37027
37560
|
RestoreContext___?: RestoreContextInput;
|
|
37028
37561
|
}
|
|
@@ -37066,15 +37599,15 @@ export class UpdateMJContentSourceInput {
|
|
|
37066
37599
|
@Field({ nullable: true })
|
|
37067
37600
|
EntityDocumentID?: string | null;
|
|
37068
37601
|
|
|
37069
|
-
@Field({ nullable: true })
|
|
37070
|
-
ScheduledActionID?: string | null;
|
|
37071
|
-
|
|
37072
37602
|
@Field({ nullable: true })
|
|
37073
37603
|
SegmenterKey?: string | null;
|
|
37074
37604
|
|
|
37075
37605
|
@Field({ nullable: true })
|
|
37076
37606
|
CleanerKey?: string | null;
|
|
37077
37607
|
|
|
37608
|
+
@Field({ nullable: true })
|
|
37609
|
+
ScheduledJobID?: string | null;
|
|
37610
|
+
|
|
37078
37611
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
37079
37612
|
OldValues___?: KeyValuePairInput[];
|
|
37080
37613
|
|
|
@@ -39180,9 +39713,6 @@ export class MJConversationDetail_ {
|
|
|
39180
39713
|
@MaxLength(36)
|
|
39181
39714
|
RootParentID?: string;
|
|
39182
39715
|
|
|
39183
|
-
@Field(() => [MJReport_])
|
|
39184
|
-
MJReports_ConversationDetailIDArray: MJReport_[]; // Link to MJReports
|
|
39185
|
-
|
|
39186
39716
|
@Field(() => [MJConversationDetailArtifact_])
|
|
39187
39717
|
MJConversationDetailArtifacts_ConversationDetailIDArray: MJConversationDetailArtifact_[]; // Link to MJConversationDetailArtifacts
|
|
39188
39718
|
|
|
@@ -39471,16 +40001,6 @@ export class MJConversationDetailResolver extends ResolverBase {
|
|
|
39471
40001
|
return result;
|
|
39472
40002
|
}
|
|
39473
40003
|
|
|
39474
|
-
@FieldResolver(() => [MJReport_])
|
|
39475
|
-
async MJReports_ConversationDetailIDArray(@Root() mjconversationdetail_: MJConversationDetail_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39476
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
39477
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39478
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('ConversationDetailID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
39479
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjconversationdetail_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
39480
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
39481
|
-
return result;
|
|
39482
|
-
}
|
|
39483
|
-
|
|
39484
40004
|
@FieldResolver(() => [MJConversationDetailArtifact_])
|
|
39485
40005
|
async MJConversationDetailArtifacts_ConversationDetailIDArray(@Root() mjconversationdetail_: MJConversationDetail_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39486
40006
|
this.CheckUserReadPermissions('MJ: Conversation Detail Artifacts', userPayload);
|
|
@@ -40041,9 +40561,6 @@ export class MJConversation_ {
|
|
|
40041
40561
|
@Field(() => [MJConversationDetail_])
|
|
40042
40562
|
MJConversationDetails_ConversationIDArray: MJConversationDetail_[]; // Link to MJConversationDetails
|
|
40043
40563
|
|
|
40044
|
-
@Field(() => [MJReport_])
|
|
40045
|
-
MJReports_ConversationIDArray: MJReport_[]; // Link to MJReports
|
|
40046
|
-
|
|
40047
40564
|
@Field(() => [MJConversationArtifact_])
|
|
40048
40565
|
MJConversationArtifacts_ConversationIDArray: MJConversationArtifact_[]; // Link to MJConversationArtifacts
|
|
40049
40566
|
|
|
@@ -40294,16 +40811,6 @@ export class MJConversationResolver extends ResolverBase {
|
|
|
40294
40811
|
return result;
|
|
40295
40812
|
}
|
|
40296
40813
|
|
|
40297
|
-
@FieldResolver(() => [MJReport_])
|
|
40298
|
-
async MJReports_ConversationIDArray(@Root() mjconversation_: MJConversation_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40299
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
40300
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40301
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('ConversationID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
40302
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjconversation_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
40303
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
40304
|
-
return result;
|
|
40305
|
-
}
|
|
40306
|
-
|
|
40307
40814
|
@FieldResolver(() => [MJConversationArtifact_])
|
|
40308
40815
|
async MJConversationArtifacts_ConversationIDArray(@Root() mjconversation_: MJConversation_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40309
40816
|
this.CheckUserReadPermissions('MJ: Conversation Artifacts', userPayload);
|
|
@@ -41180,6 +41687,9 @@ export class MJCredential_ {
|
|
|
41180
41687
|
@Field(() => [MJExternalDataSource_])
|
|
41181
41688
|
MJExternalDataSources_CredentialIDArray: MJExternalDataSource_[]; // Link to MJExternalDataSources
|
|
41182
41689
|
|
|
41690
|
+
@Field(() => [MJAIAgentCredential_])
|
|
41691
|
+
MJAIAgentCredentials_CredentialIDArray: MJAIAgentCredential_[]; // Link to MJAIAgentCredentials
|
|
41692
|
+
|
|
41183
41693
|
}
|
|
41184
41694
|
|
|
41185
41695
|
//****************************************************************************
|
|
@@ -41423,6 +41933,16 @@ export class MJCredentialResolver extends ResolverBase {
|
|
|
41423
41933
|
return result;
|
|
41424
41934
|
}
|
|
41425
41935
|
|
|
41936
|
+
@FieldResolver(() => [MJAIAgentCredential_])
|
|
41937
|
+
async MJAIAgentCredentials_CredentialIDArray(@Root() mjcredential_: MJCredential_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41938
|
+
this.CheckUserReadPermissions('MJ: AI Agent Credentials', userPayload);
|
|
41939
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41940
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentCredentials')} WHERE ${provider.QuoteIdentifier('CredentialID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Credentials', userPayload, EntityPermissionType.Read, 'AND');
|
|
41941
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcredential_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
41942
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Credentials', rows, this.GetUserFromPayload(userPayload));
|
|
41943
|
+
return result;
|
|
41944
|
+
}
|
|
41945
|
+
|
|
41426
41946
|
@Mutation(() => MJCredential_)
|
|
41427
41947
|
async CreateMJCredential(
|
|
41428
41948
|
@Arg('input', () => CreateMJCredentialInput) input: CreateMJCredentialInput,
|
|
@@ -43468,9 +43988,6 @@ export class MJDataContext_ {
|
|
|
43468
43988
|
@Field(() => [MJDataContextItem_])
|
|
43469
43989
|
MJDataContextItems_DataContextIDArray: MJDataContextItem_[]; // Link to MJDataContextItems
|
|
43470
43990
|
|
|
43471
|
-
@Field(() => [MJReport_])
|
|
43472
|
-
MJReports_DataContextIDArray: MJReport_[]; // Link to MJReports
|
|
43473
|
-
|
|
43474
43991
|
@Field(() => [MJConversation_])
|
|
43475
43992
|
MJConversations_DataContextIDArray: MJConversation_[]; // Link to MJConversations
|
|
43476
43993
|
|
|
@@ -43595,16 +44112,6 @@ export class MJDataContextResolver extends ResolverBase {
|
|
|
43595
44112
|
return result;
|
|
43596
44113
|
}
|
|
43597
44114
|
|
|
43598
|
-
@FieldResolver(() => [MJReport_])
|
|
43599
|
-
async MJReports_DataContextIDArray(@Root() mjdatacontext_: MJDataContext_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43600
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
43601
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43602
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('DataContextID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
43603
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjdatacontext_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
43604
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
43605
|
-
return result;
|
|
43606
|
-
}
|
|
43607
|
-
|
|
43608
44115
|
@FieldResolver(() => [MJConversation_])
|
|
43609
44116
|
async MJConversations_DataContextIDArray(@Root() mjdatacontext_: MJDataContext_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43610
44117
|
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
@@ -48140,10 +48647,6 @@ export class MJEntityActionFilter_ {
|
|
|
48140
48647
|
@Field()
|
|
48141
48648
|
_mj__UpdatedAt: Date;
|
|
48142
48649
|
|
|
48143
|
-
@Field()
|
|
48144
|
-
@MaxLength(425)
|
|
48145
|
-
EntityAction: string;
|
|
48146
|
-
|
|
48147
48650
|
@Field()
|
|
48148
48651
|
ActionFilter: string;
|
|
48149
48652
|
|
|
@@ -48503,10 +49006,6 @@ export class MJEntityActionInvocation_ {
|
|
|
48503
49006
|
@MaxLength(255)
|
|
48504
49007
|
RuntimeUXDriverClass?: string;
|
|
48505
49008
|
|
|
48506
|
-
@Field()
|
|
48507
|
-
@MaxLength(425)
|
|
48508
|
-
EntityAction: string;
|
|
48509
|
-
|
|
48510
49009
|
@Field()
|
|
48511
49010
|
@MaxLength(255)
|
|
48512
49011
|
InvocationType: string;
|
|
@@ -48687,10 +49186,6 @@ export class MJEntityActionParam_ {
|
|
|
48687
49186
|
@Field(() => Boolean, {nullable: true, description: `Optional per-binding override of ActionParam.LogValue. NULL (the default) inherits the parameter definition. Set to 0 when this particular binding passes something sensitive through a parameter that is ordinarily safe to log - a message body through a generic Text parameter, for instance. Cannot re-enable logging for a value type the hard rule suppresses.`})
|
|
48688
49187
|
LogValue?: boolean;
|
|
48689
49188
|
|
|
48690
|
-
@Field()
|
|
48691
|
-
@MaxLength(425)
|
|
48692
|
-
EntityAction: string;
|
|
48693
|
-
|
|
48694
49189
|
@Field()
|
|
48695
49190
|
@MaxLength(255)
|
|
48696
49191
|
ActionParam: string;
|
|
@@ -48889,6 +49384,10 @@ export class MJEntityAction_ {
|
|
|
48889
49384
|
@MaxLength(20)
|
|
48890
49385
|
LoggingMode: string;
|
|
48891
49386
|
|
|
49387
|
+
@Field({description: `How an After* dispatch of this binding executes. Inline (the default) runs it fire-and-forget in the saving process, which is fast but lost if that process dies. Durable submits a single-node task graph instead, so the work survives a restart and is reclaimed by the dispatcher — at the cost of a Task row, a dispatcher hop of latency, and the action's parameters being persisted (redacted) at rest. Ignored for Validate and Before* invocations, which run inside the save and cannot be deferred without changing whether the save succeeds.`})
|
|
49388
|
+
@MaxLength(20)
|
|
49389
|
+
RunMode: string;
|
|
49390
|
+
|
|
48892
49391
|
@Field()
|
|
48893
49392
|
@MaxLength(255)
|
|
48894
49393
|
Entity: string;
|
|
@@ -48944,6 +49443,9 @@ export class CreateMJEntityActionInput {
|
|
|
48944
49443
|
@Field({ nullable: true })
|
|
48945
49444
|
LoggingMode?: string;
|
|
48946
49445
|
|
|
49446
|
+
@Field({ nullable: true })
|
|
49447
|
+
RunMode?: string;
|
|
49448
|
+
|
|
48947
49449
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
48948
49450
|
RestoreContext___?: RestoreContextInput;
|
|
48949
49451
|
}
|
|
@@ -48978,6 +49480,9 @@ export class UpdateMJEntityActionInput {
|
|
|
48978
49480
|
@Field({ nullable: true })
|
|
48979
49481
|
LoggingMode?: string;
|
|
48980
49482
|
|
|
49483
|
+
@Field({ nullable: true })
|
|
49484
|
+
RunMode?: string;
|
|
49485
|
+
|
|
48981
49486
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
48982
49487
|
OldValues___?: KeyValuePairInput[];
|
|
48983
49488
|
|
|
@@ -53036,6 +53541,9 @@ export class MJEntityRelationship_ {
|
|
|
53036
53541
|
@Field(() => Boolean, {description: `When 1, allows system/LLM to auto-update AdditionalFieldsToInclude; when 0, user has locked this field`})
|
|
53037
53542
|
AutoUpdateAdditionalFieldsToInclude: boolean;
|
|
53038
53543
|
|
|
53544
|
+
@Field({nullable: true, description: `Optional JSON policy object that declares this relationship as a first-class related-record collection, so CodeGen can emit a typed DeclareRelatedRecords(...) declaration on the entity subclass. Shape is IRelatedRecordCollectionConfig: Name (the generated property name, e.g. "Lines"), Load ('explicit' | 'immediate' | 'lazy' | 'never'), Source ('database' | 'cache'), ReadOnly, OnRemove ('delete' | 'orphan' | 'refuse'), OrderBy, Sequence ({ Field, From }), and ClearAfterSave. Source 'cache' reads the related records from whichever loaded BaseEngine already holds that entity, costing no query, and defaults ReadOnly to true because those are the engine's own instances; 'lazy' fills on first access and requires both. RelatedEntity and RelatedEntityJoinField are NOT repeated here — they are read from this row's own columns. NULL means the relationship is not a declared collection, which is the default and reproduces pre-6.2 behaviour exactly.`})
|
|
53545
|
+
RelatedRecordCollection?: string;
|
|
53546
|
+
|
|
53039
53547
|
@Field()
|
|
53040
53548
|
@MaxLength(255)
|
|
53041
53549
|
Entity: string;
|
|
@@ -53146,6 +53654,9 @@ export class CreateMJEntityRelationshipInput {
|
|
|
53146
53654
|
@Field(() => Boolean, { nullable: true })
|
|
53147
53655
|
AutoUpdateAdditionalFieldsToInclude?: boolean;
|
|
53148
53656
|
|
|
53657
|
+
@Field({ nullable: true })
|
|
53658
|
+
RelatedRecordCollection: string | null;
|
|
53659
|
+
|
|
53149
53660
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
53150
53661
|
RestoreContext___?: RestoreContextInput;
|
|
53151
53662
|
}
|
|
@@ -53222,6 +53733,9 @@ export class UpdateMJEntityRelationshipInput {
|
|
|
53222
53733
|
@Field(() => Boolean, { nullable: true })
|
|
53223
53734
|
AutoUpdateAdditionalFieldsToInclude?: boolean;
|
|
53224
53735
|
|
|
53736
|
+
@Field({ nullable: true })
|
|
53737
|
+
RelatedRecordCollection?: string | null;
|
|
53738
|
+
|
|
53225
53739
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
53226
53740
|
OldValues___?: KeyValuePairInput[];
|
|
53227
53741
|
|
|
@@ -53541,9 +54055,6 @@ export class MJEnvironment_ {
|
|
|
53541
54055
|
@Field(() => [MJTask_])
|
|
53542
54056
|
MJTasks_EnvironmentIDArray: MJTask_[]; // Link to MJTasks
|
|
53543
54057
|
|
|
53544
|
-
@Field(() => [MJReport_])
|
|
53545
|
-
MJReports_EnvironmentIDArray: MJReport_[]; // Link to MJReports
|
|
53546
|
-
|
|
53547
54058
|
@Field(() => [MJConversation_])
|
|
53548
54059
|
MJConversations_EnvironmentIDArray: MJConversation_[]; // Link to MJConversations
|
|
53549
54060
|
|
|
@@ -53711,16 +54222,6 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
53711
54222
|
return result;
|
|
53712
54223
|
}
|
|
53713
54224
|
|
|
53714
|
-
@FieldResolver(() => [MJReport_])
|
|
53715
|
-
async MJReports_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53716
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
53717
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53718
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('EnvironmentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
53719
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjenvironment_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
53720
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
53721
|
-
return result;
|
|
53722
|
-
}
|
|
53723
|
-
|
|
53724
54225
|
@FieldResolver(() => [MJConversation_])
|
|
53725
54226
|
async MJConversations_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53726
54227
|
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
@@ -67375,9 +67876,6 @@ export class MJOutputDeliveryType_ {
|
|
|
67375
67876
|
@Field()
|
|
67376
67877
|
_mj__UpdatedAt: Date;
|
|
67377
67878
|
|
|
67378
|
-
@Field(() => [MJReport_])
|
|
67379
|
-
MJReports_OutputDeliveryTypeIDArray: MJReport_[]; // Link to MJReports
|
|
67380
|
-
|
|
67381
67879
|
}
|
|
67382
67880
|
|
|
67383
67881
|
//****************************************************************************
|
|
@@ -67477,16 +67975,6 @@ export class MJOutputDeliveryTypeResolver extends ResolverBase {
|
|
|
67477
67975
|
return result;
|
|
67478
67976
|
}
|
|
67479
67977
|
|
|
67480
|
-
@FieldResolver(() => [MJReport_])
|
|
67481
|
-
async MJReports_OutputDeliveryTypeIDArray(@Root() mjoutputdeliverytype_: MJOutputDeliveryType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67482
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
67483
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67484
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('OutputDeliveryTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
67485
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjoutputdeliverytype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67486
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
67487
|
-
return result;
|
|
67488
|
-
}
|
|
67489
|
-
|
|
67490
67978
|
@Mutation(() => MJOutputDeliveryType_)
|
|
67491
67979
|
async CreateMJOutputDeliveryType(
|
|
67492
67980
|
@Arg('input', () => CreateMJOutputDeliveryTypeInput) input: CreateMJOutputDeliveryTypeInput,
|
|
@@ -67541,9 +68029,6 @@ export class MJOutputFormatType_ {
|
|
|
67541
68029
|
@Field()
|
|
67542
68030
|
_mj__UpdatedAt: Date;
|
|
67543
68031
|
|
|
67544
|
-
@Field(() => [MJReport_])
|
|
67545
|
-
MJReports_OutputFormatTypeIDArray: MJReport_[]; // Link to MJReports
|
|
67546
|
-
|
|
67547
68032
|
}
|
|
67548
68033
|
|
|
67549
68034
|
//****************************************************************************
|
|
@@ -67649,16 +68134,6 @@ export class MJOutputFormatTypeResolver extends ResolverBase {
|
|
|
67649
68134
|
return result;
|
|
67650
68135
|
}
|
|
67651
68136
|
|
|
67652
|
-
@FieldResolver(() => [MJReport_])
|
|
67653
|
-
async MJReports_OutputFormatTypeIDArray(@Root() mjoutputformattype_: MJOutputFormatType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67654
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
67655
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67656
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('OutputFormatTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
67657
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjoutputformattype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67658
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
67659
|
-
return result;
|
|
67660
|
-
}
|
|
67661
|
-
|
|
67662
68137
|
@Mutation(() => MJOutputFormatType_)
|
|
67663
68138
|
async CreateMJOutputFormatType(
|
|
67664
68139
|
@Arg('input', () => CreateMJOutputFormatTypeInput) input: CreateMJOutputFormatTypeInput,
|
|
@@ -67688,169 +68163,6 @@ export class MJOutputFormatTypeResolver extends ResolverBase {
|
|
|
67688
68163
|
|
|
67689
68164
|
}
|
|
67690
68165
|
|
|
67691
|
-
//****************************************************************************
|
|
67692
|
-
// ENTITY CLASS for MJ: Output Trigger Types
|
|
67693
|
-
//****************************************************************************
|
|
67694
|
-
@ObjectType({ description: `Defines events that can trigger output generation such as schedules, data changes, or manual requests.` })
|
|
67695
|
-
export class MJOutputTriggerType_ {
|
|
67696
|
-
@Field()
|
|
67697
|
-
@MaxLength(36)
|
|
67698
|
-
ID: string;
|
|
67699
|
-
|
|
67700
|
-
@Field()
|
|
67701
|
-
@MaxLength(255)
|
|
67702
|
-
Name: string;
|
|
67703
|
-
|
|
67704
|
-
@Field({nullable: true})
|
|
67705
|
-
Description?: string;
|
|
67706
|
-
|
|
67707
|
-
@Field()
|
|
67708
|
-
_mj__CreatedAt: Date;
|
|
67709
|
-
|
|
67710
|
-
@Field()
|
|
67711
|
-
_mj__UpdatedAt: Date;
|
|
67712
|
-
|
|
67713
|
-
@Field(() => [MJReport_])
|
|
67714
|
-
MJReports_OutputTriggerTypeIDArray: MJReport_[]; // Link to MJReports
|
|
67715
|
-
|
|
67716
|
-
}
|
|
67717
|
-
|
|
67718
|
-
//****************************************************************************
|
|
67719
|
-
// INPUT TYPE for MJ: Output Trigger Types
|
|
67720
|
-
//****************************************************************************
|
|
67721
|
-
@InputType()
|
|
67722
|
-
export class CreateMJOutputTriggerTypeInput {
|
|
67723
|
-
@Field({ nullable: true })
|
|
67724
|
-
ID?: string;
|
|
67725
|
-
|
|
67726
|
-
@Field({ nullable: true })
|
|
67727
|
-
Name?: string;
|
|
67728
|
-
|
|
67729
|
-
@Field({ nullable: true })
|
|
67730
|
-
Description: string | null;
|
|
67731
|
-
|
|
67732
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
67733
|
-
RestoreContext___?: RestoreContextInput;
|
|
67734
|
-
}
|
|
67735
|
-
|
|
67736
|
-
|
|
67737
|
-
//****************************************************************************
|
|
67738
|
-
// INPUT TYPE for MJ: Output Trigger Types
|
|
67739
|
-
//****************************************************************************
|
|
67740
|
-
@InputType()
|
|
67741
|
-
export class UpdateMJOutputTriggerTypeInput {
|
|
67742
|
-
@Field()
|
|
67743
|
-
ID: string;
|
|
67744
|
-
|
|
67745
|
-
@Field({ nullable: true })
|
|
67746
|
-
Name?: string;
|
|
67747
|
-
|
|
67748
|
-
@Field({ nullable: true })
|
|
67749
|
-
Description?: string | null;
|
|
67750
|
-
|
|
67751
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
67752
|
-
OldValues___?: KeyValuePairInput[];
|
|
67753
|
-
|
|
67754
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
67755
|
-
RestoreContext___?: RestoreContextInput;
|
|
67756
|
-
}
|
|
67757
|
-
|
|
67758
|
-
//****************************************************************************
|
|
67759
|
-
// RESOLVER for MJ: Output Trigger Types
|
|
67760
|
-
//****************************************************************************
|
|
67761
|
-
@ObjectType()
|
|
67762
|
-
export class RunMJOutputTriggerTypeViewResult {
|
|
67763
|
-
@Field(() => [MJOutputTriggerType_])
|
|
67764
|
-
Results: MJOutputTriggerType_[];
|
|
67765
|
-
|
|
67766
|
-
@Field(() => String, {nullable: true})
|
|
67767
|
-
UserViewRunID?: string;
|
|
67768
|
-
|
|
67769
|
-
@Field(() => Int, {nullable: true})
|
|
67770
|
-
RowCount: number;
|
|
67771
|
-
|
|
67772
|
-
@Field(() => Int, {nullable: true})
|
|
67773
|
-
TotalRowCount: number;
|
|
67774
|
-
|
|
67775
|
-
@Field(() => Int, {nullable: true})
|
|
67776
|
-
ExecutionTime: number;
|
|
67777
|
-
|
|
67778
|
-
@Field({nullable: true})
|
|
67779
|
-
ErrorMessage?: string;
|
|
67780
|
-
|
|
67781
|
-
@Field(() => Boolean, {nullable: false})
|
|
67782
|
-
Success: boolean;
|
|
67783
|
-
}
|
|
67784
|
-
|
|
67785
|
-
@Resolver(MJOutputTriggerType_)
|
|
67786
|
-
export class MJOutputTriggerTypeResolver extends ResolverBase {
|
|
67787
|
-
@Query(() => RunMJOutputTriggerTypeViewResult)
|
|
67788
|
-
async RunMJOutputTriggerTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67789
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67790
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
67791
|
-
}
|
|
67792
|
-
|
|
67793
|
-
@Query(() => RunMJOutputTriggerTypeViewResult)
|
|
67794
|
-
async RunMJOutputTriggerTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67795
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67796
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
67797
|
-
}
|
|
67798
|
-
|
|
67799
|
-
@Query(() => RunMJOutputTriggerTypeViewResult)
|
|
67800
|
-
async RunMJOutputTriggerTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67801
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67802
|
-
input.EntityName = 'MJ: Output Trigger Types';
|
|
67803
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
67804
|
-
}
|
|
67805
|
-
@Query(() => MJOutputTriggerType_, { nullable: true })
|
|
67806
|
-
async MJOutputTriggerType(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJOutputTriggerType_ | null> {
|
|
67807
|
-
this.CheckUserReadPermissions('MJ: Output Trigger Types', userPayload);
|
|
67808
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67809
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOutputTriggerTypes')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Output Trigger Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
67810
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67811
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Output Trigger Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
67812
|
-
return result;
|
|
67813
|
-
}
|
|
67814
|
-
|
|
67815
|
-
@FieldResolver(() => [MJReport_])
|
|
67816
|
-
async MJReports_OutputTriggerTypeIDArray(@Root() mjoutputtriggertype_: MJOutputTriggerType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67817
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
67818
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67819
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('OutputTriggerTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
67820
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjoutputtriggertype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67821
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
67822
|
-
return result;
|
|
67823
|
-
}
|
|
67824
|
-
|
|
67825
|
-
@Mutation(() => MJOutputTriggerType_)
|
|
67826
|
-
async CreateMJOutputTriggerType(
|
|
67827
|
-
@Arg('input', () => CreateMJOutputTriggerTypeInput) input: CreateMJOutputTriggerTypeInput,
|
|
67828
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
67829
|
-
@PubSub() pubSub: PubSubEngine
|
|
67830
|
-
) {
|
|
67831
|
-
const provider = GetReadWriteProvider(providers);
|
|
67832
|
-
return this.CreateRecord('MJ: Output Trigger Types', input, provider, userPayload, pubSub)
|
|
67833
|
-
}
|
|
67834
|
-
|
|
67835
|
-
@Mutation(() => MJOutputTriggerType_)
|
|
67836
|
-
async UpdateMJOutputTriggerType(
|
|
67837
|
-
@Arg('input', () => UpdateMJOutputTriggerTypeInput) input: UpdateMJOutputTriggerTypeInput,
|
|
67838
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
67839
|
-
@PubSub() pubSub: PubSubEngine
|
|
67840
|
-
) {
|
|
67841
|
-
const provider = GetReadWriteProvider(providers);
|
|
67842
|
-
return this.UpdateRecord('MJ: Output Trigger Types', input, provider, userPayload, pubSub);
|
|
67843
|
-
}
|
|
67844
|
-
|
|
67845
|
-
@Mutation(() => MJOutputTriggerType_)
|
|
67846
|
-
async DeleteMJOutputTriggerType(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67847
|
-
const provider = GetReadWriteProvider(providers);
|
|
67848
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
67849
|
-
return this.DeleteRecord('MJ: Output Trigger Types', key, options, provider, userPayload, pubSub);
|
|
67850
|
-
}
|
|
67851
|
-
|
|
67852
|
-
}
|
|
67853
|
-
|
|
67854
68166
|
//****************************************************************************
|
|
67855
68167
|
// ENTITY CLASS for MJ: Permission Domains
|
|
67856
68168
|
//****************************************************************************
|
|
@@ -75398,1118 +75710,6 @@ export class MJRemoteOperationResolver extends ResolverBase {
|
|
|
75398
75710
|
|
|
75399
75711
|
}
|
|
75400
75712
|
|
|
75401
|
-
//****************************************************************************
|
|
75402
|
-
// ENTITY CLASS for MJ: Report Categories
|
|
75403
|
-
//****************************************************************************
|
|
75404
|
-
@ObjectType({ description: `Organizes reports into logical groupings for navigation, access control, and discovery within the reporting system.` })
|
|
75405
|
-
export class MJReportCategory_ {
|
|
75406
|
-
@Field()
|
|
75407
|
-
@MaxLength(36)
|
|
75408
|
-
ID: string;
|
|
75409
|
-
|
|
75410
|
-
@Field()
|
|
75411
|
-
@MaxLength(100)
|
|
75412
|
-
Name: string;
|
|
75413
|
-
|
|
75414
|
-
@Field({nullable: true})
|
|
75415
|
-
Description?: string;
|
|
75416
|
-
|
|
75417
|
-
@Field({nullable: true})
|
|
75418
|
-
@MaxLength(36)
|
|
75419
|
-
ParentID?: string;
|
|
75420
|
-
|
|
75421
|
-
@Field()
|
|
75422
|
-
@MaxLength(36)
|
|
75423
|
-
UserID: string;
|
|
75424
|
-
|
|
75425
|
-
@Field()
|
|
75426
|
-
_mj__CreatedAt: Date;
|
|
75427
|
-
|
|
75428
|
-
@Field()
|
|
75429
|
-
_mj__UpdatedAt: Date;
|
|
75430
|
-
|
|
75431
|
-
@Field({nullable: true})
|
|
75432
|
-
@MaxLength(100)
|
|
75433
|
-
Parent?: string;
|
|
75434
|
-
|
|
75435
|
-
@Field()
|
|
75436
|
-
@MaxLength(100)
|
|
75437
|
-
User: string;
|
|
75438
|
-
|
|
75439
|
-
@Field({nullable: true})
|
|
75440
|
-
@MaxLength(36)
|
|
75441
|
-
RootParentID?: string;
|
|
75442
|
-
|
|
75443
|
-
@Field(() => [MJReportCategory_])
|
|
75444
|
-
MJReportCategories_ParentIDArray: MJReportCategory_[]; // Link to MJReportCategories
|
|
75445
|
-
|
|
75446
|
-
@Field(() => [MJReport_])
|
|
75447
|
-
MJReports_CategoryIDArray: MJReport_[]; // Link to MJReports
|
|
75448
|
-
|
|
75449
|
-
}
|
|
75450
|
-
|
|
75451
|
-
//****************************************************************************
|
|
75452
|
-
// INPUT TYPE for MJ: Report Categories
|
|
75453
|
-
//****************************************************************************
|
|
75454
|
-
@InputType()
|
|
75455
|
-
export class CreateMJReportCategoryInput {
|
|
75456
|
-
@Field({ nullable: true })
|
|
75457
|
-
ID?: string;
|
|
75458
|
-
|
|
75459
|
-
@Field({ nullable: true })
|
|
75460
|
-
Name?: string;
|
|
75461
|
-
|
|
75462
|
-
@Field({ nullable: true })
|
|
75463
|
-
Description: string | null;
|
|
75464
|
-
|
|
75465
|
-
@Field({ nullable: true })
|
|
75466
|
-
ParentID: string | null;
|
|
75467
|
-
|
|
75468
|
-
@Field({ nullable: true })
|
|
75469
|
-
UserID?: string;
|
|
75470
|
-
|
|
75471
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75472
|
-
RestoreContext___?: RestoreContextInput;
|
|
75473
|
-
}
|
|
75474
|
-
|
|
75475
|
-
|
|
75476
|
-
//****************************************************************************
|
|
75477
|
-
// INPUT TYPE for MJ: Report Categories
|
|
75478
|
-
//****************************************************************************
|
|
75479
|
-
@InputType()
|
|
75480
|
-
export class UpdateMJReportCategoryInput {
|
|
75481
|
-
@Field()
|
|
75482
|
-
ID: string;
|
|
75483
|
-
|
|
75484
|
-
@Field({ nullable: true })
|
|
75485
|
-
Name?: string;
|
|
75486
|
-
|
|
75487
|
-
@Field({ nullable: true })
|
|
75488
|
-
Description?: string | null;
|
|
75489
|
-
|
|
75490
|
-
@Field({ nullable: true })
|
|
75491
|
-
ParentID?: string | null;
|
|
75492
|
-
|
|
75493
|
-
@Field({ nullable: true })
|
|
75494
|
-
UserID?: string;
|
|
75495
|
-
|
|
75496
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
75497
|
-
OldValues___?: KeyValuePairInput[];
|
|
75498
|
-
|
|
75499
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75500
|
-
RestoreContext___?: RestoreContextInput;
|
|
75501
|
-
}
|
|
75502
|
-
|
|
75503
|
-
//****************************************************************************
|
|
75504
|
-
// RESOLVER for MJ: Report Categories
|
|
75505
|
-
//****************************************************************************
|
|
75506
|
-
@ObjectType()
|
|
75507
|
-
export class RunMJReportCategoryViewResult {
|
|
75508
|
-
@Field(() => [MJReportCategory_])
|
|
75509
|
-
Results: MJReportCategory_[];
|
|
75510
|
-
|
|
75511
|
-
@Field(() => String, {nullable: true})
|
|
75512
|
-
UserViewRunID?: string;
|
|
75513
|
-
|
|
75514
|
-
@Field(() => Int, {nullable: true})
|
|
75515
|
-
RowCount: number;
|
|
75516
|
-
|
|
75517
|
-
@Field(() => Int, {nullable: true})
|
|
75518
|
-
TotalRowCount: number;
|
|
75519
|
-
|
|
75520
|
-
@Field(() => Int, {nullable: true})
|
|
75521
|
-
ExecutionTime: number;
|
|
75522
|
-
|
|
75523
|
-
@Field({nullable: true})
|
|
75524
|
-
ErrorMessage?: string;
|
|
75525
|
-
|
|
75526
|
-
@Field(() => Boolean, {nullable: false})
|
|
75527
|
-
Success: boolean;
|
|
75528
|
-
}
|
|
75529
|
-
|
|
75530
|
-
@Resolver(MJReportCategory_)
|
|
75531
|
-
export class MJReportCategoryResolver extends ResolverBase {
|
|
75532
|
-
@Query(() => RunMJReportCategoryViewResult)
|
|
75533
|
-
async RunMJReportCategoryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75534
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75535
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
75536
|
-
}
|
|
75537
|
-
|
|
75538
|
-
@Query(() => RunMJReportCategoryViewResult)
|
|
75539
|
-
async RunMJReportCategoryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75540
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75541
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
75542
|
-
}
|
|
75543
|
-
|
|
75544
|
-
@Query(() => RunMJReportCategoryViewResult)
|
|
75545
|
-
async RunMJReportCategoryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75546
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75547
|
-
input.EntityName = 'MJ: Report Categories';
|
|
75548
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
75549
|
-
}
|
|
75550
|
-
@Query(() => MJReportCategory_, { nullable: true })
|
|
75551
|
-
async MJReportCategory(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReportCategory_ | null> {
|
|
75552
|
-
this.CheckUserReadPermissions('MJ: Report Categories', userPayload);
|
|
75553
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75554
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportCategories')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
75555
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75556
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Report Categories', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
75557
|
-
return result;
|
|
75558
|
-
}
|
|
75559
|
-
|
|
75560
|
-
@FieldResolver(() => [MJReportCategory_])
|
|
75561
|
-
async MJReportCategories_ParentIDArray(@Root() mjreportcategory_: MJReportCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75562
|
-
this.CheckUserReadPermissions('MJ: Report Categories', userPayload);
|
|
75563
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75564
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportCategories')} WHERE ${provider.QuoteIdentifier('ParentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
75565
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreportcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75566
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Categories', rows, this.GetUserFromPayload(userPayload));
|
|
75567
|
-
return result;
|
|
75568
|
-
}
|
|
75569
|
-
|
|
75570
|
-
@FieldResolver(() => [MJReport_])
|
|
75571
|
-
async MJReports_CategoryIDArray(@Root() mjreportcategory_: MJReportCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75572
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
75573
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75574
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('CategoryID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
75575
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreportcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75576
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
75577
|
-
return result;
|
|
75578
|
-
}
|
|
75579
|
-
|
|
75580
|
-
@Mutation(() => MJReportCategory_)
|
|
75581
|
-
async CreateMJReportCategory(
|
|
75582
|
-
@Arg('input', () => CreateMJReportCategoryInput) input: CreateMJReportCategoryInput,
|
|
75583
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75584
|
-
@PubSub() pubSub: PubSubEngine
|
|
75585
|
-
) {
|
|
75586
|
-
const provider = GetReadWriteProvider(providers);
|
|
75587
|
-
return this.CreateRecord('MJ: Report Categories', input, provider, userPayload, pubSub)
|
|
75588
|
-
}
|
|
75589
|
-
|
|
75590
|
-
@Mutation(() => MJReportCategory_)
|
|
75591
|
-
async UpdateMJReportCategory(
|
|
75592
|
-
@Arg('input', () => UpdateMJReportCategoryInput) input: UpdateMJReportCategoryInput,
|
|
75593
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75594
|
-
@PubSub() pubSub: PubSubEngine
|
|
75595
|
-
) {
|
|
75596
|
-
const provider = GetReadWriteProvider(providers);
|
|
75597
|
-
return this.UpdateRecord('MJ: Report Categories', input, provider, userPayload, pubSub);
|
|
75598
|
-
}
|
|
75599
|
-
|
|
75600
|
-
@Mutation(() => MJReportCategory_)
|
|
75601
|
-
async DeleteMJReportCategory(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75602
|
-
const provider = GetReadWriteProvider(providers);
|
|
75603
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
75604
|
-
return this.DeleteRecord('MJ: Report Categories', key, options, provider, userPayload, pubSub);
|
|
75605
|
-
}
|
|
75606
|
-
|
|
75607
|
-
}
|
|
75608
|
-
|
|
75609
|
-
//****************************************************************************
|
|
75610
|
-
// ENTITY CLASS for MJ: Report Snapshots
|
|
75611
|
-
//****************************************************************************
|
|
75612
|
-
@ObjectType({ description: `Stores point-in-time captures of report outputs, preserving historical data and enabling comparison over time.` })
|
|
75613
|
-
export class MJReportSnapshot_ {
|
|
75614
|
-
@Field()
|
|
75615
|
-
@MaxLength(36)
|
|
75616
|
-
ID: string;
|
|
75617
|
-
|
|
75618
|
-
@Field()
|
|
75619
|
-
@MaxLength(36)
|
|
75620
|
-
ReportID: string;
|
|
75621
|
-
|
|
75622
|
-
@Field({description: `Field ResultSet for entity Report Snapshots.`})
|
|
75623
|
-
ResultSet: string;
|
|
75624
|
-
|
|
75625
|
-
@Field()
|
|
75626
|
-
@MaxLength(36)
|
|
75627
|
-
UserID: string;
|
|
75628
|
-
|
|
75629
|
-
@Field()
|
|
75630
|
-
_mj__CreatedAt: Date;
|
|
75631
|
-
|
|
75632
|
-
@Field()
|
|
75633
|
-
_mj__UpdatedAt: Date;
|
|
75634
|
-
|
|
75635
|
-
@Field()
|
|
75636
|
-
@MaxLength(255)
|
|
75637
|
-
Report: string;
|
|
75638
|
-
|
|
75639
|
-
@Field()
|
|
75640
|
-
@MaxLength(100)
|
|
75641
|
-
User: string;
|
|
75642
|
-
|
|
75643
|
-
}
|
|
75644
|
-
|
|
75645
|
-
//****************************************************************************
|
|
75646
|
-
// INPUT TYPE for MJ: Report Snapshots
|
|
75647
|
-
//****************************************************************************
|
|
75648
|
-
@InputType()
|
|
75649
|
-
export class CreateMJReportSnapshotInput {
|
|
75650
|
-
@Field({ nullable: true })
|
|
75651
|
-
ID?: string;
|
|
75652
|
-
|
|
75653
|
-
@Field({ nullable: true })
|
|
75654
|
-
ReportID?: string;
|
|
75655
|
-
|
|
75656
|
-
@Field({ nullable: true })
|
|
75657
|
-
ResultSet?: string;
|
|
75658
|
-
|
|
75659
|
-
@Field({ nullable: true })
|
|
75660
|
-
UserID?: string;
|
|
75661
|
-
|
|
75662
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75663
|
-
RestoreContext___?: RestoreContextInput;
|
|
75664
|
-
}
|
|
75665
|
-
|
|
75666
|
-
|
|
75667
|
-
//****************************************************************************
|
|
75668
|
-
// INPUT TYPE for MJ: Report Snapshots
|
|
75669
|
-
//****************************************************************************
|
|
75670
|
-
@InputType()
|
|
75671
|
-
export class UpdateMJReportSnapshotInput {
|
|
75672
|
-
@Field()
|
|
75673
|
-
ID: string;
|
|
75674
|
-
|
|
75675
|
-
@Field({ nullable: true })
|
|
75676
|
-
ReportID?: string;
|
|
75677
|
-
|
|
75678
|
-
@Field({ nullable: true })
|
|
75679
|
-
ResultSet?: string;
|
|
75680
|
-
|
|
75681
|
-
@Field({ nullable: true })
|
|
75682
|
-
UserID?: string;
|
|
75683
|
-
|
|
75684
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
75685
|
-
OldValues___?: KeyValuePairInput[];
|
|
75686
|
-
|
|
75687
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75688
|
-
RestoreContext___?: RestoreContextInput;
|
|
75689
|
-
}
|
|
75690
|
-
|
|
75691
|
-
//****************************************************************************
|
|
75692
|
-
// RESOLVER for MJ: Report Snapshots
|
|
75693
|
-
//****************************************************************************
|
|
75694
|
-
@ObjectType()
|
|
75695
|
-
export class RunMJReportSnapshotViewResult {
|
|
75696
|
-
@Field(() => [MJReportSnapshot_])
|
|
75697
|
-
Results: MJReportSnapshot_[];
|
|
75698
|
-
|
|
75699
|
-
@Field(() => String, {nullable: true})
|
|
75700
|
-
UserViewRunID?: string;
|
|
75701
|
-
|
|
75702
|
-
@Field(() => Int, {nullable: true})
|
|
75703
|
-
RowCount: number;
|
|
75704
|
-
|
|
75705
|
-
@Field(() => Int, {nullable: true})
|
|
75706
|
-
TotalRowCount: number;
|
|
75707
|
-
|
|
75708
|
-
@Field(() => Int, {nullable: true})
|
|
75709
|
-
ExecutionTime: number;
|
|
75710
|
-
|
|
75711
|
-
@Field({nullable: true})
|
|
75712
|
-
ErrorMessage?: string;
|
|
75713
|
-
|
|
75714
|
-
@Field(() => Boolean, {nullable: false})
|
|
75715
|
-
Success: boolean;
|
|
75716
|
-
}
|
|
75717
|
-
|
|
75718
|
-
@Resolver(MJReportSnapshot_)
|
|
75719
|
-
export class MJReportSnapshotResolver extends ResolverBase {
|
|
75720
|
-
@Query(() => RunMJReportSnapshotViewResult)
|
|
75721
|
-
async RunMJReportSnapshotViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75722
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75723
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
75724
|
-
}
|
|
75725
|
-
|
|
75726
|
-
@Query(() => RunMJReportSnapshotViewResult)
|
|
75727
|
-
async RunMJReportSnapshotViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75728
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75729
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
75730
|
-
}
|
|
75731
|
-
|
|
75732
|
-
@Query(() => RunMJReportSnapshotViewResult)
|
|
75733
|
-
async RunMJReportSnapshotDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75734
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75735
|
-
input.EntityName = 'MJ: Report Snapshots';
|
|
75736
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
75737
|
-
}
|
|
75738
|
-
@Query(() => MJReportSnapshot_, { nullable: true })
|
|
75739
|
-
async MJReportSnapshot(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReportSnapshot_ | null> {
|
|
75740
|
-
this.CheckUserReadPermissions('MJ: Report Snapshots', userPayload);
|
|
75741
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75742
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportSnapshots')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
75743
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75744
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Report Snapshots', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
75745
|
-
return result;
|
|
75746
|
-
}
|
|
75747
|
-
|
|
75748
|
-
@Mutation(() => MJReportSnapshot_)
|
|
75749
|
-
async CreateMJReportSnapshot(
|
|
75750
|
-
@Arg('input', () => CreateMJReportSnapshotInput) input: CreateMJReportSnapshotInput,
|
|
75751
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75752
|
-
@PubSub() pubSub: PubSubEngine
|
|
75753
|
-
) {
|
|
75754
|
-
const provider = GetReadWriteProvider(providers);
|
|
75755
|
-
return this.CreateRecord('MJ: Report Snapshots', input, provider, userPayload, pubSub)
|
|
75756
|
-
}
|
|
75757
|
-
|
|
75758
|
-
@Mutation(() => MJReportSnapshot_)
|
|
75759
|
-
async UpdateMJReportSnapshot(
|
|
75760
|
-
@Arg('input', () => UpdateMJReportSnapshotInput) input: UpdateMJReportSnapshotInput,
|
|
75761
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75762
|
-
@PubSub() pubSub: PubSubEngine
|
|
75763
|
-
) {
|
|
75764
|
-
const provider = GetReadWriteProvider(providers);
|
|
75765
|
-
return this.UpdateRecord('MJ: Report Snapshots', input, provider, userPayload, pubSub);
|
|
75766
|
-
}
|
|
75767
|
-
|
|
75768
|
-
@Mutation(() => MJReportSnapshot_)
|
|
75769
|
-
async DeleteMJReportSnapshot(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75770
|
-
const provider = GetReadWriteProvider(providers);
|
|
75771
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
75772
|
-
return this.DeleteRecord('MJ: Report Snapshots', key, options, provider, userPayload, pubSub);
|
|
75773
|
-
}
|
|
75774
|
-
|
|
75775
|
-
}
|
|
75776
|
-
|
|
75777
|
-
//****************************************************************************
|
|
75778
|
-
// ENTITY CLASS for MJ: Report User States
|
|
75779
|
-
//****************************************************************************
|
|
75780
|
-
@ObjectType({ description: `Tracks individual user state within interactive reports` })
|
|
75781
|
-
export class MJReportUserState_ {
|
|
75782
|
-
@Field()
|
|
75783
|
-
@MaxLength(36)
|
|
75784
|
-
ID: string;
|
|
75785
|
-
|
|
75786
|
-
@Field()
|
|
75787
|
-
@MaxLength(36)
|
|
75788
|
-
ReportID: string;
|
|
75789
|
-
|
|
75790
|
-
@Field()
|
|
75791
|
-
@MaxLength(36)
|
|
75792
|
-
UserID: string;
|
|
75793
|
-
|
|
75794
|
-
@Field({nullable: true, description: `JSON serialized state of user interaction with the report`})
|
|
75795
|
-
ReportState?: string;
|
|
75796
|
-
|
|
75797
|
-
@Field()
|
|
75798
|
-
_mj__CreatedAt: Date;
|
|
75799
|
-
|
|
75800
|
-
@Field()
|
|
75801
|
-
_mj__UpdatedAt: Date;
|
|
75802
|
-
|
|
75803
|
-
@Field()
|
|
75804
|
-
@MaxLength(255)
|
|
75805
|
-
Report: string;
|
|
75806
|
-
|
|
75807
|
-
@Field()
|
|
75808
|
-
@MaxLength(100)
|
|
75809
|
-
User: string;
|
|
75810
|
-
|
|
75811
|
-
}
|
|
75812
|
-
|
|
75813
|
-
//****************************************************************************
|
|
75814
|
-
// INPUT TYPE for MJ: Report User States
|
|
75815
|
-
//****************************************************************************
|
|
75816
|
-
@InputType()
|
|
75817
|
-
export class CreateMJReportUserStateInput {
|
|
75818
|
-
@Field({ nullable: true })
|
|
75819
|
-
ID?: string;
|
|
75820
|
-
|
|
75821
|
-
@Field({ nullable: true })
|
|
75822
|
-
ReportID?: string;
|
|
75823
|
-
|
|
75824
|
-
@Field({ nullable: true })
|
|
75825
|
-
UserID?: string;
|
|
75826
|
-
|
|
75827
|
-
@Field({ nullable: true })
|
|
75828
|
-
ReportState: string | null;
|
|
75829
|
-
|
|
75830
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75831
|
-
RestoreContext___?: RestoreContextInput;
|
|
75832
|
-
}
|
|
75833
|
-
|
|
75834
|
-
|
|
75835
|
-
//****************************************************************************
|
|
75836
|
-
// INPUT TYPE for MJ: Report User States
|
|
75837
|
-
//****************************************************************************
|
|
75838
|
-
@InputType()
|
|
75839
|
-
export class UpdateMJReportUserStateInput {
|
|
75840
|
-
@Field()
|
|
75841
|
-
ID: string;
|
|
75842
|
-
|
|
75843
|
-
@Field({ nullable: true })
|
|
75844
|
-
ReportID?: string;
|
|
75845
|
-
|
|
75846
|
-
@Field({ nullable: true })
|
|
75847
|
-
UserID?: string;
|
|
75848
|
-
|
|
75849
|
-
@Field({ nullable: true })
|
|
75850
|
-
ReportState?: string | null;
|
|
75851
|
-
|
|
75852
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
75853
|
-
OldValues___?: KeyValuePairInput[];
|
|
75854
|
-
|
|
75855
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75856
|
-
RestoreContext___?: RestoreContextInput;
|
|
75857
|
-
}
|
|
75858
|
-
|
|
75859
|
-
//****************************************************************************
|
|
75860
|
-
// RESOLVER for MJ: Report User States
|
|
75861
|
-
//****************************************************************************
|
|
75862
|
-
@ObjectType()
|
|
75863
|
-
export class RunMJReportUserStateViewResult {
|
|
75864
|
-
@Field(() => [MJReportUserState_])
|
|
75865
|
-
Results: MJReportUserState_[];
|
|
75866
|
-
|
|
75867
|
-
@Field(() => String, {nullable: true})
|
|
75868
|
-
UserViewRunID?: string;
|
|
75869
|
-
|
|
75870
|
-
@Field(() => Int, {nullable: true})
|
|
75871
|
-
RowCount: number;
|
|
75872
|
-
|
|
75873
|
-
@Field(() => Int, {nullable: true})
|
|
75874
|
-
TotalRowCount: number;
|
|
75875
|
-
|
|
75876
|
-
@Field(() => Int, {nullable: true})
|
|
75877
|
-
ExecutionTime: number;
|
|
75878
|
-
|
|
75879
|
-
@Field({nullable: true})
|
|
75880
|
-
ErrorMessage?: string;
|
|
75881
|
-
|
|
75882
|
-
@Field(() => Boolean, {nullable: false})
|
|
75883
|
-
Success: boolean;
|
|
75884
|
-
}
|
|
75885
|
-
|
|
75886
|
-
@Resolver(MJReportUserState_)
|
|
75887
|
-
export class MJReportUserStateResolver extends ResolverBase {
|
|
75888
|
-
@Query(() => RunMJReportUserStateViewResult)
|
|
75889
|
-
async RunMJReportUserStateViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75890
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75891
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
75892
|
-
}
|
|
75893
|
-
|
|
75894
|
-
@Query(() => RunMJReportUserStateViewResult)
|
|
75895
|
-
async RunMJReportUserStateViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75896
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75897
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
75898
|
-
}
|
|
75899
|
-
|
|
75900
|
-
@Query(() => RunMJReportUserStateViewResult)
|
|
75901
|
-
async RunMJReportUserStateDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75902
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75903
|
-
input.EntityName = 'MJ: Report User States';
|
|
75904
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
75905
|
-
}
|
|
75906
|
-
@Query(() => MJReportUserState_, { nullable: true })
|
|
75907
|
-
async MJReportUserState(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReportUserState_ | null> {
|
|
75908
|
-
this.CheckUserReadPermissions('MJ: Report User States', userPayload);
|
|
75909
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75910
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportUserStates')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report User States', userPayload, EntityPermissionType.Read, 'AND');
|
|
75911
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75912
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Report User States', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
75913
|
-
return result;
|
|
75914
|
-
}
|
|
75915
|
-
|
|
75916
|
-
@Mutation(() => MJReportUserState_)
|
|
75917
|
-
async CreateMJReportUserState(
|
|
75918
|
-
@Arg('input', () => CreateMJReportUserStateInput) input: CreateMJReportUserStateInput,
|
|
75919
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75920
|
-
@PubSub() pubSub: PubSubEngine
|
|
75921
|
-
) {
|
|
75922
|
-
const provider = GetReadWriteProvider(providers);
|
|
75923
|
-
return this.CreateRecord('MJ: Report User States', input, provider, userPayload, pubSub)
|
|
75924
|
-
}
|
|
75925
|
-
|
|
75926
|
-
@Mutation(() => MJReportUserState_)
|
|
75927
|
-
async UpdateMJReportUserState(
|
|
75928
|
-
@Arg('input', () => UpdateMJReportUserStateInput) input: UpdateMJReportUserStateInput,
|
|
75929
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75930
|
-
@PubSub() pubSub: PubSubEngine
|
|
75931
|
-
) {
|
|
75932
|
-
const provider = GetReadWriteProvider(providers);
|
|
75933
|
-
return this.UpdateRecord('MJ: Report User States', input, provider, userPayload, pubSub);
|
|
75934
|
-
}
|
|
75935
|
-
|
|
75936
|
-
@Mutation(() => MJReportUserState_)
|
|
75937
|
-
async DeleteMJReportUserState(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75938
|
-
const provider = GetReadWriteProvider(providers);
|
|
75939
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
75940
|
-
return this.DeleteRecord('MJ: Report User States', key, options, provider, userPayload, pubSub);
|
|
75941
|
-
}
|
|
75942
|
-
|
|
75943
|
-
}
|
|
75944
|
-
|
|
75945
|
-
//****************************************************************************
|
|
75946
|
-
// ENTITY CLASS for MJ: Report Versions
|
|
75947
|
-
//****************************************************************************
|
|
75948
|
-
@ObjectType({ description: `Stores iterations of report logic, structure, and layout changes` })
|
|
75949
|
-
export class MJReportVersion_ {
|
|
75950
|
-
@Field()
|
|
75951
|
-
@MaxLength(36)
|
|
75952
|
-
ID: string;
|
|
75953
|
-
|
|
75954
|
-
@Field()
|
|
75955
|
-
@MaxLength(36)
|
|
75956
|
-
ReportID: string;
|
|
75957
|
-
|
|
75958
|
-
@Field(() => Int, {description: `Report version number, sequential per report starting at 1`})
|
|
75959
|
-
VersionNumber: number;
|
|
75960
|
-
|
|
75961
|
-
@Field({description: `Name of this report version`})
|
|
75962
|
-
@MaxLength(255)
|
|
75963
|
-
Name: string;
|
|
75964
|
-
|
|
75965
|
-
@Field({nullable: true, description: `Description of this report version`})
|
|
75966
|
-
Description?: string;
|
|
75967
|
-
|
|
75968
|
-
@Field({nullable: true, description: `JSON configuration of report structure, layout and logic`})
|
|
75969
|
-
Configuration?: string;
|
|
75970
|
-
|
|
75971
|
-
@Field(() => Boolean, {description: `Indicates if the data context was updated in this version`})
|
|
75972
|
-
DataContextUpdated: boolean;
|
|
75973
|
-
|
|
75974
|
-
@Field()
|
|
75975
|
-
_mj__CreatedAt: Date;
|
|
75976
|
-
|
|
75977
|
-
@Field()
|
|
75978
|
-
_mj__UpdatedAt: Date;
|
|
75979
|
-
|
|
75980
|
-
@Field()
|
|
75981
|
-
@MaxLength(255)
|
|
75982
|
-
Report: string;
|
|
75983
|
-
|
|
75984
|
-
}
|
|
75985
|
-
|
|
75986
|
-
//****************************************************************************
|
|
75987
|
-
// INPUT TYPE for MJ: Report Versions
|
|
75988
|
-
//****************************************************************************
|
|
75989
|
-
@InputType()
|
|
75990
|
-
export class CreateMJReportVersionInput {
|
|
75991
|
-
@Field({ nullable: true })
|
|
75992
|
-
ID?: string;
|
|
75993
|
-
|
|
75994
|
-
@Field({ nullable: true })
|
|
75995
|
-
ReportID?: string;
|
|
75996
|
-
|
|
75997
|
-
@Field(() => Int, { nullable: true })
|
|
75998
|
-
VersionNumber?: number;
|
|
75999
|
-
|
|
76000
|
-
@Field({ nullable: true })
|
|
76001
|
-
Name?: string;
|
|
76002
|
-
|
|
76003
|
-
@Field({ nullable: true })
|
|
76004
|
-
Description: string | null;
|
|
76005
|
-
|
|
76006
|
-
@Field({ nullable: true })
|
|
76007
|
-
Configuration: string | null;
|
|
76008
|
-
|
|
76009
|
-
@Field(() => Boolean, { nullable: true })
|
|
76010
|
-
DataContextUpdated?: boolean;
|
|
76011
|
-
|
|
76012
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
76013
|
-
RestoreContext___?: RestoreContextInput;
|
|
76014
|
-
}
|
|
76015
|
-
|
|
76016
|
-
|
|
76017
|
-
//****************************************************************************
|
|
76018
|
-
// INPUT TYPE for MJ: Report Versions
|
|
76019
|
-
//****************************************************************************
|
|
76020
|
-
@InputType()
|
|
76021
|
-
export class UpdateMJReportVersionInput {
|
|
76022
|
-
@Field()
|
|
76023
|
-
ID: string;
|
|
76024
|
-
|
|
76025
|
-
@Field({ nullable: true })
|
|
76026
|
-
ReportID?: string;
|
|
76027
|
-
|
|
76028
|
-
@Field(() => Int, { nullable: true })
|
|
76029
|
-
VersionNumber?: number;
|
|
76030
|
-
|
|
76031
|
-
@Field({ nullable: true })
|
|
76032
|
-
Name?: string;
|
|
76033
|
-
|
|
76034
|
-
@Field({ nullable: true })
|
|
76035
|
-
Description?: string | null;
|
|
76036
|
-
|
|
76037
|
-
@Field({ nullable: true })
|
|
76038
|
-
Configuration?: string | null;
|
|
76039
|
-
|
|
76040
|
-
@Field(() => Boolean, { nullable: true })
|
|
76041
|
-
DataContextUpdated?: boolean;
|
|
76042
|
-
|
|
76043
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
76044
|
-
OldValues___?: KeyValuePairInput[];
|
|
76045
|
-
|
|
76046
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
76047
|
-
RestoreContext___?: RestoreContextInput;
|
|
76048
|
-
}
|
|
76049
|
-
|
|
76050
|
-
//****************************************************************************
|
|
76051
|
-
// RESOLVER for MJ: Report Versions
|
|
76052
|
-
//****************************************************************************
|
|
76053
|
-
@ObjectType()
|
|
76054
|
-
export class RunMJReportVersionViewResult {
|
|
76055
|
-
@Field(() => [MJReportVersion_])
|
|
76056
|
-
Results: MJReportVersion_[];
|
|
76057
|
-
|
|
76058
|
-
@Field(() => String, {nullable: true})
|
|
76059
|
-
UserViewRunID?: string;
|
|
76060
|
-
|
|
76061
|
-
@Field(() => Int, {nullable: true})
|
|
76062
|
-
RowCount: number;
|
|
76063
|
-
|
|
76064
|
-
@Field(() => Int, {nullable: true})
|
|
76065
|
-
TotalRowCount: number;
|
|
76066
|
-
|
|
76067
|
-
@Field(() => Int, {nullable: true})
|
|
76068
|
-
ExecutionTime: number;
|
|
76069
|
-
|
|
76070
|
-
@Field({nullable: true})
|
|
76071
|
-
ErrorMessage?: string;
|
|
76072
|
-
|
|
76073
|
-
@Field(() => Boolean, {nullable: false})
|
|
76074
|
-
Success: boolean;
|
|
76075
|
-
}
|
|
76076
|
-
|
|
76077
|
-
@Resolver(MJReportVersion_)
|
|
76078
|
-
export class MJReportVersionResolver extends ResolverBase {
|
|
76079
|
-
@Query(() => RunMJReportVersionViewResult)
|
|
76080
|
-
async RunMJReportVersionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76081
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76082
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
76083
|
-
}
|
|
76084
|
-
|
|
76085
|
-
@Query(() => RunMJReportVersionViewResult)
|
|
76086
|
-
async RunMJReportVersionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76087
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76088
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
76089
|
-
}
|
|
76090
|
-
|
|
76091
|
-
@Query(() => RunMJReportVersionViewResult)
|
|
76092
|
-
async RunMJReportVersionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76093
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76094
|
-
input.EntityName = 'MJ: Report Versions';
|
|
76095
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
76096
|
-
}
|
|
76097
|
-
@Query(() => MJReportVersion_, { nullable: true })
|
|
76098
|
-
async MJReportVersion(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReportVersion_ | null> {
|
|
76099
|
-
this.CheckUserReadPermissions('MJ: Report Versions', userPayload);
|
|
76100
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76101
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportVersions')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
76102
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76103
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Report Versions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
76104
|
-
return result;
|
|
76105
|
-
}
|
|
76106
|
-
|
|
76107
|
-
@Mutation(() => MJReportVersion_)
|
|
76108
|
-
async CreateMJReportVersion(
|
|
76109
|
-
@Arg('input', () => CreateMJReportVersionInput) input: CreateMJReportVersionInput,
|
|
76110
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
76111
|
-
@PubSub() pubSub: PubSubEngine
|
|
76112
|
-
) {
|
|
76113
|
-
const provider = GetReadWriteProvider(providers);
|
|
76114
|
-
return this.CreateRecord('MJ: Report Versions', input, provider, userPayload, pubSub)
|
|
76115
|
-
}
|
|
76116
|
-
|
|
76117
|
-
@Mutation(() => MJReportVersion_)
|
|
76118
|
-
async UpdateMJReportVersion(
|
|
76119
|
-
@Arg('input', () => UpdateMJReportVersionInput) input: UpdateMJReportVersionInput,
|
|
76120
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
76121
|
-
@PubSub() pubSub: PubSubEngine
|
|
76122
|
-
) {
|
|
76123
|
-
const provider = GetReadWriteProvider(providers);
|
|
76124
|
-
return this.UpdateRecord('MJ: Report Versions', input, provider, userPayload, pubSub);
|
|
76125
|
-
}
|
|
76126
|
-
|
|
76127
|
-
@Mutation(() => MJReportVersion_)
|
|
76128
|
-
async DeleteMJReportVersion(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76129
|
-
const provider = GetReadWriteProvider(providers);
|
|
76130
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
76131
|
-
return this.DeleteRecord('MJ: Report Versions', key, options, provider, userPayload, pubSub);
|
|
76132
|
-
}
|
|
76133
|
-
|
|
76134
|
-
}
|
|
76135
|
-
|
|
76136
|
-
//****************************************************************************
|
|
76137
|
-
// ENTITY CLASS for MJ: Reports
|
|
76138
|
-
//****************************************************************************
|
|
76139
|
-
@ObjectType({ description: `Defines report configurations including data sources, layouts, filters, and scheduling for automated report generation.` })
|
|
76140
|
-
export class MJReport_ {
|
|
76141
|
-
@Field()
|
|
76142
|
-
@MaxLength(36)
|
|
76143
|
-
ID: string;
|
|
76144
|
-
|
|
76145
|
-
@Field()
|
|
76146
|
-
@MaxLength(255)
|
|
76147
|
-
Name: string;
|
|
76148
|
-
|
|
76149
|
-
@Field({nullable: true})
|
|
76150
|
-
Description?: string;
|
|
76151
|
-
|
|
76152
|
-
@Field({nullable: true})
|
|
76153
|
-
@MaxLength(36)
|
|
76154
|
-
CategoryID?: string;
|
|
76155
|
-
|
|
76156
|
-
@Field()
|
|
76157
|
-
@MaxLength(36)
|
|
76158
|
-
UserID: string;
|
|
76159
|
-
|
|
76160
|
-
@Field({description: `Field SharingScope for entity Reports.`})
|
|
76161
|
-
@MaxLength(20)
|
|
76162
|
-
SharingScope: string;
|
|
76163
|
-
|
|
76164
|
-
@Field({nullable: true})
|
|
76165
|
-
@MaxLength(36)
|
|
76166
|
-
ConversationID?: string;
|
|
76167
|
-
|
|
76168
|
-
@Field({nullable: true})
|
|
76169
|
-
@MaxLength(36)
|
|
76170
|
-
ConversationDetailID?: string;
|
|
76171
|
-
|
|
76172
|
-
@Field({nullable: true})
|
|
76173
|
-
@MaxLength(36)
|
|
76174
|
-
DataContextID?: string;
|
|
76175
|
-
|
|
76176
|
-
@Field({nullable: true, description: `Field Configuration for entity Reports.`})
|
|
76177
|
-
Configuration?: string;
|
|
76178
|
-
|
|
76179
|
-
@Field({nullable: true})
|
|
76180
|
-
@MaxLength(36)
|
|
76181
|
-
OutputTriggerTypeID?: string;
|
|
76182
|
-
|
|
76183
|
-
@Field({nullable: true})
|
|
76184
|
-
@MaxLength(36)
|
|
76185
|
-
OutputFormatTypeID?: string;
|
|
76186
|
-
|
|
76187
|
-
@Field({nullable: true})
|
|
76188
|
-
@MaxLength(36)
|
|
76189
|
-
OutputDeliveryTypeID?: string;
|
|
76190
|
-
|
|
76191
|
-
@Field({nullable: true, description: `For scheduled reports, the frequency of generation (Daily, Weekly, Monthly, etc.).`})
|
|
76192
|
-
@MaxLength(50)
|
|
76193
|
-
OutputFrequency?: string;
|
|
76194
|
-
|
|
76195
|
-
@Field({nullable: true, description: `Email address(es) to send the report to when using email delivery.`})
|
|
76196
|
-
@MaxLength(255)
|
|
76197
|
-
OutputTargetEmail?: string;
|
|
76198
|
-
|
|
76199
|
-
@Field({nullable: true})
|
|
76200
|
-
@MaxLength(36)
|
|
76201
|
-
OutputWorkflowID?: string;
|
|
76202
|
-
|
|
76203
|
-
@Field()
|
|
76204
|
-
_mj__CreatedAt: Date;
|
|
76205
|
-
|
|
76206
|
-
@Field()
|
|
76207
|
-
_mj__UpdatedAt: Date;
|
|
76208
|
-
|
|
76209
|
-
@Field({nullable: true, description: `Thumbnail image for the report that can be displayed in gallery views. Can contain either a URL to an image file or a Base64-encoded image string.`})
|
|
76210
|
-
Thumbnail?: string;
|
|
76211
|
-
|
|
76212
|
-
@Field()
|
|
76213
|
-
@MaxLength(36)
|
|
76214
|
-
EnvironmentID: string;
|
|
76215
|
-
|
|
76216
|
-
@Field({nullable: true})
|
|
76217
|
-
@MaxLength(100)
|
|
76218
|
-
Category?: string;
|
|
76219
|
-
|
|
76220
|
-
@Field()
|
|
76221
|
-
@MaxLength(100)
|
|
76222
|
-
User: string;
|
|
76223
|
-
|
|
76224
|
-
@Field({nullable: true})
|
|
76225
|
-
@MaxLength(255)
|
|
76226
|
-
Conversation?: string;
|
|
76227
|
-
|
|
76228
|
-
@Field({nullable: true})
|
|
76229
|
-
@MaxLength(100)
|
|
76230
|
-
ConversationDetail?: string;
|
|
76231
|
-
|
|
76232
|
-
@Field({nullable: true})
|
|
76233
|
-
@MaxLength(255)
|
|
76234
|
-
DataContext?: string;
|
|
76235
|
-
|
|
76236
|
-
@Field({nullable: true})
|
|
76237
|
-
@MaxLength(255)
|
|
76238
|
-
OutputTriggerType?: string;
|
|
76239
|
-
|
|
76240
|
-
@Field({nullable: true})
|
|
76241
|
-
@MaxLength(255)
|
|
76242
|
-
OutputFormatType?: string;
|
|
76243
|
-
|
|
76244
|
-
@Field({nullable: true})
|
|
76245
|
-
@MaxLength(255)
|
|
76246
|
-
OutputDeliveryType?: string;
|
|
76247
|
-
|
|
76248
|
-
@Field({nullable: true})
|
|
76249
|
-
@MaxLength(100)
|
|
76250
|
-
OutputWorkflow?: string;
|
|
76251
|
-
|
|
76252
|
-
@Field()
|
|
76253
|
-
@MaxLength(255)
|
|
76254
|
-
Environment: string;
|
|
76255
|
-
|
|
76256
|
-
@Field(() => [MJReportSnapshot_])
|
|
76257
|
-
MJReportSnapshots_ReportIDArray: MJReportSnapshot_[]; // Link to MJReportSnapshots
|
|
76258
|
-
|
|
76259
|
-
@Field(() => [MJReportVersion_])
|
|
76260
|
-
MJReportVersions_ReportIDArray: MJReportVersion_[]; // Link to MJReportVersions
|
|
76261
|
-
|
|
76262
|
-
@Field(() => [MJReportUserState_])
|
|
76263
|
-
MJReportUserStates_ReportIDArray: MJReportUserState_[]; // Link to MJReportUserStates
|
|
76264
|
-
|
|
76265
|
-
}
|
|
76266
|
-
|
|
76267
|
-
//****************************************************************************
|
|
76268
|
-
// INPUT TYPE for MJ: Reports
|
|
76269
|
-
//****************************************************************************
|
|
76270
|
-
@InputType()
|
|
76271
|
-
export class CreateMJReportInput {
|
|
76272
|
-
@Field({ nullable: true })
|
|
76273
|
-
ID?: string;
|
|
76274
|
-
|
|
76275
|
-
@Field({ nullable: true })
|
|
76276
|
-
Name?: string;
|
|
76277
|
-
|
|
76278
|
-
@Field({ nullable: true })
|
|
76279
|
-
Description: string | null;
|
|
76280
|
-
|
|
76281
|
-
@Field({ nullable: true })
|
|
76282
|
-
CategoryID: string | null;
|
|
76283
|
-
|
|
76284
|
-
@Field({ nullable: true })
|
|
76285
|
-
UserID?: string;
|
|
76286
|
-
|
|
76287
|
-
@Field({ nullable: true })
|
|
76288
|
-
SharingScope?: string;
|
|
76289
|
-
|
|
76290
|
-
@Field({ nullable: true })
|
|
76291
|
-
ConversationID: string | null;
|
|
76292
|
-
|
|
76293
|
-
@Field({ nullable: true })
|
|
76294
|
-
ConversationDetailID: string | null;
|
|
76295
|
-
|
|
76296
|
-
@Field({ nullable: true })
|
|
76297
|
-
DataContextID: string | null;
|
|
76298
|
-
|
|
76299
|
-
@Field({ nullable: true })
|
|
76300
|
-
Configuration: string | null;
|
|
76301
|
-
|
|
76302
|
-
@Field({ nullable: true })
|
|
76303
|
-
OutputTriggerTypeID: string | null;
|
|
76304
|
-
|
|
76305
|
-
@Field({ nullable: true })
|
|
76306
|
-
OutputFormatTypeID: string | null;
|
|
76307
|
-
|
|
76308
|
-
@Field({ nullable: true })
|
|
76309
|
-
OutputDeliveryTypeID: string | null;
|
|
76310
|
-
|
|
76311
|
-
@Field({ nullable: true })
|
|
76312
|
-
OutputFrequency: string | null;
|
|
76313
|
-
|
|
76314
|
-
@Field({ nullable: true })
|
|
76315
|
-
OutputTargetEmail: string | null;
|
|
76316
|
-
|
|
76317
|
-
@Field({ nullable: true })
|
|
76318
|
-
OutputWorkflowID: string | null;
|
|
76319
|
-
|
|
76320
|
-
@Field({ nullable: true })
|
|
76321
|
-
Thumbnail: string | null;
|
|
76322
|
-
|
|
76323
|
-
@Field({ nullable: true })
|
|
76324
|
-
EnvironmentID?: string;
|
|
76325
|
-
|
|
76326
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
76327
|
-
RestoreContext___?: RestoreContextInput;
|
|
76328
|
-
}
|
|
76329
|
-
|
|
76330
|
-
|
|
76331
|
-
//****************************************************************************
|
|
76332
|
-
// INPUT TYPE for MJ: Reports
|
|
76333
|
-
//****************************************************************************
|
|
76334
|
-
@InputType()
|
|
76335
|
-
export class UpdateMJReportInput {
|
|
76336
|
-
@Field()
|
|
76337
|
-
ID: string;
|
|
76338
|
-
|
|
76339
|
-
@Field({ nullable: true })
|
|
76340
|
-
Name?: string;
|
|
76341
|
-
|
|
76342
|
-
@Field({ nullable: true })
|
|
76343
|
-
Description?: string | null;
|
|
76344
|
-
|
|
76345
|
-
@Field({ nullable: true })
|
|
76346
|
-
CategoryID?: string | null;
|
|
76347
|
-
|
|
76348
|
-
@Field({ nullable: true })
|
|
76349
|
-
UserID?: string;
|
|
76350
|
-
|
|
76351
|
-
@Field({ nullable: true })
|
|
76352
|
-
SharingScope?: string;
|
|
76353
|
-
|
|
76354
|
-
@Field({ nullable: true })
|
|
76355
|
-
ConversationID?: string | null;
|
|
76356
|
-
|
|
76357
|
-
@Field({ nullable: true })
|
|
76358
|
-
ConversationDetailID?: string | null;
|
|
76359
|
-
|
|
76360
|
-
@Field({ nullable: true })
|
|
76361
|
-
DataContextID?: string | null;
|
|
76362
|
-
|
|
76363
|
-
@Field({ nullable: true })
|
|
76364
|
-
Configuration?: string | null;
|
|
76365
|
-
|
|
76366
|
-
@Field({ nullable: true })
|
|
76367
|
-
OutputTriggerTypeID?: string | null;
|
|
76368
|
-
|
|
76369
|
-
@Field({ nullable: true })
|
|
76370
|
-
OutputFormatTypeID?: string | null;
|
|
76371
|
-
|
|
76372
|
-
@Field({ nullable: true })
|
|
76373
|
-
OutputDeliveryTypeID?: string | null;
|
|
76374
|
-
|
|
76375
|
-
@Field({ nullable: true })
|
|
76376
|
-
OutputFrequency?: string | null;
|
|
76377
|
-
|
|
76378
|
-
@Field({ nullable: true })
|
|
76379
|
-
OutputTargetEmail?: string | null;
|
|
76380
|
-
|
|
76381
|
-
@Field({ nullable: true })
|
|
76382
|
-
OutputWorkflowID?: string | null;
|
|
76383
|
-
|
|
76384
|
-
@Field({ nullable: true })
|
|
76385
|
-
Thumbnail?: string | null;
|
|
76386
|
-
|
|
76387
|
-
@Field({ nullable: true })
|
|
76388
|
-
EnvironmentID?: string;
|
|
76389
|
-
|
|
76390
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
76391
|
-
OldValues___?: KeyValuePairInput[];
|
|
76392
|
-
|
|
76393
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
76394
|
-
RestoreContext___?: RestoreContextInput;
|
|
76395
|
-
}
|
|
76396
|
-
|
|
76397
|
-
//****************************************************************************
|
|
76398
|
-
// RESOLVER for MJ: Reports
|
|
76399
|
-
//****************************************************************************
|
|
76400
|
-
@ObjectType()
|
|
76401
|
-
export class RunMJReportViewResult {
|
|
76402
|
-
@Field(() => [MJReport_])
|
|
76403
|
-
Results: MJReport_[];
|
|
76404
|
-
|
|
76405
|
-
@Field(() => String, {nullable: true})
|
|
76406
|
-
UserViewRunID?: string;
|
|
76407
|
-
|
|
76408
|
-
@Field(() => Int, {nullable: true})
|
|
76409
|
-
RowCount: number;
|
|
76410
|
-
|
|
76411
|
-
@Field(() => Int, {nullable: true})
|
|
76412
|
-
TotalRowCount: number;
|
|
76413
|
-
|
|
76414
|
-
@Field(() => Int, {nullable: true})
|
|
76415
|
-
ExecutionTime: number;
|
|
76416
|
-
|
|
76417
|
-
@Field({nullable: true})
|
|
76418
|
-
ErrorMessage?: string;
|
|
76419
|
-
|
|
76420
|
-
@Field(() => Boolean, {nullable: false})
|
|
76421
|
-
Success: boolean;
|
|
76422
|
-
}
|
|
76423
|
-
|
|
76424
|
-
@Resolver(MJReport_)
|
|
76425
|
-
export class MJReportResolver extends ResolverBase {
|
|
76426
|
-
@Query(() => RunMJReportViewResult)
|
|
76427
|
-
async RunMJReportViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76428
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76429
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
76430
|
-
}
|
|
76431
|
-
|
|
76432
|
-
@Query(() => RunMJReportViewResult)
|
|
76433
|
-
async RunMJReportViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76434
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76435
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
76436
|
-
}
|
|
76437
|
-
|
|
76438
|
-
@Query(() => RunMJReportViewResult)
|
|
76439
|
-
async RunMJReportDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76440
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76441
|
-
input.EntityName = 'MJ: Reports';
|
|
76442
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
76443
|
-
}
|
|
76444
|
-
@Query(() => MJReport_, { nullable: true })
|
|
76445
|
-
async MJReport(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReport_ | null> {
|
|
76446
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
76447
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76448
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
76449
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76450
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Reports', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
76451
|
-
return result;
|
|
76452
|
-
}
|
|
76453
|
-
|
|
76454
|
-
@FieldResolver(() => [MJReportSnapshot_])
|
|
76455
|
-
async MJReportSnapshots_ReportIDArray(@Root() mjreport_: MJReport_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76456
|
-
this.CheckUserReadPermissions('MJ: Report Snapshots', userPayload);
|
|
76457
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76458
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportSnapshots')} WHERE ${provider.QuoteIdentifier('ReportID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
76459
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreport_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76460
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Snapshots', rows, this.GetUserFromPayload(userPayload));
|
|
76461
|
-
return result;
|
|
76462
|
-
}
|
|
76463
|
-
|
|
76464
|
-
@FieldResolver(() => [MJReportVersion_])
|
|
76465
|
-
async MJReportVersions_ReportIDArray(@Root() mjreport_: MJReport_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76466
|
-
this.CheckUserReadPermissions('MJ: Report Versions', userPayload);
|
|
76467
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76468
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportVersions')} WHERE ${provider.QuoteIdentifier('ReportID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
76469
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreport_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76470
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Versions', rows, this.GetUserFromPayload(userPayload));
|
|
76471
|
-
return result;
|
|
76472
|
-
}
|
|
76473
|
-
|
|
76474
|
-
@FieldResolver(() => [MJReportUserState_])
|
|
76475
|
-
async MJReportUserStates_ReportIDArray(@Root() mjreport_: MJReport_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76476
|
-
this.CheckUserReadPermissions('MJ: Report User States', userPayload);
|
|
76477
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76478
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportUserStates')} WHERE ${provider.QuoteIdentifier('ReportID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report User States', userPayload, EntityPermissionType.Read, 'AND');
|
|
76479
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreport_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76480
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report User States', rows, this.GetUserFromPayload(userPayload));
|
|
76481
|
-
return result;
|
|
76482
|
-
}
|
|
76483
|
-
|
|
76484
|
-
@Mutation(() => MJReport_)
|
|
76485
|
-
async CreateMJReport(
|
|
76486
|
-
@Arg('input', () => CreateMJReportInput) input: CreateMJReportInput,
|
|
76487
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
76488
|
-
@PubSub() pubSub: PubSubEngine
|
|
76489
|
-
) {
|
|
76490
|
-
const provider = GetReadWriteProvider(providers);
|
|
76491
|
-
return this.CreateRecord('MJ: Reports', input, provider, userPayload, pubSub)
|
|
76492
|
-
}
|
|
76493
|
-
|
|
76494
|
-
@Mutation(() => MJReport_)
|
|
76495
|
-
async UpdateMJReport(
|
|
76496
|
-
@Arg('input', () => UpdateMJReportInput) input: UpdateMJReportInput,
|
|
76497
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
76498
|
-
@PubSub() pubSub: PubSubEngine
|
|
76499
|
-
) {
|
|
76500
|
-
const provider = GetReadWriteProvider(providers);
|
|
76501
|
-
return this.UpdateRecord('MJ: Reports', input, provider, userPayload, pubSub);
|
|
76502
|
-
}
|
|
76503
|
-
|
|
76504
|
-
@Mutation(() => MJReport_)
|
|
76505
|
-
async DeleteMJReport(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76506
|
-
const provider = GetReadWriteProvider(providers);
|
|
76507
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
76508
|
-
return this.DeleteRecord('MJ: Reports', key, options, provider, userPayload, pubSub);
|
|
76509
|
-
}
|
|
76510
|
-
|
|
76511
|
-
}
|
|
76512
|
-
|
|
76513
75713
|
//****************************************************************************
|
|
76514
75714
|
// ENTITY CLASS for MJ: Resource Links
|
|
76515
75715
|
//****************************************************************************
|
|
@@ -77520,572 +76720,99 @@ export class MJRoleResolver extends ResolverBase {
|
|
|
77520
76720
|
async MJEntityFormOverrides_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77521
76721
|
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
77522
76722
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77523
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('RoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
77524
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77525
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
77526
|
-
return result;
|
|
77527
|
-
}
|
|
77528
|
-
|
|
77529
|
-
@FieldResolver(() => [MJMagicLinkInviteRole_])
|
|
77530
|
-
async MJMagicLinkInviteRoles_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77531
|
-
this.CheckUserReadPermissions('MJ: Magic Link Invite Roles', userPayload);
|
|
77532
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77533
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMagicLinkInviteRoles')} WHERE ${provider.QuoteIdentifier('RoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Magic Link Invite Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
77534
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77535
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Magic Link Invite Roles', rows, this.GetUserFromPayload(userPayload));
|
|
77536
|
-
return result;
|
|
77537
|
-
}
|
|
77538
|
-
|
|
77539
|
-
@FieldResolver(() => [MJMagicLinkInvite_])
|
|
77540
|
-
async MJMagicLinkInvites_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77541
|
-
this.CheckUserReadPermissions('MJ: Magic Link Invites', userPayload);
|
|
77542
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77543
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMagicLinkInvites')} WHERE ${provider.QuoteIdentifier('RoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Magic Link Invites', userPayload, EntityPermissionType.Read, 'AND');
|
|
77544
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77545
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Magic Link Invites', rows, this.GetUserFromPayload(userPayload));
|
|
77546
|
-
return result;
|
|
77547
|
-
}
|
|
77548
|
-
|
|
77549
|
-
@FieldResolver(() => [MJAISkillPermission_])
|
|
77550
|
-
async MJAISkillPermissions_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77551
|
-
this.CheckUserReadPermissions('MJ: AI Skill Permissions', userPayload);
|
|
77552
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77553
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAISkillPermissions')} WHERE ${provider.QuoteIdentifier('RoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Skill Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
77554
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77555
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Skill Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
77556
|
-
return result;
|
|
77557
|
-
}
|
|
77558
|
-
|
|
77559
|
-
@FieldResolver(() => [MJConversationWidgetInstance_])
|
|
77560
|
-
async MJConversationWidgetInstances_GuestRoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77561
|
-
this.CheckUserReadPermissions('MJ: Conversation Widget Instances', userPayload);
|
|
77562
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77563
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationWidgetInstances')} WHERE ${provider.QuoteIdentifier('GuestRoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Widget Instances', userPayload, EntityPermissionType.Read, 'AND');
|
|
77564
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77565
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Widget Instances', rows, this.GetUserFromPayload(userPayload));
|
|
77566
|
-
return result;
|
|
77567
|
-
}
|
|
77568
|
-
|
|
77569
|
-
@Mutation(() => MJRole_)
|
|
77570
|
-
async CreateMJRole(
|
|
77571
|
-
@Arg('input', () => CreateMJRoleInput) input: CreateMJRoleInput,
|
|
77572
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
77573
|
-
@PubSub() pubSub: PubSubEngine
|
|
77574
|
-
) {
|
|
77575
|
-
const provider = GetReadWriteProvider(providers);
|
|
77576
|
-
return this.CreateRecord('MJ: Roles', input, provider, userPayload, pubSub)
|
|
77577
|
-
}
|
|
77578
|
-
|
|
77579
|
-
@Mutation(() => MJRole_)
|
|
77580
|
-
async UpdateMJRole(
|
|
77581
|
-
@Arg('input', () => UpdateMJRoleInput) input: UpdateMJRoleInput,
|
|
77582
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
77583
|
-
@PubSub() pubSub: PubSubEngine
|
|
77584
|
-
) {
|
|
77585
|
-
const provider = GetReadWriteProvider(providers);
|
|
77586
|
-
return this.UpdateRecord('MJ: Roles', input, provider, userPayload, pubSub);
|
|
77587
|
-
}
|
|
77588
|
-
|
|
77589
|
-
@Mutation(() => MJRole_)
|
|
77590
|
-
async DeleteMJRole(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77591
|
-
const provider = GetReadWriteProvider(providers);
|
|
77592
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
77593
|
-
return this.DeleteRecord('MJ: Roles', key, options, provider, userPayload, pubSub);
|
|
77594
|
-
}
|
|
77595
|
-
|
|
77596
|
-
}
|
|
77597
|
-
|
|
77598
|
-
//****************************************************************************
|
|
77599
|
-
// ENTITY CLASS for MJ: Row Level Security Filters
|
|
77600
|
-
//****************************************************************************
|
|
77601
|
-
@ObjectType({ description: `Defines data access rules that filter records based on user context, implementing fine-grained security at the row level.` })
|
|
77602
|
-
export class MJRowLevelSecurityFilter_ {
|
|
77603
|
-
@Field()
|
|
77604
|
-
@MaxLength(36)
|
|
77605
|
-
ID: string;
|
|
77606
|
-
|
|
77607
|
-
@Field()
|
|
77608
|
-
@MaxLength(100)
|
|
77609
|
-
Name: string;
|
|
77610
|
-
|
|
77611
|
-
@Field({nullable: true})
|
|
77612
|
-
Description?: string;
|
|
77613
|
-
|
|
77614
|
-
@Field({nullable: true, description: `SQL WHERE clause template that filters records based on user context variables.`})
|
|
77615
|
-
FilterText?: string;
|
|
77616
|
-
|
|
77617
|
-
@Field()
|
|
77618
|
-
_mj__CreatedAt: Date;
|
|
77619
|
-
|
|
77620
|
-
@Field()
|
|
77621
|
-
_mj__UpdatedAt: Date;
|
|
77622
|
-
|
|
77623
|
-
@Field(() => [MJEntityPermission_])
|
|
77624
|
-
MJEntityPermissions_DeleteRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
77625
|
-
|
|
77626
|
-
@Field(() => [MJEntityPermission_])
|
|
77627
|
-
MJEntityPermissions_ReadRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
77628
|
-
|
|
77629
|
-
@Field(() => [MJEntityPermission_])
|
|
77630
|
-
MJEntityPermissions_CreateRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
77631
|
-
|
|
77632
|
-
@Field(() => [MJEntityPermission_])
|
|
77633
|
-
MJEntityPermissions_UpdateRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
77634
|
-
|
|
77635
|
-
@Field(() => [MJAPIKeyScope_])
|
|
77636
|
-
MJAPIKeyScopes_RowFilterIDArray: MJAPIKeyScope_[]; // Link to MJAPIKeyScopes
|
|
77637
|
-
|
|
77638
|
-
@Field(() => [MJAPIApplicationScope_])
|
|
77639
|
-
MJAPIApplicationScopes_RowFilterIDArray: MJAPIApplicationScope_[]; // Link to MJAPIApplicationScopes
|
|
77640
|
-
|
|
77641
|
-
}
|
|
77642
|
-
|
|
77643
|
-
//****************************************************************************
|
|
77644
|
-
// INPUT TYPE for MJ: Row Level Security Filters
|
|
77645
|
-
//****************************************************************************
|
|
77646
|
-
@InputType()
|
|
77647
|
-
export class CreateMJRowLevelSecurityFilterInput {
|
|
77648
|
-
@Field({ nullable: true })
|
|
77649
|
-
ID?: string;
|
|
77650
|
-
|
|
77651
|
-
@Field({ nullable: true })
|
|
77652
|
-
Name?: string;
|
|
77653
|
-
|
|
77654
|
-
@Field({ nullable: true })
|
|
77655
|
-
Description: string | null;
|
|
77656
|
-
|
|
77657
|
-
@Field({ nullable: true })
|
|
77658
|
-
FilterText: string | null;
|
|
77659
|
-
|
|
77660
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
77661
|
-
RestoreContext___?: RestoreContextInput;
|
|
77662
|
-
}
|
|
77663
|
-
|
|
77664
|
-
|
|
77665
|
-
//****************************************************************************
|
|
77666
|
-
// INPUT TYPE for MJ: Row Level Security Filters
|
|
77667
|
-
//****************************************************************************
|
|
77668
|
-
@InputType()
|
|
77669
|
-
export class UpdateMJRowLevelSecurityFilterInput {
|
|
77670
|
-
@Field()
|
|
77671
|
-
ID: string;
|
|
77672
|
-
|
|
77673
|
-
@Field({ nullable: true })
|
|
77674
|
-
Name?: string;
|
|
77675
|
-
|
|
77676
|
-
@Field({ nullable: true })
|
|
77677
|
-
Description?: string | null;
|
|
77678
|
-
|
|
77679
|
-
@Field({ nullable: true })
|
|
77680
|
-
FilterText?: string | null;
|
|
77681
|
-
|
|
77682
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
77683
|
-
OldValues___?: KeyValuePairInput[];
|
|
77684
|
-
|
|
77685
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
77686
|
-
RestoreContext___?: RestoreContextInput;
|
|
77687
|
-
}
|
|
77688
|
-
|
|
77689
|
-
//****************************************************************************
|
|
77690
|
-
// RESOLVER for MJ: Row Level Security Filters
|
|
77691
|
-
//****************************************************************************
|
|
77692
|
-
@ObjectType()
|
|
77693
|
-
export class RunMJRowLevelSecurityFilterViewResult {
|
|
77694
|
-
@Field(() => [MJRowLevelSecurityFilter_])
|
|
77695
|
-
Results: MJRowLevelSecurityFilter_[];
|
|
77696
|
-
|
|
77697
|
-
@Field(() => String, {nullable: true})
|
|
77698
|
-
UserViewRunID?: string;
|
|
77699
|
-
|
|
77700
|
-
@Field(() => Int, {nullable: true})
|
|
77701
|
-
RowCount: number;
|
|
77702
|
-
|
|
77703
|
-
@Field(() => Int, {nullable: true})
|
|
77704
|
-
TotalRowCount: number;
|
|
77705
|
-
|
|
77706
|
-
@Field(() => Int, {nullable: true})
|
|
77707
|
-
ExecutionTime: number;
|
|
77708
|
-
|
|
77709
|
-
@Field({nullable: true})
|
|
77710
|
-
ErrorMessage?: string;
|
|
77711
|
-
|
|
77712
|
-
@Field(() => Boolean, {nullable: false})
|
|
77713
|
-
Success: boolean;
|
|
77714
|
-
}
|
|
77715
|
-
|
|
77716
|
-
@Resolver(MJRowLevelSecurityFilter_)
|
|
77717
|
-
export class MJRowLevelSecurityFilterResolver extends ResolverBase {
|
|
77718
|
-
@Query(() => RunMJRowLevelSecurityFilterViewResult)
|
|
77719
|
-
async RunMJRowLevelSecurityFilterViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77720
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77721
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
77722
|
-
}
|
|
77723
|
-
|
|
77724
|
-
@Query(() => RunMJRowLevelSecurityFilterViewResult)
|
|
77725
|
-
async RunMJRowLevelSecurityFilterViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77726
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77727
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
77728
|
-
}
|
|
77729
|
-
|
|
77730
|
-
@Query(() => RunMJRowLevelSecurityFilterViewResult)
|
|
77731
|
-
async RunMJRowLevelSecurityFilterDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77732
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77733
|
-
input.EntityName = 'MJ: Row Level Security Filters';
|
|
77734
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
77735
|
-
}
|
|
77736
|
-
@Query(() => MJRowLevelSecurityFilter_, { nullable: true })
|
|
77737
|
-
async MJRowLevelSecurityFilter(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRowLevelSecurityFilter_ | null> {
|
|
77738
|
-
this.CheckUserReadPermissions('MJ: Row Level Security Filters', userPayload);
|
|
77739
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77740
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRowLevelSecurityFilters')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Row Level Security Filters', userPayload, EntityPermissionType.Read, 'AND');
|
|
77741
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77742
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Row Level Security Filters', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
77743
|
-
return result;
|
|
77744
|
-
}
|
|
77745
|
-
|
|
77746
|
-
@Query(() => [MJRowLevelSecurityFilter_])
|
|
77747
|
-
async AllMJRowLevelSecurityFilters(@Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77748
|
-
this.CheckUserReadPermissions('MJ: Row Level Security Filters', userPayload);
|
|
77749
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77750
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRowLevelSecurityFilters')}` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Row Level Security Filters', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
77751
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
77752
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Row Level Security Filters', rows, this.GetUserFromPayload(userPayload));
|
|
77753
|
-
return result;
|
|
77754
|
-
}
|
|
77755
|
-
|
|
77756
|
-
@FieldResolver(() => [MJEntityPermission_])
|
|
77757
|
-
async MJEntityPermissions_DeleteRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77758
|
-
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
77759
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77760
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('DeleteRLSFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
77761
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77762
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
77763
|
-
return result;
|
|
77764
|
-
}
|
|
77765
|
-
|
|
77766
|
-
@FieldResolver(() => [MJEntityPermission_])
|
|
77767
|
-
async MJEntityPermissions_ReadRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77768
|
-
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
77769
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77770
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('ReadRLSFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
77771
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77772
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
77773
|
-
return result;
|
|
77774
|
-
}
|
|
77775
|
-
|
|
77776
|
-
@FieldResolver(() => [MJEntityPermission_])
|
|
77777
|
-
async MJEntityPermissions_CreateRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77778
|
-
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
77779
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77780
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('CreateRLSFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
77781
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77782
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
77783
|
-
return result;
|
|
77784
|
-
}
|
|
77785
|
-
|
|
77786
|
-
@FieldResolver(() => [MJEntityPermission_])
|
|
77787
|
-
async MJEntityPermissions_UpdateRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77788
|
-
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
77789
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77790
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('UpdateRLSFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
77791
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77792
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
77793
|
-
return result;
|
|
77794
|
-
}
|
|
77795
|
-
|
|
77796
|
-
@FieldResolver(() => [MJAPIKeyScope_])
|
|
77797
|
-
async MJAPIKeyScopes_RowFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77798
|
-
this.CheckUserReadPermissions('MJ: API Key Scopes', userPayload);
|
|
77799
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77800
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeyScopes')} WHERE ${provider.QuoteIdentifier('RowFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Key Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
77801
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77802
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Key Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
77803
|
-
return result;
|
|
77804
|
-
}
|
|
77805
|
-
|
|
77806
|
-
@FieldResolver(() => [MJAPIApplicationScope_])
|
|
77807
|
-
async MJAPIApplicationScopes_RowFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77808
|
-
this.CheckUserReadPermissions('MJ: API Application Scopes', userPayload);
|
|
77809
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77810
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIApplicationScopes')} WHERE ${provider.QuoteIdentifier('RowFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Application Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
77811
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77812
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Application Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
77813
|
-
return result;
|
|
77814
|
-
}
|
|
77815
|
-
|
|
77816
|
-
@Mutation(() => MJRowLevelSecurityFilter_)
|
|
77817
|
-
async CreateMJRowLevelSecurityFilter(
|
|
77818
|
-
@Arg('input', () => CreateMJRowLevelSecurityFilterInput) input: CreateMJRowLevelSecurityFilterInput,
|
|
77819
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
77820
|
-
@PubSub() pubSub: PubSubEngine
|
|
77821
|
-
) {
|
|
77822
|
-
const provider = GetReadWriteProvider(providers);
|
|
77823
|
-
return this.CreateRecord('MJ: Row Level Security Filters', input, provider, userPayload, pubSub)
|
|
77824
|
-
}
|
|
77825
|
-
|
|
77826
|
-
@Mutation(() => MJRowLevelSecurityFilter_)
|
|
77827
|
-
async UpdateMJRowLevelSecurityFilter(
|
|
77828
|
-
@Arg('input', () => UpdateMJRowLevelSecurityFilterInput) input: UpdateMJRowLevelSecurityFilterInput,
|
|
77829
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
77830
|
-
@PubSub() pubSub: PubSubEngine
|
|
77831
|
-
) {
|
|
77832
|
-
const provider = GetReadWriteProvider(providers);
|
|
77833
|
-
return this.UpdateRecord('MJ: Row Level Security Filters', input, provider, userPayload, pubSub);
|
|
77834
|
-
}
|
|
77835
|
-
|
|
77836
|
-
@Mutation(() => MJRowLevelSecurityFilter_)
|
|
77837
|
-
async DeleteMJRowLevelSecurityFilter(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77838
|
-
const provider = GetReadWriteProvider(providers);
|
|
77839
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
77840
|
-
return this.DeleteRecord('MJ: Row Level Security Filters', key, options, provider, userPayload, pubSub);
|
|
77841
|
-
}
|
|
77842
|
-
|
|
77843
|
-
}
|
|
77844
|
-
|
|
77845
|
-
//****************************************************************************
|
|
77846
|
-
// ENTITY CLASS for MJ: Scheduled Action Params
|
|
77847
|
-
//****************************************************************************
|
|
77848
|
-
@ObjectType({ description: `Stores parameter values for scheduled action executions, configuring inputs for automated action runs.` })
|
|
77849
|
-
export class MJScheduledActionParam_ {
|
|
77850
|
-
@Field()
|
|
77851
|
-
@MaxLength(36)
|
|
77852
|
-
ID: string;
|
|
77853
|
-
|
|
77854
|
-
@Field()
|
|
77855
|
-
@MaxLength(36)
|
|
77856
|
-
ScheduledActionID: string;
|
|
77857
|
-
|
|
77858
|
-
@Field()
|
|
77859
|
-
@MaxLength(36)
|
|
77860
|
-
ActionParamID: string;
|
|
77861
|
-
|
|
77862
|
-
@Field({description: `Field ValueType for entity Scheduled Action Params.`})
|
|
77863
|
-
@MaxLength(20)
|
|
77864
|
-
ValueType: string;
|
|
77865
|
-
|
|
77866
|
-
@Field({nullable: true, description: `Field Value for entity Scheduled Action Params.`})
|
|
77867
|
-
Value?: string;
|
|
77868
|
-
|
|
77869
|
-
@Field({nullable: true})
|
|
77870
|
-
Comments?: string;
|
|
77871
|
-
|
|
77872
|
-
@Field()
|
|
77873
|
-
_mj__CreatedAt: Date;
|
|
77874
|
-
|
|
77875
|
-
@Field()
|
|
77876
|
-
_mj__UpdatedAt: Date;
|
|
77877
|
-
|
|
77878
|
-
@Field()
|
|
77879
|
-
@MaxLength(255)
|
|
77880
|
-
ScheduledAction: string;
|
|
77881
|
-
|
|
77882
|
-
@Field()
|
|
77883
|
-
@MaxLength(255)
|
|
77884
|
-
ActionParam: string;
|
|
76723
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('RoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
76724
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76725
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
76726
|
+
return result;
|
|
76727
|
+
}
|
|
77885
76728
|
|
|
77886
|
-
|
|
77887
|
-
|
|
77888
|
-
|
|
77889
|
-
// INPUT TYPE for MJ: Scheduled Action Params
|
|
77890
|
-
//****************************************************************************
|
|
77891
|
-
@InputType()
|
|
77892
|
-
export class CreateMJScheduledActionParamInput {
|
|
77893
|
-
@Field({ nullable: true })
|
|
77894
|
-
ID?: string;
|
|
77895
|
-
|
|
77896
|
-
@Field({ nullable: true })
|
|
77897
|
-
ScheduledActionID?: string;
|
|
77898
|
-
|
|
77899
|
-
@Field({ nullable: true })
|
|
77900
|
-
ActionParamID?: string;
|
|
77901
|
-
|
|
77902
|
-
@Field({ nullable: true })
|
|
77903
|
-
ValueType?: string;
|
|
77904
|
-
|
|
77905
|
-
@Field({ nullable: true })
|
|
77906
|
-
Value: string | null;
|
|
77907
|
-
|
|
77908
|
-
@Field({ nullable: true })
|
|
77909
|
-
Comments: string | null;
|
|
77910
|
-
|
|
77911
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
77912
|
-
RestoreContext___?: RestoreContextInput;
|
|
77913
|
-
}
|
|
77914
|
-
|
|
77915
|
-
|
|
77916
|
-
//****************************************************************************
|
|
77917
|
-
// INPUT TYPE for MJ: Scheduled Action Params
|
|
77918
|
-
//****************************************************************************
|
|
77919
|
-
@InputType()
|
|
77920
|
-
export class UpdateMJScheduledActionParamInput {
|
|
77921
|
-
@Field()
|
|
77922
|
-
ID: string;
|
|
77923
|
-
|
|
77924
|
-
@Field({ nullable: true })
|
|
77925
|
-
ScheduledActionID?: string;
|
|
77926
|
-
|
|
77927
|
-
@Field({ nullable: true })
|
|
77928
|
-
ActionParamID?: string;
|
|
77929
|
-
|
|
77930
|
-
@Field({ nullable: true })
|
|
77931
|
-
ValueType?: string;
|
|
77932
|
-
|
|
77933
|
-
@Field({ nullable: true })
|
|
77934
|
-
Value?: string | null;
|
|
77935
|
-
|
|
77936
|
-
@Field({ nullable: true })
|
|
77937
|
-
Comments?: string | null;
|
|
77938
|
-
|
|
77939
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
77940
|
-
OldValues___?: KeyValuePairInput[];
|
|
77941
|
-
|
|
77942
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
77943
|
-
RestoreContext___?: RestoreContextInput;
|
|
77944
|
-
}
|
|
77945
|
-
|
|
77946
|
-
//****************************************************************************
|
|
77947
|
-
// RESOLVER for MJ: Scheduled Action Params
|
|
77948
|
-
//****************************************************************************
|
|
77949
|
-
@ObjectType()
|
|
77950
|
-
export class RunMJScheduledActionParamViewResult {
|
|
77951
|
-
@Field(() => [MJScheduledActionParam_])
|
|
77952
|
-
Results: MJScheduledActionParam_[];
|
|
77953
|
-
|
|
77954
|
-
@Field(() => String, {nullable: true})
|
|
77955
|
-
UserViewRunID?: string;
|
|
77956
|
-
|
|
77957
|
-
@Field(() => Int, {nullable: true})
|
|
77958
|
-
RowCount: number;
|
|
77959
|
-
|
|
77960
|
-
@Field(() => Int, {nullable: true})
|
|
77961
|
-
TotalRowCount: number;
|
|
77962
|
-
|
|
77963
|
-
@Field(() => Int, {nullable: true})
|
|
77964
|
-
ExecutionTime: number;
|
|
77965
|
-
|
|
77966
|
-
@Field({nullable: true})
|
|
77967
|
-
ErrorMessage?: string;
|
|
77968
|
-
|
|
77969
|
-
@Field(() => Boolean, {nullable: false})
|
|
77970
|
-
Success: boolean;
|
|
77971
|
-
}
|
|
77972
|
-
|
|
77973
|
-
@Resolver(MJScheduledActionParam_)
|
|
77974
|
-
export class MJScheduledActionParamResolver extends ResolverBase {
|
|
77975
|
-
@Query(() => RunMJScheduledActionParamViewResult)
|
|
77976
|
-
async RunMJScheduledActionParamViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76729
|
+
@FieldResolver(() => [MJMagicLinkInviteRole_])
|
|
76730
|
+
async MJMagicLinkInviteRoles_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76731
|
+
this.CheckUserReadPermissions('MJ: Magic Link Invite Roles', userPayload);
|
|
77977
76732
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77978
|
-
|
|
76733
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMagicLinkInviteRoles')} WHERE ${provider.QuoteIdentifier('RoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Magic Link Invite Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
76734
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76735
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Magic Link Invite Roles', rows, this.GetUserFromPayload(userPayload));
|
|
76736
|
+
return result;
|
|
77979
76737
|
}
|
|
77980
|
-
|
|
77981
|
-
@
|
|
77982
|
-
async
|
|
76738
|
+
|
|
76739
|
+
@FieldResolver(() => [MJMagicLinkInvite_])
|
|
76740
|
+
async MJMagicLinkInvites_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76741
|
+
this.CheckUserReadPermissions('MJ: Magic Link Invites', userPayload);
|
|
77983
76742
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77984
|
-
|
|
76743
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMagicLinkInvites')} WHERE ${provider.QuoteIdentifier('RoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Magic Link Invites', userPayload, EntityPermissionType.Read, 'AND');
|
|
76744
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76745
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Magic Link Invites', rows, this.GetUserFromPayload(userPayload));
|
|
76746
|
+
return result;
|
|
77985
76747
|
}
|
|
77986
|
-
|
|
77987
|
-
@
|
|
77988
|
-
async
|
|
76748
|
+
|
|
76749
|
+
@FieldResolver(() => [MJAISkillPermission_])
|
|
76750
|
+
async MJAISkillPermissions_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76751
|
+
this.CheckUserReadPermissions('MJ: AI Skill Permissions', userPayload);
|
|
77989
76752
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77990
|
-
|
|
77991
|
-
|
|
76753
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAISkillPermissions')} WHERE ${provider.QuoteIdentifier('RoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Skill Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
76754
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76755
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Skill Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
76756
|
+
return result;
|
|
77992
76757
|
}
|
|
77993
|
-
|
|
77994
|
-
|
|
77995
|
-
|
|
76758
|
+
|
|
76759
|
+
@FieldResolver(() => [MJConversationWidgetInstance_])
|
|
76760
|
+
async MJConversationWidgetInstances_GuestRoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76761
|
+
this.CheckUserReadPermissions('MJ: Conversation Widget Instances', userPayload);
|
|
77996
76762
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77997
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
77998
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77999
|
-
const result = await this.
|
|
76763
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationWidgetInstances')} WHERE ${provider.QuoteIdentifier('GuestRoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Widget Instances', userPayload, EntityPermissionType.Read, 'AND');
|
|
76764
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76765
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Widget Instances', rows, this.GetUserFromPayload(userPayload));
|
|
78000
76766
|
return result;
|
|
78001
76767
|
}
|
|
78002
|
-
|
|
78003
|
-
@Mutation(() =>
|
|
78004
|
-
async
|
|
78005
|
-
@Arg('input', () =>
|
|
76768
|
+
|
|
76769
|
+
@Mutation(() => MJRole_)
|
|
76770
|
+
async CreateMJRole(
|
|
76771
|
+
@Arg('input', () => CreateMJRoleInput) input: CreateMJRoleInput,
|
|
78006
76772
|
@Ctx() { providers, userPayload }: AppContext,
|
|
78007
76773
|
@PubSub() pubSub: PubSubEngine
|
|
78008
76774
|
) {
|
|
78009
76775
|
const provider = GetReadWriteProvider(providers);
|
|
78010
|
-
return this.CreateRecord('MJ:
|
|
76776
|
+
return this.CreateRecord('MJ: Roles', input, provider, userPayload, pubSub)
|
|
78011
76777
|
}
|
|
78012
76778
|
|
|
78013
|
-
@Mutation(() =>
|
|
78014
|
-
async
|
|
78015
|
-
@Arg('input', () =>
|
|
76779
|
+
@Mutation(() => MJRole_)
|
|
76780
|
+
async UpdateMJRole(
|
|
76781
|
+
@Arg('input', () => UpdateMJRoleInput) input: UpdateMJRoleInput,
|
|
78016
76782
|
@Ctx() { providers, userPayload }: AppContext,
|
|
78017
76783
|
@PubSub() pubSub: PubSubEngine
|
|
78018
76784
|
) {
|
|
78019
76785
|
const provider = GetReadWriteProvider(providers);
|
|
78020
|
-
return this.UpdateRecord('MJ:
|
|
76786
|
+
return this.UpdateRecord('MJ: Roles', input, provider, userPayload, pubSub);
|
|
78021
76787
|
}
|
|
78022
76788
|
|
|
78023
|
-
@Mutation(() =>
|
|
78024
|
-
async
|
|
76789
|
+
@Mutation(() => MJRole_)
|
|
76790
|
+
async DeleteMJRole(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78025
76791
|
const provider = GetReadWriteProvider(providers);
|
|
78026
76792
|
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
78027
|
-
return this.DeleteRecord('MJ:
|
|
76793
|
+
return this.DeleteRecord('MJ: Roles', key, options, provider, userPayload, pubSub);
|
|
78028
76794
|
}
|
|
78029
76795
|
|
|
78030
76796
|
}
|
|
78031
76797
|
|
|
78032
76798
|
//****************************************************************************
|
|
78033
|
-
// ENTITY CLASS for MJ:
|
|
76799
|
+
// ENTITY CLASS for MJ: Row Level Security Filters
|
|
78034
76800
|
//****************************************************************************
|
|
78035
|
-
@ObjectType({ description: `
|
|
78036
|
-
export class
|
|
76801
|
+
@ObjectType({ description: `Defines data access rules that filter records based on user context, implementing fine-grained security at the row level.` })
|
|
76802
|
+
export class MJRowLevelSecurityFilter_ {
|
|
78037
76803
|
@Field()
|
|
78038
76804
|
@MaxLength(36)
|
|
78039
76805
|
ID: string;
|
|
78040
76806
|
|
|
78041
76807
|
@Field()
|
|
78042
|
-
@MaxLength(
|
|
76808
|
+
@MaxLength(100)
|
|
78043
76809
|
Name: string;
|
|
78044
76810
|
|
|
78045
76811
|
@Field({nullable: true})
|
|
78046
76812
|
Description?: string;
|
|
78047
76813
|
|
|
78048
|
-
@Field()
|
|
78049
|
-
|
|
78050
|
-
CreatedByUserID: string;
|
|
78051
|
-
|
|
78052
|
-
@Field()
|
|
78053
|
-
@MaxLength(36)
|
|
78054
|
-
ActionID: string;
|
|
78055
|
-
|
|
78056
|
-
@Field({description: `Type of the scheduled action (Daily, Weekly, Monthly, Yearly, Custom)`})
|
|
78057
|
-
@MaxLength(20)
|
|
78058
|
-
Type: string;
|
|
78059
|
-
|
|
78060
|
-
@Field({nullable: true, description: `Cron expression defining the schedule, automatically maintained by the system unless Type is Custom, in which case the user directly sets this`})
|
|
78061
|
-
@MaxLength(100)
|
|
78062
|
-
CronExpression?: string;
|
|
78063
|
-
|
|
78064
|
-
@Field({description: `Timezone for the scheduled action, if not specified defaults to UTC/Z`})
|
|
78065
|
-
@MaxLength(100)
|
|
78066
|
-
Timezone: string;
|
|
78067
|
-
|
|
78068
|
-
@Field({description: `Status of the scheduled action (Pending, Active, Disabled, Expired)`})
|
|
78069
|
-
@MaxLength(20)
|
|
78070
|
-
Status: string;
|
|
78071
|
-
|
|
78072
|
-
@Field(() => Int, {nullable: true, description: `Interval in days for the scheduled action`})
|
|
78073
|
-
IntervalDays?: number;
|
|
78074
|
-
|
|
78075
|
-
@Field({nullable: true, description: `Day of the week for the scheduled action`})
|
|
78076
|
-
@MaxLength(20)
|
|
78077
|
-
DayOfWeek?: string;
|
|
78078
|
-
|
|
78079
|
-
@Field(() => Int, {nullable: true, description: `Day of the month for the scheduled action`})
|
|
78080
|
-
DayOfMonth?: number;
|
|
78081
|
-
|
|
78082
|
-
@Field({nullable: true, description: `Month for the scheduled action`})
|
|
78083
|
-
@MaxLength(20)
|
|
78084
|
-
Month?: string;
|
|
78085
|
-
|
|
78086
|
-
@Field({nullable: true, description: `Field CustomCronExpression for entity Scheduled Actions.`})
|
|
78087
|
-
@MaxLength(255)
|
|
78088
|
-
CustomCronExpression?: string;
|
|
76814
|
+
@Field({nullable: true, description: `SQL WHERE clause template that filters records based on user context variables.`})
|
|
76815
|
+
FilterText?: string;
|
|
78089
76816
|
|
|
78090
76817
|
@Field()
|
|
78091
76818
|
_mj__CreatedAt: Date;
|
|
@@ -78093,27 +76820,31 @@ export class MJScheduledAction_ {
|
|
|
78093
76820
|
@Field()
|
|
78094
76821
|
_mj__UpdatedAt: Date;
|
|
78095
76822
|
|
|
78096
|
-
@Field()
|
|
78097
|
-
|
|
78098
|
-
CreatedByUser: string;
|
|
78099
|
-
|
|
78100
|
-
@Field()
|
|
78101
|
-
@MaxLength(425)
|
|
78102
|
-
Action: string;
|
|
78103
|
-
|
|
78104
|
-
@Field(() => [MJScheduledActionParam_])
|
|
78105
|
-
MJScheduledActionParams_ScheduledActionIDArray: MJScheduledActionParam_[]; // Link to MJScheduledActionParams
|
|
76823
|
+
@Field(() => [MJEntityPermission_])
|
|
76824
|
+
MJEntityPermissions_DeleteRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
78106
76825
|
|
|
78107
|
-
@Field(() => [
|
|
78108
|
-
|
|
76826
|
+
@Field(() => [MJEntityPermission_])
|
|
76827
|
+
MJEntityPermissions_ReadRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
76828
|
+
|
|
76829
|
+
@Field(() => [MJEntityPermission_])
|
|
76830
|
+
MJEntityPermissions_CreateRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
76831
|
+
|
|
76832
|
+
@Field(() => [MJEntityPermission_])
|
|
76833
|
+
MJEntityPermissions_UpdateRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
76834
|
+
|
|
76835
|
+
@Field(() => [MJAPIKeyScope_])
|
|
76836
|
+
MJAPIKeyScopes_RowFilterIDArray: MJAPIKeyScope_[]; // Link to MJAPIKeyScopes
|
|
76837
|
+
|
|
76838
|
+
@Field(() => [MJAPIApplicationScope_])
|
|
76839
|
+
MJAPIApplicationScopes_RowFilterIDArray: MJAPIApplicationScope_[]; // Link to MJAPIApplicationScopes
|
|
78109
76840
|
|
|
78110
76841
|
}
|
|
78111
76842
|
|
|
78112
76843
|
//****************************************************************************
|
|
78113
|
-
// INPUT TYPE for MJ:
|
|
76844
|
+
// INPUT TYPE for MJ: Row Level Security Filters
|
|
78114
76845
|
//****************************************************************************
|
|
78115
76846
|
@InputType()
|
|
78116
|
-
export class
|
|
76847
|
+
export class CreateMJRowLevelSecurityFilterInput {
|
|
78117
76848
|
@Field({ nullable: true })
|
|
78118
76849
|
ID?: string;
|
|
78119
76850
|
|
|
@@ -78124,37 +76855,7 @@ export class CreateMJScheduledActionInput {
|
|
|
78124
76855
|
Description: string | null;
|
|
78125
76856
|
|
|
78126
76857
|
@Field({ nullable: true })
|
|
78127
|
-
|
|
78128
|
-
|
|
78129
|
-
@Field({ nullable: true })
|
|
78130
|
-
ActionID?: string;
|
|
78131
|
-
|
|
78132
|
-
@Field({ nullable: true })
|
|
78133
|
-
Type?: string;
|
|
78134
|
-
|
|
78135
|
-
@Field({ nullable: true })
|
|
78136
|
-
CronExpression: string | null;
|
|
78137
|
-
|
|
78138
|
-
@Field({ nullable: true })
|
|
78139
|
-
Timezone?: string;
|
|
78140
|
-
|
|
78141
|
-
@Field({ nullable: true })
|
|
78142
|
-
Status?: string;
|
|
78143
|
-
|
|
78144
|
-
@Field(() => Int, { nullable: true })
|
|
78145
|
-
IntervalDays: number | null;
|
|
78146
|
-
|
|
78147
|
-
@Field({ nullable: true })
|
|
78148
|
-
DayOfWeek: string | null;
|
|
78149
|
-
|
|
78150
|
-
@Field(() => Int, { nullable: true })
|
|
78151
|
-
DayOfMonth: number | null;
|
|
78152
|
-
|
|
78153
|
-
@Field({ nullable: true })
|
|
78154
|
-
Month: string | null;
|
|
78155
|
-
|
|
78156
|
-
@Field({ nullable: true })
|
|
78157
|
-
CustomCronExpression: string | null;
|
|
76858
|
+
FilterText: string | null;
|
|
78158
76859
|
|
|
78159
76860
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
78160
76861
|
RestoreContext___?: RestoreContextInput;
|
|
@@ -78162,10 +76863,10 @@ export class CreateMJScheduledActionInput {
|
|
|
78162
76863
|
|
|
78163
76864
|
|
|
78164
76865
|
//****************************************************************************
|
|
78165
|
-
// INPUT TYPE for MJ:
|
|
76866
|
+
// INPUT TYPE for MJ: Row Level Security Filters
|
|
78166
76867
|
//****************************************************************************
|
|
78167
76868
|
@InputType()
|
|
78168
|
-
export class
|
|
76869
|
+
export class UpdateMJRowLevelSecurityFilterInput {
|
|
78169
76870
|
@Field()
|
|
78170
76871
|
ID: string;
|
|
78171
76872
|
|
|
@@ -78176,37 +76877,7 @@ export class UpdateMJScheduledActionInput {
|
|
|
78176
76877
|
Description?: string | null;
|
|
78177
76878
|
|
|
78178
76879
|
@Field({ nullable: true })
|
|
78179
|
-
|
|
78180
|
-
|
|
78181
|
-
@Field({ nullable: true })
|
|
78182
|
-
ActionID?: string;
|
|
78183
|
-
|
|
78184
|
-
@Field({ nullable: true })
|
|
78185
|
-
Type?: string;
|
|
78186
|
-
|
|
78187
|
-
@Field({ nullable: true })
|
|
78188
|
-
CronExpression?: string | null;
|
|
78189
|
-
|
|
78190
|
-
@Field({ nullable: true })
|
|
78191
|
-
Timezone?: string;
|
|
78192
|
-
|
|
78193
|
-
@Field({ nullable: true })
|
|
78194
|
-
Status?: string;
|
|
78195
|
-
|
|
78196
|
-
@Field(() => Int, { nullable: true })
|
|
78197
|
-
IntervalDays?: number | null;
|
|
78198
|
-
|
|
78199
|
-
@Field({ nullable: true })
|
|
78200
|
-
DayOfWeek?: string | null;
|
|
78201
|
-
|
|
78202
|
-
@Field(() => Int, { nullable: true })
|
|
78203
|
-
DayOfMonth?: number | null;
|
|
78204
|
-
|
|
78205
|
-
@Field({ nullable: true })
|
|
78206
|
-
Month?: string | null;
|
|
78207
|
-
|
|
78208
|
-
@Field({ nullable: true })
|
|
78209
|
-
CustomCronExpression?: string | null;
|
|
76880
|
+
FilterText?: string | null;
|
|
78210
76881
|
|
|
78211
76882
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
78212
76883
|
OldValues___?: KeyValuePairInput[];
|
|
@@ -78216,12 +76887,12 @@ export class UpdateMJScheduledActionInput {
|
|
|
78216
76887
|
}
|
|
78217
76888
|
|
|
78218
76889
|
//****************************************************************************
|
|
78219
|
-
// RESOLVER for MJ:
|
|
76890
|
+
// RESOLVER for MJ: Row Level Security Filters
|
|
78220
76891
|
//****************************************************************************
|
|
78221
76892
|
@ObjectType()
|
|
78222
|
-
export class
|
|
78223
|
-
@Field(() => [
|
|
78224
|
-
Results:
|
|
76893
|
+
export class RunMJRowLevelSecurityFilterViewResult {
|
|
76894
|
+
@Field(() => [MJRowLevelSecurityFilter_])
|
|
76895
|
+
Results: MJRowLevelSecurityFilter_[];
|
|
78225
76896
|
|
|
78226
76897
|
@Field(() => String, {nullable: true})
|
|
78227
76898
|
UserViewRunID?: string;
|
|
@@ -78242,81 +76913,131 @@ export class RunMJScheduledActionViewResult {
|
|
|
78242
76913
|
Success: boolean;
|
|
78243
76914
|
}
|
|
78244
76915
|
|
|
78245
|
-
@Resolver(
|
|
78246
|
-
export class
|
|
78247
|
-
@Query(() =>
|
|
78248
|
-
async
|
|
76916
|
+
@Resolver(MJRowLevelSecurityFilter_)
|
|
76917
|
+
export class MJRowLevelSecurityFilterResolver extends ResolverBase {
|
|
76918
|
+
@Query(() => RunMJRowLevelSecurityFilterViewResult)
|
|
76919
|
+
async RunMJRowLevelSecurityFilterViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78249
76920
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78250
76921
|
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
78251
76922
|
}
|
|
78252
76923
|
|
|
78253
|
-
@Query(() =>
|
|
78254
|
-
async
|
|
76924
|
+
@Query(() => RunMJRowLevelSecurityFilterViewResult)
|
|
76925
|
+
async RunMJRowLevelSecurityFilterViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78255
76926
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78256
76927
|
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
78257
76928
|
}
|
|
78258
76929
|
|
|
78259
|
-
@Query(() =>
|
|
78260
|
-
async
|
|
76930
|
+
@Query(() => RunMJRowLevelSecurityFilterViewResult)
|
|
76931
|
+
async RunMJRowLevelSecurityFilterDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78261
76932
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78262
|
-
input.EntityName = 'MJ:
|
|
76933
|
+
input.EntityName = 'MJ: Row Level Security Filters';
|
|
78263
76934
|
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
78264
76935
|
}
|
|
78265
|
-
@Query(() =>
|
|
78266
|
-
async
|
|
78267
|
-
this.CheckUserReadPermissions('MJ:
|
|
76936
|
+
@Query(() => MJRowLevelSecurityFilter_, { nullable: true })
|
|
76937
|
+
async MJRowLevelSecurityFilter(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRowLevelSecurityFilter_ | null> {
|
|
76938
|
+
this.CheckUserReadPermissions('MJ: Row Level Security Filters', userPayload);
|
|
78268
76939
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78269
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
76940
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRowLevelSecurityFilters')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Row Level Security Filters', userPayload, EntityPermissionType.Read, 'AND');
|
|
78270
76941
|
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78271
|
-
const result = await this.MapFieldNamesToCodeNames('MJ:
|
|
76942
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Row Level Security Filters', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
76943
|
+
return result;
|
|
76944
|
+
}
|
|
76945
|
+
|
|
76946
|
+
@Query(() => [MJRowLevelSecurityFilter_])
|
|
76947
|
+
async AllMJRowLevelSecurityFilters(@Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76948
|
+
this.CheckUserReadPermissions('MJ: Row Level Security Filters', userPayload);
|
|
76949
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76950
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRowLevelSecurityFilters')}` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Row Level Security Filters', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
76951
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
76952
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Row Level Security Filters', rows, this.GetUserFromPayload(userPayload));
|
|
78272
76953
|
return result;
|
|
78273
76954
|
}
|
|
78274
76955
|
|
|
78275
|
-
@FieldResolver(() => [
|
|
78276
|
-
async
|
|
78277
|
-
this.CheckUserReadPermissions('MJ:
|
|
76956
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
76957
|
+
async MJEntityPermissions_DeleteRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76958
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
78278
76959
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78279
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
78280
|
-
const rows = await provider.ExecuteSQL(sSQL, [
|
|
78281
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
76960
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('DeleteRLSFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
76961
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76962
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
78282
76963
|
return result;
|
|
78283
76964
|
}
|
|
78284
76965
|
|
|
78285
|
-
@FieldResolver(() => [
|
|
78286
|
-
async
|
|
78287
|
-
this.CheckUserReadPermissions('MJ:
|
|
76966
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
76967
|
+
async MJEntityPermissions_ReadRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76968
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
78288
76969
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78289
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
78290
|
-
const rows = await provider.ExecuteSQL(sSQL, [
|
|
78291
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
76970
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('ReadRLSFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
76971
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76972
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
76973
|
+
return result;
|
|
76974
|
+
}
|
|
76975
|
+
|
|
76976
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
76977
|
+
async MJEntityPermissions_CreateRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76978
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
76979
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76980
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('CreateRLSFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
76981
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76982
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
76983
|
+
return result;
|
|
76984
|
+
}
|
|
76985
|
+
|
|
76986
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
76987
|
+
async MJEntityPermissions_UpdateRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76988
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
76989
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76990
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('UpdateRLSFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
76991
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76992
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
76993
|
+
return result;
|
|
76994
|
+
}
|
|
76995
|
+
|
|
76996
|
+
@FieldResolver(() => [MJAPIKeyScope_])
|
|
76997
|
+
async MJAPIKeyScopes_RowFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76998
|
+
this.CheckUserReadPermissions('MJ: API Key Scopes', userPayload);
|
|
76999
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77000
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeyScopes')} WHERE ${provider.QuoteIdentifier('RowFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Key Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
77001
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77002
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Key Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
77003
|
+
return result;
|
|
77004
|
+
}
|
|
77005
|
+
|
|
77006
|
+
@FieldResolver(() => [MJAPIApplicationScope_])
|
|
77007
|
+
async MJAPIApplicationScopes_RowFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77008
|
+
this.CheckUserReadPermissions('MJ: API Application Scopes', userPayload);
|
|
77009
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77010
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIApplicationScopes')} WHERE ${provider.QuoteIdentifier('RowFilterID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Application Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
77011
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrowlevelsecurityfilter_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77012
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Application Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
78292
77013
|
return result;
|
|
78293
77014
|
}
|
|
78294
77015
|
|
|
78295
|
-
@Mutation(() =>
|
|
78296
|
-
async
|
|
78297
|
-
@Arg('input', () =>
|
|
77016
|
+
@Mutation(() => MJRowLevelSecurityFilter_)
|
|
77017
|
+
async CreateMJRowLevelSecurityFilter(
|
|
77018
|
+
@Arg('input', () => CreateMJRowLevelSecurityFilterInput) input: CreateMJRowLevelSecurityFilterInput,
|
|
78298
77019
|
@Ctx() { providers, userPayload }: AppContext,
|
|
78299
77020
|
@PubSub() pubSub: PubSubEngine
|
|
78300
77021
|
) {
|
|
78301
77022
|
const provider = GetReadWriteProvider(providers);
|
|
78302
|
-
return this.CreateRecord('MJ:
|
|
77023
|
+
return this.CreateRecord('MJ: Row Level Security Filters', input, provider, userPayload, pubSub)
|
|
78303
77024
|
}
|
|
78304
77025
|
|
|
78305
|
-
@Mutation(() =>
|
|
78306
|
-
async
|
|
78307
|
-
@Arg('input', () =>
|
|
77026
|
+
@Mutation(() => MJRowLevelSecurityFilter_)
|
|
77027
|
+
async UpdateMJRowLevelSecurityFilter(
|
|
77028
|
+
@Arg('input', () => UpdateMJRowLevelSecurityFilterInput) input: UpdateMJRowLevelSecurityFilterInput,
|
|
78308
77029
|
@Ctx() { providers, userPayload }: AppContext,
|
|
78309
77030
|
@PubSub() pubSub: PubSubEngine
|
|
78310
77031
|
) {
|
|
78311
77032
|
const provider = GetReadWriteProvider(providers);
|
|
78312
|
-
return this.UpdateRecord('MJ:
|
|
77033
|
+
return this.UpdateRecord('MJ: Row Level Security Filters', input, provider, userPayload, pubSub);
|
|
78313
77034
|
}
|
|
78314
77035
|
|
|
78315
|
-
@Mutation(() =>
|
|
78316
|
-
async
|
|
77036
|
+
@Mutation(() => MJRowLevelSecurityFilter_)
|
|
77037
|
+
async DeleteMJRowLevelSecurityFilter(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78317
77038
|
const provider = GetReadWriteProvider(providers);
|
|
78318
77039
|
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
78319
|
-
return this.DeleteRecord('MJ:
|
|
77040
|
+
return this.DeleteRecord('MJ: Row Level Security Filters', key, options, provider, userPayload, pubSub);
|
|
78320
77041
|
}
|
|
78321
77042
|
|
|
78322
77043
|
}
|
|
@@ -78891,6 +77612,10 @@ export class MJScheduledJob_ {
|
|
|
78891
77612
|
@Field(() => Int, {nullable: true, description: `Optional per-job override for the acquire-time lock lease length, in minutes. When set and positive, the engine uses max(default lease, MaxRuntimeMinutes) as the initial ExpectedCompletionAt — so it only ever EXTENDS the default lease, never shrinks it. Intended for jobs whose work is a single long-running call that cannot heartbeat mid-flight (e.g. one slow synchronous action). Jobs that heartbeat via the plugin opt-in pattern do not need this. NULL = use the engine default lease (LeaseTimeoutMinutes). See plans/scheduled-job-engine-heartbeat-lease.md (GH #2749).`})
|
|
78892
77613
|
MaxRuntimeMinutes?: number;
|
|
78893
77614
|
|
|
77615
|
+
@Field({description: `What this job does about fire times that passed while the scheduler was not running (a deploy, a crash, a sleeping machine). RunOnce (the default) performs a single catch-up run and then resumes the normal schedule — correct for digests, syncs and anything where only the latest state matters, and identical to the behavior every job had before this column existed. RunAll replays each missed occurrence, one per poll tick so a long outage drains gradually rather than dispatching at once — correct for per-period work such as billing or metric snapshots, where skipping a period loses data nothing else recreates. Skip performs no catch-up at all and simply advances to the next future occurrence — correct for work whose value expires, such as a cache warm. A run is only treated as missed when a LATER occurrence has also come due, so a job that merely became due seconds ago is never misclassified; this is evaluated cron-relatively rather than against a fixed grace window, which would misjudge both a per-minute job after a short pause and a monthly job that is a week late.`})
|
|
77616
|
+
@MaxLength(20)
|
|
77617
|
+
MissedRunPolicy: string;
|
|
77618
|
+
|
|
78894
77619
|
@Field()
|
|
78895
77620
|
@MaxLength(100)
|
|
78896
77621
|
JobType: string;
|
|
@@ -78906,6 +77631,9 @@ export class MJScheduledJob_ {
|
|
|
78906
77631
|
@Field(() => [MJScheduledJobRun_])
|
|
78907
77632
|
MJScheduledJobRuns_ScheduledJobIDArray: MJScheduledJobRun_[]; // Link to MJScheduledJobRuns
|
|
78908
77633
|
|
|
77634
|
+
@Field(() => [MJContentSource_])
|
|
77635
|
+
MJContentSources_ScheduledJobIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
77636
|
+
|
|
78909
77637
|
@Field(() => [MJCompanyIntegration_])
|
|
78910
77638
|
MJCompanyIntegrations_ScheduledJobIDArray: MJCompanyIntegration_[]; // Link to MJCompanyIntegrations
|
|
78911
77639
|
|
|
@@ -79000,6 +77728,9 @@ export class CreateMJScheduledJobInput {
|
|
|
79000
77728
|
@Field(() => Int, { nullable: true })
|
|
79001
77729
|
MaxRuntimeMinutes: number | null;
|
|
79002
77730
|
|
|
77731
|
+
@Field({ nullable: true })
|
|
77732
|
+
MissedRunPolicy?: string;
|
|
77733
|
+
|
|
79003
77734
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
79004
77735
|
RestoreContext___?: RestoreContextInput;
|
|
79005
77736
|
}
|
|
@@ -79094,6 +77825,9 @@ export class UpdateMJScheduledJobInput {
|
|
|
79094
77825
|
@Field(() => Int, { nullable: true })
|
|
79095
77826
|
MaxRuntimeMinutes?: number | null;
|
|
79096
77827
|
|
|
77828
|
+
@Field({ nullable: true })
|
|
77829
|
+
MissedRunPolicy?: string;
|
|
77830
|
+
|
|
79097
77831
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
79098
77832
|
OldValues___?: KeyValuePairInput[];
|
|
79099
77833
|
|
|
@@ -79168,6 +77902,16 @@ export class MJScheduledJobResolver extends ResolverBase {
|
|
|
79168
77902
|
return result;
|
|
79169
77903
|
}
|
|
79170
77904
|
|
|
77905
|
+
@FieldResolver(() => [MJContentSource_])
|
|
77906
|
+
async MJContentSources_ScheduledJobIDArray(@Root() mjscheduledjob_: MJScheduledJob_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77907
|
+
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
77908
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77909
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('ScheduledJobID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
77910
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjscheduledjob_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77911
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
77912
|
+
return result;
|
|
77913
|
+
}
|
|
77914
|
+
|
|
79171
77915
|
@FieldResolver(() => [MJCompanyIntegration_])
|
|
79172
77916
|
async MJCompanyIntegrations_ScheduledJobIDArray(@Root() mjscheduledjob_: MJScheduledJob_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
79173
77917
|
this.CheckUserReadPermissions('MJ: Company Integrations', userPayload);
|
|
@@ -85739,6 +84483,19 @@ export class MJTaskDependency_ {
|
|
|
85739
84483
|
@Field()
|
|
85740
84484
|
_mj__UpdatedAt: Date;
|
|
85741
84485
|
|
|
84486
|
+
@Field({nullable: true, description: `Optional boolean expression gating this dependency edge. NULL (the default, and the value every pre-existing row carries) means the edge is unconditional, so adding this column changes the meaning of no existing graph. When present it is evaluated by the shared GraphTraversalEngine against the same context a design-time AIAgentStepPath.Condition sees, which is what lets a runtime task graph and a flow-editor graph be the same graph. A condition that evaluates false skips the edge; one that fails to evaluate ALSO skips it, but is reported distinctly so a graph stalled by a malformed expression cannot be mistaken for one that finished normally.`})
|
|
84487
|
+
Condition?: string;
|
|
84488
|
+
|
|
84489
|
+
@Field(() => Int, {description: `Ordering within an exclusive group — higher wins. Mirrors AIAgentStepPath.Priority so a compiled workflow chooses the same branch the flow editor shows. Ignored for edges that are not part of an ExclusiveGroup.`})
|
|
84490
|
+
Priority: number;
|
|
84491
|
+
|
|
84492
|
+
@Field(() => Int, {description: `Deterministic tiebreak when two edges in an ExclusiveGroup share a Priority, applied ascending. Load-bearing rather than cosmetic: compiled dependencies get fresh UUIDs and Priority defaults to 0, so without a stored ordinal a tie would resolve by row order and the same workflow could take a different branch on a different machine.`})
|
|
84493
|
+
Sequence: number;
|
|
84494
|
+
|
|
84495
|
+
@Field({nullable: true, description: `XOR group key: sibling edges leaving the same origin that share a non-null ExclusiveGroup are an exclusive fan-out. The highest-Priority satisfied edge wins, ties broken by ascending Sequence; the rest are Skipped. NULL (the default) means an ordinary dependency, so existing graphs are unaffected. An unevaluable condition anywhere in the group holds the whole group rather than firing every branch.`})
|
|
84496
|
+
@MaxLength(255)
|
|
84497
|
+
ExclusiveGroup?: string;
|
|
84498
|
+
|
|
85742
84499
|
@Field()
|
|
85743
84500
|
@MaxLength(255)
|
|
85744
84501
|
Task: string;
|
|
@@ -85766,6 +84523,18 @@ export class CreateMJTaskDependencyInput {
|
|
|
85766
84523
|
@Field({ nullable: true })
|
|
85767
84524
|
DependencyType?: string;
|
|
85768
84525
|
|
|
84526
|
+
@Field({ nullable: true })
|
|
84527
|
+
Condition: string | null;
|
|
84528
|
+
|
|
84529
|
+
@Field(() => Int, { nullable: true })
|
|
84530
|
+
Priority?: number;
|
|
84531
|
+
|
|
84532
|
+
@Field(() => Int, { nullable: true })
|
|
84533
|
+
Sequence?: number;
|
|
84534
|
+
|
|
84535
|
+
@Field({ nullable: true })
|
|
84536
|
+
ExclusiveGroup: string | null;
|
|
84537
|
+
|
|
85769
84538
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
85770
84539
|
RestoreContext___?: RestoreContextInput;
|
|
85771
84540
|
}
|
|
@@ -85788,6 +84557,18 @@ export class UpdateMJTaskDependencyInput {
|
|
|
85788
84557
|
@Field({ nullable: true })
|
|
85789
84558
|
DependencyType?: string;
|
|
85790
84559
|
|
|
84560
|
+
@Field({ nullable: true })
|
|
84561
|
+
Condition?: string | null;
|
|
84562
|
+
|
|
84563
|
+
@Field(() => Int, { nullable: true })
|
|
84564
|
+
Priority?: number;
|
|
84565
|
+
|
|
84566
|
+
@Field(() => Int, { nullable: true })
|
|
84567
|
+
Sequence?: number;
|
|
84568
|
+
|
|
84569
|
+
@Field({ nullable: true })
|
|
84570
|
+
ExclusiveGroup?: string | null;
|
|
84571
|
+
|
|
85791
84572
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
85792
84573
|
OldValues___?: KeyValuePairInput[];
|
|
85793
84574
|
|
|
@@ -86088,7 +84869,7 @@ export class MJTask_ {
|
|
|
86088
84869
|
@MaxLength(36)
|
|
86089
84870
|
AgentID?: string;
|
|
86090
84871
|
|
|
86091
|
-
@Field({description: `
|
|
84872
|
+
@Field({description: `Lifecycle state. Pending awaits prerequisites; In Progress is claimed and running; Complete succeeded; Failed did not; Blocked can never run because a prerequisite is unsatisfiable; Cancelled was stopped deliberately; Deferred is waiting on a schedule. Skipped is a branch that was NOT TAKEN at an exclusive fan-out — a normal outcome, not a failure: it satisfies dependents (so a join downstream of a fork still runs) and is invisible to failure precedence when the parent rolls up.`})
|
|
86092
84873
|
@MaxLength(50)
|
|
86093
84874
|
Status: string;
|
|
86094
84875
|
|
|
@@ -86110,6 +84891,41 @@ export class MJTask_ {
|
|
|
86110
84891
|
@Field()
|
|
86111
84892
|
_mj__UpdatedAt: Date;
|
|
86112
84893
|
|
|
84894
|
+
@Field({nullable: true, description: `Structured input for this task, stored as JSON. Replaces the legacy __TASK_METADATA__ marker that was embedded in Description.`})
|
|
84895
|
+
InputPayload?: string;
|
|
84896
|
+
|
|
84897
|
+
@Field({nullable: true, description: `Structured output produced by this task, stored as JSON. Downstream tasks read their dependencies' outputs from here. Replaces the legacy __TASK_OUTPUT__ marker that was embedded in Description.`})
|
|
84898
|
+
OutputPayload?: string;
|
|
84899
|
+
|
|
84900
|
+
@Field({nullable: true, description: `Failure detail when Status is Failed. Null for tasks that have not failed.`})
|
|
84901
|
+
ErrorMessage?: string;
|
|
84902
|
+
|
|
84903
|
+
@Field({nullable: true, description: `The specific AI Agent Run that executed this task. Distinct from the conversation-level link: sibling tasks in one graph each get their own run, so this is what run-history and Gantt views should follow.`})
|
|
84904
|
+
@MaxLength(36)
|
|
84905
|
+
AgentRunID?: string;
|
|
84906
|
+
|
|
84907
|
+
@Field({nullable: true, description: `Identifier of the dispatcher instance currently executing this task. Part of the compare-and-swap claim protocol; set only by the dispatcher, never by user-facing writes. Null when unclaimed. Human-assigned tasks never carry a claim.`})
|
|
84908
|
+
@MaxLength(100)
|
|
84909
|
+
ClaimedBy?: string;
|
|
84910
|
+
|
|
84911
|
+
@Field({nullable: true, description: `When the current dispatcher claim lapses. Long-running tasks extend it by heartbeat; reconciliation treats an expired claim as an orphaned task and returns it to Pending.`})
|
|
84912
|
+
ClaimExpiresAt?: Date;
|
|
84913
|
+
|
|
84914
|
+
@Field({nullable: true, description: `The Action this task executes, when the node is action-assigned rather than agent-assigned or awaiting a person. Mutually exclusive with UserID and AgentID (CK_Task_Assignment). Set by durable entity-action dispatch, where a single-node graph carries one action to run with restart recovery.`})
|
|
84915
|
+
@MaxLength(36)
|
|
84916
|
+
ActionID?: string;
|
|
84917
|
+
|
|
84918
|
+
@Field({nullable: true, description: `Which kind of workflow step this task represents. NULL for a task that is not part of a workflow, such as a hand-authored to-do. Determines which of AgentID/ActionID/PromptID/UserID is meaningful and how Configuration is read. This is the executable vocabulary and is deliberately not the same value list as AIAgentStep.StepType, which describes a step at design time.`})
|
|
84919
|
+
@MaxLength(20)
|
|
84920
|
+
StepType?: string;
|
|
84921
|
+
|
|
84922
|
+
@Field({nullable: true})
|
|
84923
|
+
@MaxLength(36)
|
|
84924
|
+
PromptID?: string;
|
|
84925
|
+
|
|
84926
|
+
@Field({nullable: true, description: `Everything about this step that has no column of its own, as JSON: the loop definition for a ForEach or While step, an agent step's message and template parameters, the mappings that move data between this step and the workflow payload, and the execution policy (timeout, retries, what to do on failure). Typed by ITaskStepConfiguration.`})
|
|
84927
|
+
Configuration?: string;
|
|
84928
|
+
|
|
86113
84929
|
@Field({nullable: true})
|
|
86114
84930
|
@MaxLength(255)
|
|
86115
84931
|
Parent?: string;
|
|
@@ -86138,6 +84954,18 @@ export class MJTask_ {
|
|
|
86138
84954
|
@MaxLength(255)
|
|
86139
84955
|
Agent?: string;
|
|
86140
84956
|
|
|
84957
|
+
@Field({nullable: true})
|
|
84958
|
+
@MaxLength(255)
|
|
84959
|
+
AgentRun?: string;
|
|
84960
|
+
|
|
84961
|
+
@Field({nullable: true})
|
|
84962
|
+
@MaxLength(425)
|
|
84963
|
+
Action?: string;
|
|
84964
|
+
|
|
84965
|
+
@Field({nullable: true})
|
|
84966
|
+
@MaxLength(255)
|
|
84967
|
+
Prompt?: string;
|
|
84968
|
+
|
|
86141
84969
|
@Field({nullable: true})
|
|
86142
84970
|
@MaxLength(36)
|
|
86143
84971
|
RootParentID?: string;
|
|
@@ -86148,6 +84976,9 @@ export class MJTask_ {
|
|
|
86148
84976
|
@Field(() => [MJTaskDependency_])
|
|
86149
84977
|
MJTaskDependencies_DependsOnTaskIDArray: MJTaskDependency_[]; // Link to MJTaskDependencies
|
|
86150
84978
|
|
|
84979
|
+
@Field(() => [MJAIAgentRequest_])
|
|
84980
|
+
MJAIAgentRequests_OriginatingTaskIDArray: MJAIAgentRequest_[]; // Link to MJAIAgentRequests
|
|
84981
|
+
|
|
86151
84982
|
@Field(() => [MJTask_])
|
|
86152
84983
|
MJTasks_ParentIDArray: MJTask_[]; // Link to MJTasks
|
|
86153
84984
|
|
|
@@ -86203,6 +85034,36 @@ export class CreateMJTaskInput {
|
|
|
86203
85034
|
@Field({ nullable: true })
|
|
86204
85035
|
CompletedAt: Date | null;
|
|
86205
85036
|
|
|
85037
|
+
@Field({ nullable: true })
|
|
85038
|
+
InputPayload: string | null;
|
|
85039
|
+
|
|
85040
|
+
@Field({ nullable: true })
|
|
85041
|
+
OutputPayload: string | null;
|
|
85042
|
+
|
|
85043
|
+
@Field({ nullable: true })
|
|
85044
|
+
ErrorMessage: string | null;
|
|
85045
|
+
|
|
85046
|
+
@Field({ nullable: true })
|
|
85047
|
+
AgentRunID: string | null;
|
|
85048
|
+
|
|
85049
|
+
@Field({ nullable: true })
|
|
85050
|
+
ClaimedBy: string | null;
|
|
85051
|
+
|
|
85052
|
+
@Field({ nullable: true })
|
|
85053
|
+
ClaimExpiresAt: Date | null;
|
|
85054
|
+
|
|
85055
|
+
@Field({ nullable: true })
|
|
85056
|
+
ActionID: string | null;
|
|
85057
|
+
|
|
85058
|
+
@Field({ nullable: true })
|
|
85059
|
+
StepType: string | null;
|
|
85060
|
+
|
|
85061
|
+
@Field({ nullable: true })
|
|
85062
|
+
PromptID: string | null;
|
|
85063
|
+
|
|
85064
|
+
@Field({ nullable: true })
|
|
85065
|
+
Configuration: string | null;
|
|
85066
|
+
|
|
86206
85067
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
86207
85068
|
RestoreContext___?: RestoreContextInput;
|
|
86208
85069
|
}
|
|
@@ -86258,6 +85119,36 @@ export class UpdateMJTaskInput {
|
|
|
86258
85119
|
@Field({ nullable: true })
|
|
86259
85120
|
CompletedAt?: Date | null;
|
|
86260
85121
|
|
|
85122
|
+
@Field({ nullable: true })
|
|
85123
|
+
InputPayload?: string | null;
|
|
85124
|
+
|
|
85125
|
+
@Field({ nullable: true })
|
|
85126
|
+
OutputPayload?: string | null;
|
|
85127
|
+
|
|
85128
|
+
@Field({ nullable: true })
|
|
85129
|
+
ErrorMessage?: string | null;
|
|
85130
|
+
|
|
85131
|
+
@Field({ nullable: true })
|
|
85132
|
+
AgentRunID?: string | null;
|
|
85133
|
+
|
|
85134
|
+
@Field({ nullable: true })
|
|
85135
|
+
ClaimedBy?: string | null;
|
|
85136
|
+
|
|
85137
|
+
@Field({ nullable: true })
|
|
85138
|
+
ClaimExpiresAt?: Date | null;
|
|
85139
|
+
|
|
85140
|
+
@Field({ nullable: true })
|
|
85141
|
+
ActionID?: string | null;
|
|
85142
|
+
|
|
85143
|
+
@Field({ nullable: true })
|
|
85144
|
+
StepType?: string | null;
|
|
85145
|
+
|
|
85146
|
+
@Field({ nullable: true })
|
|
85147
|
+
PromptID?: string | null;
|
|
85148
|
+
|
|
85149
|
+
@Field({ nullable: true })
|
|
85150
|
+
Configuration?: string | null;
|
|
85151
|
+
|
|
86261
85152
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
86262
85153
|
OldValues___?: KeyValuePairInput[];
|
|
86263
85154
|
|
|
@@ -86342,6 +85233,16 @@ export class MJTaskResolver extends ResolverBase {
|
|
|
86342
85233
|
return result;
|
|
86343
85234
|
}
|
|
86344
85235
|
|
|
85236
|
+
@FieldResolver(() => [MJAIAgentRequest_])
|
|
85237
|
+
async MJAIAgentRequests_OriginatingTaskIDArray(@Root() mjtask_: MJTask_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
85238
|
+
this.CheckUserReadPermissions('MJ: AI Agent Requests', userPayload);
|
|
85239
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
85240
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRequests')} WHERE ${provider.QuoteIdentifier('OriginatingTaskID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Requests', userPayload, EntityPermissionType.Read, 'AND');
|
|
85241
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjtask_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
85242
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Requests', rows, this.GetUserFromPayload(userPayload));
|
|
85243
|
+
return result;
|
|
85244
|
+
}
|
|
85245
|
+
|
|
86345
85246
|
@FieldResolver(() => [MJTask_])
|
|
86346
85247
|
async MJTasks_ParentIDArray(@Root() mjtask_: MJTask_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
86347
85248
|
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
@@ -94207,15 +93108,6 @@ export class MJUser_ {
|
|
|
94207
93108
|
@Field(() => [MJRecordMergeLog_])
|
|
94208
93109
|
MJRecordMergeLogs_ApprovedByUserIDArray: MJRecordMergeLog_[]; // Link to MJRecordMergeLogs
|
|
94209
93110
|
|
|
94210
|
-
@Field(() => [MJReportCategory_])
|
|
94211
|
-
MJReportCategories_UserIDArray: MJReportCategory_[]; // Link to MJReportCategories
|
|
94212
|
-
|
|
94213
|
-
@Field(() => [MJReportSnapshot_])
|
|
94214
|
-
MJReportSnapshots_UserIDArray: MJReportSnapshot_[]; // Link to MJReportSnapshots
|
|
94215
|
-
|
|
94216
|
-
@Field(() => [MJReport_])
|
|
94217
|
-
MJReports_UserIDArray: MJReport_[]; // Link to MJReports
|
|
94218
|
-
|
|
94219
93111
|
@Field(() => [MJTemplateCategory_])
|
|
94220
93112
|
MJTemplateCategories_UserIDArray: MJTemplateCategory_[]; // Link to MJTemplateCategories
|
|
94221
93113
|
|
|
@@ -94324,18 +93216,12 @@ export class MJUser_ {
|
|
|
94324
93216
|
@Field(() => [MJPublicLink_])
|
|
94325
93217
|
MJPublicLinks_UserIDArray: MJPublicLink_[]; // Link to MJPublicLinks
|
|
94326
93218
|
|
|
94327
|
-
@Field(() => [MJReportUserState_])
|
|
94328
|
-
MJReportUserStates_UserIDArray: MJReportUserState_[]; // Link to MJReportUserStates
|
|
94329
|
-
|
|
94330
93219
|
@Field(() => [MJResourceLink_])
|
|
94331
93220
|
MJResourceLinks_UserIDArray: MJResourceLink_[]; // Link to MJResourceLinks
|
|
94332
93221
|
|
|
94333
93222
|
@Field(() => [MJResourcePermission_])
|
|
94334
93223
|
MJResourcePermissions_SharedByUserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
|
|
94335
93224
|
|
|
94336
|
-
@Field(() => [MJScheduledAction_])
|
|
94337
|
-
MJScheduledActions_CreatedByUserIDArray: MJScheduledAction_[]; // Link to MJScheduledActions
|
|
94338
|
-
|
|
94339
93225
|
@Field(() => [MJScheduledJobRun_])
|
|
94340
93226
|
MJScheduledJobRuns_ExecutedByUserIDArray: MJScheduledJobRun_[]; // Link to MJScheduledJobRuns
|
|
94341
93227
|
|
|
@@ -94821,36 +93707,6 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
94821
93707
|
return result;
|
|
94822
93708
|
}
|
|
94823
93709
|
|
|
94824
|
-
@FieldResolver(() => [MJReportCategory_])
|
|
94825
|
-
async MJReportCategories_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
94826
|
-
this.CheckUserReadPermissions('MJ: Report Categories', userPayload);
|
|
94827
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
94828
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportCategories')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
94829
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
94830
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Categories', rows, this.GetUserFromPayload(userPayload));
|
|
94831
|
-
return result;
|
|
94832
|
-
}
|
|
94833
|
-
|
|
94834
|
-
@FieldResolver(() => [MJReportSnapshot_])
|
|
94835
|
-
async MJReportSnapshots_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
94836
|
-
this.CheckUserReadPermissions('MJ: Report Snapshots', userPayload);
|
|
94837
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
94838
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportSnapshots')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
94839
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
94840
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Snapshots', rows, this.GetUserFromPayload(userPayload));
|
|
94841
|
-
return result;
|
|
94842
|
-
}
|
|
94843
|
-
|
|
94844
|
-
@FieldResolver(() => [MJReport_])
|
|
94845
|
-
async MJReports_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
94846
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
94847
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
94848
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
94849
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
94850
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
94851
|
-
return result;
|
|
94852
|
-
}
|
|
94853
|
-
|
|
94854
93710
|
@FieldResolver(() => [MJTemplateCategory_])
|
|
94855
93711
|
async MJTemplateCategories_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
94856
93712
|
this.CheckUserReadPermissions('MJ: Template Categories', userPayload);
|
|
@@ -95211,16 +94067,6 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
95211
94067
|
return result;
|
|
95212
94068
|
}
|
|
95213
94069
|
|
|
95214
|
-
@FieldResolver(() => [MJReportUserState_])
|
|
95215
|
-
async MJReportUserStates_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
95216
|
-
this.CheckUserReadPermissions('MJ: Report User States', userPayload);
|
|
95217
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95218
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportUserStates')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report User States', userPayload, EntityPermissionType.Read, 'AND');
|
|
95219
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
95220
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report User States', rows, this.GetUserFromPayload(userPayload));
|
|
95221
|
-
return result;
|
|
95222
|
-
}
|
|
95223
|
-
|
|
95224
94070
|
@FieldResolver(() => [MJResourceLink_])
|
|
95225
94071
|
async MJResourceLinks_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
95226
94072
|
this.CheckUserReadPermissions('MJ: Resource Links', userPayload);
|
|
@@ -95241,16 +94087,6 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
95241
94087
|
return result;
|
|
95242
94088
|
}
|
|
95243
94089
|
|
|
95244
|
-
@FieldResolver(() => [MJScheduledAction_])
|
|
95245
|
-
async MJScheduledActions_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
95246
|
-
this.CheckUserReadPermissions('MJ: Scheduled Actions', userPayload);
|
|
95247
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95248
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledActions')} WHERE ${provider.QuoteIdentifier('CreatedByUserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
95249
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
95250
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Actions', rows, this.GetUserFromPayload(userPayload));
|
|
95251
|
-
return result;
|
|
95252
|
-
}
|
|
95253
|
-
|
|
95254
94090
|
@FieldResolver(() => [MJScheduledJobRun_])
|
|
95255
94091
|
async MJScheduledJobRuns_ExecutedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
95256
94092
|
this.CheckUserReadPermissions('MJ: Scheduled Job Runs', userPayload);
|
|
@@ -97445,622 +96281,6 @@ export class MJViewTypeResolver extends ResolverBase {
|
|
|
97445
96281
|
|
|
97446
96282
|
}
|
|
97447
96283
|
|
|
97448
|
-
//****************************************************************************
|
|
97449
|
-
// ENTITY CLASS for MJ: Workflow Engines
|
|
97450
|
-
//****************************************************************************
|
|
97451
|
-
@ObjectType({ description: `Registers available workflow execution engines with their capabilities, configuration, and supported workflow types.` })
|
|
97452
|
-
export class MJWorkflowEngine_ {
|
|
97453
|
-
@Field()
|
|
97454
|
-
@MaxLength(36)
|
|
97455
|
-
ID: string;
|
|
97456
|
-
|
|
97457
|
-
@Field()
|
|
97458
|
-
@MaxLength(100)
|
|
97459
|
-
Name: string;
|
|
97460
|
-
|
|
97461
|
-
@Field({nullable: true})
|
|
97462
|
-
Description?: string;
|
|
97463
|
-
|
|
97464
|
-
@Field({description: `Import path for the workflow engine driver.`})
|
|
97465
|
-
@MaxLength(500)
|
|
97466
|
-
DriverPath: string;
|
|
97467
|
-
|
|
97468
|
-
@Field({description: `Class name implementing the workflow engine interface.`})
|
|
97469
|
-
@MaxLength(100)
|
|
97470
|
-
DriverClass: string;
|
|
97471
|
-
|
|
97472
|
-
@Field()
|
|
97473
|
-
_mj__CreatedAt: Date;
|
|
97474
|
-
|
|
97475
|
-
@Field()
|
|
97476
|
-
_mj__UpdatedAt: Date;
|
|
97477
|
-
|
|
97478
|
-
@Field(() => [MJWorkflow_])
|
|
97479
|
-
MJWorkflows_WorkflowEngineIDArray: MJWorkflow_[]; // Link to MJWorkflows
|
|
97480
|
-
|
|
97481
|
-
}
|
|
97482
|
-
|
|
97483
|
-
//****************************************************************************
|
|
97484
|
-
// INPUT TYPE for MJ: Workflow Engines
|
|
97485
|
-
//****************************************************************************
|
|
97486
|
-
@InputType()
|
|
97487
|
-
export class CreateMJWorkflowEngineInput {
|
|
97488
|
-
@Field({ nullable: true })
|
|
97489
|
-
ID?: string;
|
|
97490
|
-
|
|
97491
|
-
@Field({ nullable: true })
|
|
97492
|
-
Name?: string;
|
|
97493
|
-
|
|
97494
|
-
@Field({ nullable: true })
|
|
97495
|
-
Description: string | null;
|
|
97496
|
-
|
|
97497
|
-
@Field({ nullable: true })
|
|
97498
|
-
DriverPath?: string;
|
|
97499
|
-
|
|
97500
|
-
@Field({ nullable: true })
|
|
97501
|
-
DriverClass?: string;
|
|
97502
|
-
|
|
97503
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97504
|
-
RestoreContext___?: RestoreContextInput;
|
|
97505
|
-
}
|
|
97506
|
-
|
|
97507
|
-
|
|
97508
|
-
//****************************************************************************
|
|
97509
|
-
// INPUT TYPE for MJ: Workflow Engines
|
|
97510
|
-
//****************************************************************************
|
|
97511
|
-
@InputType()
|
|
97512
|
-
export class UpdateMJWorkflowEngineInput {
|
|
97513
|
-
@Field()
|
|
97514
|
-
ID: string;
|
|
97515
|
-
|
|
97516
|
-
@Field({ nullable: true })
|
|
97517
|
-
Name?: string;
|
|
97518
|
-
|
|
97519
|
-
@Field({ nullable: true })
|
|
97520
|
-
Description?: string | null;
|
|
97521
|
-
|
|
97522
|
-
@Field({ nullable: true })
|
|
97523
|
-
DriverPath?: string;
|
|
97524
|
-
|
|
97525
|
-
@Field({ nullable: true })
|
|
97526
|
-
DriverClass?: string;
|
|
97527
|
-
|
|
97528
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
97529
|
-
OldValues___?: KeyValuePairInput[];
|
|
97530
|
-
|
|
97531
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97532
|
-
RestoreContext___?: RestoreContextInput;
|
|
97533
|
-
}
|
|
97534
|
-
|
|
97535
|
-
//****************************************************************************
|
|
97536
|
-
// RESOLVER for MJ: Workflow Engines
|
|
97537
|
-
//****************************************************************************
|
|
97538
|
-
@ObjectType()
|
|
97539
|
-
export class RunMJWorkflowEngineViewResult {
|
|
97540
|
-
@Field(() => [MJWorkflowEngine_])
|
|
97541
|
-
Results: MJWorkflowEngine_[];
|
|
97542
|
-
|
|
97543
|
-
@Field(() => String, {nullable: true})
|
|
97544
|
-
UserViewRunID?: string;
|
|
97545
|
-
|
|
97546
|
-
@Field(() => Int, {nullable: true})
|
|
97547
|
-
RowCount: number;
|
|
97548
|
-
|
|
97549
|
-
@Field(() => Int, {nullable: true})
|
|
97550
|
-
TotalRowCount: number;
|
|
97551
|
-
|
|
97552
|
-
@Field(() => Int, {nullable: true})
|
|
97553
|
-
ExecutionTime: number;
|
|
97554
|
-
|
|
97555
|
-
@Field({nullable: true})
|
|
97556
|
-
ErrorMessage?: string;
|
|
97557
|
-
|
|
97558
|
-
@Field(() => Boolean, {nullable: false})
|
|
97559
|
-
Success: boolean;
|
|
97560
|
-
}
|
|
97561
|
-
|
|
97562
|
-
@Resolver(MJWorkflowEngine_)
|
|
97563
|
-
export class MJWorkflowEngineResolver extends ResolverBase {
|
|
97564
|
-
@Query(() => RunMJWorkflowEngineViewResult)
|
|
97565
|
-
async RunMJWorkflowEngineViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97566
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97567
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97568
|
-
}
|
|
97569
|
-
|
|
97570
|
-
@Query(() => RunMJWorkflowEngineViewResult)
|
|
97571
|
-
async RunMJWorkflowEngineViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97572
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97573
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97574
|
-
}
|
|
97575
|
-
|
|
97576
|
-
@Query(() => RunMJWorkflowEngineViewResult)
|
|
97577
|
-
async RunMJWorkflowEngineDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97578
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97579
|
-
input.EntityName = 'MJ: Workflow Engines';
|
|
97580
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
97581
|
-
}
|
|
97582
|
-
@Query(() => MJWorkflowEngine_, { nullable: true })
|
|
97583
|
-
async MJWorkflowEngine(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJWorkflowEngine_ | null> {
|
|
97584
|
-
this.CheckUserReadPermissions('MJ: Workflow Engines', userPayload);
|
|
97585
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97586
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflowEngines')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflow Engines', userPayload, EntityPermissionType.Read, 'AND');
|
|
97587
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
97588
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Workflow Engines', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
97589
|
-
return result;
|
|
97590
|
-
}
|
|
97591
|
-
|
|
97592
|
-
@FieldResolver(() => [MJWorkflow_])
|
|
97593
|
-
async MJWorkflows_WorkflowEngineIDArray(@Root() mjworkflowengine_: MJWorkflowEngine_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97594
|
-
this.CheckUserReadPermissions('MJ: Workflows', userPayload);
|
|
97595
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97596
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflows')} WHERE ${provider.QuoteIdentifier('WorkflowEngineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflows', userPayload, EntityPermissionType.Read, 'AND');
|
|
97597
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjworkflowengine_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
97598
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Workflows', rows, this.GetUserFromPayload(userPayload));
|
|
97599
|
-
return result;
|
|
97600
|
-
}
|
|
97601
|
-
|
|
97602
|
-
@Mutation(() => MJWorkflowEngine_)
|
|
97603
|
-
async CreateMJWorkflowEngine(
|
|
97604
|
-
@Arg('input', () => CreateMJWorkflowEngineInput) input: CreateMJWorkflowEngineInput,
|
|
97605
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
97606
|
-
@PubSub() pubSub: PubSubEngine
|
|
97607
|
-
) {
|
|
97608
|
-
const provider = GetReadWriteProvider(providers);
|
|
97609
|
-
return this.CreateRecord('MJ: Workflow Engines', input, provider, userPayload, pubSub)
|
|
97610
|
-
}
|
|
97611
|
-
|
|
97612
|
-
@Mutation(() => MJWorkflowEngine_)
|
|
97613
|
-
async UpdateMJWorkflowEngine(
|
|
97614
|
-
@Arg('input', () => UpdateMJWorkflowEngineInput) input: UpdateMJWorkflowEngineInput,
|
|
97615
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
97616
|
-
@PubSub() pubSub: PubSubEngine
|
|
97617
|
-
) {
|
|
97618
|
-
const provider = GetReadWriteProvider(providers);
|
|
97619
|
-
return this.UpdateRecord('MJ: Workflow Engines', input, provider, userPayload, pubSub);
|
|
97620
|
-
}
|
|
97621
|
-
|
|
97622
|
-
@Mutation(() => MJWorkflowEngine_)
|
|
97623
|
-
async DeleteMJWorkflowEngine(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97624
|
-
const provider = GetReadWriteProvider(providers);
|
|
97625
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
97626
|
-
return this.DeleteRecord('MJ: Workflow Engines', key, options, provider, userPayload, pubSub);
|
|
97627
|
-
}
|
|
97628
|
-
|
|
97629
|
-
}
|
|
97630
|
-
|
|
97631
|
-
//****************************************************************************
|
|
97632
|
-
// ENTITY CLASS for MJ: Workflow Runs
|
|
97633
|
-
//****************************************************************************
|
|
97634
|
-
@ObjectType({ description: `Tracks execution instances of workflows including status, timing, context data, and detailed step-by-step results.` })
|
|
97635
|
-
export class MJWorkflowRun_ {
|
|
97636
|
-
@Field()
|
|
97637
|
-
@MaxLength(36)
|
|
97638
|
-
ID: string;
|
|
97639
|
-
|
|
97640
|
-
@Field()
|
|
97641
|
-
@MaxLength(36)
|
|
97642
|
-
WorkflowID: string;
|
|
97643
|
-
|
|
97644
|
-
@Field({description: `Field ExternalSystemRecordID for entity Workflow Runs.`})
|
|
97645
|
-
@MaxLength(500)
|
|
97646
|
-
ExternalSystemRecordID: string;
|
|
97647
|
-
|
|
97648
|
-
@Field()
|
|
97649
|
-
StartedAt: Date;
|
|
97650
|
-
|
|
97651
|
-
@Field({nullable: true})
|
|
97652
|
-
EndedAt?: Date;
|
|
97653
|
-
|
|
97654
|
-
@Field()
|
|
97655
|
-
@MaxLength(10)
|
|
97656
|
-
Status: string;
|
|
97657
|
-
|
|
97658
|
-
@Field({nullable: true, description: `JSON-formatted detailed results from the workflow execution, including outputs from each step and any error information.`})
|
|
97659
|
-
Results?: string;
|
|
97660
|
-
|
|
97661
|
-
@Field()
|
|
97662
|
-
_mj__CreatedAt: Date;
|
|
97663
|
-
|
|
97664
|
-
@Field()
|
|
97665
|
-
_mj__UpdatedAt: Date;
|
|
97666
|
-
|
|
97667
|
-
@Field()
|
|
97668
|
-
@MaxLength(100)
|
|
97669
|
-
Workflow: string;
|
|
97670
|
-
|
|
97671
|
-
@Field()
|
|
97672
|
-
@MaxLength(100)
|
|
97673
|
-
WorkflowEngineName: string;
|
|
97674
|
-
|
|
97675
|
-
}
|
|
97676
|
-
|
|
97677
|
-
//****************************************************************************
|
|
97678
|
-
// INPUT TYPE for MJ: Workflow Runs
|
|
97679
|
-
//****************************************************************************
|
|
97680
|
-
@InputType()
|
|
97681
|
-
export class CreateMJWorkflowRunInput {
|
|
97682
|
-
@Field({ nullable: true })
|
|
97683
|
-
ID?: string;
|
|
97684
|
-
|
|
97685
|
-
@Field({ nullable: true })
|
|
97686
|
-
WorkflowID?: string;
|
|
97687
|
-
|
|
97688
|
-
@Field({ nullable: true })
|
|
97689
|
-
ExternalSystemRecordID?: string;
|
|
97690
|
-
|
|
97691
|
-
@Field({ nullable: true })
|
|
97692
|
-
StartedAt?: Date;
|
|
97693
|
-
|
|
97694
|
-
@Field({ nullable: true })
|
|
97695
|
-
EndedAt: Date | null;
|
|
97696
|
-
|
|
97697
|
-
@Field({ nullable: true })
|
|
97698
|
-
Status?: string;
|
|
97699
|
-
|
|
97700
|
-
@Field({ nullable: true })
|
|
97701
|
-
Results: string | null;
|
|
97702
|
-
|
|
97703
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97704
|
-
RestoreContext___?: RestoreContextInput;
|
|
97705
|
-
}
|
|
97706
|
-
|
|
97707
|
-
|
|
97708
|
-
//****************************************************************************
|
|
97709
|
-
// INPUT TYPE for MJ: Workflow Runs
|
|
97710
|
-
//****************************************************************************
|
|
97711
|
-
@InputType()
|
|
97712
|
-
export class UpdateMJWorkflowRunInput {
|
|
97713
|
-
@Field()
|
|
97714
|
-
ID: string;
|
|
97715
|
-
|
|
97716
|
-
@Field({ nullable: true })
|
|
97717
|
-
WorkflowID?: string;
|
|
97718
|
-
|
|
97719
|
-
@Field({ nullable: true })
|
|
97720
|
-
ExternalSystemRecordID?: string;
|
|
97721
|
-
|
|
97722
|
-
@Field({ nullable: true })
|
|
97723
|
-
StartedAt?: Date;
|
|
97724
|
-
|
|
97725
|
-
@Field({ nullable: true })
|
|
97726
|
-
EndedAt?: Date | null;
|
|
97727
|
-
|
|
97728
|
-
@Field({ nullable: true })
|
|
97729
|
-
Status?: string;
|
|
97730
|
-
|
|
97731
|
-
@Field({ nullable: true })
|
|
97732
|
-
Results?: string | null;
|
|
97733
|
-
|
|
97734
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
97735
|
-
OldValues___?: KeyValuePairInput[];
|
|
97736
|
-
|
|
97737
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97738
|
-
RestoreContext___?: RestoreContextInput;
|
|
97739
|
-
}
|
|
97740
|
-
|
|
97741
|
-
//****************************************************************************
|
|
97742
|
-
// RESOLVER for MJ: Workflow Runs
|
|
97743
|
-
//****************************************************************************
|
|
97744
|
-
@ObjectType()
|
|
97745
|
-
export class RunMJWorkflowRunViewResult {
|
|
97746
|
-
@Field(() => [MJWorkflowRun_])
|
|
97747
|
-
Results: MJWorkflowRun_[];
|
|
97748
|
-
|
|
97749
|
-
@Field(() => String, {nullable: true})
|
|
97750
|
-
UserViewRunID?: string;
|
|
97751
|
-
|
|
97752
|
-
@Field(() => Int, {nullable: true})
|
|
97753
|
-
RowCount: number;
|
|
97754
|
-
|
|
97755
|
-
@Field(() => Int, {nullable: true})
|
|
97756
|
-
TotalRowCount: number;
|
|
97757
|
-
|
|
97758
|
-
@Field(() => Int, {nullable: true})
|
|
97759
|
-
ExecutionTime: number;
|
|
97760
|
-
|
|
97761
|
-
@Field({nullable: true})
|
|
97762
|
-
ErrorMessage?: string;
|
|
97763
|
-
|
|
97764
|
-
@Field(() => Boolean, {nullable: false})
|
|
97765
|
-
Success: boolean;
|
|
97766
|
-
}
|
|
97767
|
-
|
|
97768
|
-
@Resolver(MJWorkflowRun_)
|
|
97769
|
-
export class MJWorkflowRunResolver extends ResolverBase {
|
|
97770
|
-
@Query(() => RunMJWorkflowRunViewResult)
|
|
97771
|
-
async RunMJWorkflowRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97772
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97773
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97774
|
-
}
|
|
97775
|
-
|
|
97776
|
-
@Query(() => RunMJWorkflowRunViewResult)
|
|
97777
|
-
async RunMJWorkflowRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97778
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97779
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97780
|
-
}
|
|
97781
|
-
|
|
97782
|
-
@Query(() => RunMJWorkflowRunViewResult)
|
|
97783
|
-
async RunMJWorkflowRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97784
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97785
|
-
input.EntityName = 'MJ: Workflow Runs';
|
|
97786
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
97787
|
-
}
|
|
97788
|
-
@Query(() => MJWorkflowRun_, { nullable: true })
|
|
97789
|
-
async MJWorkflowRun(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJWorkflowRun_ | null> {
|
|
97790
|
-
this.CheckUserReadPermissions('MJ: Workflow Runs', userPayload);
|
|
97791
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97792
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflowRuns')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflow Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
97793
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
97794
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Workflow Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
97795
|
-
return result;
|
|
97796
|
-
}
|
|
97797
|
-
|
|
97798
|
-
@Mutation(() => MJWorkflowRun_)
|
|
97799
|
-
async CreateMJWorkflowRun(
|
|
97800
|
-
@Arg('input', () => CreateMJWorkflowRunInput) input: CreateMJWorkflowRunInput,
|
|
97801
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
97802
|
-
@PubSub() pubSub: PubSubEngine
|
|
97803
|
-
) {
|
|
97804
|
-
const provider = GetReadWriteProvider(providers);
|
|
97805
|
-
return this.CreateRecord('MJ: Workflow Runs', input, provider, userPayload, pubSub)
|
|
97806
|
-
}
|
|
97807
|
-
|
|
97808
|
-
@Mutation(() => MJWorkflowRun_)
|
|
97809
|
-
async UpdateMJWorkflowRun(
|
|
97810
|
-
@Arg('input', () => UpdateMJWorkflowRunInput) input: UpdateMJWorkflowRunInput,
|
|
97811
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
97812
|
-
@PubSub() pubSub: PubSubEngine
|
|
97813
|
-
) {
|
|
97814
|
-
const provider = GetReadWriteProvider(providers);
|
|
97815
|
-
return this.UpdateRecord('MJ: Workflow Runs', input, provider, userPayload, pubSub);
|
|
97816
|
-
}
|
|
97817
|
-
|
|
97818
|
-
@Mutation(() => MJWorkflowRun_)
|
|
97819
|
-
async DeleteMJWorkflowRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97820
|
-
const provider = GetReadWriteProvider(providers);
|
|
97821
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
97822
|
-
return this.DeleteRecord('MJ: Workflow Runs', key, options, provider, userPayload, pubSub);
|
|
97823
|
-
}
|
|
97824
|
-
|
|
97825
|
-
}
|
|
97826
|
-
|
|
97827
|
-
//****************************************************************************
|
|
97828
|
-
// ENTITY CLASS for MJ: Workflows
|
|
97829
|
-
//****************************************************************************
|
|
97830
|
-
@ObjectType({ description: `Defines automated workflows with steps, conditions, and actions for orchestrating complex business processes.` })
|
|
97831
|
-
export class MJWorkflow_ {
|
|
97832
|
-
@Field()
|
|
97833
|
-
@MaxLength(36)
|
|
97834
|
-
ID: string;
|
|
97835
|
-
|
|
97836
|
-
@Field()
|
|
97837
|
-
@MaxLength(100)
|
|
97838
|
-
Name: string;
|
|
97839
|
-
|
|
97840
|
-
@Field({nullable: true})
|
|
97841
|
-
Description?: string;
|
|
97842
|
-
|
|
97843
|
-
@Field()
|
|
97844
|
-
@MaxLength(36)
|
|
97845
|
-
WorkflowEngineID: string;
|
|
97846
|
-
|
|
97847
|
-
@Field({description: `The unique identifier of this workflow in an external system, used for synchronization with external workflow engines.`})
|
|
97848
|
-
@MaxLength(100)
|
|
97849
|
-
ExternalSystemRecordID: string;
|
|
97850
|
-
|
|
97851
|
-
@Field(() => Boolean, {description: `If set to 1, the workflow will be run automatically on the interval specified by the AutoRunIntervalType and AutoRunInterval fields`})
|
|
97852
|
-
AutoRunEnabled: boolean;
|
|
97853
|
-
|
|
97854
|
-
@Field({nullable: true, description: `Minutes, Hours, Days, Weeks, Months, Years`})
|
|
97855
|
-
@MaxLength(20)
|
|
97856
|
-
AutoRunIntervalUnits?: string;
|
|
97857
|
-
|
|
97858
|
-
@Field(() => Int, {nullable: true, description: `The interval, denominated in the units specified in the AutoRunIntervalUnits column, between auto runs of this workflow.`})
|
|
97859
|
-
AutoRunInterval?: number;
|
|
97860
|
-
|
|
97861
|
-
@Field({nullable: true, description: `If specified, this subclass key, via the ClassFactory, will be instantiated, to execute this workflow. If not specified the WorkflowBase class will be used by default.`})
|
|
97862
|
-
@MaxLength(200)
|
|
97863
|
-
SubclassName?: string;
|
|
97864
|
-
|
|
97865
|
-
@Field()
|
|
97866
|
-
_mj__CreatedAt: Date;
|
|
97867
|
-
|
|
97868
|
-
@Field()
|
|
97869
|
-
_mj__UpdatedAt: Date;
|
|
97870
|
-
|
|
97871
|
-
@Field(() => Int, {nullable: true})
|
|
97872
|
-
AutoRunIntervalMinutes?: number;
|
|
97873
|
-
|
|
97874
|
-
@Field(() => [MJReport_])
|
|
97875
|
-
MJReports_OutputWorkflowIDArray: MJReport_[]; // Link to MJReports
|
|
97876
|
-
|
|
97877
|
-
@Field(() => [MJWorkflowRun_])
|
|
97878
|
-
MJWorkflowRuns_WorkflowIDArray: MJWorkflowRun_[]; // Link to MJWorkflowRuns
|
|
97879
|
-
|
|
97880
|
-
}
|
|
97881
|
-
|
|
97882
|
-
//****************************************************************************
|
|
97883
|
-
// INPUT TYPE for MJ: Workflows
|
|
97884
|
-
//****************************************************************************
|
|
97885
|
-
@InputType()
|
|
97886
|
-
export class CreateMJWorkflowInput {
|
|
97887
|
-
@Field({ nullable: true })
|
|
97888
|
-
ID?: string;
|
|
97889
|
-
|
|
97890
|
-
@Field({ nullable: true })
|
|
97891
|
-
Name?: string;
|
|
97892
|
-
|
|
97893
|
-
@Field({ nullable: true })
|
|
97894
|
-
Description: string | null;
|
|
97895
|
-
|
|
97896
|
-
@Field({ nullable: true })
|
|
97897
|
-
WorkflowEngineID?: string;
|
|
97898
|
-
|
|
97899
|
-
@Field({ nullable: true })
|
|
97900
|
-
ExternalSystemRecordID?: string;
|
|
97901
|
-
|
|
97902
|
-
@Field(() => Boolean, { nullable: true })
|
|
97903
|
-
AutoRunEnabled?: boolean;
|
|
97904
|
-
|
|
97905
|
-
@Field({ nullable: true })
|
|
97906
|
-
AutoRunIntervalUnits: string | null;
|
|
97907
|
-
|
|
97908
|
-
@Field(() => Int, { nullable: true })
|
|
97909
|
-
AutoRunInterval: number | null;
|
|
97910
|
-
|
|
97911
|
-
@Field({ nullable: true })
|
|
97912
|
-
SubclassName: string | null;
|
|
97913
|
-
|
|
97914
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97915
|
-
RestoreContext___?: RestoreContextInput;
|
|
97916
|
-
}
|
|
97917
|
-
|
|
97918
|
-
|
|
97919
|
-
//****************************************************************************
|
|
97920
|
-
// INPUT TYPE for MJ: Workflows
|
|
97921
|
-
//****************************************************************************
|
|
97922
|
-
@InputType()
|
|
97923
|
-
export class UpdateMJWorkflowInput {
|
|
97924
|
-
@Field()
|
|
97925
|
-
ID: string;
|
|
97926
|
-
|
|
97927
|
-
@Field({ nullable: true })
|
|
97928
|
-
Name?: string;
|
|
97929
|
-
|
|
97930
|
-
@Field({ nullable: true })
|
|
97931
|
-
Description?: string | null;
|
|
97932
|
-
|
|
97933
|
-
@Field({ nullable: true })
|
|
97934
|
-
WorkflowEngineID?: string;
|
|
97935
|
-
|
|
97936
|
-
@Field({ nullable: true })
|
|
97937
|
-
ExternalSystemRecordID?: string;
|
|
97938
|
-
|
|
97939
|
-
@Field(() => Boolean, { nullable: true })
|
|
97940
|
-
AutoRunEnabled?: boolean;
|
|
97941
|
-
|
|
97942
|
-
@Field({ nullable: true })
|
|
97943
|
-
AutoRunIntervalUnits?: string | null;
|
|
97944
|
-
|
|
97945
|
-
@Field(() => Int, { nullable: true })
|
|
97946
|
-
AutoRunInterval?: number | null;
|
|
97947
|
-
|
|
97948
|
-
@Field({ nullable: true })
|
|
97949
|
-
SubclassName?: string | null;
|
|
97950
|
-
|
|
97951
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
97952
|
-
OldValues___?: KeyValuePairInput[];
|
|
97953
|
-
|
|
97954
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97955
|
-
RestoreContext___?: RestoreContextInput;
|
|
97956
|
-
}
|
|
97957
|
-
|
|
97958
|
-
//****************************************************************************
|
|
97959
|
-
// RESOLVER for MJ: Workflows
|
|
97960
|
-
//****************************************************************************
|
|
97961
|
-
@ObjectType()
|
|
97962
|
-
export class RunMJWorkflowViewResult {
|
|
97963
|
-
@Field(() => [MJWorkflow_])
|
|
97964
|
-
Results: MJWorkflow_[];
|
|
97965
|
-
|
|
97966
|
-
@Field(() => String, {nullable: true})
|
|
97967
|
-
UserViewRunID?: string;
|
|
97968
|
-
|
|
97969
|
-
@Field(() => Int, {nullable: true})
|
|
97970
|
-
RowCount: number;
|
|
97971
|
-
|
|
97972
|
-
@Field(() => Int, {nullable: true})
|
|
97973
|
-
TotalRowCount: number;
|
|
97974
|
-
|
|
97975
|
-
@Field(() => Int, {nullable: true})
|
|
97976
|
-
ExecutionTime: number;
|
|
97977
|
-
|
|
97978
|
-
@Field({nullable: true})
|
|
97979
|
-
ErrorMessage?: string;
|
|
97980
|
-
|
|
97981
|
-
@Field(() => Boolean, {nullable: false})
|
|
97982
|
-
Success: boolean;
|
|
97983
|
-
}
|
|
97984
|
-
|
|
97985
|
-
@Resolver(MJWorkflow_)
|
|
97986
|
-
export class MJWorkflowResolver extends ResolverBase {
|
|
97987
|
-
@Query(() => RunMJWorkflowViewResult)
|
|
97988
|
-
async RunMJWorkflowViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97989
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97990
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97991
|
-
}
|
|
97992
|
-
|
|
97993
|
-
@Query(() => RunMJWorkflowViewResult)
|
|
97994
|
-
async RunMJWorkflowViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97995
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97996
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97997
|
-
}
|
|
97998
|
-
|
|
97999
|
-
@Query(() => RunMJWorkflowViewResult)
|
|
98000
|
-
async RunMJWorkflowDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
98001
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98002
|
-
input.EntityName = 'MJ: Workflows';
|
|
98003
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
98004
|
-
}
|
|
98005
|
-
@Query(() => MJWorkflow_, { nullable: true })
|
|
98006
|
-
async MJWorkflow(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJWorkflow_ | null> {
|
|
98007
|
-
this.CheckUserReadPermissions('MJ: Workflows', userPayload);
|
|
98008
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98009
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflows')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflows', userPayload, EntityPermissionType.Read, 'AND');
|
|
98010
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
98011
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Workflows', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
98012
|
-
return result;
|
|
98013
|
-
}
|
|
98014
|
-
|
|
98015
|
-
@FieldResolver(() => [MJReport_])
|
|
98016
|
-
async MJReports_OutputWorkflowIDArray(@Root() mjworkflow_: MJWorkflow_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
98017
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
98018
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98019
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('OutputWorkflowID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
98020
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjworkflow_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
98021
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
98022
|
-
return result;
|
|
98023
|
-
}
|
|
98024
|
-
|
|
98025
|
-
@FieldResolver(() => [MJWorkflowRun_])
|
|
98026
|
-
async MJWorkflowRuns_WorkflowIDArray(@Root() mjworkflow_: MJWorkflow_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
98027
|
-
this.CheckUserReadPermissions('MJ: Workflow Runs', userPayload);
|
|
98028
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98029
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflowRuns')} WHERE ${provider.QuoteIdentifier('WorkflowID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflow Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
98030
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjworkflow_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
98031
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Workflow Runs', rows, this.GetUserFromPayload(userPayload));
|
|
98032
|
-
return result;
|
|
98033
|
-
}
|
|
98034
|
-
|
|
98035
|
-
@Mutation(() => MJWorkflow_)
|
|
98036
|
-
async CreateMJWorkflow(
|
|
98037
|
-
@Arg('input', () => CreateMJWorkflowInput) input: CreateMJWorkflowInput,
|
|
98038
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
98039
|
-
@PubSub() pubSub: PubSubEngine
|
|
98040
|
-
) {
|
|
98041
|
-
const provider = GetReadWriteProvider(providers);
|
|
98042
|
-
return this.CreateRecord('MJ: Workflows', input, provider, userPayload, pubSub)
|
|
98043
|
-
}
|
|
98044
|
-
|
|
98045
|
-
@Mutation(() => MJWorkflow_)
|
|
98046
|
-
async UpdateMJWorkflow(
|
|
98047
|
-
@Arg('input', () => UpdateMJWorkflowInput) input: UpdateMJWorkflowInput,
|
|
98048
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
98049
|
-
@PubSub() pubSub: PubSubEngine
|
|
98050
|
-
) {
|
|
98051
|
-
const provider = GetReadWriteProvider(providers);
|
|
98052
|
-
return this.UpdateRecord('MJ: Workflows', input, provider, userPayload, pubSub);
|
|
98053
|
-
}
|
|
98054
|
-
|
|
98055
|
-
@Mutation(() => MJWorkflow_)
|
|
98056
|
-
async DeleteMJWorkflow(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
98057
|
-
const provider = GetReadWriteProvider(providers);
|
|
98058
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
98059
|
-
return this.DeleteRecord('MJ: Workflows', key, options, provider, userPayload, pubSub);
|
|
98060
|
-
}
|
|
98061
|
-
|
|
98062
|
-
}
|
|
98063
|
-
|
|
98064
96284
|
//****************************************************************************
|
|
98065
96285
|
// ENTITY CLASS for MJ: Workspace Items
|
|
98066
96286
|
//****************************************************************************
|