@memberjunction/server 2.133.0 → 3.1.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.
Files changed (35) hide show
  1. package/dist/config.d.ts +17 -0
  2. package/dist/config.d.ts.map +1 -1
  3. package/dist/config.js +125 -4
  4. package/dist/config.js.map +1 -1
  5. package/dist/generated/generated.d.ts +510 -4
  6. package/dist/generated/generated.d.ts.map +1 -1
  7. package/dist/generated/generated.js +3438 -302
  8. package/dist/generated/generated.js.map +1 -1
  9. package/dist/generic/ResolverBase.d.ts.map +1 -1
  10. package/dist/generic/ResolverBase.js +5 -2
  11. package/dist/generic/ResolverBase.js.map +1 -1
  12. package/dist/generic/RunViewResolver.d.ts +5 -0
  13. package/dist/generic/RunViewResolver.d.ts.map +1 -1
  14. package/dist/generic/RunViewResolver.js +53 -4
  15. package/dist/generic/RunViewResolver.js.map +1 -1
  16. package/dist/index.d.ts +4 -3
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/resolvers/RunTestResolver.d.ts +2 -2
  21. package/dist/resolvers/RunTestResolver.d.ts.map +1 -1
  22. package/dist/resolvers/RunTestResolver.js +33 -11
  23. package/dist/resolvers/RunTestResolver.js.map +1 -1
  24. package/package.json +51 -44
  25. package/src/__tests__/setup.ts +21 -0
  26. package/src/config.ts +167 -4
  27. package/src/generated/generated.ts +2002 -21
  28. package/src/generic/ResolverBase.ts +6 -2
  29. package/src/generic/RunViewResolver.ts +55 -5
  30. package/src/index.ts +4 -4
  31. package/src/resolvers/RunTestResolver.ts +25 -0
  32. package/dist/auth/__tests__/backward-compatibility.test.d.ts +0 -2
  33. package/dist/auth/__tests__/backward-compatibility.test.d.ts.map +0 -1
  34. package/dist/auth/__tests__/backward-compatibility.test.js +0 -135
  35. package/dist/auth/__tests__/backward-compatibility.test.js.map +0 -1
@@ -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, 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, ListInvitationEntity, ListShareEntity, 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, flyway_schema_historyEntity, GeneratedCodeCategoryEntity, GeneratedCodeEntity, IntegrationURLFormatEntity, IntegrationEntity, LibraryEntity, LibraryItemEntity, ListCategoryEntity, ListDetailEntity, ListEntity, AccessControlRuleEntity, AIAgentArtifactTypeEntity, AIAgentConfigurationEntity, AIAgentDataSourceEntity, AIAgentExampleEntity, AIAgentModalityEntity, AIAgentPermissionEntity, AIAgentPromptEntity, AIAgentRelationshipEntity, AIAgentRunMediaEntity, AIAgentRunStepEntity, AIAgentRunEntity, AIAgentStepPathEntity, AIAgentStepEntity, AIAgentTypeEntity, AIArchitectureEntity, AIConfigurationParamEntity, AIConfigurationEntity, AICredentialBindingEntity, AIModalityEntity, AIModelArchitectureEntity, AIModelCostEntity, AIModelModalityEntity, AIModelPriceTypeEntity, AIModelPriceUnitTypeEntity, AIModelVendorEntity, AIPromptModelEntity, AIPromptRunMediaEntity, 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, DashboardCategoryLinkEntity, DashboardCategoryPermissionEntity, DashboardPartTypeEntity, DashboardPermissionEntity, DashboardUserPreferenceEntity, DashboardUserStateEntity, EncryptionAlgorithmEntity, EncryptionKeySourceEntity, EncryptionKeyEntity, EnvironmentEntity, ListInvitationEntity, ListShareEntity, 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
  //****************************************************************************
@@ -1318,6 +1318,10 @@ export class MJActionParam_ {
1318
1318
  @MaxLength(10)
1319
1319
  _mj__UpdatedAt: Date;
1320
1320
 
1321
+ @Field({nullable: true, description: `Specifies the type of media this parameter outputs when ValueType is MediaOutput. Used for action discovery and validation.`})
1322
+ @MaxLength(40)
1323
+ MediaModality?: string;
1324
+
1321
1325
  @Field()
1322
1326
  @MaxLength(850)
1323
1327
  Action: string;
@@ -1361,6 +1365,9 @@ export class CreateMJActionParamInput {
1361
1365
 
1362
1366
  @Field(() => Boolean, { nullable: true })
1363
1367
  IsRequired?: boolean;
1368
+
1369
+ @Field({ nullable: true })
1370
+ MediaModality: string | null;
1364
1371
  }
1365
1372
 
1366
1373
 
@@ -1396,6 +1403,9 @@ export class UpdateMJActionParamInput {
1396
1403
  @Field(() => Boolean, { nullable: true })
1397
1404
  IsRequired?: boolean;
1398
1405
 
1406
+ @Field({ nullable: true })
1407
+ MediaModality?: string | null;
1408
+
1399
1409
  @Field(() => [KeyValuePairInput], { nullable: true })
1400
1410
  OldValues___?: KeyValuePairInput[];
1401
1411
  }
@@ -3246,6 +3256,13 @@ export class MJAIAgentNote_ {
3246
3256
  @MaxLength(510)
3247
3257
  SourceConversation?: string;
3248
3258
 
3259
+ @Field({nullable: true})
3260
+ SourceConversationDetail?: string;
3261
+
3262
+ @Field({nullable: true})
3263
+ @MaxLength(510)
3264
+ SourceAIAgentRun?: string;
3265
+
3249
3266
  @Field({nullable: true})
3250
3267
  @MaxLength(100)
3251
3268
  Company?: string;
@@ -6788,6 +6805,10 @@ export class MJAIResultCache_ {
6788
6805
  @MaxLength(200)
6789
6806
  Configuration?: string;
6790
6807
 
6808
+ @Field({nullable: true})
6809
+ @MaxLength(510)
6810
+ PromptRun?: string;
6811
+
6791
6812
  }
6792
6813
 
6793
6814
  //****************************************************************************
@@ -13726,6 +13747,10 @@ export class MJConversation_ {
13726
13747
  @MaxLength(510)
13727
13748
  Project?: string;
13728
13749
 
13750
+ @Field({nullable: true})
13751
+ @MaxLength(510)
13752
+ TestRun?: string;
13753
+
13729
13754
  @Field(() => [MJConversationDetail_])
13730
13755
  ConversationDetails_ConversationIDArray: MJConversationDetail_[]; // Link to ConversationDetails
13731
13756
 
@@ -14055,6 +14080,12 @@ export class MJDashboardCategory_ {
14055
14080
  @Field(() => [MJDashboardCategory_])
14056
14081
  DashboardCategories_ParentIDArray: MJDashboardCategory_[]; // Link to DashboardCategories
14057
14082
 
14083
+ @Field(() => [MJDashboardCategoryPermission_])
14084
+ MJ_DashboardCategoryPermissions_DashboardCategoryIDArray: MJDashboardCategoryPermission_[]; // Link to MJ_DashboardCategoryPermissions
14085
+
14086
+ @Field(() => [MJDashboardCategoryLink_])
14087
+ MJ_DashboardCategoryLinks_DashboardCategoryIDArray: MJDashboardCategoryLink_[]; // Link to MJ_DashboardCategoryLinks
14088
+
14058
14089
  }
14059
14090
 
14060
14091
  //****************************************************************************
@@ -14183,6 +14214,28 @@ export class MJDashboardCategoryResolver extends ResolverBase {
14183
14214
  return result;
14184
14215
  }
14185
14216
 
14217
+ @FieldResolver(() => [MJDashboardCategoryPermission_])
14218
+ async MJ_DashboardCategoryPermissions_DashboardCategoryIDArray(@Root() mjdashboardcategory_: MJDashboardCategory_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
14219
+ this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
14220
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
14221
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
14222
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategoryPermissions] WHERE [DashboardCategoryID]='${mjdashboardcategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Permissions', userPayload, EntityPermissionType.Read, 'AND');
14223
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
14224
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
14225
+ return result;
14226
+ }
14227
+
14228
+ @FieldResolver(() => [MJDashboardCategoryLink_])
14229
+ async MJ_DashboardCategoryLinks_DashboardCategoryIDArray(@Root() mjdashboardcategory_: MJDashboardCategory_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
14230
+ this.CheckUserReadPermissions('MJ: Dashboard Category Links', userPayload);
14231
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
14232
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
14233
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategoryLinks] WHERE [DashboardCategoryID]='${mjdashboardcategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Links', userPayload, EntityPermissionType.Read, 'AND');
14234
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
14235
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Links', rows, this.GetUserFromPayload(userPayload));
14236
+ return result;
14237
+ }
14238
+
14186
14239
  @Mutation(() => MJDashboardCategory_)
14187
14240
  async CreateMJDashboardCategory(
14188
14241
  @Arg('input', () => CreateMJDashboardCategoryInput) input: CreateMJDashboardCategoryInput,
@@ -14293,9 +14346,15 @@ export class MJDashboard_ {
14293
14346
  @Field(() => [MJDashboardUserState_])
14294
14347
  MJ_DashboardUserStates_DashboardIDArray: MJDashboardUserState_[]; // Link to MJ_DashboardUserStates
14295
14348
 
14349
+ @Field(() => [MJDashboardCategoryLink_])
14350
+ MJ_DashboardCategoryLinks_DashboardIDArray: MJDashboardCategoryLink_[]; // Link to MJ_DashboardCategoryLinks
14351
+
14296
14352
  @Field(() => [MJDashboardUserPreference_])
14297
14353
  MJ_DashboardUserPreferences_DashboardIDArray: MJDashboardUserPreference_[]; // Link to MJ_DashboardUserPreferences
14298
14354
 
14355
+ @Field(() => [MJDashboardPermission_])
14356
+ MJ_DashboardPermissions_DashboardIDArray: MJDashboardPermission_[]; // Link to MJ_DashboardPermissions
14357
+
14299
14358
  }
14300
14359
 
14301
14360
  //****************************************************************************
@@ -14461,6 +14520,17 @@ export class MJDashboardResolver extends ResolverBase {
14461
14520
  return result;
14462
14521
  }
14463
14522
 
14523
+ @FieldResolver(() => [MJDashboardCategoryLink_])
14524
+ async MJ_DashboardCategoryLinks_DashboardIDArray(@Root() mjdashboard_: MJDashboard_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
14525
+ this.CheckUserReadPermissions('MJ: Dashboard Category Links', userPayload);
14526
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
14527
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
14528
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategoryLinks] WHERE [DashboardID]='${mjdashboard_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Links', userPayload, EntityPermissionType.Read, 'AND');
14529
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
14530
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Links', rows, this.GetUserFromPayload(userPayload));
14531
+ return result;
14532
+ }
14533
+
14464
14534
  @FieldResolver(() => [MJDashboardUserPreference_])
14465
14535
  async MJ_DashboardUserPreferences_DashboardIDArray(@Root() mjdashboard_: MJDashboard_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
14466
14536
  this.CheckUserReadPermissions('MJ: Dashboard User Preferences', userPayload);
@@ -14472,6 +14542,17 @@ export class MJDashboardResolver extends ResolverBase {
14472
14542
  return result;
14473
14543
  }
14474
14544
 
14545
+ @FieldResolver(() => [MJDashboardPermission_])
14546
+ async MJ_DashboardPermissions_DashboardIDArray(@Root() mjdashboard_: MJDashboard_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
14547
+ this.CheckUserReadPermissions('MJ: Dashboard Permissions', userPayload);
14548
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
14549
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
14550
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardPermissions] WHERE [DashboardID]='${mjdashboard_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Permissions', userPayload, EntityPermissionType.Read, 'AND');
14551
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
14552
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Permissions', rows, this.GetUserFromPayload(userPayload));
14553
+ return result;
14554
+ }
14555
+
14475
14556
  @Mutation(() => MJDashboard_)
