@memberjunction/server 1.3.3 → 1.4.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/CHANGELOG.json +120 -1
- package/CHANGELOG.md +30 -2
- package/dist/entitySubclasses/EntityBehavior.server.d.ts +29 -0
- package/dist/entitySubclasses/EntityBehavior.server.d.ts.map +1 -0
- package/dist/entitySubclasses/EntityBehavior.server.js +213 -0
- package/dist/entitySubclasses/EntityBehavior.server.js.map +1 -0
- package/dist/generated/generated.d.ts +393 -245
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1251 -377
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +21 -10
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/package.json +15 -15
- package/src/entitySubclasses/EntityBehavior.server.ts +241 -0
- package/src/generated/generated.ts +929 -248
- package/src/index.ts +1 -0
- package/src/resolvers/AskSkipResolver.ts +34 -11
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ALL ENTITIES - TypeGraphQL Type Class Definition - AUTO GENERATED FILE
|
|
3
3
|
* Generated Entities and Resolvers for Server
|
|
4
4
|
*
|
|
5
|
-
* GENERATED: 5/
|
|
5
|
+
* GENERATED: 5/24/2024, 2:19:58 PM
|
|
6
6
|
*
|
|
7
7
|
* >>> DO NOT MODIFY THIS FILE!!!!!!!!!!!!
|
|
8
8
|
* >>> YOUR CHANGES WILL BE OVERWRITTEN
|
|
@@ -20,7 +20,7 @@ import { mj_core_schema } from '../config';
|
|
|
20
20
|
|
|
21
21
|
import * as mj_core_schema_server_object_types from '@memberjunction/server'
|
|
22
22
|
|
|
23
|
-
import { 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 } from '@memberjunction/core-entities';
|
|
23
|
+
import { 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, EntityBehaviorEntity, EntityBehaviorTypeEntity, ApplicationSettingEntity } from '@memberjunction/core-entities';
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
//****************************************************************************
|
|
@@ -63,7 +63,7 @@ export class Company_ {
|
|
|
63
63
|
EmployeesArray: mj_core_schema_server_object_types.Employee_[]; // Link to Employees
|
|
64
64
|
|
|
65
65
|
@Field(() => [mj_core_schema_server_object_types.CompanyIntegration_])
|
|
66
|
-
|
|
66
|
+
CompanyIntegrationsArray: mj_core_schema_server_object_types.CompanyIntegration_[]; // Link to CompanyIntegrations
|
|
67
67
|
|
|
68
68
|
@Field(() => [mj_core_schema_server_object_types.Workflow_])
|
|
69
69
|
WorkflowsArray: mj_core_schema_server_object_types.Workflow_[]; // Link to Workflows
|
|
@@ -185,7 +185,7 @@ export class CompanyResolver extends ResolverBase {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegration_])
|
|
188
|
-
async
|
|
188
|
+
async CompanyIntegrationsArray(@Root() company_: Company_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
189
189
|
this.CheckUserReadPermissions('Company Integrations', userPayload);
|
|
190
190
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrations] WHERE [CompanyName]=${company_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
191
191
|
const result = this.ArrayMapFieldNamesToCodeNames('Company Integrations', await dataSource.query(sSQL));
|
|
@@ -362,13 +362,13 @@ export class Employee_ {
|
|
|
362
362
|
EmployeesArray: mj_core_schema_server_object_types.Employee_[]; // Link to Employees
|
|
363
363
|
|
|
364
364
|
@Field(() => [mj_core_schema_server_object_types.EmployeeCompanyIntegration_])
|
|
365
|
-
|
|
365
|
+
EmployeeCompanyIntegrationsArray: mj_core_schema_server_object_types.EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
366
366
|
|
|
367
367
|
@Field(() => [mj_core_schema_server_object_types.EmployeeRole_])
|
|
368
|
-
|
|
368
|
+
EmployeeRolesArray: mj_core_schema_server_object_types.EmployeeRole_[]; // Link to EmployeeRoles
|
|
369
369
|
|
|
370
370
|
@Field(() => [mj_core_schema_server_object_types.EmployeeSkill_])
|
|
371
|
-
|
|
371
|
+
EmployeeSkillsArray: mj_core_schema_server_object_types.EmployeeSkill_[]; // Link to EmployeeSkills
|
|
372
372
|
|
|
373
373
|
@Field(() => [mj_core_schema_server_object_types.User_])
|
|
374
374
|
UsersArray: mj_core_schema_server_object_types.User_[]; // Link to Users
|
|
@@ -508,7 +508,7 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeCompanyIntegration_])
|
|
511
|
-
async
|
|
511
|
+
async EmployeeCompanyIntegrationsArray(@Root() employee_: Employee_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
512
512
|
this.CheckUserReadPermissions('Employee Company Integrations', userPayload);
|
|
513
513
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeCompanyIntegrations] WHERE [EmployeeID]=${employee_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
514
514
|
const result = this.ArrayMapFieldNamesToCodeNames('Employee Company Integrations', await dataSource.query(sSQL));
|
|
@@ -516,7 +516,7 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeRole_])
|
|
519
|
-
async
|
|
519
|
+
async EmployeeRolesArray(@Root() employee_: Employee_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
520
520
|
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
521
521
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeRoles] WHERE [EmployeeID]=${employee_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
522
522
|
const result = this.ArrayMapFieldNamesToCodeNames('Employee Roles', await dataSource.query(sSQL));
|
|
@@ -524,7 +524,7 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeSkill_])
|
|
527
|
-
async
|
|
527
|
+
async EmployeeSkillsArray(@Root() employee_: Employee_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
528
528
|
this.CheckUserReadPermissions('Employee Skills', userPayload);
|
|
529
529
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeSkills] WHERE [EmployeeID]=${employee_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Skills', userPayload, EntityPermissionType.Read, 'AND');
|
|
530
530
|
const result = this.ArrayMapFieldNamesToCodeNames('Employee Skills', await dataSource.query(sSQL));
|
|
@@ -1268,19 +1268,19 @@ export class Role_ {
|
|
|
1268
1268
|
UpdatedAt: Date;
|
|
1269
1269
|
|
|
1270
1270
|
@Field(() => [mj_core_schema_server_object_types.EmployeeRole_])
|
|
1271
|
-
|
|
1271
|
+
EmployeeRolesArray: mj_core_schema_server_object_types.EmployeeRole_[]; // Link to EmployeeRoles
|
|
1272
1272
|
|
|
1273
1273
|
@Field(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
1274
|
-
|
|
1274
|
+
EntityPermissionsArray: mj_core_schema_server_object_types.EntityPermission_[]; // Link to EntityPermissions
|
|
1275
1275
|
|
|
1276
1276
|
@Field(() => [mj_core_schema_server_object_types.UserRole_])
|
|
1277
|
-
|
|
1277
|
+
UserRolesArray: mj_core_schema_server_object_types.UserRole_[]; // Link to UserRoles
|
|
1278
1278
|
|
|
1279
1279
|
@Field(() => [mj_core_schema_server_object_types.AuthorizationRole_])
|
|
1280
|
-
|
|
1280
|
+
AuthorizationRolesArray: mj_core_schema_server_object_types.AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
1281
1281
|
|
|
1282
1282
|
@Field(() => [mj_core_schema_server_object_types.QueryPermission_])
|
|
1283
|
-
|
|
1283
|
+
QueryPermissionsArray: mj_core_schema_server_object_types.QueryPermission_[]; // Link to QueryPermissions
|
|
1284
1284
|
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
@@ -1385,7 +1385,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1385
1385
|
}
|
|
1386
1386
|
|
|
1387
1387
|
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeRole_])
|
|
1388
|
-
async
|
|
1388
|
+
async EmployeeRolesArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1389
1389
|
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
1390
1390
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeRoles] WHERE [RoleID]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
1391
1391
|
const result = this.ArrayMapFieldNamesToCodeNames('Employee Roles', await dataSource.query(sSQL));
|
|
@@ -1393,7 +1393,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
|
|
1395
1395
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
1396
|
-
async
|
|
1396
|
+
async EntityPermissionsArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1397
1397
|
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
1398
1398
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityPermissions] WHERE [RoleName]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
1399
1399
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Permissions', await dataSource.query(sSQL));
|
|
@@ -1401,7 +1401,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
|
|
1403
1403
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserRole_])
|
|
1404
|
-
async
|
|
1404
|
+
async UserRolesArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1405
1405
|
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
1406
1406
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRoles] WHERE [RoleName]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('User Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
1407
1407
|
const result = this.ArrayMapFieldNamesToCodeNames('User Roles', await dataSource.query(sSQL));
|
|
@@ -1409,7 +1409,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
|
|
1411
1411
|
@FieldResolver(() => [mj_core_schema_server_object_types.AuthorizationRole_])
|
|
1412
|
-
async
|
|
1412
|
+
async AuthorizationRolesArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1413
1413
|
this.CheckUserReadPermissions('Authorization Roles', userPayload);
|
|
1414
1414
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuthorizationRoles] WHERE [RoleName]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('Authorization Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
1415
1415
|
const result = this.ArrayMapFieldNamesToCodeNames('Authorization Roles', await dataSource.query(sSQL));
|
|
@@ -1417,7 +1417,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1417
1417
|
}
|
|
1418
1418
|
|
|
1419
1419
|
@FieldResolver(() => [mj_core_schema_server_object_types.QueryPermission_])
|
|
1420
|
-
async
|
|
1420
|
+
async QueryPermissionsArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1421
1421
|
this.CheckUserReadPermissions('Query Permissions', userPayload);
|
|
1422
1422
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryPermissions] WHERE [RoleName]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('Query Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
1423
1423
|
const result = this.ArrayMapFieldNamesToCodeNames('Query Permissions', await dataSource.query(sSQL));
|
|
@@ -1541,7 +1541,7 @@ export class Skill_ {
|
|
|
1541
1541
|
Parent?: string;
|
|
1542
1542
|
|
|
1543
1543
|
@Field(() => [mj_core_schema_server_object_types.EmployeeSkill_])
|
|
1544
|
-
|
|
1544
|
+
EmployeeSkillsArray: mj_core_schema_server_object_types.EmployeeSkill_[]; // Link to EmployeeSkills
|
|
1545
1545
|
|
|
1546
1546
|
@Field(() => [mj_core_schema_server_object_types.Skill_])
|
|
1547
1547
|
SkillsArray: mj_core_schema_server_object_types.Skill_[]; // Link to Skills
|
|
@@ -1608,7 +1608,7 @@ export class SkillResolver extends ResolverBase {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
|
|
1610
1610
|
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeSkill_])
|
|
1611
|
-
async
|
|
1611
|
+
async EmployeeSkillsArray(@Root() skill_: Skill_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1612
1612
|
this.CheckUserReadPermissions('Employee Skills', userPayload);
|
|
1613
1613
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeSkills] WHERE [SkillID]=${skill_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Skills', userPayload, EntityPermissionType.Read, 'AND');
|
|
1614
1614
|
const result = this.ArrayMapFieldNamesToCodeNames('Employee Skills', await dataSource.query(sSQL));
|
|
@@ -1732,7 +1732,7 @@ export class IntegrationURLFormatResolver extends ResolverBase {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
|
|
1734
1734
|
@Query(() => [IntegrationURLFormat_])
|
|
1735
|
-
async
|
|
1735
|
+
async AllIntegrationURLFormats(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1736
1736
|
this.CheckUserReadPermissions('Integration URL Formats', userPayload);
|
|
1737
1737
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwIntegrationURLFormats]` + this.getRowLevelSecurityWhereClause('Integration URL Formats', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
1738
1738
|
const result = this.ArrayMapFieldNamesToCodeNames('Integration URL Formats', await dataSource.query(sSQL));
|
|
@@ -1815,10 +1815,10 @@ export class Integration_ {
|
|
|
1815
1815
|
UpdatedAt: Date;
|
|
1816
1816
|
|
|
1817
1817
|
@Field(() => [mj_core_schema_server_object_types.IntegrationURLFormat_])
|
|
1818
|
-
|
|
1818
|
+
IntegrationURLFormatsArray: mj_core_schema_server_object_types.IntegrationURLFormat_[]; // Link to IntegrationURLFormats
|
|
1819
1819
|
|
|
1820
1820
|
@Field(() => [mj_core_schema_server_object_types.CompanyIntegration_])
|
|
1821
|
-
|
|
1821
|
+
CompanyIntegrationsArray: mj_core_schema_server_object_types.CompanyIntegration_[]; // Link to CompanyIntegrations
|
|
1822
1822
|
|
|
1823
1823
|
}
|
|
1824
1824
|
|
|
@@ -1913,7 +1913,7 @@ export class IntegrationResolver extends ResolverBase {
|
|
|
1913
1913
|
}
|
|
1914
1914
|
|
|
1915
1915
|
@FieldResolver(() => [mj_core_schema_server_object_types.IntegrationURLFormat_])
|
|
1916
|
-
async
|
|
1916
|
+
async IntegrationURLFormatsArray(@Root() integration_: Integration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1917
1917
|
this.CheckUserReadPermissions('Integration URL Formats', userPayload);
|
|
1918
1918
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwIntegrationURLFormats] WHERE [IntegrationID]=${integration_.ID} ` + this.getRowLevelSecurityWhereClause('Integration URL Formats', userPayload, EntityPermissionType.Read, 'AND');
|
|
1919
1919
|
const result = this.ArrayMapFieldNamesToCodeNames('Integration URL Formats', await dataSource.query(sSQL));
|
|
@@ -1921,7 +1921,7 @@ export class IntegrationResolver extends ResolverBase {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
|
|
1923
1923
|
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegration_])
|
|
1924
|
-
async
|
|
1924
|
+
async CompanyIntegrationsArray(@Root() integration_: Integration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1925
1925
|
this.CheckUserReadPermissions('Company Integrations', userPayload);
|
|
1926
1926
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrations] WHERE [IntegrationName]=${integration_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
1927
1927
|
const result = this.ArrayMapFieldNamesToCodeNames('Company Integrations', await dataSource.query(sSQL));
|
|
@@ -2060,13 +2060,13 @@ export class CompanyIntegration_ {
|
|
|
2060
2060
|
ListsArray: mj_core_schema_server_object_types.List_[]; // Link to Lists
|
|
2061
2061
|
|
|
2062
2062
|
@Field(() => [mj_core_schema_server_object_types.EmployeeCompanyIntegration_])
|
|
2063
|
-
|
|
2063
|
+
EmployeeCompanyIntegrationsArray: mj_core_schema_server_object_types.EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
2064
2064
|
|
|
2065
2065
|
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRun_])
|
|
2066
|
-
|
|
2066
|
+
CompanyIntegrationRunsArray: mj_core_schema_server_object_types.CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
2067
2067
|
|
|
2068
2068
|
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRecordMap_])
|
|
2069
|
-
|
|
2069
|
+
CompanyIntegrationRecordMapsArray: mj_core_schema_server_object_types.CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
2070
2070
|
|
|
2071
2071
|
}
|
|
2072
2072
|
|
|
@@ -2176,7 +2176,7 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
2176
2176
|
}
|
|
2177
2177
|
|
|
2178
2178
|
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeCompanyIntegration_])
|
|
2179
|
-
async
|
|
2179
|
+
async EmployeeCompanyIntegrationsArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2180
2180
|
this.CheckUserReadPermissions('Employee Company Integrations', userPayload);
|
|
2181
2181
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeCompanyIntegrations] WHERE [CompanyIntegrationID]=${companyintegration_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
2182
2182
|
const result = this.ArrayMapFieldNamesToCodeNames('Employee Company Integrations', await dataSource.query(sSQL));
|
|
@@ -2184,7 +2184,7 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
2184
2184
|
}
|
|
2185
2185
|
|
|
2186
2186
|
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRun_])
|
|
2187
|
-
async
|
|
2187
|
+
async CompanyIntegrationRunsArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2188
2188
|
this.CheckUserReadPermissions('Company Integration Runs', userPayload);
|
|
2189
2189
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRuns] WHERE [CompanyIntegrationID]=${companyintegration_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2190
2190
|
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Runs', await dataSource.query(sSQL));
|
|
@@ -2192,7 +2192,7 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
2192
2192
|
}
|
|
2193
2193
|
|
|
2194
2194
|
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRecordMap_])
|
|
2195
|
-
async
|
|
2195
|
+
async CompanyIntegrationRecordMapsArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2196
2196
|
this.CheckUserReadPermissions('Company Integration Record Maps', userPayload);
|
|
2197
2197
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRecordMaps] WHERE [CompanyIntegrationID]=${companyintegration_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Record Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
2198
2198
|
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Record Maps', await dataSource.query(sSQL));
|
|
@@ -2406,7 +2406,7 @@ export class EntityField_ {
|
|
|
2406
2406
|
RelatedEntityClassName?: string;
|
|
2407
2407
|
|
|
2408
2408
|
@Field(() => [mj_core_schema_server_object_types.EntityFieldValue_])
|
|
2409
|
-
|
|
2409
|
+
EntityFieldValuesArray: mj_core_schema_server_object_types.EntityFieldValue_[]; // Link to EntityFieldValues
|
|
2410
2410
|
|
|
2411
2411
|
}
|
|
2412
2412
|
|
|
@@ -2617,7 +2617,7 @@ export class EntityFieldResolver extends ResolverBase {
|
|
|
2617
2617
|
}
|
|
2618
2618
|
|
|
2619
2619
|
@Query(() => [EntityField_])
|
|
2620
|
-
async
|
|
2620
|
+
async AllEntityFields(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2621
2621
|
this.CheckUserReadPermissions('Entity Fields', userPayload);
|
|
2622
2622
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityFields]` + this.getRowLevelSecurityWhereClause('Entity Fields', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
2623
2623
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Fields', await dataSource.query(sSQL));
|
|
@@ -2625,7 +2625,7 @@ export class EntityFieldResolver extends ResolverBase {
|
|
|
2625
2625
|
}
|
|
2626
2626
|
|
|
2627
2627
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityFieldValue_])
|
|
2628
|
-
async
|
|
2628
|
+
async EntityFieldValuesArray(@Root() entityfield_: EntityField_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2629
2629
|
this.CheckUserReadPermissions('Entity Field Values', userPayload);
|
|
2630
2630
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityFieldValues] WHERE [EntityFieldID]=${entityfield_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Field Values', userPayload, EntityPermissionType.Read, 'AND');
|
|
2631
2631
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Field Values', await dataSource.query(sSQL));
|
|
@@ -2890,94 +2890,97 @@ export class Entity_ {
|
|
|
2890
2890
|
ParentBaseView?: string;
|
|
2891
2891
|
|
|
2892
2892
|
@Field(() => [mj_core_schema_server_object_types.EntityField_])
|
|
2893
|
-
|
|
2893
|
+
EntityFieldsArray: mj_core_schema_server_object_types.EntityField_[]; // Link to EntityFields
|
|
2894
2894
|
|
|
2895
2895
|
@Field(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
2896
|
-
|
|
2896
|
+
EntityPermissionsArray: mj_core_schema_server_object_types.EntityPermission_[]; // Link to EntityPermissions
|
|
2897
2897
|
|
|
2898
2898
|
@Field(() => [mj_core_schema_server_object_types.EntityRelationship_])
|
|
2899
|
-
|
|
2899
|
+
EntityRelationshipsArray: mj_core_schema_server_object_types.EntityRelationship_[]; // Link to EntityRelationships
|
|
2900
2900
|
|
|
2901
2901
|
@Field(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
2902
|
-
|
|
2902
|
+
EntityAIActionsArray: mj_core_schema_server_object_types.EntityAIAction_[]; // Link to EntityAIActions
|
|
2903
2903
|
|
|
2904
2904
|
@Field(() => [mj_core_schema_server_object_types.UserRecordLog_])
|
|
2905
|
-
|
|
2905
|
+
UserRecordLogsArray: mj_core_schema_server_object_types.UserRecordLog_[]; // Link to UserRecordLogs
|
|
2906
2906
|
|
|
2907
2907
|
@Field(() => [mj_core_schema_server_object_types.IntegrationURLFormat_])
|
|
2908
|
-
|
|
2908
|
+
IntegrationURLFormatsArray: mj_core_schema_server_object_types.IntegrationURLFormat_[]; // Link to IntegrationURLFormats
|
|
2909
2909
|
|
|
2910
2910
|
@Field(() => [mj_core_schema_server_object_types.Entity_])
|
|
2911
2911
|
EntitiesArray: mj_core_schema_server_object_types.Entity_[]; // Link to Entities
|
|
2912
2912
|
|
|
2913
2913
|
@Field(() => [mj_core_schema_server_object_types.UserFavorite_])
|
|
2914
|
-
|
|
2914
|
+
UserFavoritesArray: mj_core_schema_server_object_types.UserFavorite_[]; // Link to UserFavorites
|
|
2915
2915
|
|
|
2916
2916
|
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRunDetail_])
|
|
2917
|
-
|
|
2917
|
+
CompanyIntegrationRunDetailsArray: mj_core_schema_server_object_types.CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
2918
2918
|
|
|
2919
2919
|
@Field(() => [mj_core_schema_server_object_types.ApplicationEntity_])
|
|
2920
|
-
|
|
2920
|
+
ApplicationEntitiesArray: mj_core_schema_server_object_types.ApplicationEntity_[]; // Link to ApplicationEntities
|
|
2921
2921
|
|
|
2922
2922
|
@Field(() => [mj_core_schema_server_object_types.UserApplicationEntity_])
|
|
2923
|
-
|
|
2923
|
+
UserApplicationEntitiesArray: mj_core_schema_server_object_types.UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
2924
2924
|
|
|
2925
2925
|
@Field(() => [mj_core_schema_server_object_types.List_])
|
|
2926
2926
|
ListsArray: mj_core_schema_server_object_types.List_[]; // Link to Lists
|
|
2927
2927
|
|
|
2928
2928
|
@Field(() => [mj_core_schema_server_object_types.UserView_])
|
|
2929
|
-
|
|
2929
|
+
UserViewsArray: mj_core_schema_server_object_types.UserView_[]; // Link to UserViews
|
|
2930
2930
|
|
|
2931
2931
|
@Field(() => [mj_core_schema_server_object_types.RecordChange_])
|
|
2932
|
-
|
|
2932
|
+
RecordChangesArray: mj_core_schema_server_object_types.RecordChange_[]; // Link to RecordChanges
|
|
2933
2933
|
|
|
2934
2934
|
@Field(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
2935
|
-
|
|
2935
|
+
AuditLogsArray: mj_core_schema_server_object_types.AuditLog_[]; // Link to AuditLogs
|
|
2936
2936
|
|
|
2937
2937
|
@Field(() => [mj_core_schema_server_object_types.ResourceType_])
|
|
2938
|
-
|
|
2938
|
+
ResourceTypesArray: mj_core_schema_server_object_types.ResourceType_[]; // Link to ResourceTypes
|
|
2939
2939
|
|
|
2940
2940
|
@Field(() => [mj_core_schema_server_object_types.TaggedItem_])
|
|
2941
|
-
|
|
2941
|
+
TaggedItemsArray: mj_core_schema_server_object_types.TaggedItem_[]; // Link to TaggedItems
|
|
2942
2942
|
|
|
2943
2943
|
@Field(() => [mj_core_schema_server_object_types.DatasetItem_])
|
|
2944
|
-
|
|
2944
|
+
DatasetItemsArray: mj_core_schema_server_object_types.DatasetItem_[]; // Link to DatasetItems
|
|
2945
2945
|
|
|
2946
2946
|
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRecordMap_])
|
|
2947
|
-
|
|
2947
|
+
CompanyIntegrationRecordMapsArray: mj_core_schema_server_object_types.CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
2948
2948
|
|
|
2949
2949
|
@Field(() => [mj_core_schema_server_object_types.RecordMergeLog_])
|
|
2950
|
-
|
|
2950
|
+
RecordMergeLogsArray: mj_core_schema_server_object_types.RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
2951
2951
|
|
|
2952
2952
|
@Field(() => [mj_core_schema_server_object_types.QueryField_])
|
|
2953
|
-
|
|
2953
|
+
QueryFieldsArray: mj_core_schema_server_object_types.QueryField_[]; // Link to QueryFields
|
|
2954
2954
|
|
|
2955
2955
|
@Field(() => [mj_core_schema_server_object_types.Conversation_])
|
|
2956
2956
|
ConversationsArray: mj_core_schema_server_object_types.Conversation_[]; // Link to Conversations
|
|
2957
2957
|
|
|
2958
2958
|
@Field(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
2959
|
-
|
|
2959
|
+
EntityDocumentsArray: mj_core_schema_server_object_types.EntityDocument_[]; // Link to EntityDocuments
|
|
2960
2960
|
|
|
2961
2961
|
@Field(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
2962
|
-
|
|
2962
|
+
DataContextItemsArray: mj_core_schema_server_object_types.DataContextItem_[]; // Link to DataContextItems
|
|
2963
2963
|
|
|
2964
2964
|
@Field(() => [mj_core_schema_server_object_types.User_])
|
|
2965
2965
|
UsersArray: mj_core_schema_server_object_types.User_[]; // Link to Users
|
|
2966
2966
|
|
|
2967
2967
|
@Field(() => [mj_core_schema_server_object_types.EntityRecordDocument_])
|
|
2968
|
-
|
|
2968
|
+
EntityRecordDocumentsArray: mj_core_schema_server_object_types.EntityRecordDocument_[]; // Link to EntityRecordDocuments
|
|
2969
2969
|
|
|
2970
2970
|
@Field(() => [mj_core_schema_server_object_types.FileEntityRecordLink_])
|
|
2971
|
-
|
|
2971
|
+
FileEntityRecordLinksArray: mj_core_schema_server_object_types.FileEntityRecordLink_[]; // Link to FileEntityRecordLinks
|
|
2972
2972
|
|
|
2973
2973
|
@Field(() => [mj_core_schema_server_object_types.UserViewCategory_])
|
|
2974
|
-
|
|
2974
|
+
UserViewCategoriesArray: mj_core_schema_server_object_types.UserViewCategory_[]; // Link to UserViewCategories
|
|
2975
2975
|
|
|
2976
2976
|
@Field(() => [mj_core_schema_server_object_types.EntitySetting_])
|
|
2977
|
-
|
|
2977
|
+
EntitySettingsArray: mj_core_schema_server_object_types.EntitySetting_[]; // Link to EntitySettings
|
|
2978
2978
|
|
|
2979
2979
|
@Field(() => [mj_core_schema_server_object_types.DuplicateRun_])
|
|
2980
|
-
|
|
2980
|
+
DuplicateRunsArray: mj_core_schema_server_object_types.DuplicateRun_[]; // Link to DuplicateRuns
|
|
2981
|
+
|
|
2982
|
+
@Field(() => [mj_core_schema_server_object_types.EntityBehavior_])
|
|
2983
|
+
EntityBehaviorsArray: mj_core_schema_server_object_types.EntityBehavior_[]; // Link to EntityBehaviors
|
|
2981
2984
|
|
|
2982
2985
|
}
|
|
2983
2986
|
|
|
@@ -3283,7 +3286,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3283
3286
|
}
|
|
3284
3287
|
|
|
3285
3288
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityField_])
|
|
3286
|
-
async
|
|
3289
|
+
async EntityFieldsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3287
3290
|
this.CheckUserReadPermissions('Entity Fields', userPayload);
|
|
3288
3291
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityFields] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
3289
3292
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Fields', await dataSource.query(sSQL));
|
|
@@ -3291,7 +3294,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3291
3294
|
}
|
|
3292
3295
|
|
|
3293
3296
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
3294
|
-
async
|
|
3297
|
+
async EntityPermissionsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3295
3298
|
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
3296
3299
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityPermissions] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
3297
3300
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Permissions', await dataSource.query(sSQL));
|
|
@@ -3299,7 +3302,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3299
3302
|
}
|
|
3300
3303
|
|
|
3301
3304
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityRelationship_])
|
|
3302
|
-
async
|
|
3305
|
+
async EntityRelationshipsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3303
3306
|
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
3304
3307
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRelationships] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
3305
3308
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Relationships', await dataSource.query(sSQL));
|
|
@@ -3307,7 +3310,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3307
3310
|
}
|
|
3308
3311
|
|
|
3309
3312
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
3310
|
-
async
|
|
3313
|
+
async EntityAIActionsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3311
3314
|
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
3312
3315
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityAIActions] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
3313
3316
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', await dataSource.query(sSQL));
|
|
@@ -3315,7 +3318,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3315
3318
|
}
|
|
3316
3319
|
|
|
3317
3320
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserRecordLog_])
|
|
3318
|
-
async
|
|
3321
|
+
async UserRecordLogsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3319
3322
|
this.CheckUserReadPermissions('User Record Logs', userPayload);
|
|
3320
3323
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRecordLogs] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User Record Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3321
3324
|
const result = this.ArrayMapFieldNamesToCodeNames('User Record Logs', await dataSource.query(sSQL));
|
|
@@ -3323,7 +3326,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3323
3326
|
}
|
|
3324
3327
|
|
|
3325
3328
|
@FieldResolver(() => [mj_core_schema_server_object_types.IntegrationURLFormat_])
|
|
3326
|
-
async
|
|
3329
|
+
async IntegrationURLFormatsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3327
3330
|
this.CheckUserReadPermissions('Integration URL Formats', userPayload);
|
|
3328
3331
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwIntegrationURLFormats] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Integration URL Formats', userPayload, EntityPermissionType.Read, 'AND');
|
|
3329
3332
|
const result = this.ArrayMapFieldNamesToCodeNames('Integration URL Formats', await dataSource.query(sSQL));
|
|
@@ -3339,7 +3342,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3339
3342
|
}
|
|
3340
3343
|
|
|
3341
3344
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserFavorite_])
|
|
3342
|
-
async
|
|
3345
|
+
async UserFavoritesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3343
3346
|
this.CheckUserReadPermissions('User Favorites', userPayload);
|
|
3344
3347
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserFavorites] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
3345
3348
|
const result = this.ArrayMapFieldNamesToCodeNames('User Favorites', await dataSource.query(sSQL));
|
|
@@ -3347,7 +3350,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3347
3350
|
}
|
|
3348
3351
|
|
|
3349
3352
|
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRunDetail_])
|
|
3350
|
-
async
|
|
3353
|
+
async CompanyIntegrationRunDetailsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3351
3354
|
this.CheckUserReadPermissions('Company Integration Run Details', userPayload);
|
|
3352
3355
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRunDetails] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
3353
3356
|
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Run Details', await dataSource.query(sSQL));
|
|
@@ -3355,7 +3358,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3355
3358
|
}
|
|
3356
3359
|
|
|
3357
3360
|
@FieldResolver(() => [mj_core_schema_server_object_types.ApplicationEntity_])
|
|
3358
|
-
async
|
|
3361
|
+
async ApplicationEntitiesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3359
3362
|
this.CheckUserReadPermissions('Application Entities', userPayload);
|
|
3360
3363
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationEntities] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
3361
3364
|
const result = this.ArrayMapFieldNamesToCodeNames('Application Entities', await dataSource.query(sSQL));
|
|
@@ -3363,7 +3366,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3363
3366
|
}
|
|
3364
3367
|
|
|
3365
3368
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserApplicationEntity_])
|
|
3366
|
-
async
|
|
3369
|
+
async UserApplicationEntitiesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3367
3370
|
this.CheckUserReadPermissions('User Application Entities', userPayload);
|
|
3368
3371
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserApplicationEntities] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
3369
3372
|
const result = this.ArrayMapFieldNamesToCodeNames('User Application Entities', await dataSource.query(sSQL));
|
|
@@ -3379,7 +3382,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3379
3382
|
}
|
|
3380
3383
|
|
|
3381
3384
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserView_])
|
|
3382
|
-
async
|
|
3385
|
+
async UserViewsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3383
3386
|
this.CheckUserReadPermissions('User Views', userPayload);
|
|
3384
3387
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViews] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
3385
3388
|
const result = this.ArrayMapFieldNamesToCodeNames('User Views', await dataSource.query(sSQL));
|
|
@@ -3387,7 +3390,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3387
3390
|
}
|
|
3388
3391
|
|
|
3389
3392
|
@FieldResolver(() => [mj_core_schema_server_object_types.RecordChange_])
|
|
3390
|
-
async
|
|
3393
|
+
async RecordChangesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3391
3394
|
this.CheckUserReadPermissions('Record Changes', userPayload);
|
|
3392
3395
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChanges] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Record Changes', userPayload, EntityPermissionType.Read, 'AND');
|
|
3393
3396
|
const result = this.ArrayMapFieldNamesToCodeNames('Record Changes', await dataSource.query(sSQL));
|
|
@@ -3395,7 +3398,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3395
3398
|
}
|
|
3396
3399
|
|
|
3397
3400
|
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
3398
|
-
async
|
|
3401
|
+
async AuditLogsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3399
3402
|
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
3400
3403
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3401
3404
|
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', await dataSource.query(sSQL));
|
|
@@ -3403,7 +3406,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3403
3406
|
}
|
|
3404
3407
|
|
|
3405
3408
|
@FieldResolver(() => [mj_core_schema_server_object_types.ResourceType_])
|
|
3406
|
-
async
|
|
3409
|
+
async ResourceTypesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3407
3410
|
this.CheckUserReadPermissions('Resource Types', userPayload);
|
|
3408
3411
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceTypes] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Resource Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
3409
3412
|
const result = this.ArrayMapFieldNamesToCodeNames('Resource Types', await dataSource.query(sSQL));
|
|
@@ -3411,7 +3414,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3411
3414
|
}
|
|
3412
3415
|
|
|
3413
3416
|
@FieldResolver(() => [mj_core_schema_server_object_types.TaggedItem_])
|
|
3414
|
-
async
|
|
3417
|
+
async TaggedItemsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3415
3418
|
this.CheckUserReadPermissions('Tagged Items', userPayload);
|
|
3416
3419
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTaggedItems] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Tagged Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
3417
3420
|
const result = this.ArrayMapFieldNamesToCodeNames('Tagged Items', await dataSource.query(sSQL));
|
|
@@ -3419,7 +3422,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3419
3422
|
}
|
|
3420
3423
|
|
|
3421
3424
|
@FieldResolver(() => [mj_core_schema_server_object_types.DatasetItem_])
|
|
3422
|
-
async
|
|
3425
|
+
async DatasetItemsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3423
3426
|
this.CheckUserReadPermissions('Dataset Items', userPayload);
|
|
3424
3427
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDatasetItems] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Dataset Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
3425
3428
|
const result = this.ArrayMapFieldNamesToCodeNames('Dataset Items', await dataSource.query(sSQL));
|
|
@@ -3427,7 +3430,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3427
3430
|
}
|
|
3428
3431
|
|
|
3429
3432
|
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRecordMap_])
|
|
3430
|
-
async
|
|
3433
|
+
async CompanyIntegrationRecordMapsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3431
3434
|
this.CheckUserReadPermissions('Company Integration Record Maps', userPayload);
|
|
3432
3435
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRecordMaps] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Record Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
3433
3436
|
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Record Maps', await dataSource.query(sSQL));
|
|
@@ -3435,7 +3438,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3435
3438
|
}
|
|
3436
3439
|
|
|
3437
3440
|
@FieldResolver(() => [mj_core_schema_server_object_types.RecordMergeLog_])
|
|
3438
|
-
async
|
|
3441
|
+
async RecordMergeLogsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3439
3442
|
this.CheckUserReadPermissions('Record Merge Logs', userPayload);
|
|
3440
3443
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordMergeLogs] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3441
3444
|
const result = this.ArrayMapFieldNamesToCodeNames('Record Merge Logs', await dataSource.query(sSQL));
|
|
@@ -3443,7 +3446,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3443
3446
|
}
|
|
3444
3447
|
|
|
3445
3448
|
@FieldResolver(() => [mj_core_schema_server_object_types.QueryField_])
|
|
3446
|
-
async
|
|
3449
|
+
async QueryFieldsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3447
3450
|
this.CheckUserReadPermissions('Query Fields', userPayload);
|
|
3448
3451
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryFields] WHERE [SourceEntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Query Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
3449
3452
|
const result = this.ArrayMapFieldNamesToCodeNames('Query Fields', await dataSource.query(sSQL));
|
|
@@ -3459,7 +3462,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3459
3462
|
}
|
|
3460
3463
|
|
|
3461
3464
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
3462
|
-
async
|
|
3465
|
+
async EntityDocumentsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3463
3466
|
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
3464
3467
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
3465
3468
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', await dataSource.query(sSQL));
|
|
@@ -3467,7 +3470,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3467
3470
|
}
|
|
3468
3471
|
|
|
3469
3472
|
@FieldResolver(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
3470
|
-
async
|
|
3473
|
+
async DataContextItemsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3471
3474
|
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
3472
3475
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
3473
3476
|
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', await dataSource.query(sSQL));
|
|
@@ -3483,7 +3486,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3483
3486
|
}
|
|
3484
3487
|
|
|
3485
3488
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityRecordDocument_])
|
|
3486
|
-
async
|
|
3489
|
+
async EntityRecordDocumentsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3487
3490
|
this.CheckUserReadPermissions('Entity Record Documents', userPayload);
|
|
3488
3491
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRecordDocuments] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Record Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
3489
3492
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Record Documents', await dataSource.query(sSQL));
|
|
@@ -3491,7 +3494,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3491
3494
|
}
|
|
3492
3495
|
|
|
3493
3496
|
@FieldResolver(() => [mj_core_schema_server_object_types.FileEntityRecordLink_])
|
|
3494
|
-
async
|
|
3497
|
+
async FileEntityRecordLinksArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3495
3498
|
this.CheckUserReadPermissions('File Entity Record Links', userPayload);
|
|
3496
3499
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwFileEntityRecordLinks] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('File Entity Record Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
3497
3500
|
const result = this.ArrayMapFieldNamesToCodeNames('File Entity Record Links', await dataSource.query(sSQL));
|
|
@@ -3499,7 +3502,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3499
3502
|
}
|
|
3500
3503
|
|
|
3501
3504
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewCategory_])
|
|
3502
|
-
async
|
|
3505
|
+
async UserViewCategoriesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3503
3506
|
this.CheckUserReadPermissions('User View Categories', userPayload);
|
|
3504
3507
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewCategories] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User View Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
3505
3508
|
const result = this.ArrayMapFieldNamesToCodeNames('User View Categories', await dataSource.query(sSQL));
|
|
@@ -3507,7 +3510,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3507
3510
|
}
|
|
3508
3511
|
|
|
3509
3512
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntitySetting_])
|
|
3510
|
-
async
|
|
3513
|
+
async EntitySettingsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3511
3514
|
this.CheckUserReadPermissions('Entity Settings', userPayload);
|
|
3512
3515
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntitySettings] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
3513
3516
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Settings', await dataSource.query(sSQL));
|
|
@@ -3515,12 +3518,20 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3515
3518
|
}
|
|
3516
3519
|
|
|
3517
3520
|
@FieldResolver(() => [mj_core_schema_server_object_types.DuplicateRun_])
|
|
3518
|
-
async
|
|
3521
|
+
async DuplicateRunsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3519
3522
|
this.CheckUserReadPermissions('Duplicate Runs', userPayload);
|
|
3520
3523
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRuns] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Duplicate Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3521
3524
|
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Runs', await dataSource.query(sSQL));
|
|
3522
3525
|
return result;
|
|
3523
3526
|
}
|
|
3527
|
+
|
|
3528
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityBehavior_])
|
|
3529
|
+
async EntityBehaviorsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3530
|
+
this.CheckUserReadPermissions('Entity Behaviors', userPayload);
|
|
3531
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityBehaviors] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Behaviors', userPayload, EntityPermissionType.Read, 'AND');
|
|
3532
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Behaviors', await dataSource.query(sSQL));
|
|
3533
|
+
return result;
|
|
3534
|
+
}
|
|
3524
3535
|
|
|
3525
3536
|
@Mutation(() => Entity_)
|
|
3526
3537
|
async CreateEntity(
|
|
@@ -3692,10 +3703,10 @@ export class User_ {
|
|
|
3692
3703
|
EmployeeSupervisorEmail?: string;
|
|
3693
3704
|
|
|
3694
3705
|
@Field(() => [mj_core_schema_server_object_types.UserApplication_])
|
|
3695
|
-
|
|
3706
|
+
UserApplicationsArray: mj_core_schema_server_object_types.UserApplication_[]; // Link to UserApplications
|
|
3696
3707
|
|
|
3697
3708
|
@Field(() => [mj_core_schema_server_object_types.UserRole_])
|
|
3698
|
-
|
|
3709
|
+
UserRolesArray: mj_core_schema_server_object_types.UserRole_[]; // Link to UserRoles
|
|
3699
3710
|
|
|
3700
3711
|
@Field(() => [mj_core_schema_server_object_types.Workspace_])
|
|
3701
3712
|
WorkspacesArray: mj_core_schema_server_object_types.Workspace_[]; // Link to Workspaces
|
|
@@ -3704,61 +3715,61 @@ export class User_ {
|
|
|
3704
3715
|
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
3705
3716
|
|
|
3706
3717
|
@Field(() => [mj_core_schema_server_object_types.ReportSnapshot_])
|
|
3707
|
-
|
|
3718
|
+
ReportSnapshotsArray: mj_core_schema_server_object_types.ReportSnapshot_[]; // Link to ReportSnapshots
|
|
3708
3719
|
|
|
3709
3720
|
@Field(() => [mj_core_schema_server_object_types.RecordChange_])
|
|
3710
|
-
|
|
3721
|
+
RecordChangesArray: mj_core_schema_server_object_types.RecordChange_[]; // Link to RecordChanges
|
|
3711
3722
|
|
|
3712
3723
|
@Field(() => [mj_core_schema_server_object_types.Dashboard_])
|
|
3713
3724
|
DashboardsArray: mj_core_schema_server_object_types.Dashboard_[]; // Link to Dashboards
|
|
3714
3725
|
|
|
3715
3726
|
@Field(() => [mj_core_schema_server_object_types.UserViewRun_])
|
|
3716
|
-
|
|
3727
|
+
UserViewRunsArray: mj_core_schema_server_object_types.UserViewRun_[]; // Link to UserViewRuns
|
|
3717
3728
|
|
|
3718
3729
|
@Field(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
3719
|
-
|
|
3730
|
+
AuditLogsArray: mj_core_schema_server_object_types.AuditLog_[]; // Link to AuditLogs
|
|
3720
3731
|
|
|
3721
3732
|
@Field(() => [mj_core_schema_server_object_types.List_])
|
|
3722
3733
|
ListsArray: mj_core_schema_server_object_types.List_[]; // Link to Lists
|
|
3723
3734
|
|
|
3724
3735
|
@Field(() => [mj_core_schema_server_object_types.UserFavorite_])
|
|
3725
|
-
|
|
3736
|
+
UserFavoritesArray: mj_core_schema_server_object_types.UserFavorite_[]; // Link to UserFavorites
|
|
3726
3737
|
|
|
3727
3738
|
@Field(() => [mj_core_schema_server_object_types.UserRecordLog_])
|
|
3728
|
-
|
|
3739
|
+
UserRecordLogsArray: mj_core_schema_server_object_types.UserRecordLog_[]; // Link to UserRecordLogs
|
|
3729
3740
|
|
|
3730
3741
|
@Field(() => [mj_core_schema_server_object_types.UserView_])
|
|
3731
|
-
|
|
3742
|
+
UserViewsArray: mj_core_schema_server_object_types.UserView_[]; // Link to UserViews
|
|
3732
3743
|
|
|
3733
3744
|
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRun_])
|
|
3734
|
-
|
|
3745
|
+
CompanyIntegrationRunsArray: mj_core_schema_server_object_types.CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
3735
3746
|
|
|
3736
3747
|
@Field(() => [mj_core_schema_server_object_types.UserNotification_])
|
|
3737
|
-
|
|
3748
|
+
UserNotificationsArray: mj_core_schema_server_object_types.UserNotification_[]; // Link to UserNotifications
|
|
3738
3749
|
|
|
3739
3750
|
@Field(() => [mj_core_schema_server_object_types.Conversation_])
|
|
3740
3751
|
ConversationsArray: mj_core_schema_server_object_types.Conversation_[]; // Link to Conversations
|
|
3741
3752
|
|
|
3742
3753
|
@Field(() => [mj_core_schema_server_object_types.RecordMergeLog_])
|
|
3743
|
-
|
|
3754
|
+
RecordMergeLogsArray: mj_core_schema_server_object_types.RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
3744
3755
|
|
|
3745
3756
|
@Field(() => [mj_core_schema_server_object_types.DataContext_])
|
|
3746
|
-
|
|
3757
|
+
DataContextsArray: mj_core_schema_server_object_types.DataContext_[]; // Link to DataContexts
|
|
3747
3758
|
|
|
3748
3759
|
@Field(() => [mj_core_schema_server_object_types.ReportCategory_])
|
|
3749
|
-
|
|
3760
|
+
ReportCategoriesArray: mj_core_schema_server_object_types.ReportCategory_[]; // Link to ReportCategories
|
|
3750
3761
|
|
|
3751
3762
|
@Field(() => [mj_core_schema_server_object_types.UserViewCategory_])
|
|
3752
|
-
|
|
3763
|
+
UserViewCategoriesArray: mj_core_schema_server_object_types.UserViewCategory_[]; // Link to UserViewCategories
|
|
3753
3764
|
|
|
3754
3765
|
@Field(() => [mj_core_schema_server_object_types.DashboardCategory_])
|
|
3755
|
-
|
|
3766
|
+
DashboardCategoriesArray: mj_core_schema_server_object_types.DashboardCategory_[]; // Link to DashboardCategories
|
|
3756
3767
|
|
|
3757
3768
|
@Field(() => [mj_core_schema_server_object_types.QueryCategory_])
|
|
3758
|
-
|
|
3769
|
+
QueryCategoriesArray: mj_core_schema_server_object_types.QueryCategory_[]; // Link to QueryCategories
|
|
3759
3770
|
|
|
3760
3771
|
@Field(() => [mj_core_schema_server_object_types.DuplicateRun_])
|
|
3761
|
-
|
|
3772
|
+
DuplicateRunsArray: mj_core_schema_server_object_types.DuplicateRun_[]; // Link to DuplicateRuns
|
|
3762
3773
|
|
|
3763
3774
|
}
|
|
3764
3775
|
|
|
@@ -3905,7 +3916,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3905
3916
|
}
|
|
3906
3917
|
|
|
3907
3918
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserApplication_])
|
|
3908
|
-
async
|
|
3919
|
+
async UserApplicationsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3909
3920
|
this.CheckUserReadPermissions('User Applications', userPayload);
|
|
3910
3921
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserApplications] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Applications', userPayload, EntityPermissionType.Read, 'AND');
|
|
3911
3922
|
const result = this.ArrayMapFieldNamesToCodeNames('User Applications', await dataSource.query(sSQL));
|
|
@@ -3913,7 +3924,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3913
3924
|
}
|
|
3914
3925
|
|
|
3915
3926
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserRole_])
|
|
3916
|
-
async
|
|
3927
|
+
async UserRolesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3917
3928
|
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
3918
3929
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRoles] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
3919
3930
|
const result = this.ArrayMapFieldNamesToCodeNames('User Roles', await dataSource.query(sSQL));
|
|
@@ -3937,7 +3948,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3937
3948
|
}
|
|
3938
3949
|
|
|
3939
3950
|
@FieldResolver(() => [mj_core_schema_server_object_types.ReportSnapshot_])
|
|
3940
|
-
async
|
|
3951
|
+
async ReportSnapshotsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3941
3952
|
this.CheckUserReadPermissions('Report Snapshots', userPayload);
|
|
3942
3953
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportSnapshots] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
3943
3954
|
const result = this.ArrayMapFieldNamesToCodeNames('Report Snapshots', await dataSource.query(sSQL));
|
|
@@ -3945,7 +3956,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3945
3956
|
}
|
|
3946
3957
|
|
|
3947
3958
|
@FieldResolver(() => [mj_core_schema_server_object_types.RecordChange_])
|
|
3948
|
-
async
|
|
3959
|
+
async RecordChangesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3949
3960
|
this.CheckUserReadPermissions('Record Changes', userPayload);
|
|
3950
3961
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChanges] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Record Changes', userPayload, EntityPermissionType.Read, 'AND');
|
|
3951
3962
|
const result = this.ArrayMapFieldNamesToCodeNames('Record Changes', await dataSource.query(sSQL));
|
|
@@ -3961,7 +3972,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3961
3972
|
}
|
|
3962
3973
|
|
|
3963
3974
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewRun_])
|
|
3964
|
-
async
|
|
3975
|
+
async UserViewRunsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3965
3976
|
this.CheckUserReadPermissions('User View Runs', userPayload);
|
|
3966
3977
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewRuns] WHERE [RunByUserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User View Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3967
3978
|
const result = this.ArrayMapFieldNamesToCodeNames('User View Runs', await dataSource.query(sSQL));
|
|
@@ -3969,7 +3980,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3969
3980
|
}
|
|
3970
3981
|
|
|
3971
3982
|
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
3972
|
-
async
|
|
3983
|
+
async AuditLogsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3973
3984
|
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
3974
3985
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3975
3986
|
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', await dataSource.query(sSQL));
|
|
@@ -3985,7 +3996,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3985
3996
|
}
|
|
3986
3997
|
|
|
3987
3998
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserFavorite_])
|
|
3988
|
-
async
|
|
3999
|
+
async UserFavoritesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3989
4000
|
this.CheckUserReadPermissions('User Favorites', userPayload);
|
|
3990
4001
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserFavorites] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
3991
4002
|
const result = this.ArrayMapFieldNamesToCodeNames('User Favorites', await dataSource.query(sSQL));
|
|
@@ -3993,7 +4004,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3993
4004
|
}
|
|
3994
4005
|
|
|
3995
4006
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserRecordLog_])
|
|
3996
|
-
async
|
|
4007
|
+
async UserRecordLogsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3997
4008
|
this.CheckUserReadPermissions('User Record Logs', userPayload);
|
|
3998
4009
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRecordLogs] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Record Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
3999
4010
|
const result = this.ArrayMapFieldNamesToCodeNames('User Record Logs', await dataSource.query(sSQL));
|
|
@@ -4001,7 +4012,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4001
4012
|
}
|
|
4002
4013
|
|
|
4003
4014
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserView_])
|
|
4004
|
-
async
|
|
4015
|
+
async UserViewsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4005
4016
|
this.CheckUserReadPermissions('User Views', userPayload);
|
|
4006
4017
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViews] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
4007
4018
|
const result = this.ArrayMapFieldNamesToCodeNames('User Views', await dataSource.query(sSQL));
|
|
@@ -4009,7 +4020,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4009
4020
|
}
|
|
4010
4021
|
|
|
4011
4022
|
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRun_])
|
|
4012
|
-
async
|
|
4023
|
+
async CompanyIntegrationRunsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4013
4024
|
this.CheckUserReadPermissions('Company Integration Runs', userPayload);
|
|
4014
4025
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRuns] WHERE [RunByUserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
4015
4026
|
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Runs', await dataSource.query(sSQL));
|
|
@@ -4017,7 +4028,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4017
4028
|
}
|
|
4018
4029
|
|
|
4019
4030
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserNotification_])
|
|
4020
|
-
async
|
|
4031
|
+
async UserNotificationsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4021
4032
|
this.CheckUserReadPermissions('User Notifications', userPayload);
|
|
4022
4033
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserNotifications] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Notifications', userPayload, EntityPermissionType.Read, 'AND');
|
|
4023
4034
|
const result = this.ArrayMapFieldNamesToCodeNames('User Notifications', await dataSource.query(sSQL));
|
|
@@ -4033,7 +4044,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4033
4044
|
}
|
|
4034
4045
|
|
|
4035
4046
|
@FieldResolver(() => [mj_core_schema_server_object_types.RecordMergeLog_])
|
|
4036
|
-
async
|
|
4047
|
+
async RecordMergeLogsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4037
4048
|
this.CheckUserReadPermissions('Record Merge Logs', userPayload);
|
|
4038
4049
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordMergeLogs] WHERE [InitiatedByUserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
4039
4050
|
const result = this.ArrayMapFieldNamesToCodeNames('Record Merge Logs', await dataSource.query(sSQL));
|
|
@@ -4041,7 +4052,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4041
4052
|
}
|
|
4042
4053
|
|
|
4043
4054
|
@FieldResolver(() => [mj_core_schema_server_object_types.DataContext_])
|
|
4044
|
-
async
|
|
4055
|
+
async DataContextsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4045
4056
|
this.CheckUserReadPermissions('Data Contexts', userPayload);
|
|
4046
4057
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContexts] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Data Contexts', userPayload, EntityPermissionType.Read, 'AND');
|
|
4047
4058
|
const result = this.ArrayMapFieldNamesToCodeNames('Data Contexts', await dataSource.query(sSQL));
|
|
@@ -4049,7 +4060,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4049
4060
|
}
|
|
4050
4061
|
|
|
4051
4062
|
@FieldResolver(() => [mj_core_schema_server_object_types.ReportCategory_])
|
|
4052
|
-
async
|
|
4063
|
+
async ReportCategoriesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4053
4064
|
this.CheckUserReadPermissions('Report Categories', userPayload);
|
|
4054
4065
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportCategories] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
4055
4066
|
const result = this.ArrayMapFieldNamesToCodeNames('Report Categories', await dataSource.query(sSQL));
|
|
@@ -4057,7 +4068,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4057
4068
|
}
|
|
4058
4069
|
|
|
4059
4070
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewCategory_])
|
|
4060
|
-
async
|
|
4071
|
+
async UserViewCategoriesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4061
4072
|
this.CheckUserReadPermissions('User View Categories', userPayload);
|
|
4062
4073
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewCategories] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User View Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
4063
4074
|
const result = this.ArrayMapFieldNamesToCodeNames('User View Categories', await dataSource.query(sSQL));
|
|
@@ -4065,7 +4076,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4065
4076
|
}
|
|
4066
4077
|
|
|
4067
4078
|
@FieldResolver(() => [mj_core_schema_server_object_types.DashboardCategory_])
|
|
4068
|
-
async
|
|
4079
|
+
async DashboardCategoriesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4069
4080
|
this.CheckUserReadPermissions('Dashboard Categories', userPayload);
|
|
4070
4081
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategories] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
4071
4082
|
const result = this.ArrayMapFieldNamesToCodeNames('Dashboard Categories', await dataSource.query(sSQL));
|
|
@@ -4073,7 +4084,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4073
4084
|
}
|
|
4074
4085
|
|
|
4075
4086
|
@FieldResolver(() => [mj_core_schema_server_object_types.QueryCategory_])
|
|
4076
|
-
async
|
|
4087
|
+
async QueryCategoriesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4077
4088
|
this.CheckUserReadPermissions('Query Categories', userPayload);
|
|
4078
4089
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryCategories] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Query Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
4079
4090
|
const result = this.ArrayMapFieldNamesToCodeNames('Query Categories', await dataSource.query(sSQL));
|
|
@@ -4081,7 +4092,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
4081
4092
|
}
|
|
4082
4093
|
|
|
4083
4094
|
@FieldResolver(() => [mj_core_schema_server_object_types.DuplicateRun_])
|
|
4084
|
-
async
|
|
4095
|
+
async DuplicateRunsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4085
4096
|
this.CheckUserReadPermissions('Duplicate Runs', userPayload);
|
|
4086
4097
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRuns] WHERE [StartedByUserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Duplicate Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
4087
4098
|
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Runs', await dataSource.query(sSQL));
|
|
@@ -4432,7 +4443,7 @@ export class EntityRelationshipResolver extends ResolverBase {
|
|
|
4432
4443
|
}
|
|
4433
4444
|
|
|
4434
4445
|
@Query(() => [EntityRelationship_])
|
|
4435
|
-
async
|
|
4446
|
+
async AllEntityRelationships(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4436
4447
|
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
4437
4448
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRelationships]` + this.getRowLevelSecurityWhereClause('Entity Relationships', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
4438
4449
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Relationships', await dataSource.query(sSQL));
|
|
@@ -4792,13 +4803,13 @@ export class UserView_ {
|
|
|
4792
4803
|
EntityBaseView: string;
|
|
4793
4804
|
|
|
4794
4805
|
@Field(() => [mj_core_schema_server_object_types.EntityRelationship_])
|
|
4795
|
-
|
|
4806
|
+
EntityRelationshipsArray: mj_core_schema_server_object_types.EntityRelationship_[]; // Link to EntityRelationships
|
|
4796
4807
|
|
|
4797
4808
|
@Field(() => [mj_core_schema_server_object_types.UserViewRun_])
|
|
4798
|
-
|
|
4809
|
+
UserViewRunsArray: mj_core_schema_server_object_types.UserViewRun_[]; // Link to UserViewRuns
|
|
4799
4810
|
|
|
4800
4811
|
@Field(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
4801
|
-
|
|
4812
|
+
DataContextItemsArray: mj_core_schema_server_object_types.DataContextItem_[]; // Link to DataContextItems
|
|
4802
4813
|
|
|
4803
4814
|
}
|
|
4804
4815
|
|
|
@@ -4973,7 +4984,7 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4973
4984
|
}
|
|
4974
4985
|
|
|
4975
4986
|
@Query(() => [UserView_])
|
|
4976
|
-
async
|
|
4987
|
+
async AllUserViews(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4977
4988
|
this.CheckUserReadPermissions('User Views', userPayload);
|
|
4978
4989
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViews]` + this.getRowLevelSecurityWhereClause('User Views', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
4979
4990
|
const result = this.ArrayMapFieldNamesToCodeNames('User Views', await dataSource.query(sSQL));
|
|
@@ -4981,7 +4992,7 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4981
4992
|
}
|
|
4982
4993
|
|
|
4983
4994
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityRelationship_])
|
|
4984
|
-
async
|
|
4995
|
+
async EntityRelationshipsArray(@Root() userview_: UserView_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4985
4996
|
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
4986
4997
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRelationships] WHERE [DisplayUserViewGUID]=${userview_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
4987
4998
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Relationships', await dataSource.query(sSQL));
|
|
@@ -4989,7 +5000,7 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4989
5000
|
}
|
|
4990
5001
|
|
|
4991
5002
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewRun_])
|
|
4992
|
-
async
|
|
5003
|
+
async UserViewRunsArray(@Root() userview_: UserView_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4993
5004
|
this.CheckUserReadPermissions('User View Runs', userPayload);
|
|
4994
5005
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewRuns] WHERE [UserViewID]=${userview_.ID} ` + this.getRowLevelSecurityWhereClause('User View Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
4995
5006
|
const result = this.ArrayMapFieldNamesToCodeNames('User View Runs', await dataSource.query(sSQL));
|
|
@@ -4997,7 +5008,7 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4997
5008
|
}
|
|
4998
5009
|
|
|
4999
5010
|
@FieldResolver(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
5000
|
-
async
|
|
5011
|
+
async DataContextItemsArray(@Root() userview_: UserView_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5001
5012
|
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
5002
5013
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [ViewID]=${userview_.ID} ` + this.getRowLevelSecurityWhereClause('Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
5003
5014
|
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', await dataSource.query(sSQL));
|
|
@@ -5126,13 +5137,13 @@ export class CompanyIntegrationRun_ {
|
|
|
5126
5137
|
RunByUser: string;
|
|
5127
5138
|
|
|
5128
5139
|
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRunAPILog_])
|
|
5129
|
-
|
|
5140
|
+
CompanyIntegrationRunAPILogsArray: mj_core_schema_server_object_types.CompanyIntegrationRunAPILog_[]; // Link to CompanyIntegrationRunAPILogs
|
|
5130
5141
|
|
|
5131
5142
|
@Field(() => [mj_core_schema_server_object_types.ErrorLog_])
|
|
5132
|
-
|
|
5143
|
+
ErrorLogsArray: mj_core_schema_server_object_types.ErrorLog_[]; // Link to ErrorLogs
|
|
5133
5144
|
|
|
5134
5145
|
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRunDetail_])
|
|
5135
|
-
|
|
5146
|
+
CompanyIntegrationRunDetailsArray: mj_core_schema_server_object_types.CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
5136
5147
|
|
|
5137
5148
|
}
|
|
5138
5149
|
|
|
@@ -5216,7 +5227,7 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
5216
5227
|
}
|
|
5217
5228
|
|
|
5218
5229
|
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRunAPILog_])
|
|
5219
|
-
async
|
|
5230
|
+
async CompanyIntegrationRunAPILogsArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5220
5231
|
this.CheckUserReadPermissions('Company Integration Run API Logs', userPayload);
|
|
5221
5232
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRunAPILogs] WHERE [CompanyIntegrationRunID]=${companyintegrationrun_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Run API Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
5222
5233
|
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Run API Logs', await dataSource.query(sSQL));
|
|
@@ -5224,7 +5235,7 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
5224
5235
|
}
|
|
5225
5236
|
|
|
5226
5237
|
@FieldResolver(() => [mj_core_schema_server_object_types.ErrorLog_])
|
|
5227
|
-
async
|
|
5238
|
+
async ErrorLogsArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5228
5239
|
this.CheckUserReadPermissions('Error Logs', userPayload);
|
|
5229
5240
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwErrorLogs] WHERE [CompanyIntegrationRunID]=${companyintegrationrun_.ID} ` + this.getRowLevelSecurityWhereClause('Error Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
5230
5241
|
const result = this.ArrayMapFieldNamesToCodeNames('Error Logs', await dataSource.query(sSQL));
|
|
@@ -5232,7 +5243,7 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
5232
5243
|
}
|
|
5233
5244
|
|
|
5234
5245
|
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRunDetail_])
|
|
5235
|
-
async
|
|
5246
|
+
async CompanyIntegrationRunDetailsArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5236
5247
|
this.CheckUserReadPermissions('Company Integration Run Details', userPayload);
|
|
5237
5248
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRunDetails] WHERE [CompanyIntegrationRunID]=${companyintegrationrun_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
5238
5249
|
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Run Details', await dataSource.query(sSQL));
|
|
@@ -5314,7 +5325,7 @@ export class CompanyIntegrationRunDetail_ {
|
|
|
5314
5325
|
RunEndedAt?: Date;
|
|
5315
5326
|
|
|
5316
5327
|
@Field(() => [mj_core_schema_server_object_types.ErrorLog_])
|
|
5317
|
-
|
|
5328
|
+
ErrorLogsArray: mj_core_schema_server_object_types.ErrorLog_[]; // Link to ErrorLogs
|
|
5318
5329
|
|
|
5319
5330
|
}
|
|
5320
5331
|
|
|
@@ -5398,7 +5409,7 @@ export class CompanyIntegrationRunDetailResolver extends ResolverBase {
|
|
|
5398
5409
|
}
|
|
5399
5410
|
|
|
5400
5411
|
@FieldResolver(() => [mj_core_schema_server_object_types.ErrorLog_])
|
|
5401
|
-
async
|
|
5412
|
+
async ErrorLogsArray(@Root() companyintegrationrundetail_: CompanyIntegrationRunDetail_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5402
5413
|
this.CheckUserReadPermissions('Error Logs', userPayload);
|
|
5403
5414
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwErrorLogs] WHERE [CompanyIntegrationRunDetailID]=${companyintegrationrundetail_.ID} ` + this.getRowLevelSecurityWhereClause('Error Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
5404
5415
|
const result = this.ArrayMapFieldNamesToCodeNames('Error Logs', await dataSource.query(sSQL));
|
|
@@ -5611,7 +5622,6 @@ export class Application_ {
|
|
|
5611
5622
|
Name: string;
|
|
5612
5623
|
|
|
5613
5624
|
@Field({nullable: true})
|
|
5614
|
-
@MaxLength(1000)
|
|
5615
5625
|
Description?: string;
|
|
5616
5626
|
|
|
5617
5627
|
@Field()
|
|
@@ -5623,10 +5633,13 @@ export class Application_ {
|
|
|
5623
5633
|
UpdatedAt: Date;
|
|
5624
5634
|
|
|
5625
5635
|
@Field(() => [mj_core_schema_server_object_types.ApplicationEntity_])
|
|
5626
|
-
|
|
5636
|
+
ApplicationEntitiesArray: mj_core_schema_server_object_types.ApplicationEntity_[]; // Link to ApplicationEntities
|
|
5627
5637
|
|
|
5628
5638
|
@Field(() => [mj_core_schema_server_object_types.UserApplication_])
|
|
5629
|
-
|
|
5639
|
+
UserApplicationsArray: mj_core_schema_server_object_types.UserApplication_[]; // Link to UserApplications
|
|
5640
|
+
|
|
5641
|
+
@Field(() => [mj_core_schema_server_object_types.ApplicationSetting_])
|
|
5642
|
+
ApplicationSettingsArray: mj_core_schema_server_object_types.ApplicationSetting_[]; // Link to ApplicationSettings
|
|
5630
5643
|
|
|
5631
5644
|
}
|
|
5632
5645
|
|
|
@@ -5719,7 +5732,7 @@ export class ApplicationResolver extends ResolverBase {
|
|
|
5719
5732
|
}
|
|
5720
5733
|
|
|
5721
5734
|
@FieldResolver(() => [mj_core_schema_server_object_types.ApplicationEntity_])
|
|
5722
|
-
async
|
|
5735
|
+
async ApplicationEntitiesArray(@Root() application_: Application_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5723
5736
|
this.CheckUserReadPermissions('Application Entities', userPayload);
|
|
5724
5737
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationEntities] WHERE [ApplicationID]=${application_.ID} ` + this.getRowLevelSecurityWhereClause('Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
5725
5738
|
const result = this.ArrayMapFieldNamesToCodeNames('Application Entities', await dataSource.query(sSQL));
|
|
@@ -5727,12 +5740,20 @@ export class ApplicationResolver extends ResolverBase {
|
|
|
5727
5740
|
}
|
|
5728
5741
|
|
|
5729
5742
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserApplication_])
|
|
5730
|
-
async
|
|
5743
|
+
async UserApplicationsArray(@Root() application_: Application_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5731
5744
|
this.CheckUserReadPermissions('User Applications', userPayload);
|
|
5732
5745
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserApplications] WHERE [ApplicationID]=${application_.ID} ` + this.getRowLevelSecurityWhereClause('User Applications', userPayload, EntityPermissionType.Read, 'AND');
|
|
5733
5746
|
const result = this.ArrayMapFieldNamesToCodeNames('User Applications', await dataSource.query(sSQL));
|
|
5734
5747
|
return result;
|
|
5735
5748
|
}
|
|
5749
|
+
|
|
5750
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ApplicationSetting_])
|
|
5751
|
+
async ApplicationSettingsArray(@Root() application_: Application_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5752
|
+
this.CheckUserReadPermissions('Application Settings', userPayload);
|
|
5753
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationSettings] WHERE [ApplicationID]=${application_.ID} ` + this.getRowLevelSecurityWhereClause('Application Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
5754
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Application Settings', await dataSource.query(sSQL));
|
|
5755
|
+
return result;
|
|
5756
|
+
}
|
|
5736
5757
|
|
|
5737
5758
|
@Mutation(() => Application_)
|
|
5738
5759
|
async CreateApplication(
|
|
@@ -6258,7 +6279,7 @@ export class EntityPermissionResolver extends ResolverBase {
|
|
|
6258
6279
|
}
|
|
6259
6280
|
|
|
6260
6281
|
@Query(() => [EntityPermission_])
|
|
6261
|
-
async
|
|
6282
|
+
async AllEntityPermissions(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6262
6283
|
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
6263
6284
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityPermissions]` + this.getRowLevelSecurityWhereClause('Entity Permissions', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
6264
6285
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Permissions', await dataSource.query(sSQL));
|
|
@@ -6589,7 +6610,7 @@ export class UserApplication_ {
|
|
|
6589
6610
|
Application: string;
|
|
6590
6611
|
|
|
6591
6612
|
@Field(() => [mj_core_schema_server_object_types.UserApplicationEntity_])
|
|
6592
|
-
|
|
6613
|
+
UserApplicationEntitiesArray: mj_core_schema_server_object_types.UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
6593
6614
|
|
|
6594
6615
|
}
|
|
6595
6616
|
|
|
@@ -6667,7 +6688,7 @@ export class UserApplicationResolver extends ResolverBase {
|
|
|
6667
6688
|
}
|
|
6668
6689
|
|
|
6669
6690
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserApplicationEntity_])
|
|
6670
|
-
async
|
|
6691
|
+
async UserApplicationEntitiesArray(@Root() userapplication_: UserApplication_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6671
6692
|
this.CheckUserReadPermissions('User Application Entities', userPayload);
|
|
6672
6693
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserApplicationEntities] WHERE [UserApplicationID]=${userapplication_.ID} ` + this.getRowLevelSecurityWhereClause('User Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
6673
6694
|
const result = this.ArrayMapFieldNamesToCodeNames('User Application Entities', await dataSource.query(sSQL));
|
|
@@ -6920,10 +6941,10 @@ export class List_ {
|
|
|
6920
6941
|
User: string;
|
|
6921
6942
|
|
|
6922
6943
|
@Field(() => [mj_core_schema_server_object_types.ListDetail_])
|
|
6923
|
-
|
|
6944
|
+
ListDetailsArray: mj_core_schema_server_object_types.ListDetail_[]; // Link to ListDetails
|
|
6924
6945
|
|
|
6925
6946
|
@Field(() => [mj_core_schema_server_object_types.DuplicateRun_])
|
|
6926
|
-
|
|
6947
|
+
DuplicateRunsArray: mj_core_schema_server_object_types.DuplicateRun_[]; // Link to DuplicateRuns
|
|
6927
6948
|
|
|
6928
6949
|
}
|
|
6929
6950
|
|
|
@@ -7032,7 +7053,7 @@ export class ListResolver extends ResolverBase {
|
|
|
7032
7053
|
}
|
|
7033
7054
|
|
|
7034
7055
|
@FieldResolver(() => [mj_core_schema_server_object_types.ListDetail_])
|
|
7035
|
-
async
|
|
7056
|
+
async ListDetailsArray(@Root() list_: List_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7036
7057
|
this.CheckUserReadPermissions('List Details', userPayload);
|
|
7037
7058
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwListDetails] WHERE [ListID]=${list_.ID} ` + this.getRowLevelSecurityWhereClause('List Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
7038
7059
|
const result = this.ArrayMapFieldNamesToCodeNames('List Details', await dataSource.query(sSQL));
|
|
@@ -7040,7 +7061,7 @@ export class ListResolver extends ResolverBase {
|
|
|
7040
7061
|
}
|
|
7041
7062
|
|
|
7042
7063
|
@FieldResolver(() => [mj_core_schema_server_object_types.DuplicateRun_])
|
|
7043
|
-
async
|
|
7064
|
+
async DuplicateRunsArray(@Root() list_: List_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7044
7065
|
this.CheckUserReadPermissions('Duplicate Runs', userPayload);
|
|
7045
7066
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRuns] WHERE [SourceListID]=${list_.ID} ` + this.getRowLevelSecurityWhereClause('Duplicate Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
7046
7067
|
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Runs', await dataSource.query(sSQL));
|
|
@@ -7362,7 +7383,7 @@ export class UserViewRun_ {
|
|
|
7362
7383
|
RunByUser: string;
|
|
7363
7384
|
|
|
7364
7385
|
@Field(() => [mj_core_schema_server_object_types.UserViewRunDetail_])
|
|
7365
|
-
|
|
7386
|
+
UserViewRunDetailsArray: mj_core_schema_server_object_types.UserViewRunDetail_[]; // Link to UserViewRunDetails
|
|
7366
7387
|
|
|
7367
7388
|
}
|
|
7368
7389
|
|
|
@@ -7453,7 +7474,7 @@ export class UserViewRunResolver extends ResolverBase {
|
|
|
7453
7474
|
}
|
|
7454
7475
|
|
|
7455
7476
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewRunDetail_])
|
|
7456
|
-
async
|
|
7477
|
+
async UserViewRunDetailsArray(@Root() userviewrun_: UserViewRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7457
7478
|
this.CheckUserReadPermissions('User View Run Details', userPayload);
|
|
7458
7479
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewRunDetails] WHERE [UserViewRunID]=${userviewrun_.ID} ` + this.getRowLevelSecurityWhereClause('User View Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
7459
7480
|
const result = this.ArrayMapFieldNamesToCodeNames('User View Run Details', await dataSource.query(sSQL));
|
|
@@ -7898,7 +7919,7 @@ export class Workflow_ {
|
|
|
7898
7919
|
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
7899
7920
|
|
|
7900
7921
|
@Field(() => [mj_core_schema_server_object_types.WorkflowRun_])
|
|
7901
|
-
|
|
7922
|
+
WorkflowRunsArray: mj_core_schema_server_object_types.WorkflowRun_[]; // Link to WorkflowRuns
|
|
7902
7923
|
|
|
7903
7924
|
}
|
|
7904
7925
|
|
|
@@ -7999,7 +8020,7 @@ export class WorkflowResolver extends ResolverBase {
|
|
|
7999
8020
|
}
|
|
8000
8021
|
|
|
8001
8022
|
@FieldResolver(() => [mj_core_schema_server_object_types.WorkflowRun_])
|
|
8002
|
-
async
|
|
8023
|
+
async WorkflowRunsArray(@Root() workflow_: Workflow_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8003
8024
|
this.CheckUserReadPermissions('Workflow Runs', userPayload);
|
|
8004
8025
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwWorkflowRuns] WHERE [WorkflowName]=${workflow_.ID} ` + this.getRowLevelSecurityWhereClause('Workflow Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
8005
8026
|
const result = this.ArrayMapFieldNamesToCodeNames('Workflow Runs', await dataSource.query(sSQL));
|
|
@@ -8448,7 +8469,7 @@ export class UserRoleResolver extends ResolverBase {
|
|
|
8448
8469
|
}
|
|
8449
8470
|
|
|
8450
8471
|
@Query(() => [UserRole_])
|
|
8451
|
-
async
|
|
8472
|
+
async AllUserRoles(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8452
8473
|
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
8453
8474
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRoles]` + this.getRowLevelSecurityWhereClause('User Roles', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
8454
8475
|
const result = this.ArrayMapFieldNamesToCodeNames('User Roles', await dataSource.query(sSQL));
|
|
@@ -8540,7 +8561,7 @@ export class RowLevelSecurityFilter_ {
|
|
|
8540
8561
|
UpdatedAt: Date;
|
|
8541
8562
|
|
|
8542
8563
|
@Field(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
8543
|
-
|
|
8564
|
+
EntityPermissionsArray: mj_core_schema_server_object_types.EntityPermission_[]; // Link to EntityPermissions
|
|
8544
8565
|
|
|
8545
8566
|
}
|
|
8546
8567
|
//****************************************************************************
|
|
@@ -8596,7 +8617,7 @@ export class RowLevelSecurityFilterResolver extends ResolverBase {
|
|
|
8596
8617
|
}
|
|
8597
8618
|
|
|
8598
8619
|
@Query(() => [RowLevelSecurityFilter_])
|
|
8599
|
-
async
|
|
8620
|
+
async AllRowLevelSecurityFilters(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8600
8621
|
this.CheckUserReadPermissions('Row Level Security Filters', userPayload);
|
|
8601
8622
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRowLevelSecurityFilters]` + this.getRowLevelSecurityWhereClause('Row Level Security Filters', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
8602
8623
|
const result = this.ArrayMapFieldNamesToCodeNames('Row Level Security Filters', await dataSource.query(sSQL));
|
|
@@ -8604,7 +8625,7 @@ export class RowLevelSecurityFilterResolver extends ResolverBase {
|
|
|
8604
8625
|
}
|
|
8605
8626
|
|
|
8606
8627
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
8607
|
-
async
|
|
8628
|
+
async EntityPermissionsArray(@Root() rowlevelsecurityfilter_: RowLevelSecurityFilter_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8608
8629
|
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
8609
8630
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityPermissions] WHERE [ReadRLSFilterID]=${rowlevelsecurityfilter_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
8610
8631
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Permissions', await dataSource.query(sSQL));
|
|
@@ -8883,16 +8904,16 @@ export class Authorization_ {
|
|
|
8883
8904
|
Parent?: string;
|
|
8884
8905
|
|
|
8885
8906
|
@Field(() => [mj_core_schema_server_object_types.AuthorizationRole_])
|
|
8886
|
-
|
|
8907
|
+
AuthorizationRolesArray: mj_core_schema_server_object_types.AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
8887
8908
|
|
|
8888
8909
|
@Field(() => [mj_core_schema_server_object_types.Authorization_])
|
|
8889
8910
|
AuthorizationsArray: mj_core_schema_server_object_types.Authorization_[]; // Link to Authorizations
|
|
8890
8911
|
|
|
8891
8912
|
@Field(() => [mj_core_schema_server_object_types.AuditLogType_])
|
|
8892
|
-
|
|
8913
|
+
AuditLogTypesArray: mj_core_schema_server_object_types.AuditLogType_[]; // Link to AuditLogTypes
|
|
8893
8914
|
|
|
8894
8915
|
@Field(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
8895
|
-
|
|
8916
|
+
AuditLogsArray: mj_core_schema_server_object_types.AuditLog_[]; // Link to AuditLogs
|
|
8896
8917
|
|
|
8897
8918
|
}
|
|
8898
8919
|
//****************************************************************************
|
|
@@ -8956,7 +8977,7 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
8956
8977
|
}
|
|
8957
8978
|
|
|
8958
8979
|
@FieldResolver(() => [mj_core_schema_server_object_types.AuthorizationRole_])
|
|
8959
|
-
async
|
|
8980
|
+
async AuthorizationRolesArray(@Root() authorization_: Authorization_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8960
8981
|
this.CheckUserReadPermissions('Authorization Roles', userPayload);
|
|
8961
8982
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuthorizationRoles] WHERE [AuthorizationID]=${authorization_.ID} ` + this.getRowLevelSecurityWhereClause('Authorization Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
8962
8983
|
const result = this.ArrayMapFieldNamesToCodeNames('Authorization Roles', await dataSource.query(sSQL));
|
|
@@ -8972,7 +8993,7 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
8972
8993
|
}
|
|
8973
8994
|
|
|
8974
8995
|
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLogType_])
|
|
8975
|
-
async
|
|
8996
|
+
async AuditLogTypesArray(@Root() authorization_: Authorization_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8976
8997
|
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
8977
8998
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogTypes] WHERE [AuthorizationName]=${authorization_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Log Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
8978
8999
|
const result = this.ArrayMapFieldNamesToCodeNames('Audit Log Types', await dataSource.query(sSQL));
|
|
@@ -8980,7 +9001,7 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
8980
9001
|
}
|
|
8981
9002
|
|
|
8982
9003
|
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
8983
|
-
async
|
|
9004
|
+
async AuditLogsArray(@Root() authorization_: Authorization_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8984
9005
|
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
8985
9006
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [AuthorizationName]=${authorization_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
8986
9007
|
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', await dataSource.query(sSQL));
|
|
@@ -9071,7 +9092,7 @@ export class AuthorizationRoleResolver extends ResolverBase {
|
|
|
9071
9092
|
}
|
|
9072
9093
|
|
|
9073
9094
|
@Query(() => [AuthorizationRole_])
|
|
9074
|
-
async
|
|
9095
|
+
async AllAuthorizationRoles(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9075
9096
|
this.CheckUserReadPermissions('Authorization Roles', userPayload);
|
|
9076
9097
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuthorizationRoles]` + this.getRowLevelSecurityWhereClause('Authorization Roles', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
9077
9098
|
const result = this.ArrayMapFieldNamesToCodeNames('Authorization Roles', await dataSource.query(sSQL));
|
|
@@ -9115,10 +9136,10 @@ export class AuditLogType_ {
|
|
|
9115
9136
|
Parent?: string;
|
|
9116
9137
|
|
|
9117
9138
|
@Field(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
9118
|
-
|
|
9139
|
+
AuditLogsArray: mj_core_schema_server_object_types.AuditLog_[]; // Link to AuditLogs
|
|
9119
9140
|
|
|
9120
9141
|
@Field(() => [mj_core_schema_server_object_types.AuditLogType_])
|
|
9121
|
-
|
|
9142
|
+
AuditLogTypesArray: mj_core_schema_server_object_types.AuditLogType_[]; // Link to AuditLogTypes
|
|
9122
9143
|
|
|
9123
9144
|
}
|
|
9124
9145
|
//****************************************************************************
|
|
@@ -9174,7 +9195,7 @@ export class AuditLogTypeResolver extends ResolverBase {
|
|
|
9174
9195
|
}
|
|
9175
9196
|
|
|
9176
9197
|
@Query(() => [AuditLogType_])
|
|
9177
|
-
async
|
|
9198
|
+
async AllAuditLogTypes(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9178
9199
|
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
9179
9200
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogTypes]` + this.getRowLevelSecurityWhereClause('Audit Log Types', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
9180
9201
|
const result = this.ArrayMapFieldNamesToCodeNames('Audit Log Types', await dataSource.query(sSQL));
|
|
@@ -9182,7 +9203,7 @@ export class AuditLogTypeResolver extends ResolverBase {
|
|
|
9182
9203
|
}
|
|
9183
9204
|
|
|
9184
9205
|
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
9185
|
-
async
|
|
9206
|
+
async AuditLogsArray(@Root() auditlogtype_: AuditLogType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9186
9207
|
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
9187
9208
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [AuditLogTypeName]=${auditlogtype_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9188
9209
|
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', await dataSource.query(sSQL));
|
|
@@ -9190,7 +9211,7 @@ export class AuditLogTypeResolver extends ResolverBase {
|
|
|
9190
9211
|
}
|
|
9191
9212
|
|
|
9192
9213
|
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLogType_])
|
|
9193
|
-
async
|
|
9214
|
+
async AuditLogTypesArray(@Root() auditlogtype_: AuditLogType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9194
9215
|
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
9195
9216
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogTypes] WHERE [ParentID]=${auditlogtype_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Log Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
9196
9217
|
const result = this.ArrayMapFieldNamesToCodeNames('Audit Log Types', await dataSource.query(sSQL));
|
|
@@ -9298,7 +9319,7 @@ export class EntityFieldValueResolver extends ResolverBase {
|
|
|
9298
9319
|
}
|
|
9299
9320
|
|
|
9300
9321
|
@Query(() => [EntityFieldValue_])
|
|
9301
|
-
async
|
|
9322
|
+
async AllEntityFieldValues(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9302
9323
|
this.CheckUserReadPermissions('Entity Field Values', userPayload);
|
|
9303
9324
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityFieldValues]` + this.getRowLevelSecurityWhereClause('Entity Field Values', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
9304
9325
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Field Values', await dataSource.query(sSQL));
|
|
@@ -9360,19 +9381,19 @@ export class AIModel_ {
|
|
|
9360
9381
|
AIModelType: string;
|
|
9361
9382
|
|
|
9362
9383
|
@Field(() => [mj_core_schema_server_object_types.AIAction_])
|
|
9363
|
-
|
|
9384
|
+
AIActionsArray: mj_core_schema_server_object_types.AIAction_[]; // Link to AIActions
|
|
9364
9385
|
|
|
9365
9386
|
@Field(() => [mj_core_schema_server_object_types.AIModelAction_])
|
|
9366
|
-
|
|
9387
|
+
AIModelActionsArray: mj_core_schema_server_object_types.AIModelAction_[]; // Link to AIModelActions
|
|
9367
9388
|
|
|
9368
9389
|
@Field(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
9369
|
-
|
|
9390
|
+
EntityAIActionsArray: mj_core_schema_server_object_types.EntityAIAction_[]; // Link to EntityAIActions
|
|
9370
9391
|
|
|
9371
9392
|
@Field(() => [mj_core_schema_server_object_types.VectorIndex_])
|
|
9372
|
-
|
|
9393
|
+
VectorIndexesArray: mj_core_schema_server_object_types.VectorIndex_[]; // Link to VectorIndexes
|
|
9373
9394
|
|
|
9374
9395
|
@Field(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
9375
|
-
|
|
9396
|
+
EntityDocumentsArray: mj_core_schema_server_object_types.EntityDocument_[]; // Link to EntityDocuments
|
|
9376
9397
|
|
|
9377
9398
|
}
|
|
9378
9399
|
|
|
@@ -9465,7 +9486,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9465
9486
|
}
|
|
9466
9487
|
|
|
9467
9488
|
@Query(() => [AIModel_])
|
|
9468
|
-
async
|
|
9489
|
+
async AllAIModels(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9469
9490
|
this.CheckUserReadPermissions('AI Models', userPayload);
|
|
9470
9491
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModels]` + this.getRowLevelSecurityWhereClause('AI Models', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
9471
9492
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Models', await dataSource.query(sSQL));
|
|
@@ -9473,7 +9494,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9473
9494
|
}
|
|
9474
9495
|
|
|
9475
9496
|
@FieldResolver(() => [mj_core_schema_server_object_types.AIAction_])
|
|
9476
|
-
async
|
|
9497
|
+
async AIActionsArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9477
9498
|
this.CheckUserReadPermissions('AI Actions', userPayload);
|
|
9478
9499
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIActions] WHERE [DefaultModelID]=${aimodel_.ID} ` + this.getRowLevelSecurityWhereClause('AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9479
9500
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Actions', await dataSource.query(sSQL));
|
|
@@ -9481,7 +9502,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9481
9502
|
}
|
|
9482
9503
|
|
|
9483
9504
|
@FieldResolver(() => [mj_core_schema_server_object_types.AIModelAction_])
|
|
9484
|
-
async
|
|
9505
|
+
async AIModelActionsArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9485
9506
|
this.CheckUserReadPermissions('AI Model Actions', userPayload);
|
|
9486
9507
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelActions] WHERE [AIModelID]=${aimodel_.ID} ` + this.getRowLevelSecurityWhereClause('AI Model Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9487
9508
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Model Actions', await dataSource.query(sSQL));
|
|
@@ -9489,7 +9510,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9489
9510
|
}
|
|
9490
9511
|
|
|
9491
9512
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
9492
|
-
async
|
|
9513
|
+
async EntityAIActionsArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9493
9514
|
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
9494
9515
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityAIActions] WHERE [AIModelID]=${aimodel_.ID} ` + this.getRowLevelSecurityWhereClause('Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9495
9516
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', await dataSource.query(sSQL));
|
|
@@ -9497,7 +9518,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9497
9518
|
}
|
|
9498
9519
|
|
|
9499
9520
|
@FieldResolver(() => [mj_core_schema_server_object_types.VectorIndex_])
|
|
9500
|
-
async
|
|
9521
|
+
async VectorIndexesArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9501
9522
|
this.CheckUserReadPermissions('Vector Indexes', userPayload);
|
|
9502
9523
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwVectorIndexes] WHERE [EmbeddingModelID]=${aimodel_.ID} ` + this.getRowLevelSecurityWhereClause('Vector Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
9503
9524
|
const result = this.ArrayMapFieldNamesToCodeNames('Vector Indexes', await dataSource.query(sSQL));
|
|
@@ -9505,7 +9526,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9505
9526
|
}
|
|
9506
9527
|
|
|
9507
9528
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
9508
|
-
async
|
|
9529
|
+
async EntityDocumentsArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9509
9530
|
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
9510
9531
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [AIModelID]=${aimodel_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
9511
9532
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', await dataSource.query(sSQL));
|
|
@@ -9582,10 +9603,10 @@ export class AIAction_ {
|
|
|
9582
9603
|
DefaultModel?: string;
|
|
9583
9604
|
|
|
9584
9605
|
@Field(() => [mj_core_schema_server_object_types.AIModelAction_])
|
|
9585
|
-
|
|
9606
|
+
AIModelActionsArray: mj_core_schema_server_object_types.AIModelAction_[]; // Link to AIModelActions
|
|
9586
9607
|
|
|
9587
9608
|
@Field(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
9588
|
-
|
|
9609
|
+
EntityAIActionsArray: mj_core_schema_server_object_types.EntityAIAction_[]; // Link to EntityAIActions
|
|
9589
9610
|
|
|
9590
9611
|
}
|
|
9591
9612
|
|
|
@@ -9666,7 +9687,7 @@ export class AIActionResolver extends ResolverBase {
|
|
|
9666
9687
|
}
|
|
9667
9688
|
|
|
9668
9689
|
@Query(() => [AIAction_])
|
|
9669
|
-
async
|
|
9690
|
+
async AllAIActions(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9670
9691
|
this.CheckUserReadPermissions('AI Actions', userPayload);
|
|
9671
9692
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIActions]` + this.getRowLevelSecurityWhereClause('AI Actions', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
9672
9693
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Actions', await dataSource.query(sSQL));
|
|
@@ -9674,7 +9695,7 @@ export class AIActionResolver extends ResolverBase {
|
|
|
9674
9695
|
}
|
|
9675
9696
|
|
|
9676
9697
|
@FieldResolver(() => [mj_core_schema_server_object_types.AIModelAction_])
|
|
9677
|
-
async
|
|
9698
|
+
async AIModelActionsArray(@Root() aiaction_: AIAction_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9678
9699
|
this.CheckUserReadPermissions('AI Model Actions', userPayload);
|
|
9679
9700
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelActions] WHERE [AIActionID]=${aiaction_.ID} ` + this.getRowLevelSecurityWhereClause('AI Model Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9680
9701
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Model Actions', await dataSource.query(sSQL));
|
|
@@ -9682,7 +9703,7 @@ export class AIActionResolver extends ResolverBase {
|
|
|
9682
9703
|
}
|
|
9683
9704
|
|
|
9684
9705
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
9685
|
-
async
|
|
9706
|
+
async EntityAIActionsArray(@Root() aiaction_: AIAction_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9686
9707
|
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
9687
9708
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityAIActions] WHERE [AIActionID]=${aiaction_.ID} ` + this.getRowLevelSecurityWhereClause('Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9688
9709
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', await dataSource.query(sSQL));
|
|
@@ -9828,7 +9849,7 @@ export class AIModelActionResolver extends ResolverBase {
|
|
|
9828
9849
|
}
|
|
9829
9850
|
|
|
9830
9851
|
@Query(() => [AIModelAction_])
|
|
9831
|
-
async
|
|
9852
|
+
async AllAIModelActions(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9832
9853
|
this.CheckUserReadPermissions('AI Model Actions', userPayload);
|
|
9833
9854
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelActions]` + this.getRowLevelSecurityWhereClause('AI Model Actions', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
9834
9855
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Model Actions', await dataSource.query(sSQL));
|
|
@@ -10032,7 +10053,7 @@ export class EntityAIActionResolver extends ResolverBase {
|
|
|
10032
10053
|
}
|
|
10033
10054
|
|
|
10034
10055
|
@Query(() => [EntityAIAction_])
|
|
10035
|
-
async
|
|
10056
|
+
async AllEntityAIActions(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10036
10057
|
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
10037
10058
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityAIActions]` + this.getRowLevelSecurityWhereClause('Entity AI Actions', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
10038
10059
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', await dataSource.query(sSQL));
|
|
@@ -10088,7 +10109,7 @@ export class AIModelType_ {
|
|
|
10088
10109
|
Description?: string;
|
|
10089
10110
|
|
|
10090
10111
|
@Field(() => [mj_core_schema_server_object_types.AIModel_])
|
|
10091
|
-
|
|
10112
|
+
AIModelsArray: mj_core_schema_server_object_types.AIModel_[]; // Link to AIModels
|
|
10092
10113
|
|
|
10093
10114
|
}
|
|
10094
10115
|
|
|
@@ -10160,7 +10181,7 @@ export class AIModelTypeResolver extends ResolverBase {
|
|
|
10160
10181
|
}
|
|
10161
10182
|
|
|
10162
10183
|
@Query(() => [AIModelType_])
|
|
10163
|
-
async
|
|
10184
|
+
async AllAIModelTypes(@Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10164
10185
|
this.CheckUserReadPermissions('AI Model Types', userPayload);
|
|
10165
10186
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelTypes]` + this.getRowLevelSecurityWhereClause('AI Model Types', userPayload, EntityPermissionType.Read, ' WHERE');
|
|
10166
10187
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Model Types', await dataSource.query(sSQL));
|
|
@@ -10168,7 +10189,7 @@ export class AIModelTypeResolver extends ResolverBase {
|
|
|
10168
10189
|
}
|
|
10169
10190
|
|
|
10170
10191
|
@FieldResolver(() => [mj_core_schema_server_object_types.AIModel_])
|
|
10171
|
-
async
|
|
10192
|
+
async AIModelsArray(@Root() aimodeltype_: AIModelType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10172
10193
|
this.CheckUserReadPermissions('AI Models', userPayload);
|
|
10173
10194
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModels] WHERE [AIModelTypeID]=${aimodeltype_.ID} ` + this.getRowLevelSecurityWhereClause('AI Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
10174
10195
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Models', await dataSource.query(sSQL));
|
|
@@ -10381,7 +10402,7 @@ export class Queue_ {
|
|
|
10381
10402
|
QueueType: string;
|
|
10382
10403
|
|
|
10383
10404
|
@Field(() => [mj_core_schema_server_object_types.QueueTask_])
|
|
10384
|
-
|
|
10405
|
+
QueueTasksArray: mj_core_schema_server_object_types.QueueTask_[]; // Link to QueueTasks
|
|
10385
10406
|
|
|
10386
10407
|
}
|
|
10387
10408
|
|
|
@@ -10550,7 +10571,7 @@ export class QueueResolver extends ResolverBase {
|
|
|
10550
10571
|
}
|
|
10551
10572
|
|
|
10552
10573
|
@FieldResolver(() => [mj_core_schema_server_object_types.QueueTask_])
|
|
10553
|
-
async
|
|
10574
|
+
async QueueTasksArray(@Root() queue_: Queue_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10554
10575
|
this.CheckUserReadPermissions('Queue Tasks', userPayload);
|
|
10555
10576
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueueTasks] WHERE [QueueID]=${queue_.ID} ` + this.getRowLevelSecurityWhereClause('Queue Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
10556
10577
|
const result = this.ArrayMapFieldNamesToCodeNames('Queue Tasks', await dataSource.query(sSQL));
|
|
@@ -11425,7 +11446,7 @@ export class Report_ {
|
|
|
11425
11446
|
OutputWorkflow?: string;
|
|
11426
11447
|
|
|
11427
11448
|
@Field(() => [mj_core_schema_server_object_types.ReportSnapshot_])
|
|
11428
|
-
|
|
11449
|
+
ReportSnapshotsArray: mj_core_schema_server_object_types.ReportSnapshot_[]; // Link to ReportSnapshots
|
|
11429
11450
|
|
|
11430
11451
|
}
|
|
11431
11452
|
|
|
@@ -11594,7 +11615,7 @@ export class ReportResolver extends ResolverBase {
|
|
|
11594
11615
|
}
|
|
11595
11616
|
|
|
11596
11617
|
@FieldResolver(() => [mj_core_schema_server_object_types.ReportSnapshot_])
|
|
11597
|
-
async
|
|
11618
|
+
async ReportSnapshotsArray(@Root() report_: Report_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11598
11619
|
this.CheckUserReadPermissions('Report Snapshots', userPayload);
|
|
11599
11620
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportSnapshots] WHERE [ReportID]=${report_.ID} ` + this.getRowLevelSecurityWhereClause('Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
11600
11621
|
const result = this.ArrayMapFieldNamesToCodeNames('Report Snapshots', await dataSource.query(sSQL));
|
|
@@ -11935,7 +11956,7 @@ export class ResourceType_ {
|
|
|
11935
11956
|
Entity?: string;
|
|
11936
11957
|
|
|
11937
11958
|
@Field(() => [mj_core_schema_server_object_types.WorkspaceItem_])
|
|
11938
|
-
|
|
11959
|
+
WorkspaceItemsArray: mj_core_schema_server_object_types.WorkspaceItem_[]; // Link to WorkspaceItems
|
|
11939
11960
|
|
|
11940
11961
|
}
|
|
11941
11962
|
//****************************************************************************
|
|
@@ -11992,7 +12013,7 @@ export class ResourceTypeResolver extends ResolverBase {
|
|
|
11992
12013
|
}
|
|
11993
12014
|
|
|
11994
12015
|
@FieldResolver(() => [mj_core_schema_server_object_types.WorkspaceItem_])
|
|
11995
|
-
async
|
|
12016
|
+
async WorkspaceItemsArray(@Root() resourcetype_: ResourceType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11996
12017
|
this.CheckUserReadPermissions('Workspace Items', userPayload);
|
|
11997
12018
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwWorkspaceItems] WHERE [ResourceTypeID]=${resourcetype_.ID} ` + this.getRowLevelSecurityWhereClause('Workspace Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
11998
12019
|
const result = this.ArrayMapFieldNamesToCodeNames('Workspace Items', await dataSource.query(sSQL));
|
|
@@ -12031,7 +12052,7 @@ export class Tag_ {
|
|
|
12031
12052
|
TagsArray: mj_core_schema_server_object_types.Tag_[]; // Link to Tags
|
|
12032
12053
|
|
|
12033
12054
|
@Field(() => [mj_core_schema_server_object_types.TaggedItem_])
|
|
12034
|
-
|
|
12055
|
+
TaggedItemsArray: mj_core_schema_server_object_types.TaggedItem_[]; // Link to TaggedItems
|
|
12035
12056
|
|
|
12036
12057
|
}
|
|
12037
12058
|
//****************************************************************************
|
|
@@ -12096,7 +12117,7 @@ export class TagResolver extends ResolverBase {
|
|
|
12096
12117
|
}
|
|
12097
12118
|
|
|
12098
12119
|
@FieldResolver(() => [mj_core_schema_server_object_types.TaggedItem_])
|
|
12099
|
-
async
|
|
12120
|
+
async TaggedItemsArray(@Root() tag_: Tag_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12100
12121
|
this.CheckUserReadPermissions('Tagged Items', userPayload);
|
|
12101
12122
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTaggedItems] WHERE [TagID]=${tag_.ID} ` + this.getRowLevelSecurityWhereClause('Tagged Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
12102
12123
|
const result = this.ArrayMapFieldNamesToCodeNames('Tagged Items', await dataSource.query(sSQL));
|
|
@@ -12210,7 +12231,7 @@ export class Workspace_ {
|
|
|
12210
12231
|
User: string;
|
|
12211
12232
|
|
|
12212
12233
|
@Field(() => [mj_core_schema_server_object_types.WorkspaceItem_])
|
|
12213
|
-
|
|
12234
|
+
WorkspaceItemsArray: mj_core_schema_server_object_types.WorkspaceItem_[]; // Link to WorkspaceItems
|
|
12214
12235
|
|
|
12215
12236
|
}
|
|
12216
12237
|
|
|
@@ -12302,7 +12323,7 @@ export class WorkspaceResolver extends ResolverBase {
|
|
|
12302
12323
|
}
|
|
12303
12324
|
|
|
12304
12325
|
@FieldResolver(() => [mj_core_schema_server_object_types.WorkspaceItem_])
|
|
12305
|
-
async
|
|
12326
|
+
async WorkspaceItemsArray(@Root() workspace_: Workspace_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12306
12327
|
this.CheckUserReadPermissions('Workspace Items', userPayload);
|
|
12307
12328
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwWorkspaceItems] WHERE [WorkSpaceID]=${workspace_.ID} ` + this.getRowLevelSecurityWhereClause('Workspace Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
12308
12329
|
const result = this.ArrayMapFieldNamesToCodeNames('Workspace Items', await dataSource.query(sSQL));
|
|
@@ -12663,7 +12684,7 @@ export class Dataset_ {
|
|
|
12663
12684
|
UpdatedAt: Date;
|
|
12664
12685
|
|
|
12665
12686
|
@Field(() => [mj_core_schema_server_object_types.DatasetItem_])
|
|
12666
|
-
|
|
12687
|
+
DatasetItemsArray: mj_core_schema_server_object_types.DatasetItem_[]; // Link to DatasetItems
|
|
12667
12688
|
|
|
12668
12689
|
}
|
|
12669
12690
|
//****************************************************************************
|
|
@@ -12719,7 +12740,7 @@ export class DatasetResolver extends ResolverBase {
|
|
|
12719
12740
|
}
|
|
12720
12741
|
|
|
12721
12742
|
@FieldResolver(() => [mj_core_schema_server_object_types.DatasetItem_])
|
|
12722
|
-
async
|
|
12743
|
+
async DatasetItemsArray(@Root() dataset_: Dataset_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12723
12744
|
this.CheckUserReadPermissions('Dataset Items', userPayload);
|
|
12724
12745
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDatasetItems] WHERE [DatasetName]=${dataset_.ID} ` + this.getRowLevelSecurityWhereClause('Dataset Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
12725
12746
|
const result = this.ArrayMapFieldNamesToCodeNames('Dataset Items', await dataSource.query(sSQL));
|
|
@@ -13129,7 +13150,7 @@ export class Conversation_ {
|
|
|
13129
13150
|
LinkedEntity?: string;
|
|
13130
13151
|
|
|
13131
13152
|
@Field(() => [mj_core_schema_server_object_types.ConversationDetail_])
|
|
13132
|
-
|
|
13153
|
+
ConversationDetailsArray: mj_core_schema_server_object_types.ConversationDetail_[]; // Link to ConversationDetails
|
|
13133
13154
|
|
|
13134
13155
|
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
13135
13156
|
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
@@ -13259,7 +13280,7 @@ export class ConversationResolver extends ResolverBase {
|
|
|
13259
13280
|
}
|
|
13260
13281
|
|
|
13261
13282
|
@FieldResolver(() => [mj_core_schema_server_object_types.ConversationDetail_])
|
|
13262
|
-
async
|
|
13283
|
+
async ConversationDetailsArray(@Root() conversation_: Conversation_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13263
13284
|
this.CheckUserReadPermissions('Conversation Details', userPayload);
|
|
13264
13285
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetails] WHERE [ConversationID]=${conversation_.ID} ` + this.getRowLevelSecurityWhereClause('Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
13265
13286
|
const result = this.ArrayMapFieldNamesToCodeNames('Conversation Details', await dataSource.query(sSQL));
|
|
@@ -14053,10 +14074,10 @@ export class RecordMergeLog_ {
|
|
|
14053
14074
|
InitiatedByUser: string;
|
|
14054
14075
|
|
|
14055
14076
|
@Field(() => [mj_core_schema_server_object_types.RecordMergeDeletionLog_])
|
|
14056
|
-
|
|
14077
|
+
RecordMergeDeletionLogsArray: mj_core_schema_server_object_types.RecordMergeDeletionLog_[]; // Link to RecordMergeDeletionLogs
|
|
14057
14078
|
|
|
14058
14079
|
@Field(() => [mj_core_schema_server_object_types.DuplicateRunDetailMatch_])
|
|
14059
|
-
|
|
14080
|
+
DuplicateRunDetailMatchesArray: mj_core_schema_server_object_types.DuplicateRunDetailMatch_[]; // Link to DuplicateRunDetailMatches
|
|
14060
14081
|
|
|
14061
14082
|
}
|
|
14062
14083
|
|
|
@@ -14189,7 +14210,7 @@ export class RecordMergeLogResolver extends ResolverBase {
|
|
|
14189
14210
|
}
|
|
14190
14211
|
|
|
14191
14212
|
@FieldResolver(() => [mj_core_schema_server_object_types.RecordMergeDeletionLog_])
|
|
14192
|
-
async
|
|
14213
|
+
async RecordMergeDeletionLogsArray(@Root() recordmergelog_: RecordMergeLog_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14193
14214
|
this.CheckUserReadPermissions('Record Merge Deletion Logs', userPayload);
|
|
14194
14215
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordMergeDeletionLogs] WHERE [RecordMergeLogID]=${recordmergelog_.ID} ` + this.getRowLevelSecurityWhereClause('Record Merge Deletion Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
14195
14216
|
const result = this.ArrayMapFieldNamesToCodeNames('Record Merge Deletion Logs', await dataSource.query(sSQL));
|
|
@@ -14197,7 +14218,7 @@ export class RecordMergeLogResolver extends ResolverBase {
|
|
|
14197
14218
|
}
|
|
14198
14219
|
|
|
14199
14220
|
@FieldResolver(() => [mj_core_schema_server_object_types.DuplicateRunDetailMatch_])
|
|
14200
|
-
async
|
|
14221
|
+
async DuplicateRunDetailMatchesArray(@Root() recordmergelog_: RecordMergeLog_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14201
14222
|
this.CheckUserReadPermissions('Duplicate Run Detail Matches', userPayload);
|
|
14202
14223
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRunDetailMatches] WHERE [RecordMergeLogID]=${recordmergelog_.ID} ` + this.getRowLevelSecurityWhereClause('Duplicate Run Detail Matches', userPayload, EntityPermissionType.Read, 'AND');
|
|
14203
14224
|
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Run Detail Matches', await dataSource.query(sSQL));
|
|
@@ -14761,7 +14782,7 @@ export class QueryCategory_ {
|
|
|
14761
14782
|
User: string;
|
|
14762
14783
|
|
|
14763
14784
|
@Field(() => [mj_core_schema_server_object_types.QueryCategory_])
|
|
14764
|
-
|
|
14785
|
+
QueryCategoriesArray: mj_core_schema_server_object_types.QueryCategory_[]; // Link to QueryCategories
|
|
14765
14786
|
|
|
14766
14787
|
@Field(() => [mj_core_schema_server_object_types.Query_])
|
|
14767
14788
|
QueriesArray: mj_core_schema_server_object_types.Query_[]; // Link to Queries
|
|
@@ -14861,7 +14882,7 @@ export class QueryCategoryResolver extends ResolverBase {
|
|
|
14861
14882
|
}
|
|
14862
14883
|
|
|
14863
14884
|
@FieldResolver(() => [mj_core_schema_server_object_types.QueryCategory_])
|
|
14864
|
-
async
|
|
14885
|
+
async QueryCategoriesArray(@Root() querycategory_: QueryCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14865
14886
|
this.CheckUserReadPermissions('Query Categories', userPayload);
|
|
14866
14887
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryCategories] WHERE [ParentID]=${querycategory_.ID} ` + this.getRowLevelSecurityWhereClause('Query Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
14867
14888
|
const result = this.ArrayMapFieldNamesToCodeNames('Query Categories', await dataSource.query(sSQL));
|
|
@@ -15012,13 +15033,13 @@ export class Query_ {
|
|
|
15012
15033
|
Category?: string;
|
|
15013
15034
|
|
|
15014
15035
|
@Field(() => [mj_core_schema_server_object_types.QueryField_])
|
|
15015
|
-
|
|
15036
|
+
QueryFieldsArray: mj_core_schema_server_object_types.QueryField_[]; // Link to QueryFields
|
|
15016
15037
|
|
|
15017
15038
|
@Field(() => [mj_core_schema_server_object_types.QueryPermission_])
|
|
15018
|
-
|
|
15039
|
+
QueryPermissionsArray: mj_core_schema_server_object_types.QueryPermission_[]; // Link to QueryPermissions
|
|
15019
15040
|
|
|
15020
15041
|
@Field(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
15021
|
-
|
|
15042
|
+
DataContextItemsArray: mj_core_schema_server_object_types.DataContextItem_[]; // Link to DataContextItems
|
|
15022
15043
|
|
|
15023
15044
|
}
|
|
15024
15045
|
|
|
@@ -15139,7 +15160,7 @@ export class QueryResolver extends ResolverBase {
|
|
|
15139
15160
|
}
|
|
15140
15161
|
|
|
15141
15162
|
@FieldResolver(() => [mj_core_schema_server_object_types.QueryField_])
|
|
15142
|
-
async
|
|
15163
|
+
async QueryFieldsArray(@Root() query_: Query_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15143
15164
|
this.CheckUserReadPermissions('Query Fields', userPayload);
|
|
15144
15165
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryFields] WHERE [QueryID]=${query_.ID} ` + this.getRowLevelSecurityWhereClause('Query Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
15145
15166
|
const result = this.ArrayMapFieldNamesToCodeNames('Query Fields', await dataSource.query(sSQL));
|
|
@@ -15147,7 +15168,7 @@ export class QueryResolver extends ResolverBase {
|
|
|
15147
15168
|
}
|
|
15148
15169
|
|
|
15149
15170
|
@FieldResolver(() => [mj_core_schema_server_object_types.QueryPermission_])
|
|
15150
|
-
async
|
|
15171
|
+
async QueryPermissionsArray(@Root() query_: Query_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15151
15172
|
this.CheckUserReadPermissions('Query Permissions', userPayload);
|
|
15152
15173
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryPermissions] WHERE [QueryID]=${query_.ID} ` + this.getRowLevelSecurityWhereClause('Query Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
15153
15174
|
const result = this.ArrayMapFieldNamesToCodeNames('Query Permissions', await dataSource.query(sSQL));
|
|
@@ -15155,7 +15176,7 @@ export class QueryResolver extends ResolverBase {
|
|
|
15155
15176
|
}
|
|
15156
15177
|
|
|
15157
15178
|
@FieldResolver(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
15158
|
-
async
|
|
15179
|
+
async DataContextItemsArray(@Root() query_: Query_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15159
15180
|
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
15160
15181
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [QueryID]=${query_.ID} ` + this.getRowLevelSecurityWhereClause('Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
15161
15182
|
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', await dataSource.query(sSQL));
|
|
@@ -15611,7 +15632,7 @@ export class EntityDocumentType_ {
|
|
|
15611
15632
|
UpdatedAt: Date;
|
|
15612
15633
|
|
|
15613
15634
|
@Field(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
15614
|
-
|
|
15635
|
+
EntityDocumentsArray: mj_core_schema_server_object_types.EntityDocument_[]; // Link to EntityDocuments
|
|
15615
15636
|
|
|
15616
15637
|
}
|
|
15617
15638
|
|
|
@@ -15696,7 +15717,7 @@ export class EntityDocumentTypeResolver extends ResolverBase {
|
|
|
15696
15717
|
}
|
|
15697
15718
|
|
|
15698
15719
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
15699
|
-
async
|
|
15720
|
+
async EntityDocumentsArray(@Root() entitydocumenttype_: EntityDocumentType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15700
15721
|
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
15701
15722
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [TypeID]=${entitydocumenttype_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
15702
15723
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', await dataSource.query(sSQL));
|
|
@@ -15990,10 +16011,10 @@ export class VectorDatabase_ {
|
|
|
15990
16011
|
UpdatedAt: Date;
|
|
15991
16012
|
|
|
15992
16013
|
@Field(() => [mj_core_schema_server_object_types.VectorIndex_])
|
|
15993
|
-
|
|
16014
|
+
VectorIndexesArray: mj_core_schema_server_object_types.VectorIndex_[]; // Link to VectorIndexes
|
|
15994
16015
|
|
|
15995
16016
|
@Field(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
15996
|
-
|
|
16017
|
+
EntityDocumentsArray: mj_core_schema_server_object_types.EntityDocument_[]; // Link to EntityDocuments
|
|
15997
16018
|
|
|
15998
16019
|
}
|
|
15999
16020
|
|
|
@@ -16090,7 +16111,7 @@ export class VectorDatabaseResolver extends ResolverBase {
|
|
|
16090
16111
|
}
|
|
16091
16112
|
|
|
16092
16113
|
@FieldResolver(() => [mj_core_schema_server_object_types.VectorIndex_])
|
|
16093
|
-
async
|
|
16114
|
+
async VectorIndexesArray(@Root() vectordatabase_: VectorDatabase_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16094
16115
|
this.CheckUserReadPermissions('Vector Indexes', userPayload);
|
|
16095
16116
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwVectorIndexes] WHERE [VectorDatabaseID]=${vectordatabase_.ID} ` + this.getRowLevelSecurityWhereClause('Vector Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
16096
16117
|
const result = this.ArrayMapFieldNamesToCodeNames('Vector Indexes', await dataSource.query(sSQL));
|
|
@@ -16098,7 +16119,7 @@ export class VectorDatabaseResolver extends ResolverBase {
|
|
|
16098
16119
|
}
|
|
16099
16120
|
|
|
16100
16121
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
16101
|
-
async
|
|
16122
|
+
async EntityDocumentsArray(@Root() vectordatabase_: VectorDatabase_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16102
16123
|
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
16103
16124
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [ID]=${vectordatabase_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
16104
16125
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', await dataSource.query(sSQL));
|
|
@@ -16446,10 +16467,10 @@ export class EntityDocument_ {
|
|
|
16446
16467
|
Type: string;
|
|
16447
16468
|
|
|
16448
16469
|
@Field(() => [mj_core_schema_server_object_types.EntityDocumentRun_])
|
|
16449
|
-
|
|
16470
|
+
EntityDocumentRunsArray: mj_core_schema_server_object_types.EntityDocumentRun_[]; // Link to EntityDocumentRuns
|
|
16450
16471
|
|
|
16451
16472
|
@Field(() => [mj_core_schema_server_object_types.EntityDocumentSetting_])
|
|
16452
|
-
|
|
16473
|
+
EntityDocumentSettingsArray: mj_core_schema_server_object_types.EntityDocumentSetting_[]; // Link to EntityDocumentSettings
|
|
16453
16474
|
|
|
16454
16475
|
}
|
|
16455
16476
|
|
|
@@ -16576,7 +16597,7 @@ export class EntityDocumentResolver extends ResolverBase {
|
|
|
16576
16597
|
}
|
|
16577
16598
|
|
|
16578
16599
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityDocumentRun_])
|
|
16579
|
-
async
|
|
16600
|
+
async EntityDocumentRunsArray(@Root() entitydocument_: EntityDocument_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16580
16601
|
this.CheckUserReadPermissions('Entity Document Runs', userPayload);
|
|
16581
16602
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocumentRuns] WHERE [EntityDocumentID]=${entitydocument_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Document Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
16582
16603
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document Runs', await dataSource.query(sSQL));
|
|
@@ -16584,7 +16605,7 @@ export class EntityDocumentResolver extends ResolverBase {
|
|
|
16584
16605
|
}
|
|
16585
16606
|
|
|
16586
16607
|
@FieldResolver(() => [mj_core_schema_server_object_types.EntityDocumentSetting_])
|
|
16587
|
-
async
|
|
16608
|
+
async EntityDocumentSettingsArray(@Root() entitydocument_: EntityDocument_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16588
16609
|
this.CheckUserReadPermissions('Entity Document Settings', userPayload);
|
|
16589
16610
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocumentSettings] WHERE [EntityDocumentID]=${entitydocument_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Document Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
16590
16611
|
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document Settings', await dataSource.query(sSQL));
|
|
@@ -16964,7 +16985,7 @@ export class DataContext_ {
|
|
|
16964
16985
|
User: string;
|
|
16965
16986
|
|
|
16966
16987
|
@Field(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
16967
|
-
|
|
16988
|
+
DataContextItemsArray: mj_core_schema_server_object_types.DataContextItem_[]; // Link to DataContextItems
|
|
16968
16989
|
|
|
16969
16990
|
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
16970
16991
|
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
@@ -17064,7 +17085,7 @@ export class DataContextResolver extends ResolverBase {
|
|
|
17064
17085
|
}
|
|
17065
17086
|
|
|
17066
17087
|
@FieldResolver(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
17067
|
-
async
|
|
17088
|
+
async DataContextItemsArray(@Root() datacontext_: DataContext_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17068
17089
|
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
17069
17090
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [DataContextID]=${datacontext_.ID} ` + this.getRowLevelSecurityWhereClause('Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
17070
17091
|
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', await dataSource.query(sSQL));
|
|
@@ -17209,10 +17230,10 @@ export class UserViewCategory_ {
|
|
|
17209
17230
|
User: string;
|
|
17210
17231
|
|
|
17211
17232
|
@Field(() => [mj_core_schema_server_object_types.UserViewCategory_])
|
|
17212
|
-
|
|
17233
|
+
UserViewCategoriesArray: mj_core_schema_server_object_types.UserViewCategory_[]; // Link to UserViewCategories
|
|
17213
17234
|
|
|
17214
17235
|
@Field(() => [mj_core_schema_server_object_types.UserView_])
|
|
17215
|
-
|
|
17236
|
+
UserViewsArray: mj_core_schema_server_object_types.UserView_[]; // Link to UserViews
|
|
17216
17237
|
|
|
17217
17238
|
}
|
|
17218
17239
|
|
|
@@ -17315,7 +17336,7 @@ export class UserViewCategoryResolver extends ResolverBase {
|
|
|
17315
17336
|
}
|
|
17316
17337
|
|
|
17317
17338
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewCategory_])
|
|
17318
|
-
async
|
|
17339
|
+
async UserViewCategoriesArray(@Root() userviewcategory_: UserViewCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17319
17340
|
this.CheckUserReadPermissions('User View Categories', userPayload);
|
|
17320
17341
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewCategories] WHERE [ParentID]=${userviewcategory_.ID} ` + this.getRowLevelSecurityWhereClause('User View Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
17321
17342
|
const result = this.ArrayMapFieldNamesToCodeNames('User View Categories', await dataSource.query(sSQL));
|
|
@@ -17323,7 +17344,7 @@ export class UserViewCategoryResolver extends ResolverBase {
|
|
|
17323
17344
|
}
|
|
17324
17345
|
|
|
17325
17346
|
@FieldResolver(() => [mj_core_schema_server_object_types.UserView_])
|
|
17326
|
-
async
|
|
17347
|
+
async UserViewsArray(@Root() userviewcategory_: UserViewCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17327
17348
|
this.CheckUserReadPermissions('User Views', userPayload);
|
|
17328
17349
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViews] WHERE [CategoryID]=${userviewcategory_.ID} ` + this.getRowLevelSecurityWhereClause('User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
17329
17350
|
const result = this.ArrayMapFieldNamesToCodeNames('User Views', await dataSource.query(sSQL));
|
|
@@ -17460,7 +17481,7 @@ export class DashboardCategory_ {
|
|
|
17460
17481
|
DashboardsArray: mj_core_schema_server_object_types.Dashboard_[]; // Link to Dashboards
|
|
17461
17482
|
|
|
17462
17483
|
@Field(() => [mj_core_schema_server_object_types.DashboardCategory_])
|
|
17463
|
-
|
|
17484
|
+
DashboardCategoriesArray: mj_core_schema_server_object_types.DashboardCategory_[]; // Link to DashboardCategories
|
|
17464
17485
|
|
|
17465
17486
|
}
|
|
17466
17487
|
|
|
@@ -17565,7 +17586,7 @@ export class DashboardCategoryResolver extends ResolverBase {
|
|
|
17565
17586
|
}
|
|
17566
17587
|
|
|
17567
17588
|
@FieldResolver(() => [mj_core_schema_server_object_types.DashboardCategory_])
|
|
17568
|
-
async
|
|
17589
|
+
async DashboardCategoriesArray(@Root() dashboardcategory_: DashboardCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17569
17590
|
this.CheckUserReadPermissions('Dashboard Categories', userPayload);
|
|
17570
17591
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategories] WHERE [ParentID]=${dashboardcategory_.ID} ` + this.getRowLevelSecurityWhereClause('Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
17571
17592
|
const result = this.ArrayMapFieldNamesToCodeNames('Dashboard Categories', await dataSource.query(sSQL));
|
|
@@ -17699,7 +17720,7 @@ export class ReportCategory_ {
|
|
|
17699
17720
|
User: string;
|
|
17700
17721
|
|
|
17701
17722
|
@Field(() => [mj_core_schema_server_object_types.ReportCategory_])
|
|
17702
|
-
|
|
17723
|
+
ReportCategoriesArray: mj_core_schema_server_object_types.ReportCategory_[]; // Link to ReportCategories
|
|
17703
17724
|
|
|
17704
17725
|
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
17705
17726
|
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
@@ -17799,7 +17820,7 @@ export class ReportCategoryResolver extends ResolverBase {
|
|
|
17799
17820
|
}
|
|
17800
17821
|
|
|
17801
17822
|
@FieldResolver(() => [mj_core_schema_server_object_types.ReportCategory_])
|
|
17802
|
-
async
|
|
17823
|
+
async ReportCategoriesArray(@Root() reportcategory_: ReportCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17803
17824
|
this.CheckUserReadPermissions('Report Categories', userPayload);
|
|
17804
17825
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportCategories] WHERE [ParentID]=${reportcategory_.ID} ` + this.getRowLevelSecurityWhereClause('Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
17805
17826
|
const result = this.ArrayMapFieldNamesToCodeNames('Report Categories', await dataSource.query(sSQL));
|
|
@@ -18170,7 +18191,7 @@ export class File_ {
|
|
|
18170
18191
|
Category?: string;
|
|
18171
18192
|
|
|
18172
18193
|
@Field(() => [mj_core_schema_server_object_types.FileEntityRecordLink_])
|
|
18173
|
-
|
|
18194
|
+
FileEntityRecordLinksArray: mj_core_schema_server_object_types.FileEntityRecordLink_[]; // Link to FileEntityRecordLinks
|
|
18174
18195
|
|
|
18175
18196
|
}
|
|
18176
18197
|
|
|
@@ -18285,7 +18306,7 @@ export class FileResolver extends ResolverBase {
|
|
|
18285
18306
|
}
|
|
18286
18307
|
|
|
18287
18308
|
@FieldResolver(() => [mj_core_schema_server_object_types.FileEntityRecordLink_])
|
|
18288
|
-
async
|
|
18309
|
+
async FileEntityRecordLinksArray(@Root() file_: File_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
18289
18310
|
this.CheckUserReadPermissions('File Entity Record Links', userPayload);
|
|
18290
18311
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwFileEntityRecordLinks] WHERE [FileID]=${file_.ID} ` + this.getRowLevelSecurityWhereClause('File Entity Record Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
18291
18312
|
const result = this.ArrayMapFieldNamesToCodeNames('File Entity Record Links', await dataSource.query(sSQL));
|
|
@@ -18415,7 +18436,7 @@ export class FileCategory_ {
|
|
|
18415
18436
|
FilesArray: mj_core_schema_server_object_types.File_[]; // Link to Files
|
|
18416
18437
|
|
|
18417
18438
|
@Field(() => [mj_core_schema_server_object_types.FileCategory_])
|
|
18418
|
-
|
|
18439
|
+
FileCategoriesArray: mj_core_schema_server_object_types.FileCategory_[]; // Link to FileCategories
|
|
18419
18440
|
|
|
18420
18441
|
}
|
|
18421
18442
|
|
|
@@ -18514,7 +18535,7 @@ export class FileCategoryResolver extends ResolverBase {
|
|
|
18514
18535
|
}
|
|
18515
18536
|
|
|
18516
18537
|
@FieldResolver(() => [mj_core_schema_server_object_types.FileCategory_])
|
|
18517
|
-
async
|
|
18538
|
+
async FileCategoriesArray(@Root() filecategory_: FileCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
18518
18539
|
this.CheckUserReadPermissions('File Categories', userPayload);
|
|
18519
18540
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwFileCategories] WHERE [ParentID]=${filecategory_.ID} ` + this.getRowLevelSecurityWhereClause('File Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
18520
18541
|
const result = this.ArrayMapFieldNamesToCodeNames('File Categories', await dataSource.query(sSQL));
|
|
@@ -19716,7 +19737,7 @@ export class DuplicateRun_ {
|
|
|
19716
19737
|
SourceList: string;
|
|
19717
19738
|
|
|
19718
19739
|
@Field(() => [mj_core_schema_server_object_types.DuplicateRunDetail_])
|
|
19719
|
-
|
|
19740
|
+
DuplicateRunDetailsArray: mj_core_schema_server_object_types.DuplicateRunDetail_[]; // Link to DuplicateRunDetails
|
|
19720
19741
|
|
|
19721
19742
|
}
|
|
19722
19743
|
|
|
@@ -19849,7 +19870,7 @@ export class DuplicateRunResolver extends ResolverBase {
|
|
|
19849
19870
|
}
|
|
19850
19871
|
|
|
19851
19872
|
@FieldResolver(() => [mj_core_schema_server_object_types.DuplicateRunDetail_])
|
|
19852
|
-
async
|
|
19873
|
+
async DuplicateRunDetailsArray(@Root() duplicaterun_: DuplicateRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
19853
19874
|
this.CheckUserReadPermissions('Duplicate Run Details', userPayload);
|
|
19854
19875
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRunDetails] WHERE [DuplicateRunID]=${duplicaterun_.ID} ` + this.getRowLevelSecurityWhereClause('Duplicate Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
19855
19876
|
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Run Details', await dataSource.query(sSQL));
|
|
@@ -19960,7 +19981,7 @@ export class DuplicateRunDetail_ {
|
|
|
19960
19981
|
UpdatedAt: Date;
|
|
19961
19982
|
|
|
19962
19983
|
@Field(() => [mj_core_schema_server_object_types.DuplicateRunDetailMatch_])
|
|
19963
|
-
|
|
19984
|
+
DuplicateRunDetailMatchesArray: mj_core_schema_server_object_types.DuplicateRunDetailMatch_[]; // Link to DuplicateRunDetailMatches
|
|
19964
19985
|
|
|
19965
19986
|
}
|
|
19966
19987
|
|
|
@@ -20075,7 +20096,7 @@ export class DuplicateRunDetailResolver extends ResolverBase {
|
|
|
20075
20096
|
}
|
|
20076
20097
|
|
|
20077
20098
|
@FieldResolver(() => [mj_core_schema_server_object_types.DuplicateRunDetailMatch_])
|
|
20078
|
-
async
|
|
20099
|
+
async DuplicateRunDetailMatchesArray(@Root() duplicaterundetail_: DuplicateRunDetail_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20079
20100
|
this.CheckUserReadPermissions('Duplicate Run Detail Matches', userPayload);
|
|
20080
20101
|
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRunDetailMatches] WHERE [DuplicateRunDetailID]=${duplicaterundetail_.ID} ` + this.getRowLevelSecurityWhereClause('Duplicate Run Detail Matches', userPayload, EntityPermissionType.Read, 'AND');
|
|
20081
20102
|
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Run Detail Matches', await dataSource.query(sSQL));
|
|
@@ -20143,4 +20164,664 @@ export class DuplicateRunDetailResolver extends ResolverBase {
|
|
|
20143
20164
|
const i = input, d = dataSource; // prevent error
|
|
20144
20165
|
}
|
|
20145
20166
|
|
|
20167
|
+
}
|
|
20168
|
+
|
|
20169
|
+
//****************************************************************************
|
|
20170
|
+
// ENTITY CLASS for Entity Behaviors
|
|
20171
|
+
//****************************************************************************
|
|
20172
|
+
@ObjectType({ description: 'Stores the behaviors for each entity and is used for code generation and injection of behavior code into various areas of the system.' })
|
|
20173
|
+
export class EntityBehavior_ {
|
|
20174
|
+
@Field(() => Int)
|
|
20175
|
+
ID: number;
|
|
20176
|
+
|
|
20177
|
+
@Field(() => Int)
|
|
20178
|
+
EntityID: number;
|
|
20179
|
+
|
|
20180
|
+
@Field(() => Int)
|
|
20181
|
+
BehaviorTypeID: number;
|
|
20182
|
+
|
|
20183
|
+
@Field({description: 'This field will be used by the AI system to generate code that corresponds to the requested behavior and inject the code into the appropriate part(s) of the system.'})
|
|
20184
|
+
Description: string;
|
|
20185
|
+
|
|
20186
|
+
@Field(() => Boolean, {description: 'This bit field is automatically turned on whenever the Description field is changed so that a future server process will pick it up and regenerate the code. This might happen asynchronously or synchronously depending on system setup.'})
|
|
20187
|
+
RegenerateCode: boolean;
|
|
20188
|
+
|
|
20189
|
+
@Field({nullable: true, description: 'This is the code that implements the desired behavior. If the CodeGenerated bit is set to 1, each time CodeGen runs, it will use the Code specified here in the appropriate place(s). To override the generated code and prevent it from being changed in the future, set CodeGenerated = 0'})
|
|
20190
|
+
Code?: string;
|
|
20191
|
+
|
|
20192
|
+
@Field({nullable: true, description: 'When an AI model generates code this will be populated with the AI\'s explanation of how the code works to meet the requirements of the behavior. For a non-generated piece of code a developer could manually place an explanation in this field.'})
|
|
20193
|
+
CodeExplanation?: string;
|
|
20194
|
+
|
|
20195
|
+
@Field(() => Boolean)
|
|
20196
|
+
CodeGenerated: boolean;
|
|
20197
|
+
|
|
20198
|
+
@Field()
|
|
20199
|
+
@MaxLength(8)
|
|
20200
|
+
CreatedAt: Date;
|
|
20201
|
+
|
|
20202
|
+
@Field()
|
|
20203
|
+
@MaxLength(8)
|
|
20204
|
+
UpdatedAt: Date;
|
|
20205
|
+
|
|
20206
|
+
@Field()
|
|
20207
|
+
@MaxLength(510)
|
|
20208
|
+
Entity: string;
|
|
20209
|
+
|
|
20210
|
+
}
|
|
20211
|
+
|
|
20212
|
+
//****************************************************************************
|
|
20213
|
+
// INPUT TYPE for Entity Behaviors
|
|
20214
|
+
//****************************************************************************
|
|
20215
|
+
@InputType()
|
|
20216
|
+
export class CreateEntityBehaviorInput {
|
|
20217
|
+
@Field(() => Int)
|
|
20218
|
+
EntityID: number;
|
|
20219
|
+
|
|
20220
|
+
@Field(() => Int)
|
|
20221
|
+
BehaviorTypeID: number;
|
|
20222
|
+
|
|
20223
|
+
@Field()
|
|
20224
|
+
Description: string;
|
|
20225
|
+
|
|
20226
|
+
@Field(() => Boolean)
|
|
20227
|
+
RegenerateCode: boolean;
|
|
20228
|
+
|
|
20229
|
+
@Field({ nullable: true })
|
|
20230
|
+
Code: string;
|
|
20231
|
+
|
|
20232
|
+
@Field({ nullable: true })
|
|
20233
|
+
CodeExplanation: string;
|
|
20234
|
+
|
|
20235
|
+
@Field(() => Boolean)
|
|
20236
|
+
CodeGenerated: boolean;
|
|
20237
|
+
}
|
|
20238
|
+
|
|
20239
|
+
|
|
20240
|
+
//****************************************************************************
|
|
20241
|
+
// INPUT TYPE for Entity Behaviors
|
|
20242
|
+
//****************************************************************************
|
|
20243
|
+
@InputType()
|
|
20244
|
+
export class UpdateEntityBehaviorInput {
|
|
20245
|
+
@Field(() => Int)
|
|
20246
|
+
ID: number;
|
|
20247
|
+
|
|
20248
|
+
@Field(() => Int)
|
|
20249
|
+
EntityID: number;
|
|
20250
|
+
|
|
20251
|
+
@Field(() => Int)
|
|
20252
|
+
BehaviorTypeID: number;
|
|
20253
|
+
|
|
20254
|
+
@Field()
|
|
20255
|
+
Description: string;
|
|
20256
|
+
|
|
20257
|
+
@Field(() => Boolean)
|
|
20258
|
+
RegenerateCode: boolean;
|
|
20259
|
+
|
|
20260
|
+
@Field({ nullable: true })
|
|
20261
|
+
Code: string;
|
|
20262
|
+
|
|
20263
|
+
@Field({ nullable: true })
|
|
20264
|
+
CodeExplanation: string;
|
|
20265
|
+
|
|
20266
|
+
@Field(() => Boolean)
|
|
20267
|
+
CodeGenerated: boolean;
|
|
20268
|
+
}
|
|
20269
|
+
|
|
20270
|
+
//****************************************************************************
|
|
20271
|
+
// RESOLVER for Entity Behaviors
|
|
20272
|
+
//****************************************************************************
|
|
20273
|
+
@ObjectType()
|
|
20274
|
+
export class RunEntityBehaviorViewResult {
|
|
20275
|
+
@Field(() => [EntityBehavior_])
|
|
20276
|
+
Results: EntityBehavior_[];
|
|
20277
|
+
|
|
20278
|
+
@Field(() => Int, {nullable: true})
|
|
20279
|
+
UserViewRunID?: number;
|
|
20280
|
+
|
|
20281
|
+
@Field(() => Int, {nullable: true})
|
|
20282
|
+
RowCount: number;
|
|
20283
|
+
|
|
20284
|
+
@Field(() => Int, {nullable: true})
|
|
20285
|
+
TotalRowCount: number;
|
|
20286
|
+
|
|
20287
|
+
@Field(() => Int, {nullable: true})
|
|
20288
|
+
ExecutionTime: number;
|
|
20289
|
+
|
|
20290
|
+
@Field({nullable: true})
|
|
20291
|
+
ErrorMessage?: string;
|
|
20292
|
+
|
|
20293
|
+
@Field(() => Boolean, {nullable: false})
|
|
20294
|
+
Success: boolean;
|
|
20295
|
+
}
|
|
20296
|
+
|
|
20297
|
+
@Resolver(EntityBehavior_)
|
|
20298
|
+
export class EntityBehaviorResolver extends ResolverBase {
|
|
20299
|
+
@Query(() => RunEntityBehaviorViewResult)
|
|
20300
|
+
async RunEntityBehaviorViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20301
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
20302
|
+
}
|
|
20303
|
+
|
|
20304
|
+
@Query(() => RunEntityBehaviorViewResult)
|
|
20305
|
+
async RunEntityBehaviorViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20306
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
20307
|
+
}
|
|
20308
|
+
|
|
20309
|
+
@Query(() => RunEntityBehaviorViewResult)
|
|
20310
|
+
async RunEntityBehaviorDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20311
|
+
input.EntityName = 'Entity Behaviors';
|
|
20312
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
20313
|
+
}
|
|
20314
|
+
@Query(() => EntityBehavior_, { nullable: true })
|
|
20315
|
+
async EntityBehavior(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityBehavior_ | null> {
|
|
20316
|
+
this.CheckUserReadPermissions('Entity Behaviors', userPayload);
|
|
20317
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityBehaviors] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Behaviors', userPayload, EntityPermissionType.Read, 'AND');
|
|
20318
|
+
const result = this.MapFieldNamesToCodeNames('Entity Behaviors', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
20319
|
+
return result;
|
|
20320
|
+
}
|
|
20321
|
+
|
|
20322
|
+
@Mutation(() => EntityBehavior_)
|
|
20323
|
+
async CreateEntityBehavior(
|
|
20324
|
+
@Arg('input', () => CreateEntityBehaviorInput) input: CreateEntityBehaviorInput,
|
|
20325
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
20326
|
+
@PubSub() pubSub: PubSubEngine
|
|
20327
|
+
) {
|
|
20328
|
+
if (await this.BeforeCreate(dataSource, input)) { // fire event and proceed if it wasn't cancelled
|
|
20329
|
+
const entityObject = <EntityBehaviorEntity>await new Metadata().GetEntityObject('Entity Behaviors', this.GetUserFromPayload(userPayload));
|
|
20330
|
+
await entityObject.NewRecord();
|
|
20331
|
+
entityObject.SetMany(input);
|
|
20332
|
+
if (await entityObject.Save()) {
|
|
20333
|
+
// save worked, fire the AfterCreate event and then return all the data
|
|
20334
|
+
await this.AfterCreate(dataSource, input); // fire event
|
|
20335
|
+
return entityObject.GetAll();
|
|
20336
|
+
}
|
|
20337
|
+
else
|
|
20338
|
+
// save failed, return null
|
|
20339
|
+
return null;
|
|
20340
|
+
}
|
|
20341
|
+
else
|
|
20342
|
+
return null;
|
|
20343
|
+
}
|
|
20344
|
+
|
|
20345
|
+
// Before/After CREATE Event Hooks for Sub-Classes to Override
|
|
20346
|
+
protected async BeforeCreate(dataSource: DataSource, input: CreateEntityBehaviorInput): Promise<boolean> {
|
|
20347
|
+
return true;
|
|
20348
|
+
}
|
|
20349
|
+
protected async AfterCreate(dataSource: DataSource, input: CreateEntityBehaviorInput) {
|
|
20350
|
+
}
|
|
20351
|
+
|
|
20352
|
+
@Mutation(() => EntityBehavior_)
|
|
20353
|
+
async UpdateEntityBehavior(
|
|
20354
|
+
@Arg('input', () => UpdateEntityBehaviorInput) input: UpdateEntityBehaviorInput,
|
|
20355
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
20356
|
+
@PubSub() pubSub: PubSubEngine
|
|
20357
|
+
) {
|
|
20358
|
+
if (await this.BeforeUpdate(dataSource, input)) { // fire event and proceed if it wasn't cancelled
|
|
20359
|
+
const entityObject = <EntityBehaviorEntity>await new Metadata().GetEntityObject('Entity Behaviors', this.GetUserFromPayload(userPayload));
|
|
20360
|
+
entityObject.LoadFromData(input) // using the input instead of loading from DB because TrackChanges is turned off for Entity Behaviors
|
|
20361
|
+
|
|
20362
|
+
if (await entityObject.Save({ IgnoreDirtyState: true /*flag used because of LoadFromData() call above*/ })) {
|
|
20363
|
+
// save worked, fire afterevent and return all the data
|
|
20364
|
+
await this.AfterUpdate(dataSource, input); // fire event
|
|
20365
|
+
return entityObject.GetAll();
|
|
20366
|
+
}
|
|
20367
|
+
else
|
|
20368
|
+
return null; // save failed, return null
|
|
20369
|
+
}
|
|
20370
|
+
else
|
|
20371
|
+
return null;
|
|
20372
|
+
}
|
|
20373
|
+
|
|
20374
|
+
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
20375
|
+
protected async BeforeUpdate(dataSource: DataSource, input: UpdateEntityBehaviorInput): Promise<boolean> {
|
|
20376
|
+
const i = input, d = dataSource; // prevent error
|
|
20377
|
+
return true;
|
|
20378
|
+
}
|
|
20379
|
+
protected async AfterUpdate(dataSource: DataSource, input: UpdateEntityBehaviorInput) {
|
|
20380
|
+
const i = input, d = dataSource; // prevent error
|
|
20381
|
+
}
|
|
20382
|
+
|
|
20383
|
+
@Mutation(() => EntityBehavior_)
|
|
20384
|
+
async DeleteEntityBehavior(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20385
|
+
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
20386
|
+
const entityObject = <EntityBehaviorEntity>await new Metadata().GetEntityObject('Entity Behaviors', this.GetUserFromPayload(userPayload));
|
|
20387
|
+
await entityObject.Load(ID);
|
|
20388
|
+
const returnValue = entityObject.GetAll(); // grab the values before we delete so we can return last state before delete if we are successful.
|
|
20389
|
+
if (await entityObject.Delete()) {
|
|
20390
|
+
await this.AfterDelete(dataSource, ID); // fire event
|
|
20391
|
+
return returnValue;
|
|
20392
|
+
}
|
|
20393
|
+
else
|
|
20394
|
+
return null; // delete failed, this will cause an exception
|
|
20395
|
+
}
|
|
20396
|
+
else
|
|
20397
|
+
return null; // BeforeDelete canceled the operation, this will cause an exception
|
|
20398
|
+
}
|
|
20399
|
+
|
|
20400
|
+
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
20401
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
20402
|
+
const i = ID, d = dataSource; // prevent error;
|
|
20403
|
+
return true;
|
|
20404
|
+
}
|
|
20405
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
20406
|
+
const i = ID, d = dataSource; // prevent error
|
|
20407
|
+
}
|
|
20408
|
+
|
|
20409
|
+
}
|
|
20410
|
+
|
|
20411
|
+
//****************************************************************************
|
|
20412
|
+
// ENTITY CLASS for Entity Behavior Types
|
|
20413
|
+
//****************************************************************************
|
|
20414
|
+
@ObjectType({ description: 'This table stores the list of possible behavior types to use in the Entity Behavior Types entity. ' })
|
|
20415
|
+
export class EntityBehaviorType_ {
|
|
20416
|
+
@Field(() => Int)
|
|
20417
|
+
ID: number;
|
|
20418
|
+
|
|
20419
|
+
@Field({description: 'The name of the behavior, a unique column for the table. '})
|
|
20420
|
+
@MaxLength(200)
|
|
20421
|
+
Name: string;
|
|
20422
|
+
|
|
20423
|
+
@Field({nullable: true})
|
|
20424
|
+
Description?: string;
|
|
20425
|
+
|
|
20426
|
+
@Field()
|
|
20427
|
+
@MaxLength(8)
|
|
20428
|
+
CreatedAt: Date;
|
|
20429
|
+
|
|
20430
|
+
@Field()
|
|
20431
|
+
@MaxLength(8)
|
|
20432
|
+
UpdatedAt: Date;
|
|
20433
|
+
|
|
20434
|
+
@Field(() => [mj_core_schema_server_object_types.EntityBehavior_])
|
|
20435
|
+
EntityBehaviorsArray: mj_core_schema_server_object_types.EntityBehavior_[]; // Link to EntityBehaviors
|
|
20436
|
+
|
|
20437
|
+
}
|
|
20438
|
+
|
|
20439
|
+
//****************************************************************************
|
|
20440
|
+
// INPUT TYPE for Entity Behavior Types
|
|
20441
|
+
//****************************************************************************
|
|
20442
|
+
@InputType()
|
|
20443
|
+
export class CreateEntityBehaviorTypeInput {
|
|
20444
|
+
@Field()
|
|
20445
|
+
Name: string;
|
|
20446
|
+
|
|
20447
|
+
@Field({ nullable: true })
|
|
20448
|
+
Description: string;
|
|
20449
|
+
}
|
|
20450
|
+
|
|
20451
|
+
|
|
20452
|
+
//****************************************************************************
|
|
20453
|
+
// INPUT TYPE for Entity Behavior Types
|
|
20454
|
+
//****************************************************************************
|
|
20455
|
+
@InputType()
|
|
20456
|
+
export class UpdateEntityBehaviorTypeInput {
|
|
20457
|
+
@Field(() => Int)
|
|
20458
|
+
ID: number;
|
|
20459
|
+
|
|
20460
|
+
@Field()
|
|
20461
|
+
Name: string;
|
|
20462
|
+
|
|
20463
|
+
@Field({ nullable: true })
|
|
20464
|
+
Description: string;
|
|
20465
|
+
}
|
|
20466
|
+
|
|
20467
|
+
//****************************************************************************
|
|
20468
|
+
// RESOLVER for Entity Behavior Types
|
|
20469
|
+
//****************************************************************************
|
|
20470
|
+
@ObjectType()
|
|
20471
|
+
export class RunEntityBehaviorTypeViewResult {
|
|
20472
|
+
@Field(() => [EntityBehaviorType_])
|
|
20473
|
+
Results: EntityBehaviorType_[];
|
|
20474
|
+
|
|
20475
|
+
@Field(() => Int, {nullable: true})
|
|
20476
|
+
UserViewRunID?: number;
|
|
20477
|
+
|
|
20478
|
+
@Field(() => Int, {nullable: true})
|
|
20479
|
+
RowCount: number;
|
|
20480
|
+
|
|
20481
|
+
@Field(() => Int, {nullable: true})
|
|
20482
|
+
TotalRowCount: number;
|
|
20483
|
+
|
|
20484
|
+
@Field(() => Int, {nullable: true})
|
|
20485
|
+
ExecutionTime: number;
|
|
20486
|
+
|
|
20487
|
+
@Field({nullable: true})
|
|
20488
|
+
ErrorMessage?: string;
|
|
20489
|
+
|
|
20490
|
+
@Field(() => Boolean, {nullable: false})
|
|
20491
|
+
Success: boolean;
|
|
20492
|
+
}
|
|
20493
|
+
|
|
20494
|
+
@Resolver(EntityBehaviorType_)
|
|
20495
|
+
export class EntityBehaviorTypeResolver extends ResolverBase {
|
|
20496
|
+
@Query(() => RunEntityBehaviorTypeViewResult)
|
|
20497
|
+
async RunEntityBehaviorTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20498
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
20499
|
+
}
|
|
20500
|
+
|
|
20501
|
+
@Query(() => RunEntityBehaviorTypeViewResult)
|
|
20502
|
+
async RunEntityBehaviorTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20503
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
20504
|
+
}
|
|
20505
|
+
|
|
20506
|
+
@Query(() => RunEntityBehaviorTypeViewResult)
|
|
20507
|
+
async RunEntityBehaviorTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20508
|
+
input.EntityName = 'Entity Behavior Types';
|
|
20509
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
20510
|
+
}
|
|
20511
|
+
@Query(() => EntityBehaviorType_, { nullable: true })
|
|
20512
|
+
async EntityBehaviorType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityBehaviorType_ | null> {
|
|
20513
|
+
this.CheckUserReadPermissions('Entity Behavior Types', userPayload);
|
|
20514
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityBehaviorTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Behavior Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
20515
|
+
const result = this.MapFieldNamesToCodeNames('Entity Behavior Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
20516
|
+
return result;
|
|
20517
|
+
}
|
|
20518
|
+
|
|
20519
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityBehavior_])
|
|
20520
|
+
async EntityBehaviorsArray(@Root() entitybehaviortype_: EntityBehaviorType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20521
|
+
this.CheckUserReadPermissions('Entity Behaviors', userPayload);
|
|
20522
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityBehaviors] WHERE [BehaviorTypeID]=${entitybehaviortype_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Behaviors', userPayload, EntityPermissionType.Read, 'AND');
|
|
20523
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Behaviors', await dataSource.query(sSQL));
|
|
20524
|
+
return result;
|
|
20525
|
+
}
|
|
20526
|
+
|
|
20527
|
+
@Mutation(() => EntityBehaviorType_)
|
|
20528
|
+
async CreateEntityBehaviorType(
|
|
20529
|
+
@Arg('input', () => CreateEntityBehaviorTypeInput) input: CreateEntityBehaviorTypeInput,
|
|
20530
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
20531
|
+
@PubSub() pubSub: PubSubEngine
|
|
20532
|
+
) {
|
|
20533
|
+
if (await this.BeforeCreate(dataSource, input)) { // fire event and proceed if it wasn't cancelled
|
|
20534
|
+
const entityObject = <EntityBehaviorTypeEntity>await new Metadata().GetEntityObject('Entity Behavior Types', this.GetUserFromPayload(userPayload));
|
|
20535
|
+
await entityObject.NewRecord();
|
|
20536
|
+
entityObject.SetMany(input);
|
|
20537
|
+
if (await entityObject.Save()) {
|
|
20538
|
+
// save worked, fire the AfterCreate event and then return all the data
|
|
20539
|
+
await this.AfterCreate(dataSource, input); // fire event
|
|
20540
|
+
return entityObject.GetAll();
|
|
20541
|
+
}
|
|
20542
|
+
else
|
|
20543
|
+
// save failed, return null
|
|
20544
|
+
return null;
|
|
20545
|
+
}
|
|
20546
|
+
else
|
|
20547
|
+
return null;
|
|
20548
|
+
}
|
|
20549
|
+
|
|
20550
|
+
// Before/After CREATE Event Hooks for Sub-Classes to Override
|
|
20551
|
+
protected async BeforeCreate(dataSource: DataSource, input: CreateEntityBehaviorTypeInput): Promise<boolean> {
|
|
20552
|
+
return true;
|
|
20553
|
+
}
|
|
20554
|
+
protected async AfterCreate(dataSource: DataSource, input: CreateEntityBehaviorTypeInput) {
|
|
20555
|
+
}
|
|
20556
|
+
|
|
20557
|
+
@Mutation(() => EntityBehaviorType_)
|
|
20558
|
+
async UpdateEntityBehaviorType(
|
|
20559
|
+
@Arg('input', () => UpdateEntityBehaviorTypeInput) input: UpdateEntityBehaviorTypeInput,
|
|
20560
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
20561
|
+
@PubSub() pubSub: PubSubEngine
|
|
20562
|
+
) {
|
|
20563
|
+
if (await this.BeforeUpdate(dataSource, input)) { // fire event and proceed if it wasn't cancelled
|
|
20564
|
+
const entityObject = <EntityBehaviorTypeEntity>await new Metadata().GetEntityObject('Entity Behavior Types', this.GetUserFromPayload(userPayload));
|
|
20565
|
+
entityObject.LoadFromData(input) // using the input instead of loading from DB because TrackChanges is turned off for Entity Behavior Types
|
|
20566
|
+
|
|
20567
|
+
if (await entityObject.Save({ IgnoreDirtyState: true /*flag used because of LoadFromData() call above*/ })) {
|
|
20568
|
+
// save worked, fire afterevent and return all the data
|
|
20569
|
+
await this.AfterUpdate(dataSource, input); // fire event
|
|
20570
|
+
return entityObject.GetAll();
|
|
20571
|
+
}
|
|
20572
|
+
else
|
|
20573
|
+
return null; // save failed, return null
|
|
20574
|
+
}
|
|
20575
|
+
else
|
|
20576
|
+
return null;
|
|
20577
|
+
}
|
|
20578
|
+
|
|
20579
|
+
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
20580
|
+
protected async BeforeUpdate(dataSource: DataSource, input: UpdateEntityBehaviorTypeInput): Promise<boolean> {
|
|
20581
|
+
const i = input, d = dataSource; // prevent error
|
|
20582
|
+
return true;
|
|
20583
|
+
}
|
|
20584
|
+
protected async AfterUpdate(dataSource: DataSource, input: UpdateEntityBehaviorTypeInput) {
|
|
20585
|
+
const i = input, d = dataSource; // prevent error
|
|
20586
|
+
}
|
|
20587
|
+
|
|
20588
|
+
@Mutation(() => EntityBehaviorType_)
|
|
20589
|
+
async DeleteEntityBehaviorType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20590
|
+
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
20591
|
+
const entityObject = <EntityBehaviorTypeEntity>await new Metadata().GetEntityObject('Entity Behavior Types', this.GetUserFromPayload(userPayload));
|
|
20592
|
+
await entityObject.Load(ID);
|
|
20593
|
+
const returnValue = entityObject.GetAll(); // grab the values before we delete so we can return last state before delete if we are successful.
|
|
20594
|
+
if (await entityObject.Delete()) {
|
|
20595
|
+
await this.AfterDelete(dataSource, ID); // fire event
|
|
20596
|
+
return returnValue;
|
|
20597
|
+
}
|
|
20598
|
+
else
|
|
20599
|
+
return null; // delete failed, this will cause an exception
|
|
20600
|
+
}
|
|
20601
|
+
else
|
|
20602
|
+
return null; // BeforeDelete canceled the operation, this will cause an exception
|
|
20603
|
+
}
|
|
20604
|
+
|
|
20605
|
+
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
20606
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
20607
|
+
const i = ID, d = dataSource; // prevent error;
|
|
20608
|
+
return true;
|
|
20609
|
+
}
|
|
20610
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
20611
|
+
const i = ID, d = dataSource; // prevent error
|
|
20612
|
+
}
|
|
20613
|
+
|
|
20614
|
+
}
|
|
20615
|
+
|
|
20616
|
+
//****************************************************************************
|
|
20617
|
+
// ENTITY CLASS for Application Settings
|
|
20618
|
+
//****************************************************************************
|
|
20619
|
+
@ObjectType()
|
|
20620
|
+
export class ApplicationSetting_ {
|
|
20621
|
+
@Field(() => Int)
|
|
20622
|
+
ID: number;
|
|
20623
|
+
|
|
20624
|
+
@Field()
|
|
20625
|
+
@MaxLength(100)
|
|
20626
|
+
ApplicationName: string;
|
|
20627
|
+
|
|
20628
|
+
@Field()
|
|
20629
|
+
@MaxLength(200)
|
|
20630
|
+
Name: string;
|
|
20631
|
+
|
|
20632
|
+
@Field()
|
|
20633
|
+
Value: string;
|
|
20634
|
+
|
|
20635
|
+
@Field({nullable: true})
|
|
20636
|
+
Comments?: string;
|
|
20637
|
+
|
|
20638
|
+
@Field()
|
|
20639
|
+
@MaxLength(8)
|
|
20640
|
+
CreatedAt: Date;
|
|
20641
|
+
|
|
20642
|
+
@Field()
|
|
20643
|
+
@MaxLength(8)
|
|
20644
|
+
UpdatedAt: Date;
|
|
20645
|
+
|
|
20646
|
+
}
|
|
20647
|
+
|
|
20648
|
+
//****************************************************************************
|
|
20649
|
+
// INPUT TYPE for Application Settings
|
|
20650
|
+
//****************************************************************************
|
|
20651
|
+
@InputType()
|
|
20652
|
+
export class CreateApplicationSettingInput {
|
|
20653
|
+
@Field()
|
|
20654
|
+
ApplicationName: string;
|
|
20655
|
+
|
|
20656
|
+
@Field()
|
|
20657
|
+
Name: string;
|
|
20658
|
+
|
|
20659
|
+
@Field()
|
|
20660
|
+
Value: string;
|
|
20661
|
+
|
|
20662
|
+
@Field({ nullable: true })
|
|
20663
|
+
Comments: string;
|
|
20664
|
+
}
|
|
20665
|
+
|
|
20666
|
+
|
|
20667
|
+
//****************************************************************************
|
|
20668
|
+
// INPUT TYPE for Application Settings
|
|
20669
|
+
//****************************************************************************
|
|
20670
|
+
@InputType()
|
|
20671
|
+
export class UpdateApplicationSettingInput {
|
|
20672
|
+
@Field(() => Int)
|
|
20673
|
+
ID: number;
|
|
20674
|
+
|
|
20675
|
+
@Field()
|
|
20676
|
+
ApplicationName: string;
|
|
20677
|
+
|
|
20678
|
+
@Field()
|
|
20679
|
+
Name: string;
|
|
20680
|
+
|
|
20681
|
+
@Field()
|
|
20682
|
+
Value: string;
|
|
20683
|
+
|
|
20684
|
+
@Field({ nullable: true })
|
|
20685
|
+
Comments: string;
|
|
20686
|
+
}
|
|
20687
|
+
|
|
20688
|
+
//****************************************************************************
|
|
20689
|
+
// RESOLVER for Application Settings
|
|
20690
|
+
//****************************************************************************
|
|
20691
|
+
@ObjectType()
|
|
20692
|
+
export class RunApplicationSettingViewResult {
|
|
20693
|
+
@Field(() => [ApplicationSetting_])
|
|
20694
|
+
Results: ApplicationSetting_[];
|
|
20695
|
+
|
|
20696
|
+
@Field(() => Int, {nullable: true})
|
|
20697
|
+
UserViewRunID?: number;
|
|
20698
|
+
|
|
20699
|
+
@Field(() => Int, {nullable: true})
|
|
20700
|
+
RowCount: number;
|
|
20701
|
+
|
|
20702
|
+
@Field(() => Int, {nullable: true})
|
|
20703
|
+
TotalRowCount: number;
|
|
20704
|
+
|
|
20705
|
+
@Field(() => Int, {nullable: true})
|
|
20706
|
+
ExecutionTime: number;
|
|
20707
|
+
|
|
20708
|
+
@Field({nullable: true})
|
|
20709
|
+
ErrorMessage?: string;
|
|
20710
|
+
|
|
20711
|
+
@Field(() => Boolean, {nullable: false})
|
|
20712
|
+
Success: boolean;
|
|
20713
|
+
}
|
|
20714
|
+
|
|
20715
|
+
@Resolver(ApplicationSetting_)
|
|
20716
|
+
export class ApplicationSettingResolver extends ResolverBase {
|
|
20717
|
+
@Query(() => RunApplicationSettingViewResult)
|
|
20718
|
+
async RunApplicationSettingViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20719
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
20720
|
+
}
|
|
20721
|
+
|
|
20722
|
+
@Query(() => RunApplicationSettingViewResult)
|
|
20723
|
+
async RunApplicationSettingViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20724
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
20725
|
+
}
|
|
20726
|
+
|
|
20727
|
+
@Query(() => RunApplicationSettingViewResult)
|
|
20728
|
+
async RunApplicationSettingDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20729
|
+
input.EntityName = 'Application Settings';
|
|
20730
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
20731
|
+
}
|
|
20732
|
+
@Query(() => ApplicationSetting_, { nullable: true })
|
|
20733
|
+
async ApplicationSetting(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ApplicationSetting_ | null> {
|
|
20734
|
+
this.CheckUserReadPermissions('Application Settings', userPayload);
|
|
20735
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationSettings] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Application Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
20736
|
+
const result = this.MapFieldNamesToCodeNames('Application Settings', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
20737
|
+
return result;
|
|
20738
|
+
}
|
|
20739
|
+
|
|
20740
|
+
@Mutation(() => ApplicationSetting_)
|
|
20741
|
+
async CreateApplicationSetting(
|
|
20742
|
+
@Arg('input', () => CreateApplicationSettingInput) input: CreateApplicationSettingInput,
|
|
20743
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
20744
|
+
@PubSub() pubSub: PubSubEngine
|
|
20745
|
+
) {
|
|
20746
|
+
if (await this.BeforeCreate(dataSource, input)) { // fire event and proceed if it wasn't cancelled
|
|
20747
|
+
const entityObject = <ApplicationSettingEntity>await new Metadata().GetEntityObject('Application Settings', this.GetUserFromPayload(userPayload));
|
|
20748
|
+
await entityObject.NewRecord();
|
|
20749
|
+
entityObject.SetMany(input);
|
|
20750
|
+
if (await entityObject.Save()) {
|
|
20751
|
+
// save worked, fire the AfterCreate event and then return all the data
|
|
20752
|
+
await this.AfterCreate(dataSource, input); // fire event
|
|
20753
|
+
return entityObject.GetAll();
|
|
20754
|
+
}
|
|
20755
|
+
else
|
|
20756
|
+
// save failed, return null
|
|
20757
|
+
return null;
|
|
20758
|
+
}
|
|
20759
|
+
else
|
|
20760
|
+
return null;
|
|
20761
|
+
}
|
|
20762
|
+
|
|
20763
|
+
// Before/After CREATE Event Hooks for Sub-Classes to Override
|
|
20764
|
+
protected async BeforeCreate(dataSource: DataSource, input: CreateApplicationSettingInput): Promise<boolean> {
|
|
20765
|
+
return true;
|
|
20766
|
+
}
|
|
20767
|
+
protected async AfterCreate(dataSource: DataSource, input: CreateApplicationSettingInput) {
|
|
20768
|
+
}
|
|
20769
|
+
|
|
20770
|
+
@Mutation(() => ApplicationSetting_)
|
|
20771
|
+
async UpdateApplicationSetting(
|
|
20772
|
+
@Arg('input', () => UpdateApplicationSettingInput) input: UpdateApplicationSettingInput,
|
|
20773
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
20774
|
+
@PubSub() pubSub: PubSubEngine
|
|
20775
|
+
) {
|
|
20776
|
+
if (await this.BeforeUpdate(dataSource, input)) { // fire event and proceed if it wasn't cancelled
|
|
20777
|
+
const entityObject = <ApplicationSettingEntity>await new Metadata().GetEntityObject('Application Settings', this.GetUserFromPayload(userPayload));
|
|
20778
|
+
entityObject.LoadFromData(input) // using the input instead of loading from DB because TrackChanges is turned off for Application Settings
|
|
20779
|
+
|
|
20780
|
+
if (await entityObject.Save({ IgnoreDirtyState: true /*flag used because of LoadFromData() call above*/ })) {
|
|
20781
|
+
// save worked, fire afterevent and return all the data
|
|
20782
|
+
await this.AfterUpdate(dataSource, input); // fire event
|
|
20783
|
+
return entityObject.GetAll();
|
|
20784
|
+
}
|
|
20785
|
+
else
|
|
20786
|
+
return null; // save failed, return null
|
|
20787
|
+
}
|
|
20788
|
+
else
|
|
20789
|
+
return null;
|
|
20790
|
+
}
|
|
20791
|
+
|
|
20792
|
+
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
20793
|
+
protected async BeforeUpdate(dataSource: DataSource, input: UpdateApplicationSettingInput): Promise<boolean> {
|
|
20794
|
+
const i = input, d = dataSource; // prevent error
|
|
20795
|
+
return true;
|
|
20796
|
+
}
|
|
20797
|
+
protected async AfterUpdate(dataSource: DataSource, input: UpdateApplicationSettingInput) {
|
|
20798
|
+
const i = input, d = dataSource; // prevent error
|
|
20799
|
+
}
|
|
20800
|
+
|
|
20801
|
+
@Mutation(() => ApplicationSetting_)
|
|
20802
|
+
async DeleteApplicationSetting(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20803
|
+
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
20804
|
+
const entityObject = <ApplicationSettingEntity>await new Metadata().GetEntityObject('Application Settings', this.GetUserFromPayload(userPayload));
|
|
20805
|
+
await entityObject.Load(ID);
|
|
20806
|
+
const returnValue = entityObject.GetAll(); // grab the values before we delete so we can return last state before delete if we are successful.
|
|
20807
|
+
if (await entityObject.Delete()) {
|
|
20808
|
+
await this.AfterDelete(dataSource, ID); // fire event
|
|
20809
|
+
return returnValue;
|
|
20810
|
+
}
|
|
20811
|
+
else
|
|
20812
|
+
return null; // delete failed, this will cause an exception
|
|
20813
|
+
}
|
|
20814
|
+
else
|
|
20815
|
+
return null; // BeforeDelete canceled the operation, this will cause an exception
|
|
20816
|
+
}
|
|
20817
|
+
|
|
20818
|
+
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
20819
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
20820
|
+
const i = ID, d = dataSource; // prevent error;
|
|
20821
|
+
return true;
|
|
20822
|
+
}
|
|
20823
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
20824
|
+
const i = ID, d = dataSource; // prevent error
|
|
20825
|
+
}
|
|
20826
|
+
|
|
20146
20827
|
}
|