@memberjunction/server 2.129.0 → 2.130.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/generated/generated.d.ts +462 -8
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +3184 -352
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts +3 -0
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +114 -2
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/RunTestResolver.d.ts +2 -2
- package/dist/resolvers/RunTestResolver.d.ts.map +1 -1
- package/dist/resolvers/RunTestResolver.js +27 -8
- package/dist/resolvers/RunTestResolver.js.map +1 -1
- package/package.json +43 -43
- package/src/generated/generated.ts +1840 -55
- package/src/resolvers/RunAIAgentResolver.ts +192 -4
- package/src/resolvers/RunTestResolver.ts +20 -0
|
@@ -19,7 +19,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
import { ActionAuthorizationEntity, ActionCategoryEntity, ActionContextTypeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionFilterEntity, ActionLibraryEntity, ActionParamEntity, ActionResultCodeEntity, ActionEntity, AIActionEntity, AIAgentActionEntity, AIAgentLearningCycleEntity, AIAgentModelEntity, AIAgentNoteTypeEntity, AIAgentNoteEntity, AIAgentRequestEntity, AIAgentEntity, AIModelActionEntity, AIModelTypeEntity, AIModelEntity, AIPromptCategoryEntity, AIPromptTypeEntity, AIPromptEntity, AIResultCacheEntity, ApplicationEntityEntity, ApplicationSettingEntity, ApplicationEntity, AuditLogTypeEntity, AuditLogEntity, AuthorizationRoleEntity, AuthorizationEntity, CommunicationBaseMessageTypeEntity, CommunicationLogEntity, CommunicationProviderMessageTypeEntity, CommunicationProviderEntity, CommunicationRunEntity, CompanyEntity, CompanyIntegrationRecordMapEntity, CompanyIntegrationRunAPILogEntity, CompanyIntegrationRunDetailEntity, CompanyIntegrationRunEntity, CompanyIntegrationEntity, ContentFileTypeEntity, ContentItemAttributeEntity, ContentItemTagEntity, ContentItemEntity, ContentProcessRunEntity, ContentSourceParamEntity, ContentSourceTypeParamEntity, ContentSourceTypeEntity, ContentSourceEntity, ContentTypeAttributeEntity, ContentTypeEntity, ConversationDetailEntity, ConversationEntity, DashboardCategoryEntity, DashboardEntity, DataContextItemEntity, DataContextEntity, DatasetItemEntity, DatasetEntity, DuplicateRunDetailMatchEntity, DuplicateRunDetailEntity, DuplicateRunEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, EmployeeEntity, EntityEntity, EntityActionFilterEntity, EntityActionInvocationTypeEntity, EntityActionInvocationEntity, EntityActionParamEntity, EntityActionEntity, EntityAIActionEntity, EntityCommunicationFieldEntity, EntityCommunicationMessageTypeEntity, EntityDocumentRunEntity, EntityDocumentSettingEntity, EntityDocumentTypeEntity, EntityDocumentEntity, EntityFieldValueEntity, EntityFieldEntity, EntityPermissionEntity, EntityRecordDocumentEntity, EntityRelationshipDisplayComponentEntity, EntityRelationshipEntity, EntitySettingEntity, ErrorLogEntity, ExplorerNavigationItemEntity, FileCategoryEntity, FileEntityRecordLinkEntity, FileStorageProviderEntity, FileEntity, GeneratedCodeCategoryEntity, GeneratedCodeEntity, IntegrationURLFormatEntity, IntegrationEntity, LibraryEntity, LibraryItemEntity, ListCategoryEntity, ListDetailEntity, ListEntity, AccessControlRuleEntity, AIAgentArtifactTypeEntity, AIAgentConfigurationEntity, AIAgentDataSourceEntity, AIAgentExampleEntity, AIAgentPermissionEntity, AIAgentPromptEntity, AIAgentRelationshipEntity, AIAgentRunStepEntity, AIAgentRunEntity, AIAgentStepPathEntity, AIAgentStepEntity, AIAgentTypeEntity, AIConfigurationParamEntity, AIConfigurationEntity, AICredentialBindingEntity, AIModelCostEntity, AIModelPriceTypeEntity, AIModelPriceUnitTypeEntity, AIModelVendorEntity, AIPromptModelEntity, AIPromptRunEntity, AIVendorTypeDefinitionEntity, AIVendorTypeEntity, AIVendorEntity, ArtifactPermissionEntity, ArtifactTypeEntity, ArtifactUseEntity, ArtifactVersionAttributeEntity, ArtifactVersionEntity, ArtifactEntity, CollectionArtifactEntity, CollectionPermissionEntity, CollectionEntity, ComponentDependencyEntity, ComponentLibraryEntity, ComponentLibraryLinkEntity, ComponentRegistryEntity, ComponentEntity, ConversationArtifactPermissionEntity, ConversationArtifactVersionEntity, ConversationArtifactEntity, ConversationDetailArtifactEntity, ConversationDetailRatingEntity, CredentialCategoryEntity, CredentialTypeEntity, CredentialEntity, DashboardUserPreferenceEntity, DashboardUserStateEntity, EncryptionAlgorithmEntity, EncryptionKeySourceEntity, EncryptionKeyEntity, EnvironmentEntity, ProjectEntity, PublicLinkEntity, QueryParameterEntity, RecordLinkEntity, ReportUserStateEntity, ReportVersionEntity, ScheduledJobRunEntity, ScheduledJobTypeEntity, ScheduledJobEntity, TaskDependencyEntity, TaskTypeEntity, TaskEntity, TestRubricEntity, TestRunFeedbackEntity, TestRunEntity, TestSuiteRunEntity, TestSuiteTestEntity, TestSuiteEntity, TestTypeEntity, TestEntity, UserSettingEntity, OutputDeliveryTypeEntity, OutputFormatTypeEntity, OutputTriggerTypeEntity, QueryEntity, QueryCategoryEntity, QueryEntityEntity, QueryFieldEntity, QueryPermissionEntity, QueueTaskEntity, QueueTypeEntity, QueueEntity, RecommendationItemEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationEntity, RecordChangeReplayRunEntity, RecordChangeEntity, RecordMergeDeletionLogEntity, RecordMergeLogEntity, ReportCategoryEntity, ReportSnapshotEntity, ReportEntity, ResourceLinkEntity, ResourcePermissionEntity, ResourceTypeEntity, RoleEntity, RowLevelSecurityFilterEntity, ScheduledActionParamEntity, ScheduledActionEntity, SchemaInfoEntity, SkillEntity, TaggedItemEntity, TagEntity, TemplateCategoryEntity, TemplateContentTypeEntity, TemplateContentEntity, TemplateParamEntity, TemplateEntity, UserApplicationEntityEntity, UserApplicationEntity, UserFavoriteEntity, UserNotificationEntity, UserRecordLogEntity, UserRoleEntity, UserViewCategoryEntity, UserViewRunDetailEntity, UserViewRunEntity, UserViewEntity, UserEntity, VectorDatabaseEntity, VectorIndexEntity, VersionInstallationEntity, WorkflowEngineEntity, WorkflowRunEntity, WorkflowEntity, WorkspaceItemEntity, WorkspaceEntity } from '@memberjunction/core-entities';
|
|
22
|
+
import { ActionAuthorizationEntity, ActionCategoryEntity, ActionContextTypeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionFilterEntity, ActionLibraryEntity, ActionParamEntity, ActionResultCodeEntity, ActionEntity, AIActionEntity, AIAgentActionEntity, AIAgentLearningCycleEntity, AIAgentModelEntity, AIAgentNoteTypeEntity, AIAgentNoteEntity, AIAgentRequestEntity, AIAgentEntity, AIModelActionEntity, AIModelTypeEntity, AIModelEntity, AIPromptCategoryEntity, AIPromptTypeEntity, AIPromptEntity, AIResultCacheEntity, ApplicationEntityEntity, ApplicationSettingEntity, ApplicationEntity, AuditLogTypeEntity, AuditLogEntity, AuthorizationRoleEntity, AuthorizationEntity, CommunicationBaseMessageTypeEntity, CommunicationLogEntity, CommunicationProviderMessageTypeEntity, CommunicationProviderEntity, CommunicationRunEntity, CompanyEntity, CompanyIntegrationRecordMapEntity, CompanyIntegrationRunAPILogEntity, CompanyIntegrationRunDetailEntity, CompanyIntegrationRunEntity, CompanyIntegrationEntity, ContentFileTypeEntity, ContentItemAttributeEntity, ContentItemTagEntity, ContentItemEntity, ContentProcessRunEntity, ContentSourceParamEntity, ContentSourceTypeParamEntity, ContentSourceTypeEntity, ContentSourceEntity, ContentTypeAttributeEntity, ContentTypeEntity, ConversationDetailEntity, ConversationEntity, DashboardCategoryEntity, DashboardEntity, DataContextItemEntity, DataContextEntity, DatasetItemEntity, DatasetEntity, DuplicateRunDetailMatchEntity, DuplicateRunDetailEntity, DuplicateRunEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, EmployeeEntity, EntityEntity, EntityActionFilterEntity, EntityActionInvocationTypeEntity, EntityActionInvocationEntity, EntityActionParamEntity, EntityActionEntity, EntityAIActionEntity, EntityCommunicationFieldEntity, EntityCommunicationMessageTypeEntity, EntityDocumentRunEntity, EntityDocumentSettingEntity, EntityDocumentTypeEntity, EntityDocumentEntity, EntityFieldValueEntity, EntityFieldEntity, EntityPermissionEntity, EntityRecordDocumentEntity, EntityRelationshipDisplayComponentEntity, EntityRelationshipEntity, EntitySettingEntity, ErrorLogEntity, ExplorerNavigationItemEntity, FileCategoryEntity, FileEntityRecordLinkEntity, FileStorageProviderEntity, FileEntity, GeneratedCodeCategoryEntity, GeneratedCodeEntity, IntegrationURLFormatEntity, IntegrationEntity, LibraryEntity, LibraryItemEntity, ListCategoryEntity, ListDetailEntity, ListEntity, AccessControlRuleEntity, AIAgentArtifactTypeEntity, AIAgentConfigurationEntity, AIAgentDataSourceEntity, AIAgentExampleEntity, AIAgentModalityEntity, AIAgentPermissionEntity, AIAgentPromptEntity, AIAgentRelationshipEntity, AIAgentRunStepEntity, AIAgentRunEntity, AIAgentStepPathEntity, AIAgentStepEntity, AIAgentTypeEntity, AIArchitectureEntity, AIConfigurationParamEntity, AIConfigurationEntity, AICredentialBindingEntity, AIModalityEntity, AIModelArchitectureEntity, AIModelCostEntity, AIModelModalityEntity, AIModelPriceTypeEntity, AIModelPriceUnitTypeEntity, AIModelVendorEntity, AIPromptModelEntity, AIPromptRunEntity, AIVendorTypeDefinitionEntity, AIVendorTypeEntity, AIVendorEntity, ArtifactPermissionEntity, ArtifactTypeEntity, ArtifactUseEntity, ArtifactVersionAttributeEntity, ArtifactVersionEntity, ArtifactEntity, CollectionArtifactEntity, CollectionPermissionEntity, CollectionEntity, ComponentDependencyEntity, ComponentLibraryEntity, ComponentLibraryLinkEntity, ComponentRegistryEntity, ComponentEntity, ConversationArtifactPermissionEntity, ConversationArtifactVersionEntity, ConversationArtifactEntity, ConversationDetailArtifactEntity, ConversationDetailAttachmentEntity, ConversationDetailRatingEntity, CredentialCategoryEntity, CredentialTypeEntity, CredentialEntity, DashboardUserPreferenceEntity, DashboardUserStateEntity, EncryptionAlgorithmEntity, EncryptionKeySourceEntity, EncryptionKeyEntity, EnvironmentEntity, ProjectEntity, PublicLinkEntity, QueryParameterEntity, RecordLinkEntity, ReportUserStateEntity, ReportVersionEntity, ScheduledJobRunEntity, ScheduledJobTypeEntity, ScheduledJobEntity, TaskDependencyEntity, TaskTypeEntity, TaskEntity, TestRubricEntity, TestRunFeedbackEntity, TestRunEntity, TestSuiteRunEntity, TestSuiteTestEntity, TestSuiteEntity, TestTypeEntity, TestEntity, UserSettingEntity, OutputDeliveryTypeEntity, OutputFormatTypeEntity, OutputTriggerTypeEntity, QueryEntity, QueryCategoryEntity, QueryEntityEntity, QueryFieldEntity, QueryPermissionEntity, QueueTaskEntity, QueueTypeEntity, QueueEntity, RecommendationItemEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationEntity, RecordChangeReplayRunEntity, RecordChangeEntity, RecordMergeDeletionLogEntity, RecordMergeLogEntity, ReportCategoryEntity, ReportSnapshotEntity, ReportEntity, ResourceLinkEntity, ResourcePermissionEntity, ResourceTypeEntity, RoleEntity, RowLevelSecurityFilterEntity, ScheduledActionParamEntity, ScheduledActionEntity, SchemaInfoEntity, SkillEntity, TaggedItemEntity, TagEntity, TemplateCategoryEntity, TemplateContentTypeEntity, TemplateContentEntity, TemplateParamEntity, TemplateEntity, UserApplicationEntityEntity, UserApplicationEntity, UserFavoriteEntity, UserNotificationEntity, UserRecordLogEntity, UserRoleEntity, UserViewCategoryEntity, UserViewRunDetailEntity, UserViewRunEntity, UserViewEntity, UserEntity, VectorDatabaseEntity, VectorIndexEntity, VersionInstallationEntity, WorkflowEngineEntity, WorkflowRunEntity, WorkflowEntity, WorkspaceItemEntity, WorkspaceEntity } from '@memberjunction/core-entities';
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
//****************************************************************************
|
|
@@ -3867,6 +3867,17 @@ if this limit is exceeded.`})
|
|
|
3867
3867
|
@Field(() => Int, {nullable: true, description: `Maximum number of conversation messages to include when MessageMode is 'Latest' or 'Bookend'. NULL means no limit (ignored for 'None' and 'All' modes). Must be greater than 0 if specified. For 'Latest': keeps most recent N messages. For 'Bookend': keeps first 2 + most recent (N-2) messages.`})
|
|
3868
3868
|
MaxMessages?: number;
|
|
3869
3869
|
|
|
3870
|
+
@Field({nullable: true, description: `File storage provider for large attachments. Overrides the default from AIConfiguration. NULL uses system default.`})
|
|
3871
|
+
@MaxLength(16)
|
|
3872
|
+
AttachmentStorageProviderID?: string;
|
|
3873
|
+
|
|
3874
|
+
@Field({nullable: true, description: `Base path within the storage provider for this agent's attachments. Agent run ID and sequence number are appended to create unique paths. Format: /folder/subfolder`})
|
|
3875
|
+
@MaxLength(1000)
|
|
3876
|
+
AttachmentRootPath?: string;
|
|
3877
|
+
|
|
3878
|
+
@Field(() => Int, {nullable: true, description: `File size threshold for inline storage. Files <= this size are stored as base64 inline, larger files use MJStorage. NULL uses system default (1MB). Set to 0 to always use MJStorage.`})
|
|
3879
|
+
InlineStorageThresholdBytes?: number;
|
|
3880
|
+
|
|
3870
3881
|
@Field({nullable: true})
|
|
3871
3882
|
@MaxLength(510)
|
|
3872
3883
|
Parent?: string;
|
|
@@ -3887,6 +3898,10 @@ if this limit is exceeded.`})
|
|
|
3887
3898
|
@MaxLength(200)
|
|
3888
3899
|
OwnerUser: string;
|
|
3889
3900
|
|
|
3901
|
+
@Field({nullable: true})
|
|
3902
|
+
@MaxLength(100)
|
|
3903
|
+
AttachmentStorageProvider?: string;
|
|
3904
|
+
|
|
3890
3905
|
@Field({nullable: true})
|
|
3891
3906
|
@MaxLength(16)
|
|
3892
3907
|
RootParentID?: string;
|
|
@@ -3918,6 +3933,9 @@ if this limit is exceeded.`})
|
|
|
3918
3933
|
@Field(() => [MJAIAgentDataSource_])
|
|
3919
3934
|
MJ_AIAgentDataSources_AgentIDArray: MJAIAgentDataSource_[]; // Link to MJ_AIAgentDataSources
|
|
3920
3935
|
|
|
3936
|
+
@Field(() => [MJAIAgentModality_])
|
|
3937
|
+
MJ_AIAgentModalities_AgentIDArray: MJAIAgentModality_[]; // Link to MJ_AIAgentModalities
|
|
3938
|
+
|
|
3921
3939
|
@Field(() => [MJAIAgentNote_])
|
|
3922
3940
|
AIAgentNotes_AgentIDArray: MJAIAgentNote_[]; // Link to AIAgentNotes
|
|
3923
3941
|
|
|
@@ -4110,6 +4128,15 @@ export class CreateMJAIAgentInput {
|
|
|
4110
4128
|
|
|
4111
4129
|
@Field(() => Int, { nullable: true })
|
|
4112
4130
|
MaxMessages: number | null;
|
|
4131
|
+
|
|
4132
|
+
@Field({ nullable: true })
|
|
4133
|
+
AttachmentStorageProviderID: string | null;
|
|
4134
|
+
|
|
4135
|
+
@Field({ nullable: true })
|
|
4136
|
+
AttachmentRootPath: string | null;
|
|
4137
|
+
|
|
4138
|
+
@Field(() => Int, { nullable: true })
|
|
4139
|
+
InlineStorageThresholdBytes: number | null;
|
|
4113
4140
|
}
|
|
4114
4141
|
|
|
4115
4142
|
|
|
@@ -4268,6 +4295,15 @@ export class UpdateMJAIAgentInput {
|
|
|
4268
4295
|
@Field(() => Int, { nullable: true })
|
|
4269
4296
|
MaxMessages?: number | null;
|
|
4270
4297
|
|
|
4298
|
+
@Field({ nullable: true })
|
|
4299
|
+
AttachmentStorageProviderID?: string | null;
|
|
4300
|
+
|
|
4301
|
+
@Field({ nullable: true })
|
|
4302
|
+
AttachmentRootPath?: string | null;
|
|
4303
|
+
|
|
4304
|
+
@Field(() => Int, { nullable: true })
|
|
4305
|
+
InlineStorageThresholdBytes?: number | null;
|
|
4306
|
+
|
|
4271
4307
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
4272
4308
|
OldValues___?: KeyValuePairInput[];
|
|
4273
4309
|
}
|
|
@@ -4429,6 +4465,17 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
4429
4465
|
return result;
|
|
4430
4466
|
}
|
|
4431
4467
|
|
|
4468
|
+
@FieldResolver(() => [MJAIAgentModality_])
|
|
4469
|
+
async MJ_AIAgentModalities_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4470
|
+
this.CheckUserReadPermissions('MJ: AI Agent Modalities', userPayload);
|
|
4471
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4472
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
4473
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModalities] WHERE [AgentID]='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Modalities', userPayload, EntityPermissionType.Read, 'AND');
|
|
4474
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
4475
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Modalities', rows, this.GetUserFromPayload(userPayload));
|
|
4476
|
+
return result;
|
|
4477
|
+
}
|
|
4478
|
+
|
|
4432
4479
|
@FieldResolver(() => [MJAIAgentNote_])
|
|
4433
4480
|
async AIAgentNotes_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4434
4481
|
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
@@ -4790,6 +4837,22 @@ export class MJAIModelType_ {
|
|
|
4790
4837
|
@MaxLength(10)
|
|
4791
4838
|
_mj__UpdatedAt: Date;
|
|
4792
4839
|
|
|
4840
|
+
@Field({description: `Default input modality for this model type. Models of this type inherit this as their primary input modality unless overridden.`})
|
|
4841
|
+
@MaxLength(16)
|
|
4842
|
+
DefaultInputModalityID: string;
|
|
4843
|
+
|
|
4844
|
+
@Field({description: `Default output modality for this model type. Models of this type inherit this as their primary output modality unless overridden.`})
|
|
4845
|
+
@MaxLength(16)
|
|
4846
|
+
DefaultOutputModalityID: string;
|
|
4847
|
+
|
|
4848
|
+
@Field()
|
|
4849
|
+
@MaxLength(100)
|
|
4850
|
+
DefaultInputModality: string;
|
|
4851
|
+
|
|
4852
|
+
@Field()
|
|
4853
|
+
@MaxLength(100)
|
|
4854
|
+
DefaultOutputModality: string;
|
|
4855
|
+
|
|
4793
4856
|
@Field(() => [MJAIModel_])
|
|
4794
4857
|
AIModels_AIModelTypeIDArray: MJAIModel_[]; // Link to AIModels
|
|
4795
4858
|
|
|
@@ -4811,6 +4874,12 @@ export class CreateMJAIModelTypeInput {
|
|
|
4811
4874
|
|
|
4812
4875
|
@Field({ nullable: true })
|
|
4813
4876
|
Description: string | null;
|
|
4877
|
+
|
|
4878
|
+
@Field({ nullable: true })
|
|
4879
|
+
DefaultInputModalityID?: string;
|
|
4880
|
+
|
|
4881
|
+
@Field({ nullable: true })
|
|
4882
|
+
DefaultOutputModalityID?: string;
|
|
4814
4883
|
}
|
|
4815
4884
|
|
|
4816
4885
|
|
|
@@ -4828,6 +4897,12 @@ export class UpdateMJAIModelTypeInput {
|
|
|
4828
4897
|
@Field({ nullable: true })
|
|
4829
4898
|
Description?: string | null;
|
|
4830
4899
|
|
|
4900
|
+
@Field({ nullable: true })
|
|
4901
|
+
DefaultInputModalityID?: string;
|
|
4902
|
+
|
|
4903
|
+
@Field({ nullable: true })
|
|
4904
|
+
DefaultOutputModalityID?: string;
|
|
4905
|
+
|
|
4831
4906
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
4832
4907
|
OldValues___?: KeyValuePairInput[];
|
|
4833
4908
|
}
|
|
@@ -4995,6 +5070,13 @@ export class MJAIModel_ {
|
|
|
4995
5070
|
@Field({nullable: true, description: `This column stores unstructured text notes that provide insights into what the model is particularly good at and areas where it may not perform as well. These notes can be used by a human or an AI to determine if the model is a good fit for various purposes.`})
|
|
4996
5071
|
ModelSelectionInsights?: string;
|
|
4997
5072
|
|
|
5073
|
+
@Field(() => Boolean, {description: `When TRUE (default), the model inherits default input/output modalities from its AIModelType AND can extend with additional modalities via AIModelModality records. When FALSE, only modalities explicitly defined in AIModelModality are used.`})
|
|
5074
|
+
InheritTypeModalities: boolean;
|
|
5075
|
+
|
|
5076
|
+
@Field({nullable: true, description: `Reference to the previous version of this model, creating a version lineage chain. For example, GPT-4 Turbo might reference GPT-4 as its prior version.`})
|
|
5077
|
+
@MaxLength(16)
|
|
5078
|
+
PriorVersionID?: string;
|
|
5079
|
+
|
|
4998
5080
|
@Field()
|
|
4999
5081
|
@MaxLength(100)
|
|
5000
5082
|
AIModelType: string;
|
|
@@ -5052,6 +5134,12 @@ export class MJAIModel_ {
|
|
|
5052
5134
|
@Field(() => [MJAIAgentExample_])
|
|
5053
5135
|
MJ_AIAgentExamples_EmbeddingModelIDArray: MJAIAgentExample_[]; // Link to MJ_AIAgentExamples
|
|
5054
5136
|
|
|
5137
|
+
@Field(() => [MJAIModelModality_])
|
|
5138
|
+
MJ_AIModelModalities_ModelIDArray: MJAIModelModality_[]; // Link to MJ_AIModelModalities
|
|
5139
|
+
|
|
5140
|
+
@Field(() => [MJAIModelArchitecture_])
|
|
5141
|
+
MJ_AIModelArchitectures_ModelIDArray: MJAIModelArchitecture_[]; // Link to MJ_AIModelArchitectures
|
|
5142
|
+
|
|
5055
5143
|
@Field(() => [MJAIAgentModel_])
|
|
5056
5144
|
AIAgentModels_ModelIDArray: MJAIAgentModel_[]; // Link to AIAgentModels
|
|
5057
5145
|
|
|
@@ -5076,6 +5164,9 @@ export class MJAIModel_ {
|
|
|
5076
5164
|
@Field(() => [MJQuery_])
|
|
5077
5165
|
Queries_EmbeddingModelIDArray: MJQuery_[]; // Link to Queries
|
|
5078
5166
|
|
|
5167
|
+
@Field(() => [MJAIModel_])
|
|
5168
|
+
AIModels_PriorVersionIDArray: MJAIModel_[]; // Link to AIModels
|
|
5169
|
+
|
|
5079
5170
|
}
|
|
5080
5171
|
|
|
5081
5172
|
//****************************************************************************
|
|
@@ -5109,6 +5200,12 @@ export class CreateMJAIModelInput {
|
|
|
5109
5200
|
|
|
5110
5201
|
@Field({ nullable: true })
|
|
5111
5202
|
ModelSelectionInsights: string | null;
|
|
5203
|
+
|
|
5204
|
+
@Field(() => Boolean, { nullable: true })
|
|
5205
|
+
InheritTypeModalities?: boolean;
|
|
5206
|
+
|
|
5207
|
+
@Field({ nullable: true })
|
|
5208
|
+
PriorVersionID: string | null;
|
|
5112
5209
|
}
|
|
5113
5210
|
|
|
5114
5211
|
|
|
@@ -5144,6 +5241,12 @@ export class UpdateMJAIModelInput {
|
|
|
5144
5241
|
@Field({ nullable: true })
|
|
5145
5242
|
ModelSelectionInsights?: string | null;
|
|
5146
5243
|
|
|
5244
|
+
@Field(() => Boolean, { nullable: true })
|
|
5245
|
+
InheritTypeModalities?: boolean;
|
|
5246
|
+
|
|
5247
|
+
@Field({ nullable: true })
|
|
5248
|
+
PriorVersionID?: string | null;
|
|
5249
|
+
|
|
5147
5250
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
5148
5251
|
OldValues___?: KeyValuePairInput[];
|
|
5149
5252
|
}
|
|
@@ -5316,6 +5419,28 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
5316
5419
|
return result;
|
|
5317
5420
|
}
|
|
5318
5421
|
|
|
5422
|
+
@FieldResolver(() => [MJAIModelModality_])
|
|
5423
|
+
async MJ_AIModelModalities_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5424
|
+
this.CheckUserReadPermissions('MJ: AI Model Modalities', userPayload);
|
|
5425
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5426
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5427
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelModalities] WHERE [ModelID]='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Modalities', userPayload, EntityPermissionType.Read, 'AND');
|
|
5428
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5429
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Modalities', rows, this.GetUserFromPayload(userPayload));
|
|
5430
|
+
return result;
|
|
5431
|
+
}
|
|
5432
|
+
|
|
5433
|
+
@FieldResolver(() => [MJAIModelArchitecture_])
|
|
5434
|
+
async MJ_AIModelArchitectures_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5435
|
+
this.CheckUserReadPermissions('MJ: AI Model Architectures', userPayload);
|
|
5436
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5437
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5438
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelArchitectures] WHERE [ModelID]='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Architectures', userPayload, EntityPermissionType.Read, 'AND');
|
|
5439
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5440
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Architectures', rows, this.GetUserFromPayload(userPayload));
|
|
5441
|
+
return result;
|
|
5442
|
+
}
|
|
5443
|
+
|
|
5319
5444
|
@FieldResolver(() => [MJAIAgentModel_])
|
|
5320
5445
|
async AIAgentModels_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5321
5446
|
this.CheckUserReadPermissions('AI Agent Models', userPayload);
|
|
@@ -5404,6 +5529,17 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
5404
5529
|
return result;
|
|
5405
5530
|
}
|
|
5406
5531
|
|
|
5532
|
+
@FieldResolver(() => [MJAIModel_])
|
|
5533
|
+
async AIModels_PriorVersionIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5534
|
+
this.CheckUserReadPermissions('AI Models', userPayload);
|
|
5535
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5536
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5537
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModels] WHERE [PriorVersionID]='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
5538
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5539
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('AI Models', rows, this.GetUserFromPayload(userPayload));
|
|
5540
|
+
return result;
|
|
5541
|
+
}
|
|
5542
|
+
|
|
5407
5543
|
@Mutation(() => MJAIModel_)
|
|
5408
5544
|
async CreateMJAIModel(
|
|
5409
5545
|
@Arg('input', () => CreateMJAIModelInput) input: CreateMJAIModelInput,
|
|
@@ -6012,12 +6148,12 @@ export class MJAIPrompt_ {
|
|
|
6012
6148
|
@Field(() => [MJAIPrompt_])
|
|
6013
6149
|
AIPrompts_ResultSelectorPromptIDArray: MJAIPrompt_[]; // Link to AIPrompts
|
|
6014
6150
|
|
|
6015
|
-
@Field(() => [MJAIPromptModel_])
|
|
6016
|
-
MJ_AIPromptModels_PromptIDArray: MJAIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
6017
|
-
|
|
6018
6151
|
@Field(() => [MJAIAgentPrompt_])
|
|
6019
6152
|
MJ_AIAgentPrompts_PromptIDArray: MJAIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
6020
6153
|
|
|
6154
|
+
@Field(() => [MJAIPromptModel_])
|
|
6155
|
+
MJ_AIPromptModels_PromptIDArray: MJAIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
6156
|
+
|
|
6021
6157
|
@Field(() => [MJAIAgentStep_])
|
|
6022
6158
|
MJ_AIAgentSteps_PromptIDArray: MJAIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
6023
6159
|
|
|
@@ -6466,25 +6602,25 @@ export class MJAIPromptResolver extends ResolverBase {
|
|
|
6466
6602
|
return result;
|
|
6467
6603
|
}
|
|
6468
6604
|
|
|
6469
|
-
@FieldResolver(() => [
|
|
6470
|
-
async
|
|
6471
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
6605
|
+
@FieldResolver(() => [MJAIAgentPrompt_])
|
|
6606
|
+
async MJ_AIAgentPrompts_PromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6607
|
+
this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
|
|
6472
6608
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6473
6609
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6474
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6610
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
|
|
6475
6611
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6476
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
6612
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows, this.GetUserFromPayload(userPayload));
|
|
6477
6613
|
return result;
|
|
6478
6614
|
}
|
|
6479
6615
|
|
|
6480
|
-
@FieldResolver(() => [
|
|
6481
|
-
async
|
|
6482
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
6616
|
+
@FieldResolver(() => [MJAIPromptModel_])
|
|
6617
|
+
async MJ_AIPromptModels_PromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6618
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
6483
6619
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6484
6620
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6485
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6621
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [PromptID]='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
6486
6622
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6487
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
6623
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows, this.GetUserFromPayload(userPayload));
|
|
6488
6624
|
return result;
|
|
6489
6625
|
}
|
|
6490
6626
|
|
|
@@ -13116,6 +13252,9 @@ export class MJConversationDetail_ {
|
|
|
13116
13252
|
@Field(() => [MJConversationDetailArtifact_])
|
|
13117
13253
|
MJ_ConversationDetailArtifacts_ConversationDetailIDArray: MJConversationDetailArtifact_[]; // Link to MJ_ConversationDetailArtifacts
|
|
13118
13254
|
|
|
13255
|
+
@Field(() => [MJConversationDetailAttachment_])
|
|
13256
|
+
MJ_ConversationDetailAttachments_ConversationDetailIDArray: MJConversationDetailAttachment_[]; // Link to MJ_ConversationDetailAttachments
|
|
13257
|
+
|
|
13119
13258
|
@Field(() => [MJConversationDetailRating_])
|
|
13120
13259
|
MJ_ConversationDetailRatings_ConversationDetailIDArray: MJConversationDetailRating_[]; // Link to MJ_ConversationDetailRatings
|
|
13121
13260
|
|
|
@@ -13382,6 +13521,17 @@ export class MJConversationDetailResolver extends ResolverBase {
|
|
|
13382
13521
|
return result;
|
|
13383
13522
|
}
|
|
13384
13523
|
|
|
13524
|
+
@FieldResolver(() => [MJConversationDetailAttachment_])
|
|
13525
|
+
async MJ_ConversationDetailAttachments_ConversationDetailIDArray(@Root() mjconversationdetail_: MJConversationDetail_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13526
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Attachments', userPayload);
|
|
13527
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13528
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
13529
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailAttachments] WHERE [ConversationDetailID]='${mjconversationdetail_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Attachments', userPayload, EntityPermissionType.Read, 'AND');
|
|
13530
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
13531
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Attachments', rows, this.GetUserFromPayload(userPayload));
|
|
13532
|
+
return result;
|
|
13533
|
+
}
|
|
13534
|
+
|
|
13385
13535
|
@FieldResolver(() => [MJConversationDetailRating_])
|
|
13386
13536
|
async MJ_ConversationDetailRatings_ConversationDetailIDArray(@Root() mjconversationdetail_: MJConversationDetail_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13387
13537
|
this.CheckUserReadPermissions('MJ: Conversation Detail Ratings', userPayload);
|
|
@@ -17011,6 +17161,9 @@ export class MJEntity_ {
|
|
|
17011
17161
|
@Field(() => [MJRecordLink_])
|
|
17012
17162
|
MJ_RecordLinks_TargetEntityIDArray: MJRecordLink_[]; // Link to MJ_RecordLinks
|
|
17013
17163
|
|
|
17164
|
+
@Field(() => [MJTestRun_])
|
|
17165
|
+
MJ_TestRuns_TargetLogEntityIDArray: MJTestRun_[]; // Link to MJ_TestRuns
|
|
17166
|
+
|
|
17014
17167
|
}
|
|
17015
17168
|
|
|
17016
17169
|
//****************************************************************************
|
|
@@ -17856,6 +18009,17 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
17856
18009
|
return result;
|
|
17857
18010
|
}
|
|
17858
18011
|
|
|
18012
|
+
@FieldResolver(() => [MJTestRun_])
|
|
18013
|
+
async MJ_TestRuns_TargetLogEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
18014
|
+
this.CheckUserReadPermissions('MJ: Test Runs', userPayload);
|
|
18015
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18016
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
18017
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRuns] WHERE [TargetLogEntityID]='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
18018
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
18019
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Runs', rows, this.GetUserFromPayload(userPayload));
|
|
18020
|
+
return result;
|
|
18021
|
+
}
|
|
18022
|
+
|
|
17859
18023
|
@Mutation(() => MJEntity_)
|
|
17860
18024
|
async CreateMJEntity(
|
|
17861
18025
|
@Arg('input', () => CreateMJEntityInput) input: CreateMJEntityInput,
|
|
@@ -22988,6 +23152,12 @@ export class MJFileStorageProvider_ {
|
|
|
22988
23152
|
@Field(() => [MJFile_])
|
|
22989
23153
|
Files_ProviderIDArray: MJFile_[]; // Link to Files
|
|
22990
23154
|
|
|
23155
|
+
@Field(() => [MJAIConfiguration_])
|
|
23156
|
+
MJ_AIConfigurations_DefaultStorageProviderIDArray: MJAIConfiguration_[]; // Link to MJ_AIConfigurations
|
|
23157
|
+
|
|
23158
|
+
@Field(() => [MJAIAgent_])
|
|
23159
|
+
AIAgents_AttachmentStorageProviderIDArray: MJAIAgent_[]; // Link to AIAgents
|
|
23160
|
+
|
|
22991
23161
|
}
|
|
22992
23162
|
|
|
22993
23163
|
//****************************************************************************
|
|
@@ -23123,6 +23293,28 @@ export class MJFileStorageProviderResolver extends ResolverBase {
|
|
|
23123
23293
|
return result;
|
|
23124
23294
|
}
|
|
23125
23295
|
|
|
23296
|
+
@FieldResolver(() => [MJAIConfiguration_])
|
|
23297
|
+
async MJ_AIConfigurations_DefaultStorageProviderIDArray(@Root() mjfilestorageprovider_: MJFileStorageProvider_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23298
|
+
this.CheckUserReadPermissions('MJ: AI Configurations', userPayload);
|
|
23299
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23300
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
23301
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIConfigurations] WHERE [DefaultStorageProviderID]='${mjfilestorageprovider_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
23302
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
23303
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Configurations', rows, this.GetUserFromPayload(userPayload));
|
|
23304
|
+
return result;
|
|
23305
|
+
}
|
|
23306
|
+
|
|
23307
|
+
@FieldResolver(() => [MJAIAgent_])
|
|
23308
|
+
async AIAgents_AttachmentStorageProviderIDArray(@Root() mjfilestorageprovider_: MJFileStorageProvider_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23309
|
+
this.CheckUserReadPermissions('AI Agents', userPayload);
|
|
23310
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23311
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
23312
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgents] WHERE [AttachmentStorageProviderID]='${mjfilestorageprovider_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agents', userPayload, EntityPermissionType.Read, 'AND');
|
|
23313
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
23314
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('AI Agents', rows, this.GetUserFromPayload(userPayload));
|
|
23315
|
+
return result;
|
|
23316
|
+
}
|
|
23317
|
+
|
|
23126
23318
|
@Mutation(() => MJFileStorageProvider_)
|
|
23127
23319
|
async CreateMJFileStorageProvider(
|
|
23128
23320
|
@Arg('input', () => CreateMJFileStorageProviderInput) input: CreateMJFileStorageProviderInput,
|
|
@@ -23207,6 +23399,9 @@ export class MJFile_ {
|
|
|
23207
23399
|
@Field(() => [MJFileEntityRecordLink_])
|
|
23208
23400
|
FileEntityRecordLinks_FileIDArray: MJFileEntityRecordLink_[]; // Link to FileEntityRecordLinks
|
|
23209
23401
|
|
|
23402
|
+
@Field(() => [MJConversationDetailAttachment_])
|
|
23403
|
+
MJ_ConversationDetailAttachments_FileIDArray: MJConversationDetailAttachment_[]; // Link to MJ_ConversationDetailAttachments
|
|
23404
|
+
|
|
23210
23405
|
}
|
|
23211
23406
|
|
|
23212
23407
|
//****************************************************************************
|
|
@@ -23342,6 +23537,17 @@ export class MJFileResolver extends ResolverBase {
|
|
|
23342
23537
|
return result;
|
|
23343
23538
|
}
|
|
23344
23539
|
|
|
23540
|
+
@FieldResolver(() => [MJConversationDetailAttachment_])
|
|
23541
|
+
async MJ_ConversationDetailAttachments_FileIDArray(@Root() mjfile_: MJFile_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23542
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Attachments', userPayload);
|
|
23543
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23544
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
23545
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailAttachments] WHERE [FileID]='${mjfile_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Attachments', userPayload, EntityPermissionType.Read, 'AND');
|
|
23546
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
23547
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Attachments', rows, this.GetUserFromPayload(userPayload));
|
|
23548
|
+
return result;
|
|
23549
|
+
}
|
|
23550
|
+
|
|
23345
23551
|
@Mutation(() => MJFile_)
|
|
23346
23552
|
async CreateMJFile(
|
|
23347
23553
|
@Arg('input', () => CreateMJFileInput) input: CreateMJFileInput,
|
|
@@ -26468,6 +26674,199 @@ export class MJAIAgentExampleResolver extends ResolverBase {
|
|
|
26468
26674
|
|
|
26469
26675
|
}
|
|
26470
26676
|
|
|
26677
|
+
//****************************************************************************
|
|
26678
|
+
// ENTITY CLASS for MJ: AI Agent Modalities
|
|
26679
|
+
//****************************************************************************
|
|
26680
|
+
@ObjectType({ description: `Agent-level modality configuration. Allows agents to restrict or customize modality settings beyond what the model supports. Absence of a record means the agent uses model defaults (Text in/out assumed if no records exist).` })
|
|
26681
|
+
export class MJAIAgentModality_ {
|
|
26682
|
+
@Field()
|
|
26683
|
+
@MaxLength(16)
|
|
26684
|
+
ID: string;
|
|
26685
|
+
|
|
26686
|
+
@Field()
|
|
26687
|
+
@MaxLength(16)
|
|
26688
|
+
AgentID: string;
|
|
26689
|
+
|
|
26690
|
+
@Field()
|
|
26691
|
+
@MaxLength(16)
|
|
26692
|
+
ModalityID: string;
|
|
26693
|
+
|
|
26694
|
+
@Field({description: `Whether this is an Input or Output modality for the agent.`})
|
|
26695
|
+
@MaxLength(20)
|
|
26696
|
+
Direction: string;
|
|
26697
|
+
|
|
26698
|
+
@Field(() => Boolean, {description: `Whether this modality is allowed for this agent. Set to FALSE to disable a modality even if the underlying model supports it.`})
|
|
26699
|
+
IsAllowed: boolean;
|
|
26700
|
+
|
|
26701
|
+
@Field(() => Int, {nullable: true, description: `Agent-specific maximum size in bytes. Overrides model and system defaults. Must be less than or equal to model limit.`})
|
|
26702
|
+
MaxSizeBytes?: number;
|
|
26703
|
+
|
|
26704
|
+
@Field(() => Int, {nullable: true, description: `Agent-specific maximum count per message. Overrides model and system defaults. Must be less than or equal to model limit.`})
|
|
26705
|
+
MaxCountPerMessage?: number;
|
|
26706
|
+
|
|
26707
|
+
@Field()
|
|
26708
|
+
@MaxLength(10)
|
|
26709
|
+
_mj__CreatedAt: Date;
|
|
26710
|
+
|
|
26711
|
+
@Field()
|
|
26712
|
+
@MaxLength(10)
|
|
26713
|
+
_mj__UpdatedAt: Date;
|
|
26714
|
+
|
|
26715
|
+
@Field({nullable: true})
|
|
26716
|
+
@MaxLength(510)
|
|
26717
|
+
Agent?: string;
|
|
26718
|
+
|
|
26719
|
+
@Field()
|
|
26720
|
+
@MaxLength(100)
|
|
26721
|
+
Modality: string;
|
|
26722
|
+
|
|
26723
|
+
}
|
|
26724
|
+
|
|
26725
|
+
//****************************************************************************
|
|
26726
|
+
// INPUT TYPE for MJ: AI Agent Modalities
|
|
26727
|
+
//****************************************************************************
|
|
26728
|
+
@InputType()
|
|
26729
|
+
export class CreateMJAIAgentModalityInput {
|
|
26730
|
+
@Field({ nullable: true })
|
|
26731
|
+
ID?: string;
|
|
26732
|
+
|
|
26733
|
+
@Field({ nullable: true })
|
|
26734
|
+
AgentID?: string;
|
|
26735
|
+
|
|
26736
|
+
@Field({ nullable: true })
|
|
26737
|
+
ModalityID?: string;
|
|
26738
|
+
|
|
26739
|
+
@Field({ nullable: true })
|
|
26740
|
+
Direction?: string;
|
|
26741
|
+
|
|
26742
|
+
@Field(() => Boolean, { nullable: true })
|
|
26743
|
+
IsAllowed?: boolean;
|
|
26744
|
+
|
|
26745
|
+
@Field(() => Int, { nullable: true })
|
|
26746
|
+
MaxSizeBytes: number | null;
|
|
26747
|
+
|
|
26748
|
+
@Field(() => Int, { nullable: true })
|
|
26749
|
+
MaxCountPerMessage: number | null;
|
|
26750
|
+
}
|
|
26751
|
+
|
|
26752
|
+
|
|
26753
|
+
//****************************************************************************
|
|
26754
|
+
// INPUT TYPE for MJ: AI Agent Modalities
|
|
26755
|
+
//****************************************************************************
|
|
26756
|
+
@InputType()
|
|
26757
|
+
export class UpdateMJAIAgentModalityInput {
|
|
26758
|
+
@Field()
|
|
26759
|
+
ID: string;
|
|
26760
|
+
|
|
26761
|
+
@Field({ nullable: true })
|
|
26762
|
+
AgentID?: string;
|
|
26763
|
+
|
|
26764
|
+
@Field({ nullable: true })
|
|
26765
|
+
ModalityID?: string;
|
|
26766
|
+
|
|
26767
|
+
@Field({ nullable: true })
|
|
26768
|
+
Direction?: string;
|
|
26769
|
+
|
|
26770
|
+
@Field(() => Boolean, { nullable: true })
|
|
26771
|
+
IsAllowed?: boolean;
|
|
26772
|
+
|
|
26773
|
+
@Field(() => Int, { nullable: true })
|
|
26774
|
+
MaxSizeBytes?: number | null;
|
|
26775
|
+
|
|
26776
|
+
@Field(() => Int, { nullable: true })
|
|
26777
|
+
MaxCountPerMessage?: number | null;
|
|
26778
|
+
|
|
26779
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
26780
|
+
OldValues___?: KeyValuePairInput[];
|
|
26781
|
+
}
|
|
26782
|
+
|
|
26783
|
+
//****************************************************************************
|
|
26784
|
+
// RESOLVER for MJ: AI Agent Modalities
|
|
26785
|
+
//****************************************************************************
|
|
26786
|
+
@ObjectType()
|
|
26787
|
+
export class RunMJAIAgentModalityViewResult {
|
|
26788
|
+
@Field(() => [MJAIAgentModality_])
|
|
26789
|
+
Results: MJAIAgentModality_[];
|
|
26790
|
+
|
|
26791
|
+
@Field(() => String, {nullable: true})
|
|
26792
|
+
UserViewRunID?: string;
|
|
26793
|
+
|
|
26794
|
+
@Field(() => Int, {nullable: true})
|
|
26795
|
+
RowCount: number;
|
|
26796
|
+
|
|
26797
|
+
@Field(() => Int, {nullable: true})
|
|
26798
|
+
TotalRowCount: number;
|
|
26799
|
+
|
|
26800
|
+
@Field(() => Int, {nullable: true})
|
|
26801
|
+
ExecutionTime: number;
|
|
26802
|
+
|
|
26803
|
+
@Field({nullable: true})
|
|
26804
|
+
ErrorMessage?: string;
|
|
26805
|
+
|
|
26806
|
+
@Field(() => Boolean, {nullable: false})
|
|
26807
|
+
Success: boolean;
|
|
26808
|
+
}
|
|
26809
|
+
|
|
26810
|
+
@Resolver(MJAIAgentModality_)
|
|
26811
|
+
export class MJAIAgentModalityResolver extends ResolverBase {
|
|
26812
|
+
@Query(() => RunMJAIAgentModalityViewResult)
|
|
26813
|
+
async RunMJAIAgentModalityViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26814
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26815
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
26816
|
+
}
|
|
26817
|
+
|
|
26818
|
+
@Query(() => RunMJAIAgentModalityViewResult)
|
|
26819
|
+
async RunMJAIAgentModalityViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26820
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26821
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
26822
|
+
}
|
|
26823
|
+
|
|
26824
|
+
@Query(() => RunMJAIAgentModalityViewResult)
|
|
26825
|
+
async RunMJAIAgentModalityDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26826
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26827
|
+
input.EntityName = 'MJ: AI Agent Modalities';
|
|
26828
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
26829
|
+
}
|
|
26830
|
+
@Query(() => MJAIAgentModality_, { nullable: true })
|
|
26831
|
+
async MJAIAgentModality(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentModality_ | null> {
|
|
26832
|
+
this.CheckUserReadPermissions('MJ: AI Agent Modalities', userPayload);
|
|
26833
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
26834
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
26835
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModalities] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Modalities', userPayload, EntityPermissionType.Read, 'AND');
|
|
26836
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
26837
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Modalities', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
26838
|
+
return result;
|
|
26839
|
+
}
|
|
26840
|
+
|
|
26841
|
+
@Mutation(() => MJAIAgentModality_)
|
|
26842
|
+
async CreateMJAIAgentModality(
|
|
26843
|
+
@Arg('input', () => CreateMJAIAgentModalityInput) input: CreateMJAIAgentModalityInput,
|
|
26844
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
26845
|
+
@PubSub() pubSub: PubSubEngine
|
|
26846
|
+
) {
|
|
26847
|
+
const provider = GetReadWriteProvider(providers);
|
|
26848
|
+
return this.CreateRecord('MJ: AI Agent Modalities', input, provider, userPayload, pubSub)
|
|
26849
|
+
}
|
|
26850
|
+
|
|
26851
|
+
@Mutation(() => MJAIAgentModality_)
|
|
26852
|
+
async UpdateMJAIAgentModality(
|
|
26853
|
+
@Arg('input', () => UpdateMJAIAgentModalityInput) input: UpdateMJAIAgentModalityInput,
|
|
26854
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
26855
|
+
@PubSub() pubSub: PubSubEngine
|
|
26856
|
+
) {
|
|
26857
|
+
const provider = GetReadWriteProvider(providers);
|
|
26858
|
+
return this.UpdateRecord('MJ: AI Agent Modalities', input, provider, userPayload, pubSub);
|
|
26859
|
+
}
|
|
26860
|
+
|
|
26861
|
+
@Mutation(() => MJAIAgentModality_)
|
|
26862
|
+
async DeleteMJAIAgentModality(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26863
|
+
const provider = GetReadWriteProvider(providers);
|
|
26864
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
26865
|
+
return this.DeleteRecord('MJ: AI Agent Modalities', key, options, provider, userPayload, pubSub);
|
|
26866
|
+
}
|
|
26867
|
+
|
|
26868
|
+
}
|
|
26869
|
+
|
|
26471
26870
|
//****************************************************************************
|
|
26472
26871
|
// ENTITY CLASS for MJ: AI Agent Permissions
|
|
26473
26872
|
//****************************************************************************
|
|
@@ -27644,12 +28043,12 @@ each time the agent processes a prompt step.`})
|
|
|
27644
28043
|
@Field(() => [MJAIAgentRun_])
|
|
27645
28044
|
MJ_AIAgentRuns_ParentRunIDArray: MJAIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
27646
28045
|
|
|
27647
|
-
@Field(() => [MJAIAgentNote_])
|
|
27648
|
-
AIAgentNotes_SourceAIAgentRunIDArray: MJAIAgentNote_[]; // Link to AIAgentNotes
|
|
27649
|
-
|
|
27650
28046
|
@Field(() => [MJAIAgentExample_])
|
|
27651
28047
|
MJ_AIAgentExamples_SourceAIAgentRunIDArray: MJAIAgentExample_[]; // Link to MJ_AIAgentExamples
|
|
27652
28048
|
|
|
28049
|
+
@Field(() => [MJAIAgentNote_])
|
|
28050
|
+
AIAgentNotes_SourceAIAgentRunIDArray: MJAIAgentNote_[]; // Link to AIAgentNotes
|
|
28051
|
+
|
|
27653
28052
|
@Field(() => [MJAIPromptRun_])
|
|
27654
28053
|
MJ_AIPromptRuns_AgentRunIDArray: MJAIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
27655
28054
|
|
|
@@ -27985,25 +28384,25 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
27985
28384
|
return result;
|
|
27986
28385
|
}
|
|
27987
28386
|
|
|
27988
|
-
@FieldResolver(() => [
|
|
27989
|
-
async
|
|
27990
|
-
this.CheckUserReadPermissions('AI Agent
|
|
28387
|
+
@FieldResolver(() => [MJAIAgentExample_])
|
|
28388
|
+
async MJ_AIAgentExamples_SourceAIAgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28389
|
+
this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
|
|
27991
28390
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27992
28391
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
27993
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
28392
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [SourceAIAgentRunID]='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
|
|
27994
28393
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
27995
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
28394
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows, this.GetUserFromPayload(userPayload));
|
|
27996
28395
|
return result;
|
|
27997
28396
|
}
|
|
27998
28397
|
|
|
27999
|
-
@FieldResolver(() => [
|
|
28000
|
-
async
|
|
28001
|
-
this.CheckUserReadPermissions('
|
|
28398
|
+
@FieldResolver(() => [MJAIAgentNote_])
|
|
28399
|
+
async AIAgentNotes_SourceAIAgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28400
|
+
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
28002
28401
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
28003
28402
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
28004
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
28403
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [SourceAIAgentRunID]='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
28005
28404
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
28006
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('
|
|
28405
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows, this.GetUserFromPayload(userPayload));
|
|
28007
28406
|
return result;
|
|
28008
28407
|
}
|
|
28009
28408
|
|
|
@@ -28834,6 +29233,238 @@ export class MJAIAgentTypeResolver extends ResolverBase {
|
|
|
28834
29233
|
|
|
28835
29234
|
}
|
|
28836
29235
|
|
|
29236
|
+
//****************************************************************************
|
|
29237
|
+
// ENTITY CLASS for MJ: AI Architectures
|
|
29238
|
+
//****************************************************************************
|
|
29239
|
+
@ObjectType({ description: `Master table of AI model architectures (Transformer, Diffusion, MoE, etc.) for model catalog enrichment and eval reporting.` })
|
|
29240
|
+
export class MJAIArchitecture_ {
|
|
29241
|
+
@Field()
|
|
29242
|
+
@MaxLength(16)
|
|
29243
|
+
ID: string;
|
|
29244
|
+
|
|
29245
|
+
@Field()
|
|
29246
|
+
@MaxLength(200)
|
|
29247
|
+
Name: string;
|
|
29248
|
+
|
|
29249
|
+
@Field({nullable: true})
|
|
29250
|
+
Description?: string;
|
|
29251
|
+
|
|
29252
|
+
@Field()
|
|
29253
|
+
@MaxLength(100)
|
|
29254
|
+
Category: string;
|
|
29255
|
+
|
|
29256
|
+
@Field({nullable: true, description: `Hierarchical relationship to parent architecture. Used for variants like Sparse Transformer being a child of Transformer.`})
|
|
29257
|
+
@MaxLength(16)
|
|
29258
|
+
ParentArchitectureID?: string;
|
|
29259
|
+
|
|
29260
|
+
@Field({nullable: true})
|
|
29261
|
+
@MaxLength(1000)
|
|
29262
|
+
WikipediaURL?: string;
|
|
29263
|
+
|
|
29264
|
+
@Field(() => Int, {nullable: true})
|
|
29265
|
+
YearIntroduced?: number;
|
|
29266
|
+
|
|
29267
|
+
@Field({nullable: true})
|
|
29268
|
+
@MaxLength(1000)
|
|
29269
|
+
KeyPaper?: string;
|
|
29270
|
+
|
|
29271
|
+
@Field()
|
|
29272
|
+
@MaxLength(10)
|
|
29273
|
+
_mj__CreatedAt: Date;
|
|
29274
|
+
|
|
29275
|
+
@Field()
|
|
29276
|
+
@MaxLength(10)
|
|
29277
|
+
_mj__UpdatedAt: Date;
|
|
29278
|
+
|
|
29279
|
+
@Field({nullable: true})
|
|
29280
|
+
@MaxLength(200)
|
|
29281
|
+
ParentArchitecture?: string;
|
|
29282
|
+
|
|
29283
|
+
@Field({nullable: true})
|
|
29284
|
+
@MaxLength(16)
|
|
29285
|
+
RootParentArchitectureID?: string;
|
|
29286
|
+
|
|
29287
|
+
@Field(() => [MJAIArchitecture_])
|
|
29288
|
+
MJ_AIArchitectures_ParentArchitectureIDArray: MJAIArchitecture_[]; // Link to MJ_AIArchitectures
|
|
29289
|
+
|
|
29290
|
+
@Field(() => [MJAIModelArchitecture_])
|
|
29291
|
+
MJ_AIModelArchitectures_ArchitectureIDArray: MJAIModelArchitecture_[]; // Link to MJ_AIModelArchitectures
|
|
29292
|
+
|
|
29293
|
+
}
|
|
29294
|
+
|
|
29295
|
+
//****************************************************************************
|
|
29296
|
+
// INPUT TYPE for MJ: AI Architectures
|
|
29297
|
+
//****************************************************************************
|
|
29298
|
+
@InputType()
|
|
29299
|
+
export class CreateMJAIArchitectureInput {
|
|
29300
|
+
@Field({ nullable: true })
|
|
29301
|
+
ID?: string;
|
|
29302
|
+
|
|
29303
|
+
@Field({ nullable: true })
|
|
29304
|
+
Name?: string;
|
|
29305
|
+
|
|
29306
|
+
@Field({ nullable: true })
|
|
29307
|
+
Description: string | null;
|
|
29308
|
+
|
|
29309
|
+
@Field({ nullable: true })
|
|
29310
|
+
Category?: string;
|
|
29311
|
+
|
|
29312
|
+
@Field({ nullable: true })
|
|
29313
|
+
ParentArchitectureID: string | null;
|
|
29314
|
+
|
|
29315
|
+
@Field({ nullable: true })
|
|
29316
|
+
WikipediaURL: string | null;
|
|
29317
|
+
|
|
29318
|
+
@Field(() => Int, { nullable: true })
|
|
29319
|
+
YearIntroduced: number | null;
|
|
29320
|
+
|
|
29321
|
+
@Field({ nullable: true })
|
|
29322
|
+
KeyPaper: string | null;
|
|
29323
|
+
}
|
|
29324
|
+
|
|
29325
|
+
|
|
29326
|
+
//****************************************************************************
|
|
29327
|
+
// INPUT TYPE for MJ: AI Architectures
|
|
29328
|
+
//****************************************************************************
|
|
29329
|
+
@InputType()
|
|
29330
|
+
export class UpdateMJAIArchitectureInput {
|
|
29331
|
+
@Field()
|
|
29332
|
+
ID: string;
|
|
29333
|
+
|
|
29334
|
+
@Field({ nullable: true })
|
|
29335
|
+
Name?: string;
|
|
29336
|
+
|
|
29337
|
+
@Field({ nullable: true })
|
|
29338
|
+
Description?: string | null;
|
|
29339
|
+
|
|
29340
|
+
@Field({ nullable: true })
|
|
29341
|
+
Category?: string;
|
|
29342
|
+
|
|
29343
|
+
@Field({ nullable: true })
|
|
29344
|
+
ParentArchitectureID?: string | null;
|
|
29345
|
+
|
|
29346
|
+
@Field({ nullable: true })
|
|
29347
|
+
WikipediaURL?: string | null;
|
|
29348
|
+
|
|
29349
|
+
@Field(() => Int, { nullable: true })
|
|
29350
|
+
YearIntroduced?: number | null;
|
|
29351
|
+
|
|
29352
|
+
@Field({ nullable: true })
|
|
29353
|
+
KeyPaper?: string | null;
|
|
29354
|
+
|
|
29355
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
29356
|
+
OldValues___?: KeyValuePairInput[];
|
|
29357
|
+
}
|
|
29358
|
+
|
|
29359
|
+
//****************************************************************************
|
|
29360
|
+
// RESOLVER for MJ: AI Architectures
|
|
29361
|
+
//****************************************************************************
|
|
29362
|
+
@ObjectType()
|
|
29363
|
+
export class RunMJAIArchitectureViewResult {
|
|
29364
|
+
@Field(() => [MJAIArchitecture_])
|
|
29365
|
+
Results: MJAIArchitecture_[];
|
|
29366
|
+
|
|
29367
|
+
@Field(() => String, {nullable: true})
|
|
29368
|
+
UserViewRunID?: string;
|
|
29369
|
+
|
|
29370
|
+
@Field(() => Int, {nullable: true})
|
|
29371
|
+
RowCount: number;
|
|
29372
|
+
|
|
29373
|
+
@Field(() => Int, {nullable: true})
|
|
29374
|
+
TotalRowCount: number;
|
|
29375
|
+
|
|
29376
|
+
@Field(() => Int, {nullable: true})
|
|
29377
|
+
ExecutionTime: number;
|
|
29378
|
+
|
|
29379
|
+
@Field({nullable: true})
|
|
29380
|
+
ErrorMessage?: string;
|
|
29381
|
+
|
|
29382
|
+
@Field(() => Boolean, {nullable: false})
|
|
29383
|
+
Success: boolean;
|
|
29384
|
+
}
|
|
29385
|
+
|
|
29386
|
+
@Resolver(MJAIArchitecture_)
|
|
29387
|
+
export class MJAIArchitectureResolver extends ResolverBase {
|
|
29388
|
+
@Query(() => RunMJAIArchitectureViewResult)
|
|
29389
|
+
async RunMJAIArchitectureViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29390
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29391
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
29392
|
+
}
|
|
29393
|
+
|
|
29394
|
+
@Query(() => RunMJAIArchitectureViewResult)
|
|
29395
|
+
async RunMJAIArchitectureViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29396
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29397
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
29398
|
+
}
|
|
29399
|
+
|
|
29400
|
+
@Query(() => RunMJAIArchitectureViewResult)
|
|
29401
|
+
async RunMJAIArchitectureDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29402
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29403
|
+
input.EntityName = 'MJ: AI Architectures';
|
|
29404
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
29405
|
+
}
|
|
29406
|
+
@Query(() => MJAIArchitecture_, { nullable: true })
|
|
29407
|
+
async MJAIArchitecture(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIArchitecture_ | null> {
|
|
29408
|
+
this.CheckUserReadPermissions('MJ: AI Architectures', userPayload);
|
|
29409
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29410
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29411
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIArchitectures] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Architectures', userPayload, EntityPermissionType.Read, 'AND');
|
|
29412
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
29413
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Architectures', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
29414
|
+
return result;
|
|
29415
|
+
}
|
|
29416
|
+
|
|
29417
|
+
@FieldResolver(() => [MJAIArchitecture_])
|
|
29418
|
+
async MJ_AIArchitectures_ParentArchitectureIDArray(@Root() mjaiarchitecture_: MJAIArchitecture_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29419
|
+
this.CheckUserReadPermissions('MJ: AI Architectures', userPayload);
|
|
29420
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29421
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29422
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIArchitectures] WHERE [ParentArchitectureID]='${mjaiarchitecture_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Architectures', userPayload, EntityPermissionType.Read, 'AND');
|
|
29423
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
29424
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Architectures', rows, this.GetUserFromPayload(userPayload));
|
|
29425
|
+
return result;
|
|
29426
|
+
}
|
|
29427
|
+
|
|
29428
|
+
@FieldResolver(() => [MJAIModelArchitecture_])
|
|
29429
|
+
async MJ_AIModelArchitectures_ArchitectureIDArray(@Root() mjaiarchitecture_: MJAIArchitecture_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29430
|
+
this.CheckUserReadPermissions('MJ: AI Model Architectures', userPayload);
|
|
29431
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29432
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29433
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelArchitectures] WHERE [ArchitectureID]='${mjaiarchitecture_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Architectures', userPayload, EntityPermissionType.Read, 'AND');
|
|
29434
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
29435
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Architectures', rows, this.GetUserFromPayload(userPayload));
|
|
29436
|
+
return result;
|
|
29437
|
+
}
|
|
29438
|
+
|
|
29439
|
+
@Mutation(() => MJAIArchitecture_)
|
|
29440
|
+
async CreateMJAIArchitecture(
|
|
29441
|
+
@Arg('input', () => CreateMJAIArchitectureInput) input: CreateMJAIArchitectureInput,
|
|
29442
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
29443
|
+
@PubSub() pubSub: PubSubEngine
|
|
29444
|
+
) {
|
|
29445
|
+
const provider = GetReadWriteProvider(providers);
|
|
29446
|
+
return this.CreateRecord('MJ: AI Architectures', input, provider, userPayload, pubSub)
|
|
29447
|
+
}
|
|
29448
|
+
|
|
29449
|
+
@Mutation(() => MJAIArchitecture_)
|
|
29450
|
+
async UpdateMJAIArchitecture(
|
|
29451
|
+
@Arg('input', () => UpdateMJAIArchitectureInput) input: UpdateMJAIArchitectureInput,
|
|
29452
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
29453
|
+
@PubSub() pubSub: PubSubEngine
|
|
29454
|
+
) {
|
|
29455
|
+
const provider = GetReadWriteProvider(providers);
|
|
29456
|
+
return this.UpdateRecord('MJ: AI Architectures', input, provider, userPayload, pubSub);
|
|
29457
|
+
}
|
|
29458
|
+
|
|
29459
|
+
@Mutation(() => MJAIArchitecture_)
|
|
29460
|
+
async DeleteMJAIArchitecture(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29461
|
+
const provider = GetReadWriteProvider(providers);
|
|
29462
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
29463
|
+
return this.DeleteRecord('MJ: AI Architectures', key, options, provider, userPayload, pubSub);
|
|
29464
|
+
}
|
|
29465
|
+
|
|
29466
|
+
}
|
|
29467
|
+
|
|
28837
29468
|
//****************************************************************************
|
|
28838
29469
|
// ENTITY CLASS for MJ: AI Configuration Params
|
|
28839
29470
|
//****************************************************************************
|
|
@@ -29053,6 +29684,18 @@ export class MJAIConfiguration_ {
|
|
|
29053
29684
|
@MaxLength(10)
|
|
29054
29685
|
_mj__UpdatedAt: Date;
|
|
29055
29686
|
|
|
29687
|
+
@Field({nullable: true, description: `Default file storage provider for agent attachments. Used when an agent does not specify its own AttachmentStorageProviderID.`})
|
|
29688
|
+
@MaxLength(16)
|
|
29689
|
+
DefaultStorageProviderID?: string;
|
|
29690
|
+
|
|
29691
|
+
@Field({nullable: true, description: `Default root path within the storage provider for agent attachments. Used when an agent does not specify its own AttachmentRootPath.`})
|
|
29692
|
+
@MaxLength(1000)
|
|
29693
|
+
DefaultStorageRootPath?: string;
|
|
29694
|
+
|
|
29695
|
+
@Field({nullable: true, description: `Optional reference to a parent configuration. When set, this configuration inherits prompt-model mappings and parameters from its parent. Child configurations can override specific settings while inheriting defaults from the parent chain. Supports N-level deep inheritance.`})
|
|
29696
|
+
@MaxLength(16)
|
|
29697
|
+
ParentID?: string;
|
|
29698
|
+
|
|
29056
29699
|
@Field({nullable: true})
|
|
29057
29700
|
@MaxLength(510)
|
|
29058
29701
|
DefaultPromptForContextCompression?: string;
|
|
@@ -29061,6 +29704,18 @@ export class MJAIConfiguration_ {
|
|
|
29061
29704
|
@MaxLength(510)
|
|
29062
29705
|
DefaultPromptForContextSummarization?: string;
|
|
29063
29706
|
|
|
29707
|
+
@Field({nullable: true})
|
|
29708
|
+
@MaxLength(100)
|
|
29709
|
+
DefaultStorageProvider?: string;
|
|
29710
|
+
|
|
29711
|
+
@Field({nullable: true})
|
|
29712
|
+
@MaxLength(200)
|
|
29713
|
+
Parent?: string;
|
|
29714
|
+
|
|
29715
|
+
@Field({nullable: true})
|
|
29716
|
+
@MaxLength(16)
|
|
29717
|
+
RootParentID?: string;
|
|
29718
|
+
|
|
29064
29719
|
@Field(() => [MJAIConfigurationParam_])
|
|
29065
29720
|
MJ_AIConfigurationParams_ConfigurationIDArray: MJAIConfigurationParam_[]; // Link to MJ_AIConfigurationParams
|
|
29066
29721
|
|
|
@@ -29082,6 +29737,9 @@ export class MJAIConfiguration_ {
|
|
|
29082
29737
|
@Field(() => [MJAIAgentRun_])
|
|
29083
29738
|
MJ_AIAgentRuns_ConfigurationIDArray: MJAIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
29084
29739
|
|
|
29740
|
+
@Field(() => [MJAIConfiguration_])
|
|
29741
|
+
MJ_AIConfigurations_ParentIDArray: MJAIConfiguration_[]; // Link to MJ_AIConfigurations
|
|
29742
|
+
|
|
29085
29743
|
}
|
|
29086
29744
|
|
|
29087
29745
|
//****************************************************************************
|
|
@@ -29109,6 +29767,15 @@ export class CreateMJAIConfigurationInput {
|
|
|
29109
29767
|
|
|
29110
29768
|
@Field({ nullable: true })
|
|
29111
29769
|
DefaultPromptForContextSummarizationID: string | null;
|
|
29770
|
+
|
|
29771
|
+
@Field({ nullable: true })
|
|
29772
|
+
DefaultStorageProviderID: string | null;
|
|
29773
|
+
|
|
29774
|
+
@Field({ nullable: true })
|
|
29775
|
+
DefaultStorageRootPath: string | null;
|
|
29776
|
+
|
|
29777
|
+
@Field({ nullable: true })
|
|
29778
|
+
ParentID: string | null;
|
|
29112
29779
|
}
|
|
29113
29780
|
|
|
29114
29781
|
|
|
@@ -29138,6 +29805,15 @@ export class UpdateMJAIConfigurationInput {
|
|
|
29138
29805
|
@Field({ nullable: true })
|
|
29139
29806
|
DefaultPromptForContextSummarizationID?: string | null;
|
|
29140
29807
|
|
|
29808
|
+
@Field({ nullable: true })
|
|
29809
|
+
DefaultStorageProviderID?: string | null;
|
|
29810
|
+
|
|
29811
|
+
@Field({ nullable: true })
|
|
29812
|
+
DefaultStorageRootPath?: string | null;
|
|
29813
|
+
|
|
29814
|
+
@Field({ nullable: true })
|
|
29815
|
+
ParentID?: string | null;
|
|
29816
|
+
|
|
29141
29817
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
29142
29818
|
OldValues___?: KeyValuePairInput[];
|
|
29143
29819
|
}
|
|
@@ -29277,6 +29953,17 @@ export class MJAIConfigurationResolver extends ResolverBase {
|
|
|
29277
29953
|
return result;
|
|
29278
29954
|
}
|
|
29279
29955
|
|
|
29956
|
+
@FieldResolver(() => [MJAIConfiguration_])
|
|
29957
|
+
async MJ_AIConfigurations_ParentIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29958
|
+
this.CheckUserReadPermissions('MJ: AI Configurations', userPayload);
|
|
29959
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29960
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29961
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIConfigurations] WHERE [ParentID]='${mjaiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
29962
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
29963
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Configurations', rows, this.GetUserFromPayload(userPayload));
|
|
29964
|
+
return result;
|
|
29965
|
+
}
|
|
29966
|
+
|
|
29280
29967
|
@Mutation(() => MJAIConfiguration_)
|
|
29281
29968
|
async CreateMJAIConfiguration(
|
|
29282
29969
|
@Arg('input', () => CreateMJAIConfigurationInput) input: CreateMJAIConfigurationInput,
|
|
@@ -29518,6 +30205,465 @@ export class MJAICredentialBindingResolver extends ResolverBase {
|
|
|
29518
30205
|
|
|
29519
30206
|
}
|
|
29520
30207
|
|
|
30208
|
+
//****************************************************************************
|
|
30209
|
+
// ENTITY CLASS for MJ: AI Modalities
|
|
30210
|
+
//****************************************************************************
|
|
30211
|
+
@ObjectType({ description: `Master list of AI content modalities (Text, Image, Audio, Video, etc.) that models can accept as input or produce as output. New modalities can be added via INSERT without schema changes.` })
|
|
30212
|
+
export class MJAIModality_ {
|
|
30213
|
+
@Field()
|
|
30214
|
+
@MaxLength(16)
|
|
30215
|
+
ID: string;
|
|
30216
|
+
|
|
30217
|
+
@Field({description: `Display name of the modality (e.g., Text, Image, Audio, Video, File, Embedding).`})
|
|
30218
|
+
@MaxLength(100)
|
|
30219
|
+
Name: string;
|
|
30220
|
+
|
|
30221
|
+
@Field({nullable: true, description: `Detailed description of this modality and its use cases.`})
|
|
30222
|
+
@MaxLength(1000)
|
|
30223
|
+
Description?: string;
|
|
30224
|
+
|
|
30225
|
+
@Field({description: `Maps to ChatMessageContentBlock.type values: text, image_url, video_url, audio_url, file_url, embedding. Must match the TypeScript type definition.`})
|
|
30226
|
+
@MaxLength(100)
|
|
30227
|
+
ContentBlockType: string;
|
|
30228
|
+
|
|
30229
|
+
@Field({nullable: true, description: `MIME type pattern for this modality (e.g., image/*, audio/*, video/*, text/*, application/*). Used for file type validation.`})
|
|
30230
|
+
@MaxLength(200)
|
|
30231
|
+
MIMETypePattern?: string;
|
|
30232
|
+
|
|
30233
|
+
@Field({description: `Classification type: Content (human-readable text), Structured (JSON/embeddings), Binary (media files like images, audio, video).`})
|
|
30234
|
+
@MaxLength(100)
|
|
30235
|
+
Type: string;
|
|
30236
|
+
|
|
30237
|
+
@Field(() => Int, {nullable: true, description: `System-wide default maximum size in bytes for this modality. Can be overridden at model or agent level. NULL means no size limit.`})
|
|
30238
|
+
DefaultMaxSizeBytes?: number;
|
|
30239
|
+
|
|
30240
|
+
@Field(() => Int, {nullable: true, description: `System-wide default maximum count per message for this modality. Can be overridden at model or agent level. NULL means no count limit.`})
|
|
30241
|
+
DefaultMaxCountPerMessage?: number;
|
|
30242
|
+
|
|
30243
|
+
@Field(() => Int, {description: `Display order for UI presentation. Lower numbers appear first.`})
|
|
30244
|
+
DisplayOrder: number;
|
|
30245
|
+
|
|
30246
|
+
@Field()
|
|
30247
|
+
@MaxLength(10)
|
|
30248
|
+
_mj__CreatedAt: Date;
|
|
30249
|
+
|
|
30250
|
+
@Field()
|
|
30251
|
+
@MaxLength(10)
|
|
30252
|
+
_mj__UpdatedAt: Date;
|
|
30253
|
+
|
|
30254
|
+
@Field(() => [MJAIModelModality_])
|
|
30255
|
+
MJ_AIModelModalities_ModalityIDArray: MJAIModelModality_[]; // Link to MJ_AIModelModalities
|
|
30256
|
+
|
|
30257
|
+
@Field(() => [MJAIAgentModality_])
|
|
30258
|
+
MJ_AIAgentModalities_ModalityIDArray: MJAIAgentModality_[]; // Link to MJ_AIAgentModalities
|
|
30259
|
+
|
|
30260
|
+
@Field(() => [MJConversationDetailAttachment_])
|
|
30261
|
+
MJ_ConversationDetailAttachments_ModalityIDArray: MJConversationDetailAttachment_[]; // Link to MJ_ConversationDetailAttachments
|
|
30262
|
+
|
|
30263
|
+
@Field(() => [MJAIModelType_])
|
|
30264
|
+
AIModelTypes_DefaultOutputModalityIDArray: MJAIModelType_[]; // Link to AIModelTypes
|
|
30265
|
+
|
|
30266
|
+
@Field(() => [MJAIModelType_])
|
|
30267
|
+
AIModelTypes_DefaultInputModalityIDArray: MJAIModelType_[]; // Link to AIModelTypes
|
|
30268
|
+
|
|
30269
|
+
}
|
|
30270
|
+
|
|
30271
|
+
//****************************************************************************
|
|
30272
|
+
// INPUT TYPE for MJ: AI Modalities
|
|
30273
|
+
//****************************************************************************
|
|
30274
|
+
@InputType()
|
|
30275
|
+
export class CreateMJAIModalityInput {
|
|
30276
|
+
@Field({ nullable: true })
|
|
30277
|
+
ID?: string;
|
|
30278
|
+
|
|
30279
|
+
@Field({ nullable: true })
|
|
30280
|
+
Name?: string;
|
|
30281
|
+
|
|
30282
|
+
@Field({ nullable: true })
|
|
30283
|
+
Description: string | null;
|
|
30284
|
+
|
|
30285
|
+
@Field({ nullable: true })
|
|
30286
|
+
ContentBlockType?: string;
|
|
30287
|
+
|
|
30288
|
+
@Field({ nullable: true })
|
|
30289
|
+
MIMETypePattern: string | null;
|
|
30290
|
+
|
|
30291
|
+
@Field({ nullable: true })
|
|
30292
|
+
Type?: string;
|
|
30293
|
+
|
|
30294
|
+
@Field(() => Int, { nullable: true })
|
|
30295
|
+
DefaultMaxSizeBytes: number | null;
|
|
30296
|
+
|
|
30297
|
+
@Field(() => Int, { nullable: true })
|
|
30298
|
+
DefaultMaxCountPerMessage: number | null;
|
|
30299
|
+
|
|
30300
|
+
@Field(() => Int, { nullable: true })
|
|
30301
|
+
DisplayOrder?: number;
|
|
30302
|
+
}
|
|
30303
|
+
|
|
30304
|
+
|
|
30305
|
+
//****************************************************************************
|
|
30306
|
+
// INPUT TYPE for MJ: AI Modalities
|
|
30307
|
+
//****************************************************************************
|
|
30308
|
+
@InputType()
|
|
30309
|
+
export class UpdateMJAIModalityInput {
|
|
30310
|
+
@Field()
|
|
30311
|
+
ID: string;
|
|
30312
|
+
|
|
30313
|
+
@Field({ nullable: true })
|
|
30314
|
+
Name?: string;
|
|
30315
|
+
|
|
30316
|
+
@Field({ nullable: true })
|
|
30317
|
+
Description?: string | null;
|
|
30318
|
+
|
|
30319
|
+
@Field({ nullable: true })
|
|
30320
|
+
ContentBlockType?: string;
|
|
30321
|
+
|
|
30322
|
+
@Field({ nullable: true })
|
|
30323
|
+
MIMETypePattern?: string | null;
|
|
30324
|
+
|
|
30325
|
+
@Field({ nullable: true })
|
|
30326
|
+
Type?: string;
|
|
30327
|
+
|
|
30328
|
+
@Field(() => Int, { nullable: true })
|
|
30329
|
+
DefaultMaxSizeBytes?: number | null;
|
|
30330
|
+
|
|
30331
|
+
@Field(() => Int, { nullable: true })
|
|
30332
|
+
DefaultMaxCountPerMessage?: number | null;
|
|
30333
|
+
|
|
30334
|
+
@Field(() => Int, { nullable: true })
|
|
30335
|
+
DisplayOrder?: number;
|
|
30336
|
+
|
|
30337
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
30338
|
+
OldValues___?: KeyValuePairInput[];
|
|
30339
|
+
}
|
|
30340
|
+
|
|
30341
|
+
//****************************************************************************
|
|
30342
|
+
// RESOLVER for MJ: AI Modalities
|
|
30343
|
+
//****************************************************************************
|
|
30344
|
+
@ObjectType()
|
|
30345
|
+
export class RunMJAIModalityViewResult {
|
|
30346
|
+
@Field(() => [MJAIModality_])
|
|
30347
|
+
Results: MJAIModality_[];
|
|
30348
|
+
|
|
30349
|
+
@Field(() => String, {nullable: true})
|
|
30350
|
+
UserViewRunID?: string;
|
|
30351
|
+
|
|
30352
|
+
@Field(() => Int, {nullable: true})
|
|
30353
|
+
RowCount: number;
|
|
30354
|
+
|
|
30355
|
+
@Field(() => Int, {nullable: true})
|
|
30356
|
+
TotalRowCount: number;
|
|
30357
|
+
|
|
30358
|
+
@Field(() => Int, {nullable: true})
|
|
30359
|
+
ExecutionTime: number;
|
|
30360
|
+
|
|
30361
|
+
@Field({nullable: true})
|
|
30362
|
+
ErrorMessage?: string;
|
|
30363
|
+
|
|
30364
|
+
@Field(() => Boolean, {nullable: false})
|
|
30365
|
+
Success: boolean;
|
|
30366
|
+
}
|
|
30367
|
+
|
|
30368
|
+
@Resolver(MJAIModality_)
|
|
30369
|
+
export class MJAIModalityResolver extends ResolverBase {
|
|
30370
|
+
@Query(() => RunMJAIModalityViewResult)
|
|
30371
|
+
async RunMJAIModalityViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30372
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30373
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
30374
|
+
}
|
|
30375
|
+
|
|
30376
|
+
@Query(() => RunMJAIModalityViewResult)
|
|
30377
|
+
async RunMJAIModalityViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30378
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30379
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
30380
|
+
}
|
|
30381
|
+
|
|
30382
|
+
@Query(() => RunMJAIModalityViewResult)
|
|
30383
|
+
async RunMJAIModalityDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30384
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30385
|
+
input.EntityName = 'MJ: AI Modalities';
|
|
30386
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
30387
|
+
}
|
|
30388
|
+
@Query(() => MJAIModality_, { nullable: true })
|
|
30389
|
+
async MJAIModality(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIModality_ | null> {
|
|
30390
|
+
this.CheckUserReadPermissions('MJ: AI Modalities', userPayload);
|
|
30391
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30392
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30393
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModalities] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Modalities', userPayload, EntityPermissionType.Read, 'AND');
|
|
30394
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
30395
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Modalities', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
30396
|
+
return result;
|
|
30397
|
+
}
|
|
30398
|
+
|
|
30399
|
+
@FieldResolver(() => [MJAIModelModality_])
|
|
30400
|
+
async MJ_AIModelModalities_ModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30401
|
+
this.CheckUserReadPermissions('MJ: AI Model Modalities', userPayload);
|
|
30402
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30403
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30404
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelModalities] WHERE [ModalityID]='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Modalities', userPayload, EntityPermissionType.Read, 'AND');
|
|
30405
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
30406
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Modalities', rows, this.GetUserFromPayload(userPayload));
|
|
30407
|
+
return result;
|
|
30408
|
+
}
|
|
30409
|
+
|
|
30410
|
+
@FieldResolver(() => [MJAIAgentModality_])
|
|
30411
|
+
async MJ_AIAgentModalities_ModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30412
|
+
this.CheckUserReadPermissions('MJ: AI Agent Modalities', userPayload);
|
|
30413
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30414
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30415
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModalities] WHERE [ModalityID]='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Modalities', userPayload, EntityPermissionType.Read, 'AND');
|
|
30416
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
30417
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Modalities', rows, this.GetUserFromPayload(userPayload));
|
|
30418
|
+
return result;
|
|
30419
|
+
}
|
|
30420
|
+
|
|
30421
|
+
@FieldResolver(() => [MJConversationDetailAttachment_])
|
|
30422
|
+
async MJ_ConversationDetailAttachments_ModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30423
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Attachments', userPayload);
|
|
30424
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30425
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30426
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailAttachments] WHERE [ModalityID]='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Attachments', userPayload, EntityPermissionType.Read, 'AND');
|
|
30427
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
30428
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Attachments', rows, this.GetUserFromPayload(userPayload));
|
|
30429
|
+
return result;
|
|
30430
|
+
}
|
|
30431
|
+
|
|
30432
|
+
@FieldResolver(() => [MJAIModelType_])
|
|
30433
|
+
async AIModelTypes_DefaultOutputModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30434
|
+
this.CheckUserReadPermissions('AI Model Types', userPayload);
|
|
30435
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30436
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30437
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelTypes] WHERE [DefaultOutputModalityID]='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Model Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
30438
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
30439
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('AI Model Types', rows, this.GetUserFromPayload(userPayload));
|
|
30440
|
+
return result;
|
|
30441
|
+
}
|
|
30442
|
+
|
|
30443
|
+
@FieldResolver(() => [MJAIModelType_])
|
|
30444
|
+
async AIModelTypes_DefaultInputModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30445
|
+
this.CheckUserReadPermissions('AI Model Types', userPayload);
|
|
30446
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30447
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30448
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelTypes] WHERE [DefaultInputModalityID]='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Model Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
30449
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
30450
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('AI Model Types', rows, this.GetUserFromPayload(userPayload));
|
|
30451
|
+
return result;
|
|
30452
|
+
}
|
|
30453
|
+
|
|
30454
|
+
@Mutation(() => MJAIModality_)
|
|
30455
|
+
async CreateMJAIModality(
|
|
30456
|
+
@Arg('input', () => CreateMJAIModalityInput) input: CreateMJAIModalityInput,
|
|
30457
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
30458
|
+
@PubSub() pubSub: PubSubEngine
|
|
30459
|
+
) {
|
|
30460
|
+
const provider = GetReadWriteProvider(providers);
|
|
30461
|
+
return this.CreateRecord('MJ: AI Modalities', input, provider, userPayload, pubSub)
|
|
30462
|
+
}
|
|
30463
|
+
|
|
30464
|
+
@Mutation(() => MJAIModality_)
|
|
30465
|
+
async UpdateMJAIModality(
|
|
30466
|
+
@Arg('input', () => UpdateMJAIModalityInput) input: UpdateMJAIModalityInput,
|
|
30467
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
30468
|
+
@PubSub() pubSub: PubSubEngine
|
|
30469
|
+
) {
|
|
30470
|
+
const provider = GetReadWriteProvider(providers);
|
|
30471
|
+
return this.UpdateRecord('MJ: AI Modalities', input, provider, userPayload, pubSub);
|
|
30472
|
+
}
|
|
30473
|
+
|
|
30474
|
+
@Mutation(() => MJAIModality_)
|
|
30475
|
+
async DeleteMJAIModality(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30476
|
+
const provider = GetReadWriteProvider(providers);
|
|
30477
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
30478
|
+
return this.DeleteRecord('MJ: AI Modalities', key, options, provider, userPayload, pubSub);
|
|
30479
|
+
}
|
|
30480
|
+
|
|
30481
|
+
}
|
|
30482
|
+
|
|
30483
|
+
//****************************************************************************
|
|
30484
|
+
// ENTITY CLASS for MJ: AI Model Architectures
|
|
30485
|
+
//****************************************************************************
|
|
30486
|
+
@ObjectType({ description: `Junction table linking AI models to their underlying architectures. Supports multiple architectures per model with ranking.` })
|
|
30487
|
+
export class MJAIModelArchitecture_ {
|
|
30488
|
+
@Field()
|
|
30489
|
+
@MaxLength(16)
|
|
30490
|
+
ID: string;
|
|
30491
|
+
|
|
30492
|
+
@Field()
|
|
30493
|
+
@MaxLength(16)
|
|
30494
|
+
ModelID: string;
|
|
30495
|
+
|
|
30496
|
+
@Field()
|
|
30497
|
+
@MaxLength(16)
|
|
30498
|
+
ArchitectureID: string;
|
|
30499
|
+
|
|
30500
|
+
@Field(() => Int, {description: `Ranking of this architecture for the model. 1=Primary architecture, 2=Secondary, etc. Lower numbers indicate more dominant role.`})
|
|
30501
|
+
Rank: number;
|
|
30502
|
+
|
|
30503
|
+
@Field(() => Float, {nullable: true, description: `Optional weight (0.0-1.0) indicating the mix ratio for hybrid architectures. E.g., 0.7 for 70% contribution.`})
|
|
30504
|
+
Weight?: number;
|
|
30505
|
+
|
|
30506
|
+
@Field({nullable: true})
|
|
30507
|
+
@MaxLength(1000)
|
|
30508
|
+
Notes?: string;
|
|
30509
|
+
|
|
30510
|
+
@Field()
|
|
30511
|
+
@MaxLength(10)
|
|
30512
|
+
_mj__CreatedAt: Date;
|
|
30513
|
+
|
|
30514
|
+
@Field()
|
|
30515
|
+
@MaxLength(10)
|
|
30516
|
+
_mj__UpdatedAt: Date;
|
|
30517
|
+
|
|
30518
|
+
@Field()
|
|
30519
|
+
@MaxLength(100)
|
|
30520
|
+
Model: string;
|
|
30521
|
+
|
|
30522
|
+
@Field()
|
|
30523
|
+
@MaxLength(200)
|
|
30524
|
+
Architecture: string;
|
|
30525
|
+
|
|
30526
|
+
}
|
|
30527
|
+
|
|
30528
|
+
//****************************************************************************
|
|
30529
|
+
// INPUT TYPE for MJ: AI Model Architectures
|
|
30530
|
+
//****************************************************************************
|
|
30531
|
+
@InputType()
|
|
30532
|
+
export class CreateMJAIModelArchitectureInput {
|
|
30533
|
+
@Field({ nullable: true })
|
|
30534
|
+
ID?: string;
|
|
30535
|
+
|
|
30536
|
+
@Field({ nullable: true })
|
|
30537
|
+
ModelID?: string;
|
|
30538
|
+
|
|
30539
|
+
@Field({ nullable: true })
|
|
30540
|
+
ArchitectureID?: string;
|
|
30541
|
+
|
|
30542
|
+
@Field(() => Int, { nullable: true })
|
|
30543
|
+
Rank?: number;
|
|
30544
|
+
|
|
30545
|
+
@Field(() => Float, { nullable: true })
|
|
30546
|
+
Weight: number | null;
|
|
30547
|
+
|
|
30548
|
+
@Field({ nullable: true })
|
|
30549
|
+
Notes: string | null;
|
|
30550
|
+
}
|
|
30551
|
+
|
|
30552
|
+
|
|
30553
|
+
//****************************************************************************
|
|
30554
|
+
// INPUT TYPE for MJ: AI Model Architectures
|
|
30555
|
+
//****************************************************************************
|
|
30556
|
+
@InputType()
|
|
30557
|
+
export class UpdateMJAIModelArchitectureInput {
|
|
30558
|
+
@Field()
|
|
30559
|
+
ID: string;
|
|
30560
|
+
|
|
30561
|
+
@Field({ nullable: true })
|
|
30562
|
+
ModelID?: string;
|
|
30563
|
+
|
|
30564
|
+
@Field({ nullable: true })
|
|
30565
|
+
ArchitectureID?: string;
|
|
30566
|
+
|
|
30567
|
+
@Field(() => Int, { nullable: true })
|
|
30568
|
+
Rank?: number;
|
|
30569
|
+
|
|
30570
|
+
@Field(() => Float, { nullable: true })
|
|
30571
|
+
Weight?: number | null;
|
|
30572
|
+
|
|
30573
|
+
@Field({ nullable: true })
|
|
30574
|
+
Notes?: string | null;
|
|
30575
|
+
|
|
30576
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
30577
|
+
OldValues___?: KeyValuePairInput[];
|
|
30578
|
+
}
|
|
30579
|
+
|
|
30580
|
+
//****************************************************************************
|
|
30581
|
+
// RESOLVER for MJ: AI Model Architectures
|
|
30582
|
+
//****************************************************************************
|
|
30583
|
+
@ObjectType()
|
|
30584
|
+
export class RunMJAIModelArchitectureViewResult {
|
|
30585
|
+
@Field(() => [MJAIModelArchitecture_])
|
|
30586
|
+
Results: MJAIModelArchitecture_[];
|
|
30587
|
+
|
|
30588
|
+
@Field(() => String, {nullable: true})
|
|
30589
|
+
UserViewRunID?: string;
|
|
30590
|
+
|
|
30591
|
+
@Field(() => Int, {nullable: true})
|
|
30592
|
+
RowCount: number;
|
|
30593
|
+
|
|
30594
|
+
@Field(() => Int, {nullable: true})
|
|
30595
|
+
TotalRowCount: number;
|
|
30596
|
+
|
|
30597
|
+
@Field(() => Int, {nullable: true})
|
|
30598
|
+
ExecutionTime: number;
|
|
30599
|
+
|
|
30600
|
+
@Field({nullable: true})
|
|
30601
|
+
ErrorMessage?: string;
|
|
30602
|
+
|
|
30603
|
+
@Field(() => Boolean, {nullable: false})
|
|
30604
|
+
Success: boolean;
|
|
30605
|
+
}
|
|
30606
|
+
|
|
30607
|
+
@Resolver(MJAIModelArchitecture_)
|
|
30608
|
+
export class MJAIModelArchitectureResolver extends ResolverBase {
|
|
30609
|
+
@Query(() => RunMJAIModelArchitectureViewResult)
|
|
30610
|
+
async RunMJAIModelArchitectureViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30611
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30612
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
30613
|
+
}
|
|
30614
|
+
|
|
30615
|
+
@Query(() => RunMJAIModelArchitectureViewResult)
|
|
30616
|
+
async RunMJAIModelArchitectureViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30617
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30618
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
30619
|
+
}
|
|
30620
|
+
|
|
30621
|
+
@Query(() => RunMJAIModelArchitectureViewResult)
|
|
30622
|
+
async RunMJAIModelArchitectureDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30623
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30624
|
+
input.EntityName = 'MJ: AI Model Architectures';
|
|
30625
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
30626
|
+
}
|
|
30627
|
+
@Query(() => MJAIModelArchitecture_, { nullable: true })
|
|
30628
|
+
async MJAIModelArchitecture(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIModelArchitecture_ | null> {
|
|
30629
|
+
this.CheckUserReadPermissions('MJ: AI Model Architectures', userPayload);
|
|
30630
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30631
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30632
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelArchitectures] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Architectures', userPayload, EntityPermissionType.Read, 'AND');
|
|
30633
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
30634
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Model Architectures', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
30635
|
+
return result;
|
|
30636
|
+
}
|
|
30637
|
+
|
|
30638
|
+
@Mutation(() => MJAIModelArchitecture_)
|
|
30639
|
+
async CreateMJAIModelArchitecture(
|
|
30640
|
+
@Arg('input', () => CreateMJAIModelArchitectureInput) input: CreateMJAIModelArchitectureInput,
|
|
30641
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
30642
|
+
@PubSub() pubSub: PubSubEngine
|
|
30643
|
+
) {
|
|
30644
|
+
const provider = GetReadWriteProvider(providers);
|
|
30645
|
+
return this.CreateRecord('MJ: AI Model Architectures', input, provider, userPayload, pubSub)
|
|
30646
|
+
}
|
|
30647
|
+
|
|
30648
|
+
@Mutation(() => MJAIModelArchitecture_)
|
|
30649
|
+
async UpdateMJAIModelArchitecture(
|
|
30650
|
+
@Arg('input', () => UpdateMJAIModelArchitectureInput) input: UpdateMJAIModelArchitectureInput,
|
|
30651
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
30652
|
+
@PubSub() pubSub: PubSubEngine
|
|
30653
|
+
) {
|
|
30654
|
+
const provider = GetReadWriteProvider(providers);
|
|
30655
|
+
return this.UpdateRecord('MJ: AI Model Architectures', input, provider, userPayload, pubSub);
|
|
30656
|
+
}
|
|
30657
|
+
|
|
30658
|
+
@Mutation(() => MJAIModelArchitecture_)
|
|
30659
|
+
async DeleteMJAIModelArchitecture(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30660
|
+
const provider = GetReadWriteProvider(providers);
|
|
30661
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
30662
|
+
return this.DeleteRecord('MJ: AI Model Architectures', key, options, provider, userPayload, pubSub);
|
|
30663
|
+
}
|
|
30664
|
+
|
|
30665
|
+
}
|
|
30666
|
+
|
|
29521
30667
|
//****************************************************************************
|
|
29522
30668
|
// ENTITY CLASS for MJ: AI Model Costs
|
|
29523
30669
|
//****************************************************************************
|
|
@@ -29779,6 +30925,236 @@ export class MJAIModelCostResolver extends ResolverBase {
|
|
|
29779
30925
|
|
|
29780
30926
|
}
|
|
29781
30927
|
|
|
30928
|
+
//****************************************************************************
|
|
30929
|
+
// ENTITY CLASS for MJ: AI Model Modalities
|
|
30930
|
+
//****************************************************************************
|
|
30931
|
+
@ObjectType({ description: `Junction table linking AI models to their supported input and output modalities with model-specific configuration. Used to extend beyond the default modalities inherited from AIModelType.` })
|
|
30932
|
+
export class MJAIModelModality_ {
|
|
30933
|
+
@Field()
|
|
30934
|
+
@MaxLength(16)
|
|
30935
|
+
ID: string;
|
|
30936
|
+
|
|
30937
|
+
@Field()
|
|
30938
|
+
@MaxLength(16)
|
|
30939
|
+
ModelID: string;
|
|
30940
|
+
|
|
30941
|
+
@Field()
|
|
30942
|
+
@MaxLength(16)
|
|
30943
|
+
ModalityID: string;
|
|
30944
|
+
|
|
30945
|
+
@Field({description: `Whether this is an Input or Output modality for the model.`})
|
|
30946
|
+
@MaxLength(20)
|
|
30947
|
+
Direction: string;
|
|
30948
|
+
|
|
30949
|
+
@Field(() => Boolean, {description: `Whether this modality is supported. Can be set to FALSE to explicitly disable an inherited modality.`})
|
|
30950
|
+
IsSupported: boolean;
|
|
30951
|
+
|
|
30952
|
+
@Field(() => Boolean, {description: `For input modalities: whether this modality is required (e.g., text is usually required for LLMs). For outputs: not typically applicable.`})
|
|
30953
|
+
IsRequired: boolean;
|
|
30954
|
+
|
|
30955
|
+
@Field({nullable: true, description: `Comma-separated list of supported file formats/extensions (e.g., png,jpg,webp,gif for images or mp3,wav,m4a for audio).`})
|
|
30956
|
+
@MaxLength(1000)
|
|
30957
|
+
SupportedFormats?: string;
|
|
30958
|
+
|
|
30959
|
+
@Field(() => Int, {nullable: true, description: `Model-specific maximum size in bytes. Overrides AIModality.DefaultMaxSizeBytes. NULL means use system default.`})
|
|
30960
|
+
MaxSizeBytes?: number;
|
|
30961
|
+
|
|
30962
|
+
@Field(() => Int, {nullable: true, description: `Model-specific maximum count per message. Overrides AIModality.DefaultMaxCountPerMessage. NULL means use system default.`})
|
|
30963
|
+
MaxCountPerMessage?: number;
|
|
30964
|
+
|
|
30965
|
+
@Field(() => Int, {nullable: true, description: `For image/video modalities: maximum dimension (width or height) in pixels supported by this model.`})
|
|
30966
|
+
MaxDimension?: number;
|
|
30967
|
+
|
|
30968
|
+
@Field({nullable: true, description: `Additional notes or documentation about this model-modality configuration.`})
|
|
30969
|
+
Comments?: string;
|
|
30970
|
+
|
|
30971
|
+
@Field()
|
|
30972
|
+
@MaxLength(10)
|
|
30973
|
+
_mj__CreatedAt: Date;
|
|
30974
|
+
|
|
30975
|
+
@Field()
|
|
30976
|
+
@MaxLength(10)
|
|
30977
|
+
_mj__UpdatedAt: Date;
|
|
30978
|
+
|
|
30979
|
+
@Field()
|
|
30980
|
+
@MaxLength(100)
|
|
30981
|
+
Model: string;
|
|
30982
|
+
|
|
30983
|
+
@Field()
|
|
30984
|
+
@MaxLength(100)
|
|
30985
|
+
Modality: string;
|
|
30986
|
+
|
|
30987
|
+
}
|
|
30988
|
+
|
|
30989
|
+
//****************************************************************************
|
|
30990
|
+
// INPUT TYPE for MJ: AI Model Modalities
|
|
30991
|
+
//****************************************************************************
|
|
30992
|
+
@InputType()
|
|
30993
|
+
export class CreateMJAIModelModalityInput {
|
|
30994
|
+
@Field({ nullable: true })
|
|
30995
|
+
ID?: string;
|
|
30996
|
+
|
|
30997
|
+
@Field({ nullable: true })
|
|
30998
|
+
ModelID?: string;
|
|
30999
|
+
|
|
31000
|
+
@Field({ nullable: true })
|
|
31001
|
+
ModalityID?: string;
|
|
31002
|
+
|
|
31003
|
+
@Field({ nullable: true })
|
|
31004
|
+
Direction?: string;
|
|
31005
|
+
|
|
31006
|
+
@Field(() => Boolean, { nullable: true })
|
|
31007
|
+
IsSupported?: boolean;
|
|
31008
|
+
|
|
31009
|
+
@Field(() => Boolean, { nullable: true })
|
|
31010
|
+
IsRequired?: boolean;
|
|
31011
|
+
|
|
31012
|
+
@Field({ nullable: true })
|
|
31013
|
+
SupportedFormats: string | null;
|
|
31014
|
+
|
|
31015
|
+
@Field(() => Int, { nullable: true })
|
|
31016
|
+
MaxSizeBytes: number | null;
|
|
31017
|
+
|
|
31018
|
+
@Field(() => Int, { nullable: true })
|
|
31019
|
+
MaxCountPerMessage: number | null;
|
|
31020
|
+
|
|
31021
|
+
@Field(() => Int, { nullable: true })
|
|
31022
|
+
MaxDimension: number | null;
|
|
31023
|
+
|
|
31024
|
+
@Field({ nullable: true })
|
|
31025
|
+
Comments: string | null;
|
|
31026
|
+
}
|
|
31027
|
+
|
|
31028
|
+
|
|
31029
|
+
//****************************************************************************
|
|
31030
|
+
// INPUT TYPE for MJ: AI Model Modalities
|
|
31031
|
+
//****************************************************************************
|
|
31032
|
+
@InputType()
|
|
31033
|
+
export class UpdateMJAIModelModalityInput {
|
|
31034
|
+
@Field()
|
|
31035
|
+
ID: string;
|
|
31036
|
+
|
|
31037
|
+
@Field({ nullable: true })
|
|
31038
|
+
ModelID?: string;
|
|
31039
|
+
|
|
31040
|
+
@Field({ nullable: true })
|
|
31041
|
+
ModalityID?: string;
|
|
31042
|
+
|
|
31043
|
+
@Field({ nullable: true })
|
|
31044
|
+
Direction?: string;
|
|
31045
|
+
|
|
31046
|
+
@Field(() => Boolean, { nullable: true })
|
|
31047
|
+
IsSupported?: boolean;
|
|
31048
|
+
|
|
31049
|
+
@Field(() => Boolean, { nullable: true })
|
|
31050
|
+
IsRequired?: boolean;
|
|
31051
|
+
|
|
31052
|
+
@Field({ nullable: true })
|
|
31053
|
+
SupportedFormats?: string | null;
|
|
31054
|
+
|
|
31055
|
+
@Field(() => Int, { nullable: true })
|
|
31056
|
+
MaxSizeBytes?: number | null;
|
|
31057
|
+
|
|
31058
|
+
@Field(() => Int, { nullable: true })
|
|
31059
|
+
MaxCountPerMessage?: number | null;
|
|
31060
|
+
|
|
31061
|
+
@Field(() => Int, { nullable: true })
|
|
31062
|
+
MaxDimension?: number | null;
|
|
31063
|
+
|
|
31064
|
+
@Field({ nullable: true })
|
|
31065
|
+
Comments?: string | null;
|
|
31066
|
+
|
|
31067
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
31068
|
+
OldValues___?: KeyValuePairInput[];
|
|
31069
|
+
}
|
|
31070
|
+
|
|
31071
|
+
//****************************************************************************
|
|
31072
|
+
// RESOLVER for MJ: AI Model Modalities
|
|
31073
|
+
//****************************************************************************
|
|
31074
|
+
@ObjectType()
|
|
31075
|
+
export class RunMJAIModelModalityViewResult {
|
|
31076
|
+
@Field(() => [MJAIModelModality_])
|
|
31077
|
+
Results: MJAIModelModality_[];
|
|
31078
|
+
|
|
31079
|
+
@Field(() => String, {nullable: true})
|
|
31080
|
+
UserViewRunID?: string;
|
|
31081
|
+
|
|
31082
|
+
@Field(() => Int, {nullable: true})
|
|
31083
|
+
RowCount: number;
|
|
31084
|
+
|
|
31085
|
+
@Field(() => Int, {nullable: true})
|
|
31086
|
+
TotalRowCount: number;
|
|
31087
|
+
|
|
31088
|
+
@Field(() => Int, {nullable: true})
|
|
31089
|
+
ExecutionTime: number;
|
|
31090
|
+
|
|
31091
|
+
@Field({nullable: true})
|
|
31092
|
+
ErrorMessage?: string;
|
|
31093
|
+
|
|
31094
|
+
@Field(() => Boolean, {nullable: false})
|
|
31095
|
+
Success: boolean;
|
|
31096
|
+
}
|
|
31097
|
+
|
|
31098
|
+
@Resolver(MJAIModelModality_)
|
|
31099
|
+
export class MJAIModelModalityResolver extends ResolverBase {
|
|
31100
|
+
@Query(() => RunMJAIModelModalityViewResult)
|
|
31101
|
+
async RunMJAIModelModalityViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31102
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31103
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
31104
|
+
}
|
|
31105
|
+
|
|
31106
|
+
@Query(() => RunMJAIModelModalityViewResult)
|
|
31107
|
+
async RunMJAIModelModalityViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31108
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31109
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
31110
|
+
}
|
|
31111
|
+
|
|
31112
|
+
@Query(() => RunMJAIModelModalityViewResult)
|
|
31113
|
+
async RunMJAIModelModalityDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31114
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31115
|
+
input.EntityName = 'MJ: AI Model Modalities';
|
|
31116
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
31117
|
+
}
|
|
31118
|
+
@Query(() => MJAIModelModality_, { nullable: true })
|
|
31119
|
+
async MJAIModelModality(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIModelModality_ | null> {
|
|
31120
|
+
this.CheckUserReadPermissions('MJ: AI Model Modalities', userPayload);
|
|
31121
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31122
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
31123
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelModalities] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Modalities', userPayload, EntityPermissionType.Read, 'AND');
|
|
31124
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
31125
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Model Modalities', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
31126
|
+
return result;
|
|
31127
|
+
}
|
|
31128
|
+
|
|
31129
|
+
@Mutation(() => MJAIModelModality_)
|
|
31130
|
+
async CreateMJAIModelModality(
|
|
31131
|
+
@Arg('input', () => CreateMJAIModelModalityInput) input: CreateMJAIModelModalityInput,
|
|
31132
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
31133
|
+
@PubSub() pubSub: PubSubEngine
|
|
31134
|
+
) {
|
|
31135
|
+
const provider = GetReadWriteProvider(providers);
|
|
31136
|
+
return this.CreateRecord('MJ: AI Model Modalities', input, provider, userPayload, pubSub)
|
|
31137
|
+
}
|
|
31138
|
+
|
|
31139
|
+
@Mutation(() => MJAIModelModality_)
|
|
31140
|
+
async UpdateMJAIModelModality(
|
|
31141
|
+
@Arg('input', () => UpdateMJAIModelModalityInput) input: UpdateMJAIModelModalityInput,
|
|
31142
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
31143
|
+
@PubSub() pubSub: PubSubEngine
|
|
31144
|
+
) {
|
|
31145
|
+
const provider = GetReadWriteProvider(providers);
|
|
31146
|
+
return this.UpdateRecord('MJ: AI Model Modalities', input, provider, userPayload, pubSub);
|
|
31147
|
+
}
|
|
31148
|
+
|
|
31149
|
+
@Mutation(() => MJAIModelModality_)
|
|
31150
|
+
async DeleteMJAIModelModality(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31151
|
+
const provider = GetReadWriteProvider(providers);
|
|
31152
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
31153
|
+
return this.DeleteRecord('MJ: AI Model Modalities', key, options, provider, userPayload, pubSub);
|
|
31154
|
+
}
|
|
31155
|
+
|
|
31156
|
+
}
|
|
31157
|
+
|
|
29782
31158
|
//****************************************************************************
|
|
29783
31159
|
// ENTITY CLASS for MJ: AI Model Price Types
|
|
29784
31160
|
//****************************************************************************
|
|
@@ -36215,6 +37591,258 @@ export class MJConversationDetailArtifactResolver extends ResolverBase {
|
|
|
36215
37591
|
|
|
36216
37592
|
}
|
|
36217
37593
|
|
|
37594
|
+
//****************************************************************************
|
|
37595
|
+
// ENTITY CLASS for MJ: Conversation Detail Attachments
|
|
37596
|
+
//****************************************************************************
|
|
37597
|
+
@ObjectType({ description: `Stores attachments (images, videos, audio, documents) for conversation messages. Supports both inline base64 storage for small files and reference to MJStorage for large files.` })
|
|
37598
|
+
export class MJConversationDetailAttachment_ {
|
|
37599
|
+
@Field()
|
|
37600
|
+
@MaxLength(16)
|
|
37601
|
+
ID: string;
|
|
37602
|
+
|
|
37603
|
+
@Field()
|
|
37604
|
+
@MaxLength(16)
|
|
37605
|
+
ConversationDetailID: string;
|
|
37606
|
+
|
|
37607
|
+
@Field({description: `The modality type of this attachment (Image, Audio, Video, File, etc.). References the AIModality table.`})
|
|
37608
|
+
@MaxLength(16)
|
|
37609
|
+
ModalityID: string;
|
|
37610
|
+
|
|
37611
|
+
@Field({description: `MIME type of the attachment (e.g., image/png, video/mp4, audio/mp3).`})
|
|
37612
|
+
@MaxLength(200)
|
|
37613
|
+
MimeType: string;
|
|
37614
|
+
|
|
37615
|
+
@Field({nullable: true, description: `Original filename of the attachment. Supports long cloud storage paths up to 4000 characters.`})
|
|
37616
|
+
@MaxLength(8000)
|
|
37617
|
+
FileName?: string;
|
|
37618
|
+
|
|
37619
|
+
@Field(() => Int, {description: `Size of the attachment in bytes.`})
|
|
37620
|
+
FileSizeBytes: number;
|
|
37621
|
+
|
|
37622
|
+
@Field(() => Int, {nullable: true, description: `Width in pixels for images and videos.`})
|
|
37623
|
+
Width?: number;
|
|
37624
|
+
|
|
37625
|
+
@Field(() => Int, {nullable: true, description: `Height in pixels for images and videos.`})
|
|
37626
|
+
Height?: number;
|
|
37627
|
+
|
|
37628
|
+
@Field(() => Int, {nullable: true, description: `Duration in seconds for audio and video files.`})
|
|
37629
|
+
DurationSeconds?: number;
|
|
37630
|
+
|
|
37631
|
+
@Field({nullable: true, description: `Base64-encoded file data for small attachments stored inline. Mutually exclusive with FileID - exactly one must be populated.`})
|
|
37632
|
+
InlineData?: string;
|
|
37633
|
+
|
|
37634
|
+
@Field({nullable: true, description: `Reference to File entity for large attachments stored in MJStorage. Mutually exclusive with InlineData - exactly one must be populated.`})
|
|
37635
|
+
@MaxLength(16)
|
|
37636
|
+
FileID?: string;
|
|
37637
|
+
|
|
37638
|
+
@Field(() => Int, {description: `Display order for multiple attachments in a message. Lower numbers appear first.`})
|
|
37639
|
+
DisplayOrder: number;
|
|
37640
|
+
|
|
37641
|
+
@Field({nullable: true, description: `Base64-encoded thumbnail image for quick preview display. Max 200px on longest side.`})
|
|
37642
|
+
ThumbnailBase64?: string;
|
|
37643
|
+
|
|
37644
|
+
@Field()
|
|
37645
|
+
@MaxLength(10)
|
|
37646
|
+
_mj__CreatedAt: Date;
|
|
37647
|
+
|
|
37648
|
+
@Field()
|
|
37649
|
+
@MaxLength(10)
|
|
37650
|
+
_mj__UpdatedAt: Date;
|
|
37651
|
+
|
|
37652
|
+
@Field()
|
|
37653
|
+
ConversationDetail: string;
|
|
37654
|
+
|
|
37655
|
+
@Field()
|
|
37656
|
+
@MaxLength(100)
|
|
37657
|
+
Modality: string;
|
|
37658
|
+
|
|
37659
|
+
@Field({nullable: true})
|
|
37660
|
+
@MaxLength(1000)
|
|
37661
|
+
File?: string;
|
|
37662
|
+
|
|
37663
|
+
}
|
|
37664
|
+
|
|
37665
|
+
//****************************************************************************
|
|
37666
|
+
// INPUT TYPE for MJ: Conversation Detail Attachments
|
|
37667
|
+
//****************************************************************************
|
|
37668
|
+
@InputType()
|
|
37669
|
+
export class CreateMJConversationDetailAttachmentInput {
|
|
37670
|
+
@Field({ nullable: true })
|
|
37671
|
+
ID?: string;
|
|
37672
|
+
|
|
37673
|
+
@Field({ nullable: true })
|
|
37674
|
+
ConversationDetailID?: string;
|
|
37675
|
+
|
|
37676
|
+
@Field({ nullable: true })
|
|
37677
|
+
ModalityID?: string;
|
|
37678
|
+
|
|
37679
|
+
@Field({ nullable: true })
|
|
37680
|
+
MimeType?: string;
|
|
37681
|
+
|
|
37682
|
+
@Field({ nullable: true })
|
|
37683
|
+
FileName: string | null;
|
|
37684
|
+
|
|
37685
|
+
@Field(() => Int, { nullable: true })
|
|
37686
|
+
FileSizeBytes?: number;
|
|
37687
|
+
|
|
37688
|
+
@Field(() => Int, { nullable: true })
|
|
37689
|
+
Width: number | null;
|
|
37690
|
+
|
|
37691
|
+
@Field(() => Int, { nullable: true })
|
|
37692
|
+
Height: number | null;
|
|
37693
|
+
|
|
37694
|
+
@Field(() => Int, { nullable: true })
|
|
37695
|
+
DurationSeconds: number | null;
|
|
37696
|
+
|
|
37697
|
+
@Field({ nullable: true })
|
|
37698
|
+
InlineData: string | null;
|
|
37699
|
+
|
|
37700
|
+
@Field({ nullable: true })
|
|
37701
|
+
FileID: string | null;
|
|
37702
|
+
|
|
37703
|
+
@Field(() => Int, { nullable: true })
|
|
37704
|
+
DisplayOrder?: number;
|
|
37705
|
+
|
|
37706
|
+
@Field({ nullable: true })
|
|
37707
|
+
ThumbnailBase64: string | null;
|
|
37708
|
+
}
|
|
37709
|
+
|
|
37710
|
+
|
|
37711
|
+
//****************************************************************************
|
|
37712
|
+
// INPUT TYPE for MJ: Conversation Detail Attachments
|
|
37713
|
+
//****************************************************************************
|
|
37714
|
+
@InputType()
|
|
37715
|
+
export class UpdateMJConversationDetailAttachmentInput {
|
|
37716
|
+
@Field()
|
|
37717
|
+
ID: string;
|
|
37718
|
+
|
|
37719
|
+
@Field({ nullable: true })
|
|
37720
|
+
ConversationDetailID?: string;
|
|
37721
|
+
|
|
37722
|
+
@Field({ nullable: true })
|
|
37723
|
+
ModalityID?: string;
|
|
37724
|
+
|
|
37725
|
+
@Field({ nullable: true })
|
|
37726
|
+
MimeType?: string;
|
|
37727
|
+
|
|
37728
|
+
@Field({ nullable: true })
|
|
37729
|
+
FileName?: string | null;
|
|
37730
|
+
|
|
37731
|
+
@Field(() => Int, { nullable: true })
|
|
37732
|
+
FileSizeBytes?: number;
|
|
37733
|
+
|
|
37734
|
+
@Field(() => Int, { nullable: true })
|
|
37735
|
+
Width?: number | null;
|
|
37736
|
+
|
|
37737
|
+
@Field(() => Int, { nullable: true })
|
|
37738
|
+
Height?: number | null;
|
|
37739
|
+
|
|
37740
|
+
@Field(() => Int, { nullable: true })
|
|
37741
|
+
DurationSeconds?: number | null;
|
|
37742
|
+
|
|
37743
|
+
@Field({ nullable: true })
|
|
37744
|
+
InlineData?: string | null;
|
|
37745
|
+
|
|
37746
|
+
@Field({ nullable: true })
|
|
37747
|
+
FileID?: string | null;
|
|
37748
|
+
|
|
37749
|
+
@Field(() => Int, { nullable: true })
|
|
37750
|
+
DisplayOrder?: number;
|
|
37751
|
+
|
|
37752
|
+
@Field({ nullable: true })
|
|
37753
|
+
ThumbnailBase64?: string | null;
|
|
37754
|
+
|
|
37755
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
37756
|
+
OldValues___?: KeyValuePairInput[];
|
|
37757
|
+
}
|
|
37758
|
+
|
|
37759
|
+
//****************************************************************************
|
|
37760
|
+
// RESOLVER for MJ: Conversation Detail Attachments
|
|
37761
|
+
//****************************************************************************
|
|
37762
|
+
@ObjectType()
|
|
37763
|
+
export class RunMJConversationDetailAttachmentViewResult {
|
|
37764
|
+
@Field(() => [MJConversationDetailAttachment_])
|
|
37765
|
+
Results: MJConversationDetailAttachment_[];
|
|
37766
|
+
|
|
37767
|
+
@Field(() => String, {nullable: true})
|
|
37768
|
+
UserViewRunID?: string;
|
|
37769
|
+
|
|
37770
|
+
@Field(() => Int, {nullable: true})
|
|
37771
|
+
RowCount: number;
|
|
37772
|
+
|
|
37773
|
+
@Field(() => Int, {nullable: true})
|
|
37774
|
+
TotalRowCount: number;
|
|
37775
|
+
|
|
37776
|
+
@Field(() => Int, {nullable: true})
|
|
37777
|
+
ExecutionTime: number;
|
|
37778
|
+
|
|
37779
|
+
@Field({nullable: true})
|
|
37780
|
+
ErrorMessage?: string;
|
|
37781
|
+
|
|
37782
|
+
@Field(() => Boolean, {nullable: false})
|
|
37783
|
+
Success: boolean;
|
|
37784
|
+
}
|
|
37785
|
+
|
|
37786
|
+
@Resolver(MJConversationDetailAttachment_)
|
|
37787
|
+
export class MJConversationDetailAttachmentResolver extends ResolverBase {
|
|
37788
|
+
@Query(() => RunMJConversationDetailAttachmentViewResult)
|
|
37789
|
+
async RunMJConversationDetailAttachmentViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
37790
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
37791
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
37792
|
+
}
|
|
37793
|
+
|
|
37794
|
+
@Query(() => RunMJConversationDetailAttachmentViewResult)
|
|
37795
|
+
async RunMJConversationDetailAttachmentViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
37796
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
37797
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
37798
|
+
}
|
|
37799
|
+
|
|
37800
|
+
@Query(() => RunMJConversationDetailAttachmentViewResult)
|
|
37801
|
+
async RunMJConversationDetailAttachmentDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
37802
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
37803
|
+
input.EntityName = 'MJ: Conversation Detail Attachments';
|
|
37804
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
37805
|
+
}
|
|
37806
|
+
@Query(() => MJConversationDetailAttachment_, { nullable: true })
|
|
37807
|
+
async MJConversationDetailAttachment(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJConversationDetailAttachment_ | null> {
|
|
37808
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Attachments', userPayload);
|
|
37809
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
37810
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
37811
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailAttachments] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Attachments', userPayload, EntityPermissionType.Read, 'AND');
|
|
37812
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
37813
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Conversation Detail Attachments', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
|
|
37814
|
+
return result;
|
|
37815
|
+
}
|
|
37816
|
+
|
|
37817
|
+
@Mutation(() => MJConversationDetailAttachment_)
|
|
37818
|
+
async CreateMJConversationDetailAttachment(
|
|
37819
|
+
@Arg('input', () => CreateMJConversationDetailAttachmentInput) input: CreateMJConversationDetailAttachmentInput,
|
|
37820
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
37821
|
+
@PubSub() pubSub: PubSubEngine
|
|
37822
|
+
) {
|
|
37823
|
+
const provider = GetReadWriteProvider(providers);
|
|
37824
|
+
return this.CreateRecord('MJ: Conversation Detail Attachments', input, provider, userPayload, pubSub)
|
|
37825
|
+
}
|
|
37826
|
+
|
|
37827
|
+
@Mutation(() => MJConversationDetailAttachment_)
|
|
37828
|
+
async UpdateMJConversationDetailAttachment(
|
|
37829
|
+
@Arg('input', () => UpdateMJConversationDetailAttachmentInput) input: UpdateMJConversationDetailAttachmentInput,
|
|
37830
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
37831
|
+
@PubSub() pubSub: PubSubEngine
|
|
37832
|
+
) {
|
|
37833
|
+
const provider = GetReadWriteProvider(providers);
|
|
37834
|
+
return this.UpdateRecord('MJ: Conversation Detail Attachments', input, provider, userPayload, pubSub);
|
|
37835
|
+
}
|
|
37836
|
+
|
|
37837
|
+
@Mutation(() => MJConversationDetailAttachment_)
|
|
37838
|
+
async DeleteMJConversationDetailAttachment(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
37839
|
+
const provider = GetReadWriteProvider(providers);
|
|
37840
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
37841
|
+
return this.DeleteRecord('MJ: Conversation Detail Attachments', key, options, provider, userPayload, pubSub);
|
|
37842
|
+
}
|
|
37843
|
+
|
|
37844
|
+
}
|
|
37845
|
+
|
|
36218
37846
|
//****************************************************************************
|
|
36219
37847
|
// ENTITY CLASS for MJ: Conversation Detail Ratings
|
|
36220
37848
|
//****************************************************************************
|
|
@@ -38125,12 +39753,12 @@ export class MJEnvironment_ {
|
|
|
38125
39753
|
@Field(() => [MJArtifact_])
|
|
38126
39754
|
MJ_Artifacts_EnvironmentIDArray: MJArtifact_[]; // Link to MJ_Artifacts
|
|
38127
39755
|
|
|
38128
|
-
@Field(() => [MJDashboard_])
|
|
38129
|
-
Dashboards_EnvironmentIDArray: MJDashboard_[]; // Link to Dashboards
|
|
38130
|
-
|
|
38131
39756
|
@Field(() => [MJTask_])
|
|
38132
39757
|
MJ_Tasks_EnvironmentIDArray: MJTask_[]; // Link to MJ_Tasks
|
|
38133
39758
|
|
|
39759
|
+
@Field(() => [MJDashboard_])
|
|
39760
|
+
Dashboards_EnvironmentIDArray: MJDashboard_[]; // Link to Dashboards
|
|
39761
|
+
|
|
38134
39762
|
@Field(() => [MJReport_])
|
|
38135
39763
|
Reports_EnvironmentIDArray: MJReport_[]; // Link to Reports
|
|
38136
39764
|
|
|
@@ -38276,25 +39904,25 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
38276
39904
|
return result;
|
|
38277
39905
|
}
|
|
38278
39906
|
|
|
38279
|
-
@FieldResolver(() => [
|
|
38280
|
-
async
|
|
38281
|
-
this.CheckUserReadPermissions('
|
|
39907
|
+
@FieldResolver(() => [MJTask_])
|
|
39908
|
+
async MJ_Tasks_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39909
|
+
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
38282
39910
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38283
39911
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
38284
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
39912
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTasks] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
38285
39913
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
38286
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('
|
|
39914
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows, this.GetUserFromPayload(userPayload));
|
|
38287
39915
|
return result;
|
|
38288
39916
|
}
|
|
38289
39917
|
|
|
38290
|
-
@FieldResolver(() => [
|
|
38291
|
-
async
|
|
38292
|
-
this.CheckUserReadPermissions('
|
|
39918
|
+
@FieldResolver(() => [MJDashboard_])
|
|
39919
|
+
async Dashboards_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39920
|
+
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
38293
39921
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38294
39922
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
38295
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
39923
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboards] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
38296
39924
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
38297
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('
|
|
39925
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('Dashboards', rows, this.GetUserFromPayload(userPayload));
|
|
38298
39926
|
return result;
|
|
38299
39927
|
}
|
|
38300
39928
|
|
|
@@ -41521,7 +43149,7 @@ export class MJTestRun_ {
|
|
|
41521
43149
|
@Field(() => Int, {nullable: true, description: `Execution sequence within the suite run. Indicates order of execution for tests in the same suite.`})
|
|
41522
43150
|
Sequence?: number;
|
|
41523
43151
|
|
|
41524
|
-
@Field({nullable: true, description: `
|
|
43152
|
+
@Field({nullable: true, description: `Optional sub-category or variant label for the test target. Use this to distinguish between different test scenarios within the same entity type (e.g., "Summarization", "Classification", "Code Review" for AI Agent tests). The entity type itself should be specified via TargetLogEntityID.`})
|
|
41525
43153
|
@MaxLength(200)
|
|
41526
43154
|
TargetType?: string;
|
|
41527
43155
|
|
|
@@ -41529,7 +43157,7 @@ export class MJTestRun_ {
|
|
|
41529
43157
|
@MaxLength(16)
|
|
41530
43158
|
TargetLogID?: string;
|
|
41531
43159
|
|
|
41532
|
-
@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)`})
|
|
43160
|
+
@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), Timeout (execution exceeded time limit and was cancelled)`})
|
|
41533
43161
|
@MaxLength(40)
|
|
41534
43162
|
Status: string;
|
|
41535
43163
|
|
|
@@ -41582,6 +43210,35 @@ export class MJTestRun_ {
|
|
|
41582
43210
|
@MaxLength(10)
|
|
41583
43211
|
_mj__UpdatedAt: Date;
|
|
41584
43212
|
|
|
43213
|
+
@Field({nullable: true, description: `Detailed execution log capturing status messages, diagnostic output, and driver-specific information streamed during test execution. Format is timestamped log lines.`})
|
|
43214
|
+
Log?: string;
|
|
43215
|
+
|
|
43216
|
+
@Field({nullable: true, description: `JSON array of user-assigned tags/labels for this test run. Used for categorization, filtering, and comparing runs with different configurations. Inherits from parent suite run tags if not explicitly set.`})
|
|
43217
|
+
Tags?: string;
|
|
43218
|
+
|
|
43219
|
+
@Field({nullable: true, description: `Hostname of the machine that executed this test. Used for identifying the execution environment and debugging infrastructure-specific issues.`})
|
|
43220
|
+
@MaxLength(510)
|
|
43221
|
+
MachineName?: string;
|
|
43222
|
+
|
|
43223
|
+
@Field({nullable: true, description: `Unique machine identifier (typically MAC address) for the execution host. Enables deduplication and tracking of test execution across different machines.`})
|
|
43224
|
+
@MaxLength(510)
|
|
43225
|
+
MachineID?: string;
|
|
43226
|
+
|
|
43227
|
+
@Field({nullable: true, description: `Denormalized user name who ran the test. Stored separately from RunByUserID to enable cross-server aggregation where user IDs differ but names remain consistent.`})
|
|
43228
|
+
@MaxLength(510)
|
|
43229
|
+
RunByUserName?: string;
|
|
43230
|
+
|
|
43231
|
+
@Field({nullable: true, description: `Denormalized email address of the user who ran the test. Primary identifier for cross-server aggregation since email addresses are unique across MemberJunction instances.`})
|
|
43232
|
+
@MaxLength(510)
|
|
43233
|
+
RunByUserEmail?: string;
|
|
43234
|
+
|
|
43235
|
+
@Field({nullable: true, description: `JSON object containing extensible execution context: osType, osVersion, nodeVersion, timezone, locale, ipAddress, and CI/CD metadata (ciProvider, pipelineId, buildNumber, branch, prNumber). Allows detailed environment tracking without schema changes.`})
|
|
43236
|
+
RunContextDetails?: string;
|
|
43237
|
+
|
|
43238
|
+
@Field({nullable: true, description: `Foreign key to Entity table identifying the type of entity referenced by TargetLogID. When populated, TargetLogID is a record ID in this entity. Used for linking test runs to AI Agent Runs, Workflow Runs, or other entity types being tested.`})
|
|
43239
|
+
@MaxLength(16)
|
|
43240
|
+
TargetLogEntityID?: string;
|
|
43241
|
+
|
|
41585
43242
|
@Field()
|
|
41586
43243
|
@MaxLength(510)
|
|
41587
43244
|
Test: string;
|
|
@@ -41594,6 +43251,10 @@ export class MJTestRun_ {
|
|
|
41594
43251
|
@MaxLength(200)
|
|
41595
43252
|
RunByUser: string;
|
|
41596
43253
|
|
|
43254
|
+
@Field({nullable: true})
|
|
43255
|
+
@MaxLength(510)
|
|
43256
|
+
TargetLogEntity?: string;
|
|
43257
|
+
|
|
41597
43258
|
@Field(() => [MJTestRunFeedback_])
|
|
41598
43259
|
MJ_TestRunFeedbacks_TestRunIDArray: MJTestRunFeedback_[]; // Link to MJ_TestRunFeedbacks
|
|
41599
43260
|
|
|
@@ -41678,6 +43339,30 @@ export class CreateMJTestRunInput {
|
|
|
41678
43339
|
|
|
41679
43340
|
@Field({ nullable: true })
|
|
41680
43341
|
ResultDetails: string | null;
|
|
43342
|
+
|
|
43343
|
+
@Field({ nullable: true })
|
|
43344
|
+
Log: string | null;
|
|
43345
|
+
|
|
43346
|
+
@Field({ nullable: true })
|
|
43347
|
+
Tags: string | null;
|
|
43348
|
+
|
|
43349
|
+
@Field({ nullable: true })
|
|
43350
|
+
MachineName: string | null;
|
|
43351
|
+
|
|
43352
|
+
@Field({ nullable: true })
|
|
43353
|
+
MachineID: string | null;
|
|
43354
|
+
|
|
43355
|
+
@Field({ nullable: true })
|
|
43356
|
+
RunByUserName: string | null;
|
|
43357
|
+
|
|
43358
|
+
@Field({ nullable: true })
|
|
43359
|
+
RunByUserEmail: string | null;
|
|
43360
|
+
|
|
43361
|
+
@Field({ nullable: true })
|
|
43362
|
+
RunContextDetails: string | null;
|
|
43363
|
+
|
|
43364
|
+
@Field({ nullable: true })
|
|
43365
|
+
TargetLogEntityID: string | null;
|
|
41681
43366
|
}
|
|
41682
43367
|
|
|
41683
43368
|
|
|
@@ -41749,6 +43434,30 @@ export class UpdateMJTestRunInput {
|
|
|
41749
43434
|
@Field({ nullable: true })
|
|
41750
43435
|
ResultDetails?: string | null;
|
|
41751
43436
|
|
|
43437
|
+
@Field({ nullable: true })
|
|
43438
|
+
Log?: string | null;
|
|
43439
|
+
|
|
43440
|
+
@Field({ nullable: true })
|
|
43441
|
+
Tags?: string | null;
|
|
43442
|
+
|
|
43443
|
+
@Field({ nullable: true })
|
|
43444
|
+
MachineName?: string | null;
|
|
43445
|
+
|
|
43446
|
+
@Field({ nullable: true })
|
|
43447
|
+
MachineID?: string | null;
|
|
43448
|
+
|
|
43449
|
+
@Field({ nullable: true })
|
|
43450
|
+
RunByUserName?: string | null;
|
|
43451
|
+
|
|
43452
|
+
@Field({ nullable: true })
|
|
43453
|
+
RunByUserEmail?: string | null;
|
|
43454
|
+
|
|
43455
|
+
@Field({ nullable: true })
|
|
43456
|
+
RunContextDetails?: string | null;
|
|
43457
|
+
|
|
43458
|
+
@Field({ nullable: true })
|
|
43459
|
+
TargetLogEntityID?: string | null;
|
|
43460
|
+
|
|
41752
43461
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
41753
43462
|
OldValues___?: KeyValuePairInput[];
|
|
41754
43463
|
}
|
|
@@ -41978,6 +43687,28 @@ export class MJTestSuiteRun_ {
|
|
|
41978
43687
|
@MaxLength(10)
|
|
41979
43688
|
_mj__UpdatedAt: Date;
|
|
41980
43689
|
|
|
43690
|
+
@Field({nullable: true, description: `JSON array of user-assigned tags/labels for this suite run. Used for categorization, filtering, and comparing runs with different configurations (e.g., ["Opus 4.5", "New Prompt v3", "Production Config"]).`})
|
|
43691
|
+
Tags?: string;
|
|
43692
|
+
|
|
43693
|
+
@Field({nullable: true, description: `Hostname of the machine that executed this suite. Used for identifying the execution environment and debugging infrastructure-specific issues.`})
|
|
43694
|
+
@MaxLength(510)
|
|
43695
|
+
MachineName?: string;
|
|
43696
|
+
|
|
43697
|
+
@Field({nullable: true, description: `Unique machine identifier (typically MAC address) for the execution host. Enables deduplication and tracking of suite execution across different machines.`})
|
|
43698
|
+
@MaxLength(510)
|
|
43699
|
+
MachineID?: string;
|
|
43700
|
+
|
|
43701
|
+
@Field({nullable: true, description: `Denormalized user name who ran the suite. Stored separately from RunByUserID to enable cross-server aggregation where user IDs differ but names remain consistent.`})
|
|
43702
|
+
@MaxLength(510)
|
|
43703
|
+
RunByUserName?: string;
|
|
43704
|
+
|
|
43705
|
+
@Field({nullable: true, description: `Denormalized email address of the user who ran the suite. Primary identifier for cross-server aggregation since email addresses are unique across MemberJunction instances.`})
|
|
43706
|
+
@MaxLength(510)
|
|
43707
|
+
RunByUserEmail?: string;
|
|
43708
|
+
|
|
43709
|
+
@Field({nullable: true, description: `JSON object containing extensible execution context: osType, osVersion, nodeVersion, timezone, locale, ipAddress, and CI/CD metadata (ciProvider, pipelineId, buildNumber, branch, prNumber). Allows detailed environment tracking without schema changes.`})
|
|
43710
|
+
RunContextDetails?: string;
|
|
43711
|
+
|
|
41981
43712
|
@Field()
|
|
41982
43713
|
@MaxLength(510)
|
|
41983
43714
|
Suite: string;
|
|
@@ -42055,6 +43786,24 @@ export class CreateMJTestSuiteRunInput {
|
|
|
42055
43786
|
|
|
42056
43787
|
@Field({ nullable: true })
|
|
42057
43788
|
ErrorMessage: string | null;
|
|
43789
|
+
|
|
43790
|
+
@Field({ nullable: true })
|
|
43791
|
+
Tags: string | null;
|
|
43792
|
+
|
|
43793
|
+
@Field({ nullable: true })
|
|
43794
|
+
MachineName: string | null;
|
|
43795
|
+
|
|
43796
|
+
@Field({ nullable: true })
|
|
43797
|
+
MachineID: string | null;
|
|
43798
|
+
|
|
43799
|
+
@Field({ nullable: true })
|
|
43800
|
+
RunByUserName: string | null;
|
|
43801
|
+
|
|
43802
|
+
@Field({ nullable: true })
|
|
43803
|
+
RunByUserEmail: string | null;
|
|
43804
|
+
|
|
43805
|
+
@Field({ nullable: true })
|
|
43806
|
+
RunContextDetails: string | null;
|
|
42058
43807
|
}
|
|
42059
43808
|
|
|
42060
43809
|
|
|
@@ -42123,6 +43872,24 @@ export class UpdateMJTestSuiteRunInput {
|
|
|
42123
43872
|
@Field({ nullable: true })
|
|
42124
43873
|
ErrorMessage?: string | null;
|
|
42125
43874
|
|
|
43875
|
+
@Field({ nullable: true })
|
|
43876
|
+
Tags?: string | null;
|
|
43877
|
+
|
|
43878
|
+
@Field({ nullable: true })
|
|
43879
|
+
MachineName?: string | null;
|
|
43880
|
+
|
|
43881
|
+
@Field({ nullable: true })
|
|
43882
|
+
MachineID?: string | null;
|
|
43883
|
+
|
|
43884
|
+
@Field({ nullable: true })
|
|
43885
|
+
RunByUserName?: string | null;
|
|
43886
|
+
|
|
43887
|
+
@Field({ nullable: true })
|
|
43888
|
+
RunByUserEmail?: string | null;
|
|
43889
|
+
|
|
43890
|
+
@Field({ nullable: true })
|
|
43891
|
+
RunContextDetails?: string | null;
|
|
43892
|
+
|
|
42126
43893
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
42127
43894
|
OldValues___?: KeyValuePairInput[];
|
|
42128
43895
|
}
|
|
@@ -42447,6 +44214,9 @@ export class MJTestSuite_ {
|
|
|
42447
44214
|
@MaxLength(10)
|
|
42448
44215
|
_mj__UpdatedAt: Date;
|
|
42449
44216
|
|
|
44217
|
+
@Field(() => Int, {nullable: true, description: `Maximum total execution time in milliseconds for the entire suite. If NULL, no suite-level timeout applies (individual test timeouts still apply). When exceeded, current test is cancelled and remaining tests are skipped.`})
|
|
44218
|
+
MaxExecutionTimeMS?: number;
|
|
44219
|
+
|
|
42450
44220
|
@Field({nullable: true})
|
|
42451
44221
|
@MaxLength(510)
|
|
42452
44222
|
Parent?: string;
|
|
@@ -42491,6 +44261,9 @@ export class CreateMJTestSuiteInput {
|
|
|
42491
44261
|
|
|
42492
44262
|
@Field({ nullable: true })
|
|
42493
44263
|
Configuration: string | null;
|
|
44264
|
+
|
|
44265
|
+
@Field(() => Int, { nullable: true })
|
|
44266
|
+
MaxExecutionTimeMS: number | null;
|
|
42494
44267
|
}
|
|
42495
44268
|
|
|
42496
44269
|
|
|
@@ -42520,6 +44293,9 @@ export class UpdateMJTestSuiteInput {
|
|
|
42520
44293
|
@Field({ nullable: true })
|
|
42521
44294
|
Configuration?: string | null;
|
|
42522
44295
|
|
|
44296
|
+
@Field(() => Int, { nullable: true })
|
|
44297
|
+
MaxExecutionTimeMS?: number | null;
|
|
44298
|
+
|
|
42523
44299
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
42524
44300
|
OldValues___?: KeyValuePairInput[];
|
|
42525
44301
|
}
|
|
@@ -42895,6 +44671,9 @@ export class MJTest_ {
|
|
|
42895
44671
|
@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.`})
|
|
42896
44672
|
RepeatCount?: number;
|
|
42897
44673
|
|
|
44674
|
+
@Field(() => Int, {nullable: true, description: `Maximum execution time in milliseconds for this test. If NULL, uses default (300000ms = 5 minutes). Can be overridden by Configuration JSON maxExecutionTime field for backward compatibility.`})
|
|
44675
|
+
MaxExecutionTimeMS?: number;
|
|
44676
|
+
|
|
42898
44677
|
@Field()
|
|
42899
44678
|
@MaxLength(200)
|
|
42900
44679
|
Type: string;
|
|
@@ -42950,6 +44729,9 @@ export class CreateMJTestInput {
|
|
|
42950
44729
|
|
|
42951
44730
|
@Field(() => Int, { nullable: true })
|
|
42952
44731
|
RepeatCount: number | null;
|
|
44732
|
+
|
|
44733
|
+
@Field(() => Int, { nullable: true })
|
|
44734
|
+
MaxExecutionTimeMS: number | null;
|
|
42953
44735
|
}
|
|
42954
44736
|
|
|
42955
44737
|
|
|
@@ -42997,6 +44779,9 @@ export class UpdateMJTestInput {
|
|
|
42997
44779
|
@Field(() => Int, { nullable: true })
|
|
42998
44780
|
RepeatCount?: number | null;
|
|
42999
44781
|
|
|
44782
|
+
@Field(() => Int, { nullable: true })
|
|
44783
|
+
MaxExecutionTimeMS?: number | null;
|
|
44784
|
+
|
|
43000
44785
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
43001
44786
|
OldValues___?: KeyValuePairInput[];
|
|
43002
44787
|
}
|
|
@@ -53770,12 +55555,12 @@ export class MJUser_ {
|
|
|
53770
55555
|
@Field(() => [MJConversationDetailRating_])
|
|
53771
55556
|
MJ_ConversationDetailRatings_UserIDArray: MJConversationDetailRating_[]; // Link to MJ_ConversationDetailRatings
|
|
53772
55557
|
|
|
53773
|
-
@Field(() => [MJTestSuiteRun_])
|
|
53774
|
-
MJ_TestSuiteRuns_RunByUserIDArray: MJTestSuiteRun_[]; // Link to MJ_TestSuiteRuns
|
|
53775
|
-
|
|
53776
55558
|
@Field(() => [MJTestRunFeedback_])
|
|
53777
55559
|
MJ_TestRunFeedbacks_ReviewerUserIDArray: MJTestRunFeedback_[]; // Link to MJ_TestRunFeedbacks
|
|
53778
55560
|
|
|
55561
|
+
@Field(() => [MJTestSuiteRun_])
|
|
55562
|
+
MJ_TestSuiteRuns_RunByUserIDArray: MJTestSuiteRun_[]; // Link to MJ_TestSuiteRuns
|
|
55563
|
+
|
|
53779
55564
|
@Field(() => [MJUserSetting_])
|
|
53780
55565
|
MJ_UserSettings_UserIDArray: MJUserSetting_[]; // Link to MJ_UserSettings
|
|
53781
55566
|
|
|
@@ -54493,25 +56278,25 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
54493
56278
|
return result;
|
|
54494
56279
|
}
|
|
54495
56280
|
|
|
54496
|
-
@FieldResolver(() => [
|
|
54497
|
-
async
|
|
54498
|
-
this.CheckUserReadPermissions('MJ: Test
|
|
56281
|
+
@FieldResolver(() => [MJTestRunFeedback_])
|
|
56282
|
+
async MJ_TestRunFeedbacks_ReviewerUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56283
|
+
this.CheckUserReadPermissions('MJ: Test Run Feedbacks', userPayload);
|
|
54499
56284
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
54500
56285
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
54501
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
56286
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestRunFeedbacks] WHERE [ReviewerUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Run Feedbacks', userPayload, EntityPermissionType.Read, 'AND');
|
|
54502
56287
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
54503
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test
|
|
56288
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Run Feedbacks', rows, this.GetUserFromPayload(userPayload));
|
|
54504
56289
|
return result;
|
|
54505
56290
|
}
|
|
54506
56291
|
|
|
54507
|
-
@FieldResolver(() => [
|
|
54508
|
-
async
|
|
54509
|
-
this.CheckUserReadPermissions('MJ: Test
|
|
56292
|
+
@FieldResolver(() => [MJTestSuiteRun_])
|
|
56293
|
+
async MJ_TestSuiteRuns_RunByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56294
|
+
this.CheckUserReadPermissions('MJ: Test Suite Runs', userPayload);
|
|
54510
56295
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
54511
56296
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
54512
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
56297
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTestSuiteRuns] WHERE [RunByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Test Suite Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
54513
56298
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
54514
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test
|
|
56299
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Suite Runs', rows, this.GetUserFromPayload(userPayload));
|
|
54515
56300
|
return result;
|
|
54516
56301
|
}
|
|
54517
56302
|
|