14476
14557
  async CreateMJDashboard(
14477
14558
  @Arg('input', () => CreateMJDashboardInput) input: CreateMJDashboardInput,
@@ -15615,6 +15696,10 @@ export class MJDuplicateRunDetail_ {
15615
15696
  @MaxLength(10)
15616
15697
  _mj__UpdatedAt: Date;
15617
15698
 
15699
+ @Field()
15700
+ @MaxLength(510)
15701
+ DuplicateRun: string;
15702
+
15618
15703
  @Field(() => [MJDuplicateRunDetailMatch_])
15619
15704
  DuplicateRunDetailMatches_DuplicateRunDetailIDArray: MJDuplicateRunDetailMatch_[]; // Link to DuplicateRunDetailMatches
15620
15705
 
@@ -16070,6 +16155,10 @@ export class MJEmployeeCompanyIntegration_ {
16070
16155
  @MaxLength(10)
16071
16156
  _mj__UpdatedAt: Date;
16072
16157
 
16158
+ @Field({nullable: true})
16159
+ @MaxLength(162)
16160
+ Employee?: string;
16161
+
16073
16162
  @Field()
16074
16163
  @MaxLength(510)
16075
16164
  CompanyIntegration: string;
@@ -16234,6 +16323,10 @@ export class MJEmployeeRole_ {
16234
16323
  @MaxLength(10)
16235
16324
  _mj__UpdatedAt: Date;
16236
16325
 
16326
+ @Field({nullable: true})
16327
+ @MaxLength(162)
16328
+ Employee?: string;
16329
+
16237
16330
  @Field()
16238
16331
  @MaxLength(100)
16239
16332
  Role: string;
@@ -16386,6 +16479,10 @@ export class MJEmployeeSkill_ {
16386
16479
  @MaxLength(10)
16387
16480
  _mj__UpdatedAt: Date;
16388
16481
 
16482
+ @Field({nullable: true})
16483
+ @MaxLength(162)
16484
+ Employee?: string;
16485
+
16389
16486
  @Field()
16390
16487
  @MaxLength(100)
16391
16488
  Skill: string;
@@ -18090,6 +18187,13 @@ export class MJEntityActionFilter_ {
18090
18187
  @MaxLength(10)
18091
18188
  _mj__UpdatedAt: Date;
18092
18189
 
18190
+ @Field()
18191
+ @MaxLength(850)
18192
+ EntityAction: string;
18193
+
18194
+ @Field()
18195
+ ActionFilter: string;
18196
+
18093
18197
  }
18094
18198
 
18095
18199
  //****************************************************************************
@@ -18424,6 +18528,10 @@ export class MJEntityActionInvocation_ {
18424
18528
  @MaxLength(10)
18425
18529
  _mj__UpdatedAt: Date;
18426
18530
 
18531
+ @Field()
18532
+ @MaxLength(850)
18533
+ EntityAction: string;
18534
+
18427
18535
  @Field()
18428
18536
  @MaxLength(510)
18429
18537
  InvocationType: string;
@@ -18592,6 +18700,10 @@ export class MJEntityActionParam_ {
18592
18700
  @MaxLength(10)
18593
18701
  _mj__UpdatedAt: Date;
18594
18702
 
18703
+ @Field()
18704
+ @MaxLength(850)
18705
+ EntityAction: string;
18706
+
18595
18707
  @Field()
18596
18708
  @MaxLength(510)
18597
18709
  ActionParam: string;
@@ -19244,6 +19356,10 @@ export class MJEntityCommunicationField_ {
19244
19356
  @MaxLength(10)
19245
19357
  _mj__UpdatedAt: Date;
19246
19358
 
19359
+ @Field()
19360
+ @MaxLength(200)
19361
+ EntityCommunicationMessageType: string;
19362
+
19247
19363
  }
19248
19364
 
19249
19365
  //****************************************************************************
@@ -22387,6 +22503,14 @@ export class MJErrorLog_ {
22387
22503
  @MaxLength(10)
22388
22504
  _mj__UpdatedAt: Date;
22389
22505
 
22506
+ @Field({nullable: true})
22507
+ @MaxLength(200)
22508
+ CompanyIntegrationRun?: string;
22509
+
22510
+ @Field({nullable: true})
22511
+ @MaxLength(900)
22512
+ CompanyIntegrationRunDetail?: string;
22513
+
22390
22514
  }
22391
22515
 
22392
22516
  //****************************************************************************
@@ -23408,9 +23532,15 @@ export class MJFile_ {
23408
23532
  @Field(() => [MJFileEntityRecordLink_])
23409
23533
  FileEntityRecordLinks_FileIDArray: MJFileEntityRecordLink_[]; // Link to FileEntityRecordLinks
23410
23534
 
23535
+ @Field(() => [MJAIPromptRunMedia_])
23536
+ MJ_AIPromptRunMedias_FileIDArray: MJAIPromptRunMedia_[]; // Link to MJ_AIPromptRunMedias
23537
+
23411
23538
  @Field(() => [MJConversationDetailAttachment_])
23412
23539
  MJ_ConversationDetailAttachments_FileIDArray: MJConversationDetailAttachment_[]; // Link to MJ_ConversationDetailAttachments
23413
23540
 
23541
+ @Field(() => [MJAIAgentRunMedia_])
23542
+ MJ_AIAgentRunMedias_FileIDArray: MJAIAgentRunMedia_[]; // Link to MJ_AIAgentRunMedias
23543
+
23414
23544
  }
23415
23545
 
23416
23546
  //****************************************************************************
@@ -23546,6 +23676,17 @@ export class MJFileResolver extends ResolverBase {
23546
23676
  return result;
23547
23677
  }
23548
23678
 
23679
+ @FieldResolver(() => [MJAIPromptRunMedia_])
23680
+ async MJ_AIPromptRunMedias_FileIDArray(@Root() mjfile_: MJFile_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
23681
+ this.CheckUserReadPermissions('MJ: AI Prompt Run Medias', userPayload);
23682
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
23683
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
23684
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRunMedias] WHERE [FileID]='${mjfile_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Run Medias', userPayload, EntityPermissionType.Read, 'AND');
23685
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
23686
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Run Medias', rows, this.GetUserFromPayload(userPayload));
23687
+ return result;
23688
+ }
23689
+
23549
23690
  @FieldResolver(() => [MJConversationDetailAttachment_])
23550
23691
  async MJ_ConversationDetailAttachments_FileIDArray(@Root() mjfile_: MJFile_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
23551
23692
  this.CheckUserReadPermissions('MJ: Conversation Detail Attachments', userPayload);
@@ -23557,6 +23698,17 @@ export class MJFileResolver extends ResolverBase {
23557
23698
  return result;
23558
23699
  }
23559
23700
 
23701
+ @FieldResolver(() => [MJAIAgentRunMedia_])
23702
+ async MJ_AIAgentRunMedias_FileIDArray(@Root() mjfile_: MJFile_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
23703
+ this.CheckUserReadPermissions('MJ: AI Agent Run Medias', userPayload);
23704
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
23705
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
23706
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunMedias] WHERE [FileID]='${mjfile_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Medias', userPayload, EntityPermissionType.Read, 'AND');
23707
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
23708
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Medias', rows, this.GetUserFromPayload(userPayload));
23709
+ return result;
23710
+ }
23711
+
23560
23712
  @Mutation(() => MJFile_)
23561
23713
  async CreateMJFile(
23562
23714
  @Arg('input', () => CreateMJFileInput) input: CreateMJFileInput,
@@ -23586,6 +23738,220 @@ export class MJFileResolver extends ResolverBase {
23586
23738
 
23587
23739
  }
23588
23740
 
23741
+ //****************************************************************************
23742
+ // ENTITY CLASS for Flyway _schema _histories
23743
+ //****************************************************************************
23744
+ @ObjectType()
23745
+ export class MJflywayschemahistory_ {
23746
+ @Field(() => Int)
23747
+ installed_rank: number;
23748
+
23749
+ @Field({nullable: true})
23750
+ @MaxLength(100)
23751
+ version?: string;
23752
+
23753
+ @Field({nullable: true})
23754
+ @MaxLength(400)
23755
+ description?: string;
23756
+
23757
+ @Field()
23758
+ @MaxLength(40)
23759
+ type: string;
23760
+
23761
+ @Field()
23762
+ @MaxLength(2000)
23763
+ script: string;
23764
+
23765
+ @Field(() => Int, {nullable: true})
23766
+ checksum?: number;
23767
+
23768
+ @Field()
23769
+ @MaxLength(200)
23770
+ installed_by: string;
23771
+
23772
+ @Field()
23773
+ @MaxLength(8)
23774
+ installed_on: Date;
23775
+
23776
+ @Field(() => Int)
23777
+ execution_time: number;
23778
+
23779
+ @Field(() => Boolean)
23780
+ success: boolean;
23781
+
23782
+ @Field()
23783
+ @MaxLength(10)
23784
+ _mj__CreatedAt: Date;
23785
+
23786
+ @Field()
23787
+ @MaxLength(10)
23788
+ _mj__UpdatedAt: Date;
23789
+
23790
+ }
23791
+
23792
+ //****************************************************************************
23793
+ // INPUT TYPE for Flyway _schema _histories
23794
+ //****************************************************************************
23795
+ @InputType()
23796
+ export class CreateMJflywayschemahistoryInput {
23797
+ @Field(() => Int, { nullable: true })
23798
+ installed_rank?: number;
23799
+
23800
+ @Field({ nullable: true })
23801
+ version: string | null;
23802
+
23803
+ @Field({ nullable: true })
23804
+ description: string | null;
23805
+
23806
+ @Field({ nullable: true })
23807
+ type?: string;
23808
+
23809
+ @Field({ nullable: true })
23810
+ script?: string;
23811
+
23812
+ @Field(() => Int, { nullable: true })
23813
+ checksum: number | null;
23814
+
23815
+ @Field({ nullable: true })
23816
+ installed_by?: string;
23817
+
23818
+ @Field({ nullable: true })
23819
+ installed_on?: Date;
23820
+
23821
+ @Field(() => Int, { nullable: true })
23822
+ execution_time?: number;
23823
+
23824
+ @Field(() => Boolean, { nullable: true })
23825
+ success?: boolean;
23826
+ }
23827
+
23828
+
23829
+ //****************************************************************************
23830
+ // INPUT TYPE for Flyway _schema _histories
23831
+ //****************************************************************************
23832
+ @InputType()
23833
+ export class UpdateMJflywayschemahistoryInput {
23834
+ @Field(() => Int)
23835
+ installed_rank: number;
23836
+
23837
+ @Field({ nullable: true })
23838
+ version?: string | null;
23839
+
23840
+ @Field({ nullable: true })
23841
+ description?: string | null;
23842
+
23843
+ @Field({ nullable: true })
23844
+ type?: string;
23845
+
23846
+ @Field({ nullable: true })
23847
+ script?: string;
23848
+
23849
+ @Field(() => Int, { nullable: true })
23850
+ checksum?: number | null;
23851
+
23852
+ @Field({ nullable: true })
23853
+ installed_by?: string;
23854
+
23855
+ @Field({ nullable: true })
23856
+ installed_on?: Date;
23857
+
23858
+ @Field(() => Int, { nullable: true })
23859
+ execution_time?: number;
23860
+
23861
+ @Field(() => Boolean, { nullable: true })
23862
+ success?: boolean;
23863
+
23864
+ @Field(() => [KeyValuePairInput], { nullable: true })
23865
+ OldValues___?: KeyValuePairInput[];
23866
+ }
23867
+
23868
+ //****************************************************************************
23869
+ // RESOLVER for Flyway _schema _histories
23870
+ //****************************************************************************
23871
+ @ObjectType()
23872
+ export class RunMJflywayschemahistoryViewResult {
23873
+ @Field(() => [MJflywayschemahistory_])
23874
+ Results: MJflywayschemahistory_[];
23875
+
23876
+ @Field(() => String, {nullable: true})
23877
+ UserViewRunID?: string;
23878
+
23879
+ @Field(() => Int, {nullable: true})
23880
+ RowCount: number;
23881
+
23882
+ @Field(() => Int, {nullable: true})
23883
+ TotalRowCount: number;
23884
+
23885
+ @Field(() => Int, {nullable: true})
23886
+ ExecutionTime: number;
23887
+
23888
+ @Field({nullable: true})
23889
+ ErrorMessage?: string;
23890
+
23891
+ @Field(() => Boolean, {nullable: false})
23892
+ Success: boolean;
23893
+ }
23894
+
23895
+ @Resolver(MJflywayschemahistory_)
23896
+ export class MJflywayschemahistoryResolver extends ResolverBase {
23897
+ @Query(() => RunMJflywayschemahistoryViewResult)
23898
+ async RunMJflywayschemahistoryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23899
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
23900
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
23901
+ }
23902
+
23903
+ @Query(() => RunMJflywayschemahistoryViewResult)
23904
+ async RunMJflywayschemahistoryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23905
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
23906
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
23907
+ }
23908
+
23909
+ @Query(() => RunMJflywayschemahistoryViewResult)
23910
+ async RunMJflywayschemahistoryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23911
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
23912
+ input.EntityName = 'Flyway _schema _histories';
23913
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
23914
+ }
23915
+ @Query(() => MJflywayschemahistory_, { nullable: true })
23916
+ async MJflywayschemahistory(@Arg('installed_rank', () => Int) installed_rank: number, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJflywayschemahistory_ | null> {
23917
+ this.CheckUserReadPermissions('Flyway _schema _histories', userPayload);
23918
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
23919
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
23920
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwFlyway_schema_histories] WHERE [installed_rank]=${installed_rank} ` + this.getRowLevelSecurityWhereClause(provider, 'Flyway _schema _histories', userPayload, EntityPermissionType.Read, 'AND');
23921
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
23922
+ const result = await this.MapFieldNamesToCodeNames('Flyway _schema _histories', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
23923
+ return result;
23924
+ }
23925
+
23926
+ @Mutation(() => MJflywayschemahistory_)
23927
+ async CreateMJflywayschemahistory(
23928
+ @Arg('input', () => CreateMJflywayschemahistoryInput) input: CreateMJflywayschemahistoryInput,
23929
+ @Ctx() { providers, userPayload }: AppContext,
23930
+ @PubSub() pubSub: PubSubEngine
23931
+ ) {
23932
+ const provider = GetReadWriteProvider(providers);
23933
+ return this.CreateRecord('Flyway _schema _histories', input, provider, userPayload, pubSub)
23934
+ }
23935
+
23936
+ @Mutation(() => MJflywayschemahistory_)
23937
+ async UpdateMJflywayschemahistory(
23938
+ @Arg('input', () => UpdateMJflywayschemahistoryInput) input: UpdateMJflywayschemahistoryInput,
23939
+ @Ctx() { providers, userPayload }: AppContext,
23940
+ @PubSub() pubSub: PubSubEngine
23941
+ ) {
23942
+ const provider = GetReadWriteProvider(providers);
23943
+ return this.UpdateRecord('Flyway _schema _histories', input, provider, userPayload, pubSub);
23944
+ }
23945
+
23946
+ @Mutation(() => MJflywayschemahistory_)
23947
+ async DeleteMJflywayschemahistory(@Arg('installed_rank', () => Int) installed_rank: number, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23948
+ const provider = GetReadWriteProvider(providers);
23949
+ const key = new CompositeKey([{FieldName: 'installed_rank', Value: installed_rank}]);
23950
+ return this.DeleteRecord('Flyway _schema _histories', key, options, provider, userPayload, pubSub);
23951
+ }
23952
+
23953
+ }
23954
+
23589
23955
  //****************************************************************************
23590
23956
  // ENTITY CLASS for Generated Code Categories
23591
23957
  //****************************************************************************
@@ -26506,6 +26872,13 @@ export class MJAIAgentExample_ {
26506
26872
  @MaxLength(510)
26507
26873
  SourceConversation?: string;
26508
26874
 
26875
+ @Field({nullable: true})
26876
+ SourceConversationDetail?: string;
26877
+
26878
+ @Field({nullable: true})
26879
+ @MaxLength(510)
26880
+ SourceAIAgentRun?: string;
26881
+
26509
26882
  @Field({nullable: true})
26510
26883
  @MaxLength(100)
26511
26884
  EmbeddingModel?: string;
@@ -27548,6 +27921,301 @@ export class MJAIAgentRelationshipResolver extends ResolverBase {
27548
27921
 
27549
27922
  }
27550
27923
 
27924
+ //****************************************************************************
27925
+ // ENTITY CLASS for MJ: AI Agent Run Medias
27926
+ //****************************************************************************
27927
+ @ObjectType()
27928
+ export class MJAIAgentRunMedia_ {
27929
+ @Field()
27930
+ @MaxLength(16)
27931
+ ID: string;
27932
+
27933
+ @Field()
27934
+ @MaxLength(16)
27935
+ AgentRunID: string;
27936
+
27937
+ @Field({nullable: true})
27938
+ @MaxLength(16)
27939
+ SourcePromptRunMediaID?: string;
27940
+
27941
+ @Field()
27942
+ @MaxLength(16)
27943
+ ModalityID: string;
27944
+
27945
+ @Field()
27946
+ @MaxLength(200)
27947
+ MimeType: string;
27948
+
27949
+ @Field({nullable: true})
27950
+ @MaxLength(510)
27951
+ FileName?: string;
27952
+
27953
+ @Field(() => Int, {nullable: true})
27954
+ FileSizeBytes?: number;
27955
+
27956
+ @Field(() => Int, {nullable: true})
27957
+ Width?: number;
27958
+
27959
+ @Field(() => Int, {nullable: true})
27960
+ Height?: number;
27961
+
27962
+ @Field(() => Float, {nullable: true})
27963
+ DurationSeconds?: number;
27964
+
27965
+ @Field({nullable: true})
27966
+ InlineData?: string;
27967
+
27968
+ @Field({nullable: true})
27969
+ @MaxLength(16)
27970
+ FileID?: string;
27971
+
27972
+ @Field({nullable: true})
27973
+ ThumbnailBase64?: string;
27974
+
27975
+ @Field({nullable: true})
27976
+ @MaxLength(510)
27977
+ Label?: string;
27978
+
27979
+ @Field({nullable: true})
27980
+ Metadata?: string;
27981
+
27982
+ @Field(() => Int)
27983
+ DisplayOrder: number;
27984
+
27985
+ @Field()
27986
+ @MaxLength(10)
27987
+ _mj__CreatedAt: Date;
27988
+
27989
+ @Field()
27990
+ @MaxLength(10)
27991
+ _mj__UpdatedAt: Date;
27992
+
27993
+ @Field({nullable: true, description: `Agent notes describing what this media represents. Used for internal tracking and can be displayed in UI.`})
27994
+ Description?: string;
27995
+
27996
+ @Field({nullable: true})
27997
+ @MaxLength(510)
27998
+ AgentRun?: string;
27999
+
28000
+ @Field({nullable: true})
28001
+ @MaxLength(510)
28002
+ SourcePromptRunMedia?: string;
28003
+
28004
+ @Field()
28005
+ @MaxLength(100)
28006
+ Modality: string;
28007
+
28008
+ @Field({nullable: true})
28009
+ @MaxLength(1000)
28010
+ File?: string;
28011
+
28012
+ }
28013
+
28014
+ //****************************************************************************
28015
+ // INPUT TYPE for MJ: AI Agent Run Medias
28016
+ //****************************************************************************
28017
+ @InputType()
28018
+ export class CreateMJAIAgentRunMediaInput {
28019
+ @Field({ nullable: true })
28020
+ ID?: string;
28021
+
28022
+ @Field({ nullable: true })
28023
+ AgentRunID?: string;
28024
+
28025
+ @Field({ nullable: true })
28026
+ SourcePromptRunMediaID: string | null;
28027
+
28028
+ @Field({ nullable: true })
28029
+ ModalityID?: string;
28030
+
28031
+ @Field({ nullable: true })
28032
+ MimeType?: string;
28033
+
28034
+ @Field({ nullable: true })
28035
+ FileName: string | null;
28036
+
28037
+ @Field(() => Int, { nullable: true })
28038
+ FileSizeBytes: number | null;
28039
+
28040
+ @Field(() => Int, { nullable: true })
28041
+ Width: number | null;
28042
+
28043
+ @Field(() => Int, { nullable: true })
28044
+ Height: number | null;
28045
+
28046
+ @Field(() => Float, { nullable: true })
28047
+ DurationSeconds: number | null;
28048
+
28049
+ @Field({ nullable: true })
28050
+ InlineData: string | null;
28051
+
28052
+ @Field({ nullable: true })
28053
+ FileID: string | null;
28054
+
28055
+ @Field({ nullable: true })
28056
+ ThumbnailBase64: string | null;
28057
+
28058
+ @Field({ nullable: true })
28059
+ Label: string | null;
28060
+
28061
+ @Field({ nullable: true })
28062
+ Metadata: string | null;
28063
+
28064
+ @Field(() => Int, { nullable: true })
28065
+ DisplayOrder?: number;
28066
+
28067
+ @Field({ nullable: true })
28068
+ Description: string | null;
28069
+ }
28070
+
28071
+
28072
+ //****************************************************************************
28073
+ // INPUT TYPE for MJ: AI Agent Run Medias
28074
+ //****************************************************************************
28075
+ @InputType()
28076
+ export class UpdateMJAIAgentRunMediaInput {
28077
+ @Field()
28078
+ ID: string;
28079
+
28080
+ @Field({ nullable: true })
28081
+ AgentRunID?: string;
28082
+
28083
+ @Field({ nullable: true })
28084
+ SourcePromptRunMediaID?: string | null;
28085
+
28086
+ @Field({ nullable: true })
28087
+ ModalityID?: string;
28088
+
28089
+ @Field({ nullable: true })
28090
+ MimeType?: string;
28091
+
28092
+ @Field({ nullable: true })
28093
+ FileName?: string | null;
28094
+
28095
+ @Field(() => Int, { nullable: true })
28096
+ FileSizeBytes?: number | null;
28097
+
28098
+ @Field(() => Int, { nullable: true })
28099
+ Width?: number | null;
28100
+
28101
+ @Field(() => Int, { nullable: true })
28102
+ Height?: number | null;
28103
+
28104
+ @Field(() => Float, { nullable: true })
28105
+ DurationSeconds?: number | null;
28106
+
28107
+ @Field({ nullable: true })
28108
+ InlineData?: string | null;
28109
+
28110
+ @Field({ nullable: true })
28111
+ FileID?: string | null;
28112
+
28113
+ @Field({ nullable: true })
28114
+ ThumbnailBase64?: string | null;
28115
+
28116
+ @Field({ nullable: true })
28117
+ Label?: string | null;
28118
+
28119
+ @Field({ nullable: true })
28120
+ Metadata?: string | null;
28121
+
28122
+ @Field(() => Int, { nullable: true })
28123
+ DisplayOrder?: number;
28124
+
28125
+ @Field({ nullable: true })
28126
+ Description?: string | null;
28127
+
28128
+ @Field(() => [KeyValuePairInput], { nullable: true })
28129
+ OldValues___?: KeyValuePairInput[];
28130
+ }
28131
+
28132
+ //****************************************************************************
28133
+ // RESOLVER for MJ: AI Agent Run Medias
28134
+ //****************************************************************************
28135
+ @ObjectType()
28136
+ export class RunMJAIAgentRunMediaViewResult {
28137
+ @Field(() => [MJAIAgentRunMedia_])
28138
+ Results: MJAIAgentRunMedia_[];
28139
+
28140
+ @Field(() => String, {nullable: true})
28141
+ UserViewRunID?: string;
28142
+
28143
+ @Field(() => Int, {nullable: true})
28144
+ RowCount: number;
28145
+
28146
+ @Field(() => Int, {nullable: true})
28147
+ TotalRowCount: number;
28148
+
28149
+ @Field(() => Int, {nullable: true})
28150
+ ExecutionTime: number;
28151
+
28152
+ @Field({nullable: true})
28153
+ ErrorMessage?: string;
28154
+
28155
+ @Field(() => Boolean, {nullable: false})
28156
+ Success: boolean;
28157
+ }
28158
+
28159
+ @Resolver(MJAIAgentRunMedia_)
28160
+ export class MJAIAgentRunMediaResolver extends ResolverBase {
28161
+ @Query(() => RunMJAIAgentRunMediaViewResult)
28162
+ async RunMJAIAgentRunMediaViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
28163
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28164
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
28165
+ }
28166
+
28167
+ @Query(() => RunMJAIAgentRunMediaViewResult)
28168
+ async RunMJAIAgentRunMediaViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
28169
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28170
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
28171
+ }
28172
+
28173
+ @Query(() => RunMJAIAgentRunMediaViewResult)
28174
+ async RunMJAIAgentRunMediaDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
28175
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28176
+ input.EntityName = 'MJ: AI Agent Run Medias';
28177
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
28178
+ }
28179
+ @Query(() => MJAIAgentRunMedia_, { nullable: true })
28180
+ async MJAIAgentRunMedia(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentRunMedia_ | null> {
28181
+ this.CheckUserReadPermissions('MJ: AI Agent Run Medias', userPayload);
28182
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28183
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
28184
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunMedias] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Medias', userPayload, EntityPermissionType.Read, 'AND');
28185
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
28186
+ const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Run Medias', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
28187
+ return result;
28188
+ }
28189
+
28190
+ @Mutation(() => MJAIAgentRunMedia_)
28191
+ async CreateMJAIAgentRunMedia(
28192
+ @Arg('input', () => CreateMJAIAgentRunMediaInput) input: CreateMJAIAgentRunMediaInput,
28193
+ @Ctx() { providers, userPayload }: AppContext,
28194
+ @PubSub() pubSub: PubSubEngine
28195
+ ) {
28196
+ const provider = GetReadWriteProvider(providers);
28197
+ return this.CreateRecord('MJ: AI Agent Run Medias', input, provider, userPayload, pubSub)
28198
+ }
28199
+
28200
+ @Mutation(() => MJAIAgentRunMedia_)
28201
+ async UpdateMJAIAgentRunMedia(
28202
+ @Arg('input', () => UpdateMJAIAgentRunMediaInput) input: UpdateMJAIAgentRunMediaInput,
28203
+ @Ctx() { providers, userPayload }: AppContext,
28204
+ @PubSub() pubSub: PubSubEngine
28205
+ ) {
28206
+ const provider = GetReadWriteProvider(providers);
28207
+ return this.UpdateRecord('MJ: AI Agent Run Medias', input, provider, userPayload, pubSub);
28208
+ }
28209
+
28210
+ @Mutation(() => MJAIAgentRunMedia_)
28211
+ async DeleteMJAIAgentRunMedia(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
28212
+ const provider = GetReadWriteProvider(providers);
28213
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
28214
+ return this.DeleteRecord('MJ: AI Agent Run Medias', key, options, provider, userPayload, pubSub);
28215
+ }
28216
+
28217
+ }
28218
+
27551
28219
  //****************************************************************************
27552
28220
  // ENTITY CLASS for MJ: AI Agent Run Steps
27553
28221
  //****************************************************************************
@@ -27635,6 +28303,14 @@ detailed information about what validation rules failed.`})
27635
28303
  @Field({nullable: true, description: `Human-readable notes and comments about this agent run step`})
27636
28304
  Comments?: string;
27637
28305
 
28306
+ @Field({nullable: true})
28307
+ @MaxLength(510)
28308
+ AgentRun?: string;
28309
+
28310
+ @Field({nullable: true})
28311
+ @MaxLength(510)
28312
+ Parent?: string;
28313
+
27638
28314
  @Field({nullable: true})
27639
28315
  @MaxLength(16)
27640
28316
  RootParentID?: string;
@@ -28066,6 +28742,10 @@ each time the agent processes a prompt step.`})
28066
28742
  @MaxLength(400)
28067
28743
  ScheduledJobRun?: string;
28068
28744
 
28745
+ @Field({nullable: true})
28746
+ @MaxLength(510)
28747
+ TestRun?: string;
28748
+
28069
28749
  @Field({nullable: true})
28070
28750
  @MaxLength(16)
28071
28751
  RootParentRunID?: string;
@@ -28086,6 +28766,9 @@ each time the agent processes a prompt step.`})
28086
28766
  @Field(() => [MJAIAgentNote_])
