@memberjunction/server 5.28.0 → 5.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.d.ts +151 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -0
- package/dist/config.js.map +1 -1
- package/dist/generated/generated.d.ts +332 -4
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1862 -24
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/resolvers/FeedbackResolver.d.ts +150 -0
- package/dist/resolvers/FeedbackResolver.d.ts.map +1 -0
- package/dist/resolvers/FeedbackResolver.js +876 -0
- package/dist/resolvers/FeedbackResolver.js.map +1 -0
- package/dist/resolvers/FileResolver.d.ts +27 -0
- package/dist/resolvers/FileResolver.d.ts.map +1 -1
- package/dist/resolvers/FileResolver.js +32 -3
- package/dist/resolvers/FileResolver.js.map +1 -1
- package/dist/resolvers/MCPResolver.d.ts +77 -0
- package/dist/resolvers/MCPResolver.d.ts.map +1 -1
- package/dist/resolvers/MCPResolver.js +300 -1
- package/dist/resolvers/MCPResolver.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +87 -32
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/package.json +68 -66
- package/src/config.ts +19 -0
- package/src/generated/generated.ts +1281 -21
- package/src/index.ts +1 -0
- package/src/resolvers/FeedbackResolver.ts +940 -0
- package/src/resolvers/FileResolver.ts +33 -4
- package/src/resolvers/MCPResolver.ts +297 -1
- package/src/resolvers/RunAIAgentResolver.ts +89 -32
|
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentClientToolEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSearchProviderEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
21
|
+
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentClientToolEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSearchProviderEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -19822,6 +19822,1022 @@ export class MJApplicationResolver extends ResolverBase {
|
|
|
19822
19822
|
|
|
19823
19823
|
}
|
|
19824
19824
|
|
|
19825
|
+
//****************************************************************************
|
|
19826
|
+
// ENTITY CLASS for MJ: Archive Configuration Entities
|
|
19827
|
+
//****************************************************************************
|
|
19828
|
+
@ObjectType({ description: `Per-entity configuration within an archive pipeline. Allows overriding the parent configuration\'s defaults for mode, retention, batch size, and filtering on a per-entity basis.` })
|
|
19829
|
+
export class MJArchiveConfigurationEntity_ {
|
|
19830
|
+
@Field()
|
|
19831
|
+
@MaxLength(36)
|
|
19832
|
+
ID: string;
|
|
19833
|
+
|
|
19834
|
+
@Field({description: `Foreign key to the parent ArchiveConfiguration.`})
|
|
19835
|
+
@MaxLength(36)
|
|
19836
|
+
ArchiveConfigurationID: string;
|
|
19837
|
+
|
|
19838
|
+
@Field({description: `Foreign key to the Entity being archived.`})
|
|
19839
|
+
@MaxLength(36)
|
|
19840
|
+
EntityID: string;
|
|
19841
|
+
|
|
19842
|
+
@Field({nullable: true, description: `Archive mode override for this entity. NULL inherits from the parent configuration's DefaultMode.`})
|
|
19843
|
+
@MaxLength(20)
|
|
19844
|
+
Mode?: string;
|
|
19845
|
+
|
|
19846
|
+
@Field(() => Int, {nullable: true, description: `Retention period override in days. NULL inherits from the parent configuration's DefaultRetentionDays.`})
|
|
19847
|
+
RetentionDays?: number;
|
|
19848
|
+
|
|
19849
|
+
@Field({description: `The date field on the entity used to determine record age for retention policy evaluation. Defaults to __mj_CreatedAt.`})
|
|
19850
|
+
@MaxLength(100)
|
|
19851
|
+
DateField: string;
|
|
19852
|
+
|
|
19853
|
+
@Field({nullable: true, description: `Optional SQL WHERE clause fragment to further filter which records are eligible for archiving (e.g., "Status = 'Closed'").`})
|
|
19854
|
+
FilterExpression?: string;
|
|
19855
|
+
|
|
19856
|
+
@Field(() => Int, {nullable: true, description: `Batch size override for this entity. NULL inherits from the parent configuration's DefaultBatchSize.`})
|
|
19857
|
+
BatchSize?: number;
|
|
19858
|
+
|
|
19859
|
+
@Field(() => Int, {description: `Processing priority — lower numbers are archived first. Default is 100.`})
|
|
19860
|
+
Priority: number;
|
|
19861
|
+
|
|
19862
|
+
@Field({description: `JSON configuration specifying which fields to include/exclude in the archive output. Required for all modes.`})
|
|
19863
|
+
FieldConfiguration: string;
|
|
19864
|
+
|
|
19865
|
+
@Field({nullable: true, description: `Optional fully-qualified class name of a custom archive driver to use for this entity, overriding the default archiver.`})
|
|
19866
|
+
@MaxLength(500)
|
|
19867
|
+
DriverClass?: string;
|
|
19868
|
+
|
|
19869
|
+
@Field(() => Boolean, {nullable: true, description: `Override for archiving related Record Changes. NULL inherits from the parent configuration.`})
|
|
19870
|
+
ArchiveRelatedRecordChanges?: boolean;
|
|
19871
|
+
|
|
19872
|
+
@Field(() => Boolean, {description: `Whether this entity is active within the archive configuration.`})
|
|
19873
|
+
IsActive: boolean;
|
|
19874
|
+
|
|
19875
|
+
@Field()
|
|
19876
|
+
_mj__CreatedAt: Date;
|
|
19877
|
+
|
|
19878
|
+
@Field()
|
|
19879
|
+
_mj__UpdatedAt: Date;
|
|
19880
|
+
|
|
19881
|
+
@Field()
|
|
19882
|
+
@MaxLength(255)
|
|
19883
|
+
ArchiveConfiguration: string;
|
|
19884
|
+
|
|
19885
|
+
@Field()
|
|
19886
|
+
@MaxLength(255)
|
|
19887
|
+
Entity: string;
|
|
19888
|
+
|
|
19889
|
+
}
|
|
19890
|
+
|
|
19891
|
+
//****************************************************************************
|
|
19892
|
+
// INPUT TYPE for MJ: Archive Configuration Entities
|
|
19893
|
+
//****************************************************************************
|
|
19894
|
+
@InputType()
|
|
19895
|
+
export class CreateMJArchiveConfigurationEntityInput {
|
|
19896
|
+
@Field({ nullable: true })
|
|
19897
|
+
ID?: string;
|
|
19898
|
+
|
|
19899
|
+
@Field({ nullable: true })
|
|
19900
|
+
ArchiveConfigurationID?: string;
|
|
19901
|
+
|
|
19902
|
+
@Field({ nullable: true })
|
|
19903
|
+
EntityID?: string;
|
|
19904
|
+
|
|
19905
|
+
@Field({ nullable: true })
|
|
19906
|
+
Mode: string | null;
|
|
19907
|
+
|
|
19908
|
+
@Field(() => Int, { nullable: true })
|
|
19909
|
+
RetentionDays: number | null;
|
|
19910
|
+
|
|
19911
|
+
@Field({ nullable: true })
|
|
19912
|
+
DateField?: string;
|
|
19913
|
+
|
|
19914
|
+
@Field({ nullable: true })
|
|
19915
|
+
FilterExpression: string | null;
|
|
19916
|
+
|
|
19917
|
+
@Field(() => Int, { nullable: true })
|
|
19918
|
+
BatchSize: number | null;
|
|
19919
|
+
|
|
19920
|
+
@Field(() => Int, { nullable: true })
|
|
19921
|
+
Priority?: number;
|
|
19922
|
+
|
|
19923
|
+
@Field({ nullable: true })
|
|
19924
|
+
FieldConfiguration?: string;
|
|
19925
|
+
|
|
19926
|
+
@Field({ nullable: true })
|
|
19927
|
+
DriverClass: string | null;
|
|
19928
|
+
|
|
19929
|
+
@Field(() => Boolean, { nullable: true })
|
|
19930
|
+
ArchiveRelatedRecordChanges: boolean | null;
|
|
19931
|
+
|
|
19932
|
+
@Field(() => Boolean, { nullable: true })
|
|
19933
|
+
IsActive?: boolean;
|
|
19934
|
+
|
|
19935
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
19936
|
+
RestoreContext___?: RestoreContextInput;
|
|
19937
|
+
}
|
|
19938
|
+
|
|
19939
|
+
|
|
19940
|
+
//****************************************************************************
|
|
19941
|
+
// INPUT TYPE for MJ: Archive Configuration Entities
|
|
19942
|
+
//****************************************************************************
|
|
19943
|
+
@InputType()
|
|
19944
|
+
export class UpdateMJArchiveConfigurationEntityInput {
|
|
19945
|
+
@Field()
|
|
19946
|
+
ID: string;
|
|
19947
|
+
|
|
19948
|
+
@Field({ nullable: true })
|
|
19949
|
+
ArchiveConfigurationID?: string;
|
|
19950
|
+
|
|
19951
|
+
@Field({ nullable: true })
|
|
19952
|
+
EntityID?: string;
|
|
19953
|
+
|
|
19954
|
+
@Field({ nullable: true })
|
|
19955
|
+
Mode?: string | null;
|
|
19956
|
+
|
|
19957
|
+
@Field(() => Int, { nullable: true })
|
|
19958
|
+
RetentionDays?: number | null;
|
|
19959
|
+
|
|
19960
|
+
@Field({ nullable: true })
|
|
19961
|
+
DateField?: string;
|
|
19962
|
+
|
|
19963
|
+
@Field({ nullable: true })
|
|
19964
|
+
FilterExpression?: string | null;
|
|
19965
|
+
|
|
19966
|
+
@Field(() => Int, { nullable: true })
|
|
19967
|
+
BatchSize?: number | null;
|
|
19968
|
+
|
|
19969
|
+
@Field(() => Int, { nullable: true })
|
|
19970
|
+
Priority?: number;
|
|
19971
|
+
|
|
19972
|
+
@Field({ nullable: true })
|
|
19973
|
+
FieldConfiguration?: string;
|
|
19974
|
+
|
|
19975
|
+
@Field({ nullable: true })
|
|
19976
|
+
DriverClass?: string | null;
|
|
19977
|
+
|
|
19978
|
+
@Field(() => Boolean, { nullable: true })
|
|
19979
|
+
ArchiveRelatedRecordChanges?: boolean | null;
|
|
19980
|
+
|
|
19981
|
+
@Field(() => Boolean, { nullable: true })
|
|
19982
|
+
IsActive?: boolean;
|
|
19983
|
+
|
|
19984
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
19985
|
+
OldValues___?: KeyValuePairInput[];
|
|
19986
|
+
|
|
19987
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
19988
|
+
RestoreContext___?: RestoreContextInput;
|
|
19989
|
+
}
|
|
19990
|
+
|
|
19991
|
+
//****************************************************************************
|
|
19992
|
+
// RESOLVER for MJ: Archive Configuration Entities
|
|
19993
|
+
//****************************************************************************
|
|
19994
|
+
@ObjectType()
|
|
19995
|
+
export class RunMJArchiveConfigurationEntityViewResult {
|
|
19996
|
+
@Field(() => [MJArchiveConfigurationEntity_])
|
|
19997
|
+
Results: MJArchiveConfigurationEntity_[];
|
|
19998
|
+
|
|
19999
|
+
@Field(() => String, {nullable: true})
|
|
20000
|
+
UserViewRunID?: string;
|
|
20001
|
+
|
|
20002
|
+
@Field(() => Int, {nullable: true})
|
|
20003
|
+
RowCount: number;
|
|
20004
|
+
|
|
20005
|
+
@Field(() => Int, {nullable: true})
|
|
20006
|
+
TotalRowCount: number;
|
|
20007
|
+
|
|
20008
|
+
@Field(() => Int, {nullable: true})
|
|
20009
|
+
ExecutionTime: number;
|
|
20010
|
+
|
|
20011
|
+
@Field({nullable: true})
|
|
20012
|
+
ErrorMessage?: string;
|
|
20013
|
+
|
|
20014
|
+
@Field(() => Boolean, {nullable: false})
|
|
20015
|
+
Success: boolean;
|
|
20016
|
+
}
|
|
20017
|
+
|
|
20018
|
+
@Resolver(MJArchiveConfigurationEntity_)
|
|
20019
|
+
export class MJArchiveConfigurationEntityResolver extends ResolverBase {
|
|
20020
|
+
@Query(() => RunMJArchiveConfigurationEntityViewResult)
|
|
20021
|
+
async RunMJArchiveConfigurationEntityViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20022
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20023
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
20024
|
+
}
|
|
20025
|
+
|
|
20026
|
+
@Query(() => RunMJArchiveConfigurationEntityViewResult)
|
|
20027
|
+
async RunMJArchiveConfigurationEntityViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20028
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20029
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
20030
|
+
}
|
|
20031
|
+
|
|
20032
|
+
@Query(() => RunMJArchiveConfigurationEntityViewResult)
|
|
20033
|
+
async RunMJArchiveConfigurationEntityDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20034
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20035
|
+
input.EntityName = 'MJ: Archive Configuration Entities';
|
|
20036
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
20037
|
+
}
|
|
20038
|
+
@Query(() => MJArchiveConfigurationEntity_, { nullable: true })
|
|
20039
|
+
async MJArchiveConfigurationEntity(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJArchiveConfigurationEntity_ | null> {
|
|
20040
|
+
this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
|
|
20041
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20042
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurationEntities')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configuration Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
20043
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
20044
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
20045
|
+
return result;
|
|
20046
|
+
}
|
|
20047
|
+
|
|
20048
|
+
@Mutation(() => MJArchiveConfigurationEntity_)
|
|
20049
|
+
async CreateMJArchiveConfigurationEntity(
|
|
20050
|
+
@Arg('input', () => CreateMJArchiveConfigurationEntityInput) input: CreateMJArchiveConfigurationEntityInput,
|
|
20051
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
20052
|
+
@PubSub() pubSub: PubSubEngine
|
|
20053
|
+
) {
|
|
20054
|
+
const provider = GetReadWriteProvider(providers);
|
|
20055
|
+
return this.CreateRecord('MJ: Archive Configuration Entities', input, provider, userPayload, pubSub)
|
|
20056
|
+
}
|
|
20057
|
+
|
|
20058
|
+
@Mutation(() => MJArchiveConfigurationEntity_)
|
|
20059
|
+
async UpdateMJArchiveConfigurationEntity(
|
|
20060
|
+
@Arg('input', () => UpdateMJArchiveConfigurationEntityInput) input: UpdateMJArchiveConfigurationEntityInput,
|
|
20061
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
20062
|
+
@PubSub() pubSub: PubSubEngine
|
|
20063
|
+
) {
|
|
20064
|
+
const provider = GetReadWriteProvider(providers);
|
|
20065
|
+
return this.UpdateRecord('MJ: Archive Configuration Entities', input, provider, userPayload, pubSub);
|
|
20066
|
+
}
|
|
20067
|
+
|
|
20068
|
+
@Mutation(() => MJArchiveConfigurationEntity_)
|
|
20069
|
+
async DeleteMJArchiveConfigurationEntity(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20070
|
+
const provider = GetReadWriteProvider(providers);
|
|
20071
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
20072
|
+
return this.DeleteRecord('MJ: Archive Configuration Entities', key, options, provider, userPayload, pubSub);
|
|
20073
|
+
}
|
|
20074
|
+
|
|
20075
|
+
}
|
|
20076
|
+
|
|
20077
|
+
//****************************************************************************
|
|
20078
|
+
// ENTITY CLASS for MJ: Archive Configurations
|
|
20079
|
+
//****************************************************************************
|
|
20080
|
+
@ObjectType({ description: `Top-level configuration for an archive pipeline. Defines the storage target, default retention policy, archive format, and operational mode for archiving entity records.` })
|
|
20081
|
+
export class MJArchiveConfiguration_ {
|
|
20082
|
+
@Field()
|
|
20083
|
+
@MaxLength(36)
|
|
20084
|
+
ID: string;
|
|
20085
|
+
|
|
20086
|
+
@Field({description: `Human-readable name for this archive configuration.`})
|
|
20087
|
+
@MaxLength(255)
|
|
20088
|
+
Name: string;
|
|
20089
|
+
|
|
20090
|
+
@Field({nullable: true})
|
|
20091
|
+
Description?: string;
|
|
20092
|
+
|
|
20093
|
+
@Field({nullable: true, description: `Foreign key to FileStorageAccount — the blob/file storage target for archived data.`})
|
|
20094
|
+
@MaxLength(36)
|
|
20095
|
+
StorageAccountID?: string;
|
|
20096
|
+
|
|
20097
|
+
@Field({description: `Root path within the storage account where archive files are written (e.g., "archives/production/").`})
|
|
20098
|
+
@MaxLength(500)
|
|
20099
|
+
RootPath: string;
|
|
20100
|
+
|
|
20101
|
+
@Field({description: `Output format for archived records: JSON, Parquet, or CSV.`})
|
|
20102
|
+
@MaxLength(20)
|
|
20103
|
+
ArchiveFormat: string;
|
|
20104
|
+
|
|
20105
|
+
@Field(() => Boolean, {description: `Whether this configuration is active and eligible for scheduled archive runs.`})
|
|
20106
|
+
IsActive: boolean;
|
|
20107
|
+
|
|
20108
|
+
@Field(() => Int, {description: `Default number of days after which records become eligible for archiving. Can be overridden per entity.`})
|
|
20109
|
+
DefaultRetentionDays: number;
|
|
20110
|
+
|
|
20111
|
+
@Field({description: `Default archive mode: StripFields (null out specified fields), HardDelete (delete from source after archiving), ArchiveOnly (copy to storage without modifying source).`})
|
|
20112
|
+
@MaxLength(20)
|
|
20113
|
+
DefaultMode: string;
|
|
20114
|
+
|
|
20115
|
+
@Field(() => Int, {description: `Default number of records to process per batch during archive runs.`})
|
|
20116
|
+
DefaultBatchSize: number;
|
|
20117
|
+
|
|
20118
|
+
@Field(() => Boolean, {description: `When enabled, related Record Changes entries are also archived alongside the source records.`})
|
|
20119
|
+
ArchiveRelatedRecordChanges: boolean;
|
|
20120
|
+
|
|
20121
|
+
@Field({description: `Current operational status of this configuration: Idle, Running, Error, or Disabled.`})
|
|
20122
|
+
@MaxLength(20)
|
|
20123
|
+
Status: string;
|
|
20124
|
+
|
|
20125
|
+
@Field({description: `The user who created this archive configuration.`})
|
|
20126
|
+
@MaxLength(36)
|
|
20127
|
+
CreatedByUserID: string;
|
|
20128
|
+
|
|
20129
|
+
@Field()
|
|
20130
|
+
_mj__CreatedAt: Date;
|
|
20131
|
+
|
|
20132
|
+
@Field()
|
|
20133
|
+
_mj__UpdatedAt: Date;
|
|
20134
|
+
|
|
20135
|
+
@Field({nullable: true})
|
|
20136
|
+
@MaxLength(200)
|
|
20137
|
+
StorageAccount?: string;
|
|
20138
|
+
|
|
20139
|
+
@Field()
|
|
20140
|
+
@MaxLength(100)
|
|
20141
|
+
CreatedByUser: string;
|
|
20142
|
+
|
|
20143
|
+
@Field(() => [MJArchiveConfigurationEntity_])
|
|
20144
|
+
MJArchiveConfigurationEntities_ArchiveConfigurationIDArray: MJArchiveConfigurationEntity_[]; // Link to MJArchiveConfigurationEntities
|
|
20145
|
+
|
|
20146
|
+
@Field(() => [MJArchiveRun_])
|
|
20147
|
+
MJArchiveRuns_ArchiveConfigurationIDArray: MJArchiveRun_[]; // Link to MJArchiveRuns
|
|
20148
|
+
|
|
20149
|
+
}
|
|
20150
|
+
|
|
20151
|
+
//****************************************************************************
|
|
20152
|
+
// INPUT TYPE for MJ: Archive Configurations
|
|
20153
|
+
//****************************************************************************
|
|
20154
|
+
@InputType()
|
|
20155
|
+
export class CreateMJArchiveConfigurationInput {
|
|
20156
|
+
@Field({ nullable: true })
|
|
20157
|
+
ID?: string;
|
|
20158
|
+
|
|
20159
|
+
@Field({ nullable: true })
|
|
20160
|
+
Name?: string;
|
|
20161
|
+
|
|
20162
|
+
@Field({ nullable: true })
|
|
20163
|
+
Description: string | null;
|
|
20164
|
+
|
|
20165
|
+
@Field({ nullable: true })
|
|
20166
|
+
StorageAccountID: string | null;
|
|
20167
|
+
|
|
20168
|
+
@Field({ nullable: true })
|
|
20169
|
+
RootPath?: string;
|
|
20170
|
+
|
|
20171
|
+
@Field({ nullable: true })
|
|
20172
|
+
ArchiveFormat?: string;
|
|
20173
|
+
|
|
20174
|
+
@Field(() => Boolean, { nullable: true })
|
|
20175
|
+
IsActive?: boolean;
|
|
20176
|
+
|
|
20177
|
+
@Field(() => Int, { nullable: true })
|
|
20178
|
+
DefaultRetentionDays?: number;
|
|
20179
|
+
|
|
20180
|
+
@Field({ nullable: true })
|
|
20181
|
+
DefaultMode?: string;
|
|
20182
|
+
|
|
20183
|
+
@Field(() => Int, { nullable: true })
|
|
20184
|
+
DefaultBatchSize?: number;
|
|
20185
|
+
|
|
20186
|
+
@Field(() => Boolean, { nullable: true })
|
|
20187
|
+
ArchiveRelatedRecordChanges?: boolean;
|
|
20188
|
+
|
|
20189
|
+
@Field({ nullable: true })
|
|
20190
|
+
Status?: string;
|
|
20191
|
+
|
|
20192
|
+
@Field({ nullable: true })
|
|
20193
|
+
CreatedByUserID?: string;
|
|
20194
|
+
|
|
20195
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
20196
|
+
RestoreContext___?: RestoreContextInput;
|
|
20197
|
+
}
|
|
20198
|
+
|
|
20199
|
+
|
|
20200
|
+
//****************************************************************************
|
|
20201
|
+
// INPUT TYPE for MJ: Archive Configurations
|
|
20202
|
+
//****************************************************************************
|
|
20203
|
+
@InputType()
|
|
20204
|
+
export class UpdateMJArchiveConfigurationInput {
|
|
20205
|
+
@Field()
|
|
20206
|
+
ID: string;
|
|
20207
|
+
|
|
20208
|
+
@Field({ nullable: true })
|
|
20209
|
+
Name?: string;
|
|
20210
|
+
|
|
20211
|
+
@Field({ nullable: true })
|
|
20212
|
+
Description?: string | null;
|
|
20213
|
+
|
|
20214
|
+
@Field({ nullable: true })
|
|
20215
|
+
StorageAccountID?: string | null;
|
|
20216
|
+
|
|
20217
|
+
@Field({ nullable: true })
|
|
20218
|
+
RootPath?: string;
|
|
20219
|
+
|
|
20220
|
+
@Field({ nullable: true })
|
|
20221
|
+
ArchiveFormat?: string;
|
|
20222
|
+
|
|
20223
|
+
@Field(() => Boolean, { nullable: true })
|
|
20224
|
+
IsActive?: boolean;
|
|
20225
|
+
|
|
20226
|
+
@Field(() => Int, { nullable: true })
|
|
20227
|
+
DefaultRetentionDays?: number;
|
|
20228
|
+
|
|
20229
|
+
@Field({ nullable: true })
|
|
20230
|
+
DefaultMode?: string;
|
|
20231
|
+
|
|
20232
|
+
@Field(() => Int, { nullable: true })
|
|
20233
|
+
DefaultBatchSize?: number;
|
|
20234
|
+
|
|
20235
|
+
@Field(() => Boolean, { nullable: true })
|
|
20236
|
+
ArchiveRelatedRecordChanges?: boolean;
|
|
20237
|
+
|
|
20238
|
+
@Field({ nullable: true })
|
|
20239
|
+
Status?: string;
|
|
20240
|
+
|
|
20241
|
+
@Field({ nullable: true })
|
|
20242
|
+
CreatedByUserID?: string;
|
|
20243
|
+
|
|
20244
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
20245
|
+
OldValues___?: KeyValuePairInput[];
|
|
20246
|
+
|
|
20247
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
20248
|
+
RestoreContext___?: RestoreContextInput;
|
|
20249
|
+
}
|
|
20250
|
+
|
|
20251
|
+
//****************************************************************************
|
|
20252
|
+
// RESOLVER for MJ: Archive Configurations
|
|
20253
|
+
//****************************************************************************
|
|
20254
|
+
@ObjectType()
|
|
20255
|
+
export class RunMJArchiveConfigurationViewResult {
|
|
20256
|
+
@Field(() => [MJArchiveConfiguration_])
|
|
20257
|
+
Results: MJArchiveConfiguration_[];
|
|
20258
|
+
|
|
20259
|
+
@Field(() => String, {nullable: true})
|
|
20260
|
+
UserViewRunID?: string;
|
|
20261
|
+
|
|
20262
|
+
@Field(() => Int, {nullable: true})
|
|
20263
|
+
RowCount: number;
|
|
20264
|
+
|
|
20265
|
+
@Field(() => Int, {nullable: true})
|
|
20266
|
+
TotalRowCount: number;
|
|
20267
|
+
|
|
20268
|
+
@Field(() => Int, {nullable: true})
|
|
20269
|
+
ExecutionTime: number;
|
|
20270
|
+
|
|
20271
|
+
@Field({nullable: true})
|
|
20272
|
+
ErrorMessage?: string;
|
|
20273
|
+
|
|
20274
|
+
@Field(() => Boolean, {nullable: false})
|
|
20275
|
+
Success: boolean;
|
|
20276
|
+
}
|
|
20277
|
+
|
|
20278
|
+
@Resolver(MJArchiveConfiguration_)
|
|
20279
|
+
export class MJArchiveConfigurationResolver extends ResolverBase {
|
|
20280
|
+
@Query(() => RunMJArchiveConfigurationViewResult)
|
|
20281
|
+
async RunMJArchiveConfigurationViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20282
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20283
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
20284
|
+
}
|
|
20285
|
+
|
|
20286
|
+
@Query(() => RunMJArchiveConfigurationViewResult)
|
|
20287
|
+
async RunMJArchiveConfigurationViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20288
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20289
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
20290
|
+
}
|
|
20291
|
+
|
|
20292
|
+
@Query(() => RunMJArchiveConfigurationViewResult)
|
|
20293
|
+
async RunMJArchiveConfigurationDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20294
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20295
|
+
input.EntityName = 'MJ: Archive Configurations';
|
|
20296
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
20297
|
+
}
|
|
20298
|
+
@Query(() => MJArchiveConfiguration_, { nullable: true })
|
|
20299
|
+
async MJArchiveConfiguration(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJArchiveConfiguration_ | null> {
|
|
20300
|
+
this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
|
|
20301
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20302
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurations')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
20303
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
20304
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Archive Configurations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
20305
|
+
return result;
|
|
20306
|
+
}
|
|
20307
|
+
|
|
20308
|
+
@FieldResolver(() => [MJArchiveConfigurationEntity_])
|
|
20309
|
+
async MJArchiveConfigurationEntities_ArchiveConfigurationIDArray(@Root() mjarchiveconfiguration_: MJArchiveConfiguration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20310
|
+
this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
|
|
20311
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20312
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurationEntities')} WHERE ${provider.QuoteIdentifier('ArchiveConfigurationID')}='${mjarchiveconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configuration Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
20313
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
20314
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows, this.GetUserFromPayload(userPayload));
|
|
20315
|
+
return result;
|
|
20316
|
+
}
|
|
20317
|
+
|
|
20318
|
+
@FieldResolver(() => [MJArchiveRun_])
|
|
20319
|
+
async MJArchiveRuns_ArchiveConfigurationIDArray(@Root() mjarchiveconfiguration_: MJArchiveConfiguration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20320
|
+
this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
|
|
20321
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20322
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRuns')} WHERE ${provider.QuoteIdentifier('ArchiveConfigurationID')}='${mjarchiveconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
20323
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
20324
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Runs', rows, this.GetUserFromPayload(userPayload));
|
|
20325
|
+
return result;
|
|
20326
|
+
}
|
|
20327
|
+
|
|
20328
|
+
@Mutation(() => MJArchiveConfiguration_)
|
|
20329
|
+
async CreateMJArchiveConfiguration(
|
|
20330
|
+
@Arg('input', () => CreateMJArchiveConfigurationInput) input: CreateMJArchiveConfigurationInput,
|
|
20331
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
20332
|
+
@PubSub() pubSub: PubSubEngine
|
|
20333
|
+
) {
|
|
20334
|
+
const provider = GetReadWriteProvider(providers);
|
|
20335
|
+
return this.CreateRecord('MJ: Archive Configurations', input, provider, userPayload, pubSub)
|
|
20336
|
+
}
|
|
20337
|
+
|
|
20338
|
+
@Mutation(() => MJArchiveConfiguration_)
|
|
20339
|
+
async UpdateMJArchiveConfiguration(
|
|
20340
|
+
@Arg('input', () => UpdateMJArchiveConfigurationInput) input: UpdateMJArchiveConfigurationInput,
|
|
20341
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
20342
|
+
@PubSub() pubSub: PubSubEngine
|
|
20343
|
+
) {
|
|
20344
|
+
const provider = GetReadWriteProvider(providers);
|
|
20345
|
+
return this.UpdateRecord('MJ: Archive Configurations', input, provider, userPayload, pubSub);
|
|
20346
|
+
}
|
|
20347
|
+
|
|
20348
|
+
@Mutation(() => MJArchiveConfiguration_)
|
|
20349
|
+
async DeleteMJArchiveConfiguration(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20350
|
+
const provider = GetReadWriteProvider(providers);
|
|
20351
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
20352
|
+
return this.DeleteRecord('MJ: Archive Configurations', key, options, provider, userPayload, pubSub);
|
|
20353
|
+
}
|
|
20354
|
+
|
|
20355
|
+
}
|
|
20356
|
+
|
|
20357
|
+
//****************************************************************************
|
|
20358
|
+
// ENTITY CLASS for MJ: Archive Run Details
|
|
20359
|
+
//****************************************************************************
|
|
20360
|
+
@ObjectType({ description: `Per-record detail for each archive run. Tracks the outcome, storage location, and error information for each individual record processed.` })
|
|
20361
|
+
export class MJArchiveRunDetail_ {
|
|
20362
|
+
@Field()
|
|
20363
|
+
@MaxLength(36)
|
|
20364
|
+
ID: string;
|
|
20365
|
+
|
|
20366
|
+
@Field({description: `Foreign key to the parent ArchiveRun.`})
|
|
20367
|
+
@MaxLength(36)
|
|
20368
|
+
ArchiveRunID: string;
|
|
20369
|
+
|
|
20370
|
+
@Field({description: `Foreign key to the Entity this record belongs to.`})
|
|
20371
|
+
@MaxLength(36)
|
|
20372
|
+
EntityID: string;
|
|
20373
|
+
|
|
20374
|
+
@Field({description: `The primary key value of the archived record (string representation to support all key types).`})
|
|
20375
|
+
@MaxLength(750)
|
|
20376
|
+
RecordID: string;
|
|
20377
|
+
|
|
20378
|
+
@Field({description: `Outcome for this record: Success, Failed, or Skipped.`})
|
|
20379
|
+
@MaxLength(50)
|
|
20380
|
+
Status: string;
|
|
20381
|
+
|
|
20382
|
+
@Field({nullable: true, description: `Full path to the archived file in storage (e.g., "archives/production/Users/2026/04/record-id.json").`})
|
|
20383
|
+
@MaxLength(1000)
|
|
20384
|
+
StoragePath?: string;
|
|
20385
|
+
|
|
20386
|
+
@Field(() => Int, {description: `Number of bytes written to storage for this record.`})
|
|
20387
|
+
BytesArchived: number;
|
|
20388
|
+
|
|
20389
|
+
@Field({nullable: true, description: `Error details when Status is Failed.`})
|
|
20390
|
+
ErrorMessage?: string;
|
|
20391
|
+
|
|
20392
|
+
@Field({nullable: true, description: `Timestamp when this record was successfully archived.`})
|
|
20393
|
+
ArchivedAt?: Date;
|
|
20394
|
+
|
|
20395
|
+
@Field({nullable: true, description: `The __mj_UpdatedAt timestamp of the record at the time of archiving, used for conflict detection during restore.`})
|
|
20396
|
+
VersionStamp?: Date;
|
|
20397
|
+
|
|
20398
|
+
@Field(() => Boolean, {description: `When true, this detail row represents an archived Record Change entry rather than a primary entity record.`})
|
|
20399
|
+
IsRecordChangeArchive: boolean;
|
|
20400
|
+
|
|
20401
|
+
@Field()
|
|
20402
|
+
_mj__CreatedAt: Date;
|
|
20403
|
+
|
|
20404
|
+
@Field()
|
|
20405
|
+
_mj__UpdatedAt: Date;
|
|
20406
|
+
|
|
20407
|
+
@Field()
|
|
20408
|
+
@MaxLength(255)
|
|
20409
|
+
Entity: string;
|
|
20410
|
+
|
|
20411
|
+
}
|
|
20412
|
+
|
|
20413
|
+
//****************************************************************************
|
|
20414
|
+
// INPUT TYPE for MJ: Archive Run Details
|
|
20415
|
+
//****************************************************************************
|
|
20416
|
+
@InputType()
|
|
20417
|
+
export class CreateMJArchiveRunDetailInput {
|
|
20418
|
+
@Field({ nullable: true })
|
|
20419
|
+
ID?: string;
|
|
20420
|
+
|
|
20421
|
+
@Field({ nullable: true })
|
|
20422
|
+
ArchiveRunID?: string;
|
|
20423
|
+
|
|
20424
|
+
@Field({ nullable: true })
|
|
20425
|
+
EntityID?: string;
|
|
20426
|
+
|
|
20427
|
+
@Field({ nullable: true })
|
|
20428
|
+
RecordID?: string;
|
|
20429
|
+
|
|
20430
|
+
@Field({ nullable: true })
|
|
20431
|
+
Status?: string;
|
|
20432
|
+
|
|
20433
|
+
@Field({ nullable: true })
|
|
20434
|
+
StoragePath: string | null;
|
|
20435
|
+
|
|
20436
|
+
@Field(() => Int, { nullable: true })
|
|
20437
|
+
BytesArchived?: number;
|
|
20438
|
+
|
|
20439
|
+
@Field({ nullable: true })
|
|
20440
|
+
ErrorMessage: string | null;
|
|
20441
|
+
|
|
20442
|
+
@Field({ nullable: true })
|
|
20443
|
+
ArchivedAt: Date | null;
|
|
20444
|
+
|
|
20445
|
+
@Field({ nullable: true })
|
|
20446
|
+
VersionStamp: Date | null;
|
|
20447
|
+
|
|
20448
|
+
@Field(() => Boolean, { nullable: true })
|
|
20449
|
+
IsRecordChangeArchive?: boolean;
|
|
20450
|
+
|
|
20451
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
20452
|
+
RestoreContext___?: RestoreContextInput;
|
|
20453
|
+
}
|
|
20454
|
+
|
|
20455
|
+
|
|
20456
|
+
//****************************************************************************
|
|
20457
|
+
// INPUT TYPE for MJ: Archive Run Details
|
|
20458
|
+
//****************************************************************************
|
|
20459
|
+
@InputType()
|
|
20460
|
+
export class UpdateMJArchiveRunDetailInput {
|
|
20461
|
+
@Field()
|
|
20462
|
+
ID: string;
|
|
20463
|
+
|
|
20464
|
+
@Field({ nullable: true })
|
|
20465
|
+
ArchiveRunID?: string;
|
|
20466
|
+
|
|
20467
|
+
@Field({ nullable: true })
|
|
20468
|
+
EntityID?: string;
|
|
20469
|
+
|
|
20470
|
+
@Field({ nullable: true })
|
|
20471
|
+
RecordID?: string;
|
|
20472
|
+
|
|
20473
|
+
@Field({ nullable: true })
|
|
20474
|
+
Status?: string;
|
|
20475
|
+
|
|
20476
|
+
@Field({ nullable: true })
|
|
20477
|
+
StoragePath?: string | null;
|
|
20478
|
+
|
|
20479
|
+
@Field(() => Int, { nullable: true })
|
|
20480
|
+
BytesArchived?: number;
|
|
20481
|
+
|
|
20482
|
+
@Field({ nullable: true })
|
|
20483
|
+
ErrorMessage?: string | null;
|
|
20484
|
+
|
|
20485
|
+
@Field({ nullable: true })
|
|
20486
|
+
ArchivedAt?: Date | null;
|
|
20487
|
+
|
|
20488
|
+
@Field({ nullable: true })
|
|
20489
|
+
VersionStamp?: Date | null;
|
|
20490
|
+
|
|
20491
|
+
@Field(() => Boolean, { nullable: true })
|
|
20492
|
+
IsRecordChangeArchive?: boolean;
|
|
20493
|
+
|
|
20494
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
20495
|
+
OldValues___?: KeyValuePairInput[];
|
|
20496
|
+
|
|
20497
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
20498
|
+
RestoreContext___?: RestoreContextInput;
|
|
20499
|
+
}
|
|
20500
|
+
|
|
20501
|
+
//****************************************************************************
|
|
20502
|
+
// RESOLVER for MJ: Archive Run Details
|
|
20503
|
+
//****************************************************************************
|
|
20504
|
+
@ObjectType()
|
|
20505
|
+
export class RunMJArchiveRunDetailViewResult {
|
|
20506
|
+
@Field(() => [MJArchiveRunDetail_])
|
|
20507
|
+
Results: MJArchiveRunDetail_[];
|
|
20508
|
+
|
|
20509
|
+
@Field(() => String, {nullable: true})
|
|
20510
|
+
UserViewRunID?: string;
|
|
20511
|
+
|
|
20512
|
+
@Field(() => Int, {nullable: true})
|
|
20513
|
+
RowCount: number;
|
|
20514
|
+
|
|
20515
|
+
@Field(() => Int, {nullable: true})
|
|
20516
|
+
TotalRowCount: number;
|
|
20517
|
+
|
|
20518
|
+
@Field(() => Int, {nullable: true})
|
|
20519
|
+
ExecutionTime: number;
|
|
20520
|
+
|
|
20521
|
+
@Field({nullable: true})
|
|
20522
|
+
ErrorMessage?: string;
|
|
20523
|
+
|
|
20524
|
+
@Field(() => Boolean, {nullable: false})
|
|
20525
|
+
Success: boolean;
|
|
20526
|
+
}
|
|
20527
|
+
|
|
20528
|
+
@Resolver(MJArchiveRunDetail_)
|
|
20529
|
+
export class MJArchiveRunDetailResolver extends ResolverBase {
|
|
20530
|
+
@Query(() => RunMJArchiveRunDetailViewResult)
|
|
20531
|
+
async RunMJArchiveRunDetailViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20532
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20533
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
20534
|
+
}
|
|
20535
|
+
|
|
20536
|
+
@Query(() => RunMJArchiveRunDetailViewResult)
|
|
20537
|
+
async RunMJArchiveRunDetailViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20538
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20539
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
20540
|
+
}
|
|
20541
|
+
|
|
20542
|
+
@Query(() => RunMJArchiveRunDetailViewResult)
|
|
20543
|
+
async RunMJArchiveRunDetailDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20544
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20545
|
+
input.EntityName = 'MJ: Archive Run Details';
|
|
20546
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
20547
|
+
}
|
|
20548
|
+
@Query(() => MJArchiveRunDetail_, { nullable: true })
|
|
20549
|
+
async MJArchiveRunDetail(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJArchiveRunDetail_ | null> {
|
|
20550
|
+
this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
|
|
20551
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20552
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRunDetails')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
20553
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
20554
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Archive Run Details', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
20555
|
+
return result;
|
|
20556
|
+
}
|
|
20557
|
+
|
|
20558
|
+
@Mutation(() => MJArchiveRunDetail_)
|
|
20559
|
+
async CreateMJArchiveRunDetail(
|
|
20560
|
+
@Arg('input', () => CreateMJArchiveRunDetailInput) input: CreateMJArchiveRunDetailInput,
|
|
20561
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
20562
|
+
@PubSub() pubSub: PubSubEngine
|
|
20563
|
+
) {
|
|
20564
|
+
const provider = GetReadWriteProvider(providers);
|
|
20565
|
+
return this.CreateRecord('MJ: Archive Run Details', input, provider, userPayload, pubSub)
|
|
20566
|
+
}
|
|
20567
|
+
|
|
20568
|
+
@Mutation(() => MJArchiveRunDetail_)
|
|
20569
|
+
async UpdateMJArchiveRunDetail(
|
|
20570
|
+
@Arg('input', () => UpdateMJArchiveRunDetailInput) input: UpdateMJArchiveRunDetailInput,
|
|
20571
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
20572
|
+
@PubSub() pubSub: PubSubEngine
|
|
20573
|
+
) {
|
|
20574
|
+
const provider = GetReadWriteProvider(providers);
|
|
20575
|
+
return this.UpdateRecord('MJ: Archive Run Details', input, provider, userPayload, pubSub);
|
|
20576
|
+
}
|
|
20577
|
+
|
|
20578
|
+
@Mutation(() => MJArchiveRunDetail_)
|
|
20579
|
+
async DeleteMJArchiveRunDetail(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20580
|
+
const provider = GetReadWriteProvider(providers);
|
|
20581
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
20582
|
+
return this.DeleteRecord('MJ: Archive Run Details', key, options, provider, userPayload, pubSub);
|
|
20583
|
+
}
|
|
20584
|
+
|
|
20585
|
+
}
|
|
20586
|
+
|
|
20587
|
+
//****************************************************************************
|
|
20588
|
+
// ENTITY CLASS for MJ: Archive Runs
|
|
20589
|
+
//****************************************************************************
|
|
20590
|
+
@ObjectType({ description: `Tracks each execution of an archive configuration, including timing, aggregate statistics, and overall status.` })
|
|
20591
|
+
export class MJArchiveRun_ {
|
|
20592
|
+
@Field()
|
|
20593
|
+
@MaxLength(36)
|
|
20594
|
+
ID: string;
|
|
20595
|
+
|
|
20596
|
+
@Field({description: `Foreign key to the ArchiveConfiguration that was executed.`})
|
|
20597
|
+
@MaxLength(36)
|
|
20598
|
+
ArchiveConfigurationID: string;
|
|
20599
|
+
|
|
20600
|
+
@Field({description: `Timestamp when the archive run started.`})
|
|
20601
|
+
StartedAt: Date;
|
|
20602
|
+
|
|
20603
|
+
@Field({nullable: true, description: `Timestamp when the archive run completed (NULL while still running).`})
|
|
20604
|
+
CompletedAt?: Date;
|
|
20605
|
+
|
|
20606
|
+
@Field({description: `Current status: Running, Complete, Failed, Cancelled, or PartialSuccess.`})
|
|
20607
|
+
@MaxLength(50)
|
|
20608
|
+
Status: string;
|
|
20609
|
+
|
|
20610
|
+
@Field(() => Int, {description: `Total number of records identified for archiving in this run.`})
|
|
20611
|
+
TotalRecords: number;
|
|
20612
|
+
|
|
20613
|
+
@Field(() => Int, {description: `Number of records successfully archived.`})
|
|
20614
|
+
ArchivedRecords: number;
|
|
20615
|
+
|
|
20616
|
+
@Field(() => Int, {description: `Number of records that failed to archive.`})
|
|
20617
|
+
FailedRecords: number;
|
|
20618
|
+
|
|
20619
|
+
@Field(() => Int, {description: `Number of records skipped (e.g., already archived or filtered out).`})
|
|
20620
|
+
SkippedRecords: number;
|
|
20621
|
+
|
|
20622
|
+
@Field(() => Int, {description: `Total bytes written to archive storage during this run.`})
|
|
20623
|
+
TotalBytesArchived: number;
|
|
20624
|
+
|
|
20625
|
+
@Field({nullable: true, description: `Aggregated error log for the run. Contains error details when Status is Failed or PartialSuccess.`})
|
|
20626
|
+
ErrorLog?: string;
|
|
20627
|
+
|
|
20628
|
+
@Field({description: `The user who initiated this archive run.`})
|
|
20629
|
+
@MaxLength(36)
|
|
20630
|
+
UserID: string;
|
|
20631
|
+
|
|
20632
|
+
@Field()
|
|
20633
|
+
_mj__CreatedAt: Date;
|
|
20634
|
+
|
|
20635
|
+
@Field()
|
|
20636
|
+
_mj__UpdatedAt: Date;
|
|
20637
|
+
|
|
20638
|
+
@Field()
|
|
20639
|
+
@MaxLength(255)
|
|
20640
|
+
ArchiveConfiguration: string;
|
|
20641
|
+
|
|
20642
|
+
@Field()
|
|
20643
|
+
@MaxLength(100)
|
|
20644
|
+
User: string;
|
|
20645
|
+
|
|
20646
|
+
@Field(() => [MJArchiveRunDetail_])
|
|
20647
|
+
MJArchiveRunDetails_ArchiveRunIDArray: MJArchiveRunDetail_[]; // Link to MJArchiveRunDetails
|
|
20648
|
+
|
|
20649
|
+
}
|
|
20650
|
+
|
|
20651
|
+
//****************************************************************************
|
|
20652
|
+
// INPUT TYPE for MJ: Archive Runs
|
|
20653
|
+
//****************************************************************************
|
|
20654
|
+
@InputType()
|
|
20655
|
+
export class CreateMJArchiveRunInput {
|
|
20656
|
+
@Field({ nullable: true })
|
|
20657
|
+
ID?: string;
|
|
20658
|
+
|
|
20659
|
+
@Field({ nullable: true })
|
|
20660
|
+
ArchiveConfigurationID?: string;
|
|
20661
|
+
|
|
20662
|
+
@Field({ nullable: true })
|
|
20663
|
+
StartedAt?: Date;
|
|
20664
|
+
|
|
20665
|
+
@Field({ nullable: true })
|
|
20666
|
+
CompletedAt: Date | null;
|
|
20667
|
+
|
|
20668
|
+
@Field({ nullable: true })
|
|
20669
|
+
Status?: string;
|
|
20670
|
+
|
|
20671
|
+
@Field(() => Int, { nullable: true })
|
|
20672
|
+
TotalRecords?: number;
|
|
20673
|
+
|
|
20674
|
+
@Field(() => Int, { nullable: true })
|
|
20675
|
+
ArchivedRecords?: number;
|
|
20676
|
+
|
|
20677
|
+
@Field(() => Int, { nullable: true })
|
|
20678
|
+
FailedRecords?: number;
|
|
20679
|
+
|
|
20680
|
+
@Field(() => Int, { nullable: true })
|
|
20681
|
+
SkippedRecords?: number;
|
|
20682
|
+
|
|
20683
|
+
@Field(() => Int, { nullable: true })
|
|
20684
|
+
TotalBytesArchived?: number;
|
|
20685
|
+
|
|
20686
|
+
@Field({ nullable: true })
|
|
20687
|
+
ErrorLog: string | null;
|
|
20688
|
+
|
|
20689
|
+
@Field({ nullable: true })
|
|
20690
|
+
UserID?: string;
|
|
20691
|
+
|
|
20692
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
20693
|
+
RestoreContext___?: RestoreContextInput;
|
|
20694
|
+
}
|
|
20695
|
+
|
|
20696
|
+
|
|
20697
|
+
//****************************************************************************
|
|
20698
|
+
// INPUT TYPE for MJ: Archive Runs
|
|
20699
|
+
//****************************************************************************
|
|
20700
|
+
@InputType()
|
|
20701
|
+
export class UpdateMJArchiveRunInput {
|
|
20702
|
+
@Field()
|
|
20703
|
+
ID: string;
|
|
20704
|
+
|
|
20705
|
+
@Field({ nullable: true })
|
|
20706
|
+
ArchiveConfigurationID?: string;
|
|
20707
|
+
|
|
20708
|
+
@Field({ nullable: true })
|
|
20709
|
+
StartedAt?: Date;
|
|
20710
|
+
|
|
20711
|
+
@Field({ nullable: true })
|
|
20712
|
+
CompletedAt?: Date | null;
|
|
20713
|
+
|
|
20714
|
+
@Field({ nullable: true })
|
|
20715
|
+
Status?: string;
|
|
20716
|
+
|
|
20717
|
+
@Field(() => Int, { nullable: true })
|
|
20718
|
+
TotalRecords?: number;
|
|
20719
|
+
|
|
20720
|
+
@Field(() => Int, { nullable: true })
|
|
20721
|
+
ArchivedRecords?: number;
|
|
20722
|
+
|
|
20723
|
+
@Field(() => Int, { nullable: true })
|
|
20724
|
+
FailedRecords?: number;
|
|
20725
|
+
|
|
20726
|
+
@Field(() => Int, { nullable: true })
|
|
20727
|
+
SkippedRecords?: number;
|
|
20728
|
+
|
|
20729
|
+
@Field(() => Int, { nullable: true })
|
|
20730
|
+
TotalBytesArchived?: number;
|
|
20731
|
+
|
|
20732
|
+
@Field({ nullable: true })
|
|
20733
|
+
ErrorLog?: string | null;
|
|
20734
|
+
|
|
20735
|
+
@Field({ nullable: true })
|
|
20736
|
+
UserID?: string;
|
|
20737
|
+
|
|
20738
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
20739
|
+
OldValues___?: KeyValuePairInput[];
|
|
20740
|
+
|
|
20741
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
20742
|
+
RestoreContext___?: RestoreContextInput;
|
|
20743
|
+
}
|
|
20744
|
+
|
|
20745
|
+
//****************************************************************************
|
|
20746
|
+
// RESOLVER for MJ: Archive Runs
|
|
20747
|
+
//****************************************************************************
|
|
20748
|
+
@ObjectType()
|
|
20749
|
+
export class RunMJArchiveRunViewResult {
|
|
20750
|
+
@Field(() => [MJArchiveRun_])
|
|
20751
|
+
Results: MJArchiveRun_[];
|
|
20752
|
+
|
|
20753
|
+
@Field(() => String, {nullable: true})
|
|
20754
|
+
UserViewRunID?: string;
|
|
20755
|
+
|
|
20756
|
+
@Field(() => Int, {nullable: true})
|
|
20757
|
+
RowCount: number;
|
|
20758
|
+
|
|
20759
|
+
@Field(() => Int, {nullable: true})
|
|
20760
|
+
TotalRowCount: number;
|
|
20761
|
+
|
|
20762
|
+
@Field(() => Int, {nullable: true})
|
|
20763
|
+
ExecutionTime: number;
|
|
20764
|
+
|
|
20765
|
+
@Field({nullable: true})
|
|
20766
|
+
ErrorMessage?: string;
|
|
20767
|
+
|
|
20768
|
+
@Field(() => Boolean, {nullable: false})
|
|
20769
|
+
Success: boolean;
|
|
20770
|
+
}
|
|
20771
|
+
|
|
20772
|
+
@Resolver(MJArchiveRun_)
|
|
20773
|
+
export class MJArchiveRunResolver extends ResolverBase {
|
|
20774
|
+
@Query(() => RunMJArchiveRunViewResult)
|
|
20775
|
+
async RunMJArchiveRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20776
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20777
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
20778
|
+
}
|
|
20779
|
+
|
|
20780
|
+
@Query(() => RunMJArchiveRunViewResult)
|
|
20781
|
+
async RunMJArchiveRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20782
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20783
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
20784
|
+
}
|
|
20785
|
+
|
|
20786
|
+
@Query(() => RunMJArchiveRunViewResult)
|
|
20787
|
+
async RunMJArchiveRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20788
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20789
|
+
input.EntityName = 'MJ: Archive Runs';
|
|
20790
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
20791
|
+
}
|
|
20792
|
+
@Query(() => MJArchiveRun_, { nullable: true })
|
|
20793
|
+
async MJArchiveRun(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJArchiveRun_ | null> {
|
|
20794
|
+
this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
|
|
20795
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20796
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRuns')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
20797
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
20798
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Archive Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
20799
|
+
return result;
|
|
20800
|
+
}
|
|
20801
|
+
|
|
20802
|
+
@FieldResolver(() => [MJArchiveRunDetail_])
|
|
20803
|
+
async MJArchiveRunDetails_ArchiveRunIDArray(@Root() mjarchiverun_: MJArchiveRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20804
|
+
this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
|
|
20805
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20806
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRunDetails')} WHERE ${provider.QuoteIdentifier('ArchiveRunID')}='${mjarchiverun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
20807
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
20808
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
20809
|
+
return result;
|
|
20810
|
+
}
|
|
20811
|
+
|
|
20812
|
+
@Mutation(() => MJArchiveRun_)
|
|
20813
|
+
async CreateMJArchiveRun(
|
|
20814
|
+
@Arg('input', () => CreateMJArchiveRunInput) input: CreateMJArchiveRunInput,
|
|
20815
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
20816
|
+
@PubSub() pubSub: PubSubEngine
|
|
20817
|
+
) {
|
|
20818
|
+
const provider = GetReadWriteProvider(providers);
|
|
20819
|
+
return this.CreateRecord('MJ: Archive Runs', input, provider, userPayload, pubSub)
|
|
20820
|
+
}
|
|
20821
|
+
|
|
20822
|
+
@Mutation(() => MJArchiveRun_)
|
|
20823
|
+
async UpdateMJArchiveRun(
|
|
20824
|
+
@Arg('input', () => UpdateMJArchiveRunInput) input: UpdateMJArchiveRunInput,
|
|
20825
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
20826
|
+
@PubSub() pubSub: PubSubEngine
|
|
20827
|
+
) {
|
|
20828
|
+
const provider = GetReadWriteProvider(providers);
|
|
20829
|
+
return this.UpdateRecord('MJ: Archive Runs', input, provider, userPayload, pubSub);
|
|
20830
|
+
}
|
|
20831
|
+
|
|
20832
|
+
@Mutation(() => MJArchiveRun_)
|
|
20833
|
+
async DeleteMJArchiveRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20834
|
+
const provider = GetReadWriteProvider(providers);
|
|
20835
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
20836
|
+
return this.DeleteRecord('MJ: Archive Runs', key, options, provider, userPayload, pubSub);
|
|
20837
|
+
}
|
|
20838
|
+
|
|
20839
|
+
}
|
|
20840
|
+
|
|
19825
20841
|
//****************************************************************************
|
|
19826
20842
|
// ENTITY CLASS for MJ: Artifact Permissions
|
|
19827
20843
|
//****************************************************************************
|
|
@@ -38803,6 +39819,12 @@ export class MJEntity_ {
|
|
|
38803
39819
|
@Field(() => [MJEntityField_])
|
|
38804
39820
|
MJEntityFields_RelatedEntityIDArray: MJEntityField_[]; // Link to MJEntityFields
|
|
38805
39821
|
|
|
39822
|
+
@Field(() => [MJArchiveConfigurationEntity_])
|
|
39823
|
+
MJArchiveConfigurationEntities_EntityIDArray: MJArchiveConfigurationEntity_[]; // Link to MJArchiveConfigurationEntities
|
|
39824
|
+
|
|
39825
|
+
@Field(() => [MJArchiveRunDetail_])
|
|
39826
|
+
MJArchiveRunDetails_EntityIDArray: MJArchiveRunDetail_[]; // Link to MJArchiveRunDetails
|
|
39827
|
+
|
|
38806
39828
|
@Field(() => [MJResourceType_])
|
|
38807
39829
|
MJResourceTypes_CategoryEntityIDArray: MJResourceType_[]; // Link to MJResourceTypes
|
|
38808
39830
|
|
|
@@ -39782,6 +40804,26 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
39782
40804
|
return result;
|
|
39783
40805
|
}
|
|
39784
40806
|
|
|
40807
|
+
@FieldResolver(() => [MJArchiveConfigurationEntity_])
|
|
40808
|
+
async MJArchiveConfigurationEntities_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40809
|
+
this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
|
|
40810
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40811
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurationEntities')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configuration Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
40812
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
40813
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows, this.GetUserFromPayload(userPayload));
|
|
40814
|
+
return result;
|
|
40815
|
+
}
|
|
40816
|
+
|
|
40817
|
+
@FieldResolver(() => [MJArchiveRunDetail_])
|
|
40818
|
+
async MJArchiveRunDetails_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40819
|
+
this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
|
|
40820
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40821
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRunDetails')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
40822
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
40823
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
40824
|
+
return result;
|
|
40825
|
+
}
|
|
40826
|
+
|
|
39785
40827
|
@FieldResolver(() => [MJResourceType_])
|
|
39786
40828
|
async MJResourceTypes_CategoryEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39787
40829
|
this.CheckUserReadPermissions('MJ: Resource Types', userPayload);
|
|
@@ -46121,6 +47163,9 @@ export class MJFileStorageAccount_ {
|
|
|
46121
47163
|
@Field(() => [MJAIAgentType_])
|
|
46122
47164
|
MJAIAgentTypes_DefaultStorageAccountIDArray: MJAIAgentType_[]; // Link to MJAIAgentTypes
|
|
46123
47165
|
|
|
47166
|
+
@Field(() => [MJArchiveConfiguration_])
|
|
47167
|
+
MJArchiveConfigurations_StorageAccountIDArray: MJArchiveConfiguration_[]; // Link to MJArchiveConfigurations
|
|
47168
|
+
|
|
46124
47169
|
@Field(() => [MJFileStorageAccountPermission_])
|
|
46125
47170
|
MJFileStorageAccountPermissions_FileStorageAccountIDArray: MJFileStorageAccountPermission_[]; // Link to MJFileStorageAccountPermissions
|
|
46126
47171
|
|
|
@@ -46257,6 +47302,16 @@ export class MJFileStorageAccountResolver extends ResolverBase {
|
|
|
46257
47302
|
return result;
|
|
46258
47303
|
}
|
|
46259
47304
|
|
|
47305
|
+
@FieldResolver(() => [MJArchiveConfiguration_])
|
|
47306
|
+
async MJArchiveConfigurations_StorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
47307
|
+
this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
|
|
47308
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
47309
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurations')} WHERE ${provider.QuoteIdentifier('StorageAccountID')}='${mjfilestorageaccount_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
47310
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
47311
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configurations', rows, this.GetUserFromPayload(userPayload));
|
|
47312
|
+
return result;
|
|
47313
|
+
}
|
|
47314
|
+
|
|
46260
47315
|
@FieldResolver(() => [MJFileStorageAccountPermission_])
|
|
46261
47316
|
async MJFileStorageAccountPermissions_FileStorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46262
47317
|
this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
|
|
@@ -51299,6 +52354,9 @@ export class MJMCPServerTool_ {
|
|
|
51299
52354
|
@Field(() => [MJMCPServerConnectionTool_])
|
|
51300
52355
|
MJMCPServerConnectionTools_MCPServerToolIDArray: MJMCPServerConnectionTool_[]; // Link to MJMCPServerConnectionTools
|
|
51301
52356
|
|
|
52357
|
+
@Field(() => [MJMCPToolFavorite_])
|
|
52358
|
+
MJMCPToolFavorites_MCPServerToolIDArray: MJMCPToolFavorite_[]; // Link to MJMCPToolFavorites
|
|
52359
|
+
|
|
51302
52360
|
@Field(() => [MJMCPToolExecutionLog_])
|
|
51303
52361
|
MJMCPToolExecutionLogs_MCPServerToolIDArray: MJMCPToolExecutionLog_[]; // Link to MJMCPToolExecutionLogs
|
|
51304
52362
|
|
|
@@ -51471,6 +52529,16 @@ export class MJMCPServerToolResolver extends ResolverBase {
|
|
|
51471
52529
|
return result;
|
|
51472
52530
|
}
|
|
51473
52531
|
|
|
52532
|
+
@FieldResolver(() => [MJMCPToolFavorite_])
|
|
52533
|
+
async MJMCPToolFavorites_MCPServerToolIDArray(@Root() mjmcpservertool_: MJMCPServerTool_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
52534
|
+
this.CheckUserReadPermissions('MJ: MCP Tool Favorites', userPayload);
|
|
52535
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
52536
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMCPToolFavorites')} WHERE ${provider.QuoteIdentifier('MCPServerToolID')}='${mjmcpservertool_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: MCP Tool Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
52537
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
52538
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Tool Favorites', rows, this.GetUserFromPayload(userPayload));
|
|
52539
|
+
return result;
|
|
52540
|
+
}
|
|
52541
|
+
|
|
51474
52542
|
@FieldResolver(() => [MJMCPToolExecutionLog_])
|
|
51475
52543
|
async MJMCPToolExecutionLogs_MCPServerToolIDArray(@Root() mjmcpservertool_: MJMCPServerTool_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
51476
52544
|
this.CheckUserReadPermissions('MJ: MCP Tool Execution Logs', userPayload);
|
|
@@ -52149,6 +53217,159 @@ export class MJMCPToolExecutionLogResolver extends ResolverBase {
|
|
|
52149
53217
|
|
|
52150
53218
|
}
|
|
52151
53219
|
|
|
53220
|
+
//****************************************************************************
|
|
53221
|
+
// ENTITY CLASS for MJ: MCP Tool Favorites
|
|
53222
|
+
//****************************************************************************
|
|
53223
|
+
@ObjectType({ description: `Per-user favorite marker for an MCP Server Tool. Lets users star tools for quick access in the MCP Dashboard and Test dialog.` })
|
|
53224
|
+
export class MJMCPToolFavorite_ {
|
|
53225
|
+
@Field()
|
|
53226
|
+
@MaxLength(36)
|
|
53227
|
+
ID: string;
|
|
53228
|
+
|
|
53229
|
+
@Field()
|
|
53230
|
+
@MaxLength(36)
|
|
53231
|
+
UserID: string;
|
|
53232
|
+
|
|
53233
|
+
@Field()
|
|
53234
|
+
@MaxLength(36)
|
|
53235
|
+
MCPServerToolID: string;
|
|
53236
|
+
|
|
53237
|
+
@Field()
|
|
53238
|
+
_mj__CreatedAt: Date;
|
|
53239
|
+
|
|
53240
|
+
@Field()
|
|
53241
|
+
_mj__UpdatedAt: Date;
|
|
53242
|
+
|
|
53243
|
+
@Field()
|
|
53244
|
+
@MaxLength(100)
|
|
53245
|
+
User: string;
|
|
53246
|
+
|
|
53247
|
+
@Field({nullable: true})
|
|
53248
|
+
@MaxLength(255)
|
|
53249
|
+
MCPServerTool?: string;
|
|
53250
|
+
|
|
53251
|
+
}
|
|
53252
|
+
|
|
53253
|
+
//****************************************************************************
|
|
53254
|
+
// INPUT TYPE for MJ: MCP Tool Favorites
|
|
53255
|
+
//****************************************************************************
|
|
53256
|
+
@InputType()
|
|
53257
|
+
export class CreateMJMCPToolFavoriteInput {
|
|
53258
|
+
@Field({ nullable: true })
|
|
53259
|
+
ID?: string;
|
|
53260
|
+
|
|
53261
|
+
@Field({ nullable: true })
|
|
53262
|
+
UserID?: string;
|
|
53263
|
+
|
|
53264
|
+
@Field({ nullable: true })
|
|
53265
|
+
MCPServerToolID?: string;
|
|
53266
|
+
}
|
|
53267
|
+
|
|
53268
|
+
|
|
53269
|
+
//****************************************************************************
|
|
53270
|
+
// INPUT TYPE for MJ: MCP Tool Favorites
|
|
53271
|
+
//****************************************************************************
|
|
53272
|
+
@InputType()
|
|
53273
|
+
export class UpdateMJMCPToolFavoriteInput {
|
|
53274
|
+
@Field()
|
|
53275
|
+
ID: string;
|
|
53276
|
+
|
|
53277
|
+
@Field({ nullable: true })
|
|
53278
|
+
UserID?: string;
|
|
53279
|
+
|
|
53280
|
+
@Field({ nullable: true })
|
|
53281
|
+
MCPServerToolID?: string;
|
|
53282
|
+
|
|
53283
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
53284
|
+
OldValues___?: KeyValuePairInput[];
|
|
53285
|
+
}
|
|
53286
|
+
|
|
53287
|
+
//****************************************************************************
|
|
53288
|
+
// RESOLVER for MJ: MCP Tool Favorites
|
|
53289
|
+
//****************************************************************************
|
|
53290
|
+
@ObjectType()
|
|
53291
|
+
export class RunMJMCPToolFavoriteViewResult {
|
|
53292
|
+
@Field(() => [MJMCPToolFavorite_])
|
|
53293
|
+
Results: MJMCPToolFavorite_[];
|
|
53294
|
+
|
|
53295
|
+
@Field(() => String, {nullable: true})
|
|
53296
|
+
UserViewRunID?: string;
|
|
53297
|
+
|
|
53298
|
+
@Field(() => Int, {nullable: true})
|
|
53299
|
+
RowCount: number;
|
|
53300
|
+
|
|
53301
|
+
@Field(() => Int, {nullable: true})
|
|
53302
|
+
TotalRowCount: number;
|
|
53303
|
+
|
|
53304
|
+
@Field(() => Int, {nullable: true})
|
|
53305
|
+
ExecutionTime: number;
|
|
53306
|
+
|
|
53307
|
+
@Field({nullable: true})
|
|
53308
|
+
ErrorMessage?: string;
|
|
53309
|
+
|
|
53310
|
+
@Field(() => Boolean, {nullable: false})
|
|
53311
|
+
Success: boolean;
|
|
53312
|
+
}
|
|
53313
|
+
|
|
53314
|
+
@Resolver(MJMCPToolFavorite_)
|
|
53315
|
+
export class MJMCPToolFavoriteResolver extends ResolverBase {
|
|
53316
|
+
@Query(() => RunMJMCPToolFavoriteViewResult)
|
|
53317
|
+
async RunMJMCPToolFavoriteViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53318
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53319
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
53320
|
+
}
|
|
53321
|
+
|
|
53322
|
+
@Query(() => RunMJMCPToolFavoriteViewResult)
|
|
53323
|
+
async RunMJMCPToolFavoriteViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53324
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53325
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
53326
|
+
}
|
|
53327
|
+
|
|
53328
|
+
@Query(() => RunMJMCPToolFavoriteViewResult)
|
|
53329
|
+
async RunMJMCPToolFavoriteDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53330
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53331
|
+
input.EntityName = 'MJ: MCP Tool Favorites';
|
|
53332
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
53333
|
+
}
|
|
53334
|
+
@Query(() => MJMCPToolFavorite_, { nullable: true })
|
|
53335
|
+
async MJMCPToolFavorite(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJMCPToolFavorite_ | null> {
|
|
53336
|
+
this.CheckUserReadPermissions('MJ: MCP Tool Favorites', userPayload);
|
|
53337
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53338
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMCPToolFavorites')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: MCP Tool Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
53339
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
53340
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: MCP Tool Favorites', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
53341
|
+
return result;
|
|
53342
|
+
}
|
|
53343
|
+
|
|
53344
|
+
@Mutation(() => MJMCPToolFavorite_)
|
|
53345
|
+
async CreateMJMCPToolFavorite(
|
|
53346
|
+
@Arg('input', () => CreateMJMCPToolFavoriteInput) input: CreateMJMCPToolFavoriteInput,
|
|
53347
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
53348
|
+
@PubSub() pubSub: PubSubEngine
|
|
53349
|
+
) {
|
|
53350
|
+
const provider = GetReadWriteProvider(providers);
|
|
53351
|
+
return this.CreateRecord('MJ: MCP Tool Favorites', input, provider, userPayload, pubSub)
|
|
53352
|
+
}
|
|
53353
|
+
|
|
53354
|
+
@Mutation(() => MJMCPToolFavorite_)
|
|
53355
|
+
async UpdateMJMCPToolFavorite(
|
|
53356
|
+
@Arg('input', () => UpdateMJMCPToolFavoriteInput) input: UpdateMJMCPToolFavoriteInput,
|
|
53357
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
53358
|
+
@PubSub() pubSub: PubSubEngine
|
|
53359
|
+
) {
|
|
53360
|
+
const provider = GetReadWriteProvider(providers);
|
|
53361
|
+
return this.UpdateRecord('MJ: MCP Tool Favorites', input, provider, userPayload, pubSub);
|
|
53362
|
+
}
|
|
53363
|
+
|
|
53364
|
+
@Mutation(() => MJMCPToolFavorite_)
|
|
53365
|
+
async DeleteMJMCPToolFavorite(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53366
|
+
const provider = GetReadWriteProvider(providers);
|
|
53367
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
53368
|
+
return this.DeleteRecord('MJ: MCP Tool Favorites', key, options, provider, userPayload, pubSub);
|
|
53369
|
+
}
|
|
53370
|
+
|
|
53371
|
+
}
|
|
53372
|
+
|
|
52152
53373
|
//****************************************************************************
|
|
52153
53374
|
// ENTITY CLASS for MJ: O Auth Auth Server Metadata Caches
|
|
52154
53375
|
//****************************************************************************
|
|
@@ -65107,12 +66328,12 @@ export class MJTag_ {
|
|
|
65107
66328
|
@Field(() => [MJTagCoOccurrence_])
|
|
65108
66329
|
MJTagCoOccurrences_TagAIDArray: MJTagCoOccurrence_[]; // Link to MJTagCoOccurrences
|
|
65109
66330
|
|
|
65110
|
-
@Field(() => [MJTagAuditLog_])
|
|
65111
|
-
MJTagAuditLogs_TagIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
|
|
65112
|
-
|
|
65113
66331
|
@Field(() => [MJTag_])
|
|
65114
66332
|
MJTags_MergedIntoTagIDArray: MJTag_[]; // Link to MJTags
|
|
65115
66333
|
|
|
66334
|
+
@Field(() => [MJTagAuditLog_])
|
|
66335
|
+
MJTagAuditLogs_TagIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
|
|
66336
|
+
|
|
65116
66337
|
}
|
|
65117
66338
|
|
|
65118
66339
|
//****************************************************************************
|
|
@@ -65296,16 +66517,6 @@ export class MJTagResolver extends ResolverBase {
|
|
|
65296
66517
|
return result;
|
|
65297
66518
|
}
|
|
65298
66519
|
|
|
65299
|
-
@FieldResolver(() => [MJTagAuditLog_])
|
|
65300
|
-
async MJTagAuditLogs_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65301
|
-
this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
|
|
65302
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65303
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
65304
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65305
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
|
|
65306
|
-
return result;
|
|
65307
|
-
}
|
|
65308
|
-
|
|
65309
66520
|
@FieldResolver(() => [MJTag_])
|
|
65310
66521
|
async MJTags_MergedIntoTagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65311
66522
|
this.CheckUserReadPermissions('MJ: Tags', userPayload);
|
|
@@ -65316,6 +66527,16 @@ export class MJTagResolver extends ResolverBase {
|
|
|
65316
66527
|
return result;
|
|
65317
66528
|
}
|
|
65318
66529
|
|
|
66530
|
+
@FieldResolver(() => [MJTagAuditLog_])
|
|
66531
|
+
async MJTagAuditLogs_TagIDArray(@Root() mjtag_: MJTag_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66532
|
+
this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
|
|
66533
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66534
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
66535
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
66536
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
|
|
66537
|
+
return result;
|
|
66538
|
+
}
|
|
66539
|
+
|
|
65319
66540
|
@Mutation(() => MJTag_)
|
|
65320
66541
|
async CreateMJTag(
|
|
65321
66542
|
@Arg('input', () => CreateMJTagInput) input: CreateMJTagInput,
|
|
@@ -72816,14 +74037,20 @@ export class MJUser_ {
|
|
|
72816
74037
|
@Field(() => [MJContentItemDuplicate_])
|
|
72817
74038
|
MJContentItemDuplicates_ResolvedByUserIDArray: MJContentItemDuplicate_[]; // Link to MJContentItemDuplicates
|
|
72818
74039
|
|
|
74040
|
+
@Field(() => [MJTagAuditLog_])
|
|
74041
|
+
MJTagAuditLogs_PerformedByUserIDArray: MJTagAuditLog_[]; // Link to MJTagAuditLogs
|
|
74042
|
+
|
|
72819
74043
|
@Field(() => [MJContentProcessRun_])
|
|
72820
74044
|
MJContentProcessRuns_StartedByUserIDArray: MJContentProcessRun_[]; // Link to MJContentProcessRuns
|
|
72821
74045
|
|
|
72822
74046
|
@Field(() => [MJKnowledgeHubSavedSearch_])
|
|
72823
74047
|
MJKnowledgeHubSavedSearches_UserIDArray: MJKnowledgeHubSavedSearch_[]; // Link to MJKnowledgeHubSavedSearches
|
|
72824
74048
|
|
|
72825
|
-
@Field(() => [
|
|
72826
|
-
|
|
74049
|
+
@Field(() => [MJMCPToolFavorite_])
|
|
74050
|
+
MJMCPToolFavorites_UserIDArray: MJMCPToolFavorite_[]; // Link to MJMCPToolFavorites
|
|
74051
|
+
|
|
74052
|
+
@Field(() => [MJArchiveConfiguration_])
|
|
74053
|
+
MJArchiveConfigurations_CreatedByUserIDArray: MJArchiveConfiguration_[]; // Link to MJArchiveConfigurations
|
|
72827
74054
|
|
|
72828
74055
|
@Field(() => [MJResourcePermission_])
|
|
72829
74056
|
MJResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
|
|
@@ -72873,6 +74100,9 @@ export class MJUser_ {
|
|
|
72873
74100
|
@Field(() => [MJFileStorageAccountPermission_])
|
|
72874
74101
|
MJFileStorageAccountPermissions_UserIDArray: MJFileStorageAccountPermission_[]; // Link to MJFileStorageAccountPermissions
|
|
72875
74102
|
|
|
74103
|
+
@Field(() => [MJArchiveRun_])
|
|
74104
|
+
MJArchiveRuns_UserIDArray: MJArchiveRun_[]; // Link to MJArchiveRuns
|
|
74105
|
+
|
|
72876
74106
|
@Field(() => [MJAIAgentRun_])
|
|
72877
74107
|
MJAIAgentRuns_UserIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
72878
74108
|
|
|
@@ -73682,6 +74912,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
73682
74912
|
return result;
|
|
73683
74913
|
}
|
|
73684
74914
|
|
|
74915
|
+
@FieldResolver(() => [MJTagAuditLog_])
|
|
74916
|
+
async MJTagAuditLogs_PerformedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
74917
|
+
this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
|
|
74918
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
74919
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('PerformedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
74920
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
74921
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
|
|
74922
|
+
return result;
|
|
74923
|
+
}
|
|
74924
|
+
|
|
73685
74925
|
@FieldResolver(() => [MJContentProcessRun_])
|
|
73686
74926
|
async MJContentProcessRuns_StartedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
73687
74927
|
this.CheckUserReadPermissions('MJ: Content Process Runs', userPayload);
|
|
@@ -73702,13 +74942,23 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
73702
74942
|
return result;
|
|
73703
74943
|
}
|
|
73704
74944
|
|
|
73705
|
-
@FieldResolver(() => [
|
|
73706
|
-
async
|
|
73707
|
-
this.CheckUserReadPermissions('MJ:
|
|
74945
|
+
@FieldResolver(() => [MJMCPToolFavorite_])
|
|
74946
|
+
async MJMCPToolFavorites_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
74947
|
+
this.CheckUserReadPermissions('MJ: MCP Tool Favorites', userPayload);
|
|
73708
74948
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
73709
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
74949
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMCPToolFavorites')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: MCP Tool Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
73710
74950
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
73711
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
74951
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Tool Favorites', rows, this.GetUserFromPayload(userPayload));
|
|
74952
|
+
return result;
|
|
74953
|
+
}
|
|
74954
|
+
|
|
74955
|
+
@FieldResolver(() => [MJArchiveConfiguration_])
|
|
74956
|
+
async MJArchiveConfigurations_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
74957
|
+
this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
|
|
74958
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
74959
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurations')} WHERE ${provider.QuoteIdentifier('CreatedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
74960
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
74961
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configurations', rows, this.GetUserFromPayload(userPayload));
|
|
73712
74962
|
return result;
|
|
73713
74963
|
}
|
|
73714
74964
|
|
|
@@ -73872,6 +75122,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
73872
75122
|
return result;
|
|
73873
75123
|
}
|
|
73874
75124
|
|
|
75125
|
+
@FieldResolver(() => [MJArchiveRun_])
|
|
75126
|
+
async MJArchiveRuns_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75127
|
+
this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
|
|
75128
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75129
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRuns')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
75130
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
75131
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Runs', rows, this.GetUserFromPayload(userPayload));
|
|
75132
|
+
return result;
|
|
75133
|
+
}
|
|
75134
|
+
|
|
73875
75135
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
73876
75136
|
async MJAIAgentRuns_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
73877
75137
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|