@memberjunction/server 5.7.0 → 5.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/agents/skip-agent.d.ts +15 -1
- package/dist/agents/skip-agent.d.ts.map +1 -1
- package/dist/agents/skip-agent.js +78 -36
- package/dist/agents/skip-agent.js.map +1 -1
- package/dist/agents/skip-sdk.d.ts.map +1 -1
- package/dist/agents/skip-sdk.js +12 -0
- package/dist/agents/skip-sdk.js.map +1 -1
- package/dist/apolloServer/index.d.ts +10 -2
- package/dist/apolloServer/index.d.ts.map +1 -1
- package/dist/apolloServer/index.js +22 -8
- package/dist/apolloServer/index.js.map +1 -1
- package/dist/config.d.ts +125 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +23 -0
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +17 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +144 -62
- package/dist/context.js.map +1 -1
- package/dist/generated/generated.d.ts +607 -116
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +3542 -775
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/CacheInvalidationResolver.d.ts +32 -0
- package/dist/generic/CacheInvalidationResolver.d.ts.map +1 -0
- package/dist/generic/CacheInvalidationResolver.js +80 -0
- package/dist/generic/CacheInvalidationResolver.js.map +1 -0
- package/dist/generic/PubSubManager.d.ts +27 -0
- package/dist/generic/PubSubManager.d.ts.map +1 -0
- package/dist/generic/PubSubManager.js +42 -0
- package/dist/generic/PubSubManager.js.map +1 -0
- package/dist/generic/ResolverBase.d.ts +14 -0
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +50 -0
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/hooks.d.ts +65 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +14 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +176 -45
- package/dist/index.js.map +1 -1
- package/dist/multiTenancy/index.d.ts +47 -0
- package/dist/multiTenancy/index.d.ts.map +1 -0
- package/dist/multiTenancy/index.js +152 -0
- package/dist/multiTenancy/index.js.map +1 -0
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts +123 -0
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -0
- package/dist/resolvers/IntegrationDiscoveryResolver.js +624 -0
- package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -0
- package/dist/rest/RESTEndpointHandler.d.ts +3 -1
- package/dist/rest/RESTEndpointHandler.d.ts.map +1 -1
- package/dist/rest/RESTEndpointHandler.js +14 -33
- package/dist/rest/RESTEndpointHandler.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +61 -57
- package/src/__tests__/multiTenancy.security.test.ts +334 -0
- package/src/__tests__/multiTenancy.test.ts +225 -0
- package/src/__tests__/unifiedAuth.test.ts +416 -0
- package/src/agents/skip-agent.ts +87 -34
- package/src/agents/skip-sdk.ts +13 -0
- package/src/apolloServer/index.ts +32 -16
- package/src/config.ts +25 -0
- package/src/context.ts +205 -98
- package/src/generated/generated.ts +2334 -430
- package/src/generic/CacheInvalidationResolver.ts +66 -0
- package/src/generic/PubSubManager.ts +47 -0
- package/src/generic/ResolverBase.ts +53 -0
- package/src/hooks.ts +77 -0
- package/src/index.ts +203 -49
- package/src/multiTenancy/index.ts +183 -0
- package/src/resolvers/IntegrationDiscoveryResolver.ts +584 -0
- package/src/rest/RESTEndpointHandler.ts +23 -42
- package/src/types.ts +10 -0
|
@@ -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, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSkillEntity, MJSQLDialectEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
21
|
+
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSkillEntity, MJSQLDialectEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -6642,18 +6642,21 @@ each time the agent processes a prompt step.`})
|
|
|
6642
6642
|
@Field(() => [MJAIAgentRun_])
|
|
6643
6643
|
MJAIAgentRuns_ParentRunIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
6644
6644
|
|
|
6645
|
-
@Field(() => [MJAIAgentExample_])
|
|
6646
|
-
MJAIAgentExamples_SourceAIAgentRunIDArray: MJAIAgentExample_[]; // Link to MJAIAgentExamples
|
|
6647
|
-
|
|
6648
6645
|
@Field(() => [MJAIAgentNote_])
|
|
6649
6646
|
MJAIAgentNotes_SourceAIAgentRunIDArray: MJAIAgentNote_[]; // Link to MJAIAgentNotes
|
|
6650
6647
|
|
|
6648
|
+
@Field(() => [MJAIAgentExample_])
|
|
6649
|
+
MJAIAgentExamples_SourceAIAgentRunIDArray: MJAIAgentExample_[]; // Link to MJAIAgentExamples
|
|
6650
|
+
|
|
6651
6651
|
@Field(() => [MJAIAgentRunMedia_])
|
|
6652
6652
|
MJAIAgentRunMedias_AgentRunIDArray: MJAIAgentRunMedia_[]; // Link to MJAIAgentRunMedias
|
|
6653
6653
|
|
|
6654
6654
|
@Field(() => [MJAIPromptRun_])
|
|
6655
6655
|
MJAIPromptRuns_AgentRunIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
6656
6656
|
|
|
6657
|
+
@Field(() => [MJAIAgentRun_])
|
|
6658
|
+
MJAIAgentRuns_LastRunIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
6659
|
+
|
|
6657
6660
|
}
|
|
6658
6661
|
|
|
6659
6662
|
//****************************************************************************
|
|
@@ -7001,16 +7004,6 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
7001
7004
|
return result;
|
|
7002
7005
|
}
|
|
7003
7006
|
|
|
7004
|
-
@FieldResolver(() => [MJAIAgentExample_])
|
|
7005
|
-
async MJAIAgentExamples_SourceAIAgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7006
|
-
this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
|
|
7007
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7008
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentExamples')} WHERE ${provider.QuoteIdentifier('SourceAIAgentRunID')}='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
|
|
7009
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
7010
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows, this.GetUserFromPayload(userPayload));
|
|
7011
|
-
return result;
|
|
7012
|
-
}
|
|
7013
|
-
|
|
7014
7007
|
@FieldResolver(() => [MJAIAgentNote_])
|
|
7015
7008
|
async MJAIAgentNotes_SourceAIAgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7016
7009
|
this.CheckUserReadPermissions('MJ: AI Agent Notes', userPayload);
|
|
@@ -7021,6 +7014,16 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
7021
7014
|
return result;
|
|
7022
7015
|
}
|
|
7023
7016
|
|
|
7017
|
+
@FieldResolver(() => [MJAIAgentExample_])
|
|
7018
|
+
async MJAIAgentExamples_SourceAIAgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7019
|
+
this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
|
|
7020
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7021
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentExamples')} WHERE ${provider.QuoteIdentifier('SourceAIAgentRunID')}='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
|
|
7022
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
7023
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows, this.GetUserFromPayload(userPayload));
|
|
7024
|
+
return result;
|
|
7025
|
+
}
|
|
7026
|
+
|
|
7024
7027
|
@FieldResolver(() => [MJAIAgentRunMedia_])
|
|
7025
7028
|
async MJAIAgentRunMedias_AgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7026
7029
|
this.CheckUserReadPermissions('MJ: AI Agent Run Medias', userPayload);
|
|
@@ -7041,6 +7044,16 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
7041
7044
|
return result;
|
|
7042
7045
|
}
|
|
7043
7046
|
|
|
7047
|
+
@FieldResolver(() => [MJAIAgentRun_])
|
|
7048
|
+
async MJAIAgentRuns_LastRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7049
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
7050
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7051
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRuns')} WHERE ${provider.QuoteIdentifier('LastRunID')}='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
7052
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
7053
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows, this.GetUserFromPayload(userPayload));
|
|
7054
|
+
return result;
|
|
7055
|
+
}
|
|
7056
|
+
|
|
7044
7057
|
@Mutation(() => MJAIAgentRun_)
|
|
7045
7058
|
async CreateMJAIAgentRun(
|
|
7046
7059
|
@Arg('input', () => CreateMJAIAgentRunInput) input: CreateMJAIAgentRunInput,
|
|
@@ -7361,10 +7374,10 @@ export class MJAIAgentStep_ {
|
|
|
7361
7374
|
Prompt?: string;
|
|
7362
7375
|
|
|
7363
7376
|
@Field(() => [MJAIAgentStepPath_])
|
|
7364
|
-
|
|
7377
|
+
MJAIAgentStepPaths_OriginStepIDArray: MJAIAgentStepPath_[]; // Link to MJAIAgentStepPaths
|
|
7365
7378
|
|
|
7366
7379
|
@Field(() => [MJAIAgentStepPath_])
|
|
7367
|
-
|
|
7380
|
+
MJAIAgentStepPaths_DestinationStepIDArray: MJAIAgentStepPath_[]; // Link to MJAIAgentStepPaths
|
|
7368
7381
|
|
|
7369
7382
|
}
|
|
7370
7383
|
|
|
@@ -7568,20 +7581,20 @@ export class MJAIAgentStepResolver extends ResolverBase {
|
|
|
7568
7581
|
}
|
|
7569
7582
|
|
|
7570
7583
|
@FieldResolver(() => [MJAIAgentStepPath_])
|
|
7571
|
-
async
|
|
7584
|
+
async MJAIAgentStepPaths_OriginStepIDArray(@Root() mjaiagentstep_: MJAIAgentStep_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7572
7585
|
this.CheckUserReadPermissions('MJ: AI Agent Step Paths', userPayload);
|
|
7573
7586
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7574
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentStepPaths')} WHERE ${provider.QuoteIdentifier('
|
|
7587
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentStepPaths')} WHERE ${provider.QuoteIdentifier('OriginStepID')}='${mjaiagentstep_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Step Paths', userPayload, EntityPermissionType.Read, 'AND');
|
|
7575
7588
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
7576
7589
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Step Paths', rows, this.GetUserFromPayload(userPayload));
|
|
7577
7590
|
return result;
|
|
7578
7591
|
}
|
|
7579
7592
|
|
|
7580
7593
|
@FieldResolver(() => [MJAIAgentStepPath_])
|
|
7581
|
-
async
|
|
7594
|
+
async MJAIAgentStepPaths_DestinationStepIDArray(@Root() mjaiagentstep_: MJAIAgentStep_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7582
7595
|
this.CheckUserReadPermissions('MJ: AI Agent Step Paths', userPayload);
|
|
7583
7596
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7584
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentStepPaths')} WHERE ${provider.QuoteIdentifier('
|
|
7597
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentStepPaths')} WHERE ${provider.QuoteIdentifier('DestinationStepID')}='${mjaiagentstep_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Step Paths', userPayload, EntityPermissionType.Read, 'AND');
|
|
7585
7598
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
7586
7599
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Step Paths', rows, this.GetUserFromPayload(userPayload));
|
|
7587
7600
|
return result;
|
|
@@ -8113,10 +8126,10 @@ if this limit is exceeded.`})
|
|
|
8113
8126
|
MJAIAgentRequests_AgentIDArray: MJAIAgentRequest_[]; // Link to MJAIAgentRequests
|
|
8114
8127
|
|
|
8115
8128
|
@Field(() => [MJAIAgentStep_])
|
|
8116
|
-
|
|
8129
|
+
MJAIAgentSteps_SubAgentIDArray: MJAIAgentStep_[]; // Link to MJAIAgentSteps
|
|
8117
8130
|
|
|
8118
8131
|
@Field(() => [MJAIAgentRelationship_])
|
|
8119
|
-
|
|
8132
|
+
MJAIAgentRelationships_SubAgentIDArray: MJAIAgentRelationship_[]; // Link to MJAIAgentRelationships
|
|
8120
8133
|
|
|
8121
8134
|
@Field(() => [MJAIAgentArtifactType_])
|
|
8122
8135
|
MJAIAgentArtifactTypes_AgentIDArray: MJAIAgentArtifactType_[]; // Link to MJAIAgentArtifactTypes
|
|
@@ -8140,10 +8153,10 @@ if this limit is exceeded.`})
|
|
|
8140
8153
|
MJAIAgentRuns_AgentIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
8141
8154
|
|
|
8142
8155
|
@Field(() => [MJAIAgentStep_])
|
|
8143
|
-
|
|
8156
|
+
MJAIAgentSteps_AgentIDArray: MJAIAgentStep_[]; // Link to MJAIAgentSteps
|
|
8144
8157
|
|
|
8145
8158
|
@Field(() => [MJAIAgentRelationship_])
|
|
8146
|
-
|
|
8159
|
+
MJAIAgentRelationships_AgentIDArray: MJAIAgentRelationship_[]; // Link to MJAIAgentRelationships
|
|
8147
8160
|
|
|
8148
8161
|
@Field(() => [MJTask_])
|
|
8149
8162
|
MJTasks_AgentIDArray: MJTask_[]; // Link to MJTasks
|
|
@@ -8154,12 +8167,12 @@ if this limit is exceeded.`})
|
|
|
8154
8167
|
@Field(() => [MJAIAgentConfiguration_])
|
|
8155
8168
|
MJAIAgentConfigurations_AgentIDArray: MJAIAgentConfiguration_[]; // Link to MJAIAgentConfigurations
|
|
8156
8169
|
|
|
8157
|
-
@Field(() => [MJAIResultCache_])
|
|
8158
|
-
MJAIResultCache_AgentIDArray: MJAIResultCache_[]; // Link to MJAIResultCache
|
|
8159
|
-
|
|
8160
8170
|
@Field(() => [MJAIPromptRun_])
|
|
8161
8171
|
MJAIPromptRuns_AgentIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
8162
8172
|
|
|
8173
|
+
@Field(() => [MJAIResultCache_])
|
|
8174
|
+
MJAIResultCache_AgentIDArray: MJAIResultCache_[]; // Link to MJAIResultCache
|
|
8175
|
+
|
|
8163
8176
|
@Field(() => [MJConversationDetail_])
|
|
8164
8177
|
MJConversationDetails_AgentIDArray: MJConversationDetail_[]; // Link to MJConversationDetails
|
|
8165
8178
|
|
|
@@ -8636,20 +8649,20 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
8636
8649
|
}
|
|
8637
8650
|
|
|
8638
8651
|
@FieldResolver(() => [MJAIAgentStep_])
|
|
8639
|
-
async
|
|
8652
|
+
async MJAIAgentSteps_SubAgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8640
8653
|
this.CheckUserReadPermissions('MJ: AI Agent Steps', userPayload);
|
|
8641
8654
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8642
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentSteps')} WHERE ${provider.QuoteIdentifier('
|
|
8655
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentSteps')} WHERE ${provider.QuoteIdentifier('SubAgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Steps', userPayload, EntityPermissionType.Read, 'AND');
|
|
8643
8656
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
8644
8657
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Steps', rows, this.GetUserFromPayload(userPayload));
|
|
8645
8658
|
return result;
|
|
8646
8659
|
}
|
|
8647
8660
|
|
|
8648
8661
|
@FieldResolver(() => [MJAIAgentRelationship_])
|
|
8649
|
-
async
|
|
8662
|
+
async MJAIAgentRelationships_SubAgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8650
8663
|
this.CheckUserReadPermissions('MJ: AI Agent Relationships', userPayload);
|
|
8651
8664
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8652
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRelationships')} WHERE ${provider.QuoteIdentifier('
|
|
8665
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRelationships')} WHERE ${provider.QuoteIdentifier('SubAgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
8653
8666
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
8654
8667
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Relationships', rows, this.GetUserFromPayload(userPayload));
|
|
8655
8668
|
return result;
|
|
@@ -8726,20 +8739,20 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
8726
8739
|
}
|
|
8727
8740
|
|
|
8728
8741
|
@FieldResolver(() => [MJAIAgentStep_])
|
|
8729
|
-
async
|
|
8742
|
+
async MJAIAgentSteps_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8730
8743
|
this.CheckUserReadPermissions('MJ: AI Agent Steps', userPayload);
|
|
8731
8744
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8732
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentSteps')} WHERE ${provider.QuoteIdentifier('
|
|
8745
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentSteps')} WHERE ${provider.QuoteIdentifier('AgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Steps', userPayload, EntityPermissionType.Read, 'AND');
|
|
8733
8746
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
8734
8747
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Steps', rows, this.GetUserFromPayload(userPayload));
|
|
8735
8748
|
return result;
|
|
8736
8749
|
}
|
|
8737
8750
|
|
|
8738
8751
|
@FieldResolver(() => [MJAIAgentRelationship_])
|
|
8739
|
-
async
|
|
8752
|
+
async MJAIAgentRelationships_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8740
8753
|
this.CheckUserReadPermissions('MJ: AI Agent Relationships', userPayload);
|
|
8741
8754
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8742
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRelationships')} WHERE ${provider.QuoteIdentifier('
|
|
8755
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRelationships')} WHERE ${provider.QuoteIdentifier('AgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
8743
8756
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
8744
8757
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Relationships', rows, this.GetUserFromPayload(userPayload));
|
|
8745
8758
|
return result;
|
|
@@ -8775,16 +8788,6 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
8775
8788
|
return result;
|
|
8776
8789
|
}
|
|
8777
8790
|
|
|
8778
|
-
@FieldResolver(() => [MJAIResultCache_])
|
|
8779
|
-
async MJAIResultCache_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8780
|
-
this.CheckUserReadPermissions('MJ: AI Result Cache', userPayload);
|
|
8781
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8782
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIResultCaches')} WHERE ${provider.QuoteIdentifier('AgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Result Cache', userPayload, EntityPermissionType.Read, 'AND');
|
|
8783
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
8784
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Result Cache', rows, this.GetUserFromPayload(userPayload));
|
|
8785
|
-
return result;
|
|
8786
|
-
}
|
|
8787
|
-
|
|
8788
8791
|
@FieldResolver(() => [MJAIPromptRun_])
|
|
8789
8792
|
async MJAIPromptRuns_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8790
8793
|
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
@@ -8795,6 +8798,16 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
8795
8798
|
return result;
|
|
8796
8799
|
}
|
|
8797
8800
|
|
|
8801
|
+
@FieldResolver(() => [MJAIResultCache_])
|
|
8802
|
+
async MJAIResultCache_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8803
|
+
this.CheckUserReadPermissions('MJ: AI Result Cache', userPayload);
|
|
8804
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8805
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIResultCaches')} WHERE ${provider.QuoteIdentifier('AgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Result Cache', userPayload, EntityPermissionType.Read, 'AND');
|
|
8806
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
8807
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Result Cache', rows, this.GetUserFromPayload(userPayload));
|
|
8808
|
+
return result;
|
|
8809
|
+
}
|
|
8810
|
+
|
|
8798
8811
|
@FieldResolver(() => [MJConversationDetail_])
|
|
8799
8812
|
async MJConversationDetails_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8800
8813
|
this.CheckUserReadPermissions('MJ: Conversation Details', userPayload);
|
|
@@ -9326,15 +9339,15 @@ export class MJAIConfiguration_ {
|
|
|
9326
9339
|
@Field(() => [MJAIAgentConfiguration_])
|
|
9327
9340
|
MJAIAgentConfigurations_AIConfigurationIDArray: MJAIAgentConfiguration_[]; // Link to MJAIAgentConfigurations
|
|
9328
9341
|
|
|
9342
|
+
@Field(() => [MJAIPromptRun_])
|
|
9343
|
+
MJAIPromptRuns_ConfigurationIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
9344
|
+
|
|
9329
9345
|
@Field(() => [MJAIPromptModel_])
|
|
9330
9346
|
MJAIPromptModels_ConfigurationIDArray: MJAIPromptModel_[]; // Link to MJAIPromptModels
|
|
9331
9347
|
|
|
9332
9348
|
@Field(() => [MJAIResultCache_])
|
|
9333
9349
|
MJAIResultCache_ConfigurationIDArray: MJAIResultCache_[]; // Link to MJAIResultCache
|
|
9334
9350
|
|
|
9335
|
-
@Field(() => [MJAIPromptRun_])
|
|
9336
|
-
MJAIPromptRuns_ConfigurationIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
9337
|
-
|
|
9338
9351
|
@Field(() => [MJAIAgentRun_])
|
|
9339
9352
|
MJAIAgentRuns_ConfigurationIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
9340
9353
|
|
|
@@ -9506,6 +9519,16 @@ export class MJAIConfigurationResolver extends ResolverBase {
|
|
|
9506
9519
|
return result;
|
|
9507
9520
|
}
|
|
9508
9521
|
|
|
9522
|
+
@FieldResolver(() => [MJAIPromptRun_])
|
|
9523
|
+
async MJAIPromptRuns_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9524
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
9525
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9526
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('ConfigurationID')}='${mjaiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9527
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
9528
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
9529
|
+
return result;
|
|
9530
|
+
}
|
|
9531
|
+
|
|
9509
9532
|
@FieldResolver(() => [MJAIPromptModel_])
|
|
9510
9533
|
async MJAIPromptModels_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9511
9534
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
@@ -9526,16 +9549,6 @@ export class MJAIConfigurationResolver extends ResolverBase {
|
|
|
9526
9549
|
return result;
|
|
9527
9550
|
}
|
|
9528
9551
|
|
|
9529
|
-
@FieldResolver(() => [MJAIPromptRun_])
|
|
9530
|
-
async MJAIPromptRuns_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9531
|
-
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
9532
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9533
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('ConfigurationID')}='${mjaiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9534
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
9535
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
9536
|
-
return result;
|
|
9537
|
-
}
|
|
9538
|
-
|
|
9539
9552
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
9540
9553
|
async MJAIAgentRuns_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9541
9554
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -9844,17 +9857,17 @@ export class MJAIModality_ {
|
|
|
9844
9857
|
@Field(() => [MJAIModelModality_])
|
|
9845
9858
|
MJAIModelModalities_ModalityIDArray: MJAIModelModality_[]; // Link to MJAIModelModalities
|
|
9846
9859
|
|
|
9860
|
+
@Field(() => [MJAIModelType_])
|
|
9861
|
+
MJAIModelTypes_DefaultInputModalityIDArray: MJAIModelType_[]; // Link to MJAIModelTypes
|
|
9862
|
+
|
|
9847
9863
|
@Field(() => [MJConversationDetailAttachment_])
|
|
9848
9864
|
MJConversationDetailAttachments_ModalityIDArray: MJConversationDetailAttachment_[]; // Link to MJConversationDetailAttachments
|
|
9849
9865
|
|
|
9850
|
-
@Field(() => [MJAIModelType_])
|
|
9851
|
-
MJAIModelTypes_DefaultOutputModalityIDArray: MJAIModelType_[]; // Link to MJAIModelTypes
|
|
9852
|
-
|
|
9853
9866
|
@Field(() => [MJAIPromptRunMedia_])
|
|
9854
9867
|
MJAIPromptRunMedias_ModalityIDArray: MJAIPromptRunMedia_[]; // Link to MJAIPromptRunMedias
|
|
9855
9868
|
|
|
9856
9869
|
@Field(() => [MJAIModelType_])
|
|
9857
|
-
|
|
9870
|
+
MJAIModelTypes_DefaultOutputModalityIDArray: MJAIModelType_[]; // Link to MJAIModelTypes
|
|
9858
9871
|
|
|
9859
9872
|
@Field(() => [MJAIAgentRunMedia_])
|
|
9860
9873
|
MJAIAgentRunMedias_ModalityIDArray: MJAIAgentRunMedia_[]; // Link to MJAIAgentRunMedias
|
|
@@ -10008,23 +10021,23 @@ export class MJAIModalityResolver extends ResolverBase {
|
|
|
10008
10021
|
return result;
|
|
10009
10022
|
}
|
|
10010
10023
|
|
|
10011
|
-
@FieldResolver(() => [
|
|
10012
|
-
async
|
|
10013
|
-
this.CheckUserReadPermissions('MJ:
|
|
10024
|
+
@FieldResolver(() => [MJAIModelType_])
|
|
10025
|
+
async MJAIModelTypes_DefaultInputModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10026
|
+
this.CheckUserReadPermissions('MJ: AI Model Types', userPayload);
|
|
10014
10027
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10015
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
10028
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIModelTypes')} WHERE ${provider.QuoteIdentifier('DefaultInputModalityID')}='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
10016
10029
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
10017
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
10030
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Types', rows, this.GetUserFromPayload(userPayload));
|
|
10018
10031
|
return result;
|
|
10019
10032
|
}
|
|
10020
10033
|
|
|
10021
|
-
@FieldResolver(() => [
|
|
10022
|
-
async
|
|
10023
|
-
this.CheckUserReadPermissions('MJ:
|
|
10034
|
+
@FieldResolver(() => [MJConversationDetailAttachment_])
|
|
10035
|
+
async MJConversationDetailAttachments_ModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10036
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Attachments', userPayload);
|
|
10024
10037
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10025
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
10038
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationDetailAttachments')} WHERE ${provider.QuoteIdentifier('ModalityID')}='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Attachments', userPayload, EntityPermissionType.Read, 'AND');
|
|
10026
10039
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
10027
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
10040
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Attachments', rows, this.GetUserFromPayload(userPayload));
|
|
10028
10041
|
return result;
|
|
10029
10042
|
}
|
|
10030
10043
|
|
|
@@ -10039,10 +10052,10 @@ export class MJAIModalityResolver extends ResolverBase {
|
|
|
10039
10052
|
}
|
|
10040
10053
|
|
|
10041
10054
|
@FieldResolver(() => [MJAIModelType_])
|
|
10042
|
-
async
|
|
10055
|
+
async MJAIModelTypes_DefaultOutputModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10043
10056
|
this.CheckUserReadPermissions('MJ: AI Model Types', userPayload);
|
|
10044
10057
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10045
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIModelTypes')} WHERE ${provider.QuoteIdentifier('
|
|
10058
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIModelTypes')} WHERE ${provider.QuoteIdentifier('DefaultOutputModalityID')}='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
10046
10059
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
10047
10060
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Types', rows, this.GetUserFromPayload(userPayload));
|
|
10048
10061
|
return result;
|
|
@@ -11829,18 +11842,18 @@ export class MJAIModel_ {
|
|
|
11829
11842
|
@Field(() => [MJAIResultCache_])
|
|
11830
11843
|
MJAIResultCache_AIModelIDArray: MJAIResultCache_[]; // Link to MJAIResultCache
|
|
11831
11844
|
|
|
11832
|
-
@Field(() => [MJAIAgentNote_])
|
|
11833
|
-
MJAIAgentNotes_EmbeddingModelIDArray: MJAIAgentNote_[]; // Link to MJAIAgentNotes
|
|
11834
|
-
|
|
11835
11845
|
@Field(() => [MJAIAgentExample_])
|
|
11836
11846
|
MJAIAgentExamples_EmbeddingModelIDArray: MJAIAgentExample_[]; // Link to MJAIAgentExamples
|
|
11837
11847
|
|
|
11838
|
-
@Field(() => [
|
|
11839
|
-
|
|
11848
|
+
@Field(() => [MJAIAgentNote_])
|
|
11849
|
+
MJAIAgentNotes_EmbeddingModelIDArray: MJAIAgentNote_[]; // Link to MJAIAgentNotes
|
|
11840
11850
|
|
|
11841
11851
|
@Field(() => [MJAIModelArchitecture_])
|
|
11842
11852
|
MJAIModelArchitectures_ModelIDArray: MJAIModelArchitecture_[]; // Link to MJAIModelArchitectures
|
|
11843
11853
|
|
|
11854
|
+
@Field(() => [MJAIModelModality_])
|
|
11855
|
+
MJAIModelModalities_ModelIDArray: MJAIModelModality_[]; // Link to MJAIModelModalities
|
|
11856
|
+
|
|
11844
11857
|
@Field(() => [MJAIAgentModel_])
|
|
11845
11858
|
MJAIAgentModels_ModelIDArray: MJAIAgentModel_[]; // Link to MJAIAgentModels
|
|
11846
11859
|
|
|
@@ -11857,7 +11870,7 @@ export class MJAIModel_ {
|
|
|
11857
11870
|
MJAIPromptModels_ModelIDArray: MJAIPromptModel_[]; // Link to MJAIPromptModels
|
|
11858
11871
|
|
|
11859
11872
|
@Field(() => [MJAIPromptRun_])
|
|
11860
|
-
|
|
11873
|
+
MJAIPromptRuns_OriginalModelIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
11861
11874
|
|
|
11862
11875
|
@Field(() => [MJAIAgentRun_])
|
|
11863
11876
|
MJAIAgentRuns_OverrideModelIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
@@ -11865,6 +11878,9 @@ export class MJAIModel_ {
|
|
|
11865
11878
|
@Field(() => [MJQuery_])
|
|
11866
11879
|
MJQueries_EmbeddingModelIDArray: MJQuery_[]; // Link to MJQueries
|
|
11867
11880
|
|
|
11881
|
+
@Field(() => [MJAIPromptRun_])
|
|
11882
|
+
MJAIPromptRuns_ModelIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
11883
|
+
|
|
11868
11884
|
@Field(() => [MJAIModel_])
|
|
11869
11885
|
MJAIModels_PriorVersionIDArray: MJAIModel_[]; // Link to MJAIModels
|
|
11870
11886
|
|
|
@@ -12131,16 +12147,6 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
12131
12147
|
return result;
|
|
12132
12148
|
}
|
|
12133
12149
|
|
|
12134
|
-
@FieldResolver(() => [MJAIAgentNote_])
|
|
12135
|
-
async MJAIAgentNotes_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12136
|
-
this.CheckUserReadPermissions('MJ: AI Agent Notes', userPayload);
|
|
12137
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12138
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentNotes')} WHERE ${provider.QuoteIdentifier('EmbeddingModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
12139
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
12140
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Notes', rows, this.GetUserFromPayload(userPayload));
|
|
12141
|
-
return result;
|
|
12142
|
-
}
|
|
12143
|
-
|
|
12144
12150
|
@FieldResolver(() => [MJAIAgentExample_])
|
|
12145
12151
|
async MJAIAgentExamples_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12146
12152
|
this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
|
|
@@ -12151,13 +12157,13 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
12151
12157
|
return result;
|
|
12152
12158
|
}
|
|
12153
12159
|
|
|
12154
|
-
@FieldResolver(() => [
|
|
12155
|
-
async
|
|
12156
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
12160
|
+
@FieldResolver(() => [MJAIAgentNote_])
|
|
12161
|
+
async MJAIAgentNotes_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12162
|
+
this.CheckUserReadPermissions('MJ: AI Agent Notes', userPayload);
|
|
12157
12163
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12158
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
12164
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentNotes')} WHERE ${provider.QuoteIdentifier('EmbeddingModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
12159
12165
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
12160
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
12166
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Notes', rows, this.GetUserFromPayload(userPayload));
|
|
12161
12167
|
return result;
|
|
12162
12168
|
}
|
|
12163
12169
|
|
|
@@ -12171,6 +12177,16 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
12171
12177
|
return result;
|
|
12172
12178
|
}
|
|
12173
12179
|
|
|
12180
|
+
@FieldResolver(() => [MJAIModelModality_])
|
|
12181
|
+
async MJAIModelModalities_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12182
|
+
this.CheckUserReadPermissions('MJ: AI Model Modalities', userPayload);
|
|
12183
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12184
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIModelModalities')} WHERE ${provider.QuoteIdentifier('ModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Modalities', userPayload, EntityPermissionType.Read, 'AND');
|
|
12185
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
12186
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Modalities', rows, this.GetUserFromPayload(userPayload));
|
|
12187
|
+
return result;
|
|
12188
|
+
}
|
|
12189
|
+
|
|
12174
12190
|
@FieldResolver(() => [MJAIAgentModel_])
|
|
12175
12191
|
async MJAIAgentModels_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12176
12192
|
this.CheckUserReadPermissions('MJ: AI Agent Models', userPayload);
|
|
@@ -12222,10 +12238,10 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
12222
12238
|
}
|
|
12223
12239
|
|
|
12224
12240
|
@FieldResolver(() => [MJAIPromptRun_])
|
|
12225
|
-
async
|
|
12241
|
+
async MJAIPromptRuns_OriginalModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12226
12242
|
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
12227
12243
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12228
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('
|
|
12244
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('OriginalModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
12229
12245
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
12230
12246
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
12231
12247
|
return result;
|
|
@@ -12251,6 +12267,16 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
12251
12267
|
return result;
|
|
12252
12268
|
}
|
|
12253
12269
|
|
|
12270
|
+
@FieldResolver(() => [MJAIPromptRun_])
|
|
12271
|
+
async MJAIPromptRuns_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12272
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
12273
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12274
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('ModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
12275
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
12276
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
12277
|
+
return result;
|
|
12278
|
+
}
|
|
12279
|
+
|
|
12254
12280
|
@FieldResolver(() => [MJAIModel_])
|
|
12255
12281
|
async MJAIModels_PriorVersionIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12256
12282
|
this.CheckUserReadPermissions('MJ: AI Models', userPayload);
|
|
@@ -13366,7 +13392,7 @@ export class MJAIPromptRun_ {
|
|
|
13366
13392
|
RootRerunFromPromptRunID?: string;
|
|
13367
13393
|
|
|
13368
13394
|
@Field(() => [MJAIPromptRun_])
|
|
13369
|
-
|
|
13395
|
+
MJAIPromptRuns_RerunFromPromptRunIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
13370
13396
|
|
|
13371
13397
|
@Field(() => [MJAIPromptRunMedia_])
|
|
13372
13398
|
MJAIPromptRunMedias_PromptRunIDArray: MJAIPromptRunMedia_[]; // Link to MJAIPromptRunMedias
|
|
@@ -13374,6 +13400,9 @@ export class MJAIPromptRun_ {
|
|
|
13374
13400
|
@Field(() => [MJAIResultCache_])
|
|
13375
13401
|
MJAIResultCache_PromptRunIDArray: MJAIResultCache_[]; // Link to MJAIResultCache
|
|
13376
13402
|
|
|
13403
|
+
@Field(() => [MJAIPromptRun_])
|
|
13404
|
+
MJAIPromptRuns_ParentIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
13405
|
+
|
|
13377
13406
|
}
|
|
13378
13407
|
|
|
13379
13408
|
//****************************************************************************
|
|
@@ -13942,10 +13971,10 @@ export class MJAIPromptRunResolver extends ResolverBase {
|
|
|
13942
13971
|
}
|
|
13943
13972
|
|
|
13944
13973
|
@FieldResolver(() => [MJAIPromptRun_])
|
|
13945
|
-
async
|
|
13974
|
+
async MJAIPromptRuns_RerunFromPromptRunIDArray(@Root() mjaipromptrun_: MJAIPromptRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13946
13975
|
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
13947
13976
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13948
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('
|
|
13977
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('RerunFromPromptRunID')}='${mjaipromptrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
13949
13978
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
13950
13979
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
13951
13980
|
return result;
|
|
@@ -13971,6 +14000,16 @@ export class MJAIPromptRunResolver extends ResolverBase {
|
|
|
13971
14000
|
return result;
|
|
13972
14001
|
}
|
|
13973
14002
|
|
|
14003
|
+
@FieldResolver(() => [MJAIPromptRun_])
|
|
14004
|
+
async MJAIPromptRuns_ParentIDArray(@Root() mjaipromptrun_: MJAIPromptRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14005
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
14006
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14007
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('ParentID')}='${mjaipromptrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
14008
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14009
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
14010
|
+
return result;
|
|
14011
|
+
}
|
|
14012
|
+
|
|
13974
14013
|
@Mutation(() => MJAIPromptRun_)
|
|
13975
14014
|
async CreateMJAIPromptRun(
|
|
13976
14015
|
@Arg('input', () => CreateMJAIPromptRunInput) input: CreateMJAIPromptRunInput,
|
|
@@ -14366,7 +14405,7 @@ export class MJAIPrompt_ {
|
|
|
14366
14405
|
MJAIResultCache_AIPromptIDArray: MJAIResultCache_[]; // Link to MJAIResultCache
|
|
14367
14406
|
|
|
14368
14407
|
@Field(() => [MJAIConfiguration_])
|
|
14369
|
-
|
|
14408
|
+
MJAIConfigurations_DefaultPromptForContextSummarizationIDArray: MJAIConfiguration_[]; // Link to MJAIConfigurations
|
|
14370
14409
|
|
|
14371
14410
|
@Field(() => [MJAIAgentType_])
|
|
14372
14411
|
MJAIAgentTypes_SystemPromptIDArray: MJAIAgentType_[]; // Link to MJAIAgentTypes
|
|
@@ -14375,23 +14414,29 @@ export class MJAIPrompt_ {
|
|
|
14375
14414
|
MJAIAgentActions_CompactPromptIDArray: MJAIAgentAction_[]; // Link to MJAIAgentActions
|
|
14376
14415
|
|
|
14377
14416
|
@Field(() => [MJAIConfiguration_])
|
|
14378
|
-
|
|
14417
|
+
MJAIConfigurations_DefaultPromptForContextCompressionIDArray: MJAIConfiguration_[]; // Link to MJAIConfigurations
|
|
14379
14418
|
|
|
14380
14419
|
@Field(() => [MJAIPrompt_])
|
|
14381
14420
|
MJAIPrompts_ResultSelectorPromptIDArray: MJAIPrompt_[]; // Link to MJAIPrompts
|
|
14382
14421
|
|
|
14383
|
-
@Field(() => [MJAIPromptModel_])
|
|
14384
|
-
MJAIPromptModels_PromptIDArray: MJAIPromptModel_[]; // Link to MJAIPromptModels
|
|
14385
|
-
|
|
14386
14422
|
@Field(() => [MJAIAgentPrompt_])
|
|
14387
14423
|
MJAIAgentPrompts_PromptIDArray: MJAIAgentPrompt_[]; // Link to MJAIAgentPrompts
|
|
14388
14424
|
|
|
14425
|
+
@Field(() => [MJAIPromptModel_])
|
|
14426
|
+
MJAIPromptModels_PromptIDArray: MJAIPromptModel_[]; // Link to MJAIPromptModels
|
|
14427
|
+
|
|
14389
14428
|
@Field(() => [MJAIAgentStep_])
|
|
14390
14429
|
MJAIAgentSteps_PromptIDArray: MJAIAgentStep_[]; // Link to MJAIAgentSteps
|
|
14391
14430
|
|
|
14392
14431
|
@Field(() => [MJAIPromptRun_])
|
|
14393
14432
|
MJAIPromptRuns_PromptIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
14394
14433
|
|
|
14434
|
+
@Field(() => [MJAIPromptRun_])
|
|
14435
|
+
MJAIPromptRuns_ChildPromptIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
14436
|
+
|
|
14437
|
+
@Field(() => [MJAIPromptRun_])
|
|
14438
|
+
MJAIPromptRuns_JudgeIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
14439
|
+
|
|
14395
14440
|
@Field(() => [MJAIAgent_])
|
|
14396
14441
|
MJAIAgents_ContextCompressionPromptIDArray: MJAIAgent_[]; // Link to MJAIAgents
|
|
14397
14442
|
|
|
@@ -14778,10 +14823,10 @@ export class MJAIPromptResolver extends ResolverBase {
|
|
|
14778
14823
|
}
|
|
14779
14824
|
|
|
14780
14825
|
@FieldResolver(() => [MJAIConfiguration_])
|
|
14781
|
-
async
|
|
14826
|
+
async MJAIConfigurations_DefaultPromptForContextSummarizationIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14782
14827
|
this.CheckUserReadPermissions('MJ: AI Configurations', userPayload);
|
|
14783
14828
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14784
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIConfigurations')} WHERE ${provider.QuoteIdentifier('
|
|
14829
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIConfigurations')} WHERE ${provider.QuoteIdentifier('DefaultPromptForContextSummarizationID')}='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
14785
14830
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14786
14831
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Configurations', rows, this.GetUserFromPayload(userPayload));
|
|
14787
14832
|
return result;
|
|
@@ -14808,10 +14853,10 @@ export class MJAIPromptResolver extends ResolverBase {
|
|
|
14808
14853
|
}
|
|
14809
14854
|
|
|
14810
14855
|
@FieldResolver(() => [MJAIConfiguration_])
|
|
14811
|
-
async
|
|
14856
|
+
async MJAIConfigurations_DefaultPromptForContextCompressionIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14812
14857
|
this.CheckUserReadPermissions('MJ: AI Configurations', userPayload);
|
|
14813
14858
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14814
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIConfigurations')} WHERE ${provider.QuoteIdentifier('
|
|
14859
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIConfigurations')} WHERE ${provider.QuoteIdentifier('DefaultPromptForContextCompressionID')}='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
14815
14860
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14816
14861
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Configurations', rows, this.GetUserFromPayload(userPayload));
|
|
14817
14862
|
return result;
|
|
@@ -14827,16 +14872,6 @@ export class MJAIPromptResolver extends ResolverBase {
|
|
|
14827
14872
|
return result;
|
|
14828
14873
|
}
|
|
14829
14874
|
|
|
14830
|
-
@FieldResolver(() => [MJAIPromptModel_])
|
|
14831
|
-
async MJAIPromptModels_PromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14832
|
-
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
14833
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14834
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptModels')} WHERE ${provider.QuoteIdentifier('PromptID')}='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
14835
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14836
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows, this.GetUserFromPayload(userPayload));
|
|
14837
|
-
return result;
|
|
14838
|
-
}
|
|
14839
|
-
|
|
14840
14875
|
@FieldResolver(() => [MJAIAgentPrompt_])
|
|
14841
14876
|
async MJAIAgentPrompts_PromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14842
14877
|
this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
|
|
@@ -14847,6 +14882,16 @@ export class MJAIPromptResolver extends ResolverBase {
|
|
|
14847
14882
|
return result;
|
|
14848
14883
|
}
|
|
14849
14884
|
|
|
14885
|
+
@FieldResolver(() => [MJAIPromptModel_])
|
|
14886
|
+
async MJAIPromptModels_PromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14887
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
14888
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14889
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptModels')} WHERE ${provider.QuoteIdentifier('PromptID')}='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
14890
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14891
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows, this.GetUserFromPayload(userPayload));
|
|
14892
|
+
return result;
|
|
14893
|
+
}
|
|
14894
|
+
|
|
14850
14895
|
@FieldResolver(() => [MJAIAgentStep_])
|
|
14851
14896
|
async MJAIAgentSteps_PromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14852
14897
|
this.CheckUserReadPermissions('MJ: AI Agent Steps', userPayload);
|
|
@@ -14867,6 +14912,26 @@ export class MJAIPromptResolver extends ResolverBase {
|
|
|
14867
14912
|
return result;
|
|
14868
14913
|
}
|
|
14869
14914
|
|
|
14915
|
+
@FieldResolver(() => [MJAIPromptRun_])
|
|
14916
|
+
async MJAIPromptRuns_ChildPromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14917
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
14918
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14919
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('ChildPromptID')}='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
14920
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14921
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
14922
|
+
return result;
|
|
14923
|
+
}
|
|
14924
|
+
|
|
14925
|
+
@FieldResolver(() => [MJAIPromptRun_])
|
|
14926
|
+
async MJAIPromptRuns_JudgeIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14927
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
14928
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14929
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('JudgeID')}='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
14930
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14931
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
14932
|
+
return result;
|
|
14933
|
+
}
|
|
14934
|
+
|
|
14870
14935
|
@FieldResolver(() => [MJAIAgent_])
|
|
14871
14936
|
async MJAIAgents_ContextCompressionPromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14872
14937
|
this.CheckUserReadPermissions('MJ: AI Agents', userPayload);
|
|
@@ -15552,18 +15617,18 @@ export class MJAIVendor_ {
|
|
|
15552
15617
|
@MaxLength(100)
|
|
15553
15618
|
CredentialType?: string;
|
|
15554
15619
|
|
|
15555
|
-
@Field(() => [
|
|
15556
|
-
|
|
15620
|
+
@Field(() => [MJAIModelVendor_])
|
|
15621
|
+
MJAIModelVendors_VendorIDArray: MJAIModelVendor_[]; // Link to MJAIModelVendors
|
|
15557
15622
|
|
|
15558
15623
|
@Field(() => [MJAIResultCache_])
|
|
15559
15624
|
MJAIResultCache_VendorIDArray: MJAIResultCache_[]; // Link to MJAIResultCache
|
|
15560
15625
|
|
|
15561
|
-
@Field(() => [MJAIModelVendor_])
|
|
15562
|
-
MJAIModelVendors_VendorIDArray: MJAIModelVendor_[]; // Link to MJAIModelVendors
|
|
15563
|
-
|
|
15564
15626
|
@Field(() => [MJAIPromptRun_])
|
|
15565
15627
|
MJAIPromptRuns_VendorIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
15566
15628
|
|
|
15629
|
+
@Field(() => [MJAIPromptModel_])
|
|
15630
|
+
MJAIPromptModels_VendorIDArray: MJAIPromptModel_[]; // Link to MJAIPromptModels
|
|
15631
|
+
|
|
15567
15632
|
@Field(() => [MJAIVendorType_])
|
|
15568
15633
|
MJAIVendorTypes_VendorIDArray: MJAIVendorType_[]; // Link to MJAIVendorTypes
|
|
15569
15634
|
|
|
@@ -15675,13 +15740,13 @@ export class MJAIVendorResolver extends ResolverBase {
|
|
|
15675
15740
|
return result;
|
|
15676
15741
|
}
|
|
15677
15742
|
|
|
15678
|
-
@FieldResolver(() => [
|
|
15679
|
-
async
|
|
15680
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
15743
|
+
@FieldResolver(() => [MJAIModelVendor_])
|
|
15744
|
+
async MJAIModelVendors_VendorIDArray(@Root() mjaivendor_: MJAIVendor_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15745
|
+
this.CheckUserReadPermissions('MJ: AI Model Vendors', userPayload);
|
|
15681
15746
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15682
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
15747
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIModelVendors')} WHERE ${provider.QuoteIdentifier('VendorID')}='${mjaivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Vendors', userPayload, EntityPermissionType.Read, 'AND');
|
|
15683
15748
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
15684
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
15749
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Vendors', rows, this.GetUserFromPayload(userPayload));
|
|
15685
15750
|
return result;
|
|
15686
15751
|
}
|
|
15687
15752
|
|
|
@@ -15695,16 +15760,6 @@ export class MJAIVendorResolver extends ResolverBase {
|
|
|
15695
15760
|
return result;
|
|
15696
15761
|
}
|
|
15697
15762
|
|
|
15698
|
-
@FieldResolver(() => [MJAIModelVendor_])
|
|
15699
|
-
async MJAIModelVendors_VendorIDArray(@Root() mjaivendor_: MJAIVendor_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15700
|
-
this.CheckUserReadPermissions('MJ: AI Model Vendors', userPayload);
|
|
15701
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15702
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIModelVendors')} WHERE ${provider.QuoteIdentifier('VendorID')}='${mjaivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Vendors', userPayload, EntityPermissionType.Read, 'AND');
|
|
15703
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
15704
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Vendors', rows, this.GetUserFromPayload(userPayload));
|
|
15705
|
-
return result;
|
|
15706
|
-
}
|
|
15707
|
-
|
|
15708
15763
|
@FieldResolver(() => [MJAIPromptRun_])
|
|
15709
15764
|
async MJAIPromptRuns_VendorIDArray(@Root() mjaivendor_: MJAIVendor_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15710
15765
|
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
@@ -15715,6 +15770,16 @@ export class MJAIVendorResolver extends ResolverBase {
|
|
|
15715
15770
|
return result;
|
|
15716
15771
|
}
|
|
15717
15772
|
|
|
15773
|
+
@FieldResolver(() => [MJAIPromptModel_])
|
|
15774
|
+
async MJAIPromptModels_VendorIDArray(@Root() mjaivendor_: MJAIVendor_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15775
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
15776
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15777
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptModels')} WHERE ${provider.QuoteIdentifier('VendorID')}='${mjaivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
15778
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
15779
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows, this.GetUserFromPayload(userPayload));
|
|
15780
|
+
return result;
|
|
15781
|
+
}
|
|
15782
|
+
|
|
15718
15783
|
@FieldResolver(() => [MJAIVendorType_])
|
|
15719
15784
|
async MJAIVendorTypes_VendorIDArray(@Root() mjaivendor_: MJAIVendor_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15720
15785
|
this.CheckUserReadPermissions('MJ: AI Vendor Types', userPayload);
|
|
@@ -16001,12 +16066,12 @@ export class MJAPIApplication_ {
|
|
|
16001
16066
|
@Field()
|
|
16002
16067
|
_mj__UpdatedAt: Date;
|
|
16003
16068
|
|
|
16004
|
-
@Field(() => [MJAPIKeyUsageLog_])
|
|
16005
|
-
MJAPIKeyUsageLogs_ApplicationIDArray: MJAPIKeyUsageLog_[]; // Link to MJAPIKeyUsageLogs
|
|
16006
|
-
|
|
16007
16069
|
@Field(() => [MJAPIApplicationScope_])
|
|
16008
16070
|
MJAPIApplicationScopes_ApplicationIDArray: MJAPIApplicationScope_[]; // Link to MJAPIApplicationScopes
|
|
16009
16071
|
|
|
16072
|
+
@Field(() => [MJAPIKeyUsageLog_])
|
|
16073
|
+
MJAPIKeyUsageLogs_ApplicationIDArray: MJAPIKeyUsageLog_[]; // Link to MJAPIKeyUsageLogs
|
|
16074
|
+
|
|
16010
16075
|
@Field(() => [MJAPIKeyApplication_])
|
|
16011
16076
|
MJAPIKeyApplications_ApplicationIDArray: MJAPIKeyApplication_[]; // Link to MJAPIKeyApplications
|
|
16012
16077
|
|
|
@@ -16109,16 +16174,6 @@ export class MJAPIApplicationResolver extends ResolverBase {
|
|
|
16109
16174
|
return result;
|
|
16110
16175
|
}
|
|
16111
16176
|
|
|
16112
|
-
@FieldResolver(() => [MJAPIKeyUsageLog_])
|
|
16113
|
-
async MJAPIKeyUsageLogs_ApplicationIDArray(@Root() mjapiapplication_: MJAPIApplication_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16114
|
-
this.CheckUserReadPermissions('MJ: API Key Usage Logs', userPayload);
|
|
16115
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16116
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeyUsageLogs')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapiapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Key Usage Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
16117
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
16118
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Key Usage Logs', rows, this.GetUserFromPayload(userPayload));
|
|
16119
|
-
return result;
|
|
16120
|
-
}
|
|
16121
|
-
|
|
16122
16177
|
@FieldResolver(() => [MJAPIApplicationScope_])
|
|
16123
16178
|
async MJAPIApplicationScopes_ApplicationIDArray(@Root() mjapiapplication_: MJAPIApplication_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16124
16179
|
this.CheckUserReadPermissions('MJ: API Application Scopes', userPayload);
|
|
@@ -16129,6 +16184,16 @@ export class MJAPIApplicationResolver extends ResolverBase {
|
|
|
16129
16184
|
return result;
|
|
16130
16185
|
}
|
|
16131
16186
|
|
|
16187
|
+
@FieldResolver(() => [MJAPIKeyUsageLog_])
|
|
16188
|
+
async MJAPIKeyUsageLogs_ApplicationIDArray(@Root() mjapiapplication_: MJAPIApplication_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16189
|
+
this.CheckUserReadPermissions('MJ: API Key Usage Logs', userPayload);
|
|
16190
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16191
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeyUsageLogs')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapiapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Key Usage Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
16192
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
16193
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Key Usage Logs', rows, this.GetUserFromPayload(userPayload));
|
|
16194
|
+
return result;
|
|
16195
|
+
}
|
|
16196
|
+
|
|
16132
16197
|
@FieldResolver(() => [MJAPIKeyApplication_])
|
|
16133
16198
|
async MJAPIKeyApplications_ApplicationIDArray(@Root() mjapiapplication_: MJAPIApplication_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16134
16199
|
this.CheckUserReadPermissions('MJ: API Key Applications', userPayload);
|
|
@@ -16825,12 +16890,12 @@ export class MJAPIKey_ {
|
|
|
16825
16890
|
@MaxLength(100)
|
|
16826
16891
|
CreatedByUser: string;
|
|
16827
16892
|
|
|
16828
|
-
@Field(() => [MJAPIKeyUsageLog_])
|
|
16829
|
-
MJAPIKeyUsageLogs_APIKeyIDArray: MJAPIKeyUsageLog_[]; // Link to MJAPIKeyUsageLogs
|
|
16830
|
-
|
|
16831
16893
|
@Field(() => [MJAPIKeyScope_])
|
|
16832
16894
|
MJAPIKeyScopes_APIKeyIDArray: MJAPIKeyScope_[]; // Link to MJAPIKeyScopes
|
|
16833
16895
|
|
|
16896
|
+
@Field(() => [MJAPIKeyUsageLog_])
|
|
16897
|
+
MJAPIKeyUsageLogs_APIKeyIDArray: MJAPIKeyUsageLog_[]; // Link to MJAPIKeyUsageLogs
|
|
16898
|
+
|
|
16834
16899
|
@Field(() => [MJAPIKeyApplication_])
|
|
16835
16900
|
MJAPIKeyApplications_APIKeyIDArray: MJAPIKeyApplication_[]; // Link to MJAPIKeyApplications
|
|
16836
16901
|
|
|
@@ -16963,16 +17028,6 @@ export class MJAPIKeyResolver extends ResolverBase {
|
|
|
16963
17028
|
return result;
|
|
16964
17029
|
}
|
|
16965
17030
|
|
|
16966
|
-
@FieldResolver(() => [MJAPIKeyUsageLog_])
|
|
16967
|
-
async MJAPIKeyUsageLogs_APIKeyIDArray(@Root() mjapikey_: MJAPIKey_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16968
|
-
this.CheckUserReadPermissions('MJ: API Key Usage Logs', userPayload);
|
|
16969
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16970
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeyUsageLogs')} WHERE ${provider.QuoteIdentifier('APIKeyID')}='${mjapikey_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Key Usage Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
16971
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
16972
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Key Usage Logs', rows, this.GetUserFromPayload(userPayload));
|
|
16973
|
-
return result;
|
|
16974
|
-
}
|
|
16975
|
-
|
|
16976
17031
|
@FieldResolver(() => [MJAPIKeyScope_])
|
|
16977
17032
|
async MJAPIKeyScopes_APIKeyIDArray(@Root() mjapikey_: MJAPIKey_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16978
17033
|
this.CheckUserReadPermissions('MJ: API Key Scopes', userPayload);
|
|
@@ -16983,6 +17038,16 @@ export class MJAPIKeyResolver extends ResolverBase {
|
|
|
16983
17038
|
return result;
|
|
16984
17039
|
}
|
|
16985
17040
|
|
|
17041
|
+
@FieldResolver(() => [MJAPIKeyUsageLog_])
|
|
17042
|
+
async MJAPIKeyUsageLogs_APIKeyIDArray(@Root() mjapikey_: MJAPIKey_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17043
|
+
this.CheckUserReadPermissions('MJ: API Key Usage Logs', userPayload);
|
|
17044
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17045
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeyUsageLogs')} WHERE ${provider.QuoteIdentifier('APIKeyID')}='${mjapikey_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Key Usage Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
17046
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
17047
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Key Usage Logs', rows, this.GetUserFromPayload(userPayload));
|
|
17048
|
+
return result;
|
|
17049
|
+
}
|
|
17050
|
+
|
|
16986
17051
|
@FieldResolver(() => [MJAPIKeyApplication_])
|
|
16987
17052
|
async MJAPIKeyApplications_APIKeyIDArray(@Root() mjapikey_: MJAPIKey_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16988
17053
|
this.CheckUserReadPermissions('MJ: API Key Applications', userPayload);
|
|
@@ -17078,12 +17143,12 @@ export class MJAPIScope_ {
|
|
|
17078
17143
|
@Field(() => [MJAPIKeyScope_])
|
|
17079
17144
|
MJAPIKeyScopes_ScopeIDArray: MJAPIKeyScope_[]; // Link to MJAPIKeyScopes
|
|
17080
17145
|
|
|
17081
|
-
@Field(() => [MJAPIApplicationScope_])
|
|
17082
|
-
MJAPIApplicationScopes_ScopeIDArray: MJAPIApplicationScope_[]; // Link to MJAPIApplicationScopes
|
|
17083
|
-
|
|
17084
17146
|
@Field(() => [MJAPIScope_])
|
|
17085
17147
|
MJAPIScopes_ParentIDArray: MJAPIScope_[]; // Link to MJAPIScopes
|
|
17086
17148
|
|
|
17149
|
+
@Field(() => [MJAPIApplicationScope_])
|
|
17150
|
+
MJAPIApplicationScopes_ScopeIDArray: MJAPIApplicationScope_[]; // Link to MJAPIApplicationScopes
|
|
17151
|
+
|
|
17087
17152
|
}
|
|
17088
17153
|
|
|
17089
17154
|
//****************************************************************************
|
|
@@ -17223,16 +17288,6 @@ export class MJAPIScopeResolver extends ResolverBase {
|
|
|
17223
17288
|
return result;
|
|
17224
17289
|
}
|
|
17225
17290
|
|
|
17226
|
-
@FieldResolver(() => [MJAPIApplicationScope_])
|
|
17227
|
-
async MJAPIApplicationScopes_ScopeIDArray(@Root() mjapiscope_: MJAPIScope_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17228
|
-
this.CheckUserReadPermissions('MJ: API Application Scopes', userPayload);
|
|
17229
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17230
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIApplicationScopes')} WHERE ${provider.QuoteIdentifier('ScopeID')}='${mjapiscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Application Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
17231
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
17232
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Application Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
17233
|
-
return result;
|
|
17234
|
-
}
|
|
17235
|
-
|
|
17236
17291
|
@FieldResolver(() => [MJAPIScope_])
|
|
17237
17292
|
async MJAPIScopes_ParentIDArray(@Root() mjapiscope_: MJAPIScope_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17238
17293
|
this.CheckUserReadPermissions('MJ: API Scopes', userPayload);
|
|
@@ -17243,6 +17298,16 @@ export class MJAPIScopeResolver extends ResolverBase {
|
|
|
17243
17298
|
return result;
|
|
17244
17299
|
}
|
|
17245
17300
|
|
|
17301
|
+
@FieldResolver(() => [MJAPIApplicationScope_])
|
|
17302
|
+
async MJAPIApplicationScopes_ScopeIDArray(@Root() mjapiscope_: MJAPIScope_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17303
|
+
this.CheckUserReadPermissions('MJ: API Application Scopes', userPayload);
|
|
17304
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17305
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIApplicationScopes')} WHERE ${provider.QuoteIdentifier('ScopeID')}='${mjapiscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Application Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
17306
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
17307
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Application Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
17308
|
+
return result;
|
|
17309
|
+
}
|
|
17310
|
+
|
|
17246
17311
|
@Mutation(() => MJAPIScope_)
|
|
17247
17312
|
async CreateMJAPIScope(
|
|
17248
17313
|
@Arg('input', () => CreateMJAPIScopeInput) input: CreateMJAPIScopeInput,
|
|
@@ -22075,6 +22140,525 @@ export class MJCompanyResolver extends ResolverBase {
|
|
|
22075
22140
|
|
|
22076
22141
|
}
|
|
22077
22142
|
|
|
22143
|
+
//****************************************************************************
|
|
22144
|
+
// ENTITY CLASS for MJ: Company Integration Entity Maps
|
|
22145
|
+
//****************************************************************************
|
|
22146
|
+
@ObjectType({ description: `Maps an external object from a company integration to a MemberJunction entity, controlling sync direction, matching, and conflict resolution.` })
|
|
22147
|
+
export class MJCompanyIntegrationEntityMap_ {
|
|
22148
|
+
@Field()
|
|
22149
|
+
@MaxLength(36)
|
|
22150
|
+
ID: string;
|
|
22151
|
+
|
|
22152
|
+
@Field()
|
|
22153
|
+
@MaxLength(36)
|
|
22154
|
+
CompanyIntegrationID: string;
|
|
22155
|
+
|
|
22156
|
+
@Field({description: `The name of the object in the external system (e.g. table name, API resource name).`})
|
|
22157
|
+
@MaxLength(500)
|
|
22158
|
+
ExternalObjectName: string;
|
|
22159
|
+
|
|
22160
|
+
@Field({nullable: true, description: `Optional human-friendly label for the external object.`})
|
|
22161
|
+
@MaxLength(500)
|
|
22162
|
+
ExternalObjectLabel?: string;
|
|
22163
|
+
|
|
22164
|
+
@Field()
|
|
22165
|
+
@MaxLength(36)
|
|
22166
|
+
EntityID: string;
|
|
22167
|
+
|
|
22168
|
+
@Field({description: `Whether data flows from external to MJ (Pull), MJ to external (Push), or both.`})
|
|
22169
|
+
@MaxLength(50)
|
|
22170
|
+
SyncDirection: string;
|
|
22171
|
+
|
|
22172
|
+
@Field(() => Boolean, {description: `When true, this entity map is included in sync runs.`})
|
|
22173
|
+
SyncEnabled: boolean;
|
|
22174
|
+
|
|
22175
|
+
@Field({nullable: true, description: `JSON configuration for the match engine describing how to identify existing records (key fields, fuzzy thresholds, etc.).`})
|
|
22176
|
+
MatchStrategy?: string;
|
|
22177
|
+
|
|
22178
|
+
@Field({description: `How to handle conflicts when both source and destination have been modified. SourceWins, DestWins, MostRecent, or Manual.`})
|
|
22179
|
+
@MaxLength(50)
|
|
22180
|
+
ConflictResolution: string;
|
|
22181
|
+
|
|
22182
|
+
@Field(() => Int, {description: `Processing order when multiple entity maps exist. Lower numbers are processed first.`})
|
|
22183
|
+
Priority: number;
|
|
22184
|
+
|
|
22185
|
+
@Field({description: `How to handle records that no longer exist in the source. SoftDelete, DoNothing, or HardDelete.`})
|
|
22186
|
+
@MaxLength(50)
|
|
22187
|
+
DeleteBehavior: string;
|
|
22188
|
+
|
|
22189
|
+
@Field({description: `Whether this entity map is Active or Inactive.`})
|
|
22190
|
+
@MaxLength(50)
|
|
22191
|
+
Status: string;
|
|
22192
|
+
|
|
22193
|
+
@Field({nullable: true, description: `Optional JSON configuration specific to this entity mapping.`})
|
|
22194
|
+
Configuration?: string;
|
|
22195
|
+
|
|
22196
|
+
@Field()
|
|
22197
|
+
_mj__CreatedAt: Date;
|
|
22198
|
+
|
|
22199
|
+
@Field()
|
|
22200
|
+
_mj__UpdatedAt: Date;
|
|
22201
|
+
|
|
22202
|
+
@Field()
|
|
22203
|
+
@MaxLength(255)
|
|
22204
|
+
CompanyIntegration: string;
|
|
22205
|
+
|
|
22206
|
+
@Field()
|
|
22207
|
+
@MaxLength(255)
|
|
22208
|
+
Entity: string;
|
|
22209
|
+
|
|
22210
|
+
@Field(() => [MJCompanyIntegrationSyncWatermark_])
|
|
22211
|
+
MJCompanyIntegrationSyncWatermarks_EntityMapIDArray: MJCompanyIntegrationSyncWatermark_[]; // Link to MJCompanyIntegrationSyncWatermarks
|
|
22212
|
+
|
|
22213
|
+
@Field(() => [MJCompanyIntegrationFieldMap_])
|
|
22214
|
+
MJCompanyIntegrationFieldMaps_EntityMapIDArray: MJCompanyIntegrationFieldMap_[]; // Link to MJCompanyIntegrationFieldMaps
|
|
22215
|
+
|
|
22216
|
+
}
|
|
22217
|
+
|
|
22218
|
+
//****************************************************************************
|
|
22219
|
+
// INPUT TYPE for MJ: Company Integration Entity Maps
|
|
22220
|
+
//****************************************************************************
|
|
22221
|
+
@InputType()
|
|
22222
|
+
export class CreateMJCompanyIntegrationEntityMapInput {
|
|
22223
|
+
@Field({ nullable: true })
|
|
22224
|
+
ID?: string;
|
|
22225
|
+
|
|
22226
|
+
@Field({ nullable: true })
|
|
22227
|
+
CompanyIntegrationID?: string;
|
|
22228
|
+
|
|
22229
|
+
@Field({ nullable: true })
|
|
22230
|
+
ExternalObjectName?: string;
|
|
22231
|
+
|
|
22232
|
+
@Field({ nullable: true })
|
|
22233
|
+
ExternalObjectLabel: string | null;
|
|
22234
|
+
|
|
22235
|
+
@Field({ nullable: true })
|
|
22236
|
+
EntityID?: string;
|
|
22237
|
+
|
|
22238
|
+
@Field({ nullable: true })
|
|
22239
|
+
SyncDirection?: string;
|
|
22240
|
+
|
|
22241
|
+
@Field(() => Boolean, { nullable: true })
|
|
22242
|
+
SyncEnabled?: boolean;
|
|
22243
|
+
|
|
22244
|
+
@Field({ nullable: true })
|
|
22245
|
+
MatchStrategy: string | null;
|
|
22246
|
+
|
|
22247
|
+
@Field({ nullable: true })
|
|
22248
|
+
ConflictResolution?: string;
|
|
22249
|
+
|
|
22250
|
+
@Field(() => Int, { nullable: true })
|
|
22251
|
+
Priority?: number;
|
|
22252
|
+
|
|
22253
|
+
@Field({ nullable: true })
|
|
22254
|
+
DeleteBehavior?: string;
|
|
22255
|
+
|
|
22256
|
+
@Field({ nullable: true })
|
|
22257
|
+
Status?: string;
|
|
22258
|
+
|
|
22259
|
+
@Field({ nullable: true })
|
|
22260
|
+
Configuration: string | null;
|
|
22261
|
+
}
|
|
22262
|
+
|
|
22263
|
+
|
|
22264
|
+
//****************************************************************************
|
|
22265
|
+
// INPUT TYPE for MJ: Company Integration Entity Maps
|
|
22266
|
+
//****************************************************************************
|
|
22267
|
+
@InputType()
|
|
22268
|
+
export class UpdateMJCompanyIntegrationEntityMapInput {
|
|
22269
|
+
@Field()
|
|
22270
|
+
ID: string;
|
|
22271
|
+
|
|
22272
|
+
@Field({ nullable: true })
|
|
22273
|
+
CompanyIntegrationID?: string;
|
|
22274
|
+
|
|
22275
|
+
@Field({ nullable: true })
|
|
22276
|
+
ExternalObjectName?: string;
|
|
22277
|
+
|
|
22278
|
+
@Field({ nullable: true })
|
|
22279
|
+
ExternalObjectLabel?: string | null;
|
|
22280
|
+
|
|
22281
|
+
@Field({ nullable: true })
|
|
22282
|
+
EntityID?: string;
|
|
22283
|
+
|
|
22284
|
+
@Field({ nullable: true })
|
|
22285
|
+
SyncDirection?: string;
|
|
22286
|
+
|
|
22287
|
+
@Field(() => Boolean, { nullable: true })
|
|
22288
|
+
SyncEnabled?: boolean;
|
|
22289
|
+
|
|
22290
|
+
@Field({ nullable: true })
|
|
22291
|
+
MatchStrategy?: string | null;
|
|
22292
|
+
|
|
22293
|
+
@Field({ nullable: true })
|
|
22294
|
+
ConflictResolution?: string;
|
|
22295
|
+
|
|
22296
|
+
@Field(() => Int, { nullable: true })
|
|
22297
|
+
Priority?: number;
|
|
22298
|
+
|
|
22299
|
+
@Field({ nullable: true })
|
|
22300
|
+
DeleteBehavior?: string;
|
|
22301
|
+
|
|
22302
|
+
@Field({ nullable: true })
|
|
22303
|
+
Status?: string;
|
|
22304
|
+
|
|
22305
|
+
@Field({ nullable: true })
|
|
22306
|
+
Configuration?: string | null;
|
|
22307
|
+
|
|
22308
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
22309
|
+
OldValues___?: KeyValuePairInput[];
|
|
22310
|
+
}
|
|
22311
|
+
|
|
22312
|
+
//****************************************************************************
|
|
22313
|
+
// RESOLVER for MJ: Company Integration Entity Maps
|
|
22314
|
+
//****************************************************************************
|
|
22315
|
+
@ObjectType()
|
|
22316
|
+
export class RunMJCompanyIntegrationEntityMapViewResult {
|
|
22317
|
+
@Field(() => [MJCompanyIntegrationEntityMap_])
|
|
22318
|
+
Results: MJCompanyIntegrationEntityMap_[];
|
|
22319
|
+
|
|
22320
|
+
@Field(() => String, {nullable: true})
|
|
22321
|
+
UserViewRunID?: string;
|
|
22322
|
+
|
|
22323
|
+
@Field(() => Int, {nullable: true})
|
|
22324
|
+
RowCount: number;
|
|
22325
|
+
|
|
22326
|
+
@Field(() => Int, {nullable: true})
|
|
22327
|
+
TotalRowCount: number;
|
|
22328
|
+
|
|
22329
|
+
@Field(() => Int, {nullable: true})
|
|
22330
|
+
ExecutionTime: number;
|
|
22331
|
+
|
|
22332
|
+
@Field({nullable: true})
|
|
22333
|
+
ErrorMessage?: string;
|
|
22334
|
+
|
|
22335
|
+
@Field(() => Boolean, {nullable: false})
|
|
22336
|
+
Success: boolean;
|
|
22337
|
+
}
|
|
22338
|
+
|
|
22339
|
+
@Resolver(MJCompanyIntegrationEntityMap_)
|
|
22340
|
+
export class MJCompanyIntegrationEntityMapResolver extends ResolverBase {
|
|
22341
|
+
@Query(() => RunMJCompanyIntegrationEntityMapViewResult)
|
|
22342
|
+
async RunMJCompanyIntegrationEntityMapViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22343
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22344
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
22345
|
+
}
|
|
22346
|
+
|
|
22347
|
+
@Query(() => RunMJCompanyIntegrationEntityMapViewResult)
|
|
22348
|
+
async RunMJCompanyIntegrationEntityMapViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22349
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22350
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
22351
|
+
}
|
|
22352
|
+
|
|
22353
|
+
@Query(() => RunMJCompanyIntegrationEntityMapViewResult)
|
|
22354
|
+
async RunMJCompanyIntegrationEntityMapDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22355
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22356
|
+
input.EntityName = 'MJ: Company Integration Entity Maps';
|
|
22357
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
22358
|
+
}
|
|
22359
|
+
@Query(() => MJCompanyIntegrationEntityMap_, { nullable: true })
|
|
22360
|
+
async MJCompanyIntegrationEntityMap(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJCompanyIntegrationEntityMap_ | null> {
|
|
22361
|
+
this.CheckUserReadPermissions('MJ: Company Integration Entity Maps', userPayload);
|
|
22362
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22363
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrationEntityMaps')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integration Entity Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
22364
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
22365
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Company Integration Entity Maps', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
22366
|
+
return result;
|
|
22367
|
+
}
|
|
22368
|
+
|
|
22369
|
+
@FieldResolver(() => [MJCompanyIntegrationSyncWatermark_])
|
|
22370
|
+
async MJCompanyIntegrationSyncWatermarks_EntityMapIDArray(@Root() mjcompanyintegrationentitymap_: MJCompanyIntegrationEntityMap_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22371
|
+
this.CheckUserReadPermissions('MJ: Company Integration Sync Watermarks', userPayload);
|
|
22372
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22373
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrationSyncWatermarks')} WHERE ${provider.QuoteIdentifier('EntityMapID')}='${mjcompanyintegrationentitymap_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integration Sync Watermarks', userPayload, EntityPermissionType.Read, 'AND');
|
|
22374
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
22375
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integration Sync Watermarks', rows, this.GetUserFromPayload(userPayload));
|
|
22376
|
+
return result;
|
|
22377
|
+
}
|
|
22378
|
+
|
|
22379
|
+
@FieldResolver(() => [MJCompanyIntegrationFieldMap_])
|
|
22380
|
+
async MJCompanyIntegrationFieldMaps_EntityMapIDArray(@Root() mjcompanyintegrationentitymap_: MJCompanyIntegrationEntityMap_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22381
|
+
this.CheckUserReadPermissions('MJ: Company Integration Field Maps', userPayload);
|
|
22382
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22383
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrationFieldMaps')} WHERE ${provider.QuoteIdentifier('EntityMapID')}='${mjcompanyintegrationentitymap_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integration Field Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
22384
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
22385
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integration Field Maps', rows, this.GetUserFromPayload(userPayload));
|
|
22386
|
+
return result;
|
|
22387
|
+
}
|
|
22388
|
+
|
|
22389
|
+
@Mutation(() => MJCompanyIntegrationEntityMap_)
|
|
22390
|
+
async CreateMJCompanyIntegrationEntityMap(
|
|
22391
|
+
@Arg('input', () => CreateMJCompanyIntegrationEntityMapInput) input: CreateMJCompanyIntegrationEntityMapInput,
|
|
22392
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
22393
|
+
@PubSub() pubSub: PubSubEngine
|
|
22394
|
+
) {
|
|
22395
|
+
const provider = GetReadWriteProvider(providers);
|
|
22396
|
+
return this.CreateRecord('MJ: Company Integration Entity Maps', input, provider, userPayload, pubSub)
|
|
22397
|
+
}
|
|
22398
|
+
|
|
22399
|
+
@Mutation(() => MJCompanyIntegrationEntityMap_)
|
|
22400
|
+
async UpdateMJCompanyIntegrationEntityMap(
|
|
22401
|
+
@Arg('input', () => UpdateMJCompanyIntegrationEntityMapInput) input: UpdateMJCompanyIntegrationEntityMapInput,
|
|
22402
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
22403
|
+
@PubSub() pubSub: PubSubEngine
|
|
22404
|
+
) {
|
|
22405
|
+
const provider = GetReadWriteProvider(providers);
|
|
22406
|
+
return this.UpdateRecord('MJ: Company Integration Entity Maps', input, provider, userPayload, pubSub);
|
|
22407
|
+
}
|
|
22408
|
+
|
|
22409
|
+
@Mutation(() => MJCompanyIntegrationEntityMap_)
|
|
22410
|
+
async DeleteMJCompanyIntegrationEntityMap(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22411
|
+
const provider = GetReadWriteProvider(providers);
|
|
22412
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
22413
|
+
return this.DeleteRecord('MJ: Company Integration Entity Maps', key, options, provider, userPayload, pubSub);
|
|
22414
|
+
}
|
|
22415
|
+
|
|
22416
|
+
}
|
|
22417
|
+
|
|
22418
|
+
//****************************************************************************
|
|
22419
|
+
// ENTITY CLASS for MJ: Company Integration Field Maps
|
|
22420
|
+
//****************************************************************************
|
|
22421
|
+
@ObjectType({ description: `Maps individual fields between an external source object and a MemberJunction entity, with optional transform pipeline.` })
|
|
22422
|
+
export class MJCompanyIntegrationFieldMap_ {
|
|
22423
|
+
@Field()
|
|
22424
|
+
@MaxLength(36)
|
|
22425
|
+
ID: string;
|
|
22426
|
+
|
|
22427
|
+
@Field()
|
|
22428
|
+
@MaxLength(36)
|
|
22429
|
+
EntityMapID: string;
|
|
22430
|
+
|
|
22431
|
+
@Field({description: `The field/column name in the external source system.`})
|
|
22432
|
+
@MaxLength(500)
|
|
22433
|
+
SourceFieldName: string;
|
|
22434
|
+
|
|
22435
|
+
@Field({nullable: true, description: `Optional human-friendly label for the source field.`})
|
|
22436
|
+
@MaxLength(500)
|
|
22437
|
+
SourceFieldLabel?: string;
|
|
22438
|
+
|
|
22439
|
+
@Field({description: `The MJ entity field name this source field maps to.`})
|
|
22440
|
+
@MaxLength(500)
|
|
22441
|
+
DestinationFieldName: string;
|
|
22442
|
+
|
|
22443
|
+
@Field({nullable: true, description: `Optional human-friendly label for the destination field.`})
|
|
22444
|
+
@MaxLength(500)
|
|
22445
|
+
DestinationFieldLabel?: string;
|
|
22446
|
+
|
|
22447
|
+
@Field({description: `Direction of field mapping: SourceToDest, DestToSource, or Both.`})
|
|
22448
|
+
@MaxLength(50)
|
|
22449
|
+
Direction: string;
|
|
22450
|
+
|
|
22451
|
+
@Field({nullable: true, description: `JSON array of transform names to apply in order (e.g. ["trim", "uppercase"]). See FieldMappingEngine for available transforms.`})
|
|
22452
|
+
TransformPipeline?: string;
|
|
22453
|
+
|
|
22454
|
+
@Field(() => Boolean, {description: `When true, this field is used by the MatchEngine to find existing records during sync.`})
|
|
22455
|
+
IsKeyField: boolean;
|
|
22456
|
+
|
|
22457
|
+
@Field(() => Boolean, {description: `When true, a sync record is rejected if this field has no value.`})
|
|
22458
|
+
IsRequired: boolean;
|
|
22459
|
+
|
|
22460
|
+
@Field({nullable: true, description: `Default value to use when the source field is null or missing.`})
|
|
22461
|
+
DefaultValue?: string;
|
|
22462
|
+
|
|
22463
|
+
@Field(() => Int, {description: `Processing order for this field mapping within the entity map.`})
|
|
22464
|
+
Priority: number;
|
|
22465
|
+
|
|
22466
|
+
@Field({description: `Whether this field mapping is Active or Inactive.`})
|
|
22467
|
+
@MaxLength(50)
|
|
22468
|
+
Status: string;
|
|
22469
|
+
|
|
22470
|
+
@Field()
|
|
22471
|
+
_mj__CreatedAt: Date;
|
|
22472
|
+
|
|
22473
|
+
@Field()
|
|
22474
|
+
_mj__UpdatedAt: Date;
|
|
22475
|
+
|
|
22476
|
+
@Field()
|
|
22477
|
+
@MaxLength(500)
|
|
22478
|
+
EntityMap: string;
|
|
22479
|
+
|
|
22480
|
+
}
|
|
22481
|
+
|
|
22482
|
+
//****************************************************************************
|
|
22483
|
+
// INPUT TYPE for MJ: Company Integration Field Maps
|
|
22484
|
+
//****************************************************************************
|
|
22485
|
+
@InputType()
|
|
22486
|
+
export class CreateMJCompanyIntegrationFieldMapInput {
|
|
22487
|
+
@Field({ nullable: true })
|
|
22488
|
+
ID?: string;
|
|
22489
|
+
|
|
22490
|
+
@Field({ nullable: true })
|
|
22491
|
+
EntityMapID?: string;
|
|
22492
|
+
|
|
22493
|
+
@Field({ nullable: true })
|
|
22494
|
+
SourceFieldName?: string;
|
|
22495
|
+
|
|
22496
|
+
@Field({ nullable: true })
|
|
22497
|
+
SourceFieldLabel: string | null;
|
|
22498
|
+
|
|
22499
|
+
@Field({ nullable: true })
|
|
22500
|
+
DestinationFieldName?: string;
|
|
22501
|
+
|
|
22502
|
+
@Field({ nullable: true })
|
|
22503
|
+
DestinationFieldLabel: string | null;
|
|
22504
|
+
|
|
22505
|
+
@Field({ nullable: true })
|
|
22506
|
+
Direction?: string;
|
|
22507
|
+
|
|
22508
|
+
@Field({ nullable: true })
|
|
22509
|
+
TransformPipeline: string | null;
|
|
22510
|
+
|
|
22511
|
+
@Field(() => Boolean, { nullable: true })
|
|
22512
|
+
IsKeyField?: boolean;
|
|
22513
|
+
|
|
22514
|
+
@Field(() => Boolean, { nullable: true })
|
|
22515
|
+
IsRequired?: boolean;
|
|
22516
|
+
|
|
22517
|
+
@Field({ nullable: true })
|
|
22518
|
+
DefaultValue: string | null;
|
|
22519
|
+
|
|
22520
|
+
@Field(() => Int, { nullable: true })
|
|
22521
|
+
Priority?: number;
|
|
22522
|
+
|
|
22523
|
+
@Field({ nullable: true })
|
|
22524
|
+
Status?: string;
|
|
22525
|
+
}
|
|
22526
|
+
|
|
22527
|
+
|
|
22528
|
+
//****************************************************************************
|
|
22529
|
+
// INPUT TYPE for MJ: Company Integration Field Maps
|
|
22530
|
+
//****************************************************************************
|
|
22531
|
+
@InputType()
|
|
22532
|
+
export class UpdateMJCompanyIntegrationFieldMapInput {
|
|
22533
|
+
@Field()
|
|
22534
|
+
ID: string;
|
|
22535
|
+
|
|
22536
|
+
@Field({ nullable: true })
|
|
22537
|
+
EntityMapID?: string;
|
|
22538
|
+
|
|
22539
|
+
@Field({ nullable: true })
|
|
22540
|
+
SourceFieldName?: string;
|
|
22541
|
+
|
|
22542
|
+
@Field({ nullable: true })
|
|
22543
|
+
SourceFieldLabel?: string | null;
|
|
22544
|
+
|
|
22545
|
+
@Field({ nullable: true })
|
|
22546
|
+
DestinationFieldName?: string;
|
|
22547
|
+
|
|
22548
|
+
@Field({ nullable: true })
|
|
22549
|
+
DestinationFieldLabel?: string | null;
|
|
22550
|
+
|
|
22551
|
+
@Field({ nullable: true })
|
|
22552
|
+
Direction?: string;
|
|
22553
|
+
|
|
22554
|
+
@Field({ nullable: true })
|
|
22555
|
+
TransformPipeline?: string | null;
|
|
22556
|
+
|
|
22557
|
+
@Field(() => Boolean, { nullable: true })
|
|
22558
|
+
IsKeyField?: boolean;
|
|
22559
|
+
|
|
22560
|
+
@Field(() => Boolean, { nullable: true })
|
|
22561
|
+
IsRequired?: boolean;
|
|
22562
|
+
|
|
22563
|
+
@Field({ nullable: true })
|
|
22564
|
+
DefaultValue?: string | null;
|
|
22565
|
+
|
|
22566
|
+
@Field(() => Int, { nullable: true })
|
|
22567
|
+
Priority?: number;
|
|
22568
|
+
|
|
22569
|
+
@Field({ nullable: true })
|
|
22570
|
+
Status?: string;
|
|
22571
|
+
|
|
22572
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
22573
|
+
OldValues___?: KeyValuePairInput[];
|
|
22574
|
+
}
|
|
22575
|
+
|
|
22576
|
+
//****************************************************************************
|
|
22577
|
+
// RESOLVER for MJ: Company Integration Field Maps
|
|
22578
|
+
//****************************************************************************
|
|
22579
|
+
@ObjectType()
|
|
22580
|
+
export class RunMJCompanyIntegrationFieldMapViewResult {
|
|
22581
|
+
@Field(() => [MJCompanyIntegrationFieldMap_])
|
|
22582
|
+
Results: MJCompanyIntegrationFieldMap_[];
|
|
22583
|
+
|
|
22584
|
+
@Field(() => String, {nullable: true})
|
|
22585
|
+
UserViewRunID?: string;
|
|
22586
|
+
|
|
22587
|
+
@Field(() => Int, {nullable: true})
|
|
22588
|
+
RowCount: number;
|
|
22589
|
+
|
|
22590
|
+
@Field(() => Int, {nullable: true})
|
|
22591
|
+
TotalRowCount: number;
|
|
22592
|
+
|
|
22593
|
+
@Field(() => Int, {nullable: true})
|
|
22594
|
+
ExecutionTime: number;
|
|
22595
|
+
|
|
22596
|
+
@Field({nullable: true})
|
|
22597
|
+
ErrorMessage?: string;
|
|
22598
|
+
|
|
22599
|
+
@Field(() => Boolean, {nullable: false})
|
|
22600
|
+
Success: boolean;
|
|
22601
|
+
}
|
|
22602
|
+
|
|
22603
|
+
@Resolver(MJCompanyIntegrationFieldMap_)
|
|
22604
|
+
export class MJCompanyIntegrationFieldMapResolver extends ResolverBase {
|
|
22605
|
+
@Query(() => RunMJCompanyIntegrationFieldMapViewResult)
|
|
22606
|
+
async RunMJCompanyIntegrationFieldMapViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22607
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22608
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
22609
|
+
}
|
|
22610
|
+
|
|
22611
|
+
@Query(() => RunMJCompanyIntegrationFieldMapViewResult)
|
|
22612
|
+
async RunMJCompanyIntegrationFieldMapViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22613
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22614
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
22615
|
+
}
|
|
22616
|
+
|
|
22617
|
+
@Query(() => RunMJCompanyIntegrationFieldMapViewResult)
|
|
22618
|
+
async RunMJCompanyIntegrationFieldMapDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22619
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22620
|
+
input.EntityName = 'MJ: Company Integration Field Maps';
|
|
22621
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
22622
|
+
}
|
|
22623
|
+
@Query(() => MJCompanyIntegrationFieldMap_, { nullable: true })
|
|
22624
|
+
async MJCompanyIntegrationFieldMap(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJCompanyIntegrationFieldMap_ | null> {
|
|
22625
|
+
this.CheckUserReadPermissions('MJ: Company Integration Field Maps', userPayload);
|
|
22626
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22627
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrationFieldMaps')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integration Field Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
22628
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
22629
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Company Integration Field Maps', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
22630
|
+
return result;
|
|
22631
|
+
}
|
|
22632
|
+
|
|
22633
|
+
@Mutation(() => MJCompanyIntegrationFieldMap_)
|
|
22634
|
+
async CreateMJCompanyIntegrationFieldMap(
|
|
22635
|
+
@Arg('input', () => CreateMJCompanyIntegrationFieldMapInput) input: CreateMJCompanyIntegrationFieldMapInput,
|
|
22636
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
22637
|
+
@PubSub() pubSub: PubSubEngine
|
|
22638
|
+
) {
|
|
22639
|
+
const provider = GetReadWriteProvider(providers);
|
|
22640
|
+
return this.CreateRecord('MJ: Company Integration Field Maps', input, provider, userPayload, pubSub)
|
|
22641
|
+
}
|
|
22642
|
+
|
|
22643
|
+
@Mutation(() => MJCompanyIntegrationFieldMap_)
|
|
22644
|
+
async UpdateMJCompanyIntegrationFieldMap(
|
|
22645
|
+
@Arg('input', () => UpdateMJCompanyIntegrationFieldMapInput) input: UpdateMJCompanyIntegrationFieldMapInput,
|
|
22646
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
22647
|
+
@PubSub() pubSub: PubSubEngine
|
|
22648
|
+
) {
|
|
22649
|
+
const provider = GetReadWriteProvider(providers);
|
|
22650
|
+
return this.UpdateRecord('MJ: Company Integration Field Maps', input, provider, userPayload, pubSub);
|
|
22651
|
+
}
|
|
22652
|
+
|
|
22653
|
+
@Mutation(() => MJCompanyIntegrationFieldMap_)
|
|
22654
|
+
async DeleteMJCompanyIntegrationFieldMap(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22655
|
+
const provider = GetReadWriteProvider(providers);
|
|
22656
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
22657
|
+
return this.DeleteRecord('MJ: Company Integration Field Maps', key, options, provider, userPayload, pubSub);
|
|
22658
|
+
}
|
|
22659
|
+
|
|
22660
|
+
}
|
|
22661
|
+
|
|
22078
22662
|
//****************************************************************************
|
|
22079
22663
|
// ENTITY CLASS for MJ: Company Integration Record Maps
|
|
22080
22664
|
//****************************************************************************
|
|
@@ -22899,6 +23483,192 @@ export class MJCompanyIntegrationRunResolver extends ResolverBase {
|
|
|
22899
23483
|
|
|
22900
23484
|
}
|
|
22901
23485
|
|
|
23486
|
+
//****************************************************************************
|
|
23487
|
+
// ENTITY CLASS for MJ: Company Integration Sync Watermarks
|
|
23488
|
+
//****************************************************************************
|
|
23489
|
+
@ObjectType({ description: `Tracks incremental sync progress per entity map and direction using watermarks (timestamp, cursor, change token, or version).` })
|
|
23490
|
+
export class MJCompanyIntegrationSyncWatermark_ {
|
|
23491
|
+
@Field()
|
|
23492
|
+
@MaxLength(36)
|
|
23493
|
+
ID: string;
|
|
23494
|
+
|
|
23495
|
+
@Field()
|
|
23496
|
+
@MaxLength(36)
|
|
23497
|
+
EntityMapID: string;
|
|
23498
|
+
|
|
23499
|
+
@Field({description: `Sync direction this watermark tracks: Pull or Push.`})
|
|
23500
|
+
@MaxLength(50)
|
|
23501
|
+
Direction: string;
|
|
23502
|
+
|
|
23503
|
+
@Field({description: `The type of watermark: Timestamp, Cursor, ChangeToken, or Version.`})
|
|
23504
|
+
@MaxLength(50)
|
|
23505
|
+
WatermarkType: string;
|
|
23506
|
+
|
|
23507
|
+
@Field({nullable: true, description: `The serialized watermark value used to resume incremental sync.`})
|
|
23508
|
+
WatermarkValue?: string;
|
|
23509
|
+
|
|
23510
|
+
@Field({nullable: true, description: `Timestamp of the last successful sync for this watermark.`})
|
|
23511
|
+
LastSyncAt?: Date;
|
|
23512
|
+
|
|
23513
|
+
@Field(() => Int, {description: `Cumulative count of records synced through this watermark.`})
|
|
23514
|
+
RecordsSynced: number;
|
|
23515
|
+
|
|
23516
|
+
@Field()
|
|
23517
|
+
_mj__CreatedAt: Date;
|
|
23518
|
+
|
|
23519
|
+
@Field()
|
|
23520
|
+
_mj__UpdatedAt: Date;
|
|
23521
|
+
|
|
23522
|
+
@Field()
|
|
23523
|
+
@MaxLength(500)
|
|
23524
|
+
EntityMap: string;
|
|
23525
|
+
|
|
23526
|
+
}
|
|
23527
|
+
|
|
23528
|
+
//****************************************************************************
|
|
23529
|
+
// INPUT TYPE for MJ: Company Integration Sync Watermarks
|
|
23530
|
+
//****************************************************************************
|
|
23531
|
+
@InputType()
|
|
23532
|
+
export class CreateMJCompanyIntegrationSyncWatermarkInput {
|
|
23533
|
+
@Field({ nullable: true })
|
|
23534
|
+
ID?: string;
|
|
23535
|
+
|
|
23536
|
+
@Field({ nullable: true })
|
|
23537
|
+
EntityMapID?: string;
|
|
23538
|
+
|
|
23539
|
+
@Field({ nullable: true })
|
|
23540
|
+
Direction?: string;
|
|
23541
|
+
|
|
23542
|
+
@Field({ nullable: true })
|
|
23543
|
+
WatermarkType?: string;
|
|
23544
|
+
|
|
23545
|
+
@Field({ nullable: true })
|
|
23546
|
+
WatermarkValue: string | null;
|
|
23547
|
+
|
|
23548
|
+
@Field({ nullable: true })
|
|
23549
|
+
LastSyncAt: Date | null;
|
|
23550
|
+
|
|
23551
|
+
@Field(() => Int, { nullable: true })
|
|
23552
|
+
RecordsSynced?: number;
|
|
23553
|
+
}
|
|
23554
|
+
|
|
23555
|
+
|
|
23556
|
+
//****************************************************************************
|
|
23557
|
+
// INPUT TYPE for MJ: Company Integration Sync Watermarks
|
|
23558
|
+
//****************************************************************************
|
|
23559
|
+
@InputType()
|
|
23560
|
+
export class UpdateMJCompanyIntegrationSyncWatermarkInput {
|
|
23561
|
+
@Field()
|
|
23562
|
+
ID: string;
|
|
23563
|
+
|
|
23564
|
+
@Field({ nullable: true })
|
|
23565
|
+
EntityMapID?: string;
|
|
23566
|
+
|
|
23567
|
+
@Field({ nullable: true })
|
|
23568
|
+
Direction?: string;
|
|
23569
|
+
|
|
23570
|
+
@Field({ nullable: true })
|
|
23571
|
+
WatermarkType?: string;
|
|
23572
|
+
|
|
23573
|
+
@Field({ nullable: true })
|
|
23574
|
+
WatermarkValue?: string | null;
|
|
23575
|
+
|
|
23576
|
+
@Field({ nullable: true })
|
|
23577
|
+
LastSyncAt?: Date | null;
|
|
23578
|
+
|
|
23579
|
+
@Field(() => Int, { nullable: true })
|
|
23580
|
+
RecordsSynced?: number;
|
|
23581
|
+
|
|
23582
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
23583
|
+
OldValues___?: KeyValuePairInput[];
|
|
23584
|
+
}
|
|
23585
|
+
|
|
23586
|
+
//****************************************************************************
|
|
23587
|
+
// RESOLVER for MJ: Company Integration Sync Watermarks
|
|
23588
|
+
//****************************************************************************
|
|
23589
|
+
@ObjectType()
|
|
23590
|
+
export class RunMJCompanyIntegrationSyncWatermarkViewResult {
|
|
23591
|
+
@Field(() => [MJCompanyIntegrationSyncWatermark_])
|
|
23592
|
+
Results: MJCompanyIntegrationSyncWatermark_[];
|
|
23593
|
+
|
|
23594
|
+
@Field(() => String, {nullable: true})
|
|
23595
|
+
UserViewRunID?: string;
|
|
23596
|
+
|
|
23597
|
+
@Field(() => Int, {nullable: true})
|
|
23598
|
+
RowCount: number;
|
|
23599
|
+
|
|
23600
|
+
@Field(() => Int, {nullable: true})
|
|
23601
|
+
TotalRowCount: number;
|
|
23602
|
+
|
|
23603
|
+
@Field(() => Int, {nullable: true})
|
|
23604
|
+
ExecutionTime: number;
|
|
23605
|
+
|
|
23606
|
+
@Field({nullable: true})
|
|
23607
|
+
ErrorMessage?: string;
|
|
23608
|
+
|
|
23609
|
+
@Field(() => Boolean, {nullable: false})
|
|
23610
|
+
Success: boolean;
|
|
23611
|
+
}
|
|
23612
|
+
|
|
23613
|
+
@Resolver(MJCompanyIntegrationSyncWatermark_)
|
|
23614
|
+
export class MJCompanyIntegrationSyncWatermarkResolver extends ResolverBase {
|
|
23615
|
+
@Query(() => RunMJCompanyIntegrationSyncWatermarkViewResult)
|
|
23616
|
+
async RunMJCompanyIntegrationSyncWatermarkViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23617
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23618
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
23619
|
+
}
|
|
23620
|
+
|
|
23621
|
+
@Query(() => RunMJCompanyIntegrationSyncWatermarkViewResult)
|
|
23622
|
+
async RunMJCompanyIntegrationSyncWatermarkViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23623
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23624
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
23625
|
+
}
|
|
23626
|
+
|
|
23627
|
+
@Query(() => RunMJCompanyIntegrationSyncWatermarkViewResult)
|
|
23628
|
+
async RunMJCompanyIntegrationSyncWatermarkDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23629
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23630
|
+
input.EntityName = 'MJ: Company Integration Sync Watermarks';
|
|
23631
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
23632
|
+
}
|
|
23633
|
+
@Query(() => MJCompanyIntegrationSyncWatermark_, { nullable: true })
|
|
23634
|
+
async MJCompanyIntegrationSyncWatermark(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJCompanyIntegrationSyncWatermark_ | null> {
|
|
23635
|
+
this.CheckUserReadPermissions('MJ: Company Integration Sync Watermarks', userPayload);
|
|
23636
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23637
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrationSyncWatermarks')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integration Sync Watermarks', userPayload, EntityPermissionType.Read, 'AND');
|
|
23638
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
23639
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Company Integration Sync Watermarks', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
23640
|
+
return result;
|
|
23641
|
+
}
|
|
23642
|
+
|
|
23643
|
+
@Mutation(() => MJCompanyIntegrationSyncWatermark_)
|
|
23644
|
+
async CreateMJCompanyIntegrationSyncWatermark(
|
|
23645
|
+
@Arg('input', () => CreateMJCompanyIntegrationSyncWatermarkInput) input: CreateMJCompanyIntegrationSyncWatermarkInput,
|
|
23646
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
23647
|
+
@PubSub() pubSub: PubSubEngine
|
|
23648
|
+
) {
|
|
23649
|
+
const provider = GetReadWriteProvider(providers);
|
|
23650
|
+
return this.CreateRecord('MJ: Company Integration Sync Watermarks', input, provider, userPayload, pubSub)
|
|
23651
|
+
}
|
|
23652
|
+
|
|
23653
|
+
@Mutation(() => MJCompanyIntegrationSyncWatermark_)
|
|
23654
|
+
async UpdateMJCompanyIntegrationSyncWatermark(
|
|
23655
|
+
@Arg('input', () => UpdateMJCompanyIntegrationSyncWatermarkInput) input: UpdateMJCompanyIntegrationSyncWatermarkInput,
|
|
23656
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
23657
|
+
@PubSub() pubSub: PubSubEngine
|
|
23658
|
+
) {
|
|
23659
|
+
const provider = GetReadWriteProvider(providers);
|
|
23660
|
+
return this.UpdateRecord('MJ: Company Integration Sync Watermarks', input, provider, userPayload, pubSub);
|
|
23661
|
+
}
|
|
23662
|
+
|
|
23663
|
+
@Mutation(() => MJCompanyIntegrationSyncWatermark_)
|
|
23664
|
+
async DeleteMJCompanyIntegrationSyncWatermark(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23665
|
+
const provider = GetReadWriteProvider(providers);
|
|
23666
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
23667
|
+
return this.DeleteRecord('MJ: Company Integration Sync Watermarks', key, options, provider, userPayload, pubSub);
|
|
23668
|
+
}
|
|
23669
|
+
|
|
23670
|
+
}
|
|
23671
|
+
|
|
22902
23672
|
//****************************************************************************
|
|
22903
23673
|
// ENTITY CLASS for MJ: Company Integrations
|
|
22904
23674
|
//****************************************************************************
|
|
@@ -22963,6 +23733,50 @@ export class MJCompanyIntegration_ {
|
|
|
22963
23733
|
@MaxLength(255)
|
|
22964
23734
|
Name: string;
|
|
22965
23735
|
|
|
23736
|
+
@Field({nullable: true, description: `Links this integration to its source type (SaaS API, Database, File Feed, etc.).`})
|
|
23737
|
+
@MaxLength(36)
|
|
23738
|
+
SourceTypeID?: string;
|
|
23739
|
+
|
|
23740
|
+
@Field({nullable: true, description: `JSON configuration for the integration connection (server, database, credentials reference, etc.).`})
|
|
23741
|
+
Configuration?: string;
|
|
23742
|
+
|
|
23743
|
+
@Field({nullable: true, description: `Optional reference to a Credential record that stores encrypted authentication values for this company integration. Replaces the legacy inline auth fields (AccessToken, RefreshToken, APIKey, etc.).`})
|
|
23744
|
+
@MaxLength(36)
|
|
23745
|
+
CredentialID?: string;
|
|
23746
|
+
|
|
23747
|
+
@Field(() => Boolean, {description: `Whether automatic sync scheduling is enabled for this integration`})
|
|
23748
|
+
ScheduleEnabled: boolean;
|
|
23749
|
+
|
|
23750
|
+
@Field({description: `Type of schedule: Manual (no auto-sync), Interval (every N minutes), Cron (cron expression)`})
|
|
23751
|
+
@MaxLength(20)
|
|
23752
|
+
ScheduleType: string;
|
|
23753
|
+
|
|
23754
|
+
@Field(() => Int, {nullable: true, description: `Interval in minutes for Interval schedule type`})
|
|
23755
|
+
ScheduleIntervalMinutes?: number;
|
|
23756
|
+
|
|
23757
|
+
@Field({nullable: true, description: `Cron expression for Cron schedule type (e.g., "0 */6 * * *" for every 6 hours)`})
|
|
23758
|
+
@MaxLength(200)
|
|
23759
|
+
CronExpression?: string;
|
|
23760
|
+
|
|
23761
|
+
@Field({nullable: true, description: `When the next scheduled sync should run. Updated after each run based on schedule config.`})
|
|
23762
|
+
NextScheduledRunAt?: Date;
|
|
23763
|
+
|
|
23764
|
+
@Field({nullable: true, description: `When the last scheduled sync was initiated`})
|
|
23765
|
+
LastScheduledRunAt?: Date;
|
|
23766
|
+
|
|
23767
|
+
@Field(() => Boolean, {description: `Whether a sync is currently locked/running for this integration`})
|
|
23768
|
+
IsLocked: boolean;
|
|
23769
|
+
|
|
23770
|
+
@Field({nullable: true, description: `When the lock was acquired`})
|
|
23771
|
+
LockedAt?: Date;
|
|
23772
|
+
|
|
23773
|
+
@Field({nullable: true, description: `Server instance identifier that holds the lock (hostname-pid)`})
|
|
23774
|
+
@MaxLength(200)
|
|
23775
|
+
LockedByInstance?: string;
|
|
23776
|
+
|
|
23777
|
+
@Field({nullable: true, description: `When the lock should be considered stale and eligible for cleanup`})
|
|
23778
|
+
LockExpiresAt?: Date;
|
|
23779
|
+
|
|
22966
23780
|
@Field()
|
|
22967
23781
|
@MaxLength(50)
|
|
22968
23782
|
Company: string;
|
|
@@ -23001,6 +23815,9 @@ export class MJCompanyIntegration_ {
|
|
|
23001
23815
|
@Field(() => [MJCompanyIntegrationRecordMap_])
|
|
23002
23816
|
MJCompanyIntegrationRecordMaps_CompanyIntegrationIDArray: MJCompanyIntegrationRecordMap_[]; // Link to MJCompanyIntegrationRecordMaps
|
|
23003
23817
|
|
|
23818
|
+
@Field(() => [MJCompanyIntegrationEntityMap_])
|
|
23819
|
+
MJCompanyIntegrationEntityMaps_CompanyIntegrationIDArray: MJCompanyIntegrationEntityMap_[]; // Link to MJCompanyIntegrationEntityMaps
|
|
23820
|
+
|
|
23004
23821
|
}
|
|
23005
23822
|
|
|
23006
23823
|
//****************************************************************************
|
|
@@ -23049,6 +23866,45 @@ export class CreateMJCompanyIntegrationInput {
|
|
|
23049
23866
|
|
|
23050
23867
|
@Field({ nullable: true })
|
|
23051
23868
|
Name?: string;
|
|
23869
|
+
|
|
23870
|
+
@Field({ nullable: true })
|
|
23871
|
+
SourceTypeID: string | null;
|
|
23872
|
+
|
|
23873
|
+
@Field({ nullable: true })
|
|
23874
|
+
Configuration: string | null;
|
|
23875
|
+
|
|
23876
|
+
@Field({ nullable: true })
|
|
23877
|
+
CredentialID: string | null;
|
|
23878
|
+
|
|
23879
|
+
@Field(() => Boolean, { nullable: true })
|
|
23880
|
+
ScheduleEnabled?: boolean;
|
|
23881
|
+
|
|
23882
|
+
@Field({ nullable: true })
|
|
23883
|
+
ScheduleType?: string;
|
|
23884
|
+
|
|
23885
|
+
@Field(() => Int, { nullable: true })
|
|
23886
|
+
ScheduleIntervalMinutes: number | null;
|
|
23887
|
+
|
|
23888
|
+
@Field({ nullable: true })
|
|
23889
|
+
CronExpression: string | null;
|
|
23890
|
+
|
|
23891
|
+
@Field({ nullable: true })
|
|
23892
|
+
NextScheduledRunAt: Date | null;
|
|
23893
|
+
|
|
23894
|
+
@Field({ nullable: true })
|
|
23895
|
+
LastScheduledRunAt: Date | null;
|
|
23896
|
+
|
|
23897
|
+
@Field(() => Boolean, { nullable: true })
|
|
23898
|
+
IsLocked?: boolean;
|
|
23899
|
+
|
|
23900
|
+
@Field({ nullable: true })
|
|
23901
|
+
LockedAt: Date | null;
|
|
23902
|
+
|
|
23903
|
+
@Field({ nullable: true })
|
|
23904
|
+
LockedByInstance: string | null;
|
|
23905
|
+
|
|
23906
|
+
@Field({ nullable: true })
|
|
23907
|
+
LockExpiresAt: Date | null;
|
|
23052
23908
|
}
|
|
23053
23909
|
|
|
23054
23910
|
|
|
@@ -23099,6 +23955,45 @@ export class UpdateMJCompanyIntegrationInput {
|
|
|
23099
23955
|
@Field({ nullable: true })
|
|
23100
23956
|
Name?: string;
|
|
23101
23957
|
|
|
23958
|
+
@Field({ nullable: true })
|
|
23959
|
+
SourceTypeID?: string | null;
|
|
23960
|
+
|
|
23961
|
+
@Field({ nullable: true })
|
|
23962
|
+
Configuration?: string | null;
|
|
23963
|
+
|
|
23964
|
+
@Field({ nullable: true })
|
|
23965
|
+
CredentialID?: string | null;
|
|
23966
|
+
|
|
23967
|
+
@Field(() => Boolean, { nullable: true })
|
|
23968
|
+
ScheduleEnabled?: boolean;
|
|
23969
|
+
|
|
23970
|
+
@Field({ nullable: true })
|
|
23971
|
+
ScheduleType?: string;
|
|
23972
|
+
|
|
23973
|
+
@Field(() => Int, { nullable: true })
|
|
23974
|
+
ScheduleIntervalMinutes?: number | null;
|
|
23975
|
+
|
|
23976
|
+
@Field({ nullable: true })
|
|
23977
|
+
CronExpression?: string | null;
|
|
23978
|
+
|
|
23979
|
+
@Field({ nullable: true })
|
|
23980
|
+
NextScheduledRunAt?: Date | null;
|
|
23981
|
+
|
|
23982
|
+
@Field({ nullable: true })
|
|
23983
|
+
LastScheduledRunAt?: Date | null;
|
|
23984
|
+
|
|
23985
|
+
@Field(() => Boolean, { nullable: true })
|
|
23986
|
+
IsLocked?: boolean;
|
|
23987
|
+
|
|
23988
|
+
@Field({ nullable: true })
|
|
23989
|
+
LockedAt?: Date | null;
|
|
23990
|
+
|
|
23991
|
+
@Field({ nullable: true })
|
|
23992
|
+
LockedByInstance?: string | null;
|
|
23993
|
+
|
|
23994
|
+
@Field({ nullable: true })
|
|
23995
|
+
LockExpiresAt?: Date | null;
|
|
23996
|
+
|
|
23102
23997
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
23103
23998
|
OldValues___?: KeyValuePairInput[];
|
|
23104
23999
|
}
|
|
@@ -23200,6 +24095,16 @@ export class MJCompanyIntegrationResolver extends ResolverBase {
|
|
|
23200
24095
|
return result;
|
|
23201
24096
|
}
|
|
23202
24097
|
|
|
24098
|
+
@FieldResolver(() => [MJCompanyIntegrationEntityMap_])
|
|
24099
|
+
async MJCompanyIntegrationEntityMaps_CompanyIntegrationIDArray(@Root() mjcompanyintegration_: MJCompanyIntegration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24100
|
+
this.CheckUserReadPermissions('MJ: Company Integration Entity Maps', userPayload);
|
|
24101
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24102
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrationEntityMaps')} WHERE ${provider.QuoteIdentifier('CompanyIntegrationID')}='${mjcompanyintegration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integration Entity Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
24103
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
24104
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integration Entity Maps', rows, this.GetUserFromPayload(userPayload));
|
|
24105
|
+
return result;
|
|
24106
|
+
}
|
|
24107
|
+
|
|
23203
24108
|
@Mutation(() => MJCompanyIntegration_)
|
|
23204
24109
|
async CreateMJCompanyIntegration(
|
|
23205
24110
|
@Arg('input', () => CreateMJCompanyIntegrationInput) input: CreateMJCompanyIntegrationInput,
|
|
@@ -24103,15 +25008,15 @@ export class MJComponent_ {
|
|
|
24103
25008
|
@MaxLength(255)
|
|
24104
25009
|
SourceRegistry?: string;
|
|
24105
25010
|
|
|
24106
|
-
@Field(() => [MJComponentDependency_])
|
|
24107
|
-
MJComponentDependencies_DependencyComponentIDArray: MJComponentDependency_[]; // Link to MJComponentDependencies
|
|
24108
|
-
|
|
24109
25011
|
@Field(() => [MJComponentLibraryLink_])
|
|
24110
25012
|
MJComponentLibraryLinks_ComponentIDArray: MJComponentLibraryLink_[]; // Link to MJComponentLibraryLinks
|
|
24111
25013
|
|
|
24112
25014
|
@Field(() => [MJComponentDependency_])
|
|
24113
25015
|
MJComponentDependencies_ComponentIDArray: MJComponentDependency_[]; // Link to MJComponentDependencies
|
|
24114
25016
|
|
|
25017
|
+
@Field(() => [MJComponentDependency_])
|
|
25018
|
+
MJComponentDependencies_DependencyComponentIDArray: MJComponentDependency_[]; // Link to MJComponentDependencies
|
|
25019
|
+
|
|
24115
25020
|
}
|
|
24116
25021
|
|
|
24117
25022
|
//****************************************************************************
|
|
@@ -24349,16 +25254,6 @@ export class MJComponentResolver extends ResolverBase {
|
|
|
24349
25254
|
return result;
|
|
24350
25255
|
}
|
|
24351
25256
|
|
|
24352
|
-
@FieldResolver(() => [MJComponentDependency_])
|
|
24353
|
-
async MJComponentDependencies_DependencyComponentIDArray(@Root() mjcomponent_: MJComponent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24354
|
-
this.CheckUserReadPermissions('MJ: Component Dependencies', userPayload);
|
|
24355
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24356
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwComponentDependencies')} WHERE ${provider.QuoteIdentifier('DependencyComponentID')}='${mjcomponent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Dependencies', userPayload, EntityPermissionType.Read, 'AND');
|
|
24357
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
24358
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Component Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
24359
|
-
return result;
|
|
24360
|
-
}
|
|
24361
|
-
|
|
24362
25257
|
@FieldResolver(() => [MJComponentLibraryLink_])
|
|
24363
25258
|
async MJComponentLibraryLinks_ComponentIDArray(@Root() mjcomponent_: MJComponent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24364
25259
|
this.CheckUserReadPermissions('MJ: Component Library Links', userPayload);
|
|
@@ -24379,6 +25274,16 @@ export class MJComponentResolver extends ResolverBase {
|
|
|
24379
25274
|
return result;
|
|
24380
25275
|
}
|
|
24381
25276
|
|
|
25277
|
+
@FieldResolver(() => [MJComponentDependency_])
|
|
25278
|
+
async MJComponentDependencies_DependencyComponentIDArray(@Root() mjcomponent_: MJComponent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25279
|
+
this.CheckUserReadPermissions('MJ: Component Dependencies', userPayload);
|
|
25280
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25281
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwComponentDependencies')} WHERE ${provider.QuoteIdentifier('DependencyComponentID')}='${mjcomponent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Dependencies', userPayload, EntityPermissionType.Read, 'AND');
|
|
25282
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
25283
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Component Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
25284
|
+
return result;
|
|
25285
|
+
}
|
|
25286
|
+
|
|
24382
25287
|
@Mutation(() => MJComponent_)
|
|
24383
25288
|
async CreateMJComponent(
|
|
24384
25289
|
@Arg('input', () => CreateMJComponentInput) input: CreateMJComponentInput,
|
|
@@ -25865,15 +26770,15 @@ export class MJContentSource_ {
|
|
|
25865
26770
|
@MaxLength(255)
|
|
25866
26771
|
ContentFileType: string;
|
|
25867
26772
|
|
|
25868
|
-
@Field(() => [MJContentProcessRun_])
|
|
25869
|
-
MJContentProcessRuns_SourceIDArray: MJContentProcessRun_[]; // Link to MJContentProcessRuns
|
|
25870
|
-
|
|
25871
26773
|
@Field(() => [MJContentSourceParam_])
|
|
25872
26774
|
MJContentSourceParams_ContentSourceIDArray: MJContentSourceParam_[]; // Link to MJContentSourceParams
|
|
25873
26775
|
|
|
25874
26776
|
@Field(() => [MJContentItem_])
|
|
25875
26777
|
MJContentItems_ContentSourceIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
25876
26778
|
|
|
26779
|
+
@Field(() => [MJContentProcessRun_])
|
|
26780
|
+
MJContentProcessRuns_SourceIDArray: MJContentProcessRun_[]; // Link to MJContentProcessRuns
|
|
26781
|
+
|
|
25877
26782
|
}
|
|
25878
26783
|
|
|
25879
26784
|
//****************************************************************************
|
|
@@ -25985,16 +26890,6 @@ export class MJContentSourceResolver extends ResolverBase {
|
|
|
25985
26890
|
return result;
|
|
25986
26891
|
}
|
|
25987
26892
|
|
|
25988
|
-
@FieldResolver(() => [MJContentProcessRun_])
|
|
25989
|
-
async MJContentProcessRuns_SourceIDArray(@Root() mjcontentsource_: MJContentSource_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25990
|
-
this.CheckUserReadPermissions('MJ: Content Process Runs', userPayload);
|
|
25991
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25992
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRuns')} WHERE ${provider.QuoteIdentifier('SourceID')}='${mjcontentsource_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
25993
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
25994
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
25995
|
-
return result;
|
|
25996
|
-
}
|
|
25997
|
-
|
|
25998
26893
|
@FieldResolver(() => [MJContentSourceParam_])
|
|
25999
26894
|
async MJContentSourceParams_ContentSourceIDArray(@Root() mjcontentsource_: MJContentSource_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26000
26895
|
this.CheckUserReadPermissions('MJ: Content Source Params', userPayload);
|
|
@@ -26015,6 +26910,16 @@ export class MJContentSourceResolver extends ResolverBase {
|
|
|
26015
26910
|
return result;
|
|
26016
26911
|
}
|
|
26017
26912
|
|
|
26913
|
+
@FieldResolver(() => [MJContentProcessRun_])
|
|
26914
|
+
async MJContentProcessRuns_SourceIDArray(@Root() mjcontentsource_: MJContentSource_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26915
|
+
this.CheckUserReadPermissions('MJ: Content Process Runs', userPayload);
|
|
26916
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26917
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentProcessRuns')} WHERE ${provider.QuoteIdentifier('SourceID')}='${mjcontentsource_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Process Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
26918
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
26919
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
26920
|
+
return result;
|
|
26921
|
+
}
|
|
26922
|
+
|
|
26018
26923
|
@Mutation(() => MJContentSource_)
|
|
26019
26924
|
async CreateMJContentSource(
|
|
26020
26925
|
@Arg('input', () => CreateMJContentSourceInput) input: CreateMJContentSourceInput,
|
|
@@ -28680,6 +29585,9 @@ export class MJCredentialType_ {
|
|
|
28680
29585
|
@Field(() => [MJMCPServer_])
|
|
28681
29586
|
MJMCPServers_CredentialTypeIDArray: MJMCPServer_[]; // Link to MJMCPServers
|
|
28682
29587
|
|
|
29588
|
+
@Field(() => [MJIntegration_])
|
|
29589
|
+
MJIntegrations_CredentialTypeIDArray: MJIntegration_[]; // Link to MJIntegrations
|
|
29590
|
+
|
|
28683
29591
|
@Field(() => [MJAIVendor_])
|
|
28684
29592
|
MJAIVendors_CredentialTypeIDArray: MJAIVendor_[]; // Link to MJAIVendors
|
|
28685
29593
|
|
|
@@ -28820,6 +29728,16 @@ export class MJCredentialTypeResolver extends ResolverBase {
|
|
|
28820
29728
|
return result;
|
|
28821
29729
|
}
|
|
28822
29730
|
|
|
29731
|
+
@FieldResolver(() => [MJIntegration_])
|
|
29732
|
+
async MJIntegrations_CredentialTypeIDArray(@Root() mjcredentialtype_: MJCredentialType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29733
|
+
this.CheckUserReadPermissions('MJ: Integrations', userPayload);
|
|
29734
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29735
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrations')} WHERE ${provider.QuoteIdentifier('CredentialTypeID')}='${mjcredentialtype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
29736
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
29737
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Integrations', rows, this.GetUserFromPayload(userPayload));
|
|
29738
|
+
return result;
|
|
29739
|
+
}
|
|
29740
|
+
|
|
28823
29741
|
@FieldResolver(() => [MJAIVendor_])
|
|
28824
29742
|
async MJAIVendors_CredentialTypeIDArray(@Root() mjcredentialtype_: MJCredentialType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28825
29743
|
this.CheckUserReadPermissions('MJ: AI Vendors', userPayload);
|
|
@@ -28931,6 +29849,9 @@ export class MJCredential_ {
|
|
|
28931
29849
|
@Field(() => [MJAICredentialBinding_])
|
|
28932
29850
|
MJAICredentialBindings_CredentialIDArray: MJAICredentialBinding_[]; // Link to MJAICredentialBindings
|
|
28933
29851
|
|
|
29852
|
+
@Field(() => [MJCompanyIntegration_])
|
|
29853
|
+
MJCompanyIntegrations_CredentialIDArray: MJCompanyIntegration_[]; // Link to MJCompanyIntegrations
|
|
29854
|
+
|
|
28934
29855
|
}
|
|
28935
29856
|
|
|
28936
29857
|
//****************************************************************************
|
|
@@ -29118,6 +30039,16 @@ export class MJCredentialResolver extends ResolverBase {
|
|
|
29118
30039
|
return result;
|
|
29119
30040
|
}
|
|
29120
30041
|
|
|
30042
|
+
@FieldResolver(() => [MJCompanyIntegration_])
|
|
30043
|
+
async MJCompanyIntegrations_CredentialIDArray(@Root() mjcredential_: MJCredential_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30044
|
+
this.CheckUserReadPermissions('MJ: Company Integrations', userPayload);
|
|
30045
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30046
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrations')} WHERE ${provider.QuoteIdentifier('CredentialID')}='${mjcredential_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
30047
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
30048
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integrations', rows, this.GetUserFromPayload(userPayload));
|
|
30049
|
+
return result;
|
|
30050
|
+
}
|
|
30051
|
+
|
|
29121
30052
|
@Mutation(() => MJCredential_)
|
|
29122
30053
|
async CreateMJCredential(
|
|
29123
30054
|
@Arg('input', () => CreateMJCredentialInput) input: CreateMJCredentialInput,
|
|
@@ -29195,12 +30126,12 @@ export class MJDashboardCategory_ {
|
|
|
29195
30126
|
@Field(() => [MJDashboardCategory_])
|
|
29196
30127
|
MJDashboardCategories_ParentIDArray: MJDashboardCategory_[]; // Link to MJDashboardCategories
|
|
29197
30128
|
|
|
29198
|
-
@Field(() => [MJDashboardCategoryPermission_])
|
|
29199
|
-
MJDashboardCategoryPermissions_DashboardCategoryIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
29200
|
-
|
|
29201
30129
|
@Field(() => [MJDashboardCategoryLink_])
|
|
29202
30130
|
MJDashboardCategoryLinks_DashboardCategoryIDArray: MJDashboardCategoryLink_[]; // Link to MJDashboardCategoryLinks
|
|
29203
30131
|
|
|
30132
|
+
@Field(() => [MJDashboardCategoryPermission_])
|
|
30133
|
+
MJDashboardCategoryPermissions_DashboardCategoryIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
30134
|
+
|
|
29204
30135
|
}
|
|
29205
30136
|
|
|
29206
30137
|
//****************************************************************************
|
|
@@ -29326,16 +30257,6 @@ export class MJDashboardCategoryResolver extends ResolverBase {
|
|
|
29326
30257
|
return result;
|
|
29327
30258
|
}
|
|
29328
30259
|
|
|
29329
|
-
@FieldResolver(() => [MJDashboardCategoryPermission_])
|
|
29330
|
-
async MJDashboardCategoryPermissions_DashboardCategoryIDArray(@Root() mjdashboardcategory_: MJDashboardCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29331
|
-
this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
|
|
29332
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29333
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardCategoryPermissions')} WHERE ${provider.QuoteIdentifier('DashboardCategoryID')}='${mjdashboardcategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
29334
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
29335
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
29336
|
-
return result;
|
|
29337
|
-
}
|
|
29338
|
-
|
|
29339
30260
|
@FieldResolver(() => [MJDashboardCategoryLink_])
|
|
29340
30261
|
async MJDashboardCategoryLinks_DashboardCategoryIDArray(@Root() mjdashboardcategory_: MJDashboardCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29341
30262
|
this.CheckUserReadPermissions('MJ: Dashboard Category Links', userPayload);
|
|
@@ -29346,6 +30267,16 @@ export class MJDashboardCategoryResolver extends ResolverBase {
|
|
|
29346
30267
|
return result;
|
|
29347
30268
|
}
|
|
29348
30269
|
|
|
30270
|
+
@FieldResolver(() => [MJDashboardCategoryPermission_])
|
|
30271
|
+
async MJDashboardCategoryPermissions_DashboardCategoryIDArray(@Root() mjdashboardcategory_: MJDashboardCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30272
|
+
this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
|
|
30273
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30274
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardCategoryPermissions')} WHERE ${provider.QuoteIdentifier('DashboardCategoryID')}='${mjdashboardcategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
30275
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
30276
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
30277
|
+
return result;
|
|
30278
|
+
}
|
|
30279
|
+
|
|
29349
30280
|
@Mutation(() => MJDashboardCategory_)
|
|
29350
30281
|
async CreateMJDashboardCategory(
|
|
29351
30282
|
@Arg('input', () => CreateMJDashboardCategoryInput) input: CreateMJDashboardCategoryInput,
|
|
@@ -34000,17 +34931,17 @@ export class MJEntity_ {
|
|
|
34000
34931
|
@MaxLength(255)
|
|
34001
34932
|
ParentBaseView?: string;
|
|
34002
34933
|
|
|
34934
|
+
@Field(() => [MJEntityField_])
|
|
34935
|
+
MJEntityFields_EntityIDArray: MJEntityField_[]; // Link to MJEntityFields
|
|
34936
|
+
|
|
34003
34937
|
@Field(() => [MJEntityPermission_])
|
|
34004
34938
|
MJEntityPermissions_EntityIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
34005
34939
|
|
|
34006
34940
|
@Field(() => [MJEntityRelationship_])
|
|
34007
34941
|
MJEntityRelationships_EntityIDArray: MJEntityRelationship_[]; // Link to MJEntityRelationships
|
|
34008
34942
|
|
|
34009
|
-
@Field(() => [MJEntityField_])
|
|
34010
|
-
MJEntityFields_EntityIDArray: MJEntityField_[]; // Link to MJEntityFields
|
|
34011
|
-
|
|
34012
34943
|
@Field(() => [MJEntityAIAction_])
|
|
34013
|
-
|
|
34944
|
+
MJEntityAIActions_OutputEntityIDArray: MJEntityAIAction_[]; // Link to MJEntityAIActions
|
|
34014
34945
|
|
|
34015
34946
|
@Field(() => [MJUserRecordLog_])
|
|
34016
34947
|
MJUserRecordLogs_EntityIDArray: MJUserRecordLog_[]; // Link to MJUserRecordLogs
|
|
@@ -34112,7 +35043,7 @@ export class MJEntity_ {
|
|
|
34112
35043
|
MJAccessControlRules_EntityIDArray: MJAccessControlRule_[]; // Link to MJAccessControlRules
|
|
34113
35044
|
|
|
34114
35045
|
@Field(() => [MJRecordLink_])
|
|
34115
|
-
|
|
35046
|
+
MJRecordLinks_TargetEntityIDArray: MJRecordLink_[]; // Link to MJRecordLinks
|
|
34116
35047
|
|
|
34117
35048
|
@Field(() => [MJAIAgentExample_])
|
|
34118
35049
|
MJAIAgentExamples_PrimaryScopeEntityIDArray: MJAIAgentExample_[]; // Link to MJAIAgentExamples
|
|
@@ -34126,11 +35057,26 @@ export class MJEntity_ {
|
|
|
34126
35057
|
@Field(() => [MJVersionLabelItem_])
|
|
34127
35058
|
MJVersionLabelItems_EntityIDArray: MJVersionLabelItem_[]; // Link to MJVersionLabelItems
|
|
34128
35059
|
|
|
35060
|
+
@Field(() => [MJEntityAIAction_])
|
|
35061
|
+
MJEntityAIActions_EntityIDArray: MJEntityAIAction_[]; // Link to MJEntityAIActions
|
|
35062
|
+
|
|
35063
|
+
@Field(() => [MJEntityRelationship_])
|
|
35064
|
+
MJEntityRelationships_RelatedEntityIDArray: MJEntityRelationship_[]; // Link to MJEntityRelationships
|
|
35065
|
+
|
|
34129
35066
|
@Field(() => [MJGeneratedCode_])
|
|
34130
35067
|
MJGeneratedCodes_LinkedEntityIDArray: MJGeneratedCode_[]; // Link to MJGeneratedCodes
|
|
34131
35068
|
|
|
34132
35069
|
@Field(() => [MJRecordLink_])
|
|
34133
|
-
|
|
35070
|
+
MJRecordLinks_SourceEntityIDArray: MJRecordLink_[]; // Link to MJRecordLinks
|
|
35071
|
+
|
|
35072
|
+
@Field(() => [MJCompanyIntegrationEntityMap_])
|
|
35073
|
+
MJCompanyIntegrationEntityMaps_EntityIDArray: MJCompanyIntegrationEntityMap_[]; // Link to MJCompanyIntegrationEntityMaps
|
|
35074
|
+
|
|
35075
|
+
@Field(() => [MJEntityField_])
|
|
35076
|
+
MJEntityFields_RelatedEntityIDArray: MJEntityField_[]; // Link to MJEntityFields
|
|
35077
|
+
|
|
35078
|
+
@Field(() => [MJResourceType_])
|
|
35079
|
+
MJResourceTypes_CategoryEntityIDArray: MJResourceType_[]; // Link to MJResourceTypes
|
|
34134
35080
|
|
|
34135
35081
|
@Field(() => [MJTestRun_])
|
|
34136
35082
|
MJTestRuns_TargetLogEntityIDArray: MJTestRun_[]; // Link to MJTestRuns
|
|
@@ -34547,6 +35493,16 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34547
35493
|
return result;
|
|
34548
35494
|
}
|
|
34549
35495
|
|
|
35496
|
+
@FieldResolver(() => [MJEntityField_])
|
|
35497
|
+
async MJEntityFields_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35498
|
+
this.CheckUserReadPermissions('MJ: Entity Fields', userPayload);
|
|
35499
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35500
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFields')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
35501
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35502
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Fields', rows, this.GetUserFromPayload(userPayload));
|
|
35503
|
+
return result;
|
|
35504
|
+
}
|
|
35505
|
+
|
|
34550
35506
|
@FieldResolver(() => [MJEntityPermission_])
|
|
34551
35507
|
async MJEntityPermissions_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34552
35508
|
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
@@ -34567,21 +35523,11 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34567
35523
|
return result;
|
|
34568
35524
|
}
|
|
34569
35525
|
|
|
34570
|
-
@FieldResolver(() => [MJEntityField_])
|
|
34571
|
-
async MJEntityFields_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34572
|
-
this.CheckUserReadPermissions('MJ: Entity Fields', userPayload);
|
|
34573
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34574
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFields')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
34575
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
34576
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Fields', rows, this.GetUserFromPayload(userPayload));
|
|
34577
|
-
return result;
|
|
34578
|
-
}
|
|
34579
|
-
|
|
34580
35526
|
@FieldResolver(() => [MJEntityAIAction_])
|
|
34581
|
-
async
|
|
35527
|
+
async MJEntityAIActions_OutputEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34582
35528
|
this.CheckUserReadPermissions('MJ: Entity AI Actions', userPayload);
|
|
34583
35529
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34584
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityAIActions')} WHERE ${provider.QuoteIdentifier('
|
|
35530
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityAIActions')} WHERE ${provider.QuoteIdentifier('OutputEntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
34585
35531
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
34586
35532
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity AI Actions', rows, this.GetUserFromPayload(userPayload));
|
|
34587
35533
|
return result;
|
|
@@ -34918,10 +35864,10 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34918
35864
|
}
|
|
34919
35865
|
|
|
34920
35866
|
@FieldResolver(() => [MJRecordLink_])
|
|
34921
|
-
async
|
|
35867
|
+
async MJRecordLinks_TargetEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34922
35868
|
this.CheckUserReadPermissions('MJ: Record Links', userPayload);
|
|
34923
35869
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34924
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordLinks')} WHERE ${provider.QuoteIdentifier('
|
|
35870
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordLinks')} WHERE ${provider.QuoteIdentifier('TargetEntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
34925
35871
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
34926
35872
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Links', rows, this.GetUserFromPayload(userPayload));
|
|
34927
35873
|
return result;
|
|
@@ -34967,6 +35913,26 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34967
35913
|
return result;
|
|
34968
35914
|
}
|
|
34969
35915
|
|
|
35916
|
+
@FieldResolver(() => [MJEntityAIAction_])
|
|
35917
|
+
async MJEntityAIActions_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35918
|
+
this.CheckUserReadPermissions('MJ: Entity AI Actions', userPayload);
|
|
35919
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35920
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityAIActions')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
35921
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35922
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity AI Actions', rows, this.GetUserFromPayload(userPayload));
|
|
35923
|
+
return result;
|
|
35924
|
+
}
|
|
35925
|
+
|
|
35926
|
+
@FieldResolver(() => [MJEntityRelationship_])
|
|
35927
|
+
async MJEntityRelationships_RelatedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35928
|
+
this.CheckUserReadPermissions('MJ: Entity Relationships', userPayload);
|
|
35929
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35930
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityRelationships')} WHERE ${provider.QuoteIdentifier('RelatedEntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
35931
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35932
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Relationships', rows, this.GetUserFromPayload(userPayload));
|
|
35933
|
+
return result;
|
|
35934
|
+
}
|
|
35935
|
+
|
|
34970
35936
|
@FieldResolver(() => [MJGeneratedCode_])
|
|
34971
35937
|
async MJGeneratedCodes_LinkedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34972
35938
|
this.CheckUserReadPermissions('MJ: Generated Codes', userPayload);
|
|
@@ -34978,15 +35944,45 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34978
35944
|
}
|
|
34979
35945
|
|
|
34980
35946
|
@FieldResolver(() => [MJRecordLink_])
|
|
34981
|
-
async
|
|
35947
|
+
async MJRecordLinks_SourceEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34982
35948
|
this.CheckUserReadPermissions('MJ: Record Links', userPayload);
|
|
34983
35949
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34984
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordLinks')} WHERE ${provider.QuoteIdentifier('
|
|
35950
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordLinks')} WHERE ${provider.QuoteIdentifier('SourceEntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
34985
35951
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
34986
35952
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Links', rows, this.GetUserFromPayload(userPayload));
|
|
34987
35953
|
return result;
|
|
34988
35954
|
}
|
|
34989
35955
|
|
|
35956
|
+
@FieldResolver(() => [MJCompanyIntegrationEntityMap_])
|
|
35957
|
+
async MJCompanyIntegrationEntityMaps_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35958
|
+
this.CheckUserReadPermissions('MJ: Company Integration Entity Maps', userPayload);
|
|
35959
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35960
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrationEntityMaps')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integration Entity Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
35961
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35962
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integration Entity Maps', rows, this.GetUserFromPayload(userPayload));
|
|
35963
|
+
return result;
|
|
35964
|
+
}
|
|
35965
|
+
|
|
35966
|
+
@FieldResolver(() => [MJEntityField_])
|
|
35967
|
+
async MJEntityFields_RelatedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35968
|
+
this.CheckUserReadPermissions('MJ: Entity Fields', userPayload);
|
|
35969
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35970
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFields')} WHERE ${provider.QuoteIdentifier('RelatedEntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
35971
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35972
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Fields', rows, this.GetUserFromPayload(userPayload));
|
|
35973
|
+
return result;
|
|
35974
|
+
}
|
|
35975
|
+
|
|
35976
|
+
@FieldResolver(() => [MJResourceType_])
|
|
35977
|
+
async MJResourceTypes_CategoryEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35978
|
+
this.CheckUserReadPermissions('MJ: Resource Types', userPayload);
|
|
35979
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35980
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwResourceTypes')} WHERE ${provider.QuoteIdentifier('CategoryEntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Resource Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
35981
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35982
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Resource Types', rows, this.GetUserFromPayload(userPayload));
|
|
35983
|
+
return result;
|
|
35984
|
+
}
|
|
35985
|
+
|
|
34990
35986
|
@FieldResolver(() => [MJTestRun_])
|
|
34991
35987
|
async MJTestRuns_TargetLogEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34992
35988
|
this.CheckUserReadPermissions('MJ: Test Runs', userPayload);
|
|
@@ -39316,15 +40312,15 @@ export class MJEnvironment_ {
|
|
|
39316
40312
|
@Field()
|
|
39317
40313
|
_mj__UpdatedAt: Date;
|
|
39318
40314
|
|
|
40315
|
+
@Field(() => [MJArtifact_])
|
|
40316
|
+
MJArtifacts_EnvironmentIDArray: MJArtifact_[]; // Link to MJArtifacts
|
|
40317
|
+
|
|
39319
40318
|
@Field(() => [MJProject_])
|
|
39320
40319
|
MJProjects_EnvironmentIDArray: MJProject_[]; // Link to MJProjects
|
|
39321
40320
|
|
|
39322
40321
|
@Field(() => [MJCollection_])
|
|
39323
40322
|
MJCollections_EnvironmentIDArray: MJCollection_[]; // Link to MJCollections
|
|
39324
40323
|
|
|
39325
|
-
@Field(() => [MJArtifact_])
|
|
39326
|
-
MJArtifacts_EnvironmentIDArray: MJArtifact_[]; // Link to MJArtifacts
|
|
39327
|
-
|
|
39328
40324
|
@Field(() => [MJTask_])
|
|
39329
40325
|
MJTasks_EnvironmentIDArray: MJTask_[]; // Link to MJTasks
|
|
39330
40326
|
|
|
@@ -39442,6 +40438,16 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
39442
40438
|
return result;
|
|
39443
40439
|
}
|
|
39444
40440
|
|
|
40441
|
+
@FieldResolver(() => [MJArtifact_])
|
|
40442
|
+
async MJArtifacts_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40443
|
+
this.CheckUserReadPermissions('MJ: Artifacts', userPayload);
|
|
40444
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40445
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArtifacts')} WHERE ${provider.QuoteIdentifier('EnvironmentID')}='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifacts', userPayload, EntityPermissionType.Read, 'AND');
|
|
40446
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
40447
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifacts', rows, this.GetUserFromPayload(userPayload));
|
|
40448
|
+
return result;
|
|
40449
|
+
}
|
|
40450
|
+
|
|
39445
40451
|
@FieldResolver(() => [MJProject_])
|
|
39446
40452
|
async MJProjects_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39447
40453
|
this.CheckUserReadPermissions('MJ: Projects', userPayload);
|
|
@@ -39462,16 +40468,6 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
39462
40468
|
return result;
|
|
39463
40469
|
}
|
|
39464
40470
|
|
|
39465
|
-
@FieldResolver(() => [MJArtifact_])
|
|
39466
|
-
async MJArtifacts_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39467
|
-
this.CheckUserReadPermissions('MJ: Artifacts', userPayload);
|
|
39468
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39469
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArtifacts')} WHERE ${provider.QuoteIdentifier('EnvironmentID')}='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifacts', userPayload, EntityPermissionType.Read, 'AND');
|
|
39470
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
39471
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifacts', rows, this.GetUserFromPayload(userPayload));
|
|
39472
|
-
return result;
|
|
39473
|
-
}
|
|
39474
|
-
|
|
39475
40471
|
@FieldResolver(() => [MJTask_])
|
|
39476
40472
|
async MJTasks_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39477
40473
|
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
@@ -41033,12 +42029,12 @@ export class MJGeneratedCodeCategory_ {
|
|
|
41033
42029
|
@MaxLength(36)
|
|
41034
42030
|
RootParentID?: string;
|
|
41035
42031
|
|
|
41036
|
-
@Field(() => [MJGeneratedCodeCategory_])
|
|
41037
|
-
MJGeneratedCodeCategories_ParentIDArray: MJGeneratedCodeCategory_[]; // Link to MJGeneratedCodeCategories
|
|
41038
|
-
|
|
41039
42032
|
@Field(() => [MJGeneratedCode_])
|
|
41040
42033
|
MJGeneratedCodes_CategoryIDArray: MJGeneratedCode_[]; // Link to MJGeneratedCodes
|
|
41041
42034
|
|
|
42035
|
+
@Field(() => [MJGeneratedCodeCategory_])
|
|
42036
|
+
MJGeneratedCodeCategories_ParentIDArray: MJGeneratedCodeCategory_[]; // Link to MJGeneratedCodeCategories
|
|
42037
|
+
|
|
41042
42038
|
}
|
|
41043
42039
|
|
|
41044
42040
|
//****************************************************************************
|
|
@@ -41138,16 +42134,6 @@ export class MJGeneratedCodeCategoryResolver extends ResolverBase {
|
|
|
41138
42134
|
return result;
|
|
41139
42135
|
}
|
|
41140
42136
|
|
|
41141
|
-
@FieldResolver(() => [MJGeneratedCodeCategory_])
|
|
41142
|
-
async MJGeneratedCodeCategories_ParentIDArray(@Root() mjgeneratedcodecategory_: MJGeneratedCodeCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41143
|
-
this.CheckUserReadPermissions('MJ: Generated Code Categories', userPayload);
|
|
41144
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41145
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwGeneratedCodeCategories')} WHERE ${provider.QuoteIdentifier('ParentID')}='${mjgeneratedcodecategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Generated Code Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
41146
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
41147
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Generated Code Categories', rows, this.GetUserFromPayload(userPayload));
|
|
41148
|
-
return result;
|
|
41149
|
-
}
|
|
41150
|
-
|
|
41151
42137
|
@FieldResolver(() => [MJGeneratedCode_])
|
|
41152
42138
|
async MJGeneratedCodes_CategoryIDArray(@Root() mjgeneratedcodecategory_: MJGeneratedCodeCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41153
42139
|
this.CheckUserReadPermissions('MJ: Generated Codes', userPayload);
|
|
@@ -41158,6 +42144,16 @@ export class MJGeneratedCodeCategoryResolver extends ResolverBase {
|
|
|
41158
42144
|
return result;
|
|
41159
42145
|
}
|
|
41160
42146
|
|
|
42147
|
+
@FieldResolver(() => [MJGeneratedCodeCategory_])
|
|
42148
|
+
async MJGeneratedCodeCategories_ParentIDArray(@Root() mjgeneratedcodecategory_: MJGeneratedCodeCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42149
|
+
this.CheckUserReadPermissions('MJ: Generated Code Categories', userPayload);
|
|
42150
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42151
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwGeneratedCodeCategories')} WHERE ${provider.QuoteIdentifier('ParentID')}='${mjgeneratedcodecategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Generated Code Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
42152
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
42153
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Generated Code Categories', rows, this.GetUserFromPayload(userPayload));
|
|
42154
|
+
return result;
|
|
42155
|
+
}
|
|
42156
|
+
|
|
41161
42157
|
@Mutation(() => MJGeneratedCodeCategory_)
|
|
41162
42158
|
async CreateMJGeneratedCodeCategory(
|
|
41163
42159
|
@Arg('input', () => CreateMJGeneratedCodeCategoryInput) input: CreateMJGeneratedCodeCategoryInput,
|
|
@@ -41429,6 +42425,822 @@ export class MJGeneratedCodeResolver extends ResolverBase {
|
|
|
41429
42425
|
|
|
41430
42426
|
}
|
|
41431
42427
|
|
|
42428
|
+
//****************************************************************************
|
|
42429
|
+
// ENTITY CLASS for MJ: Integration Object Fields
|
|
42430
|
+
//****************************************************************************
|
|
42431
|
+
@ObjectType({ description: `Describes a field on an integration object, mirroring EntityField column patterns for type compatibility` })
|
|
42432
|
+
export class MJIntegrationObjectField_ {
|
|
42433
|
+
@Field({description: `Primary key`})
|
|
42434
|
+
@MaxLength(36)
|
|
42435
|
+
ID: string;
|
|
42436
|
+
|
|
42437
|
+
@Field({description: `Foreign key to the IntegrationObject this field belongs to`})
|
|
42438
|
+
@MaxLength(36)
|
|
42439
|
+
IntegrationObjectID: string;
|
|
42440
|
+
|
|
42441
|
+
@Field({description: `Field name as returned by the external API`})
|
|
42442
|
+
@MaxLength(255)
|
|
42443
|
+
Name: string;
|
|
42444
|
+
|
|
42445
|
+
@Field({nullable: true, description: `Human-friendly display label for the field`})
|
|
42446
|
+
@MaxLength(255)
|
|
42447
|
+
DisplayName?: string;
|
|
42448
|
+
|
|
42449
|
+
@Field({nullable: true, description: `Description of what this field represents`})
|
|
42450
|
+
Description?: string;
|
|
42451
|
+
|
|
42452
|
+
@Field({nullable: true, description: `UI grouping category within the object`})
|
|
42453
|
+
@MaxLength(100)
|
|
42454
|
+
Category?: string;
|
|
42455
|
+
|
|
42456
|
+
@Field({description: `Data type of the field (e.g., nvarchar, int, datetime, decimal, bit). Uses same type vocabulary as EntityField.`})
|
|
42457
|
+
@MaxLength(100)
|
|
42458
|
+
Type: string;
|
|
42459
|
+
|
|
42460
|
+
@Field(() => Int, {nullable: true, description: `Maximum length for string types`})
|
|
42461
|
+
Length?: number;
|
|
42462
|
+
|
|
42463
|
+
@Field(() => Int, {nullable: true, description: `Numeric precision`})
|
|
42464
|
+
Precision?: number;
|
|
42465
|
+
|
|
42466
|
+
@Field(() => Int, {nullable: true, description: `Numeric scale`})
|
|
42467
|
+
Scale?: number;
|
|
42468
|
+
|
|
42469
|
+
@Field(() => Boolean, {description: `Whether the field can contain NULL values`})
|
|
42470
|
+
AllowsNull: boolean;
|
|
42471
|
+
|
|
42472
|
+
@Field({nullable: true, description: `Default value from the source system`})
|
|
42473
|
+
@MaxLength(255)
|
|
42474
|
+
DefaultValue?: string;
|
|
42475
|
+
|
|
42476
|
+
@Field(() => Boolean, {description: `Whether this field is part of the object primary key`})
|
|
42477
|
+
IsPrimaryKey: boolean;
|
|
42478
|
+
|
|
42479
|
+
@Field(() => Boolean, {description: `Whether values must be unique across all records`})
|
|
42480
|
+
IsUniqueKey: boolean;
|
|
42481
|
+
|
|
42482
|
+
@Field(() => Boolean, {description: `Whether this field cannot be written back to the source system`})
|
|
42483
|
+
IsReadOnly: boolean;
|
|
42484
|
+
|
|
42485
|
+
@Field(() => Boolean, {description: `Whether this field is required for create/update operations`})
|
|
42486
|
+
IsRequired: boolean;
|
|
42487
|
+
|
|
42488
|
+
@Field({nullable: true, description: `Foreign key to another IntegrationObject, establishing a relationship. Used for DAG-based dependency ordering and template variable resolution in parent APIPath patterns.`})
|
|
42489
|
+
@MaxLength(36)
|
|
42490
|
+
RelatedIntegrationObjectID?: string;
|
|
42491
|
+
|
|
42492
|
+
@Field({nullable: true, description: `The field name on the related IntegrationObject that this FK points to (typically the PK field)`})
|
|
42493
|
+
@MaxLength(255)
|
|
42494
|
+
RelatedIntegrationObjectFieldName?: string;
|
|
42495
|
+
|
|
42496
|
+
@Field(() => Int, {description: `Display and processing order within the object. Lower numbers appear first.`})
|
|
42497
|
+
Sequence: number;
|
|
42498
|
+
|
|
42499
|
+
@Field({nullable: true, description: `Freeform JSON for connector-specific field configuration`})
|
|
42500
|
+
Configuration?: string;
|
|
42501
|
+
|
|
42502
|
+
@Field({description: `Active, Deprecated, or Disabled. Mirrors EntityField status values.`})
|
|
42503
|
+
@MaxLength(25)
|
|
42504
|
+
Status: string;
|
|
42505
|
+
|
|
42506
|
+
@Field()
|
|
42507
|
+
_mj__CreatedAt: Date;
|
|
42508
|
+
|
|
42509
|
+
@Field()
|
|
42510
|
+
_mj__UpdatedAt: Date;
|
|
42511
|
+
|
|
42512
|
+
@Field()
|
|
42513
|
+
@MaxLength(255)
|
|
42514
|
+
IntegrationObject: string;
|
|
42515
|
+
|
|
42516
|
+
@Field({nullable: true})
|
|
42517
|
+
@MaxLength(255)
|
|
42518
|
+
RelatedIntegrationObject?: string;
|
|
42519
|
+
|
|
42520
|
+
}
|
|
42521
|
+
|
|
42522
|
+
//****************************************************************************
|
|
42523
|
+
// INPUT TYPE for MJ: Integration Object Fields
|
|
42524
|
+
//****************************************************************************
|
|
42525
|
+
@InputType()
|
|
42526
|
+
export class CreateMJIntegrationObjectFieldInput {
|
|
42527
|
+
@Field({ nullable: true })
|
|
42528
|
+
ID?: string;
|
|
42529
|
+
|
|
42530
|
+
@Field({ nullable: true })
|
|
42531
|
+
IntegrationObjectID?: string;
|
|
42532
|
+
|
|
42533
|
+
@Field({ nullable: true })
|
|
42534
|
+
Name?: string;
|
|
42535
|
+
|
|
42536
|
+
@Field({ nullable: true })
|
|
42537
|
+
DisplayName: string | null;
|
|
42538
|
+
|
|
42539
|
+
@Field({ nullable: true })
|
|
42540
|
+
Description: string | null;
|
|
42541
|
+
|
|
42542
|
+
@Field({ nullable: true })
|
|
42543
|
+
Category: string | null;
|
|
42544
|
+
|
|
42545
|
+
@Field({ nullable: true })
|
|
42546
|
+
Type?: string;
|
|
42547
|
+
|
|
42548
|
+
@Field(() => Int, { nullable: true })
|
|
42549
|
+
Length: number | null;
|
|
42550
|
+
|
|
42551
|
+
@Field(() => Int, { nullable: true })
|
|
42552
|
+
Precision: number | null;
|
|
42553
|
+
|
|
42554
|
+
@Field(() => Int, { nullable: true })
|
|
42555
|
+
Scale: number | null;
|
|
42556
|
+
|
|
42557
|
+
@Field(() => Boolean, { nullable: true })
|
|
42558
|
+
AllowsNull?: boolean;
|
|
42559
|
+
|
|
42560
|
+
@Field({ nullable: true })
|
|
42561
|
+
DefaultValue: string | null;
|
|
42562
|
+
|
|
42563
|
+
@Field(() => Boolean, { nullable: true })
|
|
42564
|
+
IsPrimaryKey?: boolean;
|
|
42565
|
+
|
|
42566
|
+
@Field(() => Boolean, { nullable: true })
|
|
42567
|
+
IsUniqueKey?: boolean;
|
|
42568
|
+
|
|
42569
|
+
@Field(() => Boolean, { nullable: true })
|
|
42570
|
+
IsReadOnly?: boolean;
|
|
42571
|
+
|
|
42572
|
+
@Field(() => Boolean, { nullable: true })
|
|
42573
|
+
IsRequired?: boolean;
|
|
42574
|
+
|
|
42575
|
+
@Field({ nullable: true })
|
|
42576
|
+
RelatedIntegrationObjectID: string | null;
|
|
42577
|
+
|
|
42578
|
+
@Field({ nullable: true })
|
|
42579
|
+
RelatedIntegrationObjectFieldName: string | null;
|
|
42580
|
+
|
|
42581
|
+
@Field(() => Int, { nullable: true })
|
|
42582
|
+
Sequence?: number;
|
|
42583
|
+
|
|
42584
|
+
@Field({ nullable: true })
|
|
42585
|
+
Configuration: string | null;
|
|
42586
|
+
|
|
42587
|
+
@Field({ nullable: true })
|
|
42588
|
+
Status?: string;
|
|
42589
|
+
}
|
|
42590
|
+
|
|
42591
|
+
|
|
42592
|
+
//****************************************************************************
|
|
42593
|
+
// INPUT TYPE for MJ: Integration Object Fields
|
|
42594
|
+
//****************************************************************************
|
|
42595
|
+
@InputType()
|
|
42596
|
+
export class UpdateMJIntegrationObjectFieldInput {
|
|
42597
|
+
@Field()
|
|
42598
|
+
ID: string;
|
|
42599
|
+
|
|
42600
|
+
@Field({ nullable: true })
|
|
42601
|
+
IntegrationObjectID?: string;
|
|
42602
|
+
|
|
42603
|
+
@Field({ nullable: true })
|
|
42604
|
+
Name?: string;
|
|
42605
|
+
|
|
42606
|
+
@Field({ nullable: true })
|
|
42607
|
+
DisplayName?: string | null;
|
|
42608
|
+
|
|
42609
|
+
@Field({ nullable: true })
|
|
42610
|
+
Description?: string | null;
|
|
42611
|
+
|
|
42612
|
+
@Field({ nullable: true })
|
|
42613
|
+
Category?: string | null;
|
|
42614
|
+
|
|
42615
|
+
@Field({ nullable: true })
|
|
42616
|
+
Type?: string;
|
|
42617
|
+
|
|
42618
|
+
@Field(() => Int, { nullable: true })
|
|
42619
|
+
Length?: number | null;
|
|
42620
|
+
|
|
42621
|
+
@Field(() => Int, { nullable: true })
|
|
42622
|
+
Precision?: number | null;
|
|
42623
|
+
|
|
42624
|
+
@Field(() => Int, { nullable: true })
|
|
42625
|
+
Scale?: number | null;
|
|
42626
|
+
|
|
42627
|
+
@Field(() => Boolean, { nullable: true })
|
|
42628
|
+
AllowsNull?: boolean;
|
|
42629
|
+
|
|
42630
|
+
@Field({ nullable: true })
|
|
42631
|
+
DefaultValue?: string | null;
|
|
42632
|
+
|
|
42633
|
+
@Field(() => Boolean, { nullable: true })
|
|
42634
|
+
IsPrimaryKey?: boolean;
|
|
42635
|
+
|
|
42636
|
+
@Field(() => Boolean, { nullable: true })
|
|
42637
|
+
IsUniqueKey?: boolean;
|
|
42638
|
+
|
|
42639
|
+
@Field(() => Boolean, { nullable: true })
|
|
42640
|
+
IsReadOnly?: boolean;
|
|
42641
|
+
|
|
42642
|
+
@Field(() => Boolean, { nullable: true })
|
|
42643
|
+
IsRequired?: boolean;
|
|
42644
|
+
|
|
42645
|
+
@Field({ nullable: true })
|
|
42646
|
+
RelatedIntegrationObjectID?: string | null;
|
|
42647
|
+
|
|
42648
|
+
@Field({ nullable: true })
|
|
42649
|
+
RelatedIntegrationObjectFieldName?: string | null;
|
|
42650
|
+
|
|
42651
|
+
@Field(() => Int, { nullable: true })
|
|
42652
|
+
Sequence?: number;
|
|
42653
|
+
|
|
42654
|
+
@Field({ nullable: true })
|
|
42655
|
+
Configuration?: string | null;
|
|
42656
|
+
|
|
42657
|
+
@Field({ nullable: true })
|
|
42658
|
+
Status?: string;
|
|
42659
|
+
|
|
42660
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
42661
|
+
OldValues___?: KeyValuePairInput[];
|
|
42662
|
+
}
|
|
42663
|
+
|
|
42664
|
+
//****************************************************************************
|
|
42665
|
+
// RESOLVER for MJ: Integration Object Fields
|
|
42666
|
+
//****************************************************************************
|
|
42667
|
+
@ObjectType()
|
|
42668
|
+
export class RunMJIntegrationObjectFieldViewResult {
|
|
42669
|
+
@Field(() => [MJIntegrationObjectField_])
|
|
42670
|
+
Results: MJIntegrationObjectField_[];
|
|
42671
|
+
|
|
42672
|
+
@Field(() => String, {nullable: true})
|
|
42673
|
+
UserViewRunID?: string;
|
|
42674
|
+
|
|
42675
|
+
@Field(() => Int, {nullable: true})
|
|
42676
|
+
RowCount: number;
|
|
42677
|
+
|
|
42678
|
+
@Field(() => Int, {nullable: true})
|
|
42679
|
+
TotalRowCount: number;
|
|
42680
|
+
|
|
42681
|
+
@Field(() => Int, {nullable: true})
|
|
42682
|
+
ExecutionTime: number;
|
|
42683
|
+
|
|
42684
|
+
@Field({nullable: true})
|
|
42685
|
+
ErrorMessage?: string;
|
|
42686
|
+
|
|
42687
|
+
@Field(() => Boolean, {nullable: false})
|
|
42688
|
+
Success: boolean;
|
|
42689
|
+
}
|
|
42690
|
+
|
|
42691
|
+
@Resolver(MJIntegrationObjectField_)
|
|
42692
|
+
export class MJIntegrationObjectFieldResolver extends ResolverBase {
|
|
42693
|
+
@Query(() => RunMJIntegrationObjectFieldViewResult)
|
|
42694
|
+
async RunMJIntegrationObjectFieldViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42695
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42696
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
42697
|
+
}
|
|
42698
|
+
|
|
42699
|
+
@Query(() => RunMJIntegrationObjectFieldViewResult)
|
|
42700
|
+
async RunMJIntegrationObjectFieldViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42701
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42702
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
42703
|
+
}
|
|
42704
|
+
|
|
42705
|
+
@Query(() => RunMJIntegrationObjectFieldViewResult)
|
|
42706
|
+
async RunMJIntegrationObjectFieldDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42707
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42708
|
+
input.EntityName = 'MJ: Integration Object Fields';
|
|
42709
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
42710
|
+
}
|
|
42711
|
+
@Query(() => MJIntegrationObjectField_, { nullable: true })
|
|
42712
|
+
async MJIntegrationObjectField(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJIntegrationObjectField_ | null> {
|
|
42713
|
+
this.CheckUserReadPermissions('MJ: Integration Object Fields', userPayload);
|
|
42714
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42715
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjectFields')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Object Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
42716
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
42717
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Integration Object Fields', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
42718
|
+
return result;
|
|
42719
|
+
}
|
|
42720
|
+
|
|
42721
|
+
@Mutation(() => MJIntegrationObjectField_)
|
|
42722
|
+
async CreateMJIntegrationObjectField(
|
|
42723
|
+
@Arg('input', () => CreateMJIntegrationObjectFieldInput) input: CreateMJIntegrationObjectFieldInput,
|
|
42724
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
42725
|
+
@PubSub() pubSub: PubSubEngine
|
|
42726
|
+
) {
|
|
42727
|
+
const provider = GetReadWriteProvider(providers);
|
|
42728
|
+
return this.CreateRecord('MJ: Integration Object Fields', input, provider, userPayload, pubSub)
|
|
42729
|
+
}
|
|
42730
|
+
|
|
42731
|
+
@Mutation(() => MJIntegrationObjectField_)
|
|
42732
|
+
async UpdateMJIntegrationObjectField(
|
|
42733
|
+
@Arg('input', () => UpdateMJIntegrationObjectFieldInput) input: UpdateMJIntegrationObjectFieldInput,
|
|
42734
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
42735
|
+
@PubSub() pubSub: PubSubEngine
|
|
42736
|
+
) {
|
|
42737
|
+
const provider = GetReadWriteProvider(providers);
|
|
42738
|
+
return this.UpdateRecord('MJ: Integration Object Fields', input, provider, userPayload, pubSub);
|
|
42739
|
+
}
|
|
42740
|
+
|
|
42741
|
+
@Mutation(() => MJIntegrationObjectField_)
|
|
42742
|
+
async DeleteMJIntegrationObjectField(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42743
|
+
const provider = GetReadWriteProvider(providers);
|
|
42744
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
42745
|
+
return this.DeleteRecord('MJ: Integration Object Fields', key, options, provider, userPayload, pubSub);
|
|
42746
|
+
}
|
|
42747
|
+
|
|
42748
|
+
}
|
|
42749
|
+
|
|
42750
|
+
//****************************************************************************
|
|
42751
|
+
// ENTITY CLASS for MJ: Integration Objects
|
|
42752
|
+
//****************************************************************************
|
|
42753
|
+
@ObjectType({ description: `Describes an external object or endpoint exposed by an integration (e.g., Members, Events, Invoices)` })
|
|
42754
|
+
export class MJIntegrationObject_ {
|
|
42755
|
+
@Field({description: `Primary key`})
|
|
42756
|
+
@MaxLength(36)
|
|
42757
|
+
ID: string;
|
|
42758
|
+
|
|
42759
|
+
@Field({description: `Foreign key to the Integration that owns this object`})
|
|
42760
|
+
@MaxLength(36)
|
|
42761
|
+
IntegrationID: string;
|
|
42762
|
+
|
|
42763
|
+
@Field({description: `Internal/programmatic name of the external object (e.g., Members, Events)`})
|
|
42764
|
+
@MaxLength(255)
|
|
42765
|
+
Name: string;
|
|
42766
|
+
|
|
42767
|
+
@Field({nullable: true, description: `Human-friendly display label`})
|
|
42768
|
+
@MaxLength(255)
|
|
42769
|
+
DisplayName?: string;
|
|
42770
|
+
|
|
42771
|
+
@Field({nullable: true, description: `Description of what this external object represents`})
|
|
42772
|
+
Description?: string;
|
|
42773
|
+
|
|
42774
|
+
@Field({nullable: true, description: `UI grouping category (e.g., Membership, Events, Finance)`})
|
|
42775
|
+
@MaxLength(100)
|
|
42776
|
+
Category?: string;
|
|
42777
|
+
|
|
42778
|
+
@Field({description: `API endpoint path, may include template variables like {ProfileID} that are resolved at runtime from parent object records`})
|
|
42779
|
+
@MaxLength(500)
|
|
42780
|
+
APIPath: string;
|
|
42781
|
+
|
|
42782
|
+
@Field({nullable: true, description: `JSON key used to extract the data array from the API response envelope. NULL means the response is a root-level array.`})
|
|
42783
|
+
@MaxLength(255)
|
|
42784
|
+
ResponseDataKey?: string;
|
|
42785
|
+
|
|
42786
|
+
@Field(() => Int, {description: `Number of records to request per page from the API`})
|
|
42787
|
+
DefaultPageSize: number;
|
|
42788
|
+
|
|
42789
|
+
@Field(() => Boolean, {description: `Whether this endpoint supports paginated fetching`})
|
|
42790
|
+
SupportsPagination: boolean;
|
|
42791
|
+
|
|
42792
|
+
@Field({description: `Pagination strategy: PageNumber (page index), Offset (record offset), Cursor (opaque token), or None`})
|
|
42793
|
+
@MaxLength(20)
|
|
42794
|
+
PaginationType: string;
|
|
42795
|
+
|
|
42796
|
+
@Field(() => Boolean, {description: `Whether this object supports watermark-based incremental sync`})
|
|
42797
|
+
SupportsIncrementalSync: boolean;
|
|
42798
|
+
|
|
42799
|
+
@Field(() => Boolean, {description: `Whether data can be pushed back to this object via the API`})
|
|
42800
|
+
SupportsWrite: boolean;
|
|
42801
|
+
|
|
42802
|
+
@Field({nullable: true, description: `JSON object of default query parameters to include with every API request for this object`})
|
|
42803
|
+
DefaultQueryParams?: string;
|
|
42804
|
+
|
|
42805
|
+
@Field({nullable: true, description: `Freeform JSON for connector-specific configuration not covered by standard columns`})
|
|
42806
|
+
Configuration?: string;
|
|
42807
|
+
|
|
42808
|
+
@Field(() => Int, {description: `Processing and display order. Lower numbers are processed first.`})
|
|
42809
|
+
Sequence: number;
|
|
42810
|
+
|
|
42811
|
+
@Field({description: `Active, Deprecated, or Disabled. Mirrors EntityField status values.`})
|
|
42812
|
+
@MaxLength(25)
|
|
42813
|
+
Status: string;
|
|
42814
|
+
|
|
42815
|
+
@Field()
|
|
42816
|
+
_mj__CreatedAt: Date;
|
|
42817
|
+
|
|
42818
|
+
@Field()
|
|
42819
|
+
_mj__UpdatedAt: Date;
|
|
42820
|
+
|
|
42821
|
+
@Field()
|
|
42822
|
+
@MaxLength(100)
|
|
42823
|
+
Integration: string;
|
|
42824
|
+
|
|
42825
|
+
@Field(() => [MJIntegrationObjectField_])
|
|
42826
|
+
MJIntegrationObjectFields_IntegrationObjectIDArray: MJIntegrationObjectField_[]; // Link to MJIntegrationObjectFields
|
|
42827
|
+
|
|
42828
|
+
@Field(() => [MJIntegrationObjectField_])
|
|
42829
|
+
MJIntegrationObjectFields_RelatedIntegrationObjectIDArray: MJIntegrationObjectField_[]; // Link to MJIntegrationObjectFields
|
|
42830
|
+
|
|
42831
|
+
}
|
|
42832
|
+
|
|
42833
|
+
//****************************************************************************
|
|
42834
|
+
// INPUT TYPE for MJ: Integration Objects
|
|
42835
|
+
//****************************************************************************
|
|
42836
|
+
@InputType()
|
|
42837
|
+
export class CreateMJIntegrationObjectInput {
|
|
42838
|
+
@Field({ nullable: true })
|
|
42839
|
+
ID?: string;
|
|
42840
|
+
|
|
42841
|
+
@Field({ nullable: true })
|
|
42842
|
+
IntegrationID?: string;
|
|
42843
|
+
|
|
42844
|
+
@Field({ nullable: true })
|
|
42845
|
+
Name?: string;
|
|
42846
|
+
|
|
42847
|
+
@Field({ nullable: true })
|
|
42848
|
+
DisplayName: string | null;
|
|
42849
|
+
|
|
42850
|
+
@Field({ nullable: true })
|
|
42851
|
+
Description: string | null;
|
|
42852
|
+
|
|
42853
|
+
@Field({ nullable: true })
|
|
42854
|
+
Category: string | null;
|
|
42855
|
+
|
|
42856
|
+
@Field({ nullable: true })
|
|
42857
|
+
APIPath?: string;
|
|
42858
|
+
|
|
42859
|
+
@Field({ nullable: true })
|
|
42860
|
+
ResponseDataKey: string | null;
|
|
42861
|
+
|
|
42862
|
+
@Field(() => Int, { nullable: true })
|
|
42863
|
+
DefaultPageSize?: number;
|
|
42864
|
+
|
|
42865
|
+
@Field(() => Boolean, { nullable: true })
|
|
42866
|
+
SupportsPagination?: boolean;
|
|
42867
|
+
|
|
42868
|
+
@Field({ nullable: true })
|
|
42869
|
+
PaginationType?: string;
|
|
42870
|
+
|
|
42871
|
+
@Field(() => Boolean, { nullable: true })
|
|
42872
|
+
SupportsIncrementalSync?: boolean;
|
|
42873
|
+
|
|
42874
|
+
@Field(() => Boolean, { nullable: true })
|
|
42875
|
+
SupportsWrite?: boolean;
|
|
42876
|
+
|
|
42877
|
+
@Field({ nullable: true })
|
|
42878
|
+
DefaultQueryParams: string | null;
|
|
42879
|
+
|
|
42880
|
+
@Field({ nullable: true })
|
|
42881
|
+
Configuration: string | null;
|
|
42882
|
+
|
|
42883
|
+
@Field(() => Int, { nullable: true })
|
|
42884
|
+
Sequence?: number;
|
|
42885
|
+
|
|
42886
|
+
@Field({ nullable: true })
|
|
42887
|
+
Status?: string;
|
|
42888
|
+
}
|
|
42889
|
+
|
|
42890
|
+
|
|
42891
|
+
//****************************************************************************
|
|
42892
|
+
// INPUT TYPE for MJ: Integration Objects
|
|
42893
|
+
//****************************************************************************
|
|
42894
|
+
@InputType()
|
|
42895
|
+
export class UpdateMJIntegrationObjectInput {
|
|
42896
|
+
@Field()
|
|
42897
|
+
ID: string;
|
|
42898
|
+
|
|
42899
|
+
@Field({ nullable: true })
|
|
42900
|
+
IntegrationID?: string;
|
|
42901
|
+
|
|
42902
|
+
@Field({ nullable: true })
|
|
42903
|
+
Name?: string;
|
|
42904
|
+
|
|
42905
|
+
@Field({ nullable: true })
|
|
42906
|
+
DisplayName?: string | null;
|
|
42907
|
+
|
|
42908
|
+
@Field({ nullable: true })
|
|
42909
|
+
Description?: string | null;
|
|
42910
|
+
|
|
42911
|
+
@Field({ nullable: true })
|
|
42912
|
+
Category?: string | null;
|
|
42913
|
+
|
|
42914
|
+
@Field({ nullable: true })
|
|
42915
|
+
APIPath?: string;
|
|
42916
|
+
|
|
42917
|
+
@Field({ nullable: true })
|
|
42918
|
+
ResponseDataKey?: string | null;
|
|
42919
|
+
|
|
42920
|
+
@Field(() => Int, { nullable: true })
|
|
42921
|
+
DefaultPageSize?: number;
|
|
42922
|
+
|
|
42923
|
+
@Field(() => Boolean, { nullable: true })
|
|
42924
|
+
SupportsPagination?: boolean;
|
|
42925
|
+
|
|
42926
|
+
@Field({ nullable: true })
|
|
42927
|
+
PaginationType?: string;
|
|
42928
|
+
|
|
42929
|
+
@Field(() => Boolean, { nullable: true })
|
|
42930
|
+
SupportsIncrementalSync?: boolean;
|
|
42931
|
+
|
|
42932
|
+
@Field(() => Boolean, { nullable: true })
|
|
42933
|
+
SupportsWrite?: boolean;
|
|
42934
|
+
|
|
42935
|
+
@Field({ nullable: true })
|
|
42936
|
+
DefaultQueryParams?: string | null;
|
|
42937
|
+
|
|
42938
|
+
@Field({ nullable: true })
|
|
42939
|
+
Configuration?: string | null;
|
|
42940
|
+
|
|
42941
|
+
@Field(() => Int, { nullable: true })
|
|
42942
|
+
Sequence?: number;
|
|
42943
|
+
|
|
42944
|
+
@Field({ nullable: true })
|
|
42945
|
+
Status?: string;
|
|
42946
|
+
|
|
42947
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
42948
|
+
OldValues___?: KeyValuePairInput[];
|
|
42949
|
+
}
|
|
42950
|
+
|
|
42951
|
+
//****************************************************************************
|
|
42952
|
+
// RESOLVER for MJ: Integration Objects
|
|
42953
|
+
//****************************************************************************
|
|
42954
|
+
@ObjectType()
|
|
42955
|
+
export class RunMJIntegrationObjectViewResult {
|
|
42956
|
+
@Field(() => [MJIntegrationObject_])
|
|
42957
|
+
Results: MJIntegrationObject_[];
|
|
42958
|
+
|
|
42959
|
+
@Field(() => String, {nullable: true})
|
|
42960
|
+
UserViewRunID?: string;
|
|
42961
|
+
|
|
42962
|
+
@Field(() => Int, {nullable: true})
|
|
42963
|
+
RowCount: number;
|
|
42964
|
+
|
|
42965
|
+
@Field(() => Int, {nullable: true})
|
|
42966
|
+
TotalRowCount: number;
|
|
42967
|
+
|
|
42968
|
+
@Field(() => Int, {nullable: true})
|
|
42969
|
+
ExecutionTime: number;
|
|
42970
|
+
|
|
42971
|
+
@Field({nullable: true})
|
|
42972
|
+
ErrorMessage?: string;
|
|
42973
|
+
|
|
42974
|
+
@Field(() => Boolean, {nullable: false})
|
|
42975
|
+
Success: boolean;
|
|
42976
|
+
}
|
|
42977
|
+
|
|
42978
|
+
@Resolver(MJIntegrationObject_)
|
|
42979
|
+
export class MJIntegrationObjectResolver extends ResolverBase {
|
|
42980
|
+
@Query(() => RunMJIntegrationObjectViewResult)
|
|
42981
|
+
async RunMJIntegrationObjectViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42982
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42983
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
42984
|
+
}
|
|
42985
|
+
|
|
42986
|
+
@Query(() => RunMJIntegrationObjectViewResult)
|
|
42987
|
+
async RunMJIntegrationObjectViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42988
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42989
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
42990
|
+
}
|
|
42991
|
+
|
|
42992
|
+
@Query(() => RunMJIntegrationObjectViewResult)
|
|
42993
|
+
async RunMJIntegrationObjectDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42994
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42995
|
+
input.EntityName = 'MJ: Integration Objects';
|
|
42996
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
42997
|
+
}
|
|
42998
|
+
@Query(() => MJIntegrationObject_, { nullable: true })
|
|
42999
|
+
async MJIntegrationObject(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJIntegrationObject_ | null> {
|
|
43000
|
+
this.CheckUserReadPermissions('MJ: Integration Objects', userPayload);
|
|
43001
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43002
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjects')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Objects', userPayload, EntityPermissionType.Read, 'AND');
|
|
43003
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
43004
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Integration Objects', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
43005
|
+
return result;
|
|
43006
|
+
}
|
|
43007
|
+
|
|
43008
|
+
@FieldResolver(() => [MJIntegrationObjectField_])
|
|
43009
|
+
async MJIntegrationObjectFields_IntegrationObjectIDArray(@Root() mjintegrationobject_: MJIntegrationObject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43010
|
+
this.CheckUserReadPermissions('MJ: Integration Object Fields', userPayload);
|
|
43011
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43012
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjectFields')} WHERE ${provider.QuoteIdentifier('IntegrationObjectID')}='${mjintegrationobject_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Object Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
43013
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
43014
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Integration Object Fields', rows, this.GetUserFromPayload(userPayload));
|
|
43015
|
+
return result;
|
|
43016
|
+
}
|
|
43017
|
+
|
|
43018
|
+
@FieldResolver(() => [MJIntegrationObjectField_])
|
|
43019
|
+
async MJIntegrationObjectFields_RelatedIntegrationObjectIDArray(@Root() mjintegrationobject_: MJIntegrationObject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43020
|
+
this.CheckUserReadPermissions('MJ: Integration Object Fields', userPayload);
|
|
43021
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43022
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjectFields')} WHERE ${provider.QuoteIdentifier('RelatedIntegrationObjectID')}='${mjintegrationobject_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Object Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
43023
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
43024
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Integration Object Fields', rows, this.GetUserFromPayload(userPayload));
|
|
43025
|
+
return result;
|
|
43026
|
+
}
|
|
43027
|
+
|
|
43028
|
+
@Mutation(() => MJIntegrationObject_)
|
|
43029
|
+
async CreateMJIntegrationObject(
|
|
43030
|
+
@Arg('input', () => CreateMJIntegrationObjectInput) input: CreateMJIntegrationObjectInput,
|
|
43031
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
43032
|
+
@PubSub() pubSub: PubSubEngine
|
|
43033
|
+
) {
|
|
43034
|
+
const provider = GetReadWriteProvider(providers);
|
|
43035
|
+
return this.CreateRecord('MJ: Integration Objects', input, provider, userPayload, pubSub)
|
|
43036
|
+
}
|
|
43037
|
+
|
|
43038
|
+
@Mutation(() => MJIntegrationObject_)
|
|
43039
|
+
async UpdateMJIntegrationObject(
|
|
43040
|
+
@Arg('input', () => UpdateMJIntegrationObjectInput) input: UpdateMJIntegrationObjectInput,
|
|
43041
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
43042
|
+
@PubSub() pubSub: PubSubEngine
|
|
43043
|
+
) {
|
|
43044
|
+
const provider = GetReadWriteProvider(providers);
|
|
43045
|
+
return this.UpdateRecord('MJ: Integration Objects', input, provider, userPayload, pubSub);
|
|
43046
|
+
}
|
|
43047
|
+
|
|
43048
|
+
@Mutation(() => MJIntegrationObject_)
|
|
43049
|
+
async DeleteMJIntegrationObject(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43050
|
+
const provider = GetReadWriteProvider(providers);
|
|
43051
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
43052
|
+
return this.DeleteRecord('MJ: Integration Objects', key, options, provider, userPayload, pubSub);
|
|
43053
|
+
}
|
|
43054
|
+
|
|
43055
|
+
}
|
|
43056
|
+
|
|
43057
|
+
//****************************************************************************
|
|
43058
|
+
// ENTITY CLASS for MJ: Integration Source Types
|
|
43059
|
+
//****************************************************************************
|
|
43060
|
+
@ObjectType({ description: `Defines categories of integration sources such as SaaS API, Relational Database, or File Feed.` })
|
|
43061
|
+
export class MJIntegrationSourceType_ {
|
|
43062
|
+
@Field()
|
|
43063
|
+
@MaxLength(36)
|
|
43064
|
+
ID: string;
|
|
43065
|
+
|
|
43066
|
+
@Field({description: `Display name for this source type (e.g. SaaS API, Relational Database, File Feed).`})
|
|
43067
|
+
@MaxLength(200)
|
|
43068
|
+
Name: string;
|
|
43069
|
+
|
|
43070
|
+
@Field({nullable: true, description: `Optional longer description of this source type.`})
|
|
43071
|
+
Description?: string;
|
|
43072
|
+
|
|
43073
|
+
@Field({description: `Fully-qualified class name registered via @RegisterClass that implements BaseIntegrationConnector for this source type.`})
|
|
43074
|
+
@MaxLength(500)
|
|
43075
|
+
DriverClass: string;
|
|
43076
|
+
|
|
43077
|
+
@Field({nullable: true, description: `Font Awesome icon class for UI display.`})
|
|
43078
|
+
@MaxLength(200)
|
|
43079
|
+
IconClass?: string;
|
|
43080
|
+
|
|
43081
|
+
@Field({description: `Whether this source type is available for use. Active or Inactive.`})
|
|
43082
|
+
@MaxLength(50)
|
|
43083
|
+
Status: string;
|
|
43084
|
+
|
|
43085
|
+
@Field()
|
|
43086
|
+
_mj__CreatedAt: Date;
|
|
43087
|
+
|
|
43088
|
+
@Field()
|
|
43089
|
+
_mj__UpdatedAt: Date;
|
|
43090
|
+
|
|
43091
|
+
@Field(() => [MJCompanyIntegration_])
|
|
43092
|
+
MJCompanyIntegrations_SourceTypeIDArray: MJCompanyIntegration_[]; // Link to MJCompanyIntegrations
|
|
43093
|
+
|
|
43094
|
+
}
|
|
43095
|
+
|
|
43096
|
+
//****************************************************************************
|
|
43097
|
+
// INPUT TYPE for MJ: Integration Source Types
|
|
43098
|
+
//****************************************************************************
|
|
43099
|
+
@InputType()
|
|
43100
|
+
export class CreateMJIntegrationSourceTypeInput {
|
|
43101
|
+
@Field({ nullable: true })
|
|
43102
|
+
ID?: string;
|
|
43103
|
+
|
|
43104
|
+
@Field({ nullable: true })
|
|
43105
|
+
Name?: string;
|
|
43106
|
+
|
|
43107
|
+
@Field({ nullable: true })
|
|
43108
|
+
Description: string | null;
|
|
43109
|
+
|
|
43110
|
+
@Field({ nullable: true })
|
|
43111
|
+
DriverClass?: string;
|
|
43112
|
+
|
|
43113
|
+
@Field({ nullable: true })
|
|
43114
|
+
IconClass: string | null;
|
|
43115
|
+
|
|
43116
|
+
@Field({ nullable: true })
|
|
43117
|
+
Status?: string;
|
|
43118
|
+
}
|
|
43119
|
+
|
|
43120
|
+
|
|
43121
|
+
//****************************************************************************
|
|
43122
|
+
// INPUT TYPE for MJ: Integration Source Types
|
|
43123
|
+
//****************************************************************************
|
|
43124
|
+
@InputType()
|
|
43125
|
+
export class UpdateMJIntegrationSourceTypeInput {
|
|
43126
|
+
@Field()
|
|
43127
|
+
ID: string;
|
|
43128
|
+
|
|
43129
|
+
@Field({ nullable: true })
|
|
43130
|
+
Name?: string;
|
|
43131
|
+
|
|
43132
|
+
@Field({ nullable: true })
|
|
43133
|
+
Description?: string | null;
|
|
43134
|
+
|
|
43135
|
+
@Field({ nullable: true })
|
|
43136
|
+
DriverClass?: string;
|
|
43137
|
+
|
|
43138
|
+
@Field({ nullable: true })
|
|
43139
|
+
IconClass?: string | null;
|
|
43140
|
+
|
|
43141
|
+
@Field({ nullable: true })
|
|
43142
|
+
Status?: string;
|
|
43143
|
+
|
|
43144
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
43145
|
+
OldValues___?: KeyValuePairInput[];
|
|
43146
|
+
}
|
|
43147
|
+
|
|
43148
|
+
//****************************************************************************
|
|
43149
|
+
// RESOLVER for MJ: Integration Source Types
|
|
43150
|
+
//****************************************************************************
|
|
43151
|
+
@ObjectType()
|
|
43152
|
+
export class RunMJIntegrationSourceTypeViewResult {
|
|
43153
|
+
@Field(() => [MJIntegrationSourceType_])
|
|
43154
|
+
Results: MJIntegrationSourceType_[];
|
|
43155
|
+
|
|
43156
|
+
@Field(() => String, {nullable: true})
|
|
43157
|
+
UserViewRunID?: string;
|
|
43158
|
+
|
|
43159
|
+
@Field(() => Int, {nullable: true})
|
|
43160
|
+
RowCount: number;
|
|
43161
|
+
|
|
43162
|
+
@Field(() => Int, {nullable: true})
|
|
43163
|
+
TotalRowCount: number;
|
|
43164
|
+
|
|
43165
|
+
@Field(() => Int, {nullable: true})
|
|
43166
|
+
ExecutionTime: number;
|
|
43167
|
+
|
|
43168
|
+
@Field({nullable: true})
|
|
43169
|
+
ErrorMessage?: string;
|
|
43170
|
+
|
|
43171
|
+
@Field(() => Boolean, {nullable: false})
|
|
43172
|
+
Success: boolean;
|
|
43173
|
+
}
|
|
43174
|
+
|
|
43175
|
+
@Resolver(MJIntegrationSourceType_)
|
|
43176
|
+
export class MJIntegrationSourceTypeResolver extends ResolverBase {
|
|
43177
|
+
@Query(() => RunMJIntegrationSourceTypeViewResult)
|
|
43178
|
+
async RunMJIntegrationSourceTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43179
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43180
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
43181
|
+
}
|
|
43182
|
+
|
|
43183
|
+
@Query(() => RunMJIntegrationSourceTypeViewResult)
|
|
43184
|
+
async RunMJIntegrationSourceTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43185
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43186
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
43187
|
+
}
|
|
43188
|
+
|
|
43189
|
+
@Query(() => RunMJIntegrationSourceTypeViewResult)
|
|
43190
|
+
async RunMJIntegrationSourceTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43191
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43192
|
+
input.EntityName = 'MJ: Integration Source Types';
|
|
43193
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
43194
|
+
}
|
|
43195
|
+
@Query(() => MJIntegrationSourceType_, { nullable: true })
|
|
43196
|
+
async MJIntegrationSourceType(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJIntegrationSourceType_ | null> {
|
|
43197
|
+
this.CheckUserReadPermissions('MJ: Integration Source Types', userPayload);
|
|
43198
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43199
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationSourceTypes')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Source Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
43200
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
43201
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Integration Source Types', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
43202
|
+
return result;
|
|
43203
|
+
}
|
|
43204
|
+
|
|
43205
|
+
@FieldResolver(() => [MJCompanyIntegration_])
|
|
43206
|
+
async MJCompanyIntegrations_SourceTypeIDArray(@Root() mjintegrationsourcetype_: MJIntegrationSourceType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43207
|
+
this.CheckUserReadPermissions('MJ: Company Integrations', userPayload);
|
|
43208
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43209
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCompanyIntegrations')} WHERE ${provider.QuoteIdentifier('SourceTypeID')}='${mjintegrationsourcetype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
43210
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
43211
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integrations', rows, this.GetUserFromPayload(userPayload));
|
|
43212
|
+
return result;
|
|
43213
|
+
}
|
|
43214
|
+
|
|
43215
|
+
@Mutation(() => MJIntegrationSourceType_)
|
|
43216
|
+
async CreateMJIntegrationSourceType(
|
|
43217
|
+
@Arg('input', () => CreateMJIntegrationSourceTypeInput) input: CreateMJIntegrationSourceTypeInput,
|
|
43218
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
43219
|
+
@PubSub() pubSub: PubSubEngine
|
|
43220
|
+
) {
|
|
43221
|
+
const provider = GetReadWriteProvider(providers);
|
|
43222
|
+
return this.CreateRecord('MJ: Integration Source Types', input, provider, userPayload, pubSub)
|
|
43223
|
+
}
|
|
43224
|
+
|
|
43225
|
+
@Mutation(() => MJIntegrationSourceType_)
|
|
43226
|
+
async UpdateMJIntegrationSourceType(
|
|
43227
|
+
@Arg('input', () => UpdateMJIntegrationSourceTypeInput) input: UpdateMJIntegrationSourceTypeInput,
|
|
43228
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
43229
|
+
@PubSub() pubSub: PubSubEngine
|
|
43230
|
+
) {
|
|
43231
|
+
const provider = GetReadWriteProvider(providers);
|
|
43232
|
+
return this.UpdateRecord('MJ: Integration Source Types', input, provider, userPayload, pubSub);
|
|
43233
|
+
}
|
|
43234
|
+
|
|
43235
|
+
@Mutation(() => MJIntegrationSourceType_)
|
|
43236
|
+
async DeleteMJIntegrationSourceType(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43237
|
+
const provider = GetReadWriteProvider(providers);
|
|
43238
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
43239
|
+
return this.DeleteRecord('MJ: Integration Source Types', key, options, provider, userPayload, pubSub);
|
|
43240
|
+
}
|
|
43241
|
+
|
|
43242
|
+
}
|
|
43243
|
+
|
|
41432
43244
|
//****************************************************************************
|
|
41433
43245
|
// ENTITY CLASS for MJ: Integration URL Formats
|
|
41434
43246
|
//****************************************************************************
|
|
@@ -41656,6 +43468,14 @@ export class MJIntegration_ {
|
|
|
41656
43468
|
@MaxLength(36)
|
|
41657
43469
|
ID: string;
|
|
41658
43470
|
|
|
43471
|
+
@Field({nullable: true, description: `Optional link to the credential type required by this integration. Used by the UI to pre-select the credential type when creating new credentials and to filter existing credentials.`})
|
|
43472
|
+
@MaxLength(36)
|
|
43473
|
+
CredentialTypeID?: string;
|
|
43474
|
+
|
|
43475
|
+
@Field({nullable: true})
|
|
43476
|
+
@MaxLength(100)
|
|
43477
|
+
CredentialType?: string;
|
|
43478
|
+
|
|
41659
43479
|
@Field(() => [MJIntegrationURLFormat_])
|
|
41660
43480
|
MJIntegrationURLFormats_IntegrationIDArray: MJIntegrationURLFormat_[]; // Link to MJIntegrationURLFormats
|
|
41661
43481
|
|
|
@@ -41665,6 +43485,9 @@ export class MJIntegration_ {
|
|
|
41665
43485
|
@Field(() => [MJRecordChange_])
|
|
41666
43486
|
MJRecordChanges_IntegrationIDArray: MJRecordChange_[]; // Link to MJRecordChanges
|
|
41667
43487
|
|
|
43488
|
+
@Field(() => [MJIntegrationObject_])
|
|
43489
|
+
MJIntegrationObjects_IntegrationIDArray: MJIntegrationObject_[]; // Link to MJIntegrationObjects
|
|
43490
|
+
|
|
41668
43491
|
}
|
|
41669
43492
|
|
|
41670
43493
|
//****************************************************************************
|
|
@@ -41695,6 +43518,9 @@ export class CreateMJIntegrationInput {
|
|
|
41695
43518
|
|
|
41696
43519
|
@Field({ nullable: true })
|
|
41697
43520
|
ID?: string;
|
|
43521
|
+
|
|
43522
|
+
@Field({ nullable: true })
|
|
43523
|
+
CredentialTypeID: string | null;
|
|
41698
43524
|
}
|
|
41699
43525
|
|
|
41700
43526
|
|
|
@@ -41727,6 +43553,9 @@ export class UpdateMJIntegrationInput {
|
|
|
41727
43553
|
@Field()
|
|
41728
43554
|
ID: string;
|
|
41729
43555
|
|
|
43556
|
+
@Field({ nullable: true })
|
|
43557
|
+
CredentialTypeID?: string | null;
|
|
43558
|
+
|
|
41730
43559
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
41731
43560
|
OldValues___?: KeyValuePairInput[];
|
|
41732
43561
|
}
|
|
@@ -41828,6 +43657,16 @@ export class MJIntegrationResolver extends ResolverBase {
|
|
|
41828
43657
|
return result;
|
|
41829
43658
|
}
|
|
41830
43659
|
|
|
43660
|
+
@FieldResolver(() => [MJIntegrationObject_])
|
|
43661
|
+
async MJIntegrationObjects_IntegrationIDArray(@Root() mjintegration_: MJIntegration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43662
|
+
this.CheckUserReadPermissions('MJ: Integration Objects', userPayload);
|
|
43663
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43664
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwIntegrationObjects')} WHERE ${provider.QuoteIdentifier('IntegrationID')}='${mjintegration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Integration Objects', userPayload, EntityPermissionType.Read, 'AND');
|
|
43665
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
43666
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Integration Objects', rows, this.GetUserFromPayload(userPayload));
|
|
43667
|
+
return result;
|
|
43668
|
+
}
|
|
43669
|
+
|
|
41831
43670
|
@Mutation(() => MJIntegration_)
|
|
41832
43671
|
async CreateMJIntegration(
|
|
41833
43672
|
@Arg('input', () => CreateMJIntegrationInput) input: CreateMJIntegrationInput,
|
|
@@ -43691,12 +45530,12 @@ export class MJMCPServerConnection_ {
|
|
|
43691
45530
|
@Field(() => [MJMCPToolExecutionLog_])
|
|
43692
45531
|
MJMCPToolExecutionLogs_MCPServerConnectionIDArray: MJMCPToolExecutionLog_[]; // Link to MJMCPToolExecutionLogs
|
|
43693
45532
|
|
|
43694
|
-
@Field(() => [MJOAuthClientRegistration_])
|
|
43695
|
-
MJOAuthClientRegistrations_MCPServerConnectionIDArray: MJOAuthClientRegistration_[]; // Link to MJOAuthClientRegistrations
|
|
43696
|
-
|
|
43697
45533
|
@Field(() => [MJOAuthToken_])
|
|
43698
45534
|
MJOAuthTokens_MCPServerConnectionIDArray: MJOAuthToken_[]; // Link to MJOAuthTokens
|
|
43699
45535
|
|
|
45536
|
+
@Field(() => [MJOAuthClientRegistration_])
|
|
45537
|
+
MJOAuthClientRegistrations_MCPServerConnectionIDArray: MJOAuthClientRegistration_[]; // Link to MJOAuthClientRegistrations
|
|
45538
|
+
|
|
43700
45539
|
@Field(() => [MJOAuthAuthorizationState_])
|
|
43701
45540
|
MJOAuthAuthorizationStates_MCPServerConnectionIDArray: MJOAuthAuthorizationState_[]; // Link to MJOAuthAuthorizationStates
|
|
43702
45541
|
|
|
@@ -43900,16 +45739,6 @@ export class MJMCPServerConnectionResolver extends ResolverBase {
|
|
|
43900
45739
|
return result;
|
|
43901
45740
|
}
|
|
43902
45741
|
|
|
43903
|
-
@FieldResolver(() => [MJOAuthClientRegistration_])
|
|
43904
|
-
async MJOAuthClientRegistrations_MCPServerConnectionIDArray(@Root() mjmcpserverconnection_: MJMCPServerConnection_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43905
|
-
this.CheckUserReadPermissions('MJ: O Auth Client Registrations', userPayload);
|
|
43906
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43907
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOAuthClientRegistrations')} WHERE ${provider.QuoteIdentifier('MCPServerConnectionID')}='${mjmcpserverconnection_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: O Auth Client Registrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
43908
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
43909
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: O Auth Client Registrations', rows, this.GetUserFromPayload(userPayload));
|
|
43910
|
-
return result;
|
|
43911
|
-
}
|
|
43912
|
-
|
|
43913
45742
|
@FieldResolver(() => [MJOAuthToken_])
|
|
43914
45743
|
async MJOAuthTokens_MCPServerConnectionIDArray(@Root() mjmcpserverconnection_: MJMCPServerConnection_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43915
45744
|
this.CheckUserReadPermissions('MJ: O Auth Tokens', userPayload);
|
|
@@ -43920,6 +45749,16 @@ export class MJMCPServerConnectionResolver extends ResolverBase {
|
|
|
43920
45749
|
return result;
|
|
43921
45750
|
}
|
|
43922
45751
|
|
|
45752
|
+
@FieldResolver(() => [MJOAuthClientRegistration_])
|
|
45753
|
+
async MJOAuthClientRegistrations_MCPServerConnectionIDArray(@Root() mjmcpserverconnection_: MJMCPServerConnection_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45754
|
+
this.CheckUserReadPermissions('MJ: O Auth Client Registrations', userPayload);
|
|
45755
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45756
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOAuthClientRegistrations')} WHERE ${provider.QuoteIdentifier('MCPServerConnectionID')}='${mjmcpserverconnection_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: O Auth Client Registrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
45757
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
45758
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: O Auth Client Registrations', rows, this.GetUserFromPayload(userPayload));
|
|
45759
|
+
return result;
|
|
45760
|
+
}
|
|
45761
|
+
|
|
43923
45762
|
@FieldResolver(() => [MJOAuthAuthorizationState_])
|
|
43924
45763
|
async MJOAuthAuthorizationStates_MCPServerConnectionIDArray(@Root() mjmcpserverconnection_: MJMCPServerConnection_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43925
45764
|
this.CheckUserReadPermissions('MJ: O Auth Authorization States', userPayload);
|
|
@@ -44346,12 +46185,12 @@ export class MJMCPServer_ {
|
|
|
44346
46185
|
@Field(() => [MJOAuthClientRegistration_])
|
|
44347
46186
|
MJOAuthClientRegistrations_MCPServerIDArray: MJOAuthClientRegistration_[]; // Link to MJOAuthClientRegistrations
|
|
44348
46187
|
|
|
44349
|
-
@Field(() => [MJMCPServerTool_])
|
|
44350
|
-
MJMCPServerTools_MCPServerIDArray: MJMCPServerTool_[]; // Link to MJMCPServerTools
|
|
44351
|
-
|
|
44352
46188
|
@Field(() => [MJMCPServerConnection_])
|
|
44353
46189
|
MJMCPServerConnections_MCPServerIDArray: MJMCPServerConnection_[]; // Link to MJMCPServerConnections
|
|
44354
46190
|
|
|
46191
|
+
@Field(() => [MJMCPServerTool_])
|
|
46192
|
+
MJMCPServerTools_MCPServerIDArray: MJMCPServerTool_[]; // Link to MJMCPServerTools
|
|
46193
|
+
|
|
44355
46194
|
}
|
|
44356
46195
|
|
|
44357
46196
|
//****************************************************************************
|
|
@@ -44575,16 +46414,6 @@ export class MJMCPServerResolver extends ResolverBase {
|
|
|
44575
46414
|
return result;
|
|
44576
46415
|
}
|
|
44577
46416
|
|
|
44578
|
-
@FieldResolver(() => [MJMCPServerTool_])
|
|
44579
|
-
async MJMCPServerTools_MCPServerIDArray(@Root() mjmcpserver_: MJMCPServer_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44580
|
-
this.CheckUserReadPermissions('MJ: MCP Server Tools', userPayload);
|
|
44581
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44582
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMCPServerTools')} WHERE ${provider.QuoteIdentifier('MCPServerID')}='${mjmcpserver_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: MCP Server Tools', userPayload, EntityPermissionType.Read, 'AND');
|
|
44583
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
44584
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Server Tools', rows, this.GetUserFromPayload(userPayload));
|
|
44585
|
-
return result;
|
|
44586
|
-
}
|
|
44587
|
-
|
|
44588
46417
|
@FieldResolver(() => [MJMCPServerConnection_])
|
|
44589
46418
|
async MJMCPServerConnections_MCPServerIDArray(@Root() mjmcpserver_: MJMCPServer_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44590
46419
|
this.CheckUserReadPermissions('MJ: MCP Server Connections', userPayload);
|
|
@@ -44595,6 +46424,16 @@ export class MJMCPServerResolver extends ResolverBase {
|
|
|
44595
46424
|
return result;
|
|
44596
46425
|
}
|
|
44597
46426
|
|
|
46427
|
+
@FieldResolver(() => [MJMCPServerTool_])
|
|
46428
|
+
async MJMCPServerTools_MCPServerIDArray(@Root() mjmcpserver_: MJMCPServer_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46429
|
+
this.CheckUserReadPermissions('MJ: MCP Server Tools', userPayload);
|
|
46430
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46431
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMCPServerTools')} WHERE ${provider.QuoteIdentifier('MCPServerID')}='${mjmcpserver_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: MCP Server Tools', userPayload, EntityPermissionType.Read, 'AND');
|
|
46432
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
46433
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Server Tools', rows, this.GetUserFromPayload(userPayload));
|
|
46434
|
+
return result;
|
|
46435
|
+
}
|
|
46436
|
+
|
|
44598
46437
|
@Mutation(() => MJMCPServer_)
|
|
44599
46438
|
async CreateMJMCPServer(
|
|
44600
46439
|
@Arg('input', () => CreateMJMCPServerInput) input: CreateMJMCPServerInput,
|
|
@@ -46427,10 +48266,10 @@ export class MJOpenApp_ {
|
|
|
46427
48266
|
InstalledByUser: string;
|
|
46428
48267
|
|
|
46429
48268
|
@Field(() => [MJOpenAppDependency_])
|
|
46430
|
-
|
|
48269
|
+
MJOpenAppDependencies_DependsOnAppIDArray: MJOpenAppDependency_[]; // Link to MJOpenAppDependencies
|
|
46431
48270
|
|
|
46432
48271
|
@Field(() => [MJOpenAppDependency_])
|
|
46433
|
-
|
|
48272
|
+
MJOpenAppDependencies_OpenAppIDArray: MJOpenAppDependency_[]; // Link to MJOpenAppDependencies
|
|
46434
48273
|
|
|
46435
48274
|
@Field(() => [MJOpenAppInstallHistory_])
|
|
46436
48275
|
MJOpenAppInstallHistories_OpenAppIDArray: MJOpenAppInstallHistory_[]; // Link to MJOpenAppInstallHistories
|
|
@@ -46619,20 +48458,20 @@ export class MJOpenAppResolver extends ResolverBase {
|
|
|
46619
48458
|
}
|
|
46620
48459
|
|
|
46621
48460
|
@FieldResolver(() => [MJOpenAppDependency_])
|
|
46622
|
-
async
|
|
48461
|
+
async MJOpenAppDependencies_DependsOnAppIDArray(@Root() mjopenapp_: MJOpenApp_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46623
48462
|
this.CheckUserReadPermissions('MJ: Open App Dependencies', userPayload);
|
|
46624
48463
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46625
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenAppDependencies')} WHERE ${provider.QuoteIdentifier('
|
|
48464
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenAppDependencies')} WHERE ${provider.QuoteIdentifier('DependsOnAppID')}='${mjopenapp_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Open App Dependencies', userPayload, EntityPermissionType.Read, 'AND');
|
|
46626
48465
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
46627
48466
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open App Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
46628
48467
|
return result;
|
|
46629
48468
|
}
|
|
46630
48469
|
|
|
46631
48470
|
@FieldResolver(() => [MJOpenAppDependency_])
|
|
46632
|
-
async
|
|
48471
|
+
async MJOpenAppDependencies_OpenAppIDArray(@Root() mjopenapp_: MJOpenApp_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46633
48472
|
this.CheckUserReadPermissions('MJ: Open App Dependencies', userPayload);
|
|
46634
48473
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46635
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenAppDependencies')} WHERE ${provider.QuoteIdentifier('
|
|
48474
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenAppDependencies')} WHERE ${provider.QuoteIdentifier('OpenAppID')}='${mjopenapp_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Open App Dependencies', userPayload, EntityPermissionType.Read, 'AND');
|
|
46636
48475
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
46637
48476
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open App Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
46638
48477
|
return result;
|
|
@@ -53764,6 +55603,15 @@ export class MJRowLevelSecurityFilter_ {
|
|
|
53764
55603
|
@Field()
|
|
53765
55604
|
_mj__UpdatedAt: Date;
|
|
53766
55605
|
|
|
55606
|
+
@Field(() => [MJEntityPermission_])
|
|
55607
|
+
MJEntityPermissions_DeleteRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
55608
|
+
|
|
55609
|
+
@Field(() => [MJEntityPermission_])
|
|
55610
|
+
MJEntityPermissions_ReadRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
55611
|
+
|
|
55612
|
+
@Field(() => [MJEntityPermission_])
|
|
55613
|
+
MJEntityPermissions_CreateRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
55614
|
+
|
|
53767
55615
|
@Field(() => [MJEntityPermission_])
|
|
53768
55616
|
MJEntityPermissions_UpdateRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
53769
55617
|
|
|
@@ -53876,6 +55724,36 @@ export class MJRowLevelSecurityFilterResolver extends ResolverBase {
|
|
|
53876
55724
|
return result;
|
|
53877
55725
|
}
|
|
53878
55726
|
|
|
55727
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
55728
|
+
async MJEntityPermissions_DeleteRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
55729
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
55730
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
55731
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('DeleteRLSFilterID')}='${mjrowlevelsecurityfilter_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
55732
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
55733
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
55734
|
+
return result;
|
|
55735
|
+
}
|
|
55736
|
+
|
|
55737
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
55738
|
+
async MJEntityPermissions_ReadRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
55739
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
55740
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
55741
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('ReadRLSFilterID')}='${mjrowlevelsecurityfilter_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
55742
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
55743
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
55744
|
+
return result;
|
|
55745
|
+
}
|
|
55746
|
+
|
|
55747
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
55748
|
+
async MJEntityPermissions_CreateRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
55749
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
55750
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
55751
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityPermissions')} WHERE ${provider.QuoteIdentifier('CreateRLSFilterID')}='${mjrowlevelsecurityfilter_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
55752
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
55753
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
55754
|
+
return result;
|
|
55755
|
+
}
|
|
55756
|
+
|
|
53879
55757
|
@FieldResolver(() => [MJEntityPermission_])
|
|
53880
55758
|
async MJEntityPermissions_UpdateRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53881
55759
|
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
@@ -56569,10 +58447,10 @@ export class MJTask_ {
|
|
|
56569
58447
|
RootParentID?: string;
|
|
56570
58448
|
|
|
56571
58449
|
@Field(() => [MJTaskDependency_])
|
|
56572
|
-
|
|
58450
|
+
MJTaskDependencies_TaskIDArray: MJTaskDependency_[]; // Link to MJTaskDependencies
|
|
56573
58451
|
|
|
56574
58452
|
@Field(() => [MJTaskDependency_])
|
|
56575
|
-
|
|
58453
|
+
MJTaskDependencies_DependsOnTaskIDArray: MJTaskDependency_[]; // Link to MJTaskDependencies
|
|
56576
58454
|
|
|
56577
58455
|
@Field(() => [MJTask_])
|
|
56578
58456
|
MJTasks_ParentIDArray: MJTask_[]; // Link to MJTasks
|
|
@@ -56743,20 +58621,20 @@ export class MJTaskResolver extends ResolverBase {
|
|
|
56743
58621
|
}
|
|
56744
58622
|
|
|
56745
58623
|
@FieldResolver(() => [MJTaskDependency_])
|
|
56746
|
-
async
|
|
58624
|
+
async MJTaskDependencies_TaskIDArray(@Root() mjtask_: MJTask_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56747
58625
|
this.CheckUserReadPermissions('MJ: Task Dependencies', userPayload);
|
|
56748
58626
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56749
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTaskDependencies')} WHERE ${provider.QuoteIdentifier('
|
|
58627
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTaskDependencies')} WHERE ${provider.QuoteIdentifier('TaskID')}='${mjtask_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Task Dependencies', userPayload, EntityPermissionType.Read, 'AND');
|
|
56750
58628
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
56751
58629
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Task Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
56752
58630
|
return result;
|
|
56753
58631
|
}
|
|
56754
58632
|
|
|
56755
58633
|
@FieldResolver(() => [MJTaskDependency_])
|
|
56756
|
-
async
|
|
58634
|
+
async MJTaskDependencies_DependsOnTaskIDArray(@Root() mjtask_: MJTask_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56757
58635
|
this.CheckUserReadPermissions('MJ: Task Dependencies', userPayload);
|
|
56758
58636
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56759
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTaskDependencies')} WHERE ${provider.QuoteIdentifier('
|
|
58637
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTaskDependencies')} WHERE ${provider.QuoteIdentifier('DependsOnTaskID')}='${mjtask_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Task Dependencies', userPayload, EntityPermissionType.Read, 'AND');
|
|
56760
58638
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
56761
58639
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Task Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
56762
58640
|
return result;
|
|
@@ -57682,13 +59560,13 @@ export class MJTemplate_ {
|
|
|
57682
59560
|
MJTemplateContents_TemplateIDArray: MJTemplateContent_[]; // Link to MJTemplateContents
|
|
57683
59561
|
|
|
57684
59562
|
@Field(() => [MJUserNotificationType_])
|
|
57685
|
-
|
|
59563
|
+
MJUserNotificationTypes_EmailTemplateIDArray: MJUserNotificationType_[]; // Link to MJUserNotificationTypes
|
|
57686
59564
|
|
|
57687
59565
|
@Field(() => [MJAIPrompt_])
|
|
57688
59566
|
MJAIPrompts_TemplateIDArray: MJAIPrompt_[]; // Link to MJAIPrompts
|
|
57689
59567
|
|
|
57690
59568
|
@Field(() => [MJUserNotificationType_])
|
|
57691
|
-
|
|
59569
|
+
MJUserNotificationTypes_SMSTemplateIDArray: MJUserNotificationType_[]; // Link to MJUserNotificationTypes
|
|
57692
59570
|
|
|
57693
59571
|
@Field(() => [MJEntityDocument_])
|
|
57694
59572
|
MJEntityDocuments_TemplateIDArray: MJEntityDocument_[]; // Link to MJEntityDocuments
|
|
@@ -57843,10 +59721,10 @@ export class MJTemplateResolver extends ResolverBase {
|
|
|
57843
59721
|
}
|
|
57844
59722
|
|
|
57845
59723
|
@FieldResolver(() => [MJUserNotificationType_])
|
|
57846
|
-
async
|
|
59724
|
+
async MJUserNotificationTypes_EmailTemplateIDArray(@Root() mjtemplate_: MJTemplate_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
57847
59725
|
this.CheckUserReadPermissions('MJ: User Notification Types', userPayload);
|
|
57848
59726
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57849
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserNotificationTypes')} WHERE ${provider.QuoteIdentifier('
|
|
59727
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserNotificationTypes')} WHERE ${provider.QuoteIdentifier('EmailTemplateID')}='${mjtemplate_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Notification Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
57850
59728
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
57851
59729
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Notification Types', rows, this.GetUserFromPayload(userPayload));
|
|
57852
59730
|
return result;
|
|
@@ -57863,10 +59741,10 @@ export class MJTemplateResolver extends ResolverBase {
|
|
|
57863
59741
|
}
|
|
57864
59742
|
|
|
57865
59743
|
@FieldResolver(() => [MJUserNotificationType_])
|
|
57866
|
-
async
|
|
59744
|
+
async MJUserNotificationTypes_SMSTemplateIDArray(@Root() mjtemplate_: MJTemplate_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
57867
59745
|
this.CheckUserReadPermissions('MJ: User Notification Types', userPayload);
|
|
57868
59746
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57869
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserNotificationTypes')} WHERE ${provider.QuoteIdentifier('
|
|
59747
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserNotificationTypes')} WHERE ${provider.QuoteIdentifier('SMSTemplateID')}='${mjtemplate_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Notification Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
57870
59748
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
57871
59749
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Notification Types', rows, this.GetUserFromPayload(userPayload));
|
|
57872
59750
|
return result;
|
|
@@ -59832,12 +61710,12 @@ export class MJTestSuite_ {
|
|
|
59832
61710
|
@Field(() => [MJTestSuite_])
|
|
59833
61711
|
MJTestSuites_ParentIDArray: MJTestSuite_[]; // Link to MJTestSuites
|
|
59834
61712
|
|
|
59835
|
-
@Field(() => [MJTestSuiteTest_])
|
|
59836
|
-
MJTestSuiteTests_SuiteIDArray: MJTestSuiteTest_[]; // Link to MJTestSuiteTests
|
|
59837
|
-
|
|
59838
61713
|
@Field(() => [MJTestSuiteRun_])
|
|
59839
61714
|
MJTestSuiteRuns_SuiteIDArray: MJTestSuiteRun_[]; // Link to MJTestSuiteRuns
|
|
59840
61715
|
|
|
61716
|
+
@Field(() => [MJTestSuiteTest_])
|
|
61717
|
+
MJTestSuiteTests_SuiteIDArray: MJTestSuiteTest_[]; // Link to MJTestSuiteTests
|
|
61718
|
+
|
|
59841
61719
|
}
|
|
59842
61720
|
|
|
59843
61721
|
//****************************************************************************
|
|
@@ -59977,16 +61855,6 @@ export class MJTestSuiteResolver extends ResolverBase {
|
|
|
59977
61855
|
return result;
|
|
59978
61856
|
}
|
|
59979
61857
|
|
|
59980
|
-
@FieldResolver(() => [MJTestSuiteTest_])
|
|
59981
|
-
async MJTestSuiteTests_SuiteIDArray(@Root() mjtestsuite_: MJTestSuite_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
59982
|
-
this.CheckUserReadPermissions('MJ: Test Suite Tests', userPayload);
|
|
59983
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
59984
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTestSuiteTests')} WHERE ${provider.QuoteIdentifier('SuiteID')}='${mjtestsuite_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suite Tests', userPayload, EntityPermissionType.Read, 'AND');
|
|
59985
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
59986
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Suite Tests', rows, this.GetUserFromPayload(userPayload));
|
|
59987
|
-
return result;
|
|
59988
|
-
}
|
|
59989
|
-
|
|
59990
61858
|
@FieldResolver(() => [MJTestSuiteRun_])
|
|
59991
61859
|
async MJTestSuiteRuns_SuiteIDArray(@Root() mjtestsuite_: MJTestSuite_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
59992
61860
|
this.CheckUserReadPermissions('MJ: Test Suite Runs', userPayload);
|
|
@@ -59997,6 +61865,16 @@ export class MJTestSuiteResolver extends ResolverBase {
|
|
|
59997
61865
|
return result;
|
|
59998
61866
|
}
|
|
59999
61867
|
|
|
61868
|
+
@FieldResolver(() => [MJTestSuiteTest_])
|
|
61869
|
+
async MJTestSuiteTests_SuiteIDArray(@Root() mjtestsuite_: MJTestSuite_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61870
|
+
this.CheckUserReadPermissions('MJ: Test Suite Tests', userPayload);
|
|
61871
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61872
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTestSuiteTests')} WHERE ${provider.QuoteIdentifier('SuiteID')}='${mjtestsuite_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suite Tests', userPayload, EntityPermissionType.Read, 'AND');
|
|
61873
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61874
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Suite Tests', rows, this.GetUserFromPayload(userPayload));
|
|
61875
|
+
return result;
|
|
61876
|
+
}
|
|
61877
|
+
|
|
60000
61878
|
@Mutation(() => MJTestSuite_)
|
|
60001
61879
|
async CreateMJTestSuite(
|
|
60002
61880
|
@Arg('input', () => CreateMJTestSuiteInput) input: CreateMJTestSuiteInput,
|
|
@@ -60059,12 +61937,12 @@ export class MJTestType_ {
|
|
|
60059
61937
|
@Field({nullable: true, description: `JSON schema defining the variables available for tests of this type. Contains schemaVersion and array of variable definitions with name, displayName, description, dataType, valueSource, possibleValues, defaultValue, and required fields.`})
|
|
60060
61938
|
VariablesSchema?: string;
|
|
60061
61939
|
|
|
60062
|
-
@Field(() => [MJTestRubric_])
|
|
60063
|
-
MJTestRubrics_TypeIDArray: MJTestRubric_[]; // Link to MJTestRubrics
|
|
60064
|
-
|
|
60065
61940
|
@Field(() => [MJTest_])
|
|
60066
61941
|
MJTests_TypeIDArray: MJTest_[]; // Link to MJTests
|
|
60067
61942
|
|
|
61943
|
+
@Field(() => [MJTestRubric_])
|
|
61944
|
+
MJTestRubrics_TypeIDArray: MJTestRubric_[]; // Link to MJTestRubrics
|
|
61945
|
+
|
|
60068
61946
|
}
|
|
60069
61947
|
|
|
60070
61948
|
//****************************************************************************
|
|
@@ -60176,16 +62054,6 @@ export class MJTestTypeResolver extends ResolverBase {
|
|
|
60176
62054
|
return result;
|
|
60177
62055
|
}
|
|
60178
62056
|
|
|
60179
|
-
@FieldResolver(() => [MJTestRubric_])
|
|
60180
|
-
async MJTestRubrics_TypeIDArray(@Root() mjtesttype_: MJTestType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
60181
|
-
this.CheckUserReadPermissions('MJ: Test Rubrics', userPayload);
|
|
60182
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
60183
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTestRubrics')} WHERE ${provider.QuoteIdentifier('TypeID')}='${mjtesttype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Rubrics', userPayload, EntityPermissionType.Read, 'AND');
|
|
60184
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
60185
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Rubrics', rows, this.GetUserFromPayload(userPayload));
|
|
60186
|
-
return result;
|
|
60187
|
-
}
|
|
60188
|
-
|
|
60189
62057
|
@FieldResolver(() => [MJTest_])
|
|
60190
62058
|
async MJTests_TypeIDArray(@Root() mjtesttype_: MJTestType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
60191
62059
|
this.CheckUserReadPermissions('MJ: Tests', userPayload);
|
|
@@ -60196,6 +62064,16 @@ export class MJTestTypeResolver extends ResolverBase {
|
|
|
60196
62064
|
return result;
|
|
60197
62065
|
}
|
|
60198
62066
|
|
|
62067
|
+
@FieldResolver(() => [MJTestRubric_])
|
|
62068
|
+
async MJTestRubrics_TypeIDArray(@Root() mjtesttype_: MJTestType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62069
|
+
this.CheckUserReadPermissions('MJ: Test Rubrics', userPayload);
|
|
62070
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62071
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTestRubrics')} WHERE ${provider.QuoteIdentifier('TypeID')}='${mjtesttype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Rubrics', userPayload, EntityPermissionType.Read, 'AND');
|
|
62072
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
62073
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Rubrics', rows, this.GetUserFromPayload(userPayload));
|
|
62074
|
+
return result;
|
|
62075
|
+
}
|
|
62076
|
+
|
|
60199
62077
|
@Mutation(() => MJTestType_)
|
|
60200
62078
|
async CreateMJTestType(
|
|
60201
62079
|
@Arg('input', () => CreateMJTestTypeInput) input: CreateMJTestTypeInput,
|
|
@@ -63302,7 +65180,7 @@ export class MJUser_ {
|
|
|
63302
65180
|
MJConversations_UserIDArray: MJConversation_[]; // Link to MJConversations
|
|
63303
65181
|
|
|
63304
65182
|
@Field(() => [MJRecordMergeLog_])
|
|
63305
|
-
|
|
65183
|
+
MJRecordMergeLogs_ApprovedByUserIDArray: MJRecordMergeLog_[]; // Link to MJRecordMergeLogs
|
|
63306
65184
|
|
|
63307
65185
|
@Field(() => [MJDataContext_])
|
|
63308
65186
|
MJDataContexts_UserIDArray: MJDataContext_[]; // Link to MJDataContexts
|
|
@@ -63353,7 +65231,7 @@ export class MJUser_ {
|
|
|
63353
65231
|
MJResourceLinks_UserIDArray: MJResourceLink_[]; // Link to MJResourceLinks
|
|
63354
65232
|
|
|
63355
65233
|
@Field(() => [MJAIAgentRequest_])
|
|
63356
|
-
|
|
65234
|
+
MJAIAgentRequests_RequestForUserIDArray: MJAIAgentRequest_[]; // Link to MJAIAgentRequests
|
|
63357
65235
|
|
|
63358
65236
|
@Field(() => [MJAIAgentNote_])
|
|
63359
65237
|
MJAIAgentNotes_UserIDArray: MJAIAgentNote_[]; // Link to MJAIAgentNotes
|
|
@@ -63377,10 +65255,10 @@ export class MJUser_ {
|
|
|
63377
65255
|
MJScheduledJobRuns_ExecutedByUserIDArray: MJScheduledJobRun_[]; // Link to MJScheduledJobRuns
|
|
63378
65256
|
|
|
63379
65257
|
@Field(() => [MJScheduledJob_])
|
|
63380
|
-
|
|
65258
|
+
MJScheduledJobs_OwnerUserIDArray: MJScheduledJob_[]; // Link to MJScheduledJobs
|
|
63381
65259
|
|
|
63382
65260
|
@Field(() => [MJArtifactPermission_])
|
|
63383
|
-
|
|
65261
|
+
MJArtifactPermissions_SharedByUserIDArray: MJArtifactPermission_[]; // Link to MJArtifactPermissions
|
|
63384
65262
|
|
|
63385
65263
|
@Field(() => [MJArtifactUse_])
|
|
63386
65264
|
MJArtifactUses_UserIDArray: MJArtifactUse_[]; // Link to MJArtifactUses
|
|
@@ -63397,23 +65275,23 @@ export class MJUser_ {
|
|
|
63397
65275
|
@Field(() => [MJUserSetting_])
|
|
63398
65276
|
MJUserSettings_UserIDArray: MJUserSetting_[]; // Link to MJUserSettings
|
|
63399
65277
|
|
|
65278
|
+
@Field(() => [MJListInvitation_])
|
|
65279
|
+
MJListInvitations_CreatedByUserIDArray: MJListInvitation_[]; // Link to MJListInvitations
|
|
65280
|
+
|
|
63400
65281
|
@Field(() => [MJListShare_])
|
|
63401
65282
|
MJListShares_UserIDArray: MJListShare_[]; // Link to MJListShares
|
|
63402
65283
|
|
|
63403
|
-
@Field(() => [
|
|
63404
|
-
|
|
65284
|
+
@Field(() => [MJDashboardCategoryPermission_])
|
|
65285
|
+
MJDashboardCategoryPermissions_SharedByUserIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
63405
65286
|
|
|
63406
65287
|
@Field(() => [MJDashboardCategoryLink_])
|
|
63407
65288
|
MJDashboardCategoryLinks_UserIDArray: MJDashboardCategoryLink_[]; // Link to MJDashboardCategoryLinks
|
|
63408
65289
|
|
|
63409
|
-
@Field(() => [MJDashboardCategoryPermission_])
|
|
63410
|
-
MJDashboardCategoryPermissions_UserIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
63411
|
-
|
|
63412
65290
|
@Field(() => [MJDashboardPermission_])
|
|
63413
|
-
|
|
65291
|
+
MJDashboardPermissions_UserIDArray: MJDashboardPermission_[]; // Link to MJDashboardPermissions
|
|
63414
65292
|
|
|
63415
65293
|
@Field(() => [MJAPIKey_])
|
|
63416
|
-
|
|
65294
|
+
MJAPIKeys_CreatedByUserIDArray: MJAPIKey_[]; // Link to MJAPIKeys
|
|
63417
65295
|
|
|
63418
65296
|
@Field(() => [MJUserNotificationPreference_])
|
|
63419
65297
|
MJUserNotificationPreferences_UserIDArray: MJUserNotificationPreference_[]; // Link to MJUserNotificationPreferences
|
|
@@ -63427,17 +65305,17 @@ export class MJUser_ {
|
|
|
63427
65305
|
@Field(() => [MJOAuthAuthorizationState_])
|
|
63428
65306
|
MJOAuthAuthorizationStates_UserIDArray: MJOAuthAuthorizationState_[]; // Link to MJOAuthAuthorizationStates
|
|
63429
65307
|
|
|
63430
|
-
@Field(() => [MJOpenApp_])
|
|
63431
|
-
MJOpenApps_InstalledByUserIDArray: MJOpenApp_[]; // Link to MJOpenApps
|
|
63432
|
-
|
|
63433
65308
|
@Field(() => [MJOpenAppInstallHistory_])
|
|
63434
65309
|
MJOpenAppInstallHistories_ExecutedByUserIDArray: MJOpenAppInstallHistory_[]; // Link to MJOpenAppInstallHistories
|
|
63435
65310
|
|
|
65311
|
+
@Field(() => [MJOpenApp_])
|
|
65312
|
+
MJOpenApps_InstalledByUserIDArray: MJOpenApp_[]; // Link to MJOpenApps
|
|
65313
|
+
|
|
63436
65314
|
@Field(() => [MJResourcePermission_])
|
|
63437
65315
|
MJResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
|
|
63438
65316
|
|
|
63439
65317
|
@Field(() => [MJAIAgentRequest_])
|
|
63440
|
-
|
|
65318
|
+
MJAIAgentRequests_ResponseByUserIDArray: MJAIAgentRequest_[]; // Link to MJAIAgentRequests
|
|
63441
65319
|
|
|
63442
65320
|
@Field(() => [MJConversationDetail_])
|
|
63443
65321
|
MJConversationDetails_UserIDArray: MJConversationDetail_[]; // Link to MJConversationDetails
|
|
@@ -63449,25 +65327,25 @@ export class MJUser_ {
|
|
|
63449
65327
|
MJArtifacts_UserIDArray: MJArtifact_[]; // Link to MJArtifacts
|
|
63450
65328
|
|
|
63451
65329
|
@Field(() => [MJScheduledJob_])
|
|
63452
|
-
|
|
65330
|
+
MJScheduledJobs_NotifyUserIDArray: MJScheduledJob_[]; // Link to MJScheduledJobs
|
|
63453
65331
|
|
|
63454
65332
|
@Field(() => [MJCollectionPermission_])
|
|
63455
|
-
|
|
65333
|
+
MJCollectionPermissions_UserIDArray: MJCollectionPermission_[]; // Link to MJCollectionPermissions
|
|
63456
65334
|
|
|
63457
65335
|
@Field(() => [MJArtifactPermission_])
|
|
63458
|
-
|
|
65336
|
+
MJArtifactPermissions_UserIDArray: MJArtifactPermission_[]; // Link to MJArtifactPermissions
|
|
63459
65337
|
|
|
63460
65338
|
@Field(() => [MJTestRun_])
|
|
63461
65339
|
MJTestRuns_RunByUserIDArray: MJTestRun_[]; // Link to MJTestRuns
|
|
63462
65340
|
|
|
63463
65341
|
@Field(() => [MJDashboardPermission_])
|
|
63464
|
-
|
|
65342
|
+
MJDashboardPermissions_SharedByUserIDArray: MJDashboardPermission_[]; // Link to MJDashboardPermissions
|
|
63465
65343
|
|
|
63466
65344
|
@Field(() => [MJDashboardCategoryPermission_])
|
|
63467
|
-
|
|
65345
|
+
MJDashboardCategoryPermissions_UserIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
63468
65346
|
|
|
63469
65347
|
@Field(() => [MJAPIKey_])
|
|
63470
|
-
|
|
65348
|
+
MJAPIKeys_UserIDArray: MJAPIKey_[]; // Link to MJAPIKeys
|
|
63471
65349
|
|
|
63472
65350
|
@Field(() => [MJMCPServerConnectionPermission_])
|
|
63473
65351
|
MJMCPServerConnectionPermissions_UserIDArray: MJMCPServerConnectionPermission_[]; // Link to MJMCPServerConnectionPermissions
|
|
@@ -63475,6 +65353,9 @@ export class MJUser_ {
|
|
|
63475
65353
|
@Field(() => [MJVersionLabel_])
|
|
63476
65354
|
MJVersionLabels_CreatedByUserIDArray: MJVersionLabel_[]; // Link to MJVersionLabels
|
|
63477
65355
|
|
|
65356
|
+
@Field(() => [MJDuplicateRun_])
|
|
65357
|
+
MJDuplicateRuns_ApprovedByUserIDArray: MJDuplicateRun_[]; // Link to MJDuplicateRuns
|
|
65358
|
+
|
|
63478
65359
|
@Field(() => [MJAIAgentRun_])
|
|
63479
65360
|
MJAIAgentRuns_UserIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
63480
65361
|
|
|
@@ -63485,7 +65366,10 @@ export class MJUser_ {
|
|
|
63485
65366
|
MJCollections_OwnerIDArray: MJCollection_[]; // Link to MJCollections
|
|
63486
65367
|
|
|
63487
65368
|
@Field(() => [MJCollectionPermission_])
|
|
63488
|
-
|
|
65369
|
+
MJCollectionPermissions_SharedByUserIDArray: MJCollectionPermission_[]; // Link to MJCollectionPermissions
|
|
65370
|
+
|
|
65371
|
+
@Field(() => [MJRecordMergeLog_])
|
|
65372
|
+
MJRecordMergeLogs_InitiatedByUserIDArray: MJRecordMergeLog_[]; // Link to MJRecordMergeLogs
|
|
63489
65373
|
|
|
63490
65374
|
@Field(() => [MJTask_])
|
|
63491
65375
|
MJTasks_UserIDArray: MJTask_[]; // Link to MJTasks
|
|
@@ -63826,10 +65710,10 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
63826
65710
|
}
|
|
63827
65711
|
|
|
63828
65712
|
@FieldResolver(() => [MJRecordMergeLog_])
|
|
63829
|
-
async
|
|
65713
|
+
async MJRecordMergeLogs_ApprovedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
63830
65714
|
this.CheckUserReadPermissions('MJ: Record Merge Logs', userPayload);
|
|
63831
65715
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
63832
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordMergeLogs')} WHERE ${provider.QuoteIdentifier('
|
|
65716
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordMergeLogs')} WHERE ${provider.QuoteIdentifier('ApprovedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
63833
65717
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
63834
65718
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Merge Logs', rows, this.GetUserFromPayload(userPayload));
|
|
63835
65719
|
return result;
|
|
@@ -63996,10 +65880,10 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
63996
65880
|
}
|
|
63997
65881
|
|
|
63998
65882
|
@FieldResolver(() => [MJAIAgentRequest_])
|
|
63999
|
-
async
|
|
65883
|
+
async MJAIAgentRequests_RequestForUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64000
65884
|
this.CheckUserReadPermissions('MJ: AI Agent Requests', userPayload);
|
|
64001
65885
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64002
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRequests')} WHERE ${provider.QuoteIdentifier('
|
|
65886
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRequests')} WHERE ${provider.QuoteIdentifier('RequestForUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Requests', userPayload, EntityPermissionType.Read, 'AND');
|
|
64003
65887
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64004
65888
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Requests', rows, this.GetUserFromPayload(userPayload));
|
|
64005
65889
|
return result;
|
|
@@ -64076,20 +65960,20 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64076
65960
|
}
|
|
64077
65961
|
|
|
64078
65962
|
@FieldResolver(() => [MJScheduledJob_])
|
|
64079
|
-
async
|
|
65963
|
+
async MJScheduledJobs_OwnerUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64080
65964
|
this.CheckUserReadPermissions('MJ: Scheduled Jobs', userPayload);
|
|
64081
65965
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64082
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledJobs')} WHERE ${provider.QuoteIdentifier('
|
|
65966
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledJobs')} WHERE ${provider.QuoteIdentifier('OwnerUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Jobs', userPayload, EntityPermissionType.Read, 'AND');
|
|
64083
65967
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64084
65968
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Jobs', rows, this.GetUserFromPayload(userPayload));
|
|
64085
65969
|
return result;
|
|
64086
65970
|
}
|
|
64087
65971
|
|
|
64088
65972
|
@FieldResolver(() => [MJArtifactPermission_])
|
|
64089
|
-
async
|
|
65973
|
+
async MJArtifactPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64090
65974
|
this.CheckUserReadPermissions('MJ: Artifact Permissions', userPayload);
|
|
64091
65975
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64092
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArtifactPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
65976
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArtifactPermissions')} WHERE ${provider.QuoteIdentifier('SharedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
64093
65977
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64094
65978
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64095
65979
|
return result;
|
|
@@ -64145,6 +66029,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64145
66029
|
return result;
|
|
64146
66030
|
}
|
|
64147
66031
|
|
|
66032
|
+
@FieldResolver(() => [MJListInvitation_])
|
|
66033
|
+
async MJListInvitations_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66034
|
+
this.CheckUserReadPermissions('MJ: List Invitations', userPayload);
|
|
66035
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66036
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwListInvitations')} WHERE ${provider.QuoteIdentifier('CreatedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: List Invitations', userPayload, EntityPermissionType.Read, 'AND');
|
|
66037
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
66038
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: List Invitations', rows, this.GetUserFromPayload(userPayload));
|
|
66039
|
+
return result;
|
|
66040
|
+
}
|
|
66041
|
+
|
|
64148
66042
|
@FieldResolver(() => [MJListShare_])
|
|
64149
66043
|
async MJListShares_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64150
66044
|
this.CheckUserReadPermissions('MJ: List Shares', userPayload);
|
|
@@ -64155,13 +66049,13 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64155
66049
|
return result;
|
|
64156
66050
|
}
|
|
64157
66051
|
|
|
64158
|
-
@FieldResolver(() => [
|
|
64159
|
-
async
|
|
64160
|
-
this.CheckUserReadPermissions('MJ:
|
|
66052
|
+
@FieldResolver(() => [MJDashboardCategoryPermission_])
|
|
66053
|
+
async MJDashboardCategoryPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66054
|
+
this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
|
|
64161
66055
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64162
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
66056
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardCategoryPermissions')} WHERE ${provider.QuoteIdentifier('SharedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
64163
66057
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64164
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
66058
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64165
66059
|
return result;
|
|
64166
66060
|
}
|
|
64167
66061
|
|
|
@@ -64175,31 +66069,21 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64175
66069
|
return result;
|
|
64176
66070
|
}
|
|
64177
66071
|
|
|
64178
|
-
@FieldResolver(() => [MJDashboardCategoryPermission_])
|
|
64179
|
-
async MJDashboardCategoryPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64180
|
-
this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
|
|
64181
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64182
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardCategoryPermissions')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
64183
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64184
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64185
|
-
return result;
|
|
64186
|
-
}
|
|
64187
|
-
|
|
64188
66072
|
@FieldResolver(() => [MJDashboardPermission_])
|
|
64189
|
-
async
|
|
66073
|
+
async MJDashboardPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64190
66074
|
this.CheckUserReadPermissions('MJ: Dashboard Permissions', userPayload);
|
|
64191
66075
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64192
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
66076
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardPermissions')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
64193
66077
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64194
66078
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64195
66079
|
return result;
|
|
64196
66080
|
}
|
|
64197
66081
|
|
|
64198
66082
|
@FieldResolver(() => [MJAPIKey_])
|
|
64199
|
-
async
|
|
66083
|
+
async MJAPIKeys_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64200
66084
|
this.CheckUserReadPermissions('MJ: API Keys', userPayload);
|
|
64201
66085
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64202
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeys')} WHERE ${provider.QuoteIdentifier('
|
|
66086
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeys')} WHERE ${provider.QuoteIdentifier('CreatedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Keys', userPayload, EntityPermissionType.Read, 'AND');
|
|
64203
66087
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64204
66088
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Keys', rows, this.GetUserFromPayload(userPayload));
|
|
64205
66089
|
return result;
|
|
@@ -64245,16 +66129,6 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64245
66129
|
return result;
|
|
64246
66130
|
}
|
|
64247
66131
|
|
|
64248
|
-
@FieldResolver(() => [MJOpenApp_])
|
|
64249
|
-
async MJOpenApps_InstalledByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64250
|
-
this.CheckUserReadPermissions('MJ: Open Apps', userPayload);
|
|
64251
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64252
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenApps')} WHERE ${provider.QuoteIdentifier('InstalledByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Open Apps', userPayload, EntityPermissionType.Read, 'AND');
|
|
64253
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64254
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open Apps', rows, this.GetUserFromPayload(userPayload));
|
|
64255
|
-
return result;
|
|
64256
|
-
}
|
|
64257
|
-
|
|
64258
66132
|
@FieldResolver(() => [MJOpenAppInstallHistory_])
|
|
64259
66133
|
async MJOpenAppInstallHistories_ExecutedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64260
66134
|
this.CheckUserReadPermissions('MJ: Open App Install Histories', userPayload);
|
|
@@ -64265,6 +66139,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64265
66139
|
return result;
|
|
64266
66140
|
}
|
|
64267
66141
|
|
|
66142
|
+
@FieldResolver(() => [MJOpenApp_])
|
|
66143
|
+
async MJOpenApps_InstalledByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66144
|
+
this.CheckUserReadPermissions('MJ: Open Apps', userPayload);
|
|
66145
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66146
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenApps')} WHERE ${provider.QuoteIdentifier('InstalledByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Open Apps', userPayload, EntityPermissionType.Read, 'AND');
|
|
66147
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
66148
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open Apps', rows, this.GetUserFromPayload(userPayload));
|
|
66149
|
+
return result;
|
|
66150
|
+
}
|
|
66151
|
+
|
|
64268
66152
|
@FieldResolver(() => [MJResourcePermission_])
|
|
64269
66153
|
async MJResourcePermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64270
66154
|
this.CheckUserReadPermissions('MJ: Resource Permissions', userPayload);
|
|
@@ -64276,10 +66160,10 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64276
66160
|
}
|
|
64277
66161
|
|
|
64278
66162
|
@FieldResolver(() => [MJAIAgentRequest_])
|
|
64279
|
-
async
|
|
66163
|
+
async MJAIAgentRequests_ResponseByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64280
66164
|
this.CheckUserReadPermissions('MJ: AI Agent Requests', userPayload);
|
|
64281
66165
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64282
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRequests')} WHERE ${provider.QuoteIdentifier('
|
|
66166
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRequests')} WHERE ${provider.QuoteIdentifier('ResponseByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Requests', userPayload, EntityPermissionType.Read, 'AND');
|
|
64283
66167
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64284
66168
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Requests', rows, this.GetUserFromPayload(userPayload));
|
|
64285
66169
|
return result;
|
|
@@ -64316,30 +66200,30 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64316
66200
|
}
|
|
64317
66201
|
|
|
64318
66202
|
@FieldResolver(() => [MJScheduledJob_])
|
|
64319
|
-
async
|
|
66203
|
+
async MJScheduledJobs_NotifyUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64320
66204
|
this.CheckUserReadPermissions('MJ: Scheduled Jobs', userPayload);
|
|
64321
66205
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64322
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledJobs')} WHERE ${provider.QuoteIdentifier('
|
|
66206
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledJobs')} WHERE ${provider.QuoteIdentifier('NotifyUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Jobs', userPayload, EntityPermissionType.Read, 'AND');
|
|
64323
66207
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64324
66208
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Jobs', rows, this.GetUserFromPayload(userPayload));
|
|
64325
66209
|
return result;
|
|
64326
66210
|
}
|
|
64327
66211
|
|
|
64328
66212
|
@FieldResolver(() => [MJCollectionPermission_])
|
|
64329
|
-
async
|
|
66213
|
+
async MJCollectionPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64330
66214
|
this.CheckUserReadPermissions('MJ: Collection Permissions', userPayload);
|
|
64331
66215
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64332
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCollectionPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
66216
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCollectionPermissions')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
64333
66217
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64334
66218
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Collection Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64335
66219
|
return result;
|
|
64336
66220
|
}
|
|
64337
66221
|
|
|
64338
66222
|
@FieldResolver(() => [MJArtifactPermission_])
|
|
64339
|
-
async
|
|
66223
|
+
async MJArtifactPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64340
66224
|
this.CheckUserReadPermissions('MJ: Artifact Permissions', userPayload);
|
|
64341
66225
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64342
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArtifactPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
66226
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArtifactPermissions')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
64343
66227
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64344
66228
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64345
66229
|
return result;
|
|
@@ -64356,30 +66240,30 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64356
66240
|
}
|
|
64357
66241
|
|
|
64358
66242
|
@FieldResolver(() => [MJDashboardPermission_])
|
|
64359
|
-
async
|
|
66243
|
+
async MJDashboardPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64360
66244
|
this.CheckUserReadPermissions('MJ: Dashboard Permissions', userPayload);
|
|
64361
66245
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64362
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
66246
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardPermissions')} WHERE ${provider.QuoteIdentifier('SharedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
64363
66247
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64364
66248
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64365
66249
|
return result;
|
|
64366
66250
|
}
|
|
64367
66251
|
|
|
64368
66252
|
@FieldResolver(() => [MJDashboardCategoryPermission_])
|
|
64369
|
-
async
|
|
66253
|
+
async MJDashboardCategoryPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64370
66254
|
this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
|
|
64371
66255
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64372
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardCategoryPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
66256
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardCategoryPermissions')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
64373
66257
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64374
66258
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64375
66259
|
return result;
|
|
64376
66260
|
}
|
|
64377
66261
|
|
|
64378
66262
|
@FieldResolver(() => [MJAPIKey_])
|
|
64379
|
-
async
|
|
66263
|
+
async MJAPIKeys_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64380
66264
|
this.CheckUserReadPermissions('MJ: API Keys', userPayload);
|
|
64381
66265
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64382
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeys')} WHERE ${provider.QuoteIdentifier('
|
|
66266
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeys')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: API Keys', userPayload, EntityPermissionType.Read, 'AND');
|
|
64383
66267
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64384
66268
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Keys', rows, this.GetUserFromPayload(userPayload));
|
|
64385
66269
|
return result;
|
|
@@ -64405,6 +66289,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64405
66289
|
return result;
|
|
64406
66290
|
}
|
|
64407
66291
|
|
|
66292
|
+
@FieldResolver(() => [MJDuplicateRun_])
|
|
66293
|
+
async MJDuplicateRuns_ApprovedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66294
|
+
this.CheckUserReadPermissions('MJ: Duplicate Runs', userPayload);
|
|
66295
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66296
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDuplicateRuns')} WHERE ${provider.QuoteIdentifier('ApprovedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Duplicate Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
66297
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
66298
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Duplicate Runs', rows, this.GetUserFromPayload(userPayload));
|
|
66299
|
+
return result;
|
|
66300
|
+
}
|
|
66301
|
+
|
|
64408
66302
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
64409
66303
|
async MJAIAgentRuns_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64410
66304
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -64436,15 +66330,25 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64436
66330
|
}
|
|
64437
66331
|
|
|
64438
66332
|
@FieldResolver(() => [MJCollectionPermission_])
|
|
64439
|
-
async
|
|
66333
|
+
async MJCollectionPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64440
66334
|
this.CheckUserReadPermissions('MJ: Collection Permissions', userPayload);
|
|
64441
66335
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64442
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCollectionPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
66336
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCollectionPermissions')} WHERE ${provider.QuoteIdentifier('SharedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
64443
66337
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64444
66338
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Collection Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64445
66339
|
return result;
|
|
64446
66340
|
}
|
|
64447
66341
|
|
|
66342
|
+
@FieldResolver(() => [MJRecordMergeLog_])
|
|
66343
|
+
async MJRecordMergeLogs_InitiatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66344
|
+
this.CheckUserReadPermissions('MJ: Record Merge Logs', userPayload);
|
|
66345
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66346
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordMergeLogs')} WHERE ${provider.QuoteIdentifier('InitiatedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
66347
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
66348
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Merge Logs', rows, this.GetUserFromPayload(userPayload));
|
|
66349
|
+
return result;
|
|
66350
|
+
}
|
|
66351
|
+
|
|
64448
66352
|
@FieldResolver(() => [MJTask_])
|
|
64449
66353
|
async MJTasks_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64450
66354
|
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
@@ -65561,18 +67465,18 @@ export class MJVersionLabel_ {
|
|
|
65561
67465
|
@MaxLength(36)
|
|
65562
67466
|
RootParentID?: string;
|
|
65563
67467
|
|
|
65564
|
-
@Field(() => [MJVersionLabelRestore_])
|
|
65565
|
-
MJVersionLabelRestores_PreRestoreLabelIDArray: MJVersionLabelRestore_[]; // Link to MJVersionLabelRestores
|
|
65566
|
-
|
|
65567
|
-
@Field(() => [MJVersionLabelItem_])
|
|
65568
|
-
MJVersionLabelItems_VersionLabelIDArray: MJVersionLabelItem_[]; // Link to MJVersionLabelItems
|
|
65569
|
-
|
|
65570
67468
|
@Field(() => [MJVersionLabelRestore_])
|
|
65571
67469
|
MJVersionLabelRestores_VersionLabelIDArray: MJVersionLabelRestore_[]; // Link to MJVersionLabelRestores
|
|
65572
67470
|
|
|
65573
67471
|
@Field(() => [MJVersionLabel_])
|
|
65574
67472
|
MJVersionLabels_ParentIDArray: MJVersionLabel_[]; // Link to MJVersionLabels
|
|
65575
67473
|
|
|
67474
|
+
@Field(() => [MJVersionLabelRestore_])
|
|
67475
|
+
MJVersionLabelRestores_PreRestoreLabelIDArray: MJVersionLabelRestore_[]; // Link to MJVersionLabelRestores
|
|
67476
|
+
|
|
67477
|
+
@Field(() => [MJVersionLabelItem_])
|
|
67478
|
+
MJVersionLabelItems_VersionLabelIDArray: MJVersionLabelItem_[]; // Link to MJVersionLabelItems
|
|
67479
|
+
|
|
65576
67480
|
}
|
|
65577
67481
|
|
|
65578
67482
|
//****************************************************************************
|
|
@@ -65721,42 +67625,42 @@ export class MJVersionLabelResolver extends ResolverBase {
|
|
|
65721
67625
|
}
|
|
65722
67626
|
|
|
65723
67627
|
@FieldResolver(() => [MJVersionLabelRestore_])
|
|
65724
|
-
async
|
|
67628
|
+
async MJVersionLabelRestores_VersionLabelIDArray(@Root() mjversionlabel_: MJVersionLabel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65725
67629
|
this.CheckUserReadPermissions('MJ: Version Label Restores', userPayload);
|
|
65726
67630
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65727
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwVersionLabelRestores')} WHERE ${provider.QuoteIdentifier('
|
|
67631
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwVersionLabelRestores')} WHERE ${provider.QuoteIdentifier('VersionLabelID')}='${mjversionlabel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Version Label Restores', userPayload, EntityPermissionType.Read, 'AND');
|
|
65728
67632
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65729
67633
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version Label Restores', rows, this.GetUserFromPayload(userPayload));
|
|
65730
67634
|
return result;
|
|
65731
67635
|
}
|
|
65732
67636
|
|
|
65733
|
-
@FieldResolver(() => [
|
|
65734
|
-
async
|
|
65735
|
-
this.CheckUserReadPermissions('MJ: Version
|
|
67637
|
+
@FieldResolver(() => [MJVersionLabel_])
|
|
67638
|
+
async MJVersionLabels_ParentIDArray(@Root() mjversionlabel_: MJVersionLabel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67639
|
+
this.CheckUserReadPermissions('MJ: Version Labels', userPayload);
|
|
65736
67640
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65737
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
67641
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwVersionLabels')} WHERE ${provider.QuoteIdentifier('ParentID')}='${mjversionlabel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Version Labels', userPayload, EntityPermissionType.Read, 'AND');
|
|
65738
67642
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65739
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version
|
|
67643
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version Labels', rows, this.GetUserFromPayload(userPayload));
|
|
65740
67644
|
return result;
|
|
65741
67645
|
}
|
|
65742
67646
|
|
|
65743
67647
|
@FieldResolver(() => [MJVersionLabelRestore_])
|
|
65744
|
-
async
|
|
67648
|
+
async MJVersionLabelRestores_PreRestoreLabelIDArray(@Root() mjversionlabel_: MJVersionLabel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65745
67649
|
this.CheckUserReadPermissions('MJ: Version Label Restores', userPayload);
|
|
65746
67650
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65747
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwVersionLabelRestores')} WHERE ${provider.QuoteIdentifier('
|
|
67651
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwVersionLabelRestores')} WHERE ${provider.QuoteIdentifier('PreRestoreLabelID')}='${mjversionlabel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Version Label Restores', userPayload, EntityPermissionType.Read, 'AND');
|
|
65748
67652
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65749
67653
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version Label Restores', rows, this.GetUserFromPayload(userPayload));
|
|
65750
67654
|
return result;
|
|
65751
67655
|
}
|
|
65752
67656
|
|
|
65753
|
-
@FieldResolver(() => [
|
|
65754
|
-
async
|
|
65755
|
-
this.CheckUserReadPermissions('MJ: Version
|
|
67657
|
+
@FieldResolver(() => [MJVersionLabelItem_])
|
|
67658
|
+
async MJVersionLabelItems_VersionLabelIDArray(@Root() mjversionlabel_: MJVersionLabel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67659
|
+
this.CheckUserReadPermissions('MJ: Version Label Items', userPayload);
|
|
65756
67660
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65757
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
67661
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwVersionLabelItems')} WHERE ${provider.QuoteIdentifier('VersionLabelID')}='${mjversionlabel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Version Label Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
65758
67662
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65759
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version
|
|
67663
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version Label Items', rows, this.GetUserFromPayload(userPayload));
|
|
65760
67664
|
return result;
|
|
65761
67665
|
}
|
|
65762
67666
|
|