28087
28767
  AIAgentNotes_SourceAIAgentRunIDArray: MJAIAgentNote_[]; // Link to AIAgentNotes
28088
28768
 
28769
+ @Field(() => [MJAIAgentRunMedia_])
28770
+ MJ_AIAgentRunMedias_AgentRunIDArray: MJAIAgentRunMedia_[]; // Link to MJ_AIAgentRunMedias
28771
+
28089
28772
  @Field(() => [MJAIPromptRun_])
28090
28773
  MJ_AIPromptRuns_AgentRunIDArray: MJAIPromptRun_[]; // Link to MJ_AIPromptRuns
28091
28774
 
@@ -28443,6 +29126,17 @@ export class MJAIAgentRunResolver extends ResolverBase {
28443
29126
  return result;
28444
29127
  }
28445
29128
 
29129
+ @FieldResolver(() => [MJAIAgentRunMedia_])
29130
+ async MJ_AIAgentRunMedias_AgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
29131
+ this.CheckUserReadPermissions('MJ: AI Agent Run Medias', userPayload);
29132
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29133
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
29134
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunMedias] WHERE [AgentRunID]='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Medias', userPayload, EntityPermissionType.Read, 'AND');
29135
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
29136
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Medias', rows, this.GetUserFromPayload(userPayload));
29137
+ return result;
29138
+ }
29139
+
28446
29140
  @FieldResolver(() => [MJAIPromptRun_])
28447
29141
  async MJ_AIPromptRuns_AgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
28448
29142
  this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
