@memberjunction/server 2.117.0 → 2.119.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-sdk.d.ts.map +1 -1
- package/dist/agents/skip-sdk.js +10 -0
- package/dist/agents/skip-sdk.js.map +1 -1
- package/dist/generated/generated.d.ts +653 -6
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +4033 -52
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts +3 -4
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +32 -176
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/RunTestResolver.d.ts +41 -0
- package/dist/resolvers/RunTestResolver.d.ts.map +1 -0
- package/dist/resolvers/RunTestResolver.js +349 -0
- package/dist/resolvers/RunTestResolver.js.map +1 -0
- package/package.json +41 -40
- package/src/agents/skip-sdk.ts +10 -0
- package/src/generated/generated.ts +2557 -41
- package/src/resolvers/RunAIAgentResolver.ts +42 -292
- package/src/resolvers/RunTestResolver.ts +369 -0
|
@@ -19,7 +19,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, ComponentRegistryEntity, AIAgentNoteTypeEntity, ComponentDependencyEntity, AIAgentRunEntity, AIVendorEntity, TaskTypeEntity, AIConfigurationEntity, AIAgentEntity, AIAgentStepEntity, AIModelCostEntity, AIPromptModelEntity, AIAgentTypeEntity, AIAgentNoteEntity, EnvironmentEntity, ArtifactPermissionEntity, AIAgentActionEntity, TaskDependencyEntity, CollectionArtifactEntity, AIModelPriceTypeEntity, CollectionEntity, RecordLinkEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, AIAgentArtifactTypeEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, ScheduledJobRunEntity, DashboardUserStateEntity, ComponentEntity, AccessControlRuleEntity, ArtifactUseEntity, PublicLinkEntity, ArtifactTypeEntity, AIVendorTypeEntity, ArtifactEntity, AIAgentExampleEntity, ConversationArtifactEntity, CollectionPermissionEntity, AIAgentPromptEntity, ComponentLibraryEntity, ScheduledJobTypeEntity, DashboardUserPreferenceEntity, QueryParameterEntity, ConversationDetailRatingEntity, AIAgentPermissionEntity, AIAgentRelationshipEntity, ComponentLibraryLinkEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, ScheduledJobEntity, AIPromptRunEntity, AIAgentRunStepEntity, ConversationDetailArtifactEntity, TaskEntity, ProjectEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, ArtifactVersionEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity, ArtifactVersionAttributeEntity, AIAgentDataSourceEntity } from '@memberjunction/core-entities';
|
|
22
|
+
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, TestRunFeedbackEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, ComponentRegistryEntity, AIAgentNoteTypeEntity, ComponentDependencyEntity, AIAgentRunEntity, TestEntity, TestTypeEntity, AIVendorEntity, TaskTypeEntity, AIConfigurationEntity, AIAgentEntity, AIAgentStepEntity, AIModelCostEntity, AIPromptModelEntity, AIAgentTypeEntity, AIAgentConfigurationEntity, TestSuiteTestEntity, AIAgentNoteEntity, EnvironmentEntity, ArtifactPermissionEntity, AIAgentActionEntity, TestRubricEntity, TaskDependencyEntity, CollectionArtifactEntity, AIModelPriceTypeEntity, CollectionEntity, RecordLinkEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, TestRunEntity, AIAgentArtifactTypeEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, ScheduledJobRunEntity, DashboardUserStateEntity, ComponentEntity, AccessControlRuleEntity, ArtifactUseEntity, PublicLinkEntity, ArtifactTypeEntity, AIVendorTypeEntity, ArtifactEntity, AIAgentExampleEntity, TestSuiteEntity, ConversationArtifactEntity, CollectionPermissionEntity, AIAgentPromptEntity, ComponentLibraryEntity, ScheduledJobTypeEntity, DashboardUserPreferenceEntity, QueryParameterEntity, ConversationDetailRatingEntity, AIAgentPermissionEntity, AIAgentRelationshipEntity, ComponentLibraryLinkEntity, TestSuiteRunEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, ScheduledJobEntity, AIPromptRunEntity, AIAgentRunStepEntity, ConversationDetailArtifactEntity, TaskEntity, ProjectEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, ArtifactVersionEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity, ArtifactVersionAttributeEntity, AIAgentDataSourceEntity } from '@memberjunction/core-entities';
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
//****************************************************************************
|
|
@@ -695,6 +695,204 @@ export class MJExplorerNavigationItemResolver extends ResolverBase {
|
|
|
695
695
|
|
|
696
696
|
}
|
|
697
697
|
|
|
698
|
+
//****************************************************************************
|
|
699
|
+
// ENTITY CLASS for MJ: Test Run Feedbacks
|
|
700
|
+
//****************************************************************************
|
|
701
|
+
@ObjectType({ description: `Human-in-the-loop feedback on test run results. Allows human reviewers to validate, correct, or override automated test results. Essential for training and improving automated evaluation criteria.` })
|
|
702
|
+
export class MJTestRunFeedback_ {
|
|
703
|
+
@Field()
|
|
704
|
+
@MaxLength(16)
|
|
705
|
+
ID: string;
|
|
706
|
+
|
|
707
|
+
@Field({description: `Foreign Key - The test run being reviewed`})
|
|
708
|
+
@MaxLength(16)
|
|
709
|
+
TestRunID: string;
|
|
710
|
+
|
|
711
|
+
@Field({description: `Foreign Key - The user providing the feedback`})
|
|
712
|
+
@MaxLength(16)
|
|
713
|
+
ReviewerUserID: string;
|
|
714
|
+
|
|
715
|
+
@Field(() => Int, {nullable: true, description: `Numeric rating from 1 (poor) to 10 (excellent). Allows quantitative tracking of result quality.`})
|
|
716
|
+
Rating?: number;
|
|
717
|
+
|
|
718
|
+
@Field(() => Boolean, {nullable: true, description: `Boolean indicating if the automated test result was correct. Can override automated Pass/Fail status.`})
|
|
719
|
+
IsCorrect?: boolean;
|
|
720
|
+
|
|
721
|
+
@Field({nullable: true, description: `Summary of corrections or adjustments made by the human reviewer`})
|
|
722
|
+
CorrectionSummary?: string;
|
|
723
|
+
|
|
724
|
+
@Field({nullable: true, description: `Free-form comments from the reviewer about the test result, quality, or issues found`})
|
|
725
|
+
Comments?: string;
|
|
726
|
+
|
|
727
|
+
@Field({description: `Timestamp when the feedback was provided`})
|
|
728
|
+
@MaxLength(8)
|
|
729
|
+
ReviewedAt: Date;
|
|
730
|
+
|
|
731
|
+
@Field()
|
|
732
|
+
@MaxLength(10)
|
|
733
|
+
_mj__CreatedAt: Date;
|
|
734
|
+
|
|
735
|
+
@Field()
|
|
736
|
+
@MaxLength(10)
|
|
737
|
+
_mj__UpdatedAt: Date;
|
|
738
|
+
|
|
739
|
+
@Field()
|
|
740
|
+
@MaxLength(200)
|
|
741
|
+
ReviewerUser: string;
|
|
742
|
+
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
//****************************************************************************
|
|
746
|
+
// INPUT TYPE for MJ: Test Run Feedbacks
|
|
747
|
+
//****************************************************************************
|
|
748
|
+
@InputType()
|
|
749
|
+
export class CreateMJTestRunFeedbackInput {
|
|
750
|
+
@Field({ nullable: true })
|
|
751
|
+
ID?: string;
|
|
752
|
+
|
|
753
|
+
@Field({ nullable: true })
|
|
754
|
+
TestRunID?: string;
|
|
755
|
+
|
|
756
|
+
@Field({ nullable: true })
|
|
757
|
+
ReviewerUserID?: string;
|
|
758
|
+
|
|
759
|
+
@Field(() => Int, { nullable: true })
|
|
760
|
+
Rating: number | null;
|
|
761
|
+
|
|
762
|
+
@Field(() => Boolean, { nullable: true })
|
|
763
|
+
IsCorrect: boolean | null;
|
|
764
|
+
|
|
765
|
+
@Field({ nullable: true })
|
|
766
|
+
CorrectionSummary: string | null;
|
|
767
|
+
|
|
768
|
+
@Field({ nullable: true })
|
|
769
|
+
Comments: string | null;
|
|
770
|
+
|
|
771
|
+
@Field({ nullable: true })
|
|
772
|
+
ReviewedAt?: Date;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
//****************************************************************************
|
|
777
|
+
// INPUT TYPE for MJ: Test Run Feedbacks
|
|
778
|
+
//****************************************************************************
|
|
779
|
+
@InputType()
|
|
780
|
+
export class UpdateMJTestRunFeedbackInput {
|
|
781
|
+
@Field()
|
|
782
|
+
ID: string;
|
|
783
|
+
|
|
784
|
+
@Field({ nullable: true })
|
|
785
|
+
TestRunID?: string;
|
|
786
|
+
|
|
787
|
+
@Field({ nullable: true })
|
|
788
|
+
ReviewerUserID?: string;
|
|
789
|
+
|
|
790
|
+
@Field(() => Int, { nullable: true })
|
|
791
|
+
Rating?: number | null;
|
|
792
|
+
|
|
793
|
+
@Field(() => Boolean, { nullable: true })
|
|
794
|
+
IsCorrect?: boolean | null;
|
|
795
|
+
|
|
796
|
+
@Field({ nullable: true })
|
|
797
|
+
CorrectionSummary?: string | null;
|
|
798
|
+
|
|
799
|
+
@Field({ nullable: true })
|
|
800
|
+
Comments?: string | null;
|
|
801
|
+
|
|
802
|
+
@Field({ nullable: true })
|
|
803
|
+
ReviewedAt?: Date;
|
|
804
|
+
|
|
805
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
806
|
+
OldValues___?: KeyValuePairInput[];
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
//****************************************************************************
|
|
810
|
+
// RESOLVER for MJ: Test Run Feedbacks
|
|
811
|
+
//****************************************************************************
|
|
812
|
+
@ObjectType()
|
|
813
|
+
export class RunMJTestRunFeedbackViewResult {
|
|
814
|
+
@Field(() => [MJTestRunFeedback_])
|
|
815
|
+
Results: MJTestRunFeedback_[];
|
|
816
|
+
|
|
817
|
+
@Field(() => String, {nullable: true})
|
|
818
|
+
UserViewRunID?: string;
|
|
819
|
+
|
|
820
|
+
@Field(() => Int, {nullable: true})
|
|
821
|
+
RowCount: number;
|
|
822
|
+
|
|
823
|
+
@Field(() => Int, {nullable: true})
|
|
824
|
+
TotalRowCount: number;
|
|
825
|
+
|
|
826
|
+
@Field(() => Int, {nullable: true})
|
|
827
|
+
ExecutionTime: number;
|
|
828
|
+
|
|
829
|
+
@Field({nullable: true})
|
|
830
|
+
ErrorMessage?: string;
|
|
831
|
+
|
|
832
|
+
@Field(() => Boolean, {nullable: false})
|
|
833
|
+
Success: boolean;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
@Resolver(MJTestRunFeedback_)
|
|
837
|
+
export class MJTestRunFeedbackResolver extends ResolverBase {
|
|
838
|
+
@Query(() => RunMJTestRunFeedbackViewResult)
|
|
839
|
+
async RunMJTestRunFeedbackViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
840
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
841
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
@Query(() => RunMJTestRunFeedbackViewResult)
|
|
845
|
+
async RunMJTestRunFeedbackViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
846
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
847
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
@Query(() => RunMJTestRunFeedbackViewResult)
|
|
851
|
+
async RunMJTestRunFeedbackDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
852
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
853
|
+
input.EntityName = 'MJ: Test Run Feedbacks';
|
|
854
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
855
|
+
}
|
|
856
|
+
@Query(() => MJTestRunFeedback_, { nullable: true })
|
|
857
|
+
async MJTestRunFeedback(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTestRunFeedback_ | null> {
|
|
858
|
+
this.CheckUserReadPermissions('MJ: Test Run Feedbacks', userPayload);
|
|
859
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
860
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
861
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRunFeedbacks] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Run Feedbacks', userPayload, EntityPermissionType.Read, 'AND');
|
|
862
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
863
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Test Run Feedbacks', rows && rows.length > 0 ? rows[0] : {})
|
|
864
|
+
return result;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
@Mutation(() => MJTestRunFeedback_)
|
|
868
|
+
async CreateMJTestRunFeedback(
|
|
869
|
+
@Arg('input', () => CreateMJTestRunFeedbackInput) input: CreateMJTestRunFeedbackInput,
|
|
870
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
871
|
+
@PubSub() pubSub: PubSubEngine
|
|
872
|
+
) {
|
|
873
|
+
const provider = GetReadWriteProvider(providers);
|
|
874
|
+
return this.CreateRecord('MJ: Test Run Feedbacks', input, provider, userPayload, pubSub)
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
@Mutation(() => MJTestRunFeedback_)
|
|
878
|
+
async UpdateMJTestRunFeedback(
|
|
879
|
+
@Arg('input', () => UpdateMJTestRunFeedbackInput) input: UpdateMJTestRunFeedbackInput,
|
|
880
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
881
|
+
@PubSub() pubSub: PubSubEngine
|
|
882
|
+
) {
|
|
883
|
+
const provider = GetReadWriteProvider(providers);
|
|
884
|
+
return this.UpdateRecord('MJ: Test Run Feedbacks', input, provider, userPayload, pubSub);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
@Mutation(() => MJTestRunFeedback_)
|
|
888
|
+
async DeleteMJTestRunFeedback(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
889
|
+
const provider = GetReadWriteProvider(providers);
|
|
890
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
891
|
+
return this.DeleteRecord('MJ: Test Run Feedbacks', key, options, provider, userPayload, pubSub);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
}
|
|
895
|
+
|
|
698
896
|
//****************************************************************************
|
|
699
897
|
// ENTITY CLASS for Generated Code Categories
|
|
700
898
|
//****************************************************************************
|
|
@@ -1744,10 +1942,18 @@ each time the agent processes a prompt step.`})
|
|
|
1744
1942
|
@MaxLength(16)
|
|
1745
1943
|
ScheduledJobRunID?: string;
|
|
1746
1944
|
|
|
1945
|
+
@Field({nullable: true, description: `Optional Foreign Key - Links this agent run to a test run if this execution was part of a test. Allows navigation from agent execution to test context.`})
|
|
1946
|
+
@MaxLength(16)
|
|
1947
|
+
TestRunID?: string;
|
|
1948
|
+
|
|
1747
1949
|
@Field({nullable: true})
|
|
1748
1950
|
@MaxLength(510)
|
|
1749
1951
|
Agent?: string;
|
|
1750
1952
|
|
|
1953
|
+
@Field({nullable: true})
|
|
1954
|
+
@MaxLength(510)
|
|
1955
|
+
ParentRun?: string;
|
|
1956
|
+
|
|
1751
1957
|
@Field({nullable: true})
|
|
1752
1958
|
@MaxLength(510)
|
|
1753
1959
|
Conversation?: string;
|
|
@@ -1756,6 +1962,13 @@ each time the agent processes a prompt step.`})
|
|
|
1756
1962
|
@MaxLength(200)
|
|
1757
1963
|
User?: string;
|
|
1758
1964
|
|
|
1965
|
+
@Field({nullable: true})
|
|
1966
|
+
ConversationDetail?: string;
|
|
1967
|
+
|
|
1968
|
+
@Field({nullable: true})
|
|
1969
|
+
@MaxLength(510)
|
|
1970
|
+
LastRun?: string;
|
|
1971
|
+
|
|
1759
1972
|
@Field({nullable: true})
|
|
1760
1973
|
@MaxLength(200)
|
|
1761
1974
|
Configuration?: string;
|
|
@@ -1768,6 +1981,10 @@ each time the agent processes a prompt step.`})
|
|
|
1768
1981
|
@MaxLength(100)
|
|
1769
1982
|
OverrideVendor?: string;
|
|
1770
1983
|
|
|
1984
|
+
@Field({nullable: true})
|
|
1985
|
+
@MaxLength(400)
|
|
1986
|
+
ScheduledJobRun?: string;
|
|
1987
|
+
|
|
1771
1988
|
@Field({nullable: true})
|
|
1772
1989
|
@MaxLength(16)
|
|
1773
1990
|
RootParentRunID?: string;
|
|
@@ -1911,6 +2128,9 @@ export class CreateMJAIAgentRunInput {
|
|
|
1911
2128
|
|
|
1912
2129
|
@Field({ nullable: true })
|
|
1913
2130
|
ScheduledJobRunID: string | null;
|
|
2131
|
+
|
|
2132
|
+
@Field({ nullable: true })
|
|
2133
|
+
TestRunID: string | null;
|
|
1914
2134
|
}
|
|
1915
2135
|
|
|
1916
2136
|
|
|
@@ -2033,6 +2253,9 @@ export class UpdateMJAIAgentRunInput {
|
|
|
2033
2253
|
@Field({ nullable: true })
|
|
2034
2254
|
ScheduledJobRunID?: string | null;
|
|
2035
2255
|
|
|
2256
|
+
@Field({ nullable: true })
|
|
2257
|
+
TestRunID?: string | null;
|
|
2258
|
+
|
|
2036
2259
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
2037
2260
|
OldValues___?: KeyValuePairInput[];
|
|
2038
2261
|
}
|
|
@@ -2179,6 +2402,472 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
2179
2402
|
|
|
2180
2403
|
}
|
|
2181
2404
|
|
|
2405
|
+
//****************************************************************************
|
|
2406
|
+
// ENTITY CLASS for MJ: Tests
|
|
2407
|
+
//****************************************************************************
|
|
2408
|
+
@ObjectType({ description: `Individual test definitions. Each test has a specific type (via TypeID) which determines how it executes. Tests store their inputs, expected outcomes, and configuration as JSON, allowing flexibility for different test types while maintaining a common schema.` })
|
|
2409
|
+
export class MJTest_ {
|
|
2410
|
+
@Field()
|
|
2411
|
+
@MaxLength(16)
|
|
2412
|
+
ID: string;
|
|
2413
|
+
|
|
2414
|
+
@Field({description: `Foreign Key - The type of test (e.g., Agent Eval, Workflow Test). Determines which driver class handles execution.`})
|
|
2415
|
+
@MaxLength(16)
|
|
2416
|
+
TypeID: string;
|
|
2417
|
+
|
|
2418
|
+
@Field({description: `Name of the test (e.g., "Pie Chart with Drilldown", "Memory Recall Accuracy")`})
|
|
2419
|
+
@MaxLength(510)
|
|
2420
|
+
Name: string;
|
|
2421
|
+
|
|
2422
|
+
@Field({nullable: true, description: `Detailed description of what this test validates and why it matters`})
|
|
2423
|
+
Description?: string;
|
|
2424
|
+
|
|
2425
|
+
@Field({description: `Status of the test: Pending (being configured), Active (ready to run), Disabled (archived/not in use)`})
|
|
2426
|
+
@MaxLength(40)
|
|
2427
|
+
Status: string;
|
|
2428
|
+
|
|
2429
|
+
@Field({nullable: true, description: `JSON object defining the inputs/parameters for the test. Structure varies by test type (e.g., for Agent Eval: {prompt, context, conversationHistory})`})
|
|
2430
|
+
InputDefinition?: string;
|
|
2431
|
+
|
|
2432
|
+
@Field({nullable: true, description: `JSON object defining what success looks like. Structure varies by test type (e.g., for Agent Eval: {toolCalls, outputFormat, semanticGoals, dataAssertions})`})
|
|
2433
|
+
ExpectedOutcomes?: string;
|
|
2434
|
+
|
|
2435
|
+
@Field({nullable: true, description: `JSON object for test-specific configuration (e.g., oracles to use, rubrics, retry policies, timeout settings)`})
|
|
2436
|
+
Configuration?: string;
|
|
2437
|
+
|
|
2438
|
+
@Field({nullable: true, description: `JSON array of tags for categorization and filtering (e.g., ["smoke", "agent-quality", "performance"])`})
|
|
2439
|
+
Tags?: string;
|
|
2440
|
+
|
|
2441
|
+
@Field(() => Int, {nullable: true, description: `Priority for execution ordering. Lower numbers run first. Useful for dependencies or critical path tests.`})
|
|
2442
|
+
Priority?: number;
|
|
2443
|
+
|
|
2444
|
+
@Field(() => Int, {nullable: true, description: `Estimated execution time in seconds. Used for scheduling and timeout calculations.`})
|
|
2445
|
+
EstimatedDurationSeconds?: number;
|
|
2446
|
+
|
|
2447
|
+
@Field(() => Float, {nullable: true, description: `Estimated cost in USD for running this test (e.g., LLM token costs, compute resources). Used for budgeting and optimization.`})
|
|
2448
|
+
EstimatedCostUSD?: number;
|
|
2449
|
+
|
|
2450
|
+
@Field()
|
|
2451
|
+
@MaxLength(10)
|
|
2452
|
+
_mj__CreatedAt: Date;
|
|
2453
|
+
|
|
2454
|
+
@Field()
|
|
2455
|
+
@MaxLength(10)
|
|
2456
|
+
_mj__UpdatedAt: Date;
|
|
2457
|
+
|
|
2458
|
+
@Field(() => Int, {nullable: true, description: `Number of times to repeat this test execution. NULL or 1 = single execution. Values > 1 will create multiple test runs for statistical analysis.`})
|
|
2459
|
+
RepeatCount?: number;
|
|
2460
|
+
|
|
2461
|
+
@Field()
|
|
2462
|
+
@MaxLength(200)
|
|
2463
|
+
Type: string;
|
|
2464
|
+
|
|
2465
|
+
@Field(() => [MJTestRun_])
|
|
2466
|
+
MJ_TestRuns_TestIDArray: MJTestRun_[]; // Link to MJ_TestRuns
|
|
2467
|
+
|
|
2468
|
+
@Field(() => [MJTestSuiteTest_])
|
|
2469
|
+
MJ_TestSuiteTests_TestIDArray: MJTestSuiteTest_[]; // Link to MJ_TestSuiteTests
|
|
2470
|
+
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
//****************************************************************************
|
|
2474
|
+
// INPUT TYPE for MJ: Tests
|
|
2475
|
+
//****************************************************************************
|
|
2476
|
+
@InputType()
|
|
2477
|
+
export class CreateMJTestInput {
|
|
2478
|
+
@Field({ nullable: true })
|
|
2479
|
+
ID?: string;
|
|
2480
|
+
|
|
2481
|
+
@Field({ nullable: true })
|
|
2482
|
+
TypeID?: string;
|
|
2483
|
+
|
|
2484
|
+
@Field({ nullable: true })
|
|
2485
|
+
Name?: string;
|
|
2486
|
+
|
|
2487
|
+
@Field({ nullable: true })
|
|
2488
|
+
Description: string | null;
|
|
2489
|
+
|
|
2490
|
+
@Field({ nullable: true })
|
|
2491
|
+
Status?: string;
|
|
2492
|
+
|
|
2493
|
+
@Field({ nullable: true })
|
|
2494
|
+
InputDefinition: string | null;
|
|
2495
|
+
|
|
2496
|
+
@Field({ nullable: true })
|
|
2497
|
+
ExpectedOutcomes: string | null;
|
|
2498
|
+
|
|
2499
|
+
@Field({ nullable: true })
|
|
2500
|
+
Configuration: string | null;
|
|
2501
|
+
|
|
2502
|
+
@Field({ nullable: true })
|
|
2503
|
+
Tags: string | null;
|
|
2504
|
+
|
|
2505
|
+
@Field(() => Int, { nullable: true })
|
|
2506
|
+
Priority?: number | null;
|
|
2507
|
+
|
|
2508
|
+
@Field(() => Int, { nullable: true })
|
|
2509
|
+
EstimatedDurationSeconds: number | null;
|
|
2510
|
+
|
|
2511
|
+
@Field(() => Float, { nullable: true })
|
|
2512
|
+
EstimatedCostUSD: number | null;
|
|
2513
|
+
|
|
2514
|
+
@Field(() => Int, { nullable: true })
|
|
2515
|
+
RepeatCount: number | null;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
|
|
2519
|
+
//****************************************************************************
|
|
2520
|
+
// INPUT TYPE for MJ: Tests
|
|
2521
|
+
//****************************************************************************
|
|
2522
|
+
@InputType()
|
|
2523
|
+
export class UpdateMJTestInput {
|
|
2524
|
+
@Field()
|
|
2525
|
+
ID: string;
|
|
2526
|
+
|
|
2527
|
+
@Field({ nullable: true })
|
|
2528
|
+
TypeID?: string;
|
|
2529
|
+
|
|
2530
|
+
@Field({ nullable: true })
|
|
2531
|
+
Name?: string;
|
|
2532
|
+
|
|
2533
|
+
@Field({ nullable: true })
|
|
2534
|
+
Description?: string | null;
|
|
2535
|
+
|
|
2536
|
+
@Field({ nullable: true })
|
|
2537
|
+
Status?: string;
|
|
2538
|
+
|
|
2539
|
+
@Field({ nullable: true })
|
|
2540
|
+
InputDefinition?: string | null;
|
|
2541
|
+
|
|
2542
|
+
@Field({ nullable: true })
|
|
2543
|
+
ExpectedOutcomes?: string | null;
|
|
2544
|
+
|
|
2545
|
+
@Field({ nullable: true })
|
|
2546
|
+
Configuration?: string | null;
|
|
2547
|
+
|
|
2548
|
+
@Field({ nullable: true })
|
|
2549
|
+
Tags?: string | null;
|
|
2550
|
+
|
|
2551
|
+
@Field(() => Int, { nullable: true })
|
|
2552
|
+
Priority?: number | null;
|
|
2553
|
+
|
|
2554
|
+
@Field(() => Int, { nullable: true })
|
|
2555
|
+
EstimatedDurationSeconds?: number | null;
|
|
2556
|
+
|
|
2557
|
+
@Field(() => Float, { nullable: true })
|
|
2558
|
+
EstimatedCostUSD?: number | null;
|
|
2559
|
+
|
|
2560
|
+
@Field(() => Int, { nullable: true })
|
|
2561
|
+
RepeatCount?: number | null;
|
|
2562
|
+
|
|
2563
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
2564
|
+
OldValues___?: KeyValuePairInput[];
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
//****************************************************************************
|
|
2568
|
+
// RESOLVER for MJ: Tests
|
|
2569
|
+
//****************************************************************************
|
|
2570
|
+
@ObjectType()
|
|
2571
|
+
export class RunMJTestViewResult {
|
|
2572
|
+
@Field(() => [MJTest_])
|
|
2573
|
+
Results: MJTest_[];
|
|
2574
|
+
|
|
2575
|
+
@Field(() => String, {nullable: true})
|
|
2576
|
+
UserViewRunID?: string;
|
|
2577
|
+
|
|
2578
|
+
@Field(() => Int, {nullable: true})
|
|
2579
|
+
RowCount: number;
|
|
2580
|
+
|
|
2581
|
+
@Field(() => Int, {nullable: true})
|
|
2582
|
+
TotalRowCount: number;
|
|
2583
|
+
|
|
2584
|
+
@Field(() => Int, {nullable: true})
|
|
2585
|
+
ExecutionTime: number;
|
|
2586
|
+
|
|
2587
|
+
@Field({nullable: true})
|
|
2588
|
+
ErrorMessage?: string;
|
|
2589
|
+
|
|
2590
|
+
@Field(() => Boolean, {nullable: false})
|
|
2591
|
+
Success: boolean;
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
@Resolver(MJTest_)
|
|
2595
|
+
export class MJTestResolver extends ResolverBase {
|
|
2596
|
+
@Query(() => RunMJTestViewResult)
|
|
2597
|
+
async RunMJTestViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2598
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2599
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
@Query(() => RunMJTestViewResult)
|
|
2603
|
+
async RunMJTestViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2604
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2605
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
@Query(() => RunMJTestViewResult)
|
|
2609
|
+
async RunMJTestDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2610
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2611
|
+
input.EntityName = 'MJ: Tests';
|
|
2612
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
2613
|
+
}
|
|
2614
|
+
@Query(() => MJTest_, { nullable: true })
|
|
2615
|
+
async MJTest(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTest_ | null> {
|
|
2616
|
+
this.CheckUserReadPermissions('MJ: Tests', userPayload);
|
|
2617
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2618
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2619
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTests] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tests', userPayload, EntityPermissionType.Read, 'AND');
|
|
2620
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2621
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Tests', rows && rows.length > 0 ? rows[0] : {})
|
|
2622
|
+
return result;
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
@FieldResolver(() => [MJTestRun_])
|
|
2626
|
+
async MJ_TestRuns_TestIDArray(@Root() mjtest_: MJTest_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2627
|
+
this.CheckUserReadPermissions('MJ: Test Runs', userPayload);
|
|
2628
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2629
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2630
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRuns] WHERE [TestID]='${mjtest_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2631
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2632
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Runs', rows);
|
|
2633
|
+
return result;
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
@FieldResolver(() => [MJTestSuiteTest_])
|
|
2637
|
+
async MJ_TestSuiteTests_TestIDArray(@Root() mjtest_: MJTest_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2638
|
+
this.CheckUserReadPermissions('MJ: Test Suite Tests', userPayload);
|
|
2639
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2640
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2641
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestSuiteTests] WHERE [TestID]='${mjtest_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suite Tests', userPayload, EntityPermissionType.Read, 'AND');
|
|
2642
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2643
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Suite Tests', rows);
|
|
2644
|
+
return result;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
@Mutation(() => MJTest_)
|
|
2648
|
+
async CreateMJTest(
|
|
2649
|
+
@Arg('input', () => CreateMJTestInput) input: CreateMJTestInput,
|
|
2650
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
2651
|
+
@PubSub() pubSub: PubSubEngine
|
|
2652
|
+
) {
|
|
2653
|
+
const provider = GetReadWriteProvider(providers);
|
|
2654
|
+
return this.CreateRecord('MJ: Tests', input, provider, userPayload, pubSub)
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2657
|
+
@Mutation(() => MJTest_)
|
|
2658
|
+
async UpdateMJTest(
|
|
2659
|
+
@Arg('input', () => UpdateMJTestInput) input: UpdateMJTestInput,
|
|
2660
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
2661
|
+
@PubSub() pubSub: PubSubEngine
|
|
2662
|
+
) {
|
|
2663
|
+
const provider = GetReadWriteProvider(providers);
|
|
2664
|
+
return this.UpdateRecord('MJ: Tests', input, provider, userPayload, pubSub);
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2667
|
+
@Mutation(() => MJTest_)
|
|
2668
|
+
async DeleteMJTest(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2669
|
+
const provider = GetReadWriteProvider(providers);
|
|
2670
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
2671
|
+
return this.DeleteRecord('MJ: Tests', key, options, provider, userPayload, pubSub);
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2676
|
+
//****************************************************************************
|
|
2677
|
+
// ENTITY CLASS for MJ: Test Types
|
|
2678
|
+
//****************************************************************************
|
|
2679
|
+
@ObjectType({ description: `Defines test type drivers that can be dynamically instantiated via MJGlobal.Instance.ClassFactory.CreateInstance(BaseTestDriver, DriverClass). Each test type represents a different category of testing (e.g., Agent Evals, Workflow Tests, Code Generation Tests).` })
|
|
2680
|
+
export class MJTestType_ {
|
|
2681
|
+
@Field()
|
|
2682
|
+
@MaxLength(16)
|
|
2683
|
+
ID: string;
|
|
2684
|
+
|
|
2685
|
+
@Field({description: `Unique name for the test type (e.g., "Agent Eval", "Workflow Test", "Code Generation Test")`})
|
|
2686
|
+
@MaxLength(200)
|
|
2687
|
+
Name: string;
|
|
2688
|
+
|
|
2689
|
+
@Field({nullable: true, description: `Detailed description of what this test type validates and how it works`})
|
|
2690
|
+
Description?: string;
|
|
2691
|
+
|
|
2692
|
+
@Field({description: `Class name for the driver implementation (e.g., "AgentEvalDriver"). Used with ClassFactory to instantiate the appropriate BaseTestDriver subclass.`})
|
|
2693
|
+
@MaxLength(510)
|
|
2694
|
+
DriverClass: string;
|
|
2695
|
+
|
|
2696
|
+
@Field({description: `Status of the test type: Pending (under development), Active (available for use), Disabled (no longer available)`})
|
|
2697
|
+
@MaxLength(40)
|
|
2698
|
+
Status: string;
|
|
2699
|
+
|
|
2700
|
+
@Field()
|
|
2701
|
+
@MaxLength(10)
|
|
2702
|
+
_mj__CreatedAt: Date;
|
|
2703
|
+
|
|
2704
|
+
@Field()
|
|
2705
|
+
@MaxLength(10)
|
|
2706
|
+
_mj__UpdatedAt: Date;
|
|
2707
|
+
|
|
2708
|
+
@Field(() => [MJTestRubric_])
|
|
2709
|
+
MJ_TestRubrics_TypeIDArray: MJTestRubric_[]; // Link to MJ_TestRubrics
|
|
2710
|
+
|
|
2711
|
+
@Field(() => [MJTest_])
|
|
2712
|
+
MJ_Tests_TypeIDArray: MJTest_[]; // Link to MJ_Tests
|
|
2713
|
+
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
//****************************************************************************
|
|
2717
|
+
// INPUT TYPE for MJ: Test Types
|
|
2718
|
+
//****************************************************************************
|
|
2719
|
+
@InputType()
|
|
2720
|
+
export class CreateMJTestTypeInput {
|
|
2721
|
+
@Field({ nullable: true })
|
|
2722
|
+
ID?: string;
|
|
2723
|
+
|
|
2724
|
+
@Field({ nullable: true })
|
|
2725
|
+
Name?: string;
|
|
2726
|
+
|
|
2727
|
+
@Field({ nullable: true })
|
|
2728
|
+
Description: string | null;
|
|
2729
|
+
|
|
2730
|
+
@Field({ nullable: true })
|
|
2731
|
+
DriverClass?: string;
|
|
2732
|
+
|
|
2733
|
+
@Field({ nullable: true })
|
|
2734
|
+
Status?: string;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
|
|
2738
|
+
//****************************************************************************
|
|
2739
|
+
// INPUT TYPE for MJ: Test Types
|
|
2740
|
+
//****************************************************************************
|
|
2741
|
+
@InputType()
|
|
2742
|
+
export class UpdateMJTestTypeInput {
|
|
2743
|
+
@Field()
|
|
2744
|
+
ID: string;
|
|
2745
|
+
|
|
2746
|
+
@Field({ nullable: true })
|
|
2747
|
+
Name?: string;
|
|
2748
|
+
|
|
2749
|
+
@Field({ nullable: true })
|
|
2750
|
+
Description?: string | null;
|
|
2751
|
+
|
|
2752
|
+
@Field({ nullable: true })
|
|
2753
|
+
DriverClass?: string;
|
|
2754
|
+
|
|
2755
|
+
@Field({ nullable: true })
|
|
2756
|
+
Status?: string;
|
|
2757
|
+
|
|
2758
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
2759
|
+
OldValues___?: KeyValuePairInput[];
|
|
2760
|
+
}
|
|
2761
|
+
|
|
2762
|
+
//****************************************************************************
|
|
2763
|
+
// RESOLVER for MJ: Test Types
|
|
2764
|
+
//****************************************************************************
|
|
2765
|
+
@ObjectType()
|
|
2766
|
+
export class RunMJTestTypeViewResult {
|
|
2767
|
+
@Field(() => [MJTestType_])
|
|
2768
|
+
Results: MJTestType_[];
|
|
2769
|
+
|
|
2770
|
+
@Field(() => String, {nullable: true})
|
|
2771
|
+
UserViewRunID?: string;
|
|
2772
|
+
|
|
2773
|
+
@Field(() => Int, {nullable: true})
|
|
2774
|
+
RowCount: number;
|
|
2775
|
+
|
|
2776
|
+
@Field(() => Int, {nullable: true})
|
|
2777
|
+
TotalRowCount: number;
|
|
2778
|
+
|
|
2779
|
+
@Field(() => Int, {nullable: true})
|
|
2780
|
+
ExecutionTime: number;
|
|
2781
|
+
|
|
2782
|
+
@Field({nullable: true})
|
|
2783
|
+
ErrorMessage?: string;
|
|
2784
|
+
|
|
2785
|
+
@Field(() => Boolean, {nullable: false})
|
|
2786
|
+
Success: boolean;
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
@Resolver(MJTestType_)
|
|
2790
|
+
export class MJTestTypeResolver extends ResolverBase {
|
|
2791
|
+
@Query(() => RunMJTestTypeViewResult)
|
|
2792
|
+
async RunMJTestTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2793
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2794
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
@Query(() => RunMJTestTypeViewResult)
|
|
2798
|
+
async RunMJTestTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2799
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2800
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2803
|
+
@Query(() => RunMJTestTypeViewResult)
|
|
2804
|
+
async RunMJTestTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2805
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2806
|
+
input.EntityName = 'MJ: Test Types';
|
|
2807
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
2808
|
+
}
|
|
2809
|
+
@Query(() => MJTestType_, { nullable: true })
|
|
2810
|
+
async MJTestType(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTestType_ | null> {
|
|
2811
|
+
this.CheckUserReadPermissions('MJ: Test Types', userPayload);
|
|
2812
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2813
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2814
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestTypes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
2815
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2816
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Test Types', rows && rows.length > 0 ? rows[0] : {})
|
|
2817
|
+
return result;
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
@FieldResolver(() => [MJTestRubric_])
|
|
2821
|
+
async MJ_TestRubrics_TypeIDArray(@Root() mjtesttype_: MJTestType_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2822
|
+
this.CheckUserReadPermissions('MJ: Test Rubrics', userPayload);
|
|
2823
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2824
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2825
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRubrics] WHERE [TypeID]='${mjtesttype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Rubrics', userPayload, EntityPermissionType.Read, 'AND');
|
|
2826
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2827
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Rubrics', rows);
|
|
2828
|
+
return result;
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
@FieldResolver(() => [MJTest_])
|
|
2832
|
+
async MJ_Tests_TypeIDArray(@Root() mjtesttype_: MJTestType_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2833
|
+
this.CheckUserReadPermissions('MJ: Tests', userPayload);
|
|
2834
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2835
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2836
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTests] WHERE [TypeID]='${mjtesttype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tests', userPayload, EntityPermissionType.Read, 'AND');
|
|
2837
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2838
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Tests', rows);
|
|
2839
|
+
return result;
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
@Mutation(() => MJTestType_)
|
|
2843
|
+
async CreateMJTestType(
|
|
2844
|
+
@Arg('input', () => CreateMJTestTypeInput) input: CreateMJTestTypeInput,
|
|
2845
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
2846
|
+
@PubSub() pubSub: PubSubEngine
|
|
2847
|
+
) {
|
|
2848
|
+
const provider = GetReadWriteProvider(providers);
|
|
2849
|
+
return this.CreateRecord('MJ: Test Types', input, provider, userPayload, pubSub)
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
@Mutation(() => MJTestType_)
|
|
2853
|
+
async UpdateMJTestType(
|
|
2854
|
+
@Arg('input', () => UpdateMJTestTypeInput) input: UpdateMJTestTypeInput,
|
|
2855
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
2856
|
+
@PubSub() pubSub: PubSubEngine
|
|
2857
|
+
) {
|
|
2858
|
+
const provider = GetReadWriteProvider(providers);
|
|
2859
|
+
return this.UpdateRecord('MJ: Test Types', input, provider, userPayload, pubSub);
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
@Mutation(() => MJTestType_)
|
|
2863
|
+
async DeleteMJTestType(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2864
|
+
const provider = GetReadWriteProvider(providers);
|
|
2865
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
2866
|
+
return this.DeleteRecord('MJ: Test Types', key, options, provider, userPayload, pubSub);
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2182
2871
|
//****************************************************************************
|
|
2183
2872
|
// ENTITY CLASS for MJ: AI Vendors
|
|
2184
2873
|
//****************************************************************************
|
|
@@ -2638,6 +3327,9 @@ export class MJAIConfiguration_ {
|
|
|
2638
3327
|
@Field(() => [MJAIAgentPrompt_])
|
|
2639
3328
|
MJ_AIAgentPrompts_ConfigurationIDArray: MJAIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
2640
3329
|
|
|
3330
|
+
@Field(() => [MJAIAgentConfiguration_])
|
|
3331
|
+
MJ_AIAgentConfigurations_AIConfigurationIDArray: MJAIAgentConfiguration_[]; // Link to MJ_AIAgentConfigurations
|
|
3332
|
+
|
|
2641
3333
|
@Field(() => [MJAIPromptModel_])
|
|
2642
3334
|
MJ_AIPromptModels_ConfigurationIDArray: MJAIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
2643
3335
|
|
|
@@ -2790,6 +3482,17 @@ export class MJAIConfigurationResolver extends ResolverBase {
|
|
|
2790
3482
|
return result;
|
|
2791
3483
|
}
|
|
2792
3484
|
|
|
3485
|
+
@FieldResolver(() => [MJAIAgentConfiguration_])
|
|
3486
|
+
async MJ_AIAgentConfigurations_AIConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3487
|
+
this.CheckUserReadPermissions('MJ: AI Agent Configurations', userPayload);
|
|
3488
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3489
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3490
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentConfigurations] WHERE [AIConfigurationID]='${mjaiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
3491
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3492
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Configurations', rows);
|
|
3493
|
+
return result;
|
|
3494
|
+
}
|
|
3495
|
+
|
|
2793
3496
|
@FieldResolver(() => [MJAIPromptModel_])
|
|
2794
3497
|
async MJ_AIPromptModels_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2795
3498
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
@@ -3126,6 +3829,9 @@ if this limit is exceeded.`})
|
|
|
3126
3829
|
@Field(() => [MJAIAgentExample_])
|
|
3127
3830
|
MJ_AIAgentExamples_AgentIDArray: MJAIAgentExample_[]; // Link to MJ_AIAgentExamples
|
|
3128
3831
|
|
|
3832
|
+
@Field(() => [MJAIAgentConfiguration_])
|
|
3833
|
+
MJ_AIAgentConfigurations_AgentIDArray: MJAIAgentConfiguration_[]; // Link to MJ_AIAgentConfigurations
|
|
3834
|
+
|
|
3129
3835
|
@Field(() => [MJAIResultCache_])
|
|
3130
3836
|
AIResultCache_AgentIDArray: MJAIResultCache_[]; // Link to AIResultCache
|
|
3131
3837
|
|
|
@@ -3690,6 +4396,17 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
3690
4396
|
return result;
|
|
3691
4397
|
}
|
|
3692
4398
|
|
|
4399
|
+
@FieldResolver(() => [MJAIAgentConfiguration_])
|
|
4400
|
+
async MJ_AIAgentConfigurations_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4401
|
+
this.CheckUserReadPermissions('MJ: AI Agent Configurations', userPayload);
|
|
4402
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4403
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
4404
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentConfigurations] WHERE [AgentID]='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
4405
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
4406
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Configurations', rows);
|
|
4407
|
+
return result;
|
|
4408
|
+
}
|
|
4409
|
+
|
|
3693
4410
|
@FieldResolver(() => [MJAIResultCache_])
|
|
3694
4411
|
async AIResultCache_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3695
4412
|
this.CheckUserReadPermissions('AI Result Cache', userPayload);
|
|
@@ -4868,6 +5585,403 @@ export class MJAIAgentTypeResolver extends ResolverBase {
|
|
|
4868
5585
|
|
|
4869
5586
|
}
|
|
4870
5587
|
|
|
5588
|
+
//****************************************************************************
|
|
5589
|
+
// ENTITY CLASS for MJ: AI Agent Configurations
|
|
5590
|
+
//****************************************************************************
|
|
5591
|
+
@ObjectType({ description: `Defines semantic configuration presets for agents, allowing users to select between different AI model configurations (e.g., Fast, Balanced, High Quality) when executing an agent. Each preset maps to an AI Configuration which controls model selection across all prompts.` })
|
|
5592
|
+
export class MJAIAgentConfiguration_ {
|
|
5593
|
+
@Field({description: `Primary Key - Unique identifier for the agent configuration preset`})
|
|
5594
|
+
@MaxLength(16)
|
|
5595
|
+
ID: string;
|
|
5596
|
+
|
|
5597
|
+
@Field({description: `Foreign Key - The agent this configuration preset belongs to`})
|
|
5598
|
+
@MaxLength(16)
|
|
5599
|
+
AgentID: string;
|
|
5600
|
+
|
|
5601
|
+
@Field({description: `Code-friendly name for the preset (e.g., HighPower, Fast, Balanced). Used in API calls and metadata references.`})
|
|
5602
|
+
@MaxLength(200)
|
|
5603
|
+
Name: string;
|
|
5604
|
+
|
|
5605
|
+
@Field({description: `User-friendly display name shown in UI (e.g., "High Quality", "Quick Draft", "Maximum Detail")`})
|
|
5606
|
+
@MaxLength(400)
|
|
5607
|
+
DisplayName: string;
|
|
5608
|
+
|
|
5609
|
+
@Field({nullable: true, description: `Description shown to users explaining what this configuration does (e.g., "Uses Claude Opus for highest quality results")`})
|
|
5610
|
+
Description?: string;
|
|
5611
|
+
|
|
5612
|
+
@Field({nullable: true, description: `Foreign Key - Optional AI Configuration to use for this preset. If NULL, uses default configuration (prompts with ConfigurationID IS NULL)`})
|
|
5613
|
+
@MaxLength(16)
|
|
5614
|
+
AIConfigurationID?: string;
|
|
5615
|
+
|
|
5616
|
+
@Field(() => Boolean, {description: `Whether this is the default preset for the agent. Should have exactly one default per agent.`})
|
|
5617
|
+
IsDefault: boolean;
|
|
5618
|
+
|
|
5619
|
+
@Field(() => Int, {description: `Display order for UI. Lower numbers appear first. Typical values: 100 (Default), 200 (Fast), 300 (Balanced), 400 (High Quality)`})
|
|
5620
|
+
Priority: number;
|
|
5621
|
+
|
|
5622
|
+
@Field({description: `Status of the preset: Pending (being configured), Active (available for use), Revoked (no longer available)`})
|
|
5623
|
+
@MaxLength(40)
|
|
5624
|
+
Status: string;
|
|
5625
|
+
|
|
5626
|
+
@Field()
|
|
5627
|
+
@MaxLength(10)
|
|
5628
|
+
_mj__CreatedAt: Date;
|
|
5629
|
+
|
|
5630
|
+
@Field()
|
|
5631
|
+
@MaxLength(10)
|
|
5632
|
+
_mj__UpdatedAt: Date;
|
|
5633
|
+
|
|
5634
|
+
@Field({nullable: true})
|
|
5635
|
+
@MaxLength(510)
|
|
5636
|
+
Agent?: string;
|
|
5637
|
+
|
|
5638
|
+
@Field({nullable: true})
|
|
5639
|
+
@MaxLength(200)
|
|
5640
|
+
AIConfiguration?: string;
|
|
5641
|
+
|
|
5642
|
+
}
|
|
5643
|
+
|
|
5644
|
+
//****************************************************************************
|
|
5645
|
+
// INPUT TYPE for MJ: AI Agent Configurations
|
|
5646
|
+
//****************************************************************************
|
|
5647
|
+
@InputType()
|
|
5648
|
+
export class CreateMJAIAgentConfigurationInput {
|
|
5649
|
+
@Field({ nullable: true })
|
|
5650
|
+
ID?: string;
|
|
5651
|
+
|
|
5652
|
+
@Field({ nullable: true })
|
|
5653
|
+
AgentID?: string;
|
|
5654
|
+
|
|
5655
|
+
@Field({ nullable: true })
|
|
5656
|
+
Name?: string;
|
|
5657
|
+
|
|
5658
|
+
@Field({ nullable: true })
|
|
5659
|
+
DisplayName?: string;
|
|
5660
|
+
|
|
5661
|
+
@Field({ nullable: true })
|
|
5662
|
+
Description: string | null;
|
|
5663
|
+
|
|
5664
|
+
@Field({ nullable: true })
|
|
5665
|
+
AIConfigurationID: string | null;
|
|
5666
|
+
|
|
5667
|
+
@Field(() => Boolean, { nullable: true })
|
|
5668
|
+
IsDefault?: boolean;
|
|
5669
|
+
|
|
5670
|
+
@Field(() => Int, { nullable: true })
|
|
5671
|
+
Priority?: number;
|
|
5672
|
+
|
|
5673
|
+
@Field({ nullable: true })
|
|
5674
|
+
Status?: string;
|
|
5675
|
+
}
|
|
5676
|
+
|
|
5677
|
+
|
|
5678
|
+
//****************************************************************************
|
|
5679
|
+
// INPUT TYPE for MJ: AI Agent Configurations
|
|
5680
|
+
//****************************************************************************
|
|
5681
|
+
@InputType()
|
|
5682
|
+
export class UpdateMJAIAgentConfigurationInput {
|
|
5683
|
+
@Field()
|
|
5684
|
+
ID: string;
|
|
5685
|
+
|
|
5686
|
+
@Field({ nullable: true })
|
|
5687
|
+
AgentID?: string;
|
|
5688
|
+
|
|
5689
|
+
@Field({ nullable: true })
|
|
5690
|
+
Name?: string;
|
|
5691
|
+
|
|
5692
|
+
@Field({ nullable: true })
|
|
5693
|
+
DisplayName?: string;
|
|
5694
|
+
|
|
5695
|
+
@Field({ nullable: true })
|
|
5696
|
+
Description?: string | null;
|
|
5697
|
+
|
|
5698
|
+
@Field({ nullable: true })
|
|
5699
|
+
AIConfigurationID?: string | null;
|
|
5700
|
+
|
|
5701
|
+
@Field(() => Boolean, { nullable: true })
|
|
5702
|
+
IsDefault?: boolean;
|
|
5703
|
+
|
|
5704
|
+
@Field(() => Int, { nullable: true })
|
|
5705
|
+
Priority?: number;
|
|
5706
|
+
|
|
5707
|
+
@Field({ nullable: true })
|
|
5708
|
+
Status?: string;
|
|
5709
|
+
|
|
5710
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
5711
|
+
OldValues___?: KeyValuePairInput[];
|
|
5712
|
+
}
|
|
5713
|
+
|
|
5714
|
+
//****************************************************************************
|
|
5715
|
+
// RESOLVER for MJ: AI Agent Configurations
|
|
5716
|
+
//****************************************************************************
|
|
5717
|
+
@ObjectType()
|
|
5718
|
+
export class RunMJAIAgentConfigurationViewResult {
|
|
5719
|
+
@Field(() => [MJAIAgentConfiguration_])
|
|
5720
|
+
Results: MJAIAgentConfiguration_[];
|
|
5721
|
+
|
|
5722
|
+
@Field(() => String, {nullable: true})
|
|
5723
|
+
UserViewRunID?: string;
|
|
5724
|
+
|
|
5725
|
+
@Field(() => Int, {nullable: true})
|
|
5726
|
+
RowCount: number;
|
|
5727
|
+
|
|
5728
|
+
@Field(() => Int, {nullable: true})
|
|
5729
|
+
TotalRowCount: number;
|
|
5730
|
+
|
|
5731
|
+
@Field(() => Int, {nullable: true})
|
|
5732
|
+
ExecutionTime: number;
|
|
5733
|
+
|
|
5734
|
+
@Field({nullable: true})
|
|
5735
|
+
ErrorMessage?: string;
|
|
5736
|
+
|
|
5737
|
+
@Field(() => Boolean, {nullable: false})
|
|
5738
|
+
Success: boolean;
|
|
5739
|
+
}
|
|
5740
|
+
|
|
5741
|
+
@Resolver(MJAIAgentConfiguration_)
|
|
5742
|
+
export class MJAIAgentConfigurationResolver extends ResolverBase {
|
|
5743
|
+
@Query(() => RunMJAIAgentConfigurationViewResult)
|
|
5744
|
+
async RunMJAIAgentConfigurationViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5745
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5746
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
5747
|
+
}
|
|
5748
|
+
|
|
5749
|
+
@Query(() => RunMJAIAgentConfigurationViewResult)
|
|
5750
|
+
async RunMJAIAgentConfigurationViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5751
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5752
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
5753
|
+
}
|
|
5754
|
+
|
|
5755
|
+
@Query(() => RunMJAIAgentConfigurationViewResult)
|
|
5756
|
+
async RunMJAIAgentConfigurationDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5757
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5758
|
+
input.EntityName = 'MJ: AI Agent Configurations';
|
|
5759
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
5760
|
+
}
|
|
5761
|
+
@Query(() => MJAIAgentConfiguration_, { nullable: true })
|
|
5762
|
+
async MJAIAgentConfiguration(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentConfiguration_ | null> {
|
|
5763
|
+
this.CheckUserReadPermissions('MJ: AI Agent Configurations', userPayload);
|
|
5764
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5765
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5766
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentConfigurations] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
5767
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5768
|
+
const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Configurations', rows && rows.length > 0 ? rows[0] : {})
|
|
5769
|
+
return result;
|
|
5770
|
+
}
|
|
5771
|
+
|
|
5772
|
+
@Mutation(() => MJAIAgentConfiguration_)
|
|
5773
|
+
async CreateMJAIAgentConfiguration(
|
|
5774
|
+
@Arg('input', () => CreateMJAIAgentConfigurationInput) input: CreateMJAIAgentConfigurationInput,
|
|
5775
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5776
|
+
@PubSub() pubSub: PubSubEngine
|
|
5777
|
+
) {
|
|
5778
|
+
const provider = GetReadWriteProvider(providers);
|
|
5779
|
+
return this.CreateRecord('MJ: AI Agent Configurations', input, provider, userPayload, pubSub)
|
|
5780
|
+
}
|
|
5781
|
+
|
|
5782
|
+
@Mutation(() => MJAIAgentConfiguration_)
|
|
5783
|
+
async UpdateMJAIAgentConfiguration(
|
|
5784
|
+
@Arg('input', () => UpdateMJAIAgentConfigurationInput) input: UpdateMJAIAgentConfigurationInput,
|
|
5785
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5786
|
+
@PubSub() pubSub: PubSubEngine
|
|
5787
|
+
) {
|
|
5788
|
+
const provider = GetReadWriteProvider(providers);
|
|
5789
|
+
return this.UpdateRecord('MJ: AI Agent Configurations', input, provider, userPayload, pubSub);
|
|
5790
|
+
}
|
|
5791
|
+
|
|
5792
|
+
@Mutation(() => MJAIAgentConfiguration_)
|
|
5793
|
+
async DeleteMJAIAgentConfiguration(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5794
|
+
const provider = GetReadWriteProvider(providers);
|
|
5795
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
5796
|
+
return this.DeleteRecord('MJ: AI Agent Configurations', key, options, provider, userPayload, pubSub);
|
|
5797
|
+
}
|
|
5798
|
+
|
|
5799
|
+
}
|
|
5800
|
+
|
|
5801
|
+
//****************************************************************************
|
|
5802
|
+
// ENTITY CLASS for MJ: Test Suite Tests
|
|
5803
|
+
//****************************************************************************
|
|
5804
|
+
@ObjectType({ description: `Junction table linking tests to test suites. Allows many-to-many relationship where a test can belong to multiple suites and a suite can contain multiple tests. Includes sequence for execution order and configuration overrides specific to this suite-test pairing.` })
|
|
5805
|
+
export class MJTestSuiteTest_ {
|
|
5806
|
+
@Field()
|
|
5807
|
+
@MaxLength(16)
|
|
5808
|
+
ID: string;
|
|
5809
|
+
|
|
5810
|
+
@Field({description: `Foreign Key - The test suite this relationship belongs to`})
|
|
5811
|
+
@MaxLength(16)
|
|
5812
|
+
SuiteID: string;
|
|
5813
|
+
|
|
5814
|
+
@Field({description: `Foreign Key - The test included in this suite`})
|
|
5815
|
+
@MaxLength(16)
|
|
5816
|
+
TestID: string;
|
|
5817
|
+
|
|
5818
|
+
@Field(() => Int, {description: `Execution sequence within the suite. Lower numbers run first. Tests with same sequence may run in parallel.`})
|
|
5819
|
+
Sequence: number;
|
|
5820
|
+
|
|
5821
|
+
@Field({description: `Status of this test within this suite: Active (will run), Disabled (temporarily excluded), Skip (documented exclusion)`})
|
|
5822
|
+
@MaxLength(40)
|
|
5823
|
+
Status: string;
|
|
5824
|
+
|
|
5825
|
+
@Field({nullable: true, description: `JSON object to override test configuration for this specific suite. Allows same test to run with different parameters in different suites.`})
|
|
5826
|
+
Configuration?: string;
|
|
5827
|
+
|
|
5828
|
+
@Field()
|
|
5829
|
+
@MaxLength(10)
|
|
5830
|
+
_mj__CreatedAt: Date;
|
|
5831
|
+
|
|
5832
|
+
@Field()
|
|
5833
|
+
@MaxLength(10)
|
|
5834
|
+
_mj__UpdatedAt: Date;
|
|
5835
|
+
|
|
5836
|
+
@Field()
|
|
5837
|
+
@MaxLength(510)
|
|
5838
|
+
Suite: string;
|
|
5839
|
+
|
|
5840
|
+
@Field()
|
|
5841
|
+
@MaxLength(510)
|
|
5842
|
+
Test: string;
|
|
5843
|
+
|
|
5844
|
+
}
|
|
5845
|
+
|
|
5846
|
+
//****************************************************************************
|
|
5847
|
+
// INPUT TYPE for MJ: Test Suite Tests
|
|
5848
|
+
//****************************************************************************
|
|
5849
|
+
@InputType()
|
|
5850
|
+
export class CreateMJTestSuiteTestInput {
|
|
5851
|
+
@Field({ nullable: true })
|
|
5852
|
+
ID?: string;
|
|
5853
|
+
|
|
5854
|
+
@Field({ nullable: true })
|
|
5855
|
+
SuiteID?: string;
|
|
5856
|
+
|
|
5857
|
+
@Field({ nullable: true })
|
|
5858
|
+
TestID?: string;
|
|
5859
|
+
|
|
5860
|
+
@Field(() => Int, { nullable: true })
|
|
5861
|
+
Sequence?: number;
|
|
5862
|
+
|
|
5863
|
+
@Field({ nullable: true })
|
|
5864
|
+
Status?: string;
|
|
5865
|
+
|
|
5866
|
+
@Field({ nullable: true })
|
|
5867
|
+
Configuration: string | null;
|
|
5868
|
+
}
|
|
5869
|
+
|
|
5870
|
+
|
|
5871
|
+
//****************************************************************************
|
|
5872
|
+
// INPUT TYPE for MJ: Test Suite Tests
|
|
5873
|
+
//****************************************************************************
|
|
5874
|
+
@InputType()
|
|
5875
|
+
export class UpdateMJTestSuiteTestInput {
|
|
5876
|
+
@Field()
|
|
5877
|
+
ID: string;
|
|
5878
|
+
|
|
5879
|
+
@Field({ nullable: true })
|
|
5880
|
+
SuiteID?: string;
|
|
5881
|
+
|
|
5882
|
+
@Field({ nullable: true })
|
|
5883
|
+
TestID?: string;
|
|
5884
|
+
|
|
5885
|
+
@Field(() => Int, { nullable: true })
|
|
5886
|
+
Sequence?: number;
|
|
5887
|
+
|
|
5888
|
+
@Field({ nullable: true })
|
|
5889
|
+
Status?: string;
|
|
5890
|
+
|
|
5891
|
+
@Field({ nullable: true })
|
|
5892
|
+
Configuration?: string | null;
|
|
5893
|
+
|
|
5894
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
5895
|
+
OldValues___?: KeyValuePairInput[];
|
|
5896
|
+
}
|
|
5897
|
+
|
|
5898
|
+
//****************************************************************************
|
|
5899
|
+
// RESOLVER for MJ: Test Suite Tests
|
|
5900
|
+
//****************************************************************************
|
|
5901
|
+
@ObjectType()
|
|
5902
|
+
export class RunMJTestSuiteTestViewResult {
|
|
5903
|
+
@Field(() => [MJTestSuiteTest_])
|
|
5904
|
+
Results: MJTestSuiteTest_[];
|
|
5905
|
+
|
|
5906
|
+
@Field(() => String, {nullable: true})
|
|
5907
|
+
UserViewRunID?: string;
|
|
5908
|
+
|
|
5909
|
+
@Field(() => Int, {nullable: true})
|
|
5910
|
+
RowCount: number;
|
|
5911
|
+
|
|
5912
|
+
@Field(() => Int, {nullable: true})
|
|
5913
|
+
TotalRowCount: number;
|
|
5914
|
+
|
|
5915
|
+
@Field(() => Int, {nullable: true})
|
|
5916
|
+
ExecutionTime: number;
|
|
5917
|
+
|
|
5918
|
+
@Field({nullable: true})
|
|
5919
|
+
ErrorMessage?: string;
|
|
5920
|
+
|
|
5921
|
+
@Field(() => Boolean, {nullable: false})
|
|
5922
|
+
Success: boolean;
|
|
5923
|
+
}
|
|
5924
|
+
|
|
5925
|
+
@Resolver(MJTestSuiteTest_)
|
|
5926
|
+
export class MJTestSuiteTestResolver extends ResolverBase {
|
|
5927
|
+
@Query(() => RunMJTestSuiteTestViewResult)
|
|
5928
|
+
async RunMJTestSuiteTestViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5929
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5930
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
5931
|
+
}
|
|
5932
|
+
|
|
5933
|
+
@Query(() => RunMJTestSuiteTestViewResult)
|
|
5934
|
+
async RunMJTestSuiteTestViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5935
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5936
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
5937
|
+
}
|
|
5938
|
+
|
|
5939
|
+
@Query(() => RunMJTestSuiteTestViewResult)
|
|
5940
|
+
async RunMJTestSuiteTestDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5941
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5942
|
+
input.EntityName = 'MJ: Test Suite Tests';
|
|
5943
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
5944
|
+
}
|
|
5945
|
+
@Query(() => MJTestSuiteTest_, { nullable: true })
|
|
5946
|
+
async MJTestSuiteTest(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTestSuiteTest_ | null> {
|
|
5947
|
+
this.CheckUserReadPermissions('MJ: Test Suite Tests', userPayload);
|
|
5948
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5949
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5950
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestSuiteTests] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suite Tests', userPayload, EntityPermissionType.Read, 'AND');
|
|
5951
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5952
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Test Suite Tests', rows && rows.length > 0 ? rows[0] : {})
|
|
5953
|
+
return result;
|
|
5954
|
+
}
|
|
5955
|
+
|
|
5956
|
+
@Mutation(() => MJTestSuiteTest_)
|
|
5957
|
+
async CreateMJTestSuiteTest(
|
|
5958
|
+
@Arg('input', () => CreateMJTestSuiteTestInput) input: CreateMJTestSuiteTestInput,
|
|
5959
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5960
|
+
@PubSub() pubSub: PubSubEngine
|
|
5961
|
+
) {
|
|
5962
|
+
const provider = GetReadWriteProvider(providers);
|
|
5963
|
+
return this.CreateRecord('MJ: Test Suite Tests', input, provider, userPayload, pubSub)
|
|
5964
|
+
}
|
|
5965
|
+
|
|
5966
|
+
@Mutation(() => MJTestSuiteTest_)
|
|
5967
|
+
async UpdateMJTestSuiteTest(
|
|
5968
|
+
@Arg('input', () => UpdateMJTestSuiteTestInput) input: UpdateMJTestSuiteTestInput,
|
|
5969
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5970
|
+
@PubSub() pubSub: PubSubEngine
|
|
5971
|
+
) {
|
|
5972
|
+
const provider = GetReadWriteProvider(providers);
|
|
5973
|
+
return this.UpdateRecord('MJ: Test Suite Tests', input, provider, userPayload, pubSub);
|
|
5974
|
+
}
|
|
5975
|
+
|
|
5976
|
+
@Mutation(() => MJTestSuiteTest_)
|
|
5977
|
+
async DeleteMJTestSuiteTest(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5978
|
+
const provider = GetReadWriteProvider(providers);
|
|
5979
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
5980
|
+
return this.DeleteRecord('MJ: Test Suite Tests', key, options, provider, userPayload, pubSub);
|
|
5981
|
+
}
|
|
5982
|
+
|
|
5983
|
+
}
|
|
5984
|
+
|
|
4871
5985
|
//****************************************************************************
|
|
4872
5986
|
// ENTITY CLASS for AI Agent Notes
|
|
4873
5987
|
//****************************************************************************
|
|
@@ -4953,6 +6067,13 @@ export class MJAIAgentNote_ {
|
|
|
4953
6067
|
@MaxLength(510)
|
|
4954
6068
|
SourceConversation?: string;
|
|
4955
6069
|
|
|
6070
|
+
@Field({nullable: true})
|
|
6071
|
+
SourceConversationDetail?: string;
|
|
6072
|
+
|
|
6073
|
+
@Field({nullable: true})
|
|
6074
|
+
@MaxLength(510)
|
|
6075
|
+
SourceAIAgentRun?: string;
|
|
6076
|
+
|
|
4956
6077
|
@Field({nullable: true})
|
|
4957
6078
|
@MaxLength(100)
|
|
4958
6079
|
Company?: string;
|
|
@@ -5186,21 +6307,21 @@ export class MJEnvironment_ {
|
|
|
5186
6307
|
@MaxLength(10)
|
|
5187
6308
|
_mj__UpdatedAt: Date;
|
|
5188
6309
|
|
|
5189
|
-
@Field(() => [MJCollection_])
|
|
5190
|
-
MJ_Collections_EnvironmentIDArray: MJCollection_[]; // Link to MJ_Collections
|
|
5191
|
-
|
|
5192
6310
|
@Field(() => [MJProject_])
|
|
5193
6311
|
MJ_Projects_EnvironmentIDArray: MJProject_[]; // Link to MJ_Projects
|
|
5194
6312
|
|
|
6313
|
+
@Field(() => [MJCollection_])
|
|
6314
|
+
MJ_Collections_EnvironmentIDArray: MJCollection_[]; // Link to MJ_Collections
|
|
6315
|
+
|
|
5195
6316
|
@Field(() => [MJArtifact_])
|
|
5196
6317
|
MJ_Artifacts_EnvironmentIDArray: MJArtifact_[]; // Link to MJ_Artifacts
|
|
5197
6318
|
|
|
5198
|
-
@Field(() => [MJDashboard_])
|
|
5199
|
-
Dashboards_EnvironmentIDArray: MJDashboard_[]; // Link to Dashboards
|
|
5200
|
-
|
|
5201
6319
|
@Field(() => [MJTask_])
|
|
5202
6320
|
MJ_Tasks_EnvironmentIDArray: MJTask_[]; // Link to MJ_Tasks
|
|
5203
6321
|
|
|
6322
|
+
@Field(() => [MJDashboard_])
|
|
6323
|
+
Dashboards_EnvironmentIDArray: MJDashboard_[]; // Link to Dashboards
|
|
6324
|
+
|
|
5204
6325
|
@Field(() => [MJReport_])
|
|
5205
6326
|
Reports_EnvironmentIDArray: MJReport_[]; // Link to Reports
|
|
5206
6327
|
|
|
@@ -5313,25 +6434,25 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
5313
6434
|
return result;
|
|
5314
6435
|
}
|
|
5315
6436
|
|
|
5316
|
-
@FieldResolver(() => [
|
|
5317
|
-
async
|
|
5318
|
-
this.CheckUserReadPermissions('MJ:
|
|
6437
|
+
@FieldResolver(() => [MJProject_])
|
|
6438
|
+
async MJ_Projects_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6439
|
+
this.CheckUserReadPermissions('MJ: Projects', userPayload);
|
|
5319
6440
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5320
6441
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5321
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6442
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwProjects] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Projects', userPayload, EntityPermissionType.Read, 'AND');
|
|
5322
6443
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5323
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
6444
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Projects', rows);
|
|
5324
6445
|
return result;
|
|
5325
6446
|
}
|
|
5326
6447
|
|
|
5327
|
-
@FieldResolver(() => [
|
|
5328
|
-
async
|
|
5329
|
-
this.CheckUserReadPermissions('MJ:
|
|
6448
|
+
@FieldResolver(() => [MJCollection_])
|
|
6449
|
+
async MJ_Collections_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6450
|
+
this.CheckUserReadPermissions('MJ: Collections', userPayload);
|
|
5330
6451
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5331
6452
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5332
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6453
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollections] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collections', userPayload, EntityPermissionType.Read, 'AND');
|
|
5333
6454
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5334
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
6455
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collections', rows);
|
|
5335
6456
|
return result;
|
|
5336
6457
|
}
|
|
5337
6458
|
|
|
@@ -5346,25 +6467,25 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
5346
6467
|
return result;
|
|
5347
6468
|
}
|
|
5348
6469
|
|
|
5349
|
-
@FieldResolver(() => [
|
|
5350
|
-
async
|
|
5351
|
-
this.CheckUserReadPermissions('
|
|
6470
|
+
@FieldResolver(() => [MJTask_])
|
|
6471
|
+
async MJ_Tasks_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6472
|
+
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
5352
6473
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5353
6474
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5354
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6475
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTasks] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
5355
6476
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5356
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6477
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows);
|
|
5357
6478
|
return result;
|
|
5358
6479
|
}
|
|
5359
6480
|
|
|
5360
|
-
@FieldResolver(() => [
|
|
5361
|
-
async
|
|
5362
|
-
this.CheckUserReadPermissions('
|
|
6481
|
+
@FieldResolver(() => [MJDashboard_])
|
|
6482
|
+
async Dashboards_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6483
|
+
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
5363
6484
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5364
6485
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5365
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6486
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboards] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
5366
6487
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5367
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6488
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboards', rows);
|
|
5368
6489
|
return result;
|
|
5369
6490
|
}
|
|
5370
6491
|
|
|
@@ -5861,6 +6982,205 @@ export class MJAIAgentActionResolver extends ResolverBase {
|
|
|
5861
6982
|
|
|
5862
6983
|
}
|
|
5863
6984
|
|
|
6985
|
+
//****************************************************************************
|
|
6986
|
+
// ENTITY CLASS for MJ: Test Rubrics
|
|
6987
|
+
//****************************************************************************
|
|
6988
|
+
@ObjectType({ description: `Reusable evaluation criteria (rubrics) for consistent scoring across tests. Rubrics define structured evaluation dimensions and can include LLM prompts for automated judgment. Particularly useful for LLM-as-judge patterns where consistent evaluation criteria are critical.` })
|
|
6989
|
+
export class MJTestRubric_ {
|
|
6990
|
+
@Field()
|
|
6991
|
+
@MaxLength(16)
|
|
6992
|
+
ID: string;
|
|
6993
|
+
|
|
6994
|
+
@Field({description: `Foreign Key - The test type this rubric applies to (e.g., Agent Eval, Code Generation)`})
|
|
6995
|
+
@MaxLength(16)
|
|
6996
|
+
TypeID: string;
|
|
6997
|
+
|
|
6998
|
+
@Field({description: `Unique name for the rubric (e.g., "Component Quality Rubric v1", "Agent Response Quality")`})
|
|
6999
|
+
@MaxLength(510)
|
|
7000
|
+
Name: string;
|
|
7001
|
+
|
|
7002
|
+
@Field({nullable: true, description: `Description of what this rubric evaluates and when to use it`})
|
|
7003
|
+
Description?: string;
|
|
7004
|
+
|
|
7005
|
+
@Field({nullable: true, description: `LLM prompt template for automated judgment. Can include placeholders for test inputs/outputs (e.g., "Evaluate the following React component for correctness, UX, and maintainability...")`})
|
|
7006
|
+
PromptTemplate?: string;
|
|
7007
|
+
|
|
7008
|
+
@Field({nullable: true, description: `JSON object defining structured evaluation criteria with dimensions, weights, and scoring guidance (e.g., {correctness: {weight: 0.4, description: "..."}, ux: {weight: 0.3, description: "..."}})`})
|
|
7009
|
+
Criteria?: string;
|
|
7010
|
+
|
|
7011
|
+
@Field({nullable: true, description: `Version identifier for the rubric. Allows tracking changes and comparing results across rubric versions.`})
|
|
7012
|
+
@MaxLength(100)
|
|
7013
|
+
Version?: string;
|
|
7014
|
+
|
|
7015
|
+
@Field({description: `Status of the rubric: Pending (under development), Active (available for use), Disabled (deprecated)`})
|
|
7016
|
+
@MaxLength(40)
|
|
7017
|
+
Status: string;
|
|
7018
|
+
|
|
7019
|
+
@Field()
|
|
7020
|
+
@MaxLength(10)
|
|
7021
|
+
_mj__CreatedAt: Date;
|
|
7022
|
+
|
|
7023
|
+
@Field()
|
|
7024
|
+
@MaxLength(10)
|
|
7025
|
+
_mj__UpdatedAt: Date;
|
|
7026
|
+
|
|
7027
|
+
@Field()
|
|
7028
|
+
@MaxLength(200)
|
|
7029
|
+
Type: string;
|
|
7030
|
+
|
|
7031
|
+
}
|
|
7032
|
+
|
|
7033
|
+
//****************************************************************************
|
|
7034
|
+
// INPUT TYPE for MJ: Test Rubrics
|
|
7035
|
+
//****************************************************************************
|
|
7036
|
+
@InputType()
|
|
7037
|
+
export class CreateMJTestRubricInput {
|
|
7038
|
+
@Field({ nullable: true })
|
|
7039
|
+
ID?: string;
|
|
7040
|
+
|
|
7041
|
+
@Field({ nullable: true })
|
|
7042
|
+
TypeID?: string;
|
|
7043
|
+
|
|
7044
|
+
@Field({ nullable: true })
|
|
7045
|
+
Name?: string;
|
|
7046
|
+
|
|
7047
|
+
@Field({ nullable: true })
|
|
7048
|
+
Description: string | null;
|
|
7049
|
+
|
|
7050
|
+
@Field({ nullable: true })
|
|
7051
|
+
PromptTemplate: string | null;
|
|
7052
|
+
|
|
7053
|
+
@Field({ nullable: true })
|
|
7054
|
+
Criteria: string | null;
|
|
7055
|
+
|
|
7056
|
+
@Field({ nullable: true })
|
|
7057
|
+
Version: string | null;
|
|
7058
|
+
|
|
7059
|
+
@Field({ nullable: true })
|
|
7060
|
+
Status?: string;
|
|
7061
|
+
}
|
|
7062
|
+
|
|
7063
|
+
|
|
7064
|
+
//****************************************************************************
|
|
7065
|
+
// INPUT TYPE for MJ: Test Rubrics
|
|
7066
|
+
//****************************************************************************
|
|
7067
|
+
@InputType()
|
|
7068
|
+
export class UpdateMJTestRubricInput {
|
|
7069
|
+
@Field()
|
|
7070
|
+
ID: string;
|
|
7071
|
+
|
|
7072
|
+
@Field({ nullable: true })
|
|
7073
|
+
TypeID?: string;
|
|
7074
|
+
|
|
7075
|
+
@Field({ nullable: true })
|
|
7076
|
+
Name?: string;
|
|
7077
|
+
|
|
7078
|
+
@Field({ nullable: true })
|
|
7079
|
+
Description?: string | null;
|
|
7080
|
+
|
|
7081
|
+
@Field({ nullable: true })
|
|
7082
|
+
PromptTemplate?: string | null;
|
|
7083
|
+
|
|
7084
|
+
@Field({ nullable: true })
|
|
7085
|
+
Criteria?: string | null;
|
|
7086
|
+
|
|
7087
|
+
@Field({ nullable: true })
|
|
7088
|
+
Version?: string | null;
|
|
7089
|
+
|
|
7090
|
+
@Field({ nullable: true })
|
|
7091
|
+
Status?: string;
|
|
7092
|
+
|
|
7093
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
7094
|
+
OldValues___?: KeyValuePairInput[];
|
|
7095
|
+
}
|
|
7096
|
+
|
|
7097
|
+
//****************************************************************************
|
|
7098
|
+
// RESOLVER for MJ: Test Rubrics
|
|
7099
|
+
//****************************************************************************
|
|
7100
|
+
@ObjectType()
|
|
7101
|
+
export class RunMJTestRubricViewResult {
|
|
7102
|
+
@Field(() => [MJTestRubric_])
|
|
7103
|
+
Results: MJTestRubric_[];
|
|
7104
|
+
|
|
7105
|
+
@Field(() => String, {nullable: true})
|
|
7106
|
+
UserViewRunID?: string;
|
|
7107
|
+
|
|
7108
|
+
@Field(() => Int, {nullable: true})
|
|
7109
|
+
RowCount: number;
|
|
7110
|
+
|
|
7111
|
+
@Field(() => Int, {nullable: true})
|
|
7112
|
+
TotalRowCount: number;
|
|
7113
|
+
|
|
7114
|
+
@Field(() => Int, {nullable: true})
|
|
7115
|
+
ExecutionTime: number;
|
|
7116
|
+
|
|
7117
|
+
@Field({nullable: true})
|
|
7118
|
+
ErrorMessage?: string;
|
|
7119
|
+
|
|
7120
|
+
@Field(() => Boolean, {nullable: false})
|
|
7121
|
+
Success: boolean;
|
|
7122
|
+
}
|
|
7123
|
+
|
|
7124
|
+
@Resolver(MJTestRubric_)
|
|
7125
|
+
export class MJTestRubricResolver extends ResolverBase {
|
|
7126
|
+
@Query(() => RunMJTestRubricViewResult)
|
|
7127
|
+
async RunMJTestRubricViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7128
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7129
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
7130
|
+
}
|
|
7131
|
+
|
|
7132
|
+
@Query(() => RunMJTestRubricViewResult)
|
|
7133
|
+
async RunMJTestRubricViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7134
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7135
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
7136
|
+
}
|
|
7137
|
+
|
|
7138
|
+
@Query(() => RunMJTestRubricViewResult)
|
|
7139
|
+
async RunMJTestRubricDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7140
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7141
|
+
input.EntityName = 'MJ: Test Rubrics';
|
|
7142
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
7143
|
+
}
|
|
7144
|
+
@Query(() => MJTestRubric_, { nullable: true })
|
|
7145
|
+
async MJTestRubric(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTestRubric_ | null> {
|
|
7146
|
+
this.CheckUserReadPermissions('MJ: Test Rubrics', userPayload);
|
|
7147
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7148
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
7149
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRubrics] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Rubrics', userPayload, EntityPermissionType.Read, 'AND');
|
|
7150
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
7151
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Test Rubrics', rows && rows.length > 0 ? rows[0] : {})
|
|
7152
|
+
return result;
|
|
7153
|
+
}
|
|
7154
|
+
|
|
7155
|
+
@Mutation(() => MJTestRubric_)
|
|
7156
|
+
async CreateMJTestRubric(
|
|
7157
|
+
@Arg('input', () => CreateMJTestRubricInput) input: CreateMJTestRubricInput,
|
|
7158
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
7159
|
+
@PubSub() pubSub: PubSubEngine
|
|
7160
|
+
) {
|
|
7161
|
+
const provider = GetReadWriteProvider(providers);
|
|
7162
|
+
return this.CreateRecord('MJ: Test Rubrics', input, provider, userPayload, pubSub)
|
|
7163
|
+
}
|
|
7164
|
+
|
|
7165
|
+
@Mutation(() => MJTestRubric_)
|
|
7166
|
+
async UpdateMJTestRubric(
|
|
7167
|
+
@Arg('input', () => UpdateMJTestRubricInput) input: UpdateMJTestRubricInput,
|
|
7168
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
7169
|
+
@PubSub() pubSub: PubSubEngine
|
|
7170
|
+
) {
|
|
7171
|
+
const provider = GetReadWriteProvider(providers);
|
|
7172
|
+
return this.UpdateRecord('MJ: Test Rubrics', input, provider, userPayload, pubSub);
|
|
7173
|
+
}
|
|
7174
|
+
|
|
7175
|
+
@Mutation(() => MJTestRubric_)
|
|
7176
|
+
async DeleteMJTestRubric(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7177
|
+
const provider = GetReadWriteProvider(providers);
|
|
7178
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
7179
|
+
return this.DeleteRecord('MJ: Test Rubrics', key, options, provider, userPayload, pubSub);
|
|
7180
|
+
}
|
|
7181
|
+
|
|
7182
|
+
}
|
|
7183
|
+
|
|
5864
7184
|
//****************************************************************************
|
|
5865
7185
|
// ENTITY CLASS for MJ: Task Dependencies
|
|
5866
7186
|
//****************************************************************************
|
|
@@ -7677,6 +8997,10 @@ export class MJAIResultCache_ {
|
|
|
7677
8997
|
@MaxLength(200)
|
|
7678
8998
|
Configuration?: string;
|
|
7679
8999
|
|
|
9000
|
+
@Field({nullable: true})
|
|
9001
|
+
@MaxLength(510)
|
|
9002
|
+
PromptRun?: string;
|
|
9003
|
+
|
|
7680
9004
|
}
|
|
7681
9005
|
|
|
7682
9006
|
//****************************************************************************
|
|
@@ -8987,6 +10311,10 @@ export class MJEmployeeCompanyIntegration_ {
|
|
|
8987
10311
|
@MaxLength(10)
|
|
8988
10312
|
_mj__UpdatedAt: Date;
|
|
8989
10313
|
|
|
10314
|
+
@Field({nullable: true})
|
|
10315
|
+
@MaxLength(162)
|
|
10316
|
+
Employee?: string;
|
|
10317
|
+
|
|
8990
10318
|
@Field()
|
|
8991
10319
|
@MaxLength(510)
|
|
8992
10320
|
CompanyIntegration: string;
|
|
@@ -9151,6 +10479,10 @@ export class MJEmployeeRole_ {
|
|
|
9151
10479
|
@MaxLength(10)
|
|
9152
10480
|
_mj__UpdatedAt: Date;
|
|
9153
10481
|
|
|
10482
|
+
@Field({nullable: true})
|
|
10483
|
+
@MaxLength(162)
|
|
10484
|
+
Employee?: string;
|
|
10485
|
+
|
|
9154
10486
|
@Field()
|
|
9155
10487
|
@MaxLength(100)
|
|
9156
10488
|
Role: string;
|
|
@@ -9303,6 +10635,10 @@ export class MJEmployeeSkill_ {
|
|
|
9303
10635
|
@MaxLength(10)
|
|
9304
10636
|
_mj__UpdatedAt: Date;
|
|
9305
10637
|
|
|
10638
|
+
@Field({nullable: true})
|
|
10639
|
+
@MaxLength(162)
|
|
10640
|
+
Employee?: string;
|
|
10641
|
+
|
|
9306
10642
|
@Field()
|
|
9307
10643
|
@MaxLength(100)
|
|
9308
10644
|
Skill: string;
|
|
@@ -12647,12 +13983,12 @@ export class MJUser_ {
|
|
|
12647
13983
|
@Field(() => [MJReportUserState_])
|
|
12648
13984
|
MJ_ReportUserStates_UserIDArray: MJReportUserState_[]; // Link to MJ_ReportUserStates
|
|
12649
13985
|
|
|
12650
|
-
@Field(() => [MJDashboardUserState_])
|
|
12651
|
-
MJ_DashboardUserStates_UserIDArray: MJDashboardUserState_[]; // Link to MJ_DashboardUserStates
|
|
12652
|
-
|
|
12653
13986
|
@Field(() => [MJDashboardUserPreference_])
|
|
12654
13987
|
MJ_DashboardUserPreferences_UserIDArray: MJDashboardUserPreference_[]; // Link to MJ_DashboardUserPreferences
|
|
12655
13988
|
|
|
13989
|
+
@Field(() => [MJDashboardUserState_])
|
|
13990
|
+
MJ_DashboardUserStates_UserIDArray: MJDashboardUserState_[]; // Link to MJ_DashboardUserStates
|
|
13991
|
+
|
|
12656
13992
|
@Field(() => [MJArtifactVersion_])
|
|
12657
13993
|
MJ_ArtifactVersions_UserIDArray: MJArtifactVersion_[]; // Link to MJ_ArtifactVersions
|
|
12658
13994
|
|
|
@@ -12674,6 +14010,12 @@ export class MJUser_ {
|
|
|
12674
14010
|
@Field(() => [MJConversationDetailRating_])
|
|
12675
14011
|
MJ_ConversationDetailRatings_UserIDArray: MJConversationDetailRating_[]; // Link to MJ_ConversationDetailRatings
|
|
12676
14012
|
|
|
14013
|
+
@Field(() => [MJTestRunFeedback_])
|
|
14014
|
+
MJ_TestRunFeedbacks_ReviewerUserIDArray: MJTestRunFeedback_[]; // Link to MJ_TestRunFeedbacks
|
|
14015
|
+
|
|
14016
|
+
@Field(() => [MJTestSuiteRun_])
|
|
14017
|
+
MJ_TestSuiteRuns_RunByUserIDArray: MJTestSuiteRun_[]; // Link to MJ_TestSuiteRuns
|
|
14018
|
+
|
|
12677
14019
|
@Field(() => [MJResourcePermission_])
|
|
12678
14020
|
ResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to ResourcePermissions
|
|
12679
14021
|
|
|
@@ -12698,6 +14040,9 @@ export class MJUser_ {
|
|
|
12698
14040
|
@Field(() => [MJArtifactPermission_])
|
|
12699
14041
|
MJ_ArtifactPermissions_SharedByUserIDArray: MJArtifactPermission_[]; // Link to MJ_ArtifactPermissions
|
|
12700
14042
|
|
|
14043
|
+
@Field(() => [MJTestRun_])
|
|
14044
|
+
MJ_TestRuns_RunByUserIDArray: MJTestRun_[]; // Link to MJ_TestRuns
|
|
14045
|
+
|
|
12701
14046
|
@Field(() => [MJAIAgentRun_])
|
|
12702
14047
|
MJ_AIAgentRuns_UserIDArray: MJAIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
12703
14048
|
|
|
@@ -13286,25 +14631,25 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
13286
14631
|
return result;
|
|
13287
14632
|
}
|
|
13288
14633
|
|
|
13289
|
-
@FieldResolver(() => [
|
|
13290
|
-
async
|
|
13291
|
-
this.CheckUserReadPermissions('MJ: Dashboard User
|
|
14634
|
+
@FieldResolver(() => [MJDashboardUserPreference_])
|
|
14635
|
+
async MJ_DashboardUserPreferences_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14636
|
+
this.CheckUserReadPermissions('MJ: Dashboard User Preferences', userPayload);
|
|
13292
14637
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13293
14638
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
13294
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
14639
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardUserPreferences] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User Preferences', userPayload, EntityPermissionType.Read, 'AND');
|
|
13295
14640
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
13296
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User
|
|
14641
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User Preferences', rows);
|
|
13297
14642
|
return result;
|
|
13298
14643
|
}
|
|
13299
14644
|
|
|
13300
|
-
@FieldResolver(() => [
|
|
13301
|
-
async
|
|
13302
|
-
this.CheckUserReadPermissions('MJ: Dashboard User
|
|
14645
|
+
@FieldResolver(() => [MJDashboardUserState_])
|
|
14646
|
+
async MJ_DashboardUserStates_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14647
|
+
this.CheckUserReadPermissions('MJ: Dashboard User States', userPayload);
|
|
13303
14648
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13304
14649
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
13305
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
14650
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardUserStates] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User States', userPayload, EntityPermissionType.Read, 'AND');
|
|
13306
14651
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
13307
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User
|
|
14652
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User States', rows);
|
|
13308
14653
|
return result;
|
|
13309
14654
|
}
|
|
13310
14655
|
|
|
@@ -13385,6 +14730,28 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
13385
14730
|
return result;
|
|
13386
14731
|
}
|
|
13387
14732
|
|
|
14733
|
+
@FieldResolver(() => [MJTestRunFeedback_])
|
|
14734
|
+
async MJ_TestRunFeedbacks_ReviewerUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14735
|
+
this.CheckUserReadPermissions('MJ: Test Run Feedbacks', userPayload);
|
|
14736
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14737
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
14738
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRunFeedbacks] WHERE [ReviewerUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Run Feedbacks', userPayload, EntityPermissionType.Read, 'AND');
|
|
14739
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
14740
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Run Feedbacks', rows);
|
|
14741
|
+
return result;
|
|
14742
|
+
}
|
|
14743
|
+
|
|
14744
|
+
@FieldResolver(() => [MJTestSuiteRun_])
|
|
14745
|
+
async MJ_TestSuiteRuns_RunByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14746
|
+
this.CheckUserReadPermissions('MJ: Test Suite Runs', userPayload);
|
|
14747
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14748
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
14749
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestSuiteRuns] WHERE [RunByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suite Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
14750
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
14751
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Suite Runs', rows);
|
|
14752
|
+
return result;
|
|
14753
|
+
}
|
|
14754
|
+
|
|
13388
14755
|
@FieldResolver(() => [MJResourcePermission_])
|
|
13389
14756
|
async ResourcePermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13390
14757
|
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
@@ -13473,6 +14840,17 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
13473
14840
|
return result;
|
|
13474
14841
|
}
|
|
13475
14842
|
|
|
14843
|
+
@FieldResolver(() => [MJTestRun_])
|
|
14844
|
+
async MJ_TestRuns_RunByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14845
|
+
this.CheckUserReadPermissions('MJ: Test Runs', userPayload);
|
|
14846
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14847
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
14848
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRuns] WHERE [RunByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
14849
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
14850
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Runs', rows);
|
|
14851
|
+
return result;
|
|
14852
|
+
}
|
|
14853
|
+
|
|
13476
14854
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
13477
14855
|
async MJ_AIAgentRuns_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13478
14856
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -15071,6 +16449,14 @@ export class MJErrorLog_ {
|
|
|
15071
16449
|
@MaxLength(10)
|
|
15072
16450
|
_mj__UpdatedAt: Date;
|
|
15073
16451
|
|
|
16452
|
+
@Field({nullable: true})
|
|
16453
|
+
@MaxLength(200)
|
|
16454
|
+
CompanyIntegrationRun?: string;
|
|
16455
|
+
|
|
16456
|
+
@Field({nullable: true})
|
|
16457
|
+
@MaxLength(900)
|
|
16458
|
+
CompanyIntegrationRunDetail?: string;
|
|
16459
|
+
|
|
15074
16460
|
}
|
|
15075
16461
|
|
|
15076
16462
|
//****************************************************************************
|
|
@@ -16331,6 +17717,10 @@ export class MJCompanyIntegrationRunAPILog_ {
|
|
|
16331
17717
|
@MaxLength(10)
|
|
16332
17718
|
_mj__UpdatedAt: Date;
|
|
16333
17719
|
|
|
17720
|
+
@Field()
|
|
17721
|
+
@MaxLength(200)
|
|
17722
|
+
CompanyIntegrationRun: string;
|
|
17723
|
+
|
|
16334
17724
|
}
|
|
16335
17725
|
|
|
16336
17726
|
//****************************************************************************
|
|
@@ -17923,6 +19313,10 @@ export class MJRecordChange_ {
|
|
|
17923
19313
|
@MaxLength(200)
|
|
17924
19314
|
User: string;
|
|
17925
19315
|
|
|
19316
|
+
@Field({nullable: true})
|
|
19317
|
+
@MaxLength(200)
|
|
19318
|
+
ReplayRun?: string;
|
|
19319
|
+
|
|
17926
19320
|
@Field({nullable: true})
|
|
17927
19321
|
@MaxLength(200)
|
|
17928
19322
|
Integration?: string;
|
|
@@ -22467,6 +23861,9 @@ export class MJReport_ {
|
|
|
22467
23861
|
@MaxLength(510)
|
|
22468
23862
|
Conversation?: string;
|
|
22469
23863
|
|
|
23864
|
+
@Field({nullable: true})
|
|
23865
|
+
ConversationDetail?: string;
|
|
23866
|
+
|
|
22470
23867
|
@Field({nullable: true})
|
|
22471
23868
|
@MaxLength(510)
|
|
22472
23869
|
DataContext?: string;
|
|
@@ -24362,9 +25759,22 @@ export class MJConversationDetail_ {
|
|
|
24362
25759
|
@MaxLength(40)
|
|
24363
25760
|
Status: string;
|
|
24364
25761
|
|
|
24365
|
-
@Field({nullable: true, description: `
|
|
25762
|
+
@Field({nullable: true, description: `DEPRECATED: Use ResponseForm, ActionableCommands, and AutomaticCommands instead. Legacy field for simple text-based suggested responses. Replaced in v2.118 by more powerful structured forms and commands system. Retained for historical data only.`})
|
|
24366
25763
|
SuggestedResponses?: string;
|
|
24367
25764
|
|
|
25765
|
+
@Field({nullable: true, description: `Optional Foreign Key - Links this conversation detail to a test run if this message was part of a test conversation. Allows filtering and analyzing test-specific conversation turns.`})
|
|
25766
|
+
@MaxLength(16)
|
|
25767
|
+
TestRunID?: string;
|
|
25768
|
+
|
|
25769
|
+
@Field({nullable: true, description: `JSON object containing agent response form definition with questions and validation rules. Supports 8 question types: text, textarea, email, number, currency, date, datetime, choices (buttongroup/radio/dropdown/checkbox). Used for collecting structured user input with proper validation.`})
|
|
25770
|
+
ResponseForm?: string;
|
|
25771
|
+
|
|
25772
|
+
@Field({nullable: true, description: `JSON array of actionable commands that user can trigger (shown as clickable buttons/links). Supports open:resource (navigate to records/dashboards/reports/forms) and open:url (external links). Typically used after completing work to provide easy navigation to created/modified resources.`})
|
|
25773
|
+
ActionableCommands?: string;
|
|
25774
|
+
|
|
25775
|
+
@Field({nullable: true, description: `JSON array of automatic commands that execute immediately when received (no user interaction). Supports refresh:data (refresh entity data or caches) and notification (show toast messages). Used for keeping UI in sync after agent makes changes and providing user feedback.`})
|
|
25776
|
+
AutomaticCommands?: string;
|
|
25777
|
+
|
|
24368
25778
|
@Field({nullable: true})
|
|
24369
25779
|
@MaxLength(510)
|
|
24370
25780
|
Conversation?: string;
|
|
@@ -24377,6 +25787,13 @@ export class MJConversationDetail_ {
|
|
|
24377
25787
|
@MaxLength(510)
|
|
24378
25788
|
Artifact?: string;
|
|
24379
25789
|
|
|
25790
|
+
@Field({nullable: true})
|
|
25791
|
+
@MaxLength(510)
|
|
25792
|
+
ArtifactVersion?: string;
|
|
25793
|
+
|
|
25794
|
+
@Field({nullable: true})
|
|
25795
|
+
Parent?: string;
|
|
25796
|
+
|
|
24380
25797
|
@Field({nullable: true})
|
|
24381
25798
|
@MaxLength(510)
|
|
24382
25799
|
Agent?: string;
|
|
@@ -24475,6 +25892,18 @@ export class CreateMJConversationDetailInput {
|
|
|
24475
25892
|
|
|
24476
25893
|
@Field({ nullable: true })
|
|
24477
25894
|
SuggestedResponses: string | null;
|
|
25895
|
+
|
|
25896
|
+
@Field({ nullable: true })
|
|
25897
|
+
TestRunID: string | null;
|
|
25898
|
+
|
|
25899
|
+
@Field({ nullable: true })
|
|
25900
|
+
ResponseForm: string | null;
|
|
25901
|
+
|
|
25902
|
+
@Field({ nullable: true })
|
|
25903
|
+
ActionableCommands: string | null;
|
|
25904
|
+
|
|
25905
|
+
@Field({ nullable: true })
|
|
25906
|
+
AutomaticCommands: string | null;
|
|
24478
25907
|
}
|
|
24479
25908
|
|
|
24480
25909
|
|
|
@@ -24543,6 +25972,18 @@ export class UpdateMJConversationDetailInput {
|
|
|
24543
25972
|
@Field({ nullable: true })
|
|
24544
25973
|
SuggestedResponses?: string | null;
|
|
24545
25974
|
|
|
25975
|
+
@Field({ nullable: true })
|
|
25976
|
+
TestRunID?: string | null;
|
|
25977
|
+
|
|
25978
|
+
@Field({ nullable: true })
|
|
25979
|
+
ResponseForm?: string | null;
|
|
25980
|
+
|
|
25981
|
+
@Field({ nullable: true })
|
|
25982
|
+
ActionableCommands?: string | null;
|
|
25983
|
+
|
|
25984
|
+
@Field({ nullable: true })
|
|
25985
|
+
AutomaticCommands?: string | null;
|
|
25986
|
+
|
|
24546
25987
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
24547
25988
|
OldValues___?: KeyValuePairInput[];
|
|
24548
25989
|
}
|
|
@@ -24788,6 +26229,10 @@ export class MJConversation_ {
|
|
|
24788
26229
|
@Field(() => Boolean, {description: `Indicates if this conversation is pinned to the top of lists`})
|
|
24789
26230
|
IsPinned: boolean;
|
|
24790
26231
|
|
|
26232
|
+
@Field({nullable: true, description: `Optional Foreign Key - Links this conversation to a test run if this conversation was generated as part of a test. Enables tracking test conversations separately from production conversations.`})
|
|
26233
|
+
@MaxLength(16)
|
|
26234
|
+
TestRunID?: string;
|
|
26235
|
+
|
|
24791
26236
|
@Field()
|
|
24792
26237
|
@MaxLength(200)
|
|
24793
26238
|
User: string;
|
|
@@ -24874,6 +26319,9 @@ export class CreateMJConversationInput {
|
|
|
24874
26319
|
|
|
24875
26320
|
@Field(() => Boolean, { nullable: true })
|
|
24876
26321
|
IsPinned?: boolean;
|
|
26322
|
+
|
|
26323
|
+
@Field({ nullable: true })
|
|
26324
|
+
TestRunID: string | null;
|
|
24877
26325
|
}
|
|
24878
26326
|
|
|
24879
26327
|
|
|
@@ -24924,6 +26372,9 @@ export class UpdateMJConversationInput {
|
|
|
24924
26372
|
@Field(() => Boolean, { nullable: true })
|
|
24925
26373
|
IsPinned?: boolean;
|
|
24926
26374
|
|
|
26375
|
+
@Field({ nullable: true })
|
|
26376
|
+
TestRunID?: string | null;
|
|
26377
|
+
|
|
24927
26378
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
24928
26379
|
OldValues___?: KeyValuePairInput[];
|
|
24929
26380
|
}
|
|
@@ -25942,6 +27393,10 @@ export class MJRecordMergeDeletionLog_ {
|
|
|
25942
27393
|
@MaxLength(10)
|
|
25943
27394
|
_mj__UpdatedAt: Date;
|
|
25944
27395
|
|
|
27396
|
+
@Field()
|
|
27397
|
+
@MaxLength(900)
|
|
27398
|
+
RecordMergeLog: string;
|
|
27399
|
+
|
|
25945
27400
|
}
|
|
25946
27401
|
|
|
25947
27402
|
//****************************************************************************
|
|
@@ -30478,6 +31933,14 @@ export class MJDuplicateRunDetailMatch_ {
|
|
|
30478
31933
|
@MaxLength(10)
|
|
30479
31934
|
_mj__UpdatedAt: Date;
|
|
30480
31935
|
|
|
31936
|
+
@Field()
|
|
31937
|
+
@MaxLength(1000)
|
|
31938
|
+
DuplicateRunDetail: string;
|
|
31939
|
+
|
|
31940
|
+
@Field({nullable: true})
|
|
31941
|
+
@MaxLength(900)
|
|
31942
|
+
RecordMergeLog?: string;
|
|
31943
|
+
|
|
30481
31944
|
}
|
|
30482
31945
|
|
|
30483
31946
|
//****************************************************************************
|
|
@@ -31287,6 +32750,10 @@ export class MJDuplicateRunDetail_ {
|
|
|
31287
32750
|
@MaxLength(10)
|
|
31288
32751
|
_mj__UpdatedAt: Date;
|
|
31289
32752
|
|
|
32753
|
+
@Field()
|
|
32754
|
+
@MaxLength(510)
|
|
32755
|
+
DuplicateRun: string;
|
|
32756
|
+
|
|
31290
32757
|
@Field(() => [MJDuplicateRunDetailMatch_])
|
|
31291
32758
|
DuplicateRunDetailMatches_DuplicateRunDetailIDArray: MJDuplicateRunDetailMatch_[]; // Link to DuplicateRunDetailMatches
|
|
31292
32759
|
|
|
@@ -32064,6 +33531,10 @@ export class MJEntityActionInvocation_ {
|
|
|
32064
33531
|
@MaxLength(10)
|
|
32065
33532
|
_mj__UpdatedAt: Date;
|
|
32066
33533
|
|
|
33534
|
+
@Field()
|
|
33535
|
+
@MaxLength(850)
|
|
33536
|
+
EntityAction: string;
|
|
33537
|
+
|
|
32067
33538
|
@Field()
|
|
32068
33539
|
@MaxLength(510)
|
|
32069
33540
|
InvocationType: string;
|
|
@@ -33057,6 +34528,13 @@ export class MJEntityActionFilter_ {
|
|
|
33057
34528
|
@MaxLength(10)
|
|
33058
34529
|
_mj__UpdatedAt: Date;
|
|
33059
34530
|
|
|
34531
|
+
@Field()
|
|
34532
|
+
@MaxLength(850)
|
|
34533
|
+
EntityAction: string;
|
|
34534
|
+
|
|
34535
|
+
@Field()
|
|
34536
|
+
ActionFilter: string;
|
|
34537
|
+
|
|
33060
34538
|
}
|
|
33061
34539
|
|
|
33062
34540
|
//****************************************************************************
|
|
@@ -35598,6 +37076,10 @@ export class MJCommunicationLog_ {
|
|
|
35598
37076
|
@MaxLength(510)
|
|
35599
37077
|
CommunicationProviderMessageType: string;
|
|
35600
37078
|
|
|
37079
|
+
@Field({nullable: true})
|
|
37080
|
+
@MaxLength(200)
|
|
37081
|
+
CommunicationRun?: string;
|
|
37082
|
+
|
|
35601
37083
|
}
|
|
35602
37084
|
|
|
35603
37085
|
//****************************************************************************
|
|
@@ -36704,6 +38186,10 @@ export class MJTemplateParam_ {
|
|
|
36704
38186
|
@MaxLength(510)
|
|
36705
38187
|
Entity?: string;
|
|
36706
38188
|
|
|
38189
|
+
@Field({nullable: true})
|
|
38190
|
+
@MaxLength(510)
|
|
38191
|
+
TemplateContent?: string;
|
|
38192
|
+
|
|
36707
38193
|
}
|
|
36708
38194
|
|
|
36709
38195
|
//****************************************************************************
|
|
@@ -37092,6 +38578,10 @@ export class MJRecommendation_ {
|
|
|
37092
38578
|
@MaxLength(10)
|
|
37093
38579
|
_mj__UpdatedAt: Date;
|
|
37094
38580
|
|
|
38581
|
+
@Field()
|
|
38582
|
+
@MaxLength(510)
|
|
38583
|
+
RecommendationRun: string;
|
|
38584
|
+
|
|
37095
38585
|
@Field()
|
|
37096
38586
|
@MaxLength(510)
|
|
37097
38587
|
SourceEntity: string;
|
|
@@ -37641,6 +39131,9 @@ export class MJRecommendationItem_ {
|
|
|
37641
39131
|
@MaxLength(10)
|
|
37642
39132
|
_mj__UpdatedAt: Date;
|
|
37643
39133
|
|
|
39134
|
+
@Field()
|
|
39135
|
+
Recommendation: string;
|
|
39136
|
+
|
|
37644
39137
|
@Field()
|
|
37645
39138
|
@MaxLength(510)
|
|
37646
39139
|
DestinationEntity: string;
|
|
@@ -37987,6 +39480,10 @@ export class MJEntityCommunicationField_ {
|
|
|
37987
39480
|
@MaxLength(10)
|
|
37988
39481
|
_mj__UpdatedAt: Date;
|
|
37989
39482
|
|
|
39483
|
+
@Field()
|
|
39484
|
+
@MaxLength(200)
|
|
39485
|
+
EntityCommunicationMessageType: string;
|
|
39486
|
+
|
|
37990
39487
|
}
|
|
37991
39488
|
|
|
37992
39489
|
//****************************************************************************
|
|
@@ -38670,6 +40167,10 @@ export class MJEntityActionParam_ {
|
|
|
38670
40167
|
@MaxLength(10)
|
|
38671
40168
|
_mj__UpdatedAt: Date;
|
|
38672
40169
|
|
|
40170
|
+
@Field()
|
|
40171
|
+
@MaxLength(850)
|
|
40172
|
+
EntityAction: string;
|
|
40173
|
+
|
|
38673
40174
|
@Field()
|
|
38674
40175
|
@MaxLength(510)
|
|
38675
40176
|
ActionParam: string;
|
|
@@ -39221,6 +40722,400 @@ export class MJResourceLinkResolver extends ResolverBase {
|
|
|
39221
40722
|
|
|
39222
40723
|
}
|
|
39223
40724
|
|
|
40725
|
+
//****************************************************************************
|
|
40726
|
+
// ENTITY CLASS for MJ: Test Runs
|
|
40727
|
+
//****************************************************************************
|
|
40728
|
+
@ObjectType({ description: `Execution instance of a single test. Captures inputs, outputs, results, and links to the target being tested (e.g., Agent Run). Can be part of a suite run or standalone. The TargetLogID links to type-specific execution logs (AgentRun, WorkflowRun, etc.) which contain the detailed trace information.` })
|
|
40729
|
+
export class MJTestRun_ {
|
|
40730
|
+
@Field()
|
|
40731
|
+
@MaxLength(16)
|
|
40732
|
+
ID: string;
|
|
40733
|
+
|
|
40734
|
+
@Field({description: `Foreign Key - The test definition that was executed`})
|
|
40735
|
+
@MaxLength(16)
|
|
40736
|
+
TestID: string;
|
|
40737
|
+
|
|
40738
|
+
@Field({nullable: true, description: `Foreign Key - Optional parent suite run if this test was part of a suite execution. NULL for standalone test runs.`})
|
|
40739
|
+
@MaxLength(16)
|
|
40740
|
+
TestSuiteRunID?: string;
|
|
40741
|
+
|
|
40742
|
+
@Field({description: `Foreign Key - The user who triggered the test run (could be system user for automated runs)`})
|
|
40743
|
+
@MaxLength(16)
|
|
40744
|
+
RunByUserID: string;
|
|
40745
|
+
|
|
40746
|
+
@Field(() => Int, {nullable: true, description: `Execution sequence within the suite run. Indicates order of execution for tests in the same suite.`})
|
|
40747
|
+
Sequence?: number;
|
|
40748
|
+
|
|
40749
|
+
@Field({nullable: true, description: `Type of the target being tested (e.g., "Agent Run", "Workflow Run", "Code Generation"). Polymorphic discriminator for TargetLogID.`})
|
|
40750
|
+
@MaxLength(200)
|
|
40751
|
+
TargetType?: string;
|
|
40752
|
+
|
|
40753
|
+
@Field({nullable: true, description: `ID of the target execution log (e.g., AIAgentRun.ID, WorkflowRun.ID). This is a soft FK - the actual entity depends on TargetType. The target entity should have a reverse FK back to TestRun for bidirectional navigation.`})
|
|
40754
|
+
@MaxLength(16)
|
|
40755
|
+
TargetLogID?: string;
|
|
40756
|
+
|
|
40757
|
+
@Field({description: `Current status of the test run: Pending (queued), Running (in progress), Passed (all checks passed), Failed (at least one check failed), Skipped (not executed), Error (execution error before validation)`})
|
|
40758
|
+
@MaxLength(40)
|
|
40759
|
+
Status: string;
|
|
40760
|
+
|
|
40761
|
+
@Field({nullable: true, description: `Timestamp when the test run started execution`})
|
|
40762
|
+
@MaxLength(8)
|
|
40763
|
+
StartedAt?: Date;
|
|
40764
|
+
|
|
40765
|
+
@Field({nullable: true, description: `Timestamp when the test run completed`})
|
|
40766
|
+
@MaxLength(8)
|
|
40767
|
+
CompletedAt?: Date;
|
|
40768
|
+
|
|
40769
|
+
@Field(() => Float, {nullable: true, description: `Execution time in seconds for this test`})
|
|
40770
|
+
DurationSeconds?: number;
|
|
40771
|
+
|
|
40772
|
+
@Field({nullable: true, description: `JSON object with the actual inputs used for this test run (may differ from test definition if parameterized)`})
|
|
40773
|
+
InputData?: string;
|
|
40774
|
+
|
|
40775
|
+
@Field({nullable: true, description: `JSON object with the expected outputs/outcomes for this test run`})
|
|
40776
|
+
ExpectedOutputData?: string;
|
|
40777
|
+
|
|
40778
|
+
@Field({nullable: true, description: `JSON object with the actual outputs produced by the test execution`})
|
|
40779
|
+
ActualOutputData?: string;
|
|
40780
|
+
|
|
40781
|
+
@Field(() => Int, {nullable: true, description: `Number of validation checks that passed`})
|
|
40782
|
+
PassedChecks?: number;
|
|
40783
|
+
|
|
40784
|
+
@Field(() => Int, {nullable: true, description: `Number of validation checks that failed`})
|
|
40785
|
+
FailedChecks?: number;
|
|
40786
|
+
|
|
40787
|
+
@Field(() => Int, {nullable: true, description: `Total number of validation checks performed`})
|
|
40788
|
+
TotalChecks?: number;
|
|
40789
|
+
|
|
40790
|
+
@Field(() => Float, {nullable: true, description: `Overall test score from 0.0000 to 1.0000 (0-100%). Calculated by test driver based on passed/failed checks and weights.`})
|
|
40791
|
+
Score?: number;
|
|
40792
|
+
|
|
40793
|
+
@Field(() => Float, {nullable: true, description: `Cost in USD for running this test (e.g., LLM token costs, compute resources)`})
|
|
40794
|
+
CostUSD?: number;
|
|
40795
|
+
|
|
40796
|
+
@Field({nullable: true, description: `Error message if the test encountered an execution error`})
|
|
40797
|
+
ErrorMessage?: string;
|
|
40798
|
+
|
|
40799
|
+
@Field({nullable: true, description: `JSON object with detailed results including individual check results, metrics, oracle outputs, and diagnostic information`})
|
|
40800
|
+
ResultDetails?: string;
|
|
40801
|
+
|
|
40802
|
+
@Field()
|
|
40803
|
+
@MaxLength(10)
|
|
40804
|
+
_mj__CreatedAt: Date;
|
|
40805
|
+
|
|
40806
|
+
@Field()
|
|
40807
|
+
@MaxLength(10)
|
|
40808
|
+
_mj__UpdatedAt: Date;
|
|
40809
|
+
|
|
40810
|
+
@Field()
|
|
40811
|
+
@MaxLength(510)
|
|
40812
|
+
Test: string;
|
|
40813
|
+
|
|
40814
|
+
@Field()
|
|
40815
|
+
@MaxLength(200)
|
|
40816
|
+
RunByUser: string;
|
|
40817
|
+
|
|
40818
|
+
@Field(() => [MJTestRunFeedback_])
|
|
40819
|
+
MJ_TestRunFeedbacks_TestRunIDArray: MJTestRunFeedback_[]; // Link to MJ_TestRunFeedbacks
|
|
40820
|
+
|
|
40821
|
+
@Field(() => [MJAIPromptRun_])
|
|
40822
|
+
MJ_AIPromptRuns_TestRunIDArray: MJAIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
40823
|
+
|
|
40824
|
+
@Field(() => [MJAIAgentRun_])
|
|
40825
|
+
MJ_AIAgentRuns_TestRunIDArray: MJAIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
40826
|
+
|
|
40827
|
+
@Field(() => [MJConversation_])
|
|
40828
|
+
Conversations_TestRunIDArray: MJConversation_[]; // Link to Conversations
|
|
40829
|
+
|
|
40830
|
+
@Field(() => [MJConversationDetail_])
|
|
40831
|
+
ConversationDetails_TestRunIDArray: MJConversationDetail_[]; // Link to ConversationDetails
|
|
40832
|
+
|
|
40833
|
+
}
|
|
40834
|
+
|
|
40835
|
+
//****************************************************************************
|
|
40836
|
+
// INPUT TYPE for MJ: Test Runs
|
|
40837
|
+
//****************************************************************************
|
|
40838
|
+
@InputType()
|
|
40839
|
+
export class CreateMJTestRunInput {
|
|
40840
|
+
@Field({ nullable: true })
|
|
40841
|
+
ID?: string;
|
|
40842
|
+
|
|
40843
|
+
@Field({ nullable: true })
|
|
40844
|
+
TestID?: string;
|
|
40845
|
+
|
|
40846
|
+
@Field({ nullable: true })
|
|
40847
|
+
TestSuiteRunID: string | null;
|
|
40848
|
+
|
|
40849
|
+
@Field({ nullable: true })
|
|
40850
|
+
RunByUserID?: string;
|
|
40851
|
+
|
|
40852
|
+
@Field(() => Int, { nullable: true })
|
|
40853
|
+
Sequence: number | null;
|
|
40854
|
+
|
|
40855
|
+
@Field({ nullable: true })
|
|
40856
|
+
TargetType: string | null;
|
|
40857
|
+
|
|
40858
|
+
@Field({ nullable: true })
|
|
40859
|
+
TargetLogID: string | null;
|
|
40860
|
+
|
|
40861
|
+
@Field({ nullable: true })
|
|
40862
|
+
Status?: string;
|
|
40863
|
+
|
|
40864
|
+
@Field({ nullable: true })
|
|
40865
|
+
StartedAt: Date | null;
|
|
40866
|
+
|
|
40867
|
+
@Field({ nullable: true })
|
|
40868
|
+
CompletedAt: Date | null;
|
|
40869
|
+
|
|
40870
|
+
@Field(() => Float, { nullable: true })
|
|
40871
|
+
DurationSeconds: number | null;
|
|
40872
|
+
|
|
40873
|
+
@Field({ nullable: true })
|
|
40874
|
+
InputData: string | null;
|
|
40875
|
+
|
|
40876
|
+
@Field({ nullable: true })
|
|
40877
|
+
ExpectedOutputData: string | null;
|
|
40878
|
+
|
|
40879
|
+
@Field({ nullable: true })
|
|
40880
|
+
ActualOutputData: string | null;
|
|
40881
|
+
|
|
40882
|
+
@Field(() => Int, { nullable: true })
|
|
40883
|
+
PassedChecks: number | null;
|
|
40884
|
+
|
|
40885
|
+
@Field(() => Int, { nullable: true })
|
|
40886
|
+
FailedChecks: number | null;
|
|
40887
|
+
|
|
40888
|
+
@Field(() => Int, { nullable: true })
|
|
40889
|
+
TotalChecks: number | null;
|
|
40890
|
+
|
|
40891
|
+
@Field(() => Float, { nullable: true })
|
|
40892
|
+
Score: number | null;
|
|
40893
|
+
|
|
40894
|
+
@Field(() => Float, { nullable: true })
|
|
40895
|
+
CostUSD: number | null;
|
|
40896
|
+
|
|
40897
|
+
@Field({ nullable: true })
|
|
40898
|
+
ErrorMessage: string | null;
|
|
40899
|
+
|
|
40900
|
+
@Field({ nullable: true })
|
|
40901
|
+
ResultDetails: string | null;
|
|
40902
|
+
}
|
|
40903
|
+
|
|
40904
|
+
|
|
40905
|
+
//****************************************************************************
|
|
40906
|
+
// INPUT TYPE for MJ: Test Runs
|
|
40907
|
+
//****************************************************************************
|
|
40908
|
+
@InputType()
|
|
40909
|
+
export class UpdateMJTestRunInput {
|
|
40910
|
+
@Field()
|
|
40911
|
+
ID: string;
|
|
40912
|
+
|
|
40913
|
+
@Field({ nullable: true })
|
|
40914
|
+
TestID?: string;
|
|
40915
|
+
|
|
40916
|
+
@Field({ nullable: true })
|
|
40917
|
+
TestSuiteRunID?: string | null;
|
|
40918
|
+
|
|
40919
|
+
@Field({ nullable: true })
|
|
40920
|
+
RunByUserID?: string;
|
|
40921
|
+
|
|
40922
|
+
@Field(() => Int, { nullable: true })
|
|
40923
|
+
Sequence?: number | null;
|
|
40924
|
+
|
|
40925
|
+
@Field({ nullable: true })
|
|
40926
|
+
TargetType?: string | null;
|
|
40927
|
+
|
|
40928
|
+
@Field({ nullable: true })
|
|
40929
|
+
TargetLogID?: string | null;
|
|
40930
|
+
|
|
40931
|
+
@Field({ nullable: true })
|
|
40932
|
+
Status?: string;
|
|
40933
|
+
|
|
40934
|
+
@Field({ nullable: true })
|
|
40935
|
+
StartedAt?: Date | null;
|
|
40936
|
+
|
|
40937
|
+
@Field({ nullable: true })
|
|
40938
|
+
CompletedAt?: Date | null;
|
|
40939
|
+
|
|
40940
|
+
@Field(() => Float, { nullable: true })
|
|
40941
|
+
DurationSeconds?: number | null;
|
|
40942
|
+
|
|
40943
|
+
@Field({ nullable: true })
|
|
40944
|
+
InputData?: string | null;
|
|
40945
|
+
|
|
40946
|
+
@Field({ nullable: true })
|
|
40947
|
+
ExpectedOutputData?: string | null;
|
|
40948
|
+
|
|
40949
|
+
@Field({ nullable: true })
|
|
40950
|
+
ActualOutputData?: string | null;
|
|
40951
|
+
|
|
40952
|
+
@Field(() => Int, { nullable: true })
|
|
40953
|
+
PassedChecks?: number | null;
|
|
40954
|
+
|
|
40955
|
+
@Field(() => Int, { nullable: true })
|
|
40956
|
+
FailedChecks?: number | null;
|
|
40957
|
+
|
|
40958
|
+
@Field(() => Int, { nullable: true })
|
|
40959
|
+
TotalChecks?: number | null;
|
|
40960
|
+
|
|
40961
|
+
@Field(() => Float, { nullable: true })
|
|
40962
|
+
Score?: number | null;
|
|
40963
|
+
|
|
40964
|
+
@Field(() => Float, { nullable: true })
|
|
40965
|
+
CostUSD?: number | null;
|
|
40966
|
+
|
|
40967
|
+
@Field({ nullable: true })
|
|
40968
|
+
ErrorMessage?: string | null;
|
|
40969
|
+
|
|
40970
|
+
@Field({ nullable: true })
|
|
40971
|
+
ResultDetails?: string | null;
|
|
40972
|
+
|
|
40973
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
40974
|
+
OldValues___?: KeyValuePairInput[];
|
|
40975
|
+
}
|
|
40976
|
+
|
|
40977
|
+
//****************************************************************************
|
|
40978
|
+
// RESOLVER for MJ: Test Runs
|
|
40979
|
+
//****************************************************************************
|
|
40980
|
+
@ObjectType()
|
|
40981
|
+
export class RunMJTestRunViewResult {
|
|
40982
|
+
@Field(() => [MJTestRun_])
|
|
40983
|
+
Results: MJTestRun_[];
|
|
40984
|
+
|
|
40985
|
+
@Field(() => String, {nullable: true})
|
|
40986
|
+
UserViewRunID?: string;
|
|
40987
|
+
|
|
40988
|
+
@Field(() => Int, {nullable: true})
|
|
40989
|
+
RowCount: number;
|
|
40990
|
+
|
|
40991
|
+
@Field(() => Int, {nullable: true})
|
|
40992
|
+
TotalRowCount: number;
|
|
40993
|
+
|
|
40994
|
+
@Field(() => Int, {nullable: true})
|
|
40995
|
+
ExecutionTime: number;
|
|
40996
|
+
|
|
40997
|
+
@Field({nullable: true})
|
|
40998
|
+
ErrorMessage?: string;
|
|
40999
|
+
|
|
41000
|
+
@Field(() => Boolean, {nullable: false})
|
|
41001
|
+
Success: boolean;
|
|
41002
|
+
}
|
|
41003
|
+
|
|
41004
|
+
@Resolver(MJTestRun_)
|
|
41005
|
+
export class MJTestRunResolver extends ResolverBase {
|
|
41006
|
+
@Query(() => RunMJTestRunViewResult)
|
|
41007
|
+
async RunMJTestRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41008
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41009
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
41010
|
+
}
|
|
41011
|
+
|
|
41012
|
+
@Query(() => RunMJTestRunViewResult)
|
|
41013
|
+
async RunMJTestRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41014
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41015
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
41016
|
+
}
|
|
41017
|
+
|
|
41018
|
+
@Query(() => RunMJTestRunViewResult)
|
|
41019
|
+
async RunMJTestRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41020
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41021
|
+
input.EntityName = 'MJ: Test Runs';
|
|
41022
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
41023
|
+
}
|
|
41024
|
+
@Query(() => MJTestRun_, { nullable: true })
|
|
41025
|
+
async MJTestRun(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTestRun_ | null> {
|
|
41026
|
+
this.CheckUserReadPermissions('MJ: Test Runs', userPayload);
|
|
41027
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41028
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
41029
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRuns] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
41030
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
41031
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Test Runs', rows && rows.length > 0 ? rows[0] : {})
|
|
41032
|
+
return result;
|
|
41033
|
+
}
|
|
41034
|
+
|
|
41035
|
+
@FieldResolver(() => [MJTestRunFeedback_])
|
|
41036
|
+
async MJ_TestRunFeedbacks_TestRunIDArray(@Root() mjtestrun_: MJTestRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41037
|
+
this.CheckUserReadPermissions('MJ: Test Run Feedbacks', userPayload);
|
|
41038
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41039
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
41040
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRunFeedbacks] WHERE [TestRunID]='${mjtestrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Run Feedbacks', userPayload, EntityPermissionType.Read, 'AND');
|
|
41041
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
41042
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Run Feedbacks', rows);
|
|
41043
|
+
return result;
|
|
41044
|
+
}
|
|
41045
|
+
|
|
41046
|
+
@FieldResolver(() => [MJAIPromptRun_])
|
|
41047
|
+
async MJ_AIPromptRuns_TestRunIDArray(@Root() mjtestrun_: MJTestRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41048
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
41049
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41050
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
41051
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [TestRunID]='${mjtestrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
41052
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
41053
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
|
|
41054
|
+
return result;
|
|
41055
|
+
}
|
|
41056
|
+
|
|
41057
|
+
@FieldResolver(() => [MJAIAgentRun_])
|
|
41058
|
+
async MJ_AIAgentRuns_TestRunIDArray(@Root() mjtestrun_: MJTestRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41059
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
41060
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41061
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
41062
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [TestRunID]='${mjtestrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
41063
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
41064
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
|
|
41065
|
+
return result;
|
|
41066
|
+
}
|
|
41067
|
+
|
|
41068
|
+
@FieldResolver(() => [MJConversation_])
|
|
41069
|
+
async Conversations_TestRunIDArray(@Root() mjtestrun_: MJTestRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41070
|
+
this.CheckUserReadPermissions('Conversations', userPayload);
|
|
41071
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41072
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
41073
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversations] WHERE [TestRunID]='${mjtestrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
41074
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
41075
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Conversations', rows);
|
|
41076
|
+
return result;
|
|
41077
|
+
}
|
|
41078
|
+
|
|
41079
|
+
@FieldResolver(() => [MJConversationDetail_])
|
|
41080
|
+
async ConversationDetails_TestRunIDArray(@Root() mjtestrun_: MJTestRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41081
|
+
this.CheckUserReadPermissions('Conversation Details', userPayload);
|
|
41082
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41083
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
41084
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetails] WHERE [TestRunID]='${mjtestrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
41085
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
41086
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Conversation Details', rows);
|
|
41087
|
+
return result;
|
|
41088
|
+
}
|
|
41089
|
+
|
|
41090
|
+
@Mutation(() => MJTestRun_)
|
|
41091
|
+
async CreateMJTestRun(
|
|
41092
|
+
@Arg('input', () => CreateMJTestRunInput) input: CreateMJTestRunInput,
|
|
41093
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
41094
|
+
@PubSub() pubSub: PubSubEngine
|
|
41095
|
+
) {
|
|
41096
|
+
const provider = GetReadWriteProvider(providers);
|
|
41097
|
+
return this.CreateRecord('MJ: Test Runs', input, provider, userPayload, pubSub)
|
|
41098
|
+
}
|
|
41099
|
+
|
|
41100
|
+
@Mutation(() => MJTestRun_)
|
|
41101
|
+
async UpdateMJTestRun(
|
|
41102
|
+
@Arg('input', () => UpdateMJTestRunInput) input: UpdateMJTestRunInput,
|
|
41103
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
41104
|
+
@PubSub() pubSub: PubSubEngine
|
|
41105
|
+
) {
|
|
41106
|
+
const provider = GetReadWriteProvider(providers);
|
|
41107
|
+
return this.UpdateRecord('MJ: Test Runs', input, provider, userPayload, pubSub);
|
|
41108
|
+
}
|
|
41109
|
+
|
|
41110
|
+
@Mutation(() => MJTestRun_)
|
|
41111
|
+
async DeleteMJTestRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41112
|
+
const provider = GetReadWriteProvider(providers);
|
|
41113
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
41114
|
+
return this.DeleteRecord('MJ: Test Runs', key, options, provider, userPayload, pubSub);
|
|
41115
|
+
}
|
|
41116
|
+
|
|
41117
|
+
}
|
|
41118
|
+
|
|
39224
41119
|
//****************************************************************************
|
|
39225
41120
|
// ENTITY CLASS for MJ: AI Agent Artifact Types
|
|
39226
41121
|
//****************************************************************************
|
|
@@ -42083,6 +43978,10 @@ export class MJArtifactType_ {
|
|
|
42083
43978
|
@MaxLength(510)
|
|
42084
43979
|
DriverClass?: string;
|
|
42085
43980
|
|
|
43981
|
+
@Field({nullable: true, description: `Font Awesome icon class name for displaying this artifact type in the UI (e.g., fa-file-code, fa-chart-line)`})
|
|
43982
|
+
@MaxLength(510)
|
|
43983
|
+
Icon?: string;
|
|
43984
|
+
|
|
42086
43985
|
@Field({nullable: true})
|
|
42087
43986
|
@MaxLength(200)
|
|
42088
43987
|
Parent?: string;
|
|
@@ -42136,6 +44035,9 @@ export class CreateMJArtifactTypeInput {
|
|
|
42136
44035
|
|
|
42137
44036
|
@Field({ nullable: true })
|
|
42138
44037
|
DriverClass: string | null;
|
|
44038
|
+
|
|
44039
|
+
@Field({ nullable: true })
|
|
44040
|
+
Icon: string | null;
|
|
42139
44041
|
}
|
|
42140
44042
|
|
|
42141
44043
|
|
|
@@ -42168,6 +44070,9 @@ export class UpdateMJArtifactTypeInput {
|
|
|
42168
44070
|
@Field({ nullable: true })
|
|
42169
44071
|
DriverClass?: string | null;
|
|
42170
44072
|
|
|
44073
|
+
@Field({ nullable: true })
|
|
44074
|
+
Icon?: string | null;
|
|
44075
|
+
|
|
42171
44076
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
42172
44077
|
OldValues___?: KeyValuePairInput[];
|
|
42173
44078
|
}
|
|
@@ -42826,6 +44731,13 @@ export class MJAIAgentExample_ {
|
|
|
42826
44731
|
@MaxLength(510)
|
|
42827
44732
|
SourceConversation?: string;
|
|
42828
44733
|
|
|
44734
|
+
@Field({nullable: true})
|
|
44735
|
+
SourceConversationDetail?: string;
|
|
44736
|
+
|
|
44737
|
+
@Field({nullable: true})
|
|
44738
|
+
@MaxLength(510)
|
|
44739
|
+
SourceAIAgentRun?: string;
|
|
44740
|
+
|
|
42829
44741
|
@Field({nullable: true})
|
|
42830
44742
|
@MaxLength(100)
|
|
42831
44743
|
EmbeddingModel?: string;
|
|
@@ -43031,6 +44943,241 @@ export class MJAIAgentExampleResolver extends ResolverBase {
|
|
|
43031
44943
|
|
|
43032
44944
|
}
|
|
43033
44945
|
|
|
44946
|
+
//****************************************************************************
|
|
44947
|
+
// ENTITY CLASS for MJ: Test Suites
|
|
44948
|
+
//****************************************************************************
|
|
44949
|
+
@ObjectType({ description: `Hierarchical organization of tests into suites. Test suites can contain other suites (via ParentID) and tests (via TestSuiteTest junction table). Suites provide logical grouping for running batches of related tests.` })
|
|
44950
|
+
export class MJTestSuite_ {
|
|
44951
|
+
@Field()
|
|
44952
|
+
@MaxLength(16)
|
|
44953
|
+
ID: string;
|
|
44954
|
+
|
|
44955
|
+
@Field({nullable: true, description: `Optional parent suite ID for hierarchical organization. NULL for root-level suites.`})
|
|
44956
|
+
@MaxLength(16)
|
|
44957
|
+
ParentID?: string;
|
|
44958
|
+
|
|
44959
|
+
@Field({description: `Name of the test suite (e.g., "Skip Component Generation Suite", "Agent Memory Tests")`})
|
|
44960
|
+
@MaxLength(510)
|
|
44961
|
+
Name: string;
|
|
44962
|
+
|
|
44963
|
+
@Field({nullable: true, description: `Detailed description of what this suite tests and its purpose`})
|
|
44964
|
+
Description?: string;
|
|
44965
|
+
|
|
44966
|
+
@Field({description: `Status of the suite: Pending (being configured), Active (available for use), Disabled (archived/not in use)`})
|
|
44967
|
+
@MaxLength(40)
|
|
44968
|
+
Status: string;
|
|
44969
|
+
|
|
44970
|
+
@Field({nullable: true, description: `JSON array of tags for categorization and filtering (e.g., ["smoke", "regression", "nightly"])`})
|
|
44971
|
+
Tags?: string;
|
|
44972
|
+
|
|
44973
|
+
@Field({nullable: true, description: `JSON configuration object for suite-level settings (e.g., environment defaults, retry policies, notification settings)`})
|
|
44974
|
+
Configuration?: string;
|
|
44975
|
+
|
|
44976
|
+
@Field()
|
|
44977
|
+
@MaxLength(10)
|
|
44978
|
+
_mj__CreatedAt: Date;
|
|
44979
|
+
|
|
44980
|
+
@Field()
|
|
44981
|
+
@MaxLength(10)
|
|
44982
|
+
_mj__UpdatedAt: Date;
|
|
44983
|
+
|
|
44984
|
+
@Field({nullable: true})
|
|
44985
|
+
@MaxLength(510)
|
|
44986
|
+
Parent?: string;
|
|
44987
|
+
|
|
44988
|
+
@Field({nullable: true})
|
|
44989
|
+
@MaxLength(16)
|
|
44990
|
+
RootParentID?: string;
|
|
44991
|
+
|
|
44992
|
+
@Field(() => [MJTestSuite_])
|
|
44993
|
+
MJ_TestSuites_ParentIDArray: MJTestSuite_[]; // Link to MJ_TestSuites
|
|
44994
|
+
|
|
44995
|
+
@Field(() => [MJTestSuiteTest_])
|
|
44996
|
+
MJ_TestSuiteTests_SuiteIDArray: MJTestSuiteTest_[]; // Link to MJ_TestSuiteTests
|
|
44997
|
+
|
|
44998
|
+
@Field(() => [MJTestSuiteRun_])
|
|
44999
|
+
MJ_TestSuiteRuns_SuiteIDArray: MJTestSuiteRun_[]; // Link to MJ_TestSuiteRuns
|
|
45000
|
+
|
|
45001
|
+
}
|
|
45002
|
+
|
|
45003
|
+
//****************************************************************************
|
|
45004
|
+
// INPUT TYPE for MJ: Test Suites
|
|
45005
|
+
//****************************************************************************
|
|
45006
|
+
@InputType()
|
|
45007
|
+
export class CreateMJTestSuiteInput {
|
|
45008
|
+
@Field({ nullable: true })
|
|
45009
|
+
ID?: string;
|
|
45010
|
+
|
|
45011
|
+
@Field({ nullable: true })
|
|
45012
|
+
ParentID: string | null;
|
|
45013
|
+
|
|
45014
|
+
@Field({ nullable: true })
|
|
45015
|
+
Name?: string;
|
|
45016
|
+
|
|
45017
|
+
@Field({ nullable: true })
|
|
45018
|
+
Description: string | null;
|
|
45019
|
+
|
|
45020
|
+
@Field({ nullable: true })
|
|
45021
|
+
Status?: string;
|
|
45022
|
+
|
|
45023
|
+
@Field({ nullable: true })
|
|
45024
|
+
Tags: string | null;
|
|
45025
|
+
|
|
45026
|
+
@Field({ nullable: true })
|
|
45027
|
+
Configuration: string | null;
|
|
45028
|
+
}
|
|
45029
|
+
|
|
45030
|
+
|
|
45031
|
+
//****************************************************************************
|
|
45032
|
+
// INPUT TYPE for MJ: Test Suites
|
|
45033
|
+
//****************************************************************************
|
|
45034
|
+
@InputType()
|
|
45035
|
+
export class UpdateMJTestSuiteInput {
|
|
45036
|
+
@Field()
|
|
45037
|
+
ID: string;
|
|
45038
|
+
|
|
45039
|
+
@Field({ nullable: true })
|
|
45040
|
+
ParentID?: string | null;
|
|
45041
|
+
|
|
45042
|
+
@Field({ nullable: true })
|
|
45043
|
+
Name?: string;
|
|
45044
|
+
|
|
45045
|
+
@Field({ nullable: true })
|
|
45046
|
+
Description?: string | null;
|
|
45047
|
+
|
|
45048
|
+
@Field({ nullable: true })
|
|
45049
|
+
Status?: string;
|
|
45050
|
+
|
|
45051
|
+
@Field({ nullable: true })
|
|
45052
|
+
Tags?: string | null;
|
|
45053
|
+
|
|
45054
|
+
@Field({ nullable: true })
|
|
45055
|
+
Configuration?: string | null;
|
|
45056
|
+
|
|
45057
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
45058
|
+
OldValues___?: KeyValuePairInput[];
|
|
45059
|
+
}
|
|
45060
|
+
|
|
45061
|
+
//****************************************************************************
|
|
45062
|
+
// RESOLVER for MJ: Test Suites
|
|
45063
|
+
//****************************************************************************
|
|
45064
|
+
@ObjectType()
|
|
45065
|
+
export class RunMJTestSuiteViewResult {
|
|
45066
|
+
@Field(() => [MJTestSuite_])
|
|
45067
|
+
Results: MJTestSuite_[];
|
|
45068
|
+
|
|
45069
|
+
@Field(() => String, {nullable: true})
|
|
45070
|
+
UserViewRunID?: string;
|
|
45071
|
+
|
|
45072
|
+
@Field(() => Int, {nullable: true})
|
|
45073
|
+
RowCount: number;
|
|
45074
|
+
|
|
45075
|
+
@Field(() => Int, {nullable: true})
|
|
45076
|
+
TotalRowCount: number;
|
|
45077
|
+
|
|
45078
|
+
@Field(() => Int, {nullable: true})
|
|
45079
|
+
ExecutionTime: number;
|
|
45080
|
+
|
|
45081
|
+
@Field({nullable: true})
|
|
45082
|
+
ErrorMessage?: string;
|
|
45083
|
+
|
|
45084
|
+
@Field(() => Boolean, {nullable: false})
|
|
45085
|
+
Success: boolean;
|
|
45086
|
+
}
|
|
45087
|
+
|
|
45088
|
+
@Resolver(MJTestSuite_)
|
|
45089
|
+
export class MJTestSuiteResolver extends ResolverBase {
|
|
45090
|
+
@Query(() => RunMJTestSuiteViewResult)
|
|
45091
|
+
async RunMJTestSuiteViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45092
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45093
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
45094
|
+
}
|
|
45095
|
+
|
|
45096
|
+
@Query(() => RunMJTestSuiteViewResult)
|
|
45097
|
+
async RunMJTestSuiteViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45098
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45099
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
45100
|
+
}
|
|
45101
|
+
|
|
45102
|
+
@Query(() => RunMJTestSuiteViewResult)
|
|
45103
|
+
async RunMJTestSuiteDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45104
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45105
|
+
input.EntityName = 'MJ: Test Suites';
|
|
45106
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
45107
|
+
}
|
|
45108
|
+
@Query(() => MJTestSuite_, { nullable: true })
|
|
45109
|
+
async MJTestSuite(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTestSuite_ | null> {
|
|
45110
|
+
this.CheckUserReadPermissions('MJ: Test Suites', userPayload);
|
|
45111
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45112
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
45113
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestSuites] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suites', userPayload, EntityPermissionType.Read, 'AND');
|
|
45114
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
45115
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Test Suites', rows && rows.length > 0 ? rows[0] : {})
|
|
45116
|
+
return result;
|
|
45117
|
+
}
|
|
45118
|
+
|
|
45119
|
+
@FieldResolver(() => [MJTestSuite_])
|
|
45120
|
+
async MJ_TestSuites_ParentIDArray(@Root() mjtestsuite_: MJTestSuite_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45121
|
+
this.CheckUserReadPermissions('MJ: Test Suites', userPayload);
|
|
45122
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45123
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
45124
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestSuites] WHERE [ParentID]='${mjtestsuite_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suites', userPayload, EntityPermissionType.Read, 'AND');
|
|
45125
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
45126
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Suites', rows);
|
|
45127
|
+
return result;
|
|
45128
|
+
}
|
|
45129
|
+
|
|
45130
|
+
@FieldResolver(() => [MJTestSuiteTest_])
|
|
45131
|
+
async MJ_TestSuiteTests_SuiteIDArray(@Root() mjtestsuite_: MJTestSuite_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45132
|
+
this.CheckUserReadPermissions('MJ: Test Suite Tests', userPayload);
|
|
45133
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45134
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
45135
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestSuiteTests] WHERE [SuiteID]='${mjtestsuite_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suite Tests', userPayload, EntityPermissionType.Read, 'AND');
|
|
45136
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
45137
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Suite Tests', rows);
|
|
45138
|
+
return result;
|
|
45139
|
+
}
|
|
45140
|
+
|
|
45141
|
+
@FieldResolver(() => [MJTestSuiteRun_])
|
|
45142
|
+
async MJ_TestSuiteRuns_SuiteIDArray(@Root() mjtestsuite_: MJTestSuite_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45143
|
+
this.CheckUserReadPermissions('MJ: Test Suite Runs', userPayload);
|
|
45144
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45145
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
45146
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestSuiteRuns] WHERE [SuiteID]='${mjtestsuite_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suite Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
45147
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
45148
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Suite Runs', rows);
|
|
45149
|
+
return result;
|
|
45150
|
+
}
|
|
45151
|
+
|
|
45152
|
+
@Mutation(() => MJTestSuite_)
|
|
45153
|
+
async CreateMJTestSuite(
|
|
45154
|
+
@Arg('input', () => CreateMJTestSuiteInput) input: CreateMJTestSuiteInput,
|
|
45155
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
45156
|
+
@PubSub() pubSub: PubSubEngine
|
|
45157
|
+
) {
|
|
45158
|
+
const provider = GetReadWriteProvider(providers);
|
|
45159
|
+
return this.CreateRecord('MJ: Test Suites', input, provider, userPayload, pubSub)
|
|
45160
|
+
}
|
|
45161
|
+
|
|
45162
|
+
@Mutation(() => MJTestSuite_)
|
|
45163
|
+
async UpdateMJTestSuite(
|
|
45164
|
+
@Arg('input', () => UpdateMJTestSuiteInput) input: UpdateMJTestSuiteInput,
|
|
45165
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
45166
|
+
@PubSub() pubSub: PubSubEngine
|
|
45167
|
+
) {
|
|
45168
|
+
const provider = GetReadWriteProvider(providers);
|
|
45169
|
+
return this.UpdateRecord('MJ: Test Suites', input, provider, userPayload, pubSub);
|
|
45170
|
+
}
|
|
45171
|
+
|
|
45172
|
+
@Mutation(() => MJTestSuite_)
|
|
45173
|
+
async DeleteMJTestSuite(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45174
|
+
const provider = GetReadWriteProvider(providers);
|
|
45175
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
45176
|
+
return this.DeleteRecord('MJ: Test Suites', key, options, provider, userPayload, pubSub);
|
|
45177
|
+
}
|
|
45178
|
+
|
|
45179
|
+
}
|
|
45180
|
+
|
|
43034
45181
|
//****************************************************************************
|
|
43035
45182
|
// ENTITY CLASS for MJ: Conversation Artifacts
|
|
43036
45183
|
//****************************************************************************
|
|
@@ -44595,6 +46742,9 @@ export class MJConversationDetailRating_ {
|
|
|
44595
46742
|
@MaxLength(10)
|
|
44596
46743
|
_mj__UpdatedAt: Date;
|
|
44597
46744
|
|
|
46745
|
+
@Field()
|
|
46746
|
+
ConversationDetail: string;
|
|
46747
|
+
|
|
44598
46748
|
@Field()
|
|
44599
46749
|
@MaxLength(200)
|
|
44600
46750
|
User: string;
|
|
@@ -45327,6 +47477,336 @@ export class MJComponentLibraryLinkResolver extends ResolverBase {
|
|
|
45327
47477
|
|
|
45328
47478
|
}
|
|
45329
47479
|
|
|
47480
|
+
//****************************************************************************
|
|
47481
|
+
// ENTITY CLASS for MJ: Test Suite Runs
|
|
47482
|
+
//****************************************************************************
|
|
47483
|
+
@ObjectType({ description: `Execution instance of a test suite. Captures who ran it, when, in what environment, and aggregates results from all tests in the suite. Supports versioning via GitCommit and AgentVersion fields to track system state during execution.` })
|
|
47484
|
+
export class MJTestSuiteRun_ {
|
|
47485
|
+
@Field()
|
|
47486
|
+
@MaxLength(16)
|
|
47487
|
+
ID: string;
|
|
47488
|
+
|
|
47489
|
+
@Field({description: `Foreign Key - The test suite that was executed`})
|
|
47490
|
+
@MaxLength(16)
|
|
47491
|
+
SuiteID: string;
|
|
47492
|
+
|
|
47493
|
+
@Field({description: `Foreign Key - The user who triggered the suite run (could be system user for automated runs)`})
|
|
47494
|
+
@MaxLength(16)
|
|
47495
|
+
RunByUserID: string;
|
|
47496
|
+
|
|
47497
|
+
@Field({nullable: true, description: `Environment where tests were executed (e.g., "dev", "staging", "prod", "ci")`})
|
|
47498
|
+
@MaxLength(100)
|
|
47499
|
+
Environment?: string;
|
|
47500
|
+
|
|
47501
|
+
@Field({nullable: true, description: `How the run was triggered (e.g., "manual", "ci", "scheduled", "shadow", "release")`})
|
|
47502
|
+
@MaxLength(100)
|
|
47503
|
+
TriggerType?: string;
|
|
47504
|
+
|
|
47505
|
+
@Field({nullable: true, description: `Git commit SHA of the code version being tested. Enables correlation between test results and code changes.`})
|
|
47506
|
+
@MaxLength(200)
|
|
47507
|
+
GitCommit?: string;
|
|
47508
|
+
|
|
47509
|
+
@Field({nullable: true, description: `Version of the agent or system being tested (e.g., "skip-agent-2.1.0", "workflow-engine-3.4.2"). Enables version comparison and regression detection.`})
|
|
47510
|
+
@MaxLength(200)
|
|
47511
|
+
AgentVersion?: string;
|
|
47512
|
+
|
|
47513
|
+
@Field({description: `Current status of the suite run: Pending (queued), Running (in progress), Completed (finished successfully), Failed (suite-level failure), Cancelled (stopped by user)`})
|
|
47514
|
+
@MaxLength(40)
|
|
47515
|
+
Status: string;
|
|
47516
|
+
|
|
47517
|
+
@Field({nullable: true, description: `Timestamp when the suite run started execution`})
|
|
47518
|
+
@MaxLength(8)
|
|
47519
|
+
StartedAt?: Date;
|
|
47520
|
+
|
|
47521
|
+
@Field({nullable: true, description: `Timestamp when the suite run completed (successfully or with failures)`})
|
|
47522
|
+
@MaxLength(8)
|
|
47523
|
+
CompletedAt?: Date;
|
|
47524
|
+
|
|
47525
|
+
@Field(() => Int, {nullable: true, description: `Total number of tests executed in this suite run`})
|
|
47526
|
+
TotalTests?: number;
|
|
47527
|
+
|
|
47528
|
+
@Field(() => Int, {nullable: true, description: `Number of tests that passed all checks`})
|
|
47529
|
+
PassedTests?: number;
|
|
47530
|
+
|
|
47531
|
+
@Field(() => Int, {nullable: true, description: `Number of tests that failed at least one check`})
|
|
47532
|
+
FailedTests?: number;
|
|
47533
|
+
|
|
47534
|
+
@Field(() => Int, {nullable: true, description: `Number of tests that were skipped (not executed)`})
|
|
47535
|
+
SkippedTests?: number;
|
|
47536
|
+
|
|
47537
|
+
@Field(() => Int, {nullable: true, description: `Number of tests that encountered execution errors (different from failing validation)`})
|
|
47538
|
+
ErrorTests?: number;
|
|
47539
|
+
|
|
47540
|
+
@Field(() => Float, {nullable: true, description: `Total execution time in seconds for the entire suite`})
|
|
47541
|
+
TotalDurationSeconds?: number;
|
|
47542
|
+
|
|
47543
|
+
@Field(() => Float, {nullable: true, description: `Total cost in USD for running the entire suite (sum of all test costs)`})
|
|
47544
|
+
TotalCostUSD?: number;
|
|
47545
|
+
|
|
47546
|
+
@Field({nullable: true, description: `JSON snapshot of the runtime configuration used for this suite run`})
|
|
47547
|
+
Configuration?: string;
|
|
47548
|
+
|
|
47549
|
+
@Field({nullable: true, description: `JSON object with aggregated results and statistics from the suite run`})
|
|
47550
|
+
ResultSummary?: string;
|
|
47551
|
+
|
|
47552
|
+
@Field({nullable: true, description: `Error message if the suite-level execution failed (before individual tests could run)`})
|
|
47553
|
+
ErrorMessage?: string;
|
|
47554
|
+
|
|
47555
|
+
@Field()
|
|
47556
|
+
@MaxLength(10)
|
|
47557
|
+
_mj__CreatedAt: Date;
|
|
47558
|
+
|
|
47559
|
+
@Field()
|
|
47560
|
+
@MaxLength(10)
|
|
47561
|
+
_mj__UpdatedAt: Date;
|
|
47562
|
+
|
|
47563
|
+
@Field()
|
|
47564
|
+
@MaxLength(510)
|
|
47565
|
+
Suite: string;
|
|
47566
|
+
|
|
47567
|
+
@Field()
|
|
47568
|
+
@MaxLength(200)
|
|
47569
|
+
RunByUser: string;
|
|
47570
|
+
|
|
47571
|
+
@Field(() => [MJTestRun_])
|
|
47572
|
+
MJ_TestRuns_TestSuiteRunIDArray: MJTestRun_[]; // Link to MJ_TestRuns
|
|
47573
|
+
|
|
47574
|
+
}
|
|
47575
|
+
|
|
47576
|
+
//****************************************************************************
|
|
47577
|
+
// INPUT TYPE for MJ: Test Suite Runs
|
|
47578
|
+
//****************************************************************************
|
|
47579
|
+
@InputType()
|
|
47580
|
+
export class CreateMJTestSuiteRunInput {
|
|
47581
|
+
@Field({ nullable: true })
|
|
47582
|
+
ID?: string;
|
|
47583
|
+
|
|
47584
|
+
@Field({ nullable: true })
|
|
47585
|
+
SuiteID?: string;
|
|
47586
|
+
|
|
47587
|
+
@Field({ nullable: true })
|
|
47588
|
+
RunByUserID?: string;
|
|
47589
|
+
|
|
47590
|
+
@Field({ nullable: true })
|
|
47591
|
+
Environment: string | null;
|
|
47592
|
+
|
|
47593
|
+
@Field({ nullable: true })
|
|
47594
|
+
TriggerType: string | null;
|
|
47595
|
+
|
|
47596
|
+
@Field({ nullable: true })
|
|
47597
|
+
GitCommit: string | null;
|
|
47598
|
+
|
|
47599
|
+
@Field({ nullable: true })
|
|
47600
|
+
AgentVersion: string | null;
|
|
47601
|
+
|
|
47602
|
+
@Field({ nullable: true })
|
|
47603
|
+
Status?: string;
|
|
47604
|
+
|
|
47605
|
+
@Field({ nullable: true })
|
|
47606
|
+
StartedAt: Date | null;
|
|
47607
|
+
|
|
47608
|
+
@Field({ nullable: true })
|
|
47609
|
+
CompletedAt: Date | null;
|
|
47610
|
+
|
|
47611
|
+
@Field(() => Int, { nullable: true })
|
|
47612
|
+
TotalTests: number | null;
|
|
47613
|
+
|
|
47614
|
+
@Field(() => Int, { nullable: true })
|
|
47615
|
+
PassedTests: number | null;
|
|
47616
|
+
|
|
47617
|
+
@Field(() => Int, { nullable: true })
|
|
47618
|
+
FailedTests: number | null;
|
|
47619
|
+
|
|
47620
|
+
@Field(() => Int, { nullable: true })
|
|
47621
|
+
SkippedTests: number | null;
|
|
47622
|
+
|
|
47623
|
+
@Field(() => Int, { nullable: true })
|
|
47624
|
+
ErrorTests: number | null;
|
|
47625
|
+
|
|
47626
|
+
@Field(() => Float, { nullable: true })
|
|
47627
|
+
TotalDurationSeconds: number | null;
|
|
47628
|
+
|
|
47629
|
+
@Field(() => Float, { nullable: true })
|
|
47630
|
+
TotalCostUSD: number | null;
|
|
47631
|
+
|
|
47632
|
+
@Field({ nullable: true })
|
|
47633
|
+
Configuration: string | null;
|
|
47634
|
+
|
|
47635
|
+
@Field({ nullable: true })
|
|
47636
|
+
ResultSummary: string | null;
|
|
47637
|
+
|
|
47638
|
+
@Field({ nullable: true })
|
|
47639
|
+
ErrorMessage: string | null;
|
|
47640
|
+
}
|
|
47641
|
+
|
|
47642
|
+
|
|
47643
|
+
//****************************************************************************
|
|
47644
|
+
// INPUT TYPE for MJ: Test Suite Runs
|
|
47645
|
+
//****************************************************************************
|
|
47646
|
+
@InputType()
|
|
47647
|
+
export class UpdateMJTestSuiteRunInput {
|
|
47648
|
+
@Field()
|
|
47649
|
+
ID: string;
|
|
47650
|
+
|
|
47651
|
+
@Field({ nullable: true })
|
|
47652
|
+
SuiteID?: string;
|
|
47653
|
+
|
|
47654
|
+
@Field({ nullable: true })
|
|
47655
|
+
RunByUserID?: string;
|
|
47656
|
+
|
|
47657
|
+
@Field({ nullable: true })
|
|
47658
|
+
Environment?: string | null;
|
|
47659
|
+
|
|
47660
|
+
@Field({ nullable: true })
|
|
47661
|
+
TriggerType?: string | null;
|
|
47662
|
+
|
|
47663
|
+
@Field({ nullable: true })
|
|
47664
|
+
GitCommit?: string | null;
|
|
47665
|
+
|
|
47666
|
+
@Field({ nullable: true })
|
|
47667
|
+
AgentVersion?: string | null;
|
|
47668
|
+
|
|
47669
|
+
@Field({ nullable: true })
|
|
47670
|
+
Status?: string;
|
|
47671
|
+
|
|
47672
|
+
@Field({ nullable: true })
|
|
47673
|
+
StartedAt?: Date | null;
|
|
47674
|
+
|
|
47675
|
+
@Field({ nullable: true })
|
|
47676
|
+
CompletedAt?: Date | null;
|
|
47677
|
+
|
|
47678
|
+
@Field(() => Int, { nullable: true })
|
|
47679
|
+
TotalTests?: number | null;
|
|
47680
|
+
|
|
47681
|
+
@Field(() => Int, { nullable: true })
|
|
47682
|
+
PassedTests?: number | null;
|
|
47683
|
+
|
|
47684
|
+
@Field(() => Int, { nullable: true })
|
|
47685
|
+
FailedTests?: number | null;
|
|
47686
|
+
|
|
47687
|
+
@Field(() => Int, { nullable: true })
|
|
47688
|
+
SkippedTests?: number | null;
|
|
47689
|
+
|
|
47690
|
+
@Field(() => Int, { nullable: true })
|
|
47691
|
+
ErrorTests?: number | null;
|
|
47692
|
+
|
|
47693
|
+
@Field(() => Float, { nullable: true })
|
|
47694
|
+
TotalDurationSeconds?: number | null;
|
|
47695
|
+
|
|
47696
|
+
@Field(() => Float, { nullable: true })
|
|
47697
|
+
TotalCostUSD?: number | null;
|
|
47698
|
+
|
|
47699
|
+
@Field({ nullable: true })
|
|
47700
|
+
Configuration?: string | null;
|
|
47701
|
+
|
|
47702
|
+
@Field({ nullable: true })
|
|
47703
|
+
ResultSummary?: string | null;
|
|
47704
|
+
|
|
47705
|
+
@Field({ nullable: true })
|
|
47706
|
+
ErrorMessage?: string | null;
|
|
47707
|
+
|
|
47708
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
47709
|
+
OldValues___?: KeyValuePairInput[];
|
|
47710
|
+
}
|
|
47711
|
+
|
|
47712
|
+
//****************************************************************************
|
|
47713
|
+
// RESOLVER for MJ: Test Suite Runs
|
|
47714
|
+
//****************************************************************************
|
|
47715
|
+
@ObjectType()
|
|
47716
|
+
export class RunMJTestSuiteRunViewResult {
|
|
47717
|
+
@Field(() => [MJTestSuiteRun_])
|
|
47718
|
+
Results: MJTestSuiteRun_[];
|
|
47719
|
+
|
|
47720
|
+
@Field(() => String, {nullable: true})
|
|
47721
|
+
UserViewRunID?: string;
|
|
47722
|
+
|
|
47723
|
+
@Field(() => Int, {nullable: true})
|
|
47724
|
+
RowCount: number;
|
|
47725
|
+
|
|
47726
|
+
@Field(() => Int, {nullable: true})
|
|
47727
|
+
TotalRowCount: number;
|
|
47728
|
+
|
|
47729
|
+
@Field(() => Int, {nullable: true})
|
|
47730
|
+
ExecutionTime: number;
|
|
47731
|
+
|
|
47732
|
+
@Field({nullable: true})
|
|
47733
|
+
ErrorMessage?: string;
|
|
47734
|
+
|
|
47735
|
+
@Field(() => Boolean, {nullable: false})
|
|
47736
|
+
Success: boolean;
|
|
47737
|
+
}
|
|
47738
|
+
|
|
47739
|
+
@Resolver(MJTestSuiteRun_)
|
|
47740
|
+
export class MJTestSuiteRunResolver extends ResolverBase {
|
|
47741
|
+
@Query(() => RunMJTestSuiteRunViewResult)
|
|
47742
|
+
async RunMJTestSuiteRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
47743
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
47744
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
47745
|
+
}
|
|
47746
|
+
|
|
47747
|
+
@Query(() => RunMJTestSuiteRunViewResult)
|
|
47748
|
+
async RunMJTestSuiteRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
47749
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
47750
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
47751
|
+
}
|
|
47752
|
+
|
|
47753
|
+
@Query(() => RunMJTestSuiteRunViewResult)
|
|
47754
|
+
async RunMJTestSuiteRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
47755
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
47756
|
+
input.EntityName = 'MJ: Test Suite Runs';
|
|
47757
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
47758
|
+
}
|
|
47759
|
+
@Query(() => MJTestSuiteRun_, { nullable: true })
|
|
47760
|
+
async MJTestSuiteRun(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJTestSuiteRun_ | null> {
|
|
47761
|
+
this.CheckUserReadPermissions('MJ: Test Suite Runs', userPayload);
|
|
47762
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
47763
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
47764
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestSuiteRuns] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suite Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
47765
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
47766
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Test Suite Runs', rows && rows.length > 0 ? rows[0] : {})
|
|
47767
|
+
return result;
|
|
47768
|
+
}
|
|
47769
|
+
|
|
47770
|
+
@FieldResolver(() => [MJTestRun_])
|
|
47771
|
+
async MJ_TestRuns_TestSuiteRunIDArray(@Root() mjtestsuiterun_: MJTestSuiteRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
47772
|
+
this.CheckUserReadPermissions('MJ: Test Runs', userPayload);
|
|
47773
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
47774
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
47775
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRuns] WHERE [TestSuiteRunID]='${mjtestsuiterun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
47776
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
47777
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Test Runs', rows);
|
|
47778
|
+
return result;
|
|
47779
|
+
}
|
|
47780
|
+
|
|
47781
|
+
@Mutation(() => MJTestSuiteRun_)
|
|
47782
|
+
async CreateMJTestSuiteRun(
|
|
47783
|
+
@Arg('input', () => CreateMJTestSuiteRunInput) input: CreateMJTestSuiteRunInput,
|
|
47784
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
47785
|
+
@PubSub() pubSub: PubSubEngine
|
|
47786
|
+
) {
|
|
47787
|
+
const provider = GetReadWriteProvider(providers);
|
|
47788
|
+
return this.CreateRecord('MJ: Test Suite Runs', input, provider, userPayload, pubSub)
|
|
47789
|
+
}
|
|
47790
|
+
|
|
47791
|
+
@Mutation(() => MJTestSuiteRun_)
|
|
47792
|
+
async UpdateMJTestSuiteRun(
|
|
47793
|
+
@Arg('input', () => UpdateMJTestSuiteRunInput) input: UpdateMJTestSuiteRunInput,
|
|
47794
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
47795
|
+
@PubSub() pubSub: PubSubEngine
|
|
47796
|
+
) {
|
|
47797
|
+
const provider = GetReadWriteProvider(providers);
|
|
47798
|
+
return this.UpdateRecord('MJ: Test Suite Runs', input, provider, userPayload, pubSub);
|
|
47799
|
+
}
|
|
47800
|
+
|
|
47801
|
+
@Mutation(() => MJTestSuiteRun_)
|
|
47802
|
+
async DeleteMJTestSuiteRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
47803
|
+
const provider = GetReadWriteProvider(providers);
|
|
47804
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
47805
|
+
return this.DeleteRecord('MJ: Test Suite Runs', key, options, provider, userPayload, pubSub);
|
|
47806
|
+
}
|
|
47807
|
+
|
|
47808
|
+
}
|
|
47809
|
+
|
|
45330
47810
|
//****************************************************************************
|
|
45331
47811
|
// ENTITY CLASS for Content Process Runs
|
|
45332
47812
|
//****************************************************************************
|
|
@@ -48299,6 +50779,10 @@ export class MJAIPromptRun_ {
|
|
|
48299
50779
|
@Field({nullable: true, description: `Human-readable notes and comments about this prompt run`})
|
|
48300
50780
|
Comments?: string;
|
|
48301
50781
|
|
|
50782
|
+
@Field({nullable: true, description: `Optional Foreign Key - Links this prompt run to a test run if this prompt execution was part of a test. Enables testing individual prompts for quality and consistency before agent integration.`})
|
|
50783
|
+
@MaxLength(16)
|
|
50784
|
+
TestRunID?: string;
|
|
50785
|
+
|
|
48302
50786
|
@Field()
|
|
48303
50787
|
@MaxLength(510)
|
|
48304
50788
|
Prompt: string;
|
|
@@ -48319,10 +50803,22 @@ export class MJAIPromptRun_ {
|
|
|
48319
50803
|
@MaxLength(200)
|
|
48320
50804
|
Configuration?: string;
|
|
48321
50805
|
|
|
50806
|
+
@Field({nullable: true})
|
|
50807
|
+
@MaxLength(510)
|
|
50808
|
+
Parent?: string;
|
|
50809
|
+
|
|
50810
|
+
@Field({nullable: true})
|
|
50811
|
+
@MaxLength(510)
|
|
50812
|
+
AgentRun?: string;
|
|
50813
|
+
|
|
48322
50814
|
@Field({nullable: true})
|
|
48323
50815
|
@MaxLength(100)
|
|
48324
50816
|
OriginalModel?: string;
|
|
48325
50817
|
|
|
50818
|
+
@Field({nullable: true})
|
|
50819
|
+
@MaxLength(510)
|
|
50820
|
+
RerunFromPromptRun?: string;
|
|
50821
|
+
|
|
48326
50822
|
@Field({nullable: true})
|
|
48327
50823
|
@MaxLength(510)
|
|
48328
50824
|
Judge?: string;
|
|
@@ -48594,6 +51090,9 @@ export class CreateMJAIPromptRunInput {
|
|
|
48594
51090
|
|
|
48595
51091
|
@Field({ nullable: true })
|
|
48596
51092
|
Comments: string | null;
|
|
51093
|
+
|
|
51094
|
+
@Field({ nullable: true })
|
|
51095
|
+
TestRunID: string | null;
|
|
48597
51096
|
}
|
|
48598
51097
|
|
|
48599
51098
|
|
|
@@ -48845,6 +51344,9 @@ export class UpdateMJAIPromptRunInput {
|
|
|
48845
51344
|
@Field({ nullable: true })
|
|
48846
51345
|
Comments?: string | null;
|
|
48847
51346
|
|
|
51347
|
+
@Field({ nullable: true })
|
|
51348
|
+
TestRunID?: string | null;
|
|
51349
|
+
|
|
48848
51350
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
48849
51351
|
OldValues___?: KeyValuePairInput[];
|
|
48850
51352
|
}
|
|
@@ -49045,6 +51547,14 @@ detailed information about what validation rules failed.`})
|
|
|
49045
51547
|
@Field({nullable: true, description: `Human-readable notes and comments about this agent run step`})
|
|
49046
51548
|
Comments?: string;
|
|
49047
51549
|
|
|
51550
|
+
@Field({nullable: true})
|
|
51551
|
+
@MaxLength(510)
|
|
51552
|
+
AgentRun?: string;
|
|
51553
|
+
|
|
51554
|
+
@Field({nullable: true})
|
|
51555
|
+
@MaxLength(510)
|
|
51556
|
+
Parent?: string;
|
|
51557
|
+
|
|
49048
51558
|
@Field({nullable: true})
|
|
49049
51559
|
@MaxLength(16)
|
|
49050
51560
|
RootParentID?: string;
|
|
@@ -49317,6 +51827,9 @@ export class MJConversationDetailArtifact_ {
|
|
|
49317
51827
|
@MaxLength(10)
|
|
49318
51828
|
_mj__UpdatedAt: Date;
|
|
49319
51829
|
|
|
51830
|
+
@Field()
|
|
51831
|
+
ConversationDetail: string;
|
|
51832
|
+
|
|
49320
51833
|
@Field({nullable: true})
|
|
49321
51834
|
@MaxLength(510)
|
|
49322
51835
|
ArtifactVersion?: string;
|
|
@@ -49537,6 +52050,9 @@ export class MJTask_ {
|
|
|
49537
52050
|
@MaxLength(510)
|
|
49538
52051
|
Project?: string;
|
|
49539
52052
|
|
|
52053
|
+
@Field({nullable: true})
|
|
52054
|
+
ConversationDetail?: string;
|
|
52055
|
+
|
|
49540
52056
|
@Field({nullable: true})
|
|
49541
52057
|
@MaxLength(200)
|
|
49542
52058
|
User?: string;
|