@memberjunction/server 3.0.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.
- package/dist/config.d.ts +16 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -3
- package/dist/config.js.map +1 -1
- package/dist/generated/generated.d.ts +481 -4
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +3304 -334
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +5 -2
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/generic/RunViewResolver.d.ts +5 -0
- package/dist/generic/RunViewResolver.d.ts.map +1 -1
- package/dist/generic/RunViewResolver.js +53 -4
- package/dist/generic/RunViewResolver.js.map +1 -1
- package/dist/resolvers/RunTestResolver.d.ts +2 -2
- package/dist/resolvers/RunTestResolver.d.ts.map +1 -1
- package/dist/resolvers/RunTestResolver.js +33 -11
- package/dist/resolvers/RunTestResolver.js.map +1 -1
- package/package.json +51 -45
- package/src/__tests__/setup.ts +21 -0
- package/src/config.ts +3 -3
- package/src/generated/generated.ts +1894 -21
- package/src/generic/ResolverBase.ts +6 -2
- package/src/generic/RunViewResolver.ts +55 -5
- package/src/resolvers/RunTestResolver.ts +25 -0
- package/dist/apolloServer/TransactionPlugin.d.ts +0 -4
- package/dist/apolloServer/TransactionPlugin.d.ts.map +0 -1
- package/dist/apolloServer/TransactionPlugin.js +0 -46
- package/dist/apolloServer/TransactionPlugin.js.map +0 -1
- package/dist/auth/__tests__/backward-compatibility.test.d.ts +0 -2
- package/dist/auth/__tests__/backward-compatibility.test.d.ts.map +0 -1
- package/dist/auth/__tests__/backward-compatibility.test.js +0 -135
- 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
|
}
|
|
@@ -14070,6 +14080,12 @@ export class MJDashboardCategory_ {
|
|
|
14070
14080
|
@Field(() => [MJDashboardCategory_])
|
|
14071
14081
|
DashboardCategories_ParentIDArray: MJDashboardCategory_[]; // Link to DashboardCategories
|
|
14072
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
|
+
|
|
14073
14089
|
}
|
|
14074
14090
|
|
|
14075
14091
|
//****************************************************************************
|
|
@@ -14198,6 +14214,28 @@ export class MJDashboardCategoryResolver extends ResolverBase {
|
|
|
14198
14214
|
return result;
|
|
14199
14215
|
}
|
|
14200
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
|
+
|
|
14201
14239
|
@Mutation(() => MJDashboardCategory_)
|
|
14202
14240
|
async CreateMJDashboardCategory(
|
|
14203
14241
|
@Arg('input', () => CreateMJDashboardCategoryInput) input: CreateMJDashboardCategoryInput,
|
|
@@ -14308,9 +14346,15 @@ export class MJDashboard_ {
|
|
|
14308
14346
|
@Field(() => [MJDashboardUserState_])
|
|
14309
14347
|
MJ_DashboardUserStates_DashboardIDArray: MJDashboardUserState_[]; // Link to MJ_DashboardUserStates
|
|
14310
14348
|
|
|
14349
|
+
@Field(() => [MJDashboardCategoryLink_])
|
|
14350
|
+
MJ_DashboardCategoryLinks_DashboardIDArray: MJDashboardCategoryLink_[]; // Link to MJ_DashboardCategoryLinks
|
|
14351
|
+
|
|
14311
14352
|
@Field(() => [MJDashboardUserPreference_])
|
|
14312
14353
|
MJ_DashboardUserPreferences_DashboardIDArray: MJDashboardUserPreference_[]; // Link to MJ_DashboardUserPreferences
|
|
14313
14354
|
|
|
14355
|
+
@Field(() => [MJDashboardPermission_])
|
|
14356
|
+
MJ_DashboardPermissions_DashboardIDArray: MJDashboardPermission_[]; // Link to MJ_DashboardPermissions
|
|
14357
|
+
|
|
14314
14358
|
}
|
|
14315
14359
|
|
|
14316
14360
|
//****************************************************************************
|
|
@@ -14476,6 +14520,17 @@ export class MJDashboardResolver extends ResolverBase {
|
|
|
14476
14520
|
return result;
|
|
14477
14521
|
}
|
|
14478
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
|
+
|
|
14479
14534
|
@FieldResolver(() => [MJDashboardUserPreference_])
|
|
14480
14535
|
async MJ_DashboardUserPreferences_DashboardIDArray(@Root() mjdashboard_: MJDashboard_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14481
14536
|
this.CheckUserReadPermissions('MJ: Dashboard User Preferences', userPayload);
|
|
@@ -14487,6 +14542,17 @@ export class MJDashboardResolver extends ResolverBase {
|
|
|
14487
14542
|
return result;
|
|
14488
14543
|
}
|
|
14489
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
|
+
|
|
14490
14556
|
@Mutation(() => MJDashboard_)
|
|
14491
14557
|
async CreateMJDashboard(
|
|
14492
14558
|
@Arg('input', () => CreateMJDashboardInput) input: CreateMJDashboardInput,
|
|
@@ -23466,9 +23532,15 @@ export class MJFile_ {
|
|
|
23466
23532
|
@Field(() => [MJFileEntityRecordLink_])
|
|
23467
23533
|
FileEntityRecordLinks_FileIDArray: MJFileEntityRecordLink_[]; // Link to FileEntityRecordLinks
|
|
23468
23534
|
|
|
23535
|
+
@Field(() => [MJAIPromptRunMedia_])
|
|
23536
|
+
MJ_AIPromptRunMedias_FileIDArray: MJAIPromptRunMedia_[]; // Link to MJ_AIPromptRunMedias
|
|
23537
|
+
|
|
23469
23538
|
@Field(() => [MJConversationDetailAttachment_])
|
|
23470
23539
|
MJ_ConversationDetailAttachments_FileIDArray: MJConversationDetailAttachment_[]; // Link to MJ_ConversationDetailAttachments
|
|
23471
23540
|
|
|
23541
|
+
@Field(() => [MJAIAgentRunMedia_])
|
|
23542
|
+
MJ_AIAgentRunMedias_FileIDArray: MJAIAgentRunMedia_[]; // Link to MJ_AIAgentRunMedias
|
|
23543
|
+
|
|
23472
23544
|
}
|
|
23473
23545
|
|
|
23474
23546
|
//****************************************************************************
|
|
@@ -23604,6 +23676,17 @@ export class MJFileResolver extends ResolverBase {
|
|
|
23604
23676
|
return result;
|
|
23605
23677
|
}
|
|
23606
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
|
+
|
|
23607
23690
|
@FieldResolver(() => [MJConversationDetailAttachment_])
|
|
23608
23691
|
async MJ_ConversationDetailAttachments_FileIDArray(@Root() mjfile_: MJFile_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23609
23692
|
this.CheckUserReadPermissions('MJ: Conversation Detail Attachments', userPayload);
|
|
@@ -23615,6 +23698,17 @@ export class MJFileResolver extends ResolverBase {
|
|
|
23615
23698
|
return result;
|
|
23616
23699
|
}
|
|
23617
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
|
+
|
|
23618
23712
|
@Mutation(() => MJFile_)
|
|
23619
23713
|
async CreateMJFile(
|
|
23620
23714
|
@Arg('input', () => CreateMJFileInput) input: CreateMJFileInput,
|
|
@@ -23644,6 +23738,220 @@ export class MJFileResolver extends ResolverBase {
|
|
|
23644
23738
|
|
|
23645
23739
|
}
|
|
23646
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
|
+
|
|
23647
23955
|
//****************************************************************************
|
|
23648
23956
|
// ENTITY CLASS for Generated Code Categories
|
|
23649
23957
|
//****************************************************************************
|
|
@@ -27613,6 +27921,301 @@ export class MJAIAgentRelationshipResolver extends ResolverBase {
|
|
|
27613
27921
|
|
|
27614
27922
|
}
|
|
27615
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
|
+
|
|
27616
28219
|
//****************************************************************************
|
|
27617
28220
|
// ENTITY CLASS for MJ: AI Agent Run Steps
|
|
27618
28221
|
//****************************************************************************
|
|
@@ -28163,6 +28766,9 @@ each time the agent processes a prompt step.`})
|
|
|
28163
28766
|
@Field(() => [MJAIAgentNote_])
|
|
28164
28767
|
AIAgentNotes_SourceAIAgentRunIDArray: MJAIAgentNote_[]; // Link to AIAgentNotes
|
|
28165
28768
|
|
|
28769
|
+
@Field(() => [MJAIAgentRunMedia_])
|
|
28770
|
+
MJ_AIAgentRunMedias_AgentRunIDArray: MJAIAgentRunMedia_[]; // Link to MJ_AIAgentRunMedias
|
|
28771
|
+
|
|
28166
28772
|
@Field(() => [MJAIPromptRun_])
|
|
28167
28773
|
MJ_AIPromptRuns_AgentRunIDArray: MJAIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
28168
28774
|
|
|
@@ -28520,6 +29126,17 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
28520
29126
|
return result;
|
|
28521
29127
|
}
|
|
28522
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
|
+
|
|
28523
29140
|
@FieldResolver(() => [MJAIPromptRun_])
|
|
28524
29141
|
async MJ_AIPromptRuns_AgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28525
29142
|
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
@@ -30386,9 +31003,15 @@ export class MJAIModality_ {
|
|
|
30386
31003
|
@Field(() => [MJAIModelType_])
|
|
30387
31004
|
AIModelTypes_DefaultOutputModalityIDArray: MJAIModelType_[]; // Link to AIModelTypes
|
|
30388
31005
|
|
|
31006
|
+
@Field(() => [MJAIPromptRunMedia_])
|
|
31007
|
+
MJ_AIPromptRunMedias_ModalityIDArray: MJAIPromptRunMedia_[]; // Link to MJ_AIPromptRunMedias
|
|
31008
|
+
|
|
30389
31009
|
@Field(() => [MJAIModelType_])
|
|
30390
31010
|
AIModelTypes_DefaultInputModalityIDArray: MJAIModelType_[]; // Link to AIModelTypes
|
|
30391
31011
|
|
|
31012
|
+
@Field(() => [MJAIAgentRunMedia_])
|
|
31013
|
+
MJ_AIAgentRunMedias_ModalityIDArray: MJAIAgentRunMedia_[]; // Link to MJ_AIAgentRunMedias
|
|
31014
|
+
|
|
30392
31015
|
}
|
|
30393
31016
|
|
|
30394
31017
|
//****************************************************************************
|
|
@@ -30563,6 +31186,17 @@ export class MJAIModalityResolver extends ResolverBase {
|
|
|
30563
31186
|
return result;
|
|
30564
31187
|
}
|
|
30565
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
|
+
|
|
30566
31200
|
@FieldResolver(() => [MJAIModelType_])
|
|
30567
31201
|
async AIModelTypes_DefaultInputModalityIDArray(@Root() mjaimodality_: MJAIModality_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30568
31202
|
this.CheckUserReadPermissions('AI Model Types', userPayload);
|
|
@@ -30574,6 +31208,17 @@ export class MJAIModalityResolver extends ResolverBase {
|
|
|
30574
31208
|
return result;
|
|
30575
31209
|
}
|
|
30576
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
|
+
|
|
30577
31222
|
@Mutation(() => MJAIModality_)
|
|
30578
31223
|
async CreateMJAIModality(
|
|
30579
31224
|
@Arg('input', () => CreateMJAIModalityInput) input: CreateMJAIModalityInput,
|
|
@@ -32162,6 +32807,291 @@ export class MJAIPromptModelResolver extends ResolverBase {
|
|
|
32162
32807
|
|
|
32163
32808
|
}
|
|
32164
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
|
+
|
|
32165
33095
|
//****************************************************************************
|
|
32166
33096
|
// ENTITY CLASS for MJ: AI Prompt Runs
|
|
32167
33097
|
//****************************************************************************
|
|
@@ -32509,6 +33439,9 @@ export class MJAIPromptRun_ {
|
|
|
32509
33439
|
@Field(() => [MJAIPromptRun_])
|
|
32510
33440
|
MJ_AIPromptRuns_ParentIDArray: MJAIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
32511
33441
|
|
|
33442
|
+
@Field(() => [MJAIPromptRunMedia_])
|
|
33443
|
+
MJ_AIPromptRunMedias_PromptRunIDArray: MJAIPromptRunMedia_[]; // Link to MJ_AIPromptRunMedias
|
|
33444
|
+
|
|
32512
33445
|
@Field(() => [MJAIResultCache_])
|
|
32513
33446
|
AIResultCache_PromptRunIDArray: MJAIResultCache_[]; // Link to AIResultCache
|
|
32514
33447
|
|
|
@@ -33091,6 +34024,17 @@ export class MJAIPromptRunResolver extends ResolverBase {
|
|
|
33091
34024
|
return result;
|
|
33092
34025
|
}
|
|
33093
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
|
+
|
|
33094
34038
|
@FieldResolver(() => [MJAIResultCache_])
|
|
33095
34039
|
async AIResultCache_PromptRunIDArray(@Root() mjaipromptrun_: MJAIPromptRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
33096
34040
|
this.CheckUserReadPermissions('AI Result Cache', userPayload);
|
|
@@ -37775,6 +38719,9 @@ export class MJConversationDetailAttachment_ {
|
|
|
37775
38719
|
@MaxLength(10)
|
|
37776
38720
|
_mj__UpdatedAt: Date;
|
|
37777
38721
|
|
|
38722
|
+
@Field({nullable: true, description: `Description of the attachment providing context about its content and purpose.`})
|
|
38723
|
+
Description?: string;
|
|
38724
|
+
|
|
37778
38725
|
@Field()
|
|
37779
38726
|
ConversationDetail: string;
|
|
37780
38727
|
|
|
@@ -37831,6 +38778,9 @@ export class CreateMJConversationDetailAttachmentInput {
|
|
|
37831
38778
|
|
|
37832
38779
|
@Field({ nullable: true })
|
|
37833
38780
|
ThumbnailBase64: string | null;
|
|
38781
|
+
|
|
38782
|
+
@Field({ nullable: true })
|
|
38783
|
+
Description: string | null;
|
|
37834
38784
|
}
|
|
37835
38785
|
|
|
37836
38786
|
|
|
@@ -37878,6 +38828,9 @@ export class UpdateMJConversationDetailAttachmentInput {
|
|
|
37878
38828
|
@Field({ nullable: true })
|
|
37879
38829
|
ThumbnailBase64?: string | null;
|
|
37880
38830
|
|
|
38831
|
+
@Field({ nullable: true })
|
|
38832
|
+
Description?: string | null;
|
|
38833
|
+
|
|
37881
38834
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
37882
38835
|
OldValues___?: KeyValuePairInput[];
|
|
37883
38836
|
}
|
|
@@ -38815,6 +39768,811 @@ export class MJCredentialResolver extends ResolverBase {
|
|
|
38815
39768
|
|
|
38816
39769
|
}
|
|
38817
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
|
+
|
|
38818
40576
|
//****************************************************************************
|
|
38819
40577
|
// ENTITY CLASS for MJ: Dashboard User Preferences
|
|
38820
40578
|
//****************************************************************************
|
|
@@ -43753,6 +45511,9 @@ export class MJTestRun_ {
|
|
|
43753
45511
|
@MaxLength(16)
|
|
43754
45512
|
TargetLogEntityID?: string;
|
|
43755
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
|
+
|
|
43756
45517
|
@Field()
|
|
43757
45518
|
@MaxLength(510)
|
|
43758
45519
|
Test: string;
|
|
@@ -43877,6 +45638,9 @@ export class CreateMJTestRunInput {
|
|
|
43877
45638
|
|
|
43878
45639
|
@Field({ nullable: true })
|
|
43879
45640
|
TargetLogEntityID: string | null;
|
|
45641
|
+
|
|
45642
|
+
@Field({ nullable: true })
|
|
45643
|
+
ResolvedVariables: string | null;
|
|
43880
45644
|
}
|
|
43881
45645
|
|
|
43882
45646
|
|
|
@@ -43972,6 +45736,9 @@ export class UpdateMJTestRunInput {
|
|
|
43972
45736
|
@Field({ nullable: true })
|
|
43973
45737
|
TargetLogEntityID?: string | null;
|
|
43974
45738
|
|
|
45739
|
+
@Field({ nullable: true })
|
|
45740
|
+
ResolvedVariables?: string | null;
|
|
45741
|
+
|
|
43975
45742
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
43976
45743
|
OldValues___?: KeyValuePairInput[];
|
|
43977
45744
|
}
|
|
@@ -44223,6 +45990,9 @@ export class MJTestSuiteRun_ {
|
|
|
44223
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.`})
|
|
44224
45991
|
RunContextDetails?: string;
|
|
44225
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
|
+
|
|
44226
45996
|
@Field()
|
|
44227
45997
|
@MaxLength(510)
|
|
44228
45998
|
Suite: string;
|
|
@@ -44318,6 +46088,9 @@ export class CreateMJTestSuiteRunInput {
|
|
|
44318
46088
|
|
|
44319
46089
|
@Field({ nullable: true })
|
|
44320
46090
|
RunContextDetails: string | null;
|
|
46091
|
+
|
|
46092
|
+
@Field({ nullable: true })
|
|
46093
|
+
ResolvedVariables: string | null;
|
|
44321
46094
|
}
|
|
44322
46095
|
|
|
44323
46096
|
|
|
@@ -44404,6 +46177,9 @@ export class UpdateMJTestSuiteRunInput {
|
|
|
44404
46177
|
@Field({ nullable: true })
|
|
44405
46178
|
RunContextDetails?: string | null;
|
|
44406
46179
|
|
|
46180
|
+
@Field({ nullable: true })
|
|
46181
|
+
ResolvedVariables?: string | null;
|
|
46182
|
+
|
|
44407
46183
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
44408
46184
|
OldValues___?: KeyValuePairInput[];
|
|
44409
46185
|
}
|
|
@@ -44731,6 +46507,9 @@ export class MJTestSuite_ {
|
|
|
44731
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.`})
|
|
44732
46508
|
MaxExecutionTimeMS?: number;
|
|
44733
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
|
+
|
|
44734
46513
|
@Field({nullable: true})
|
|
44735
46514
|
@MaxLength(510)
|
|
44736
46515
|
Parent?: string;
|
|
@@ -44778,6 +46557,9 @@ export class CreateMJTestSuiteInput {
|
|
|
44778
46557
|
|
|
44779
46558
|
@Field(() => Int, { nullable: true })
|
|
44780
46559
|
MaxExecutionTimeMS: number | null;
|
|
46560
|
+
|
|
46561
|
+
@Field({ nullable: true })
|
|
46562
|
+
Variables: string | null;
|
|
44781
46563
|
}
|
|
44782
46564
|
|
|
44783
46565
|
|
|
@@ -44810,6 +46592,9 @@ export class UpdateMJTestSuiteInput {
|
|
|
44810
46592
|
@Field(() => Int, { nullable: true })
|
|
44811
46593
|
MaxExecutionTimeMS?: number | null;
|
|
44812
46594
|
|
|
46595
|
+
@Field({ nullable: true })
|
|
46596
|
+
Variables?: string | null;
|
|
46597
|
+
|
|
44813
46598
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
44814
46599
|
OldValues___?: KeyValuePairInput[];
|
|
44815
46600
|
}
|
|
@@ -44966,6 +46751,9 @@ export class MJTestType_ {
|
|
|
44966
46751
|
@MaxLength(10)
|
|
44967
46752
|
_mj__UpdatedAt: Date;
|
|
44968
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
|
+
|
|
44969
46757
|
@Field(() => [MJTestRubric_])
|
|
44970
46758
|
MJ_TestRubrics_TypeIDArray: MJTestRubric_[]; // Link to MJ_TestRubrics
|
|
44971
46759
|
|
|
@@ -44993,6 +46781,9 @@ export class CreateMJTestTypeInput {
|
|
|
44993
46781
|
|
|
44994
46782
|
@Field({ nullable: true })
|
|
44995
46783
|
Status?: string;
|
|
46784
|
+
|
|
46785
|
+
@Field({ nullable: true })
|
|
46786
|
+
VariablesSchema: string | null;
|
|
44996
46787
|
}
|
|
44997
46788
|
|
|
44998
46789
|
|
|
@@ -45016,6 +46807,9 @@ export class UpdateMJTestTypeInput {
|
|
|
45016
46807
|
@Field({ nullable: true })
|
|
45017
46808
|
Status?: string;
|
|
45018
46809
|
|
|
46810
|
+
@Field({ nullable: true })
|
|
46811
|
+
VariablesSchema?: string | null;
|
|
46812
|
+
|
|
45019
46813
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
45020
46814
|
OldValues___?: KeyValuePairInput[];
|
|
45021
46815
|
}
|
|
@@ -45188,6 +46982,9 @@ export class MJTest_ {
|
|
|
45188
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.`})
|
|
45189
46983
|
MaxExecutionTimeMS?: number;
|
|
45190
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
|
+
|
|
45191
46988
|
@Field()
|
|
45192
46989
|
@MaxLength(200)
|
|
45193
46990
|
Type: string;
|
|
@@ -45246,6 +47043,9 @@ export class CreateMJTestInput {
|
|
|
45246
47043
|
|
|
45247
47044
|
@Field(() => Int, { nullable: true })
|
|
45248
47045
|
MaxExecutionTimeMS: number | null;
|
|
47046
|
+
|
|
47047
|
+
@Field({ nullable: true })
|
|
47048
|
+
Variables: string | null;
|
|
45249
47049
|
}
|
|
45250
47050
|
|
|
45251
47051
|
|
|
@@ -45296,6 +47096,9 @@ export class UpdateMJTestInput {
|
|
|
45296
47096
|
@Field(() => Int, { nullable: true })
|
|
45297
47097
|
MaxExecutionTimeMS?: number | null;
|
|
45298
47098
|
|
|
47099
|
+
@Field({ nullable: true })
|
|
47100
|
+
Variables?: string | null;
|
|
47101
|
+
|
|
45299
47102
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
45300
47103
|
OldValues___?: KeyValuePairInput[];
|
|
45301
47104
|
}
|
|
@@ -56070,12 +57873,12 @@ export class MJUser_ {
|
|
|
56070
57873
|
@Field(() => [MJDashboardUserState_])
|
|
56071
57874
|
MJ_DashboardUserStates_UserIDArray: MJDashboardUserState_[]; // Link to MJ_DashboardUserStates
|
|
56072
57875
|
|
|
56073
|
-
@Field(() => [MJPublicLink_])
|
|
56074
|
-
MJ_PublicLinks_UserIDArray: MJPublicLink_[]; // Link to MJ_PublicLinks
|
|
56075
|
-
|
|
56076
57876
|
@Field(() => [MJArtifactVersion_])
|
|
56077
57877
|
MJ_ArtifactVersions_UserIDArray: MJArtifactVersion_[]; // Link to MJ_ArtifactVersions
|
|
56078
57878
|
|
|
57879
|
+
@Field(() => [MJPublicLink_])
|
|
57880
|
+
MJ_PublicLinks_UserIDArray: MJPublicLink_[]; // Link to MJ_PublicLinks
|
|
57881
|
+
|
|
56079
57882
|
@Field(() => [MJScheduledJobRun_])
|
|
56080
57883
|
MJ_ScheduledJobRuns_ExecutedByUserIDArray: MJScheduledJobRun_[]; // Link to MJ_ScheduledJobRuns
|
|
56081
57884
|
|
|
@@ -56100,11 +57903,20 @@ export class MJUser_ {
|
|
|
56100
57903
|
@Field(() => [MJUserSetting_])
|
|
56101
57904
|
MJ_UserSettings_UserIDArray: MJUserSetting_[]; // Link to MJ_UserSettings
|
|
56102
57905
|
|
|
57906
|
+
@Field(() => [MJListShare_])
|
|
57907
|
+
MJ_ListShares_UserIDArray: MJListShare_[]; // Link to MJ_ListShares
|
|
57908
|
+
|
|
56103
57909
|
@Field(() => [MJListInvitation_])
|
|
56104
57910
|
MJ_ListInvitations_CreatedByUserIDArray: MJListInvitation_[]; // Link to MJ_ListInvitations
|
|
56105
57911
|
|
|
56106
|
-
@Field(() => [
|
|
56107
|
-
|
|
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
|
|
56108
57920
|
|
|
56109
57921
|
@Field(() => [MJResourcePermission_])
|
|
56110
57922
|
ResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to ResourcePermissions
|
|
@@ -56133,6 +57945,12 @@ export class MJUser_ {
|
|
|
56133
57945
|
@Field(() => [MJTestRun_])
|
|
56134
57946
|
MJ_TestRuns_RunByUserIDArray: MJTestRun_[]; // Link to MJ_TestRuns
|
|
56135
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
|
+
|
|
56136
57954
|
@Field(() => [MJAIAgentRun_])
|
|
56137
57955
|
MJ_AIAgentRuns_UserIDArray: MJAIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
56138
57956
|
|
|
@@ -56743,25 +58561,25 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
56743
58561
|
return result;
|
|
56744
58562
|
}
|
|
56745
58563
|
|
|
56746
|
-
@FieldResolver(() => [
|
|
56747
|
-
async
|
|
56748
|
-
this.CheckUserReadPermissions('MJ:
|
|
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);
|
|
56749
58567
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56750
58568
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
56751
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
58569
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactVersions] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
56752
58570
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
56753
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
58571
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Versions', rows, this.GetUserFromPayload(userPayload));
|
|
56754
58572
|
return result;
|
|
56755
58573
|
}
|
|
56756
58574
|
|
|
56757
|
-
@FieldResolver(() => [
|
|
56758
|
-
async
|
|
56759
|
-
this.CheckUserReadPermissions('MJ:
|
|
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);
|
|
56760
58578
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56761
58579
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
56762
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
58580
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwPublicLinks] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Public Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
56763
58581
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
56764
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
58582
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Public Links', rows, this.GetUserFromPayload(userPayload));
|
|
56765
58583
|
return result;
|
|
56766
58584
|
}
|
|
56767
58585
|
|
|
@@ -56853,6 +58671,17 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
56853
58671
|
return result;
|
|
56854
58672
|
}
|
|
56855
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
|
+
|
|
56856
58685
|
@FieldResolver(() => [MJListInvitation_])
|
|
56857
58686
|
async MJ_ListInvitations_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56858
58687
|
this.CheckUserReadPermissions('MJ: List Invitations', userPayload);
|
|
@@ -56864,14 +58693,36 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
56864
58693
|
return result;
|
|
56865
58694
|
}
|
|
56866
58695
|
|
|
56867
|
-
@FieldResolver(() => [
|
|
56868
|
-
async
|
|
56869
|
-
this.CheckUserReadPermissions('MJ:
|
|
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);
|
|
56870
58699
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56871
58700
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
56872
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
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');
|
|
56873
58702
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
56874
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
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));
|
|
56875
58726
|
return result;
|
|
56876
58727
|
}
|
|
56877
58728
|
|
|
@@ -56974,6 +58825,28 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
56974
58825
|
return result;
|
|
56975
58826
|
}
|
|
56976
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
|
+
|
|
56977
58850
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
56978
58851
|
async MJ_AIAgentRuns_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56979
58852
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|