@@ -30309,9 +31003,15 @@ export class MJAIModality_ {
30309
31003
  @Field(() => [MJAIModelType_])
30310
31004
  AIModelTypes_DefaultOutputModalityIDArray: MJAIModelType_[]; // Link to AIModelTypes
30311
31005
 
31006
+ @Field(() => [MJAIPromptRunMedia_])
31007
+ MJ_AIPromptRunMedias_ModalityIDArray: MJAIPromptRunMedia_[]; // Link to MJ_AIPromptRunMedias
31008
+
30312
31009
  @Field(() => [MJAIModelType_])
30313
31010
  AIModelTypes_DefaultInputModalityIDArray: MJAIModelType_[]; // Link to AIModelTypes
30314
31011
 
31012
+ @Field(() => [MJAIAgentRunMedia_])
31013
+ MJ_AIAgentRunMedias_ModalityIDArray: MJAIAgentRunMedia_[]; // Link to MJ_AIAgentRunMedias
31014
+
30315
31015
  }
30316
31016
 
30317
31017
  //****************************************************************************
@@ -30486,6 +31186,17 @@ export class MJAIModalityResolver extends ResolverBase {
30486
31186
  return result;
30487
31187
  }
30488
31188
 
31189
+ @FieldResolver(() => [MJAIPromptRunMedia_])
31190
+ async MJ_AIPromptRunMedias_ModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
31191
+ this.CheckUserReadPermissions('MJ: AI Prompt Run Medias', userPayload);
31192
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
31193
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
31194
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRunMedias] WHERE [ModalityID]='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Run Medias', userPayload, EntityPermissionType.Read, 'AND');
31195
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
31196
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Run Medias', rows, this.GetUserFromPayload(userPayload));
31197
+ return result;
31198
+ }
31199
+
30489
31200
  @FieldResolver(() => [MJAIModelType_])
30490
31201
  async AIModelTypes_DefaultInputModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
30491
31202
  this.CheckUserReadPermissions('AI Model Types', userPayload);
@@ -30497,6 +31208,17 @@ export class MJAIModalityResolver extends ResolverBase {
30497
31208
  return result;
30498
31209
  }
30499
31210
 
31211
+ @FieldResolver(() => [MJAIAgentRunMedia_])
31212
+ async MJ_AIAgentRunMedias_ModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
31213
+ this.CheckUserReadPermissions('MJ: AI Agent Run Medias', userPayload);
31214
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
31215
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
31216
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunMedias] WHERE [ModalityID]='${mjaimodality_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Medias', userPayload, EntityPermissionType.Read, 'AND');
31217
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
31218
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Medias', rows, this.GetUserFromPayload(userPayload));
31219
+ return result;
31220
+ }
31221
+
30500
31222
  @Mutation(() => MJAIModality_)
30501
31223
  async CreateMJAIModality(
30502
31224
  @Arg('input', () => CreateMJAIModalityInput) input: CreateMJAIModalityInput,
@@ -32085,6 +32807,291 @@ export class MJAIPromptModelResolver extends ResolverBase {
32085
32807
 
32086
32808
  }
32087
32809
 
32810
+ //****************************************************************************
32811
+ // ENTITY CLASS for MJ: AI Prompt Run Medias
32812
+ //****************************************************************************
32813
+ @ObjectType()
32814
+ export class MJAIPromptRunMedia_ {
32815
+ @Field()
32816
+ @MaxLength(16)
32817
+ ID: string;
32818
+
32819
+ @Field()
32820
+ @MaxLength(16)
32821
+ PromptRunID: string;
32822
+
32823
+ @Field()
32824
+ @MaxLength(16)
32825
+ ModalityID: string;
32826
+
32827
+ @Field()
32828
+ @MaxLength(200)
32829
+ MimeType: string;
32830
+
32831
+ @Field({nullable: true})
32832
+ @MaxLength(510)
32833
+ FileName?: string;
32834
+
32835
+ @Field(() => Int, {nullable: true})
32836
+ FileSizeBytes?: number;
32837
+
32838
+ @Field(() => Int, {nullable: true})
32839
+ Width?: number;
32840
+
32841
+ @Field(() => Int, {nullable: true})
32842
+ Height?: number;
32843
+
32844
+ @Field(() => Float, {nullable: true})
32845
+ DurationSeconds?: number;
32846
+
32847
+ @Field({nullable: true})
32848
+ InlineData?: string;
32849
+
32850
+ @Field({nullable: true})
32851
+ @MaxLength(16)
32852
+ FileID?: string;
32853
+
32854
+ @Field({nullable: true})
32855
+ ThumbnailBase64?: string;
32856
+
32857
+ @Field({nullable: true})
32858
+ Metadata?: string;
32859
+
32860
+ @Field(() => Int)
32861
+ DisplayOrder: number;
32862
+
32863
+ @Field()
32864
+ @MaxLength(10)
32865
+ _mj__CreatedAt: Date;
32866
+
32867
+ @Field()
32868
+ @MaxLength(10)
32869
+ _mj__UpdatedAt: Date;
32870
+
32871
+ @Field({nullable: true, description: `Description of the media generated during prompt execution. Provides context for audit trail.`})
32872
+ Description?: string;
32873
+
32874
+ @Field({nullable: true})
32875
+ @MaxLength(510)
32876
+ PromptRun?: string;
32877
+
32878
+ @Field()
32879
+ @MaxLength(100)
32880
+ Modality: string;
32881
+
32882
+ @Field({nullable: true})
32883
+ @MaxLength(1000)
32884
+ File?: string;
32885
+
32886
+ @Field(() => [MJAIAgentRunMedia_])
32887
+ MJ_AIAgentRunMedias_SourcePromptRunMediaIDArray: MJAIAgentRunMedia_[]; // Link to MJ_AIAgentRunMedias
32888
+
32889
+ }
32890
+
32891
+ //****************************************************************************
32892
+ // INPUT TYPE for MJ: AI Prompt Run Medias
32893
+ //****************************************************************************
32894
+ @InputType()
32895
+ export class CreateMJAIPromptRunMediaInput {
32896
+ @Field({ nullable: true })
32897
+ ID?: string;
32898
+
32899
+ @Field({ nullable: true })
32900
+ PromptRunID?: string;
32901
+
32902
+ @Field({ nullable: true })
32903
+ ModalityID?: string;
32904
+
32905
+ @Field({ nullable: true })
32906
+ MimeType?: string;
32907
+
32908
+ @Field({ nullable: true })
32909
+ FileName: string | null;
32910
+
32911
+ @Field(() => Int, { nullable: true })
32912
+ FileSizeBytes: number | null;
32913
+
32914
+ @Field(() => Int, { nullable: true })
32915
+ Width: number | null;
32916
+
32917
+ @Field(() => Int, { nullable: true })
32918
+ Height: number | null;
32919
+
32920
+ @Field(() => Float, { nullable: true })
32921
+ DurationSeconds: number | null;
32922
+
32923
+ @Field({ nullable: true })
32924
+ InlineData: string | null;
32925
+
32926
+ @Field({ nullable: true })
32927
+ FileID: string | null;
32928
+
32929
+ @Field({ nullable: true })
32930
+ ThumbnailBase64: string | null;
32931
+
32932
+ @Field({ nullable: true })
32933
+ Metadata: string | null;
32934
+
32935
+ @Field(() => Int, { nullable: true })
32936
+ DisplayOrder?: number;
32937
+
32938
+ @Field({ nullable: true })
32939
+ Description: string | null;
32940
+ }
32941
+
32942
+
32943
+ //****************************************************************************
32944
+ // INPUT TYPE for MJ: AI Prompt Run Medias
32945
+ //****************************************************************************
32946
+ @InputType()
32947
+ export class UpdateMJAIPromptRunMediaInput {
32948
+ @Field()
32949
+ ID: string;
32950
+
32951
+ @Field({ nullable: true })
32952
+ PromptRunID?: string;
32953
+
32954
+ @Field({ nullable: true })
32955
+ ModalityID?: string;
32956
+
32957
+ @Field({ nullable: true })
32958
+ MimeType?: string;
32959
+
32960
+ @Field({ nullable: true })
32961
+ FileName?: string | null;
32962
+
32963
+ @Field(() => Int, { nullable: true })
32964
+ FileSizeBytes?: number | null;
32965
+
32966
+ @Field(() => Int, { nullable: true })
32967
+ Width?: number | null;
32968
+
32969
+ @Field(() => Int, { nullable: true })
32970
+ Height?: number | null;
32971
+
32972
+ @Field(() => Float, { nullable: true })
32973
+ DurationSeconds?: number | null;
32974
+
32975
+ @Field({ nullable: true })
32976
+ InlineData?: string | null;
32977
+
32978
+ @Field({ nullable: true })
32979
+ FileID?: string | null;
32980
+
32981
+ @Field({ nullable: true })
32982
+ ThumbnailBase64?: string | null;
32983
+
32984
+ @Field({ nullable: true })
32985
+ Metadata?: string | null;
32986
+
32987
+ @Field(() => Int, { nullable: true })
32988
+ DisplayOrder?: number;
32989
+
32990
+ @Field({ nullable: true })
32991
+ Description?: string | null;
32992
+
32993
+ @Field(() => [KeyValuePairInput], { nullable: true })
32994
+ OldValues___?: KeyValuePairInput[];
32995
+ }
32996
+
32997
+ //****************************************************************************
32998
+ // RESOLVER for MJ: AI Prompt Run Medias
32999
+ //****************************************************************************
33000
+ @ObjectType()
33001
+ export class RunMJAIPromptRunMediaViewResult {
33002
+ @Field(() => [MJAIPromptRunMedia_])
33003
+ Results: MJAIPromptRunMedia_[];
33004
+
33005
+ @Field(() => String, {nullable: true})
33006
+ UserViewRunID?: string;
33007
+
33008
+ @Field(() => Int, {nullable: true})
33009
+ RowCount: number;
33010
+
33011
+ @Field(() => Int, {nullable: true})
33012
+ TotalRowCount: number;
33013
+
33014
+ @Field(() => Int, {nullable: true})
33015
+ ExecutionTime: number;
33016
+
33017
+ @Field({nullable: true})
33018
+ ErrorMessage?: string;
33019
+
33020
+ @Field(() => Boolean, {nullable: false})
33021
+ Success: boolean;
33022
+ }
33023
+
33024
+ @Resolver(MJAIPromptRunMedia_)
33025
+ export class MJAIPromptRunMediaResolver extends ResolverBase {
33026
+ @Query(() => RunMJAIPromptRunMediaViewResult)
33027
+ async RunMJAIPromptRunMediaViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
33028
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
33029
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
33030
+ }
33031
+
33032
+ @Query(() => RunMJAIPromptRunMediaViewResult)
33033
+ async RunMJAIPromptRunMediaViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
33034
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
33035
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
33036
+ }
33037
+
33038
+ @Query(() => RunMJAIPromptRunMediaViewResult)
33039
+ async RunMJAIPromptRunMediaDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
33040
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
33041
+ input.EntityName = 'MJ: AI Prompt Run Medias';
33042
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
33043
+ }
33044
+ @Query(() => MJAIPromptRunMedia_, { nullable: true })
33045
+ async MJAIPromptRunMedia(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIPromptRunMedia_ | null> {
33046
+ this.CheckUserReadPermissions('MJ: AI Prompt Run Medias', userPayload);
33047
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
33048
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
33049
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRunMedias] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Run Medias', userPayload, EntityPermissionType.Read, 'AND');
33050
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
33051
+ const result = await this.MapFieldNamesToCodeNames('MJ: AI Prompt Run Medias', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
33052
+ return result;
33053
+ }
33054
+
33055
+ @FieldResolver(() => [MJAIAgentRunMedia_])
33056
+ async MJ_AIAgentRunMedias_SourcePromptRunMediaIDArray(@Root() mjaipromptrunmedia_: MJAIPromptRunMedia_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
33057
+ this.CheckUserReadPermissions('MJ: AI Agent Run Medias', userPayload);
33058
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
33059
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
33060
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunMedias] WHERE [SourcePromptRunMediaID]='${mjaipromptrunmedia_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Medias', userPayload, EntityPermissionType.Read, 'AND');
33061
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
33062
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Medias', rows, this.GetUserFromPayload(userPayload));
33063
+ return result;
33064
+ }
33065
+
33066
+ @Mutation(() => MJAIPromptRunMedia_)
33067
+ async CreateMJAIPromptRunMedia(
33068
+ @Arg('input', () => CreateMJAIPromptRunMediaInput) input: CreateMJAIPromptRunMediaInput,
33069
+ @Ctx() { providers, userPayload }: AppContext,
33070
+ @PubSub() pubSub: PubSubEngine
33071
+ ) {
33072
+ const provider = GetReadWriteProvider(providers);
33073
+ return this.CreateRecord('MJ: AI Prompt Run Medias', input, provider, userPayload, pubSub)
33074
+ }
33075
+
33076
+ @Mutation(() => MJAIPromptRunMedia_)
33077
+ async UpdateMJAIPromptRunMedia(
33078
+ @Arg('input', () => UpdateMJAIPromptRunMediaInput) input: UpdateMJAIPromptRunMediaInput,
33079
+ @Ctx() { providers, userPayload }: AppContext,
33080
+ @PubSub() pubSub: PubSubEngine
33081
+ ) {
33082
+ const provider = GetReadWriteProvider(providers);
33083
+ return this.UpdateRecord('MJ: AI Prompt Run Medias', input, provider, userPayload, pubSub);
33084
+ }
33085
+
33086
+ @Mutation(() => MJAIPromptRunMedia_)
33087
+ async DeleteMJAIPromptRunMedia(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
33088
+ const provider = GetReadWriteProvider(providers);
33089
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
33090
+ return this.DeleteRecord('MJ: AI Prompt Run Medias', key, options, provider, userPayload, pubSub);
33091
+ }
33092
+
33093
+ }
33094
+
32088
33095
  //****************************************************************************
32089
33096
  // ENTITY CLASS for MJ: AI Prompt Runs
