@memberjunction/server 5.7.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/generated/generated.d.ts +400 -116
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +2280 -549
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +56 -56
- package/src/agents/skip-agent.ts +87 -34
- package/src/agents/skip-sdk.ts +13 -0
- package/src/generated/generated.ts +1599 -430
- package/src/index.ts +5 -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, 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,17 @@ 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
|
+
|
|
22966
23747
|
@Field()
|
|
22967
23748
|
@MaxLength(50)
|
|
22968
23749
|
Company: string;
|
|
@@ -23001,6 +23782,9 @@ export class MJCompanyIntegration_ {
|
|
|
23001
23782
|
@Field(() => [MJCompanyIntegrationRecordMap_])
|
|
23002
23783
|
MJCompanyIntegrationRecordMaps_CompanyIntegrationIDArray: MJCompanyIntegrationRecordMap_[]; // Link to MJCompanyIntegrationRecordMaps
|
|
23003
23784
|
|
|
23785
|
+
@Field(() => [MJCompanyIntegrationEntityMap_])
|
|
23786
|
+
MJCompanyIntegrationEntityMaps_CompanyIntegrationIDArray: MJCompanyIntegrationEntityMap_[]; // Link to MJCompanyIntegrationEntityMaps
|
|
23787
|
+
|
|
23004
23788
|
}
|
|
23005
23789
|
|
|
23006
23790
|
//****************************************************************************
|
|
@@ -23049,6 +23833,15 @@ export class CreateMJCompanyIntegrationInput {
|
|
|
23049
23833
|
|
|
23050
23834
|
@Field({ nullable: true })
|
|
23051
23835
|
Name?: string;
|
|
23836
|
+
|
|
23837
|
+
@Field({ nullable: true })
|
|
23838
|
+
SourceTypeID: string | null;
|
|
23839
|
+
|
|
23840
|
+
@Field({ nullable: true })
|
|
23841
|
+
Configuration: string | null;
|
|
23842
|
+
|
|
23843
|
+
@Field({ nullable: true })
|
|
23844
|
+
CredentialID: string | null;
|
|
23052
23845
|
}
|
|
23053
23846
|
|
|
23054
23847
|
|
|
@@ -23099,6 +23892,15 @@ export class UpdateMJCompanyIntegrationInput {
|
|
|
23099
23892
|
@Field({ nullable: true })
|
|
23100
23893
|
Name?: string;
|
|
23101
23894
|
|
|
23895
|
+
@Field({ nullable: true })
|
|
23896
|
+
SourceTypeID?: string | null;
|
|
23897
|
+
|
|
23898
|
+
@Field({ nullable: true })
|
|
23899
|
+
Configuration?: string | null;
|
|
23900
|
+
|
|
23901
|
+
@Field({ nullable: true })
|
|
23902
|
+
CredentialID?: string | null;
|
|
23903
|
+
|
|
23102
23904
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
23103
23905
|
OldValues___?: KeyValuePairInput[];
|
|
23104
23906
|
}
|
|
@@ -23200,6 +24002,16 @@ export class MJCompanyIntegrationResolver extends ResolverBase {
|
|
|
23200
24002
|
return result;
|
|
23201
24003
|
}
|
|
23202
24004
|
|
|
24005
|
+
@FieldResolver(() => [MJCompanyIntegrationEntityMap_])
|
|
24006
|
+
async MJCompanyIntegrationEntityMaps_CompanyIntegrationIDArray(@Root() mjcompanyintegration_: MJCompanyIntegration_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24007
|
+
this.CheckUserReadPermissions('MJ: Company Integration Entity Maps', userPayload);
|
|
24008
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24009
|
+
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');
|
|
24010
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
24011
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integration Entity Maps', rows, this.GetUserFromPayload(userPayload));
|
|
24012
|
+
return result;
|
|
24013
|
+
}
|
|
24014
|
+
|
|
23203
24015
|
@Mutation(() => MJCompanyIntegration_)
|
|
23204
24016
|
async CreateMJCompanyIntegration(
|
|
23205
24017
|
@Arg('input', () => CreateMJCompanyIntegrationInput) input: CreateMJCompanyIntegrationInput,
|
|
@@ -24103,15 +24915,15 @@ export class MJComponent_ {
|
|
|
24103
24915
|
@MaxLength(255)
|
|
24104
24916
|
SourceRegistry?: string;
|
|
24105
24917
|
|
|
24106
|
-
@Field(() => [MJComponentDependency_])
|
|
24107
|
-
MJComponentDependencies_DependencyComponentIDArray: MJComponentDependency_[]; // Link to MJComponentDependencies
|
|
24108
|
-
|
|
24109
24918
|
@Field(() => [MJComponentLibraryLink_])
|
|
24110
24919
|
MJComponentLibraryLinks_ComponentIDArray: MJComponentLibraryLink_[]; // Link to MJComponentLibraryLinks
|
|
24111
24920
|
|
|
24112
24921
|
@Field(() => [MJComponentDependency_])
|
|
24113
24922
|
MJComponentDependencies_ComponentIDArray: MJComponentDependency_[]; // Link to MJComponentDependencies
|
|
24114
24923
|
|
|
24924
|
+
@Field(() => [MJComponentDependency_])
|
|
24925
|
+
MJComponentDependencies_DependencyComponentIDArray: MJComponentDependency_[]; // Link to MJComponentDependencies
|
|
24926
|
+
|
|
24115
24927
|
}
|
|
24116
24928
|
|
|
24117
24929
|
//****************************************************************************
|
|
@@ -24349,16 +25161,6 @@ export class MJComponentResolver extends ResolverBase {
|
|
|
24349
25161
|
return result;
|
|
24350
25162
|
}
|
|
24351
25163
|
|
|
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
25164
|
@FieldResolver(() => [MJComponentLibraryLink_])
|
|
24363
25165
|
async MJComponentLibraryLinks_ComponentIDArray(@Root() mjcomponent_: MJComponent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24364
25166
|
this.CheckUserReadPermissions('MJ: Component Library Links', userPayload);
|
|
@@ -24379,6 +25181,16 @@ export class MJComponentResolver extends ResolverBase {
|
|
|
24379
25181
|
return result;
|
|
24380
25182
|
}
|
|
24381
25183
|
|
|
25184
|
+
@FieldResolver(() => [MJComponentDependency_])
|
|
25185
|
+
async MJComponentDependencies_DependencyComponentIDArray(@Root() mjcomponent_: MJComponent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25186
|
+
this.CheckUserReadPermissions('MJ: Component Dependencies', userPayload);
|
|
25187
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25188
|
+
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');
|
|
25189
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
25190
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Component Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
25191
|
+
return result;
|
|
25192
|
+
}
|
|
25193
|
+
|
|
24382
25194
|
@Mutation(() => MJComponent_)
|
|
24383
25195
|
async CreateMJComponent(
|
|
24384
25196
|
@Arg('input', () => CreateMJComponentInput) input: CreateMJComponentInput,
|
|
@@ -25865,15 +26677,15 @@ export class MJContentSource_ {
|
|
|
25865
26677
|
@MaxLength(255)
|
|
25866
26678
|
ContentFileType: string;
|
|
25867
26679
|
|
|
25868
|
-
@Field(() => [MJContentProcessRun_])
|
|
25869
|
-
MJContentProcessRuns_SourceIDArray: MJContentProcessRun_[]; // Link to MJContentProcessRuns
|
|
25870
|
-
|
|
25871
26680
|
@Field(() => [MJContentSourceParam_])
|
|
25872
26681
|
MJContentSourceParams_ContentSourceIDArray: MJContentSourceParam_[]; // Link to MJContentSourceParams
|
|
25873
26682
|
|
|
25874
26683
|
@Field(() => [MJContentItem_])
|
|
25875
26684
|
MJContentItems_ContentSourceIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
25876
26685
|
|
|
26686
|
+
@Field(() => [MJContentProcessRun_])
|
|
26687
|
+
MJContentProcessRuns_SourceIDArray: MJContentProcessRun_[]; // Link to MJContentProcessRuns
|
|
26688
|
+
|
|
25877
26689
|
}
|
|
25878
26690
|
|
|
25879
26691
|
//****************************************************************************
|
|
@@ -25985,16 +26797,6 @@ export class MJContentSourceResolver extends ResolverBase {
|
|
|
25985
26797
|
return result;
|
|
25986
26798
|
}
|
|
25987
26799
|
|
|
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
26800
|
@FieldResolver(() => [MJContentSourceParam_])
|
|
25999
26801
|
async MJContentSourceParams_ContentSourceIDArray(@Root() mjcontentsource_: MJContentSource_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26000
26802
|
this.CheckUserReadPermissions('MJ: Content Source Params', userPayload);
|
|
@@ -26015,6 +26817,16 @@ export class MJContentSourceResolver extends ResolverBase {
|
|
|
26015
26817
|
return result;
|
|
26016
26818
|
}
|
|
26017
26819
|
|
|
26820
|
+
@FieldResolver(() => [MJContentProcessRun_])
|
|
26821
|
+
async MJContentProcessRuns_SourceIDArray(@Root() mjcontentsource_: MJContentSource_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26822
|
+
this.CheckUserReadPermissions('MJ: Content Process Runs', userPayload);
|
|
26823
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26824
|
+
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');
|
|
26825
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
26826
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
26827
|
+
return result;
|
|
26828
|
+
}
|
|
26829
|
+
|
|
26018
26830
|
@Mutation(() => MJContentSource_)
|
|
26019
26831
|
async CreateMJContentSource(
|
|
26020
26832
|
@Arg('input', () => CreateMJContentSourceInput) input: CreateMJContentSourceInput,
|
|
@@ -28680,6 +29492,9 @@ export class MJCredentialType_ {
|
|
|
28680
29492
|
@Field(() => [MJMCPServer_])
|
|
28681
29493
|
MJMCPServers_CredentialTypeIDArray: MJMCPServer_[]; // Link to MJMCPServers
|
|
28682
29494
|
|
|
29495
|
+
@Field(() => [MJIntegration_])
|
|
29496
|
+
MJIntegrations_CredentialTypeIDArray: MJIntegration_[]; // Link to MJIntegrations
|
|
29497
|
+
|
|
28683
29498
|
@Field(() => [MJAIVendor_])
|
|
28684
29499
|
MJAIVendors_CredentialTypeIDArray: MJAIVendor_[]; // Link to MJAIVendors
|
|
28685
29500
|
|
|
@@ -28820,6 +29635,16 @@ export class MJCredentialTypeResolver extends ResolverBase {
|
|
|
28820
29635
|
return result;
|
|
28821
29636
|
}
|
|
28822
29637
|
|
|
29638
|
+
@FieldResolver(() => [MJIntegration_])
|
|
29639
|
+
async MJIntegrations_CredentialTypeIDArray(@Root() mjcredentialtype_: MJCredentialType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29640
|
+
this.CheckUserReadPermissions('MJ: Integrations', userPayload);
|
|
29641
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29642
|
+
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');
|
|
29643
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
29644
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Integrations', rows, this.GetUserFromPayload(userPayload));
|
|
29645
|
+
return result;
|
|
29646
|
+
}
|
|
29647
|
+
|
|
28823
29648
|
@FieldResolver(() => [MJAIVendor_])
|
|
28824
29649
|
async MJAIVendors_CredentialTypeIDArray(@Root() mjcredentialtype_: MJCredentialType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28825
29650
|
this.CheckUserReadPermissions('MJ: AI Vendors', userPayload);
|
|
@@ -28931,6 +29756,9 @@ export class MJCredential_ {
|
|
|
28931
29756
|
@Field(() => [MJAICredentialBinding_])
|
|
28932
29757
|
MJAICredentialBindings_CredentialIDArray: MJAICredentialBinding_[]; // Link to MJAICredentialBindings
|
|
28933
29758
|
|
|
29759
|
+
@Field(() => [MJCompanyIntegration_])
|
|
29760
|
+
MJCompanyIntegrations_CredentialIDArray: MJCompanyIntegration_[]; // Link to MJCompanyIntegrations
|
|
29761
|
+
|
|
28934
29762
|
}
|
|
28935
29763
|
|
|
28936
29764
|
//****************************************************************************
|
|
@@ -29118,6 +29946,16 @@ export class MJCredentialResolver extends ResolverBase {
|
|
|
29118
29946
|
return result;
|
|
29119
29947
|
}
|
|
29120
29948
|
|
|
29949
|
+
@FieldResolver(() => [MJCompanyIntegration_])
|
|
29950
|
+
async MJCompanyIntegrations_CredentialIDArray(@Root() mjcredential_: MJCredential_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29951
|
+
this.CheckUserReadPermissions('MJ: Company Integrations', userPayload);
|
|
29952
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29953
|
+
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');
|
|
29954
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
29955
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integrations', rows, this.GetUserFromPayload(userPayload));
|
|
29956
|
+
return result;
|
|
29957
|
+
}
|
|
29958
|
+
|
|
29121
29959
|
@Mutation(() => MJCredential_)
|
|
29122
29960
|
async CreateMJCredential(
|
|
29123
29961
|
@Arg('input', () => CreateMJCredentialInput) input: CreateMJCredentialInput,
|
|
@@ -29195,12 +30033,12 @@ export class MJDashboardCategory_ {
|
|
|
29195
30033
|
@Field(() => [MJDashboardCategory_])
|
|
29196
30034
|
MJDashboardCategories_ParentIDArray: MJDashboardCategory_[]; // Link to MJDashboardCategories
|
|
29197
30035
|
|
|
29198
|
-
@Field(() => [MJDashboardCategoryPermission_])
|
|
29199
|
-
MJDashboardCategoryPermissions_DashboardCategoryIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
29200
|
-
|
|
29201
30036
|
@Field(() => [MJDashboardCategoryLink_])
|
|
29202
30037
|
MJDashboardCategoryLinks_DashboardCategoryIDArray: MJDashboardCategoryLink_[]; // Link to MJDashboardCategoryLinks
|
|
29203
30038
|
|
|
30039
|
+
@Field(() => [MJDashboardCategoryPermission_])
|
|
30040
|
+
MJDashboardCategoryPermissions_DashboardCategoryIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
30041
|
+
|
|
29204
30042
|
}
|
|
29205
30043
|
|
|
29206
30044
|
//****************************************************************************
|
|
@@ -29326,16 +30164,6 @@ export class MJDashboardCategoryResolver extends ResolverBase {
|
|
|
29326
30164
|
return result;
|
|
29327
30165
|
}
|
|
29328
30166
|
|
|
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
30167
|
@FieldResolver(() => [MJDashboardCategoryLink_])
|
|
29340
30168
|
async MJDashboardCategoryLinks_DashboardCategoryIDArray(@Root() mjdashboardcategory_: MJDashboardCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29341
30169
|
this.CheckUserReadPermissions('MJ: Dashboard Category Links', userPayload);
|
|
@@ -29346,6 +30174,16 @@ export class MJDashboardCategoryResolver extends ResolverBase {
|
|
|
29346
30174
|
return result;
|
|
29347
30175
|
}
|
|
29348
30176
|
|
|
30177
|
+
@FieldResolver(() => [MJDashboardCategoryPermission_])
|
|
30178
|
+
async MJDashboardCategoryPermissions_DashboardCategoryIDArray(@Root() mjdashboardcategory_: MJDashboardCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30179
|
+
this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
|
|
30180
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30181
|
+
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');
|
|
30182
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
30183
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
30184
|
+
return result;
|
|
30185
|
+
}
|
|
30186
|
+
|
|
29349
30187
|
@Mutation(() => MJDashboardCategory_)
|
|
29350
30188
|
async CreateMJDashboardCategory(
|
|
29351
30189
|
@Arg('input', () => CreateMJDashboardCategoryInput) input: CreateMJDashboardCategoryInput,
|
|
@@ -34000,17 +34838,17 @@ export class MJEntity_ {
|
|
|
34000
34838
|
@MaxLength(255)
|
|
34001
34839
|
ParentBaseView?: string;
|
|
34002
34840
|
|
|
34841
|
+
@Field(() => [MJEntityField_])
|
|
34842
|
+
MJEntityFields_EntityIDArray: MJEntityField_[]; // Link to MJEntityFields
|
|
34843
|
+
|
|
34003
34844
|
@Field(() => [MJEntityPermission_])
|
|
34004
34845
|
MJEntityPermissions_EntityIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
34005
34846
|
|
|
34006
34847
|
@Field(() => [MJEntityRelationship_])
|
|
34007
34848
|
MJEntityRelationships_EntityIDArray: MJEntityRelationship_[]; // Link to MJEntityRelationships
|
|
34008
34849
|
|
|
34009
|
-
@Field(() => [MJEntityField_])
|
|
34010
|
-
MJEntityFields_EntityIDArray: MJEntityField_[]; // Link to MJEntityFields
|
|
34011
|
-
|
|
34012
34850
|
@Field(() => [MJEntityAIAction_])
|
|
34013
|
-
|
|
34851
|
+
MJEntityAIActions_OutputEntityIDArray: MJEntityAIAction_[]; // Link to MJEntityAIActions
|
|
34014
34852
|
|
|
34015
34853
|
@Field(() => [MJUserRecordLog_])
|
|
34016
34854
|
MJUserRecordLogs_EntityIDArray: MJUserRecordLog_[]; // Link to MJUserRecordLogs
|
|
@@ -34112,7 +34950,7 @@ export class MJEntity_ {
|
|
|
34112
34950
|
MJAccessControlRules_EntityIDArray: MJAccessControlRule_[]; // Link to MJAccessControlRules
|
|
34113
34951
|
|
|
34114
34952
|
@Field(() => [MJRecordLink_])
|
|
34115
|
-
|
|
34953
|
+
MJRecordLinks_TargetEntityIDArray: MJRecordLink_[]; // Link to MJRecordLinks
|
|
34116
34954
|
|
|
34117
34955
|
@Field(() => [MJAIAgentExample_])
|
|
34118
34956
|
MJAIAgentExamples_PrimaryScopeEntityIDArray: MJAIAgentExample_[]; // Link to MJAIAgentExamples
|
|
@@ -34126,11 +34964,26 @@ export class MJEntity_ {
|
|
|
34126
34964
|
@Field(() => [MJVersionLabelItem_])
|
|
34127
34965
|
MJVersionLabelItems_EntityIDArray: MJVersionLabelItem_[]; // Link to MJVersionLabelItems
|
|
34128
34966
|
|
|
34967
|
+
@Field(() => [MJEntityAIAction_])
|
|
34968
|
+
MJEntityAIActions_EntityIDArray: MJEntityAIAction_[]; // Link to MJEntityAIActions
|
|
34969
|
+
|
|
34970
|
+
@Field(() => [MJEntityRelationship_])
|
|
34971
|
+
MJEntityRelationships_RelatedEntityIDArray: MJEntityRelationship_[]; // Link to MJEntityRelationships
|
|
34972
|
+
|
|
34129
34973
|
@Field(() => [MJGeneratedCode_])
|
|
34130
34974
|
MJGeneratedCodes_LinkedEntityIDArray: MJGeneratedCode_[]; // Link to MJGeneratedCodes
|
|
34131
34975
|
|
|
34132
34976
|
@Field(() => [MJRecordLink_])
|
|
34133
|
-
|
|
34977
|
+
MJRecordLinks_SourceEntityIDArray: MJRecordLink_[]; // Link to MJRecordLinks
|
|
34978
|
+
|
|
34979
|
+
@Field(() => [MJCompanyIntegrationEntityMap_])
|
|
34980
|
+
MJCompanyIntegrationEntityMaps_EntityIDArray: MJCompanyIntegrationEntityMap_[]; // Link to MJCompanyIntegrationEntityMaps
|
|
34981
|
+
|
|
34982
|
+
@Field(() => [MJEntityField_])
|
|
34983
|
+
MJEntityFields_RelatedEntityIDArray: MJEntityField_[]; // Link to MJEntityFields
|
|
34984
|
+
|
|
34985
|
+
@Field(() => [MJResourceType_])
|
|
34986
|
+
MJResourceTypes_CategoryEntityIDArray: MJResourceType_[]; // Link to MJResourceTypes
|
|
34134
34987
|
|
|
34135
34988
|
@Field(() => [MJTestRun_])
|
|
34136
34989
|
MJTestRuns_TargetLogEntityIDArray: MJTestRun_[]; // Link to MJTestRuns
|
|
@@ -34547,6 +35400,16 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34547
35400
|
return result;
|
|
34548
35401
|
}
|
|
34549
35402
|
|
|
35403
|
+
@FieldResolver(() => [MJEntityField_])
|
|
35404
|
+
async MJEntityFields_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35405
|
+
this.CheckUserReadPermissions('MJ: Entity Fields', userPayload);
|
|
35406
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35407
|
+
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');
|
|
35408
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35409
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Fields', rows, this.GetUserFromPayload(userPayload));
|
|
35410
|
+
return result;
|
|
35411
|
+
}
|
|
35412
|
+
|
|
34550
35413
|
@FieldResolver(() => [MJEntityPermission_])
|
|
34551
35414
|
async MJEntityPermissions_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34552
35415
|
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
@@ -34567,21 +35430,11 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34567
35430
|
return result;
|
|
34568
35431
|
}
|
|
34569
35432
|
|
|
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
35433
|
@FieldResolver(() => [MJEntityAIAction_])
|
|
34581
|
-
async
|
|
35434
|
+
async MJEntityAIActions_OutputEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34582
35435
|
this.CheckUserReadPermissions('MJ: Entity AI Actions', userPayload);
|
|
34583
35436
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34584
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityAIActions')} WHERE ${provider.QuoteIdentifier('
|
|
35437
|
+
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
35438
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
34586
35439
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity AI Actions', rows, this.GetUserFromPayload(userPayload));
|
|
34587
35440
|
return result;
|
|
@@ -34918,10 +35771,10 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34918
35771
|
}
|
|
34919
35772
|
|
|
34920
35773
|
@FieldResolver(() => [MJRecordLink_])
|
|
34921
|
-
async
|
|
35774
|
+
async MJRecordLinks_TargetEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34922
35775
|
this.CheckUserReadPermissions('MJ: Record Links', userPayload);
|
|
34923
35776
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34924
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordLinks')} WHERE ${provider.QuoteIdentifier('
|
|
35777
|
+
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
35778
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
34926
35779
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Links', rows, this.GetUserFromPayload(userPayload));
|
|
34927
35780
|
return result;
|
|
@@ -34967,6 +35820,26 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34967
35820
|
return result;
|
|
34968
35821
|
}
|
|
34969
35822
|
|
|
35823
|
+
@FieldResolver(() => [MJEntityAIAction_])
|
|
35824
|
+
async MJEntityAIActions_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35825
|
+
this.CheckUserReadPermissions('MJ: Entity AI Actions', userPayload);
|
|
35826
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35827
|
+
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');
|
|
35828
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35829
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity AI Actions', rows, this.GetUserFromPayload(userPayload));
|
|
35830
|
+
return result;
|
|
35831
|
+
}
|
|
35832
|
+
|
|
35833
|
+
@FieldResolver(() => [MJEntityRelationship_])
|
|
35834
|
+
async MJEntityRelationships_RelatedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35835
|
+
this.CheckUserReadPermissions('MJ: Entity Relationships', userPayload);
|
|
35836
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35837
|
+
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');
|
|
35838
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35839
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Relationships', rows, this.GetUserFromPayload(userPayload));
|
|
35840
|
+
return result;
|
|
35841
|
+
}
|
|
35842
|
+
|
|
34970
35843
|
@FieldResolver(() => [MJGeneratedCode_])
|
|
34971
35844
|
async MJGeneratedCodes_LinkedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34972
35845
|
this.CheckUserReadPermissions('MJ: Generated Codes', userPayload);
|
|
@@ -34978,15 +35851,45 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
34978
35851
|
}
|
|
34979
35852
|
|
|
34980
35853
|
@FieldResolver(() => [MJRecordLink_])
|
|
34981
|
-
async
|
|
35854
|
+
async MJRecordLinks_SourceEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34982
35855
|
this.CheckUserReadPermissions('MJ: Record Links', userPayload);
|
|
34983
35856
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
34984
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordLinks')} WHERE ${provider.QuoteIdentifier('
|
|
35857
|
+
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
35858
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
34986
35859
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Links', rows, this.GetUserFromPayload(userPayload));
|
|
34987
35860
|
return result;
|
|
34988
35861
|
}
|
|
34989
35862
|
|
|
35863
|
+
@FieldResolver(() => [MJCompanyIntegrationEntityMap_])
|
|
35864
|
+
async MJCompanyIntegrationEntityMaps_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35865
|
+
this.CheckUserReadPermissions('MJ: Company Integration Entity Maps', userPayload);
|
|
35866
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35867
|
+
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');
|
|
35868
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35869
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integration Entity Maps', rows, this.GetUserFromPayload(userPayload));
|
|
35870
|
+
return result;
|
|
35871
|
+
}
|
|
35872
|
+
|
|
35873
|
+
@FieldResolver(() => [MJEntityField_])
|
|
35874
|
+
async MJEntityFields_RelatedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35875
|
+
this.CheckUserReadPermissions('MJ: Entity Fields', userPayload);
|
|
35876
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35877
|
+
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');
|
|
35878
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35879
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Fields', rows, this.GetUserFromPayload(userPayload));
|
|
35880
|
+
return result;
|
|
35881
|
+
}
|
|
35882
|
+
|
|
35883
|
+
@FieldResolver(() => [MJResourceType_])
|
|
35884
|
+
async MJResourceTypes_CategoryEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
35885
|
+
this.CheckUserReadPermissions('MJ: Resource Types', userPayload);
|
|
35886
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35887
|
+
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');
|
|
35888
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
35889
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Resource Types', rows, this.GetUserFromPayload(userPayload));
|
|
35890
|
+
return result;
|
|
35891
|
+
}
|
|
35892
|
+
|
|
34990
35893
|
@FieldResolver(() => [MJTestRun_])
|
|
34991
35894
|
async MJTestRuns_TargetLogEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
34992
35895
|
this.CheckUserReadPermissions('MJ: Test Runs', userPayload);
|
|
@@ -39316,15 +40219,15 @@ export class MJEnvironment_ {
|
|
|
39316
40219
|
@Field()
|
|
39317
40220
|
_mj__UpdatedAt: Date;
|
|
39318
40221
|
|
|
40222
|
+
@Field(() => [MJArtifact_])
|
|
40223
|
+
MJArtifacts_EnvironmentIDArray: MJArtifact_[]; // Link to MJArtifacts
|
|
40224
|
+
|
|
39319
40225
|
@Field(() => [MJProject_])
|
|
39320
40226
|
MJProjects_EnvironmentIDArray: MJProject_[]; // Link to MJProjects
|
|
39321
40227
|
|
|
39322
40228
|
@Field(() => [MJCollection_])
|
|
39323
40229
|
MJCollections_EnvironmentIDArray: MJCollection_[]; // Link to MJCollections
|
|
39324
40230
|
|
|
39325
|
-
@Field(() => [MJArtifact_])
|
|
39326
|
-
MJArtifacts_EnvironmentIDArray: MJArtifact_[]; // Link to MJArtifacts
|
|
39327
|
-
|
|
39328
40231
|
@Field(() => [MJTask_])
|
|
39329
40232
|
MJTasks_EnvironmentIDArray: MJTask_[]; // Link to MJTasks
|
|
39330
40233
|
|
|
@@ -39442,6 +40345,16 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
39442
40345
|
return result;
|
|
39443
40346
|
}
|
|
39444
40347
|
|
|
40348
|
+
@FieldResolver(() => [MJArtifact_])
|
|
40349
|
+
async MJArtifacts_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40350
|
+
this.CheckUserReadPermissions('MJ: Artifacts', userPayload);
|
|
40351
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40352
|
+
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');
|
|
40353
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
40354
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifacts', rows, this.GetUserFromPayload(userPayload));
|
|
40355
|
+
return result;
|
|
40356
|
+
}
|
|
40357
|
+
|
|
39445
40358
|
@FieldResolver(() => [MJProject_])
|
|
39446
40359
|
async MJProjects_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39447
40360
|
this.CheckUserReadPermissions('MJ: Projects', userPayload);
|
|
@@ -39462,16 +40375,6 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
39462
40375
|
return result;
|
|
39463
40376
|
}
|
|
39464
40377
|
|
|
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
40378
|
@FieldResolver(() => [MJTask_])
|
|
39476
40379
|
async MJTasks_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39477
40380
|
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
@@ -41033,12 +41936,12 @@ export class MJGeneratedCodeCategory_ {
|
|
|
41033
41936
|
@MaxLength(36)
|
|
41034
41937
|
RootParentID?: string;
|
|
41035
41938
|
|
|
41036
|
-
@Field(() => [MJGeneratedCodeCategory_])
|
|
41037
|
-
MJGeneratedCodeCategories_ParentIDArray: MJGeneratedCodeCategory_[]; // Link to MJGeneratedCodeCategories
|
|
41038
|
-
|
|
41039
41939
|
@Field(() => [MJGeneratedCode_])
|
|
41040
41940
|
MJGeneratedCodes_CategoryIDArray: MJGeneratedCode_[]; // Link to MJGeneratedCodes
|
|
41041
41941
|
|
|
41942
|
+
@Field(() => [MJGeneratedCodeCategory_])
|
|
41943
|
+
MJGeneratedCodeCategories_ParentIDArray: MJGeneratedCodeCategory_[]; // Link to MJGeneratedCodeCategories
|
|
41944
|
+
|
|
41042
41945
|
}
|
|
41043
41946
|
|
|
41044
41947
|
//****************************************************************************
|
|
@@ -41138,16 +42041,6 @@ export class MJGeneratedCodeCategoryResolver extends ResolverBase {
|
|
|
41138
42041
|
return result;
|
|
41139
42042
|
}
|
|
41140
42043
|
|
|
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
42044
|
@FieldResolver(() => [MJGeneratedCode_])
|
|
41152
42045
|
async MJGeneratedCodes_CategoryIDArray(@Root() mjgeneratedcodecategory_: MJGeneratedCodeCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41153
42046
|
this.CheckUserReadPermissions('MJ: Generated Codes', userPayload);
|
|
@@ -41158,6 +42051,16 @@ export class MJGeneratedCodeCategoryResolver extends ResolverBase {
|
|
|
41158
42051
|
return result;
|
|
41159
42052
|
}
|
|
41160
42053
|
|
|
42054
|
+
@FieldResolver(() => [MJGeneratedCodeCategory_])
|
|
42055
|
+
async MJGeneratedCodeCategories_ParentIDArray(@Root() mjgeneratedcodecategory_: MJGeneratedCodeCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42056
|
+
this.CheckUserReadPermissions('MJ: Generated Code Categories', userPayload);
|
|
42057
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42058
|
+
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');
|
|
42059
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
42060
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Generated Code Categories', rows, this.GetUserFromPayload(userPayload));
|
|
42061
|
+
return result;
|
|
42062
|
+
}
|
|
42063
|
+
|
|
41161
42064
|
@Mutation(() => MJGeneratedCodeCategory_)
|
|
41162
42065
|
async CreateMJGeneratedCodeCategory(
|
|
41163
42066
|
@Arg('input', () => CreateMJGeneratedCodeCategoryInput) input: CreateMJGeneratedCodeCategoryInput,
|
|
@@ -41429,6 +42332,193 @@ export class MJGeneratedCodeResolver extends ResolverBase {
|
|
|
41429
42332
|
|
|
41430
42333
|
}
|
|
41431
42334
|
|
|
42335
|
+
//****************************************************************************
|
|
42336
|
+
// ENTITY CLASS for MJ: Integration Source Types
|
|
42337
|
+
//****************************************************************************
|
|
42338
|
+
@ObjectType({ description: `Defines categories of integration sources such as SaaS API, Relational Database, or File Feed.` })
|
|
42339
|
+
export class MJIntegrationSourceType_ {
|
|
42340
|
+
@Field()
|
|
42341
|
+
@MaxLength(36)
|
|
42342
|
+
ID: string;
|
|
42343
|
+
|
|
42344
|
+
@Field({description: `Display name for this source type (e.g. SaaS API, Relational Database, File Feed).`})
|
|
42345
|
+
@MaxLength(200)
|
|
42346
|
+
Name: string;
|
|
42347
|
+
|
|
42348
|
+
@Field({nullable: true, description: `Optional longer description of this source type.`})
|
|
42349
|
+
Description?: string;
|
|
42350
|
+
|
|
42351
|
+
@Field({description: `Fully-qualified class name registered via @RegisterClass that implements BaseIntegrationConnector for this source type.`})
|
|
42352
|
+
@MaxLength(500)
|
|
42353
|
+
DriverClass: string;
|
|
42354
|
+
|
|
42355
|
+
@Field({nullable: true, description: `Font Awesome icon class for UI display.`})
|
|
42356
|
+
@MaxLength(200)
|
|
42357
|
+
IconClass?: string;
|
|
42358
|
+
|
|
42359
|
+
@Field({description: `Whether this source type is available for use. Active or Inactive.`})
|
|
42360
|
+
@MaxLength(50)
|
|
42361
|
+
Status: string;
|
|
42362
|
+
|
|
42363
|
+
@Field()
|
|
42364
|
+
_mj__CreatedAt: Date;
|
|
42365
|
+
|
|
42366
|
+
@Field()
|
|
42367
|
+
_mj__UpdatedAt: Date;
|
|
42368
|
+
|
|
42369
|
+
@Field(() => [MJCompanyIntegration_])
|
|
42370
|
+
MJCompanyIntegrations_SourceTypeIDArray: MJCompanyIntegration_[]; // Link to MJCompanyIntegrations
|
|
42371
|
+
|
|
42372
|
+
}
|
|
42373
|
+
|
|
42374
|
+
//****************************************************************************
|
|
42375
|
+
// INPUT TYPE for MJ: Integration Source Types
|
|
42376
|
+
//****************************************************************************
|
|
42377
|
+
@InputType()
|
|
42378
|
+
export class CreateMJIntegrationSourceTypeInput {
|
|
42379
|
+
@Field({ nullable: true })
|
|
42380
|
+
ID?: string;
|
|
42381
|
+
|
|
42382
|
+
@Field({ nullable: true })
|
|
42383
|
+
Name?: string;
|
|
42384
|
+
|
|
42385
|
+
@Field({ nullable: true })
|
|
42386
|
+
Description: string | null;
|
|
42387
|
+
|
|
42388
|
+
@Field({ nullable: true })
|
|
42389
|
+
DriverClass?: string;
|
|
42390
|
+
|
|
42391
|
+
@Field({ nullable: true })
|
|
42392
|
+
IconClass: string | null;
|
|
42393
|
+
|
|
42394
|
+
@Field({ nullable: true })
|
|
42395
|
+
Status?: string;
|
|
42396
|
+
}
|
|
42397
|
+
|
|
42398
|
+
|
|
42399
|
+
//****************************************************************************
|
|
42400
|
+
// INPUT TYPE for MJ: Integration Source Types
|
|
42401
|
+
//****************************************************************************
|
|
42402
|
+
@InputType()
|
|
42403
|
+
export class UpdateMJIntegrationSourceTypeInput {
|
|
42404
|
+
@Field()
|
|
42405
|
+
ID: string;
|
|
42406
|
+
|
|
42407
|
+
@Field({ nullable: true })
|
|
42408
|
+
Name?: string;
|
|
42409
|
+
|
|
42410
|
+
@Field({ nullable: true })
|
|
42411
|
+
Description?: string | null;
|
|
42412
|
+
|
|
42413
|
+
@Field({ nullable: true })
|
|
42414
|
+
DriverClass?: string;
|
|
42415
|
+
|
|
42416
|
+
@Field({ nullable: true })
|
|
42417
|
+
IconClass?: string | null;
|
|
42418
|
+
|
|
42419
|
+
@Field({ nullable: true })
|
|
42420
|
+
Status?: string;
|
|
42421
|
+
|
|
42422
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
42423
|
+
OldValues___?: KeyValuePairInput[];
|
|
42424
|
+
}
|
|
42425
|
+
|
|
42426
|
+
//****************************************************************************
|
|
42427
|
+
// RESOLVER for MJ: Integration Source Types
|
|
42428
|
+
//****************************************************************************
|
|
42429
|
+
@ObjectType()
|
|
42430
|
+
export class RunMJIntegrationSourceTypeViewResult {
|
|
42431
|
+
@Field(() => [MJIntegrationSourceType_])
|
|
42432
|
+
Results: MJIntegrationSourceType_[];
|
|
42433
|
+
|
|
42434
|
+
@Field(() => String, {nullable: true})
|
|
42435
|
+
UserViewRunID?: string;
|
|
42436
|
+
|
|
42437
|
+
@Field(() => Int, {nullable: true})
|
|
42438
|
+
RowCount: number;
|
|
42439
|
+
|
|
42440
|
+
@Field(() => Int, {nullable: true})
|
|
42441
|
+
TotalRowCount: number;
|
|
42442
|
+
|
|
42443
|
+
@Field(() => Int, {nullable: true})
|
|
42444
|
+
ExecutionTime: number;
|
|
42445
|
+
|
|
42446
|
+
@Field({nullable: true})
|
|
42447
|
+
ErrorMessage?: string;
|
|
42448
|
+
|
|
42449
|
+
@Field(() => Boolean, {nullable: false})
|
|
42450
|
+
Success: boolean;
|
|
42451
|
+
}
|
|
42452
|
+
|
|
42453
|
+
@Resolver(MJIntegrationSourceType_)
|
|
42454
|
+
export class MJIntegrationSourceTypeResolver extends ResolverBase {
|
|
42455
|
+
@Query(() => RunMJIntegrationSourceTypeViewResult)
|
|
42456
|
+
async RunMJIntegrationSourceTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42457
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42458
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
42459
|
+
}
|
|
42460
|
+
|
|
42461
|
+
@Query(() => RunMJIntegrationSourceTypeViewResult)
|
|
42462
|
+
async RunMJIntegrationSourceTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42463
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42464
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
42465
|
+
}
|
|
42466
|
+
|
|
42467
|
+
@Query(() => RunMJIntegrationSourceTypeViewResult)
|
|
42468
|
+
async RunMJIntegrationSourceTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42469
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42470
|
+
input.EntityName = 'MJ: Integration Source Types';
|
|
42471
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
42472
|
+
}
|
|
42473
|
+
@Query(() => MJIntegrationSourceType_, { nullable: true })
|
|
42474
|
+
async MJIntegrationSourceType(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJIntegrationSourceType_ | null> {
|
|
42475
|
+
this.CheckUserReadPermissions('MJ: Integration Source Types', userPayload);
|
|
42476
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42477
|
+
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');
|
|
42478
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
42479
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Integration Source Types', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
42480
|
+
return result;
|
|
42481
|
+
}
|
|
42482
|
+
|
|
42483
|
+
@FieldResolver(() => [MJCompanyIntegration_])
|
|
42484
|
+
async MJCompanyIntegrations_SourceTypeIDArray(@Root() mjintegrationsourcetype_: MJIntegrationSourceType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42485
|
+
this.CheckUserReadPermissions('MJ: Company Integrations', userPayload);
|
|
42486
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42487
|
+
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');
|
|
42488
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
42489
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Company Integrations', rows, this.GetUserFromPayload(userPayload));
|
|
42490
|
+
return result;
|
|
42491
|
+
}
|
|
42492
|
+
|
|
42493
|
+
@Mutation(() => MJIntegrationSourceType_)
|
|
42494
|
+
async CreateMJIntegrationSourceType(
|
|
42495
|
+
@Arg('input', () => CreateMJIntegrationSourceTypeInput) input: CreateMJIntegrationSourceTypeInput,
|
|
42496
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
42497
|
+
@PubSub() pubSub: PubSubEngine
|
|
42498
|
+
) {
|
|
42499
|
+
const provider = GetReadWriteProvider(providers);
|
|
42500
|
+
return this.CreateRecord('MJ: Integration Source Types', input, provider, userPayload, pubSub)
|
|
42501
|
+
}
|
|
42502
|
+
|
|
42503
|
+
@Mutation(() => MJIntegrationSourceType_)
|
|
42504
|
+
async UpdateMJIntegrationSourceType(
|
|
42505
|
+
@Arg('input', () => UpdateMJIntegrationSourceTypeInput) input: UpdateMJIntegrationSourceTypeInput,
|
|
42506
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
42507
|
+
@PubSub() pubSub: PubSubEngine
|
|
42508
|
+
) {
|
|
42509
|
+
const provider = GetReadWriteProvider(providers);
|
|
42510
|
+
return this.UpdateRecord('MJ: Integration Source Types', input, provider, userPayload, pubSub);
|
|
42511
|
+
}
|
|
42512
|
+
|
|
42513
|
+
@Mutation(() => MJIntegrationSourceType_)
|
|
42514
|
+
async DeleteMJIntegrationSourceType(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
42515
|
+
const provider = GetReadWriteProvider(providers);
|
|
42516
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
42517
|
+
return this.DeleteRecord('MJ: Integration Source Types', key, options, provider, userPayload, pubSub);
|
|
42518
|
+
}
|
|
42519
|
+
|
|
42520
|
+
}
|
|
42521
|
+
|
|
41432
42522
|
//****************************************************************************
|
|
41433
42523
|
// ENTITY CLASS for MJ: Integration URL Formats
|
|
41434
42524
|
//****************************************************************************
|
|
@@ -41656,6 +42746,14 @@ export class MJIntegration_ {
|
|
|
41656
42746
|
@MaxLength(36)
|
|
41657
42747
|
ID: string;
|
|
41658
42748
|
|
|
42749
|
+
@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.`})
|
|
42750
|
+
@MaxLength(36)
|
|
42751
|
+
CredentialTypeID?: string;
|
|
42752
|
+
|
|
42753
|
+
@Field({nullable: true})
|
|
42754
|
+
@MaxLength(100)
|
|
42755
|
+
CredentialType?: string;
|
|
42756
|
+
|
|
41659
42757
|
@Field(() => [MJIntegrationURLFormat_])
|
|
41660
42758
|
MJIntegrationURLFormats_IntegrationIDArray: MJIntegrationURLFormat_[]; // Link to MJIntegrationURLFormats
|
|
41661
42759
|
|
|
@@ -41695,6 +42793,9 @@ export class CreateMJIntegrationInput {
|
|
|
41695
42793
|
|
|
41696
42794
|
@Field({ nullable: true })
|
|
41697
42795
|
ID?: string;
|
|
42796
|
+
|
|
42797
|
+
@Field({ nullable: true })
|
|
42798
|
+
CredentialTypeID: string | null;
|
|
41698
42799
|
}
|
|
41699
42800
|
|
|
41700
42801
|
|
|
@@ -41727,6 +42828,9 @@ export class UpdateMJIntegrationInput {
|
|
|
41727
42828
|
@Field()
|
|
41728
42829
|
ID: string;
|
|
41729
42830
|
|
|
42831
|
+
@Field({ nullable: true })
|
|
42832
|
+
CredentialTypeID?: string | null;
|
|
42833
|
+
|
|
41730
42834
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
41731
42835
|
OldValues___?: KeyValuePairInput[];
|
|
41732
42836
|
}
|
|
@@ -43691,12 +44795,12 @@ export class MJMCPServerConnection_ {
|
|
|
43691
44795
|
@Field(() => [MJMCPToolExecutionLog_])
|
|
43692
44796
|
MJMCPToolExecutionLogs_MCPServerConnectionIDArray: MJMCPToolExecutionLog_[]; // Link to MJMCPToolExecutionLogs
|
|
43693
44797
|
|
|
43694
|
-
@Field(() => [MJOAuthClientRegistration_])
|
|
43695
|
-
MJOAuthClientRegistrations_MCPServerConnectionIDArray: MJOAuthClientRegistration_[]; // Link to MJOAuthClientRegistrations
|
|
43696
|
-
|
|
43697
44798
|
@Field(() => [MJOAuthToken_])
|
|
43698
44799
|
MJOAuthTokens_MCPServerConnectionIDArray: MJOAuthToken_[]; // Link to MJOAuthTokens
|
|
43699
44800
|
|
|
44801
|
+
@Field(() => [MJOAuthClientRegistration_])
|
|
44802
|
+
MJOAuthClientRegistrations_MCPServerConnectionIDArray: MJOAuthClientRegistration_[]; // Link to MJOAuthClientRegistrations
|
|
44803
|
+
|
|
43700
44804
|
@Field(() => [MJOAuthAuthorizationState_])
|
|
43701
44805
|
MJOAuthAuthorizationStates_MCPServerConnectionIDArray: MJOAuthAuthorizationState_[]; // Link to MJOAuthAuthorizationStates
|
|
43702
44806
|
|
|
@@ -43900,16 +45004,6 @@ export class MJMCPServerConnectionResolver extends ResolverBase {
|
|
|
43900
45004
|
return result;
|
|
43901
45005
|
}
|
|
43902
45006
|
|
|
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
45007
|
@FieldResolver(() => [MJOAuthToken_])
|
|
43914
45008
|
async MJOAuthTokens_MCPServerConnectionIDArray(@Root() mjmcpserverconnection_: MJMCPServerConnection_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43915
45009
|
this.CheckUserReadPermissions('MJ: O Auth Tokens', userPayload);
|
|
@@ -43920,6 +45014,16 @@ export class MJMCPServerConnectionResolver extends ResolverBase {
|
|
|
43920
45014
|
return result;
|
|
43921
45015
|
}
|
|
43922
45016
|
|
|
45017
|
+
@FieldResolver(() => [MJOAuthClientRegistration_])
|
|
45018
|
+
async MJOAuthClientRegistrations_MCPServerConnectionIDArray(@Root() mjmcpserverconnection_: MJMCPServerConnection_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45019
|
+
this.CheckUserReadPermissions('MJ: O Auth Client Registrations', userPayload);
|
|
45020
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45021
|
+
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');
|
|
45022
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
45023
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: O Auth Client Registrations', rows, this.GetUserFromPayload(userPayload));
|
|
45024
|
+
return result;
|
|
45025
|
+
}
|
|
45026
|
+
|
|
43923
45027
|
@FieldResolver(() => [MJOAuthAuthorizationState_])
|
|
43924
45028
|
async MJOAuthAuthorizationStates_MCPServerConnectionIDArray(@Root() mjmcpserverconnection_: MJMCPServerConnection_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43925
45029
|
this.CheckUserReadPermissions('MJ: O Auth Authorization States', userPayload);
|
|
@@ -44346,12 +45450,12 @@ export class MJMCPServer_ {
|
|
|
44346
45450
|
@Field(() => [MJOAuthClientRegistration_])
|
|
44347
45451
|
MJOAuthClientRegistrations_MCPServerIDArray: MJOAuthClientRegistration_[]; // Link to MJOAuthClientRegistrations
|
|
44348
45452
|
|
|
44349
|
-
@Field(() => [MJMCPServerTool_])
|
|
44350
|
-
MJMCPServerTools_MCPServerIDArray: MJMCPServerTool_[]; // Link to MJMCPServerTools
|
|
44351
|
-
|
|
44352
45453
|
@Field(() => [MJMCPServerConnection_])
|
|
44353
45454
|
MJMCPServerConnections_MCPServerIDArray: MJMCPServerConnection_[]; // Link to MJMCPServerConnections
|
|
44354
45455
|
|
|
45456
|
+
@Field(() => [MJMCPServerTool_])
|
|
45457
|
+
MJMCPServerTools_MCPServerIDArray: MJMCPServerTool_[]; // Link to MJMCPServerTools
|
|
45458
|
+
|
|
44355
45459
|
}
|
|
44356
45460
|
|
|
44357
45461
|
//****************************************************************************
|
|
@@ -44575,16 +45679,6 @@ export class MJMCPServerResolver extends ResolverBase {
|
|
|
44575
45679
|
return result;
|
|
44576
45680
|
}
|
|
44577
45681
|
|
|
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
45682
|
@FieldResolver(() => [MJMCPServerConnection_])
|
|
44589
45683
|
async MJMCPServerConnections_MCPServerIDArray(@Root() mjmcpserver_: MJMCPServer_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44590
45684
|
this.CheckUserReadPermissions('MJ: MCP Server Connections', userPayload);
|
|
@@ -44595,6 +45689,16 @@ export class MJMCPServerResolver extends ResolverBase {
|
|
|
44595
45689
|
return result;
|
|
44596
45690
|
}
|
|
44597
45691
|
|
|
45692
|
+
@FieldResolver(() => [MJMCPServerTool_])
|
|
45693
|
+
async MJMCPServerTools_MCPServerIDArray(@Root() mjmcpserver_: MJMCPServer_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45694
|
+
this.CheckUserReadPermissions('MJ: MCP Server Tools', userPayload);
|
|
45695
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45696
|
+
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');
|
|
45697
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
45698
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Server Tools', rows, this.GetUserFromPayload(userPayload));
|
|
45699
|
+
return result;
|
|
45700
|
+
}
|
|
45701
|
+
|
|
44598
45702
|
@Mutation(() => MJMCPServer_)
|
|
44599
45703
|
async CreateMJMCPServer(
|
|
44600
45704
|
@Arg('input', () => CreateMJMCPServerInput) input: CreateMJMCPServerInput,
|
|
@@ -46427,10 +47531,10 @@ export class MJOpenApp_ {
|
|
|
46427
47531
|
InstalledByUser: string;
|
|
46428
47532
|
|
|
46429
47533
|
@Field(() => [MJOpenAppDependency_])
|
|
46430
|
-
|
|
47534
|
+
MJOpenAppDependencies_DependsOnAppIDArray: MJOpenAppDependency_[]; // Link to MJOpenAppDependencies
|
|
46431
47535
|
|
|
46432
47536
|
@Field(() => [MJOpenAppDependency_])
|
|
46433
|
-
|
|
47537
|
+
MJOpenAppDependencies_OpenAppIDArray: MJOpenAppDependency_[]; // Link to MJOpenAppDependencies
|
|
46434
47538
|
|
|
46435
47539
|
@Field(() => [MJOpenAppInstallHistory_])
|
|
46436
47540
|
MJOpenAppInstallHistories_OpenAppIDArray: MJOpenAppInstallHistory_[]; // Link to MJOpenAppInstallHistories
|
|
@@ -46619,20 +47723,20 @@ export class MJOpenAppResolver extends ResolverBase {
|
|
|
46619
47723
|
}
|
|
46620
47724
|
|
|
46621
47725
|
@FieldResolver(() => [MJOpenAppDependency_])
|
|
46622
|
-
async
|
|
47726
|
+
async MJOpenAppDependencies_DependsOnAppIDArray(@Root() mjopenapp_: MJOpenApp_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46623
47727
|
this.CheckUserReadPermissions('MJ: Open App Dependencies', userPayload);
|
|
46624
47728
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46625
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenAppDependencies')} WHERE ${provider.QuoteIdentifier('
|
|
47729
|
+
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
47730
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
46627
47731
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open App Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
46628
47732
|
return result;
|
|
46629
47733
|
}
|
|
46630
47734
|
|
|
46631
47735
|
@FieldResolver(() => [MJOpenAppDependency_])
|
|
46632
|
-
async
|
|
47736
|
+
async MJOpenAppDependencies_OpenAppIDArray(@Root() mjopenapp_: MJOpenApp_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46633
47737
|
this.CheckUserReadPermissions('MJ: Open App Dependencies', userPayload);
|
|
46634
47738
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46635
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenAppDependencies')} WHERE ${provider.QuoteIdentifier('
|
|
47739
|
+
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
47740
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
46637
47741
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open App Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
46638
47742
|
return result;
|
|
@@ -53764,6 +54868,15 @@ export class MJRowLevelSecurityFilter_ {
|
|
|
53764
54868
|
@Field()
|
|
53765
54869
|
_mj__UpdatedAt: Date;
|
|
53766
54870
|
|
|
54871
|
+
@Field(() => [MJEntityPermission_])
|
|
54872
|
+
MJEntityPermissions_DeleteRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
54873
|
+
|
|
54874
|
+
@Field(() => [MJEntityPermission_])
|
|
54875
|
+
MJEntityPermissions_ReadRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
54876
|
+
|
|
54877
|
+
@Field(() => [MJEntityPermission_])
|
|
54878
|
+
MJEntityPermissions_CreateRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
54879
|
+
|
|
53767
54880
|
@Field(() => [MJEntityPermission_])
|
|
53768
54881
|
MJEntityPermissions_UpdateRLSFilterIDArray: MJEntityPermission_[]; // Link to MJEntityPermissions
|
|
53769
54882
|
|
|
@@ -53876,6 +54989,36 @@ export class MJRowLevelSecurityFilterResolver extends ResolverBase {
|
|
|
53876
54989
|
return result;
|
|
53877
54990
|
}
|
|
53878
54991
|
|
|
54992
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
54993
|
+
async MJEntityPermissions_DeleteRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
54994
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
54995
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
54996
|
+
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');
|
|
54997
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
54998
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
54999
|
+
return result;
|
|
55000
|
+
}
|
|
55001
|
+
|
|
55002
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
55003
|
+
async MJEntityPermissions_ReadRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
55004
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
55005
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
55006
|
+
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');
|
|
55007
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
55008
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
55009
|
+
return result;
|
|
55010
|
+
}
|
|
55011
|
+
|
|
55012
|
+
@FieldResolver(() => [MJEntityPermission_])
|
|
55013
|
+
async MJEntityPermissions_CreateRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
55014
|
+
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
55015
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
55016
|
+
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');
|
|
55017
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
55018
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
55019
|
+
return result;
|
|
55020
|
+
}
|
|
55021
|
+
|
|
53879
55022
|
@FieldResolver(() => [MJEntityPermission_])
|
|
53880
55023
|
async MJEntityPermissions_UpdateRLSFilterIDArray(@Root() mjrowlevelsecurityfilter_: MJRowLevelSecurityFilter_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53881
55024
|
this.CheckUserReadPermissions('MJ: Entity Permissions', userPayload);
|
|
@@ -56569,10 +57712,10 @@ export class MJTask_ {
|
|
|
56569
57712
|
RootParentID?: string;
|
|
56570
57713
|
|
|
56571
57714
|
@Field(() => [MJTaskDependency_])
|
|
56572
|
-
|
|
57715
|
+
MJTaskDependencies_TaskIDArray: MJTaskDependency_[]; // Link to MJTaskDependencies
|
|
56573
57716
|
|
|
56574
57717
|
@Field(() => [MJTaskDependency_])
|
|
56575
|
-
|
|
57718
|
+
MJTaskDependencies_DependsOnTaskIDArray: MJTaskDependency_[]; // Link to MJTaskDependencies
|
|
56576
57719
|
|
|
56577
57720
|
@Field(() => [MJTask_])
|
|
56578
57721
|
MJTasks_ParentIDArray: MJTask_[]; // Link to MJTasks
|
|
@@ -56743,20 +57886,20 @@ export class MJTaskResolver extends ResolverBase {
|
|
|
56743
57886
|
}
|
|
56744
57887
|
|
|
56745
57888
|
@FieldResolver(() => [MJTaskDependency_])
|
|
56746
|
-
async
|
|
57889
|
+
async MJTaskDependencies_TaskIDArray(@Root() mjtask_: MJTask_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56747
57890
|
this.CheckUserReadPermissions('MJ: Task Dependencies', userPayload);
|
|
56748
57891
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56749
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTaskDependencies')} WHERE ${provider.QuoteIdentifier('
|
|
57892
|
+
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
57893
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
56751
57894
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Task Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
56752
57895
|
return result;
|
|
56753
57896
|
}
|
|
56754
57897
|
|
|
56755
57898
|
@FieldResolver(() => [MJTaskDependency_])
|
|
56756
|
-
async
|
|
57899
|
+
async MJTaskDependencies_DependsOnTaskIDArray(@Root() mjtask_: MJTask_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56757
57900
|
this.CheckUserReadPermissions('MJ: Task Dependencies', userPayload);
|
|
56758
57901
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56759
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTaskDependencies')} WHERE ${provider.QuoteIdentifier('
|
|
57902
|
+
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
57903
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
56761
57904
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Task Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
56762
57905
|
return result;
|
|
@@ -57682,13 +58825,13 @@ export class MJTemplate_ {
|
|
|
57682
58825
|
MJTemplateContents_TemplateIDArray: MJTemplateContent_[]; // Link to MJTemplateContents
|
|
57683
58826
|
|
|
57684
58827
|
@Field(() => [MJUserNotificationType_])
|
|
57685
|
-
|
|
58828
|
+
MJUserNotificationTypes_EmailTemplateIDArray: MJUserNotificationType_[]; // Link to MJUserNotificationTypes
|
|
57686
58829
|
|
|
57687
58830
|
@Field(() => [MJAIPrompt_])
|
|
57688
58831
|
MJAIPrompts_TemplateIDArray: MJAIPrompt_[]; // Link to MJAIPrompts
|
|
57689
58832
|
|
|
57690
58833
|
@Field(() => [MJUserNotificationType_])
|
|
57691
|
-
|
|
58834
|
+
MJUserNotificationTypes_SMSTemplateIDArray: MJUserNotificationType_[]; // Link to MJUserNotificationTypes
|
|
57692
58835
|
|
|
57693
58836
|
@Field(() => [MJEntityDocument_])
|
|
57694
58837
|
MJEntityDocuments_TemplateIDArray: MJEntityDocument_[]; // Link to MJEntityDocuments
|
|
@@ -57843,10 +58986,10 @@ export class MJTemplateResolver extends ResolverBase {
|
|
|
57843
58986
|
}
|
|
57844
58987
|
|
|
57845
58988
|
@FieldResolver(() => [MJUserNotificationType_])
|
|
57846
|
-
async
|
|
58989
|
+
async MJUserNotificationTypes_EmailTemplateIDArray(@Root() mjtemplate_: MJTemplate_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
57847
58990
|
this.CheckUserReadPermissions('MJ: User Notification Types', userPayload);
|
|
57848
58991
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57849
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserNotificationTypes')} WHERE ${provider.QuoteIdentifier('
|
|
58992
|
+
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
58993
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
57851
58994
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Notification Types', rows, this.GetUserFromPayload(userPayload));
|
|
57852
58995
|
return result;
|
|
@@ -57863,10 +59006,10 @@ export class MJTemplateResolver extends ResolverBase {
|
|
|
57863
59006
|
}
|
|
57864
59007
|
|
|
57865
59008
|
@FieldResolver(() => [MJUserNotificationType_])
|
|
57866
|
-
async
|
|
59009
|
+
async MJUserNotificationTypes_SMSTemplateIDArray(@Root() mjtemplate_: MJTemplate_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
57867
59010
|
this.CheckUserReadPermissions('MJ: User Notification Types', userPayload);
|
|
57868
59011
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57869
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserNotificationTypes')} WHERE ${provider.QuoteIdentifier('
|
|
59012
|
+
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
59013
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
57871
59014
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Notification Types', rows, this.GetUserFromPayload(userPayload));
|
|
57872
59015
|
return result;
|
|
@@ -59832,12 +60975,12 @@ export class MJTestSuite_ {
|
|
|
59832
60975
|
@Field(() => [MJTestSuite_])
|
|
59833
60976
|
MJTestSuites_ParentIDArray: MJTestSuite_[]; // Link to MJTestSuites
|
|
59834
60977
|
|
|
59835
|
-
@Field(() => [MJTestSuiteTest_])
|
|
59836
|
-
MJTestSuiteTests_SuiteIDArray: MJTestSuiteTest_[]; // Link to MJTestSuiteTests
|
|
59837
|
-
|
|
59838
60978
|
@Field(() => [MJTestSuiteRun_])
|
|
59839
60979
|
MJTestSuiteRuns_SuiteIDArray: MJTestSuiteRun_[]; // Link to MJTestSuiteRuns
|
|
59840
60980
|
|
|
60981
|
+
@Field(() => [MJTestSuiteTest_])
|
|
60982
|
+
MJTestSuiteTests_SuiteIDArray: MJTestSuiteTest_[]; // Link to MJTestSuiteTests
|
|
60983
|
+
|
|
59841
60984
|
}
|
|
59842
60985
|
|
|
59843
60986
|
//****************************************************************************
|
|
@@ -59977,16 +61120,6 @@ export class MJTestSuiteResolver extends ResolverBase {
|
|
|
59977
61120
|
return result;
|
|
59978
61121
|
}
|
|
59979
61122
|
|
|
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
61123
|
@FieldResolver(() => [MJTestSuiteRun_])
|
|
59991
61124
|
async MJTestSuiteRuns_SuiteIDArray(@Root() mjtestsuite_: MJTestSuite_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
59992
61125
|
this.CheckUserReadPermissions('MJ: Test Suite Runs', userPayload);
|
|
@@ -59997,6 +61130,16 @@ export class MJTestSuiteResolver extends ResolverBase {
|
|
|
59997
61130
|
return result;
|
|
59998
61131
|
}
|
|
59999
61132
|
|
|
61133
|
+
@FieldResolver(() => [MJTestSuiteTest_])
|
|
61134
|
+
async MJTestSuiteTests_SuiteIDArray(@Root() mjtestsuite_: MJTestSuite_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61135
|
+
this.CheckUserReadPermissions('MJ: Test Suite Tests', userPayload);
|
|
61136
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61137
|
+
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');
|
|
61138
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61139
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Suite Tests', rows, this.GetUserFromPayload(userPayload));
|
|
61140
|
+
return result;
|
|
61141
|
+
}
|
|
61142
|
+
|
|
60000
61143
|
@Mutation(() => MJTestSuite_)
|
|
60001
61144
|
async CreateMJTestSuite(
|
|
60002
61145
|
@Arg('input', () => CreateMJTestSuiteInput) input: CreateMJTestSuiteInput,
|
|
@@ -60059,12 +61202,12 @@ export class MJTestType_ {
|
|
|
60059
61202
|
@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
61203
|
VariablesSchema?: string;
|
|
60061
61204
|
|
|
60062
|
-
@Field(() => [MJTestRubric_])
|
|
60063
|
-
MJTestRubrics_TypeIDArray: MJTestRubric_[]; // Link to MJTestRubrics
|
|
60064
|
-
|
|
60065
61205
|
@Field(() => [MJTest_])
|
|
60066
61206
|
MJTests_TypeIDArray: MJTest_[]; // Link to MJTests
|
|
60067
61207
|
|
|
61208
|
+
@Field(() => [MJTestRubric_])
|
|
61209
|
+
MJTestRubrics_TypeIDArray: MJTestRubric_[]; // Link to MJTestRubrics
|
|
61210
|
+
|
|
60068
61211
|
}
|
|
60069
61212
|
|
|
60070
61213
|
//****************************************************************************
|
|
@@ -60176,16 +61319,6 @@ export class MJTestTypeResolver extends ResolverBase {
|
|
|
60176
61319
|
return result;
|
|
60177
61320
|
}
|
|
60178
61321
|
|
|
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
61322
|
@FieldResolver(() => [MJTest_])
|
|
60190
61323
|
async MJTests_TypeIDArray(@Root() mjtesttype_: MJTestType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
60191
61324
|
this.CheckUserReadPermissions('MJ: Tests', userPayload);
|
|
@@ -60196,6 +61329,16 @@ export class MJTestTypeResolver extends ResolverBase {
|
|
|
60196
61329
|
return result;
|
|
60197
61330
|
}
|
|
60198
61331
|
|
|
61332
|
+
@FieldResolver(() => [MJTestRubric_])
|
|
61333
|
+
async MJTestRubrics_TypeIDArray(@Root() mjtesttype_: MJTestType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61334
|
+
this.CheckUserReadPermissions('MJ: Test Rubrics', userPayload);
|
|
61335
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61336
|
+
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');
|
|
61337
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
61338
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Rubrics', rows, this.GetUserFromPayload(userPayload));
|
|
61339
|
+
return result;
|
|
61340
|
+
}
|
|
61341
|
+
|
|
60199
61342
|
@Mutation(() => MJTestType_)
|
|
60200
61343
|
async CreateMJTestType(
|
|
60201
61344
|
@Arg('input', () => CreateMJTestTypeInput) input: CreateMJTestTypeInput,
|
|
@@ -63302,7 +64445,7 @@ export class MJUser_ {
|
|
|
63302
64445
|
MJConversations_UserIDArray: MJConversation_[]; // Link to MJConversations
|
|
63303
64446
|
|
|
63304
64447
|
@Field(() => [MJRecordMergeLog_])
|
|
63305
|
-
|
|
64448
|
+
MJRecordMergeLogs_ApprovedByUserIDArray: MJRecordMergeLog_[]; // Link to MJRecordMergeLogs
|
|
63306
64449
|
|
|
63307
64450
|
@Field(() => [MJDataContext_])
|
|
63308
64451
|
MJDataContexts_UserIDArray: MJDataContext_[]; // Link to MJDataContexts
|
|
@@ -63353,7 +64496,7 @@ export class MJUser_ {
|
|
|
63353
64496
|
MJResourceLinks_UserIDArray: MJResourceLink_[]; // Link to MJResourceLinks
|
|
63354
64497
|
|
|
63355
64498
|
@Field(() => [MJAIAgentRequest_])
|
|
63356
|
-
|
|
64499
|
+
MJAIAgentRequests_RequestForUserIDArray: MJAIAgentRequest_[]; // Link to MJAIAgentRequests
|
|
63357
64500
|
|
|
63358
64501
|
@Field(() => [MJAIAgentNote_])
|
|
63359
64502
|
MJAIAgentNotes_UserIDArray: MJAIAgentNote_[]; // Link to MJAIAgentNotes
|
|
@@ -63377,10 +64520,10 @@ export class MJUser_ {
|
|
|
63377
64520
|
MJScheduledJobRuns_ExecutedByUserIDArray: MJScheduledJobRun_[]; // Link to MJScheduledJobRuns
|
|
63378
64521
|
|
|
63379
64522
|
@Field(() => [MJScheduledJob_])
|
|
63380
|
-
|
|
64523
|
+
MJScheduledJobs_OwnerUserIDArray: MJScheduledJob_[]; // Link to MJScheduledJobs
|
|
63381
64524
|
|
|
63382
64525
|
@Field(() => [MJArtifactPermission_])
|
|
63383
|
-
|
|
64526
|
+
MJArtifactPermissions_SharedByUserIDArray: MJArtifactPermission_[]; // Link to MJArtifactPermissions
|
|
63384
64527
|
|
|
63385
64528
|
@Field(() => [MJArtifactUse_])
|
|
63386
64529
|
MJArtifactUses_UserIDArray: MJArtifactUse_[]; // Link to MJArtifactUses
|
|
@@ -63397,23 +64540,23 @@ export class MJUser_ {
|
|
|
63397
64540
|
@Field(() => [MJUserSetting_])
|
|
63398
64541
|
MJUserSettings_UserIDArray: MJUserSetting_[]; // Link to MJUserSettings
|
|
63399
64542
|
|
|
64543
|
+
@Field(() => [MJListInvitation_])
|
|
64544
|
+
MJListInvitations_CreatedByUserIDArray: MJListInvitation_[]; // Link to MJListInvitations
|
|
64545
|
+
|
|
63400
64546
|
@Field(() => [MJListShare_])
|
|
63401
64547
|
MJListShares_UserIDArray: MJListShare_[]; // Link to MJListShares
|
|
63402
64548
|
|
|
63403
|
-
@Field(() => [
|
|
63404
|
-
|
|
64549
|
+
@Field(() => [MJDashboardCategoryPermission_])
|
|
64550
|
+
MJDashboardCategoryPermissions_SharedByUserIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
63405
64551
|
|
|
63406
64552
|
@Field(() => [MJDashboardCategoryLink_])
|
|
63407
64553
|
MJDashboardCategoryLinks_UserIDArray: MJDashboardCategoryLink_[]; // Link to MJDashboardCategoryLinks
|
|
63408
64554
|
|
|
63409
|
-
@Field(() => [MJDashboardCategoryPermission_])
|
|
63410
|
-
MJDashboardCategoryPermissions_UserIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
63411
|
-
|
|
63412
64555
|
@Field(() => [MJDashboardPermission_])
|
|
63413
|
-
|
|
64556
|
+
MJDashboardPermissions_UserIDArray: MJDashboardPermission_[]; // Link to MJDashboardPermissions
|
|
63414
64557
|
|
|
63415
64558
|
@Field(() => [MJAPIKey_])
|
|
63416
|
-
|
|
64559
|
+
MJAPIKeys_CreatedByUserIDArray: MJAPIKey_[]; // Link to MJAPIKeys
|
|
63417
64560
|
|
|
63418
64561
|
@Field(() => [MJUserNotificationPreference_])
|
|
63419
64562
|
MJUserNotificationPreferences_UserIDArray: MJUserNotificationPreference_[]; // Link to MJUserNotificationPreferences
|
|
@@ -63427,17 +64570,17 @@ export class MJUser_ {
|
|
|
63427
64570
|
@Field(() => [MJOAuthAuthorizationState_])
|
|
63428
64571
|
MJOAuthAuthorizationStates_UserIDArray: MJOAuthAuthorizationState_[]; // Link to MJOAuthAuthorizationStates
|
|
63429
64572
|
|
|
63430
|
-
@Field(() => [MJOpenApp_])
|
|
63431
|
-
MJOpenApps_InstalledByUserIDArray: MJOpenApp_[]; // Link to MJOpenApps
|
|
63432
|
-
|
|
63433
64573
|
@Field(() => [MJOpenAppInstallHistory_])
|
|
63434
64574
|
MJOpenAppInstallHistories_ExecutedByUserIDArray: MJOpenAppInstallHistory_[]; // Link to MJOpenAppInstallHistories
|
|
63435
64575
|
|
|
64576
|
+
@Field(() => [MJOpenApp_])
|
|
64577
|
+
MJOpenApps_InstalledByUserIDArray: MJOpenApp_[]; // Link to MJOpenApps
|
|
64578
|
+
|
|
63436
64579
|
@Field(() => [MJResourcePermission_])
|
|
63437
64580
|
MJResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
|
|
63438
64581
|
|
|
63439
64582
|
@Field(() => [MJAIAgentRequest_])
|
|
63440
|
-
|
|
64583
|
+
MJAIAgentRequests_ResponseByUserIDArray: MJAIAgentRequest_[]; // Link to MJAIAgentRequests
|
|
63441
64584
|
|
|
63442
64585
|
@Field(() => [MJConversationDetail_])
|
|
63443
64586
|
MJConversationDetails_UserIDArray: MJConversationDetail_[]; // Link to MJConversationDetails
|
|
@@ -63449,25 +64592,25 @@ export class MJUser_ {
|
|
|
63449
64592
|
MJArtifacts_UserIDArray: MJArtifact_[]; // Link to MJArtifacts
|
|
63450
64593
|
|
|
63451
64594
|
@Field(() => [MJScheduledJob_])
|
|
63452
|
-
|
|
64595
|
+
MJScheduledJobs_NotifyUserIDArray: MJScheduledJob_[]; // Link to MJScheduledJobs
|
|
63453
64596
|
|
|
63454
64597
|
@Field(() => [MJCollectionPermission_])
|
|
63455
|
-
|
|
64598
|
+
MJCollectionPermissions_UserIDArray: MJCollectionPermission_[]; // Link to MJCollectionPermissions
|
|
63456
64599
|
|
|
63457
64600
|
@Field(() => [MJArtifactPermission_])
|
|
63458
|
-
|
|
64601
|
+
MJArtifactPermissions_UserIDArray: MJArtifactPermission_[]; // Link to MJArtifactPermissions
|
|
63459
64602
|
|
|
63460
64603
|
@Field(() => [MJTestRun_])
|
|
63461
64604
|
MJTestRuns_RunByUserIDArray: MJTestRun_[]; // Link to MJTestRuns
|
|
63462
64605
|
|
|
63463
64606
|
@Field(() => [MJDashboardPermission_])
|
|
63464
|
-
|
|
64607
|
+
MJDashboardPermissions_SharedByUserIDArray: MJDashboardPermission_[]; // Link to MJDashboardPermissions
|
|
63465
64608
|
|
|
63466
64609
|
@Field(() => [MJDashboardCategoryPermission_])
|
|
63467
|
-
|
|
64610
|
+
MJDashboardCategoryPermissions_UserIDArray: MJDashboardCategoryPermission_[]; // Link to MJDashboardCategoryPermissions
|
|
63468
64611
|
|
|
63469
64612
|
@Field(() => [MJAPIKey_])
|
|
63470
|
-
|
|
64613
|
+
MJAPIKeys_UserIDArray: MJAPIKey_[]; // Link to MJAPIKeys
|
|
63471
64614
|
|
|
63472
64615
|
@Field(() => [MJMCPServerConnectionPermission_])
|
|
63473
64616
|
MJMCPServerConnectionPermissions_UserIDArray: MJMCPServerConnectionPermission_[]; // Link to MJMCPServerConnectionPermissions
|
|
@@ -63475,6 +64618,9 @@ export class MJUser_ {
|
|
|
63475
64618
|
@Field(() => [MJVersionLabel_])
|
|
63476
64619
|
MJVersionLabels_CreatedByUserIDArray: MJVersionLabel_[]; // Link to MJVersionLabels
|
|
63477
64620
|
|
|
64621
|
+
@Field(() => [MJDuplicateRun_])
|
|
64622
|
+
MJDuplicateRuns_ApprovedByUserIDArray: MJDuplicateRun_[]; // Link to MJDuplicateRuns
|
|
64623
|
+
|
|
63478
64624
|
@Field(() => [MJAIAgentRun_])
|
|
63479
64625
|
MJAIAgentRuns_UserIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
63480
64626
|
|
|
@@ -63485,7 +64631,10 @@ export class MJUser_ {
|
|
|
63485
64631
|
MJCollections_OwnerIDArray: MJCollection_[]; // Link to MJCollections
|
|
63486
64632
|
|
|
63487
64633
|
@Field(() => [MJCollectionPermission_])
|
|
63488
|
-
|
|
64634
|
+
MJCollectionPermissions_SharedByUserIDArray: MJCollectionPermission_[]; // Link to MJCollectionPermissions
|
|
64635
|
+
|
|
64636
|
+
@Field(() => [MJRecordMergeLog_])
|
|
64637
|
+
MJRecordMergeLogs_InitiatedByUserIDArray: MJRecordMergeLog_[]; // Link to MJRecordMergeLogs
|
|
63489
64638
|
|
|
63490
64639
|
@Field(() => [MJTask_])
|
|
63491
64640
|
MJTasks_UserIDArray: MJTask_[]; // Link to MJTasks
|
|
@@ -63826,10 +64975,10 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
63826
64975
|
}
|
|
63827
64976
|
|
|
63828
64977
|
@FieldResolver(() => [MJRecordMergeLog_])
|
|
63829
|
-
async
|
|
64978
|
+
async MJRecordMergeLogs_ApprovedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
63830
64979
|
this.CheckUserReadPermissions('MJ: Record Merge Logs', userPayload);
|
|
63831
64980
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
63832
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordMergeLogs')} WHERE ${provider.QuoteIdentifier('
|
|
64981
|
+
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
64982
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
63834
64983
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Merge Logs', rows, this.GetUserFromPayload(userPayload));
|
|
63835
64984
|
return result;
|
|
@@ -63996,10 +65145,10 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
63996
65145
|
}
|
|
63997
65146
|
|
|
63998
65147
|
@FieldResolver(() => [MJAIAgentRequest_])
|
|
63999
|
-
async
|
|
65148
|
+
async MJAIAgentRequests_RequestForUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64000
65149
|
this.CheckUserReadPermissions('MJ: AI Agent Requests', userPayload);
|
|
64001
65150
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64002
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRequests')} WHERE ${provider.QuoteIdentifier('
|
|
65151
|
+
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
65152
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64004
65153
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Requests', rows, this.GetUserFromPayload(userPayload));
|
|
64005
65154
|
return result;
|
|
@@ -64076,20 +65225,20 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64076
65225
|
}
|
|
64077
65226
|
|
|
64078
65227
|
@FieldResolver(() => [MJScheduledJob_])
|
|
64079
|
-
async
|
|
65228
|
+
async MJScheduledJobs_OwnerUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64080
65229
|
this.CheckUserReadPermissions('MJ: Scheduled Jobs', userPayload);
|
|
64081
65230
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64082
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledJobs')} WHERE ${provider.QuoteIdentifier('
|
|
65231
|
+
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
65232
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64084
65233
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Jobs', rows, this.GetUserFromPayload(userPayload));
|
|
64085
65234
|
return result;
|
|
64086
65235
|
}
|
|
64087
65236
|
|
|
64088
65237
|
@FieldResolver(() => [MJArtifactPermission_])
|
|
64089
|
-
async
|
|
65238
|
+
async MJArtifactPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64090
65239
|
this.CheckUserReadPermissions('MJ: Artifact Permissions', userPayload);
|
|
64091
65240
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64092
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArtifactPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
65241
|
+
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
65242
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64094
65243
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64095
65244
|
return result;
|
|
@@ -64145,6 +65294,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64145
65294
|
return result;
|
|
64146
65295
|
}
|
|
64147
65296
|
|
|
65297
|
+
@FieldResolver(() => [MJListInvitation_])
|
|
65298
|
+
async MJListInvitations_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65299
|
+
this.CheckUserReadPermissions('MJ: List Invitations', userPayload);
|
|
65300
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65301
|
+
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');
|
|
65302
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65303
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: List Invitations', rows, this.GetUserFromPayload(userPayload));
|
|
65304
|
+
return result;
|
|
65305
|
+
}
|
|
65306
|
+
|
|
64148
65307
|
@FieldResolver(() => [MJListShare_])
|
|
64149
65308
|
async MJListShares_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64150
65309
|
this.CheckUserReadPermissions('MJ: List Shares', userPayload);
|
|
@@ -64155,13 +65314,13 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64155
65314
|
return result;
|
|
64156
65315
|
}
|
|
64157
65316
|
|
|
64158
|
-
@FieldResolver(() => [
|
|
64159
|
-
async
|
|
64160
|
-
this.CheckUserReadPermissions('MJ:
|
|
65317
|
+
@FieldResolver(() => [MJDashboardCategoryPermission_])
|
|
65318
|
+
async MJDashboardCategoryPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65319
|
+
this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
|
|
64161
65320
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64162
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
65321
|
+
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
65322
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64164
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
65323
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64165
65324
|
return result;
|
|
64166
65325
|
}
|
|
64167
65326
|
|
|
@@ -64175,31 +65334,21 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64175
65334
|
return result;
|
|
64176
65335
|
}
|
|
64177
65336
|
|
|
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
65337
|
@FieldResolver(() => [MJDashboardPermission_])
|
|
64189
|
-
async
|
|
65338
|
+
async MJDashboardPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64190
65339
|
this.CheckUserReadPermissions('MJ: Dashboard Permissions', userPayload);
|
|
64191
65340
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64192
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
65341
|
+
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
65342
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64194
65343
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64195
65344
|
return result;
|
|
64196
65345
|
}
|
|
64197
65346
|
|
|
64198
65347
|
@FieldResolver(() => [MJAPIKey_])
|
|
64199
|
-
async
|
|
65348
|
+
async MJAPIKeys_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64200
65349
|
this.CheckUserReadPermissions('MJ: API Keys', userPayload);
|
|
64201
65350
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64202
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeys')} WHERE ${provider.QuoteIdentifier('
|
|
65351
|
+
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
65352
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64204
65353
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Keys', rows, this.GetUserFromPayload(userPayload));
|
|
64205
65354
|
return result;
|
|
@@ -64245,16 +65394,6 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64245
65394
|
return result;
|
|
64246
65395
|
}
|
|
64247
65396
|
|
|
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
65397
|
@FieldResolver(() => [MJOpenAppInstallHistory_])
|
|
64259
65398
|
async MJOpenAppInstallHistories_ExecutedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64260
65399
|
this.CheckUserReadPermissions('MJ: Open App Install Histories', userPayload);
|
|
@@ -64265,6 +65404,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64265
65404
|
return result;
|
|
64266
65405
|
}
|
|
64267
65406
|
|
|
65407
|
+
@FieldResolver(() => [MJOpenApp_])
|
|
65408
|
+
async MJOpenApps_InstalledByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65409
|
+
this.CheckUserReadPermissions('MJ: Open Apps', userPayload);
|
|
65410
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65411
|
+
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');
|
|
65412
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65413
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open Apps', rows, this.GetUserFromPayload(userPayload));
|
|
65414
|
+
return result;
|
|
65415
|
+
}
|
|
65416
|
+
|
|
64268
65417
|
@FieldResolver(() => [MJResourcePermission_])
|
|
64269
65418
|
async MJResourcePermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64270
65419
|
this.CheckUserReadPermissions('MJ: Resource Permissions', userPayload);
|
|
@@ -64276,10 +65425,10 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64276
65425
|
}
|
|
64277
65426
|
|
|
64278
65427
|
@FieldResolver(() => [MJAIAgentRequest_])
|
|
64279
|
-
async
|
|
65428
|
+
async MJAIAgentRequests_ResponseByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64280
65429
|
this.CheckUserReadPermissions('MJ: AI Agent Requests', userPayload);
|
|
64281
65430
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64282
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRequests')} WHERE ${provider.QuoteIdentifier('
|
|
65431
|
+
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
65432
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64284
65433
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Requests', rows, this.GetUserFromPayload(userPayload));
|
|
64285
65434
|
return result;
|
|
@@ -64316,30 +65465,30 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64316
65465
|
}
|
|
64317
65466
|
|
|
64318
65467
|
@FieldResolver(() => [MJScheduledJob_])
|
|
64319
|
-
async
|
|
65468
|
+
async MJScheduledJobs_NotifyUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64320
65469
|
this.CheckUserReadPermissions('MJ: Scheduled Jobs', userPayload);
|
|
64321
65470
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64322
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledJobs')} WHERE ${provider.QuoteIdentifier('
|
|
65471
|
+
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
65472
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64324
65473
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Jobs', rows, this.GetUserFromPayload(userPayload));
|
|
64325
65474
|
return result;
|
|
64326
65475
|
}
|
|
64327
65476
|
|
|
64328
65477
|
@FieldResolver(() => [MJCollectionPermission_])
|
|
64329
|
-
async
|
|
65478
|
+
async MJCollectionPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64330
65479
|
this.CheckUserReadPermissions('MJ: Collection Permissions', userPayload);
|
|
64331
65480
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64332
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCollectionPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
65481
|
+
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
65482
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64334
65483
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Collection Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64335
65484
|
return result;
|
|
64336
65485
|
}
|
|
64337
65486
|
|
|
64338
65487
|
@FieldResolver(() => [MJArtifactPermission_])
|
|
64339
|
-
async
|
|
65488
|
+
async MJArtifactPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64340
65489
|
this.CheckUserReadPermissions('MJ: Artifact Permissions', userPayload);
|
|
64341
65490
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64342
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArtifactPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
65491
|
+
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
65492
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64344
65493
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64345
65494
|
return result;
|
|
@@ -64356,30 +65505,30 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64356
65505
|
}
|
|
64357
65506
|
|
|
64358
65507
|
@FieldResolver(() => [MJDashboardPermission_])
|
|
64359
|
-
async
|
|
65508
|
+
async MJDashboardPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64360
65509
|
this.CheckUserReadPermissions('MJ: Dashboard Permissions', userPayload);
|
|
64361
65510
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64362
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
65511
|
+
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
65512
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64364
65513
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64365
65514
|
return result;
|
|
64366
65515
|
}
|
|
64367
65516
|
|
|
64368
65517
|
@FieldResolver(() => [MJDashboardCategoryPermission_])
|
|
64369
|
-
async
|
|
65518
|
+
async MJDashboardCategoryPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64370
65519
|
this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
|
|
64371
65520
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64372
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardCategoryPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
65521
|
+
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
65522
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64374
65523
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64375
65524
|
return result;
|
|
64376
65525
|
}
|
|
64377
65526
|
|
|
64378
65527
|
@FieldResolver(() => [MJAPIKey_])
|
|
64379
|
-
async
|
|
65528
|
+
async MJAPIKeys_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64380
65529
|
this.CheckUserReadPermissions('MJ: API Keys', userPayload);
|
|
64381
65530
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64382
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAPIKeys')} WHERE ${provider.QuoteIdentifier('
|
|
65531
|
+
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
65532
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64384
65533
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: API Keys', rows, this.GetUserFromPayload(userPayload));
|
|
64385
65534
|
return result;
|
|
@@ -64405,6 +65554,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64405
65554
|
return result;
|
|
64406
65555
|
}
|
|
64407
65556
|
|
|
65557
|
+
@FieldResolver(() => [MJDuplicateRun_])
|
|
65558
|
+
async MJDuplicateRuns_ApprovedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65559
|
+
this.CheckUserReadPermissions('MJ: Duplicate Runs', userPayload);
|
|
65560
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65561
|
+
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');
|
|
65562
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65563
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Duplicate Runs', rows, this.GetUserFromPayload(userPayload));
|
|
65564
|
+
return result;
|
|
65565
|
+
}
|
|
65566
|
+
|
|
64408
65567
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
64409
65568
|
async MJAIAgentRuns_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64410
65569
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -64436,15 +65595,25 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
64436
65595
|
}
|
|
64437
65596
|
|
|
64438
65597
|
@FieldResolver(() => [MJCollectionPermission_])
|
|
64439
|
-
async
|
|
65598
|
+
async MJCollectionPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64440
65599
|
this.CheckUserReadPermissions('MJ: Collection Permissions', userPayload);
|
|
64441
65600
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64442
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCollectionPermissions')} WHERE ${provider.QuoteIdentifier('
|
|
65601
|
+
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
65602
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64444
65603
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Collection Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
64445
65604
|
return result;
|
|
64446
65605
|
}
|
|
64447
65606
|
|
|
65607
|
+
@FieldResolver(() => [MJRecordMergeLog_])
|
|
65608
|
+
async MJRecordMergeLogs_InitiatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65609
|
+
this.CheckUserReadPermissions('MJ: Record Merge Logs', userPayload);
|
|
65610
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65611
|
+
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');
|
|
65612
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65613
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Merge Logs', rows, this.GetUserFromPayload(userPayload));
|
|
65614
|
+
return result;
|
|
65615
|
+
}
|
|
65616
|
+
|
|
64448
65617
|
@FieldResolver(() => [MJTask_])
|
|
64449
65618
|
async MJTasks_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64450
65619
|
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
@@ -65561,18 +66730,18 @@ export class MJVersionLabel_ {
|
|
|
65561
66730
|
@MaxLength(36)
|
|
65562
66731
|
RootParentID?: string;
|
|
65563
66732
|
|
|
65564
|
-
@Field(() => [MJVersionLabelRestore_])
|
|
65565
|
-
MJVersionLabelRestores_PreRestoreLabelIDArray: MJVersionLabelRestore_[]; // Link to MJVersionLabelRestores
|
|
65566
|
-
|
|
65567
|
-
@Field(() => [MJVersionLabelItem_])
|
|
65568
|
-
MJVersionLabelItems_VersionLabelIDArray: MJVersionLabelItem_[]; // Link to MJVersionLabelItems
|
|
65569
|
-
|
|
65570
66733
|
@Field(() => [MJVersionLabelRestore_])
|
|
65571
66734
|
MJVersionLabelRestores_VersionLabelIDArray: MJVersionLabelRestore_[]; // Link to MJVersionLabelRestores
|
|
65572
66735
|
|
|
65573
66736
|
@Field(() => [MJVersionLabel_])
|
|
65574
66737
|
MJVersionLabels_ParentIDArray: MJVersionLabel_[]; // Link to MJVersionLabels
|
|
65575
66738
|
|
|
66739
|
+
@Field(() => [MJVersionLabelRestore_])
|
|
66740
|
+
MJVersionLabelRestores_PreRestoreLabelIDArray: MJVersionLabelRestore_[]; // Link to MJVersionLabelRestores
|
|
66741
|
+
|
|
66742
|
+
@Field(() => [MJVersionLabelItem_])
|
|
66743
|
+
MJVersionLabelItems_VersionLabelIDArray: MJVersionLabelItem_[]; // Link to MJVersionLabelItems
|
|
66744
|
+
|
|
65576
66745
|
}
|
|
65577
66746
|
|
|
65578
66747
|
//****************************************************************************
|
|
@@ -65721,42 +66890,42 @@ export class MJVersionLabelResolver extends ResolverBase {
|
|
|
65721
66890
|
}
|
|
65722
66891
|
|
|
65723
66892
|
@FieldResolver(() => [MJVersionLabelRestore_])
|
|
65724
|
-
async
|
|
66893
|
+
async MJVersionLabelRestores_VersionLabelIDArray(@Root() mjversionlabel_: MJVersionLabel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65725
66894
|
this.CheckUserReadPermissions('MJ: Version Label Restores', userPayload);
|
|
65726
66895
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65727
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwVersionLabelRestores')} WHERE ${provider.QuoteIdentifier('
|
|
66896
|
+
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
66897
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65729
66898
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version Label Restores', rows, this.GetUserFromPayload(userPayload));
|
|
65730
66899
|
return result;
|
|
65731
66900
|
}
|
|
65732
66901
|
|
|
65733
|
-
@FieldResolver(() => [
|
|
65734
|
-
async
|
|
65735
|
-
this.CheckUserReadPermissions('MJ: Version
|
|
66902
|
+
@FieldResolver(() => [MJVersionLabel_])
|
|
66903
|
+
async MJVersionLabels_ParentIDArray(@Root() mjversionlabel_: MJVersionLabel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66904
|
+
this.CheckUserReadPermissions('MJ: Version Labels', userPayload);
|
|
65736
66905
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65737
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
66906
|
+
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
66907
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65739
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version
|
|
66908
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version Labels', rows, this.GetUserFromPayload(userPayload));
|
|
65740
66909
|
return result;
|
|
65741
66910
|
}
|
|
65742
66911
|
|
|
65743
66912
|
@FieldResolver(() => [MJVersionLabelRestore_])
|
|
65744
|
-
async
|
|
66913
|
+
async MJVersionLabelRestores_PreRestoreLabelIDArray(@Root() mjversionlabel_: MJVersionLabel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
65745
66914
|
this.CheckUserReadPermissions('MJ: Version Label Restores', userPayload);
|
|
65746
66915
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65747
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwVersionLabelRestores')} WHERE ${provider.QuoteIdentifier('
|
|
66916
|
+
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
66917
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65749
66918
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version Label Restores', rows, this.GetUserFromPayload(userPayload));
|
|
65750
66919
|
return result;
|
|
65751
66920
|
}
|
|
65752
66921
|
|
|
65753
|
-
@FieldResolver(() => [
|
|
65754
|
-
async
|
|
65755
|
-
this.CheckUserReadPermissions('MJ: Version
|
|
66922
|
+
@FieldResolver(() => [MJVersionLabelItem_])
|
|
66923
|
+
async MJVersionLabelItems_VersionLabelIDArray(@Root() mjversionlabel_: MJVersionLabel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
66924
|
+
this.CheckUserReadPermissions('MJ: Version Label Items', userPayload);
|
|
65756
66925
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65757
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
66926
|
+
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
66927
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65759
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version
|
|
66928
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Version Label Items', rows, this.GetUserFromPayload(userPayload));
|
|
65760
66929
|
return result;
|
|
65761
66930
|
}
|
|
65762
66931
|
|