@memberjunction/server 2.121.0 → 2.122.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/skip-sdk.d.ts.map +1 -1
- package/dist/agents/skip-sdk.js +42 -52
- package/dist/agents/skip-sdk.js.map +1 -1
- package/dist/auth/BaseAuthProvider.d.ts +1 -0
- package/dist/auth/BaseAuthProvider.d.ts.map +1 -1
- package/dist/auth/BaseAuthProvider.js +46 -3
- package/dist/auth/BaseAuthProvider.js.map +1 -1
- package/dist/auth/newUsers.d.ts.map +1 -1
- package/dist/auth/newUsers.js +23 -10
- package/dist/auth/newUsers.js.map +1 -1
- package/dist/generated/generated.d.ts +91 -4
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +539 -34
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +47 -64
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/dist/resolvers/CreateQueryResolver.d.ts +39 -8
- package/dist/resolvers/CreateQueryResolver.d.ts.map +1 -1
- package/dist/resolvers/CreateQueryResolver.js +329 -77
- package/dist/resolvers/CreateQueryResolver.js.map +1 -1
- package/package.json +41 -41
- package/src/agents/skip-sdk.ts +42 -53
- package/src/auth/BaseAuthProvider.ts +68 -5
- package/src/auth/newUsers.ts +30 -11
- package/src/generated/generated.ts +344 -27
- package/src/generic/RunViewResolver.ts +793 -793
- package/src/resolvers/AskSkipResolver.ts +47 -64
- package/src/resolvers/CreateQueryResolver.ts +262 -72
- package/src/resolvers/QueryResolver.ts +275 -275
|
@@ -19,7 +19,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, TestRunFeedbackEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, ComponentRegistryEntity, AIAgentNoteTypeEntity, ComponentDependencyEntity, AIAgentRunEntity, TestEntity, TestTypeEntity, AIVendorEntity, TaskTypeEntity, AIConfigurationEntity, AIAgentEntity, AIAgentStepEntity, AIModelCostEntity, AIPromptModelEntity, AIAgentTypeEntity, AIAgentConfigurationEntity, TestSuiteTestEntity, AIAgentNoteEntity, EnvironmentEntity, ArtifactPermissionEntity, AIAgentActionEntity, TestRubricEntity, TaskDependencyEntity, CollectionArtifactEntity, AIModelPriceTypeEntity, CollectionEntity, RecordLinkEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, TestRunEntity, AIAgentArtifactTypeEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, ScheduledJobRunEntity, DashboardUserStateEntity, ComponentEntity, AccessControlRuleEntity, ArtifactUseEntity, PublicLinkEntity, ArtifactTypeEntity, AIVendorTypeEntity, ArtifactEntity, AIAgentExampleEntity, TestSuiteEntity, ConversationArtifactEntity, CollectionPermissionEntity, AIAgentPromptEntity, ComponentLibraryEntity, ScheduledJobTypeEntity, DashboardUserPreferenceEntity, QueryParameterEntity, ConversationDetailRatingEntity, AIAgentPermissionEntity, AIAgentRelationshipEntity, ComponentLibraryLinkEntity, TestSuiteRunEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, ScheduledJobEntity, AIPromptRunEntity, AIAgentRunStepEntity, ConversationDetailArtifactEntity, TaskEntity, ProjectEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, ArtifactVersionEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity, ArtifactVersionAttributeEntity, AIAgentDataSourceEntity } from '@memberjunction/core-entities';
|
|
22
|
+
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, TestRunFeedbackEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, ComponentRegistryEntity, AIAgentNoteTypeEntity, ComponentDependencyEntity, AIAgentRunEntity, TestEntity, TestTypeEntity, AIVendorEntity, TaskTypeEntity, AIConfigurationEntity, AIAgentEntity, AIAgentStepEntity, AIModelCostEntity, AIPromptModelEntity, AIAgentTypeEntity, AIAgentConfigurationEntity, TestSuiteTestEntity, AIAgentNoteEntity, EnvironmentEntity, ArtifactPermissionEntity, AIAgentActionEntity, TestRubricEntity, TaskDependencyEntity, CollectionArtifactEntity, AIModelPriceTypeEntity, CollectionEntity, RecordLinkEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, TestRunEntity, AIAgentArtifactTypeEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, ScheduledJobRunEntity, DashboardUserStateEntity, ComponentEntity, AccessControlRuleEntity, ArtifactUseEntity, PublicLinkEntity, ArtifactTypeEntity, AIVendorTypeEntity, ArtifactEntity, AIAgentExampleEntity, TestSuiteEntity, ConversationArtifactEntity, CollectionPermissionEntity, AIAgentPromptEntity, ComponentLibraryEntity, ScheduledJobTypeEntity, DashboardUserPreferenceEntity, QueryParameterEntity, ConversationDetailRatingEntity, AIAgentPermissionEntity, AIAgentRelationshipEntity, ComponentLibraryLinkEntity, TestSuiteRunEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, ScheduledJobEntity, AIPromptRunEntity, AIAgentRunStepEntity, ConversationDetailArtifactEntity, TaskEntity, ProjectEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, ArtifactVersionEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity, UserSettingEntity, ArtifactVersionAttributeEntity, AIAgentDataSourceEntity } from '@memberjunction/core-entities';
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
//****************************************************************************
|
|
@@ -6307,21 +6307,21 @@ export class MJEnvironment_ {
|
|
|
6307
6307
|
@MaxLength(10)
|
|
6308
6308
|
_mj__UpdatedAt: Date;
|
|
6309
6309
|
|
|
6310
|
-
@Field(() => [MJProject_])
|
|
6311
|
-
MJ_Projects_EnvironmentIDArray: MJProject_[]; // Link to MJ_Projects
|
|
6312
|
-
|
|
6313
6310
|
@Field(() => [MJCollection_])
|
|
6314
6311
|
MJ_Collections_EnvironmentIDArray: MJCollection_[]; // Link to MJ_Collections
|
|
6315
6312
|
|
|
6313
|
+
@Field(() => [MJProject_])
|
|
6314
|
+
MJ_Projects_EnvironmentIDArray: MJProject_[]; // Link to MJ_Projects
|
|
6315
|
+
|
|
6316
6316
|
@Field(() => [MJArtifact_])
|
|
6317
6317
|
MJ_Artifacts_EnvironmentIDArray: MJArtifact_[]; // Link to MJ_Artifacts
|
|
6318
6318
|
|
|
6319
|
-
@Field(() => [MJTask_])
|
|
6320
|
-
MJ_Tasks_EnvironmentIDArray: MJTask_[]; // Link to MJ_Tasks
|
|
6321
|
-
|
|
6322
6319
|
@Field(() => [MJDashboard_])
|
|
6323
6320
|
Dashboards_EnvironmentIDArray: MJDashboard_[]; // Link to Dashboards
|
|
6324
6321
|
|
|
6322
|
+
@Field(() => [MJTask_])
|
|
6323
|
+
MJ_Tasks_EnvironmentIDArray: MJTask_[]; // Link to MJ_Tasks
|
|
6324
|
+
|
|
6325
6325
|
@Field(() => [MJReport_])
|
|
6326
6326
|
Reports_EnvironmentIDArray: MJReport_[]; // Link to Reports
|
|
6327
6327
|
|
|
@@ -6434,25 +6434,25 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
6434
6434
|
return result;
|
|
6435
6435
|
}
|
|
6436
6436
|
|
|
6437
|
-
@FieldResolver(() => [
|
|
6438
|
-
async
|
|
6439
|
-
this.CheckUserReadPermissions('MJ:
|
|
6437
|
+
@FieldResolver(() => [MJCollection_])
|
|
6438
|
+
async MJ_Collections_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6439
|
+
this.CheckUserReadPermissions('MJ: Collections', userPayload);
|
|
6440
6440
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6441
6441
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6442
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6442
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollections] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collections', userPayload, EntityPermissionType.Read, 'AND');
|
|
6443
6443
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6444
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
6444
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collections', rows);
|
|
6445
6445
|
return result;
|
|
6446
6446
|
}
|
|
6447
6447
|
|
|
6448
|
-
@FieldResolver(() => [
|
|
6449
|
-
async
|
|
6450
|
-
this.CheckUserReadPermissions('MJ:
|
|
6448
|
+
@FieldResolver(() => [MJProject_])
|
|
6449
|
+
async MJ_Projects_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6450
|
+
this.CheckUserReadPermissions('MJ: Projects', userPayload);
|
|
6451
6451
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6452
6452
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6453
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6453
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwProjects] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Projects', userPayload, EntityPermissionType.Read, 'AND');
|
|
6454
6454
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6455
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
6455
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Projects', rows);
|
|
6456
6456
|
return result;
|
|
6457
6457
|
}
|
|
6458
6458
|
|
|
@@ -6467,25 +6467,25 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
6467
6467
|
return result;
|
|
6468
6468
|
}
|
|
6469
6469
|
|
|
6470
|
-
@FieldResolver(() => [
|
|
6471
|
-
async
|
|
6472
|
-
this.CheckUserReadPermissions('
|
|
6470
|
+
@FieldResolver(() => [MJDashboard_])
|
|
6471
|
+
async Dashboards_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6472
|
+
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
6473
6473
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6474
6474
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6475
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6475
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboards] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
6476
6476
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6477
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6477
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboards', rows);
|
|
6478
6478
|
return result;
|
|
6479
6479
|
}
|
|
6480
6480
|
|
|
6481
|
-
@FieldResolver(() => [
|
|
6482
|
-
async
|
|
6483
|
-
this.CheckUserReadPermissions('
|
|
6481
|
+
@FieldResolver(() => [MJTask_])
|
|
6482
|
+
async MJ_Tasks_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6483
|
+
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
6484
6484
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6485
6485
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6486
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6486
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTasks] WHERE [EnvironmentID]='${mjenvironment_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
6487
6487
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6488
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6488
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows);
|
|
6489
6489
|
return result;
|
|
6490
6490
|
}
|
|
6491
6491
|
|
|
@@ -12184,6 +12184,12 @@ export class MJEntityField_ {
|
|
|
12184
12184
|
@Field(() => Boolean, {description: `When 1, allows system/LLM to auto-update Category; when 0, user has locked this field`})
|
|
12185
12185
|
AutoUpdateCategory: boolean;
|
|
12186
12186
|
|
|
12187
|
+
@Field(() => Boolean, {description: `When 1, allows system/LLM to auto-update DisplayName during CodeGen; when 0, user has locked this field`})
|
|
12188
|
+
AutoUpdateDisplayName: boolean;
|
|
12189
|
+
|
|
12190
|
+
@Field(() => Boolean, {description: `When 1, allows system/LLM to auto-update IncludeInUserSearchAPI during CodeGen; when 0, user has locked this field`})
|
|
12191
|
+
AutoUpdateIncludeInUserSearchAPI: boolean;
|
|
12192
|
+
|
|
12187
12193
|
@Field({nullable: true})
|
|
12188
12194
|
FieldCodeName?: string;
|
|
12189
12195
|
|
|
@@ -12342,6 +12348,12 @@ export class CreateMJEntityFieldInput {
|
|
|
12342
12348
|
|
|
12343
12349
|
@Field(() => Boolean, { nullable: true })
|
|
12344
12350
|
AutoUpdateCategory?: boolean;
|
|
12351
|
+
|
|
12352
|
+
@Field(() => Boolean, { nullable: true })
|
|
12353
|
+
AutoUpdateDisplayName?: boolean;
|
|
12354
|
+
|
|
12355
|
+
@Field(() => Boolean, { nullable: true })
|
|
12356
|
+
AutoUpdateIncludeInUserSearchAPI?: boolean;
|
|
12345
12357
|
}
|
|
12346
12358
|
|
|
12347
12359
|
|
|
@@ -12452,6 +12464,12 @@ export class UpdateMJEntityFieldInput {
|
|
|
12452
12464
|
@Field(() => Boolean, { nullable: true })
|
|
12453
12465
|
AutoUpdateCategory?: boolean;
|
|
12454
12466
|
|
|
12467
|
+
@Field(() => Boolean, { nullable: true })
|
|
12468
|
+
AutoUpdateDisplayName?: boolean;
|
|
12469
|
+
|
|
12470
|
+
@Field(() => Boolean, { nullable: true })
|
|
12471
|
+
AutoUpdateIncludeInUserSearchAPI?: boolean;
|
|
12472
|
+
|
|
12455
12473
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
12456
12474
|
OldValues___?: KeyValuePairInput[];
|
|
12457
12475
|
}
|
|
@@ -14016,6 +14034,9 @@ export class MJUser_ {
|
|
|
14016
14034
|
@Field(() => [MJTestSuiteRun_])
|
|
14017
14035
|
MJ_TestSuiteRuns_RunByUserIDArray: MJTestSuiteRun_[]; // Link to MJ_TestSuiteRuns
|
|
14018
14036
|
|
|
14037
|
+
@Field(() => [MJUserSetting_])
|
|
14038
|
+
MJ_UserSettings_UserIDArray: MJUserSetting_[]; // Link to MJ_UserSettings
|
|
14039
|
+
|
|
14019
14040
|
@Field(() => [MJResourcePermission_])
|
|
14020
14041
|
ResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to ResourcePermissions
|
|
14021
14042
|
|
|
@@ -14752,6 +14773,17 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
14752
14773
|
return result;
|
|
14753
14774
|
}
|
|
14754
14775
|
|
|
14776
|
+
@FieldResolver(() => [MJUserSetting_])
|
|
14777
|
+
async MJ_UserSettings_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14778
|
+
this.CheckUserReadPermissions('MJ: User Settings', userPayload);
|
|
14779
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14780
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
14781
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserSettings] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
14782
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
14783
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: User Settings', rows);
|
|
14784
|
+
return result;
|
|
14785
|
+
}
|
|
14786
|
+
|
|
14755
14787
|
@FieldResolver(() => [MJResourcePermission_])
|
|
14756
14788
|
async ResourcePermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14757
14789
|
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
@@ -15625,6 +15657,9 @@ export class MJUserView_ {
|
|
|
15625
15657
|
@Field({nullable: true, description: `Thumbnail image for the user view that can be displayed in gallery views. Can contain either a URL to an image file or a Base64-encoded image string.`})
|
|
15626
15658
|
Thumbnail?: string;
|
|
15627
15659
|
|
|
15660
|
+
@Field({nullable: true, description: `JSON configuration for card display mode in Data Explorer. Stores card layout settings including title field, subtitle, display fields, thumbnails, and layout density. When null, defaults are derived from entity metadata. See CardState interface in packages/Angular/Generic/entity-viewer/src/lib/types.ts for the current schema definition.`})
|
|
15661
|
+
CardState?: string;
|
|
15662
|
+
|
|
15628
15663
|
@Field()
|
|
15629
15664
|
@MaxLength(200)
|
|
15630
15665
|
UserName: string;
|
|
@@ -15721,6 +15756,9 @@ export class CreateMJUserViewInput {
|
|
|
15721
15756
|
|
|
15722
15757
|
@Field({ nullable: true })
|
|
15723
15758
|
Thumbnail: string | null;
|
|
15759
|
+
|
|
15760
|
+
@Field({ nullable: true })
|
|
15761
|
+
CardState: string | null;
|
|
15724
15762
|
}
|
|
15725
15763
|
|
|
15726
15764
|
|
|
@@ -15786,6 +15824,9 @@ export class UpdateMJUserViewInput {
|
|
|
15786
15824
|
@Field({ nullable: true })
|
|
15787
15825
|
Thumbnail?: string | null;
|
|
15788
15826
|
|
|
15827
|
+
@Field({ nullable: true })
|
|
15828
|
+
CardState?: string | null;
|
|
15829
|
+
|
|
15789
15830
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
15790
15831
|
OldValues___?: KeyValuePairInput[];
|
|
15791
15832
|
}
|
|
@@ -16650,6 +16691,42 @@ export class MJApplication_ {
|
|
|
16650
16691
|
@Field({nullable: true, description: `Comma-delimited list of schema names where entities will be automatically added to the application when created in those schemas`})
|
|
16651
16692
|
SchemaAutoAddNewEntities?: string;
|
|
16652
16693
|
|
|
16694
|
+
@Field({nullable: true, description: `Hex color code for visual theming (e.g., #4caf50)`})
|
|
16695
|
+
@MaxLength(40)
|
|
16696
|
+
Color?: string;
|
|
16697
|
+
|
|
16698
|
+
@Field({nullable: true, description: `JSON array of default navigation items for this application. Parsed by BaseApplication.GetNavItems()`})
|
|
16699
|
+
DefaultNavItems?: string;
|
|
16700
|
+
|
|
16701
|
+
@Field({nullable: true, description: `TypeScript class name for ClassFactory registration (e.g., CRMApplication)`})
|
|
16702
|
+
@MaxLength(510)
|
|
16703
|
+
ClassName?: string;
|
|
16704
|
+
|
|
16705
|
+
@Field(() => Int, {description: `Default sequence position when adding this application to a new user's User Applications. Lower values appear first. Used when DefaultForNewUser is true.`})
|
|
16706
|
+
DefaultSequence: number;
|
|
16707
|
+
|
|
16708
|
+
@Field({description: `Application lifecycle status. Pending = not yet ready, Active = available for use, Disabled = temporarily unavailable, Deprecated = being phased out. Only Active applications are shown to users.`})
|
|
16709
|
+
@MaxLength(40)
|
|
16710
|
+
Status: string;
|
|
16711
|
+
|
|
16712
|
+
@Field({description: `How the application appears in navigation. App Switcher = only in dropdown menu, Nav Bar = permanent icon in top nav, Both = shown in both locations.`})
|
|
16713
|
+
@MaxLength(40)
|
|
16714
|
+
NavigationStyle: string;
|
|
16715
|
+
|
|
16716
|
+
@Field({nullable: true, description: `Position of the permanent nav icon when NavigationStyle is Nav Bar or Both. Left of App Switcher = appears before the app switcher, Left of User Menu = appears near the user avatar. Ignored when NavigationStyle is App Switcher.`})
|
|
16717
|
+
@MaxLength(60)
|
|
16718
|
+
TopNavLocation?: string;
|
|
16719
|
+
|
|
16720
|
+
@Field(() => Boolean, {description: `When true, the Nav Bar icon for this application is hidden when the application is active. Useful for launcher-style apps like Home that should only be visible when the user is NOT in that app. Only applies when NavigationStyle is Nav Bar or Both.`})
|
|
16721
|
+
HideNavBarIconWhenActive: boolean;
|
|
16722
|
+
|
|
16723
|
+
@Field({description: `URL-friendly slug for the application (e.g., "data-explorer" for "Data Explorer"). Used in URLs instead of the full Name. Auto-generated from Name when AutoUpdatePath is true. Must be unique across all applications.`})
|
|
16724
|
+
@MaxLength(200)
|
|
16725
|
+
Path: string;
|
|
16726
|
+
|
|
16727
|
+
@Field(() => Boolean, {description: `When true, Path is automatically generated from Name on save. Set to false to manually control the Path value. Defaults to true for new applications.`})
|
|
16728
|
+
AutoUpdatePath: boolean;
|
|
16729
|
+
|
|
16653
16730
|
@Field(() => [MJApplicationEntity_])
|
|
16654
16731
|
ApplicationEntities_ApplicationIDArray: MJApplicationEntity_[]; // Link to ApplicationEntities
|
|
16655
16732
|
|
|
@@ -16689,6 +16766,36 @@ export class CreateMJApplicationInput {
|
|
|
16689
16766
|
|
|
16690
16767
|
@Field({ nullable: true })
|
|
16691
16768
|
SchemaAutoAddNewEntities: string | null;
|
|
16769
|
+
|
|
16770
|
+
@Field({ nullable: true })
|
|
16771
|
+
Color: string | null;
|
|
16772
|
+
|
|
16773
|
+
@Field({ nullable: true })
|
|
16774
|
+
DefaultNavItems: string | null;
|
|
16775
|
+
|
|
16776
|
+
@Field({ nullable: true })
|
|
16777
|
+
ClassName: string | null;
|
|
16778
|
+
|
|
16779
|
+
@Field(() => Int, { nullable: true })
|
|
16780
|
+
DefaultSequence?: number;
|
|
16781
|
+
|
|
16782
|
+
@Field({ nullable: true })
|
|
16783
|
+
Status?: string;
|
|
16784
|
+
|
|
16785
|
+
@Field({ nullable: true })
|
|
16786
|
+
NavigationStyle?: string;
|
|
16787
|
+
|
|
16788
|
+
@Field({ nullable: true })
|
|
16789
|
+
TopNavLocation: string | null;
|
|
16790
|
+
|
|
16791
|
+
@Field(() => Boolean, { nullable: true })
|
|
16792
|
+
HideNavBarIconWhenActive?: boolean;
|
|
16793
|
+
|
|
16794
|
+
@Field({ nullable: true })
|
|
16795
|
+
Path?: string;
|
|
16796
|
+
|
|
16797
|
+
@Field(() => Boolean, { nullable: true })
|
|
16798
|
+
AutoUpdatePath?: boolean;
|
|
16692
16799
|
}
|
|
16693
16800
|
|
|
16694
16801
|
|
|
@@ -16715,6 +16822,36 @@ export class UpdateMJApplicationInput {
|
|
|
16715
16822
|
@Field({ nullable: true })
|
|
16716
16823
|
SchemaAutoAddNewEntities?: string | null;
|
|
16717
16824
|
|
|
16825
|
+
@Field({ nullable: true })
|
|
16826
|
+
Color?: string | null;
|
|
16827
|
+
|
|
16828
|
+
@Field({ nullable: true })
|
|
16829
|
+
DefaultNavItems?: string | null;
|
|
16830
|
+
|
|
16831
|
+
@Field({ nullable: true })
|
|
16832
|
+
ClassName?: string | null;
|
|
16833
|
+
|
|
16834
|
+
@Field(() => Int, { nullable: true })
|
|
16835
|
+
DefaultSequence?: number;
|
|
16836
|
+
|
|
16837
|
+
@Field({ nullable: true })
|
|
16838
|
+
Status?: string;
|
|
16839
|
+
|
|
16840
|
+
@Field({ nullable: true })
|
|
16841
|
+
NavigationStyle?: string;
|
|
16842
|
+
|
|
16843
|
+
@Field({ nullable: true })
|
|
16844
|
+
TopNavLocation?: string | null;
|
|
16845
|
+
|
|
16846
|
+
@Field(() => Boolean, { nullable: true })
|
|
16847
|
+
HideNavBarIconWhenActive?: boolean;
|
|
16848
|
+
|
|
16849
|
+
@Field({ nullable: true })
|
|
16850
|
+
Path?: string;
|
|
16851
|
+
|
|
16852
|
+
@Field(() => Boolean, { nullable: true })
|
|
16853
|
+
AutoUpdatePath?: boolean;
|
|
16854
|
+
|
|
16718
16855
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
16719
16856
|
OldValues___?: KeyValuePairInput[];
|
|
16720
16857
|
}
|
|
@@ -24348,6 +24485,10 @@ export class MJResourceType_ {
|
|
|
24348
24485
|
@MaxLength(16)
|
|
24349
24486
|
CategoryEntityID?: string;
|
|
24350
24487
|
|
|
24488
|
+
@Field({nullable: true, description: `The Angular component class name to instantiate for this resource type. NULL for Custom resource type (uses NavItem DriverClass instead).`})
|
|
24489
|
+
@MaxLength(510)
|
|
24490
|
+
DriverClass?: string;
|
|
24491
|
+
|
|
24351
24492
|
@Field({nullable: true})
|
|
24352
24493
|
@MaxLength(510)
|
|
24353
24494
|
Entity?: string;
|
|
@@ -24395,6 +24536,9 @@ export class CreateMJResourceTypeInput {
|
|
|
24395
24536
|
|
|
24396
24537
|
@Field({ nullable: true })
|
|
24397
24538
|
CategoryEntityID: string | null;
|
|
24539
|
+
|
|
24540
|
+
@Field({ nullable: true })
|
|
24541
|
+
DriverClass: string | null;
|
|
24398
24542
|
}
|
|
24399
24543
|
|
|
24400
24544
|
|
|
@@ -24424,6 +24568,9 @@ export class UpdateMJResourceTypeInput {
|
|
|
24424
24568
|
@Field({ nullable: true })
|
|
24425
24569
|
CategoryEntityID?: string | null;
|
|
24426
24570
|
|
|
24571
|
+
@Field({ nullable: true })
|
|
24572
|
+
DriverClass?: string | null;
|
|
24573
|
+
|
|
24427
24574
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
24428
24575
|
OldValues___?: KeyValuePairInput[];
|
|
24429
24576
|
}
|
|
@@ -24956,6 +25103,9 @@ export class MJWorkspace_ {
|
|
|
24956
25103
|
@MaxLength(10)
|
|
24957
25104
|
_mj__UpdatedAt: Date;
|
|
24958
25105
|
|
|
25106
|
+
@Field({nullable: true, description: `JSON blob containing all workspace state: tabs, layout configuration, theme preferences, and active tab. Replaces WorkspaceItem table.`})
|
|
25107
|
+
Configuration?: string;
|
|
25108
|
+
|
|
24959
25109
|
@Field()
|
|
24960
25110
|
@MaxLength(200)
|
|
24961
25111
|
User: string;
|
|
@@ -24981,6 +25131,9 @@ export class CreateMJWorkspaceInput {
|
|
|
24981
25131
|
|
|
24982
25132
|
@Field({ nullable: true })
|
|
24983
25133
|
UserID?: string;
|
|
25134
|
+
|
|
25135
|
+
@Field({ nullable: true })
|
|
25136
|
+
Configuration: string | null;
|
|
24984
25137
|
}
|
|
24985
25138
|
|
|
24986
25139
|
|
|
@@ -25001,6 +25154,9 @@ export class UpdateMJWorkspaceInput {
|
|
|
25001
25154
|
@Field({ nullable: true })
|
|
25002
25155
|
UserID?: string;
|
|
25003
25156
|
|
|
25157
|
+
@Field({ nullable: true })
|
|
25158
|
+
Configuration?: string | null;
|
|
25159
|
+
|
|
25004
25160
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
25005
25161
|
OldValues___?: KeyValuePairInput[];
|
|
25006
25162
|
}
|
|
@@ -53904,6 +54060,167 @@ export class MJAIConfigurationParamResolver extends ResolverBase {
|
|
|
53904
54060
|
|
|
53905
54061
|
}
|
|
53906
54062
|
|
|
54063
|
+
//****************************************************************************
|
|
54064
|
+
// ENTITY CLASS for MJ: User Settings
|
|
54065
|
+
//****************************************************************************
|
|
54066
|
+
@ObjectType({ description: `Generic key-value store for per-user settings. Allows any application or feature to persist user preferences.` })
|
|
54067
|
+
export class MJUserSetting_ {
|
|
54068
|
+
@Field()
|
|
54069
|
+
@MaxLength(16)
|
|
54070
|
+
ID: string;
|
|
54071
|
+
|
|
54072
|
+
@Field({description: `The user this setting belongs to.`})
|
|
54073
|
+
@MaxLength(16)
|
|
54074
|
+
UserID: string;
|
|
54075
|
+
|
|
54076
|
+
@Field({description: `The setting key/name. Use namespaced keys like "DataExplorer.ViewMode" or "Dashboard.AI.CollapsedSections" to avoid collisions.`})
|
|
54077
|
+
@MaxLength(510)
|
|
54078
|
+
Setting: string;
|
|
54079
|
+
|
|
54080
|
+
@Field({nullable: true, description: `The setting value. Can be simple text, numbers, booleans, or JSON for complex configuration objects.`})
|
|
54081
|
+
Value?: string;
|
|
54082
|
+
|
|
54083
|
+
@Field()
|
|
54084
|
+
@MaxLength(10)
|
|
54085
|
+
_mj__CreatedAt: Date;
|
|
54086
|
+
|
|
54087
|
+
@Field()
|
|
54088
|
+
@MaxLength(10)
|
|
54089
|
+
_mj__UpdatedAt: Date;
|
|
54090
|
+
|
|
54091
|
+
@Field()
|
|
54092
|
+
@MaxLength(200)
|
|
54093
|
+
User: string;
|
|
54094
|
+
|
|
54095
|
+
}
|
|
54096
|
+
|
|
54097
|
+
//****************************************************************************
|
|
54098
|
+
// INPUT TYPE for MJ: User Settings
|
|
54099
|
+
//****************************************************************************
|
|
54100
|
+
@InputType()
|
|
54101
|
+
export class CreateMJUserSettingInput {
|
|
54102
|
+
@Field({ nullable: true })
|
|
54103
|
+
ID?: string;
|
|
54104
|
+
|
|
54105
|
+
@Field({ nullable: true })
|
|
54106
|
+
UserID?: string;
|
|
54107
|
+
|
|
54108
|
+
@Field({ nullable: true })
|
|
54109
|
+
Setting?: string;
|
|
54110
|
+
|
|
54111
|
+
@Field({ nullable: true })
|
|
54112
|
+
Value: string | null;
|
|
54113
|
+
}
|
|
54114
|
+
|
|
54115
|
+
|
|
54116
|
+
//****************************************************************************
|
|
54117
|
+
// INPUT TYPE for MJ: User Settings
|
|
54118
|
+
//****************************************************************************
|
|
54119
|
+
@InputType()
|
|
54120
|
+
export class UpdateMJUserSettingInput {
|
|
54121
|
+
@Field()
|
|
54122
|
+
ID: string;
|
|
54123
|
+
|
|
54124
|
+
@Field({ nullable: true })
|
|
54125
|
+
UserID?: string;
|
|
54126
|
+
|
|
54127
|
+
@Field({ nullable: true })
|
|
54128
|
+
Setting?: string;
|
|
54129
|
+
|
|
54130
|
+
@Field({ nullable: true })
|
|
54131
|
+
Value?: string | null;
|
|
54132
|
+
|
|
54133
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
54134
|
+
OldValues___?: KeyValuePairInput[];
|
|
54135
|
+
}
|
|
54136
|
+
|
|
54137
|
+
//****************************************************************************
|
|
54138
|
+
// RESOLVER for MJ: User Settings
|
|
54139
|
+
//****************************************************************************
|
|
54140
|
+
@ObjectType()
|
|
54141
|
+
export class RunMJUserSettingViewResult {
|
|
54142
|
+
@Field(() => [MJUserSetting_])
|
|
54143
|
+
Results: MJUserSetting_[];
|
|
54144
|
+
|
|
54145
|
+
@Field(() => String, {nullable: true})
|
|
54146
|
+
UserViewRunID?: string;
|
|
54147
|
+
|
|
54148
|
+
@Field(() => Int, {nullable: true})
|
|
54149
|
+
RowCount: number;
|
|
54150
|
+
|
|
54151
|
+
@Field(() => Int, {nullable: true})
|
|
54152
|
+
TotalRowCount: number;
|
|
54153
|
+
|
|
54154
|
+
@Field(() => Int, {nullable: true})
|
|
54155
|
+
ExecutionTime: number;
|
|
54156
|
+
|
|
54157
|
+
@Field({nullable: true})
|
|
54158
|
+
ErrorMessage?: string;
|
|
54159
|
+
|
|
54160
|
+
@Field(() => Boolean, {nullable: false})
|
|
54161
|
+
Success: boolean;
|
|
54162
|
+
}
|
|
54163
|
+
|
|
54164
|
+
@Resolver(MJUserSetting_)
|
|
54165
|
+
export class MJUserSettingResolver extends ResolverBase {
|
|
54166
|
+
@Query(() => RunMJUserSettingViewResult)
|
|
54167
|
+
async RunMJUserSettingViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
54168
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
54169
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
54170
|
+
}
|
|
54171
|
+
|
|
54172
|
+
@Query(() => RunMJUserSettingViewResult)
|
|
54173
|
+
async RunMJUserSettingViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
54174
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
54175
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
54176
|
+
}
|
|
54177
|
+
|
|
54178
|
+
@Query(() => RunMJUserSettingViewResult)
|
|
54179
|
+
async RunMJUserSettingDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
54180
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
54181
|
+
input.EntityName = 'MJ: User Settings';
|
|
54182
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
54183
|
+
}
|
|
54184
|
+
@Query(() => MJUserSetting_, { nullable: true })
|
|
54185
|
+
async MJUserSetting(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJUserSetting_ | null> {
|
|
54186
|
+
this.CheckUserReadPermissions('MJ: User Settings', userPayload);
|
|
54187
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
54188
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
54189
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserSettings] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
54190
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
54191
|
+
const result = this.MapFieldNamesToCodeNames('MJ: User Settings', rows && rows.length > 0 ? rows[0] : {})
|
|
54192
|
+
return result;
|
|
54193
|
+
}
|
|
54194
|
+
|
|
54195
|
+
@Mutation(() => MJUserSetting_)
|
|
54196
|
+
async CreateMJUserSetting(
|
|
54197
|
+
@Arg('input', () => CreateMJUserSettingInput) input: CreateMJUserSettingInput,
|
|
54198
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
54199
|
+
@PubSub() pubSub: PubSubEngine
|
|
54200
|
+
) {
|
|
54201
|
+
const provider = GetReadWriteProvider(providers);
|
|
54202
|
+
return this.CreateRecord('MJ: User Settings', input, provider, userPayload, pubSub)
|
|
54203
|
+
}
|
|
54204
|
+
|
|
54205
|
+
@Mutation(() => MJUserSetting_)
|
|
54206
|
+
async UpdateMJUserSetting(
|
|
54207
|
+
@Arg('input', () => UpdateMJUserSettingInput) input: UpdateMJUserSettingInput,
|
|
54208
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
54209
|
+
@PubSub() pubSub: PubSubEngine
|
|
54210
|
+
) {
|
|
54211
|
+
const provider = GetReadWriteProvider(providers);
|
|
54212
|
+
return this.UpdateRecord('MJ: User Settings', input, provider, userPayload, pubSub);
|
|
54213
|
+
}
|
|
54214
|
+
|
|
54215
|
+
@Mutation(() => MJUserSetting_)
|
|
54216
|
+
async DeleteMJUserSetting(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
54217
|
+
const provider = GetReadWriteProvider(providers);
|
|
54218
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
54219
|
+
return this.DeleteRecord('MJ: User Settings', key, options, provider, userPayload, pubSub);
|
|
54220
|
+
}
|
|
54221
|
+
|
|
54222
|
+
}
|
|
54223
|
+
|
|
53907
54224
|
//****************************************************************************
|
|
53908
54225
|
// ENTITY CLASS for MJ: Artifact Version Attributes
|
|
53909
54226
|
//****************************************************************************
|