32090
33097
  //****************************************************************************
@@ -32432,6 +33439,9 @@ export class MJAIPromptRun_ {
32432
33439
  @Field(() => [MJAIPromptRun_])
32433
33440
  MJ_AIPromptRuns_ParentIDArray: MJAIPromptRun_[]; // Link to MJ_AIPromptRuns
32434
33441
 
33442
+ @Field(() => [MJAIPromptRunMedia_])
33443
+ MJ_AIPromptRunMedias_PromptRunIDArray: MJAIPromptRunMedia_[]; // Link to MJ_AIPromptRunMedias
33444
+
32435
33445
  @Field(() => [MJAIResultCache_])
32436
33446
  AIResultCache_PromptRunIDArray: MJAIResultCache_[]; // Link to AIResultCache
32437
33447
 
@@ -33014,6 +34024,17 @@ export class MJAIPromptRunResolver extends ResolverBase {
33014
34024
  return result;
33015
34025
  }
33016
34026
 
34027
+ @FieldResolver(() => [MJAIPromptRunMedia_])
34028
+ async MJ_AIPromptRunMedias_PromptRunIDArray(@Root() mjaipromptrun_: MJAIPromptRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
34029
+ this.CheckUserReadPermissions('MJ: AI Prompt Run Medias', userPayload);
34030
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
34031
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
34032
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRunMedias] WHERE [PromptRunID]='${mjaipromptrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Run Medias', userPayload, EntityPermissionType.Read, 'AND');
34033
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
34034
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Run Medias', rows, this.GetUserFromPayload(userPayload));
34035
+ return result;
34036
+ }
34037
+
33017
34038
  @FieldResolver(() => [MJAIResultCache_])
33018
34039
  async AIResultCache_PromptRunIDArray(@Root() mjaipromptrun_: MJAIPromptRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
33019
34040
  this.CheckUserReadPermissions('AI Result Cache', userPayload);
@@ -37504,6 +38525,9 @@ export class MJConversationDetailArtifact_ {
37504
38525
  @MaxLength(10)
37505
38526
  _mj__UpdatedAt: Date;
37506
38527
 
38528
+ @Field()
38529
+ ConversationDetail: string;
38530
+
37507
38531
  @Field({nullable: true})
37508
38532
  @MaxLength(510)
37509
38533
  ArtifactVersion?: string;
@@ -37695,6 +38719,9 @@ export class MJConversationDetailAttachment_ {
37695
38719
  @MaxLength(10)
37696
38720
  _mj__UpdatedAt: Date;
37697
38721
 
38722
+ @Field({nullable: true, description: `Description of the attachment providing context about its content and purpose.`})
38723
+ Description?: string;
38724
+
37698
38725
  @Field()
37699
38726
  ConversationDetail: string;
37700
38727
 
@@ -37751,6 +38778,9 @@ export class CreateMJConversationDetailAttachmentInput {
37751
38778
 
37752
38779
  @Field({ nullable: true })
37753
38780
  ThumbnailBase64: string | null;
38781
+
38782
+ @Field({ nullable: true })
38783
+ Description: string | null;
37754
38784
  }
37755
38785
 
37756
38786
 
@@ -37798,6 +38828,9 @@ export class UpdateMJConversationDetailAttachmentInput {
37798
38828
  @Field({ nullable: true })
37799
38829
  ThumbnailBase64?: string | null;
37800
38830
 
38831
+ @Field({ nullable: true })
38832
+ Description?: string | null;
38833
+
37801
38834
  @Field(() => [KeyValuePairInput], { nullable: true })
37802
38835
  OldValues___?: KeyValuePairInput[];
37803
38836
  }
@@ -37920,6 +38953,9 @@ export class MJConversationDetailRating_ {
37920
38953
  @MaxLength(10)
37921
38954
  _mj__UpdatedAt: Date;
37922
38955
 
38956
+ @Field()
38957
+ ConversationDetail: string;
38958
+
37923
38959
  @Field()
37924
38960
  @MaxLength(200)
37925
38961
  User: string;
@@ -38732,6 +39768,811 @@ export class MJCredentialResolver extends ResolverBase {
38732
39768
 
38733
39769
  }
38734
39770
 
39771
+ //****************************************************************************
39772
+ // ENTITY CLASS for MJ: Dashboard Category Links
39773
+ //****************************************************************************
39774
+ @ObjectType({ description: `Allows users to organize shared dashboards into their own category structure. Creates a link/reference to a dashboard without duplicating it. Users can optionally provide a custom display name and control ordering within their folders.` })
39775
+ export class MJDashboardCategoryLink_ {
39776
+ @Field()
39777
+ @MaxLength(16)
39778
+ ID: string;
39779
+
39780
+ @Field()
39781
+ @MaxLength(16)
39782
+ DashboardID: string;
39783
+
39784
+ @Field()
39785
+ @MaxLength(16)
39786
+ UserID: string;
39787
+
39788
+ @Field({nullable: true, description: `The category in the user's personal folder structure. NULL means the dashboard appears at root level.`})
39789
+ @MaxLength(16)
39790
+ DashboardCategoryID?: string;
39791
+
39792
+ @Field({nullable: true, description: `Optional user-friendly alias for the dashboard within this user's view. If NULL, uses the original dashboard name.`})
39793
+ @MaxLength(510)
39794
+ DisplayName?: string;
39795
+
39796
+ @Field(() => Int, {description: `Display order of this dashboard within the user's category. Lower values appear first.`})
39797
+ Sequence: number;
39798
+
39799
+ @Field()
39800
+ @MaxLength(10)
39801
+ _mj__CreatedAt: Date;
39802
+
39803
+ @Field()
39804
+ @MaxLength(10)
39805
+ _mj__UpdatedAt: Date;
39806
+
39807
+ @Field()
39808
+ @MaxLength(510)
39809
+ Dashboard: string;
39810
+
39811
+ @Field()
39812
+ @MaxLength(200)
39813
+ User: string;
39814
+
39815
+ @Field({nullable: true})
39816
+ @MaxLength(200)
39817
+ DashboardCategory?: string;
39818
+
39819
+ }
39820
+
39821
+ //****************************************************************************
39822
+ // INPUT TYPE for MJ: Dashboard Category Links
39823
+ //****************************************************************************
39824
+ @InputType()
39825
+ export class CreateMJDashboardCategoryLinkInput {
39826
+ @Field({ nullable: true })
39827
+ ID?: string;
39828
+
39829
+ @Field({ nullable: true })
39830
+ DashboardID?: string;
39831
+
39832
+ @Field({ nullable: true })
39833
+ UserID?: string;
39834
+
39835
+ @Field({ nullable: true })
39836
+ DashboardCategoryID: string | null;
39837
+
39838
+ @Field({ nullable: true })
39839
+ DisplayName: string | null;
39840
+
39841
+ @Field(() => Int, { nullable: true })
39842
+ Sequence?: number;
39843
+ }
39844
+
39845
+
39846
+ //****************************************************************************
39847
+ // INPUT TYPE for MJ: Dashboard Category Links
39848
+ //****************************************************************************
39849
+ @InputType()
39850
+ export class UpdateMJDashboardCategoryLinkInput {
39851
+ @Field()
39852
+ ID: string;
39853
+
39854
+ @Field({ nullable: true })
39855
+ DashboardID?: string;
39856
+
39857
+ @Field({ nullable: true })
39858
+ UserID?: string;
39859
+
39860
+ @Field({ nullable: true })
39861
+ DashboardCategoryID?: string | null;
39862
+
39863
+ @Field({ nullable: true })
39864
+ DisplayName?: string | null;
39865
+
39866
+ @Field(() => Int, { nullable: true })
39867
+ Sequence?: number;
39868
+
39869
+ @Field(() => [KeyValuePairInput], { nullable: true })
39870
+ OldValues___?: KeyValuePairInput[];
39871
+ }
39872
+
39873
+ //****************************************************************************
39874
+ // RESOLVER for MJ: Dashboard Category Links
39875
+ //****************************************************************************
39876
+ @ObjectType()
39877
+ export class RunMJDashboardCategoryLinkViewResult {
39878
+ @Field(() => [MJDashboardCategoryLink_])
39879
+ Results: MJDashboardCategoryLink_[];
39880
+
39881
+ @Field(() => String, {nullable: true})
39882
+ UserViewRunID?: string;
39883
+
39884
+ @Field(() => Int, {nullable: true})
39885
+ RowCount: number;
39886
+
39887
+ @Field(() => Int, {nullable: true})
39888
+ TotalRowCount: number;
39889
+
39890
+ @Field(() => Int, {nullable: true})
39891
+ ExecutionTime: number;
39892
+
39893
+ @Field({nullable: true})
39894
+ ErrorMessage?: string;
39895
+
39896
+ @Field(() => Boolean, {nullable: false})
39897
+ Success: boolean;
39898
+ }
39899
+
39900
+ @Resolver(MJDashboardCategoryLink_)
39901
+ export class MJDashboardCategoryLinkResolver extends ResolverBase {
39902
+ @Query(() => RunMJDashboardCategoryLinkViewResult)
39903
+ async RunMJDashboardCategoryLinkViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
39904
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
39905
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
39906
+ }
39907
+
39908
+ @Query(() => RunMJDashboardCategoryLinkViewResult)
39909
+ async RunMJDashboardCategoryLinkViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
39910
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
39911
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
39912
+ }
39913
+
39914
+ @Query(() => RunMJDashboardCategoryLinkViewResult)
39915
+ async RunMJDashboardCategoryLinkDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
39916
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
39917
+ input.EntityName = 'MJ: Dashboard Category Links';
39918
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
39919
+ }
39920
+ @Query(() => MJDashboardCategoryLink_, { nullable: true })
39921
+ async MJDashboardCategoryLink(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJDashboardCategoryLink_ | null> {
39922
+ this.CheckUserReadPermissions('MJ: Dashboard Category Links', userPayload);
39923
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
39924
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
39925
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategoryLinks] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Links', userPayload, EntityPermissionType.Read, 'AND');
39926
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
39927
+ const result = await this.MapFieldNamesToCodeNames('MJ: Dashboard Category Links', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
39928
+ return result;
39929
+ }
39930
+
39931
+ @Mutation(() => MJDashboardCategoryLink_)
39932
+ async CreateMJDashboardCategoryLink(
39933
+ @Arg('input', () => CreateMJDashboardCategoryLinkInput) input: CreateMJDashboardCategoryLinkInput,
39934
+ @Ctx() { providers, userPayload }: AppContext,
39935
+ @PubSub() pubSub: PubSubEngine
39936
+ ) {
39937
+ const provider = GetReadWriteProvider(providers);
39938
+ return this.CreateRecord('MJ: Dashboard Category Links', input, provider, userPayload, pubSub)
39939
+ }
39940
+
39941
+ @Mutation(() => MJDashboardCategoryLink_)
39942
+ async UpdateMJDashboardCategoryLink(
39943
+ @Arg('input', () => UpdateMJDashboardCategoryLinkInput) input: UpdateMJDashboardCategoryLinkInput,
39944
+ @Ctx() { providers, userPayload }: AppContext,
39945
+ @PubSub() pubSub: PubSubEngine
39946
+ ) {
39947
+ const provider = GetReadWriteProvider(providers);
39948
+ return this.UpdateRecord('MJ: Dashboard Category Links', input, provider, userPayload, pubSub);
39949
+ }
39950
+
39951
+ @Mutation(() => MJDashboardCategoryLink_)
39952
+ async DeleteMJDashboardCategoryLink(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
39953
+ const provider = GetReadWriteProvider(providers);
39954
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
39955
+ return this.DeleteRecord('MJ: Dashboard Category Links', key, options, provider, userPayload, pubSub);
39956
+ }
39957
+
39958
+ }
39959
+
39960
+ //****************************************************************************
39961
+ // ENTITY CLASS for MJ: Dashboard Category Permissions
39962
+ //****************************************************************************
39963
+ @ObjectType({ description: `Manages user permissions for dashboard categories (folders). Permissions cascade to all dashboards within the category. Enables sharing entire folders of dashboards with granular access control.` })
39964
+ export class MJDashboardCategoryPermission_ {
39965
+ @Field()
39966
+ @MaxLength(16)
39967
+ ID: string;
39968
+
39969
+ @Field()
39970
+ @MaxLength(16)
39971
+ DashboardCategoryID: string;
39972
+
39973
+ @Field()
39974
+ @MaxLength(16)
39975
+ UserID: string;
39976
+
39977
+ @Field(() => Boolean, {description: `Whether the user can view dashboards within this category`})
39978
+ CanRead: boolean;
39979
+
39980
+ @Field(() => Boolean, {description: `Whether the user can modify dashboards within this category`})
39981
+ CanEdit: boolean;
39982
+
39983
+ @Field(() => Boolean, {description: `Whether the user can add new dashboards to or remove dashboards from this category`})
39984
+ CanAddRemove: boolean;
39985
+
39986
+ @Field(() => Boolean, {description: `Whether the user can share this category with other users`})
39987
+ CanShare: boolean;
39988
+
39989
+ @Field({nullable: true, description: `The user who granted this permission. NULL if shared by the category owner.`})
39990
+ @MaxLength(16)
39991
+ SharedByUserID?: string;
39992
+
39993
+ @Field()
39994
+ @MaxLength(10)
39995
+ _mj__CreatedAt: Date;
39996
+
39997
+ @Field()
39998
+ @MaxLength(10)
39999
+ _mj__UpdatedAt: Date;
40000
+
40001
+ @Field()
40002
+ @MaxLength(200)
40003
+ DashboardCategory: string;
40004
+
40005
+ @Field()
40006
+ @MaxLength(200)
40007
+ User: string;
40008
+
40009
+ @Field({nullable: true})
40010
+ @MaxLength(200)
40011
+ SharedByUser?: string;
40012
+
40013
+ }
40014
+
40015
+ //****************************************************************************
40016
+ // INPUT TYPE for MJ: Dashboard Category Permissions
40017
+ //****************************************************************************
40018
+ @InputType()
40019
+ export class CreateMJDashboardCategoryPermissionInput {
40020
+ @Field({ nullable: true })
40021
+ ID?: string;
40022
+
40023
+ @Field({ nullable: true })
40024
+ DashboardCategoryID?: string;
40025
+
40026
+ @Field({ nullable: true })
40027
+ UserID?: string;
40028
+
40029
+ @Field(() => Boolean, { nullable: true })
40030
+ CanRead?: boolean;
40031
+
40032
+ @Field(() => Boolean, { nullable: true })
40033
+ CanEdit?: boolean;
40034
+
40035
+ @Field(() => Boolean, { nullable: true })
40036
+ CanAddRemove?: boolean;
40037
+
40038
+ @Field(() => Boolean, { nullable: true })
40039
+ CanShare?: boolean;
40040
+
40041
+ @Field({ nullable: true })
40042
+ SharedByUserID: string | null;
40043
+ }
40044
+
40045
+
40046
+ //****************************************************************************
40047
+ // INPUT TYPE for MJ: Dashboard Category Permissions
40048
+ //****************************************************************************
40049
+ @InputType()
40050
+ export class UpdateMJDashboardCategoryPermissionInput {
40051
+ @Field()
40052
+ ID: string;
40053
+
40054
+ @Field({ nullable: true })
40055
+ DashboardCategoryID?: string;
40056
+
40057
+ @Field({ nullable: true })
40058
+ UserID?: string;
40059
+
40060
+ @Field(() => Boolean, { nullable: true })
40061
+ CanRead?: boolean;
40062
+
40063
+ @Field(() => Boolean, { nullable: true })
40064
+ CanEdit?: boolean;
40065
+
40066
+ @Field(() => Boolean, { nullable: true })
40067
+ CanAddRemove?: boolean;
40068
+
40069
+ @Field(() => Boolean, { nullable: true })
40070
+ CanShare?: boolean;
40071
+
40072
+ @Field({ nullable: true })
40073
+ SharedByUserID?: string | null;
40074
+
40075
+ @Field(() => [KeyValuePairInput], { nullable: true })
40076
+ OldValues___?: KeyValuePairInput[];
40077
+ }
40078
+
40079
+ //****************************************************************************
40080
+ // RESOLVER for MJ: Dashboard Category Permissions
40081
+ //****************************************************************************
40082
+ @ObjectType()
40083
+ export class RunMJDashboardCategoryPermissionViewResult {
40084
+ @Field(() => [MJDashboardCategoryPermission_])
40085
+ Results: MJDashboardCategoryPermission_[];
40086
+
40087
+ @Field(() => String, {nullable: true})
40088
+ UserViewRunID?: string;
40089
+
40090
+ @Field(() => Int, {nullable: true})
40091
+ RowCount: number;
40092
+
40093
+ @Field(() => Int, {nullable: true})
40094
+ TotalRowCount: number;
40095
+
40096
+ @Field(() => Int, {nullable: true})
40097
+ ExecutionTime: number;
40098
+
40099
+ @Field({nullable: true})
40100
+ ErrorMessage?: string;
40101
+
40102
+ @Field(() => Boolean, {nullable: false})
40103
+ Success: boolean;
40104
+ }
40105
+
40106
+ @Resolver(MJDashboardCategoryPermission_)
40107
+ export class MJDashboardCategoryPermissionResolver extends ResolverBase {
40108
+ @Query(() => RunMJDashboardCategoryPermissionViewResult)
40109
+ async RunMJDashboardCategoryPermissionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40110
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40111
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
40112
+ }
40113
+
40114
+ @Query(() => RunMJDashboardCategoryPermissionViewResult)
40115
+ async RunMJDashboardCategoryPermissionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40116
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40117
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
40118
+ }
40119
+
40120
+ @Query(() => RunMJDashboardCategoryPermissionViewResult)
40121
+ async RunMJDashboardCategoryPermissionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40122
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40123
+ input.EntityName = 'MJ: Dashboard Category Permissions';
40124
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
40125
+ }
40126
+ @Query(() => MJDashboardCategoryPermission_, { nullable: true })
40127
+ async MJDashboardCategoryPermission(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJDashboardCategoryPermission_ | null> {
40128
+ this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
40129
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40130
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
40131
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategoryPermissions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Permissions', userPayload, EntityPermissionType.Read, 'AND');
40132
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
40133
+ const result = await this.MapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
40134
+ return result;
40135
+ }
40136
+
40137
+ @Mutation(() => MJDashboardCategoryPermission_)
40138
+ async CreateMJDashboardCategoryPermission(
40139
+ @Arg('input', () => CreateMJDashboardCategoryPermissionInput) input: CreateMJDashboardCategoryPermissionInput,
40140
+ @Ctx() { providers, userPayload }: AppContext,
40141
+ @PubSub() pubSub: PubSubEngine
40142
+ ) {
40143
+ const provider = GetReadWriteProvider(providers);
40144
+ return this.CreateRecord('MJ: Dashboard Category Permissions', input, provider, userPayload, pubSub)
40145
+ }
40146
+
40147
+ @Mutation(() => MJDashboardCategoryPermission_)
40148
+ async UpdateMJDashboardCategoryPermission(
40149
+ @Arg('input', () => UpdateMJDashboardCategoryPermissionInput) input: UpdateMJDashboardCategoryPermissionInput,
40150
+ @Ctx() { providers, userPayload }: AppContext,
40151
+ @PubSub() pubSub: PubSubEngine
40152
+ ) {
40153
+ const provider = GetReadWriteProvider(providers);
40154
+ return this.UpdateRecord('MJ: Dashboard Category Permissions', input, provider, userPayload, pubSub);
40155
+ }
40156
+
40157
+ @Mutation(() => MJDashboardCategoryPermission_)
40158
+ async DeleteMJDashboardCategoryPermission(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40159
+ const provider = GetReadWriteProvider(providers);
40160
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
40161
+ return this.DeleteRecord('MJ: Dashboard Category Permissions', key, options, provider, userPayload, pubSub);
40162
+ }
40163
+
40164
+ }
40165
+
40166
+ //****************************************************************************
40167
+ // ENTITY CLASS for MJ: Dashboard Part Types
40168
+ //****************************************************************************
40169
+ @ObjectType({ description: `Stores available panel types for metadata-driven dashboards. Each panel type defines a driver class for rendering content and an optional config dialog for setup UI.` })
40170
+ export class MJDashboardPartType_ {
40171
+ @Field({description: `Primary key`})
40172
+ @MaxLength(16)
40173
+ ID: string;
40174
+
40175
+ @Field({description: `Unique name for the panel type (e.g., View, Query, Artifact, WebURL, Custom)`})
40176
+ @MaxLength(200)
40177
+ Name: string;
40178
+
40179
+ @Field({nullable: true, description: `Detailed description of what this panel type displays and its capabilities`})
40180
+ Description?: string;
40181
+
40182
+ @Field({nullable: true, description: `Font Awesome icon class for the panel type (e.g., fa-solid fa-table)`})
40183
+ @MaxLength(200)
40184
+ Icon?: string;
40185
+
40186
+ @Field({description: `The @RegisterClass name for the panel renderer component that extends DashboardBasePanelRenderer`})
40187
+ @MaxLength(510)
40188
+ DriverClass: string;
40189
+
40190
+ @Field({nullable: true, description: `The @RegisterClass name for the configuration dialog component that extends DashboardBasePanelConfigDialog`})
40191
+ @MaxLength(510)
40192
+ ConfigDialogClass?: string;
40193
+
40194
+ @Field({nullable: true, description: `JSON object containing default configuration values for new panels of this type`})
40195
+ DefaultConfig?: string;
40196
+
40197
+ @Field(() => Int, {description: `Display order in panel type selection UI (lower numbers appear first)`})
40198
+ SortOrder: number;
40199
+
40200
+ @Field(() => Boolean, {description: `Whether this panel type is currently available for use`})
40201
+ IsActive: boolean;
40202
+
40203
+ @Field()
40204
+ @MaxLength(10)
40205
+ _mj__CreatedAt: Date;
40206
+
40207
+ @Field()
40208
+ @MaxLength(10)
40209
+ _mj__UpdatedAt: Date;
40210
+
40211
+ }
40212
+
40213
+ //****************************************************************************
40214
+ // INPUT TYPE for MJ: Dashboard Part Types
40215
+ //****************************************************************************
40216
+ @InputType()
40217
+ export class CreateMJDashboardPartTypeInput {
40218
+ @Field({ nullable: true })
40219
+ ID?: string;
40220
+
40221
+ @Field({ nullable: true })
40222
+ Name?: string;
40223
+
40224
+ @Field({ nullable: true })
40225
+ Description: string | null;
40226
+
40227
+ @Field({ nullable: true })
40228
+ Icon: string | null;
40229
+
40230
+ @Field({ nullable: true })
40231
+ DriverClass?: string;
40232
+
40233
+ @Field({ nullable: true })
40234
+ ConfigDialogClass: string | null;
40235
+
40236
+ @Field({ nullable: true })
40237
+ DefaultConfig: string | null;
40238
+
40239
+ @Field(() => Int, { nullable: true })
40240
+ SortOrder?: number;
40241
+
40242
+ @Field(() => Boolean, { nullable: true })
40243
+ IsActive?: boolean;
40244
+ }
40245
+
40246
+
40247
+ //****************************************************************************
40248
+ // INPUT TYPE for MJ: Dashboard Part Types
40249
+ //****************************************************************************
40250
+ @InputType()
40251
+ export class UpdateMJDashboardPartTypeInput {
40252
+ @Field()
40253
+ ID: string;
40254
+
40255
+ @Field({ nullable: true })
40256
+ Name?: string;
40257
+
40258
+ @Field({ nullable: true })
40259
+ Description?: string | null;
40260
+
40261
+ @Field({ nullable: true })
40262
+ Icon?: string | null;
40263
+
40264
+ @Field({ nullable: true })
40265
+ DriverClass?: string;
40266
+
40267
+ @Field({ nullable: true })
40268
+ ConfigDialogClass?: string | null;
40269
+
40270
+ @Field({ nullable: true })
40271
+ DefaultConfig?: string | null;
40272
+
40273
+ @Field(() => Int, { nullable: true })
40274
+ SortOrder?: number;
40275
+
40276
+ @Field(() => Boolean, { nullable: true })
40277
+ IsActive?: boolean;
40278
+
40279
+ @Field(() => [KeyValuePairInput], { nullable: true })
40280
+ OldValues___?: KeyValuePairInput[];
40281
+ }
40282
+
40283
+ //****************************************************************************
40284
+ // RESOLVER for MJ: Dashboard Part Types
40285
+ //****************************************************************************
40286
+ @ObjectType()
40287
+ export class RunMJDashboardPartTypeViewResult {
40288
+ @Field(() => [MJDashboardPartType_])
40289
+ Results: MJDashboardPartType_[];
40290
+
40291
+ @Field(() => String, {nullable: true})
40292
+ UserViewRunID?: string;
40293
+
40294
+ @Field(() => Int, {nullable: true})
40295
+ RowCount: number;
40296
+
40297
+ @Field(() => Int, {nullable: true})
40298
+ TotalRowCount: number;
40299
+
40300
+ @Field(() => Int, {nullable: true})
40301
+ ExecutionTime: number;
40302
+
40303
+ @Field({nullable: true})
40304
+ ErrorMessage?: string;
40305
+
40306
+ @Field(() => Boolean, {nullable: false})
40307
+ Success: boolean;
40308
+ }
40309
+
40310
+ @Resolver(MJDashboardPartType_)
40311
+ export class MJDashboardPartTypeResolver extends ResolverBase {
40312
+ @Query(() => RunMJDashboardPartTypeViewResult)
40313
+ async RunMJDashboardPartTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40314
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40315
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
40316
+ }
40317
+
40318
+ @Query(() => RunMJDashboardPartTypeViewResult)
40319
+ async RunMJDashboardPartTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40320
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40321
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
40322
+ }
40323
+
40324
+ @Query(() => RunMJDashboardPartTypeViewResult)
40325
+ async RunMJDashboardPartTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40326
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40327
+ input.EntityName = 'MJ: Dashboard Part Types';
40328
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
40329
+ }
40330
+ @Query(() => MJDashboardPartType_, { nullable: true })
40331
+ async MJDashboardPartType(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJDashboardPartType_ | null> {
40332
+ this.CheckUserReadPermissions('MJ: Dashboard Part Types', userPayload);
40333
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40334
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
40335
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardPartTypes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Part Types', userPayload, EntityPermissionType.Read, 'AND');
40336
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
40337
+ const result = await this.MapFieldNamesToCodeNames('MJ: Dashboard Part Types', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
40338
+ return result;
40339
+ }
40340
+
40341
+ @Mutation(() => MJDashboardPartType_)
40342
+ async CreateMJDashboardPartType(
40343
+ @Arg('input', () => CreateMJDashboardPartTypeInput) input: CreateMJDashboardPartTypeInput,
40344
+ @Ctx() { providers, userPayload }: AppContext,
40345
+ @PubSub() pubSub: PubSubEngine
40346
+ ) {
40347
+ const provider = GetReadWriteProvider(providers);
40348
+ return this.CreateRecord('MJ: Dashboard Part Types', input, provider, userPayload, pubSub)
40349
+ }
40350
+
40351
+ @Mutation(() => MJDashboardPartType_)
40352
+ async UpdateMJDashboardPartType(
40353
+ @Arg('input', () => UpdateMJDashboardPartTypeInput) input: UpdateMJDashboardPartTypeInput,
40354
+ @Ctx() { providers, userPayload }: AppContext,
40355
+ @PubSub() pubSub: PubSubEngine
40356
+ ) {
40357
+ const provider = GetReadWriteProvider(providers);
40358
+ return this.UpdateRecord('MJ: Dashboard Part Types', input, provider, userPayload, pubSub);
40359
+ }
40360
+
40361
+ @Mutation(() => MJDashboardPartType_)
40362
+ async DeleteMJDashboardPartType(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40363
+ const provider = GetReadWriteProvider(providers);
40364
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
40365
+ return this.DeleteRecord('MJ: Dashboard Part Types', key, options, provider, userPayload, pubSub);
40366
+ }
40367
+
40368
+ }
40369
+
40370
+ //****************************************************************************
40371
+ // ENTITY CLASS for MJ: Dashboard Permissions
40372
+ //****************************************************************************
40373
+ @ObjectType({ description: `Manages user permissions for dashboards with granular access control (Read, Edit, Delete, Share). Each record grants a specific user access to a dashboard with configurable permission levels.` })
40374
+ export class MJDashboardPermission_ {
40375
+ @Field()
40376
+ @MaxLength(16)
40377
+ ID: string;
40378
+
40379
+ @Field()
40380
+ @MaxLength(16)
40381
+ DashboardID: string;
40382
+
40383
+ @Field()
40384
+ @MaxLength(16)
40385
+ UserID: string;
40386
+
40387
+ @Field(() => Boolean, {description: `Whether the user can view the dashboard and its contents`})
40388
+ CanRead: boolean;
40389
+
40390
+ @Field(() => Boolean, {description: `Whether the user can modify the dashboard layout, add/remove parts, or change settings`})
40391
+ CanEdit: boolean;
40392
+
40393
+ @Field(() => Boolean, {description: `Whether the user can delete the dashboard entirely`})
40394
+ CanDelete: boolean;
40395
+
40396
+ @Field(() => Boolean, {description: `Whether the user can share the dashboard with other users`})
40397
+ CanShare: boolean;
40398
+
40399
+ @Field({nullable: true, description: `The user who granted this permission. NULL if shared by the dashboard owner.`})
40400
+ @MaxLength(16)
40401
+ SharedByUserID?: string;
40402
+
40403
+ @Field()
40404
+ @MaxLength(10)
40405
+ _mj__CreatedAt: Date;
40406
+
40407
+ @Field()
40408
+ @MaxLength(10)
40409
+ _mj__UpdatedAt: Date;
40410
+
40411
+ @Field()
40412
+ @MaxLength(510)
40413
+ Dashboard: string;
40414
+
40415
+ @Field()
40416
+ @MaxLength(200)
40417
+ User: string;
40418
+
40419
+ @Field({nullable: true})
40420
+ @MaxLength(200)
40421
+ SharedByUser?: string;
40422
+
40423
+ }
40424
+
40425
+ //****************************************************************************
40426
+ // INPUT TYPE for MJ: Dashboard Permissions
40427
+ //****************************************************************************
40428
+ @InputType()
40429
+ export class CreateMJDashboardPermissionInput {
40430
+ @Field({ nullable: true })
40431
+ ID?: string;
40432
+
40433
+ @Field({ nullable: true })
40434
+ DashboardID?: string;
40435
+
40436
+ @Field({ nullable: true })
40437
+ UserID?: string;
40438
+
40439
+ @Field(() => Boolean, { nullable: true })
40440
+ CanRead?: boolean;
40441
+
40442
+ @Field(() => Boolean, { nullable: true })
40443
+ CanEdit?: boolean;
40444
+
40445
+ @Field(() => Boolean, { nullable: true })
40446
+ CanDelete?: boolean;
40447
+
40448
+ @Field(() => Boolean, { nullable: true })
40449
+ CanShare?: boolean;
40450
+
40451
+ @Field({ nullable: true })
40452
+ SharedByUserID: string | null;
40453
+ }
40454
+
40455
+
40456
+ //****************************************************************************
40457
+ // INPUT TYPE for MJ: Dashboard Permissions
40458
+ //****************************************************************************
40459
+ @InputType()
40460
+ export class UpdateMJDashboardPermissionInput {
40461
+ @Field()
40462
+ ID: string;
40463
+
40464
+ @Field({ nullable: true })
40465
+ DashboardID?: string;
40466
+
40467
+ @Field({ nullable: true })
40468
+ UserID?: string;
40469
+
40470
+ @Field(() => Boolean, { nullable: true })
40471
+ CanRead?: boolean;
40472
+
40473
+ @Field(() => Boolean, { nullable: true })
40474
+ CanEdit?: boolean;
40475
+
40476
+ @Field(() => Boolean, { nullable: true })
40477
+ CanDelete?: boolean;
40478
+
40479
+ @Field(() => Boolean, { nullable: true })
40480
+ CanShare?: boolean;
40481
+
40482
+ @Field({ nullable: true })
40483
+ SharedByUserID?: string | null;
40484
+
40485
+ @Field(() => [KeyValuePairInput], { nullable: true })
40486
+ OldValues___?: KeyValuePairInput[];
40487
+ }
40488
+
40489
+ //****************************************************************************
40490
+ // RESOLVER for MJ: Dashboard Permissions
40491
+ //****************************************************************************
40492
+ @ObjectType()
40493
+ export class RunMJDashboardPermissionViewResult {
40494
+ @Field(() => [MJDashboardPermission_])
40495
+ Results: MJDashboardPermission_[];
40496
+
40497
+ @Field(() => String, {nullable: true})
40498
+ UserViewRunID?: string;
40499
+
40500
+ @Field(() => Int, {nullable: true})
40501
+ RowCount: number;
40502
+
40503
+ @Field(() => Int, {nullable: true})
40504
+ TotalRowCount: number;
40505
+
40506
+ @Field(() => Int, {nullable: true})
40507
+ ExecutionTime: number;
40508
+
40509
+ @Field({nullable: true})
40510
+ ErrorMessage?: string;
40511
+
40512
+ @Field(() => Boolean, {nullable: false})
40513
+ Success: boolean;
40514
+ }
40515
+
40516
+ @Resolver(MJDashboardPermission_)
40517
+ export class MJDashboardPermissionResolver extends ResolverBase {
40518
+ @Query(() => RunMJDashboardPermissionViewResult)
40519
+ async RunMJDashboardPermissionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40520
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40521
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
40522
+ }
40523
+
40524
+ @Query(() => RunMJDashboardPermissionViewResult)
40525
+ async RunMJDashboardPermissionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40526
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40527
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
40528
+ }
40529
+
40530
+ @Query(() => RunMJDashboardPermissionViewResult)
40531
+ async RunMJDashboardPermissionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40532
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40533
+ input.EntityName = 'MJ: Dashboard Permissions';
40534
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
40535
+ }
40536
+ @Query(() => MJDashboardPermission_, { nullable: true })
40537
+ async MJDashboardPermission(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJDashboardPermission_ | null> {
40538
+ this.CheckUserReadPermissions('MJ: Dashboard Permissions', userPayload);
40539
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
40540
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
40541
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardPermissions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Permissions', userPayload, EntityPermissionType.Read, 'AND');
40542
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
40543
+ const result = await this.MapFieldNamesToCodeNames('MJ: Dashboard Permissions', rows && rows.length > 0 ? rows[0] : {}, this.GetUserFromPayload(userPayload));
40544
+ return result;
40545
+ }
40546
+
40547
+ @Mutation(() => MJDashboardPermission_)
40548
+ async CreateMJDashboardPermission(
40549
+ @Arg('input', () => CreateMJDashboardPermissionInput) input: CreateMJDashboardPermissionInput,
40550
+ @Ctx() { providers, userPayload }: AppContext,
40551
+ @PubSub() pubSub: PubSubEngine
40552
+ ) {
40553
+ const provider = GetReadWriteProvider(providers);
40554
+ return this.CreateRecord('MJ: Dashboard Permissions', input, provider, userPayload, pubSub)
40555
+ }
40556
+
40557
+ @Mutation(() => MJDashboardPermission_)
40558
+ async UpdateMJDashboardPermission(
40559
+ @Arg('input', () => UpdateMJDashboardPermissionInput) input: UpdateMJDashboardPermissionInput,
40560
+ @Ctx() { providers, userPayload }: AppContext,
40561
+ @PubSub() pubSub: PubSubEngine
40562
+ ) {
40563
+ const provider = GetReadWriteProvider(providers);
40564
+ return this.UpdateRecord('MJ: Dashboard Permissions', input, provider, userPayload, pubSub);
40565
+ }
40566
+
40567
+ @Mutation(() => MJDashboardPermission_)
40568
+ async DeleteMJDashboardPermission(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
40569
+ const provider = GetReadWriteProvider(providers);
40570
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
40571
+ return this.DeleteRecord('MJ: Dashboard Permissions', key, options, provider, userPayload, pubSub);
40572
+ }
40573
+
40574
+ }
40575
+
38735
40576
  //****************************************************************************
38736
40577
  // ENTITY CLASS for MJ: Dashboard User Preferences
38737
40578
  //****************************************************************************
@@ -42903,6 +44744,9 @@ export class MJTask_ {
42903
44744
  @MaxLength(510)
42904
44745
  Project?: string;
42905
44746
 
44747
+ @Field({nullable: true})
44748
+ ConversationDetail?: string;
44749
+
42906
44750
  @Field({nullable: true})
42907
44751
  @MaxLength(200)
42908
44752
  User?: string;
@@ -43667,6 +45511,9 @@ export class MJTestRun_ {
43667
45511
  @MaxLength(16)
43668
45512
  TargetLogEntityID?: string;
43669
45513
 
45514
+ @Field({nullable: true, description: `JSON object containing the final resolved variable values used during test execution. Includes both the resolved values and the source of each value (run, suite, test, or type level). Stored for reproducibility and auditing.`})
45515
+ ResolvedVariables?: string;
45516
+
43670
45517
  @Field()
43671
45518
  @MaxLength(510)
43672
45519
  Test: string;
@@ -43791,6 +45638,9 @@ export class CreateMJTestRunInput {
43791
45638
 
43792
45639
  @Field({ nullable: true })
43793
45640
  TargetLogEntityID: string | null;
45641
+
45642
+ @Field({ nullable: true })
45643
+ ResolvedVariables: string | null;
43794
45644
  }
43795
45645
 
43796
45646
 
@@ -43886,6 +45736,9 @@ export class UpdateMJTestRunInput {
43886
45736
  @Field({ nullable: true })
43887
45737
  TargetLogEntityID?: string | null;
43888
45738
 
45739
+ @Field({ nullable: true })
45740
+ ResolvedVariables?: string | null;
45741
+
43889
45742
  @Field(() => [KeyValuePairInput], { nullable: true })
43890
45743
  OldValues___?: KeyValuePairInput[];
43891
45744
  }
@@ -44137,6 +45990,9 @@ export class MJTestSuiteRun_ {
44137
45990
  @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.`})
44138
45991
  RunContextDetails?: string;
44139
45992
 
45993
+ @Field({nullable: true, description: `JSON object containing the variable values provided at suite run level. These values were applied to all tests in the suite run and can be seen on individual TestRun.ResolvedVariables with source="suite".`})
45994
+ ResolvedVariables?: string;
45995
+
44140
45996
  @Field()
44141
45997
  @MaxLength(510)
44142
45998
  Suite: string;
@@ -44232,6 +46088,9 @@ export class CreateMJTestSuiteRunInput {
44232
46088
 
44233
46089
  @Field({ nullable: true })
44234
46090
  RunContextDetails: string | null;
46091
+
46092
+ @Field({ nullable: true })
46093
+ ResolvedVariables: string | null;
44235
46094
  }
44236
46095
 
44237
46096
 
@@ -44318,6 +46177,9 @@ export class UpdateMJTestSuiteRunInput {
44318
46177
  @Field({ nullable: true })
44319
46178
  RunContextDetails?: string | null;
44320
46179
 
46180
+ @Field({ nullable: true })
46181
+ ResolvedVariables?: string | null;
46182
+
44321
46183
  @Field(() => [KeyValuePairInput], { nullable: true })
44322
46184
  OldValues___?: KeyValuePairInput[];
44323
46185
  }
@@ -44645,6 +46507,9 @@ export class MJTestSuite_ {
44645
46507
  @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.`})
44646
46508
  MaxExecutionTimeMS?: number;
44647
46509
 
46510
+ @Field({nullable: true, description: `JSON object containing variable values to apply to all tests in this suite. These values override test-level defaults but can be overridden by run-level values.`})
46511
+ Variables?: string;
46512
+
44648
46513
  @Field({nullable: true})
44649
46514
  @MaxLength(510)
44650
46515
  Parent?: string;
@@ -44692,6 +46557,9 @@ export class CreateMJTestSuiteInput {
44692
46557
 
44693
46558
  @Field(() => Int, { nullable: true })
44694
46559
  MaxExecutionTimeMS: number | null;
46560
+
46561
+ @Field({ nullable: true })
46562
+ Variables: string | null;
44695
46563
  }
44696
46564
 
44697
46565
 
@@ -44724,6 +46592,9 @@ export class UpdateMJTestSuiteInput {
44724
46592
  @Field(() => Int, { nullable: true })
44725
46593
  MaxExecutionTimeMS?: number | null;
44726
46594
 
46595
+ @Field({ nullable: true })
46596
+ Variables?: string | null;
46597
+
44727
46598
  @Field(() => [KeyValuePairInput], { nullable: true })
44728
46599
  OldValues___?: KeyValuePairInput[];
44729
46600
  }
@@ -44880,6 +46751,9 @@ export class MJTestType_ {
44880
46751
  @MaxLength(10)
44881
46752
  _mj__UpdatedAt: Date;
44882
46753
 
46754
+ @Field({nullable: true, description: `JSON schema defining the variables available for tests of this type. Contains schemaVersion and array of variable definitions with name, displayName, description, dataType, valueSource, possibleValues, defaultValue, and required fields.`})
46755
+ VariablesSchema?: string;
46756
+
44883
46757
  @Field(() => [MJTestRubric_])
44884
46758
  MJ_TestRubrics_TypeIDArray: MJTestRubric_[]; // Link to MJ_TestRubrics
44885
46759
 
@@ -44907,6 +46781,9 @@ export class CreateMJTestTypeInput {
44907
46781
 
44908
46782
  @Field({ nullable: true })
44909
46783
  Status?: string;
46784
+
46785
+ @Field({ nullable: true })
46786
+ VariablesSchema: string | null;
44910
46787
  }
44911
46788
 
44912
46789
 
@@ -44930,6 +46807,9 @@ export class UpdateMJTestTypeInput {
44930
46807
  @Field({ nullable: true })
44931
46808
  Status?: string;
44932
46809
 
46810
+ @Field({ nullable: true })
46811
+ VariablesSchema?: string | null;
46812
+
44933
46813
  @Field(() => [KeyValuePairInput], { nullable: true })
44934
46814
  OldValues___?: KeyValuePairInput[];
44935
46815
  }
@@ -45102,6 +46982,9 @@ export class MJTest_ {
45102
46982
  @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.`})
45103
46983
  MaxExecutionTimeMS?: number;
45104
46984
 
46985
+ @Field({nullable: true, description: `JSON configuration for which test type variables are exposed by this test, along with test-level defaults, locks, and value restrictions. References variables defined in the parent TestType.VariablesSchema.`})
46986
+ Variables?: string;
46987
+
45105
46988
  @Field()
45106
46989
  @MaxLength(200)
45107
46990
  Type: string;
@@ -45160,6 +47043,9 @@ export class CreateMJTestInput {
45160
47043
 
45161
47044
  @Field(() => Int, { nullable: true })
45162
47045
  MaxExecutionTimeMS: number | null;
47046
+
47047
+ @Field({ nullable: true })
47048
+ Variables: string | null;
45163
47049
  }
45164
47050
 
45165
47051
 
@@ -45210,6 +47096,9 @@ export class UpdateMJTestInput {
45210
47096
  @Field(() => Int, { nullable: true })
45211
47097
  MaxExecutionTimeMS?: number | null;
45212
47098
 
47099
+ @Field({ nullable: true })
47100
+ Variables?: string | null;
47101
+
45213
47102
  @Field(() => [KeyValuePairInput], { nullable: true })
45214
47103
  OldValues___?: KeyValuePairInput[];
45215
47104
  }
@@ -47942,6 +49831,9 @@ export class MJRecommendationItem_ {
47942
49831
  @MaxLength(10)
47943
49832
  _mj__UpdatedAt: Date;
47944
49833
 
49834
+ @Field()
49835
+ Recommendation: string;
49836
+
47945
49837
  @Field()
47946
49838
  @MaxLength(510)
47947
49839
  DestinationEntity: string;
@@ -48479,6 +50371,10 @@ export class MJRecommendation_ {
48479
50371
  @MaxLength(10)
48480
50372
  _mj__UpdatedAt: Date;
48481
50373
 
50374
+ @Field()
50375
+ @MaxLength(510)
50376
+ RecommendationRun: string;
50377
+
48482
50378
  @Field()
48483
50379
  @MaxLength(510)
48484
50380
  SourceEntity: string;
@@ -48888,6 +50784,10 @@ export class MJRecordChange_ {
48888
50784
  @MaxLength(200)
48889
50785
  User: string;
48890
50786
 
50787
+ @Field({nullable: true})
50788
+ @MaxLength(200)
50789
+ ReplayRun?: string;
50790
+
48891
50791
  @Field({nullable: true})
48892
50792
  @MaxLength(200)
48893
50793
  Integration?: string;
@@ -49119,6 +51019,10 @@ export class MJRecordMergeDeletionLog_ {
49119
51019
  @MaxLength(10)
49120
51020
  _mj__UpdatedAt: Date;
49121
51021
 
51022
+ @Field()
51023
+ @MaxLength(900)
51024
+ RecordMergeLog: string;
51025
+
49122
51026
  }
49123
51027
 
49124
51028
  //****************************************************************************
@@ -49986,6 +51890,9 @@ export class MJReport_ {
49986
51890
  @MaxLength(510)
49987
51891
  Conversation?: string;
49988
51892
 
51893
+ @Field({nullable: true})
51894
+ ConversationDetail?: string;
51895
+
49989
51896
  @Field({nullable: true})
49990
51897
  @MaxLength(510)
49991
51898
  DataContext?: string;
@@ -53235,6 +55142,10 @@ export class MJTemplateParam_ {
53235
55142
  @MaxLength(510)
53236
55143
  Entity?: string;
53237
55144
 
55145
+ @Field({nullable: true})
55146
+ @MaxLength(510)
55147
+ TemplateContent?: string;
55148
+
53238
55149
  }
53239
55150
 
53240
55151
  //****************************************************************************
@@ -55962,12 +57873,12 @@ export class MJUser_ {
55962
57873
  @Field(() => [MJDashboardUserState_])
55963
57874
  MJ_DashboardUserStates_UserIDArray: MJDashboardUserState_[]; // Link to MJ_DashboardUserStates
55964
57875
 
55965
- @Field(() => [MJPublicLink_])
55966
- MJ_PublicLinks_UserIDArray: MJPublicLink_[]; // Link to MJ_PublicLinks
55967
-
55968
57876
  @Field(() => [MJArtifactVersion_])
55969
57877
  MJ_ArtifactVersions_UserIDArray: MJArtifactVersion_[]; // Link to MJ_ArtifactVersions
55970
57878
 
57879
+ @Field(() => [MJPublicLink_])
57880
+ MJ_PublicLinks_UserIDArray: MJPublicLink_[]; // Link to MJ_PublicLinks
57881
+
55971
57882
  @Field(() => [MJScheduledJobRun_])
55972
57883
  MJ_ScheduledJobRuns_ExecutedByUserIDArray: MJScheduledJobRun_[]; // Link to MJ_ScheduledJobRuns
55973
57884
 
@@ -55992,11 +57903,20 @@ export class MJUser_ {
55992
57903
  @Field(() => [MJUserSetting_])
55993
57904
  MJ_UserSettings_UserIDArray: MJUserSetting_[]; // Link to MJ_UserSettings
55994
57905
 
57906
+ @Field(() => [MJListShare_])
57907
+ MJ_ListShares_UserIDArray: MJListShare_[]; // Link to MJ_ListShares
57908
+
55995
57909
  @Field(() => [MJListInvitation_])
55996
57910
  MJ_ListInvitations_CreatedByUserIDArray: MJListInvitation_[]; // Link to MJ_ListInvitations
55997
57911
 
55998
- @Field(() => [MJListShare_])
55999
- MJ_ListShares_UserIDArray: MJListShare_[]; // Link to MJ_ListShares
57912
+ @Field(() => [MJDashboardCategoryLink_])
57913
+ MJ_DashboardCategoryLinks_UserIDArray: MJDashboardCategoryLink_[]; // Link to MJ_DashboardCategoryLinks
57914
+
57915
+ @Field(() => [MJDashboardCategoryPermission_])
57916
+ MJ_DashboardCategoryPermissions_UserIDArray: MJDashboardCategoryPermission_[]; // Link to MJ_DashboardCategoryPermissions
57917
+
57918
+ @Field(() => [MJDashboardPermission_])
57919
+ MJ_DashboardPermissions_SharedByUserIDArray: MJDashboardPermission_[]; // Link to MJ_DashboardPermissions
56000
57920
 
56001
57921
  @Field(() => [MJResourcePermission_])
56002
57922
  ResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to ResourcePermissions
@@ -56025,6 +57945,12 @@ export class MJUser_ {
56025
57945
  @Field(() => [MJTestRun_])
56026
57946
  MJ_TestRuns_RunByUserIDArray: MJTestRun_[]; // Link to MJ_TestRuns
56027
57947
 
57948
+ @Field(() => [MJDashboardPermission_])
57949
+ MJ_DashboardPermissions_UserIDArray: MJDashboardPermission_[]; // Link to MJ_DashboardPermissions
57950
+
57951
+ @Field(() => [MJDashboardCategoryPermission_])
57952
+ MJ_DashboardCategoryPermissions_SharedByUserIDArray: MJDashboardCategoryPermission_[]; // Link to MJ_DashboardCategoryPermissions
57953
+
56028
57954
  @Field(() => [MJAIAgentRun_])
56029
57955
  MJ_AIAgentRuns_UserIDArray: MJAIAgentRun_[]; // Link to MJ_AIAgentRuns
56030
57956
 
@@ -56635,25 +58561,25 @@ export class MJUserResolverBase extends ResolverBase {
56635
58561
  return result;
56636
58562
  }
56637
58563
 
56638
- @FieldResolver(() => [MJPublicLink_])
56639
- async MJ_PublicLinks_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
56640
- this.CheckUserReadPermissions('MJ: Public Links', userPayload);
58564
+ @FieldResolver(() => [MJArtifactVersion_])
58565
+ async MJ_ArtifactVersions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
58566
+ this.CheckUserReadPermissions('MJ: Artifact Versions', userPayload);
56641
58567
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
56642
58568
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
56643
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwPublicLinks] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Public Links', userPayload, EntityPermissionType.Read, 'AND');
58569
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactVersions] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
56644
58570
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
56645
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Public Links', rows, this.GetUserFromPayload(userPayload));
58571
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Versions', rows, this.GetUserFromPayload(userPayload));
56646
58572
  return result;
56647
58573
  }
56648
58574
 
56649
- @FieldResolver(() => [MJArtifactVersion_])
56650
- async MJ_ArtifactVersions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
56651
- this.CheckUserReadPermissions('MJ: Artifact Versions', userPayload);
58575
+ @FieldResolver(() => [MJPublicLink_])
58576
+ async MJ_PublicLinks_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
58577
+ this.CheckUserReadPermissions('MJ: Public Links', userPayload);
56652
58578
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
56653
58579
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
56654
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactVersions] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
58580
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwPublicLinks] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Public Links', userPayload, EntityPermissionType.Read, 'AND');
56655
58581
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
56656
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Versions', rows, this.GetUserFromPayload(userPayload));
58582
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Public Links', rows, this.GetUserFromPayload(userPayload));
56657
58583
  return result;
56658
58584
  }
56659
58585
 
@@ -56745,6 +58671,17 @@ export class MJUserResolverBase extends ResolverBase {
56745
58671
  return result;
56746
58672
  }
56747
58673
 
58674
+ @FieldResolver(() => [MJListShare_])
58675
+ async MJ_ListShares_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
58676
+ this.CheckUserReadPermissions('MJ: List Shares', userPayload);
58677
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
58678
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
58679
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwListShares] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: List Shares', userPayload, EntityPermissionType.Read, 'AND');
58680
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
58681
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: List Shares', rows, this.GetUserFromPayload(userPayload));
58682
+ return result;
58683
+ }
58684
+
56748
58685
  @FieldResolver(() => [MJListInvitation_])
56749
58686
  async MJ_ListInvitations_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
56750
58687
  this.CheckUserReadPermissions('MJ: List Invitations', userPayload);
@@ -56756,14 +58693,36 @@ export class MJUserResolverBase extends ResolverBase {
56756
58693
  return result;
56757
58694
  }
56758
58695
 
56759
- @FieldResolver(() => [MJListShare_])
56760
- async MJ_ListShares_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
56761
- this.CheckUserReadPermissions('MJ: List Shares', userPayload);
58696
+ @FieldResolver(() => [MJDashboardCategoryLink_])
58697
+ async MJ_DashboardCategoryLinks_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
58698
+ this.CheckUserReadPermissions('MJ: Dashboard Category Links', userPayload);
56762
58699
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
56763
58700
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
56764
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwListShares] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: List Shares', userPayload, EntityPermissionType.Read, 'AND');
58701
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategoryLinks] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Links', userPayload, EntityPermissionType.Read, 'AND');
56765
58702
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
56766
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: List Shares', rows, this.GetUserFromPayload(userPayload));
58703
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Links', rows, this.GetUserFromPayload(userPayload));
58704
+ return result;
58705
+ }
58706
+
58707
+ @FieldResolver(() => [MJDashboardCategoryPermission_])
58708
+ async MJ_DashboardCategoryPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
58709
+ this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
58710
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
58711
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
58712
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategoryPermissions] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Permissions', userPayload, EntityPermissionType.Read, 'AND');
58713
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
58714
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
58715
+ return result;
58716
+ }
58717
+
58718
+ @FieldResolver(() => [MJDashboardPermission_])
58719
+ async MJ_DashboardPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
58720
+ this.CheckUserReadPermissions('MJ: Dashboard Permissions', userPayload);
58721
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
58722
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
58723
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardPermissions] WHERE [SharedByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Permissions', userPayload, EntityPermissionType.Read, 'AND');
58724
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
58725
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Permissions', rows, this.GetUserFromPayload(userPayload));
56767
58726
  return result;
56768
58727
  }
56769
58728
 
@@ -56866,6 +58825,28 @@ export class MJUserResolverBase extends ResolverBase {
56866
58825
  return result;
56867
58826
  }
56868
58827
 
58828
+ @FieldResolver(() => [MJDashboardPermission_])
58829
+ async MJ_DashboardPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
58830
+ this.CheckUserReadPermissions('MJ: Dashboard Permissions', userPayload);
58831
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
58832
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
58833
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardPermissions] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Permissions', userPayload, EntityPermissionType.Read, 'AND');
58834
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
58835
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Permissions', rows, this.GetUserFromPayload(userPayload));
58836
+ return result;
58837
+ }
58838
+
58839
+ @FieldResolver(() => [MJDashboardCategoryPermission_])
58840
+ async MJ_DashboardCategoryPermissions_SharedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
58841
+ this.CheckUserReadPermissions('MJ: Dashboard Category Permissions', userPayload);
58842
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
58843
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
58844
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategoryPermissions] WHERE [SharedByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard Category Permissions', userPayload, EntityPermissionType.Read, 'AND');
58845
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
58846
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard Category Permissions', rows, this.GetUserFromPayload(userPayload));
58847
+ return result;
58848
+ }
58849
+
56869
58850
  @FieldResolver(() => [MJAIAgentRun_])
56870
58851
  async MJ_AIAgentRuns_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
56871
58852
  this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);