@memberjunction/server 0.9.219 → 0.9.221
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/build.log.json +6 -0
- package/dist/auth/index.js +18 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/tokenExpiredError.js +16 -0
- package/dist/auth/tokenExpiredError.js.map +1 -0
- package/dist/context.js +10 -1
- package/dist/context.js.map +1 -1
- package/dist/generated/generated.js +270 -246
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/src/auth/index.ts +6 -0
- package/src/auth/tokenExpiredError.ts +12 -0
- package/src/context.ts +11 -1
- package/src/generated/generated.ts +513 -511
- package/src/index.ts +1 -0
|
@@ -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
|
+
* GENERATED: 3/7/2024, 11:43:28 AM
|
|
6
6
|
*
|
|
7
7
|
* >>> DO NOT MODIFY THIS FILE!!!!!!!!!!!!
|
|
8
8
|
* >>> YOUR CHANGES WILL BE OVERWRITTEN
|
|
@@ -17,6 +17,8 @@ import { AppContext } from '@memberjunction/server';
|
|
|
17
17
|
import { MaxLength } from 'class-validator';
|
|
18
18
|
import { DataSource } from 'typeorm';
|
|
19
19
|
|
|
20
|
+
import * as mj_core_schema_server_object_types from '@memberjunction/server'
|
|
21
|
+
|
|
20
22
|
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 } from '@memberjunction/core-entities';
|
|
21
23
|
|
|
22
24
|
|
|
@@ -56,14 +58,14 @@ export class Company_ {
|
|
|
56
58
|
@MaxLength(510)
|
|
57
59
|
Domain?: string;
|
|
58
60
|
|
|
59
|
-
@Field(() => [Employee_])
|
|
60
|
-
EmployeesArray: Employee_[]; // Link to Employees
|
|
61
|
+
@Field(() => [mj_core_schema_server_object_types.Employee_])
|
|
62
|
+
EmployeesArray: mj_core_schema_server_object_types.Employee_[]; // Link to Employees
|
|
61
63
|
|
|
62
|
-
@Field(() => [CompanyIntegration_])
|
|
63
|
-
CompanyIntegrationsArray: CompanyIntegration_[]; // Link to CompanyIntegrations
|
|
64
|
+
@Field(() => [mj_core_schema_server_object_types.CompanyIntegration_])
|
|
65
|
+
CompanyIntegrationsArray: mj_core_schema_server_object_types.CompanyIntegration_[]; // Link to CompanyIntegrations
|
|
64
66
|
|
|
65
|
-
@Field(() => [Workflow_])
|
|
66
|
-
WorkflowsArray: Workflow_[]; // Link to Workflows
|
|
67
|
+
@Field(() => [mj_core_schema_server_object_types.Workflow_])
|
|
68
|
+
WorkflowsArray: mj_core_schema_server_object_types.Workflow_[]; // Link to Workflows
|
|
67
69
|
|
|
68
70
|
}
|
|
69
71
|
|
|
@@ -158,7 +160,7 @@ export class CompanyResolver extends ResolverBase {
|
|
|
158
160
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
159
161
|
}
|
|
160
162
|
@Query(() => Company_, { nullable: true })
|
|
161
|
-
async Company(@Arg('ID', () => Int) ID:
|
|
163
|
+
async Company(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Company_ | null> {
|
|
162
164
|
this.CheckUserReadPermissions('Companies', userPayload);
|
|
163
165
|
const sSQL = `SELECT * FROM [admin].[vwCompanies] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Companies', userPayload, EntityPermissionType.Read, 'AND');
|
|
164
166
|
const result = this.MapFieldNamesToCodeNames('Companies', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -173,7 +175,7 @@ export class CompanyResolver extends ResolverBase {
|
|
|
173
175
|
return result;
|
|
174
176
|
}
|
|
175
177
|
|
|
176
|
-
@FieldResolver(() => [Employee_])
|
|
178
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Employee_])
|
|
177
179
|
async EmployeesArray(@Root() company_: Company_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
178
180
|
this.CheckUserReadPermissions('Employees', userPayload);
|
|
179
181
|
const sSQL = `SELECT * FROM [admin].[vwEmployees] WHERE [CompanyID]=${company_.ID} ` + this.getRowLevelSecurityWhereClause('Employees', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -181,7 +183,7 @@ export class CompanyResolver extends ResolverBase {
|
|
|
181
183
|
return result;
|
|
182
184
|
}
|
|
183
185
|
|
|
184
|
-
@FieldResolver(() => [CompanyIntegration_])
|
|
186
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegration_])
|
|
185
187
|
async CompanyIntegrationsArray(@Root() company_: Company_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
186
188
|
this.CheckUserReadPermissions('Company Integrations', userPayload);
|
|
187
189
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrations] WHERE [CompanyName]=${company_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -189,7 +191,7 @@ export class CompanyResolver extends ResolverBase {
|
|
|
189
191
|
return result;
|
|
190
192
|
}
|
|
191
193
|
|
|
192
|
-
@FieldResolver(() => [Workflow_])
|
|
194
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Workflow_])
|
|
193
195
|
async WorkflowsArray(@Root() company_: Company_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
194
196
|
this.CheckUserReadPermissions('Workflows', userPayload);
|
|
195
197
|
const sSQL = `SELECT * FROM [admin].[vwWorkflows] WHERE [CompanyName]=${company_.ID} ` + this.getRowLevelSecurityWhereClause('Workflows', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -259,7 +261,7 @@ export class CompanyResolver extends ResolverBase {
|
|
|
259
261
|
}
|
|
260
262
|
|
|
261
263
|
@Mutation(() => Company_)
|
|
262
|
-
async DeleteCompany(@Arg('ID', () => Int) ID:
|
|
264
|
+
async DeleteCompany(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
263
265
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
264
266
|
const entityObject = <CompanyEntity>await new Metadata().GetEntityObject('Companies', this.GetUserFromPayload(userPayload));
|
|
265
267
|
await entityObject.Load(ID);
|
|
@@ -276,11 +278,11 @@ export class CompanyResolver extends ResolverBase {
|
|
|
276
278
|
}
|
|
277
279
|
|
|
278
280
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
279
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
281
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
280
282
|
const i = ID, d = dataSource; // prevent error;
|
|
281
283
|
return true;
|
|
282
284
|
}
|
|
283
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
285
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
284
286
|
const i = ID, d = dataSource; // prevent error
|
|
285
287
|
}
|
|
286
288
|
|
|
@@ -355,17 +357,17 @@ export class Employee_ {
|
|
|
355
357
|
@MaxLength(200)
|
|
356
358
|
SupervisorEmail?: string;
|
|
357
359
|
|
|
358
|
-
@Field(() => [Employee_])
|
|
359
|
-
EmployeesArray: Employee_[]; // Link to Employees
|
|
360
|
+
@Field(() => [mj_core_schema_server_object_types.Employee_])
|
|
361
|
+
EmployeesArray: mj_core_schema_server_object_types.Employee_[]; // Link to Employees
|
|
360
362
|
|
|
361
|
-
@Field(() => [EmployeeCompanyIntegration_])
|
|
362
|
-
EmployeeCompanyIntegrationsArray: EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
363
|
+
@Field(() => [mj_core_schema_server_object_types.EmployeeCompanyIntegration_])
|
|
364
|
+
EmployeeCompanyIntegrationsArray: mj_core_schema_server_object_types.EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
363
365
|
|
|
364
|
-
@Field(() => [EmployeeRole_])
|
|
365
|
-
EmployeeRolesArray: EmployeeRole_[]; // Link to EmployeeRoles
|
|
366
|
+
@Field(() => [mj_core_schema_server_object_types.EmployeeRole_])
|
|
367
|
+
EmployeeRolesArray: mj_core_schema_server_object_types.EmployeeRole_[]; // Link to EmployeeRoles
|
|
366
368
|
|
|
367
|
-
@Field(() => [EmployeeSkill_])
|
|
368
|
-
EmployeeSkillsArray: EmployeeSkill_[]; // Link to EmployeeSkills
|
|
369
|
+
@Field(() => [mj_core_schema_server_object_types.EmployeeSkill_])
|
|
370
|
+
EmployeeSkillsArray: mj_core_schema_server_object_types.EmployeeSkill_[]; // Link to EmployeeSkills
|
|
369
371
|
|
|
370
372
|
}
|
|
371
373
|
|
|
@@ -478,7 +480,7 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
478
480
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
479
481
|
}
|
|
480
482
|
@Query(() => Employee_, { nullable: true })
|
|
481
|
-
async Employee(@Arg('ID', () => Int) ID:
|
|
483
|
+
async Employee(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Employee_ | null> {
|
|
482
484
|
this.CheckUserReadPermissions('Employees', userPayload);
|
|
483
485
|
const sSQL = `SELECT * FROM [admin].[vwEmployees] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Employees', userPayload, EntityPermissionType.Read, 'AND');
|
|
484
486
|
const result = this.MapFieldNamesToCodeNames('Employees', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -493,7 +495,7 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
493
495
|
return result;
|
|
494
496
|
}
|
|
495
497
|
|
|
496
|
-
@FieldResolver(() => [Employee_])
|
|
498
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Employee_])
|
|
497
499
|
async EmployeesArray(@Root() employee_: Employee_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
498
500
|
this.CheckUserReadPermissions('Employees', userPayload);
|
|
499
501
|
const sSQL = `SELECT * FROM [admin].[vwEmployees] WHERE [SupervisorID]=${employee_.ID} ` + this.getRowLevelSecurityWhereClause('Employees', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -501,7 +503,7 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
501
503
|
return result;
|
|
502
504
|
}
|
|
503
505
|
|
|
504
|
-
@FieldResolver(() => [EmployeeCompanyIntegration_])
|
|
506
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeCompanyIntegration_])
|
|
505
507
|
async EmployeeCompanyIntegrationsArray(@Root() employee_: Employee_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
506
508
|
this.CheckUserReadPermissions('Employee Company Integrations', userPayload);
|
|
507
509
|
const sSQL = `SELECT * FROM [admin].[vwEmployeeCompanyIntegrations] WHERE [EmployeeID]=${employee_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -509,7 +511,7 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
509
511
|
return result;
|
|
510
512
|
}
|
|
511
513
|
|
|
512
|
-
@FieldResolver(() => [EmployeeRole_])
|
|
514
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeRole_])
|
|
513
515
|
async EmployeeRolesArray(@Root() employee_: Employee_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
514
516
|
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
515
517
|
const sSQL = `SELECT * FROM [admin].[vwEmployeeRoles] WHERE [EmployeeID]=${employee_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -517,7 +519,7 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
517
519
|
return result;
|
|
518
520
|
}
|
|
519
521
|
|
|
520
|
-
@FieldResolver(() => [EmployeeSkill_])
|
|
522
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeSkill_])
|
|
521
523
|
async EmployeeSkillsArray(@Root() employee_: Employee_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
522
524
|
this.CheckUserReadPermissions('Employee Skills', userPayload);
|
|
523
525
|
const sSQL = `SELECT * FROM [admin].[vwEmployeeSkills] WHERE [EmployeeID]=${employee_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Skills', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -587,7 +589,7 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
587
589
|
}
|
|
588
590
|
|
|
589
591
|
@Mutation(() => Employee_)
|
|
590
|
-
async DeleteEmployee(@Arg('ID', () => Int) ID:
|
|
592
|
+
async DeleteEmployee(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
591
593
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
592
594
|
const entityObject = <EmployeeEntity>await new Metadata().GetEntityObject('Employees', this.GetUserFromPayload(userPayload));
|
|
593
595
|
await entityObject.Load(ID);
|
|
@@ -604,11 +606,11 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
604
606
|
}
|
|
605
607
|
|
|
606
608
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
607
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
609
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
608
610
|
const i = ID, d = dataSource; // prevent error;
|
|
609
611
|
return true;
|
|
610
612
|
}
|
|
611
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
613
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
612
614
|
const i = ID, d = dataSource; // prevent error
|
|
613
615
|
}
|
|
614
616
|
|
|
@@ -733,7 +735,7 @@ export class UserFavoriteResolverBase extends ResolverBase {
|
|
|
733
735
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
734
736
|
}
|
|
735
737
|
@Query(() => UserFavorite_, { nullable: true })
|
|
736
|
-
async UserFavorite(@Arg('ID', () => Int) ID:
|
|
738
|
+
async UserFavorite(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserFavorite_ | null> {
|
|
737
739
|
this.CheckUserReadPermissions('User Favorites', userPayload);
|
|
738
740
|
const sSQL = `SELECT * FROM [admin].[vwUserFavorites] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
739
741
|
const result = this.MapFieldNamesToCodeNames('User Favorites', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -802,7 +804,7 @@ export class UserFavoriteResolverBase extends ResolverBase {
|
|
|
802
804
|
}
|
|
803
805
|
|
|
804
806
|
@Mutation(() => UserFavorite_)
|
|
805
|
-
async DeleteUserFavorite(@Arg('ID', () => Int) ID:
|
|
807
|
+
async DeleteUserFavorite(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
806
808
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
807
809
|
const entityObject = <UserFavoriteEntity>await new Metadata().GetEntityObject('User Favorites', this.GetUserFromPayload(userPayload));
|
|
808
810
|
await entityObject.Load(ID);
|
|
@@ -819,11 +821,11 @@ export class UserFavoriteResolverBase extends ResolverBase {
|
|
|
819
821
|
}
|
|
820
822
|
|
|
821
823
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
822
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
824
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
823
825
|
const i = ID, d = dataSource; // prevent error;
|
|
824
826
|
return true;
|
|
825
827
|
}
|
|
826
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
828
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
827
829
|
const i = ID, d = dataSource; // prevent error
|
|
828
830
|
}
|
|
829
831
|
|
|
@@ -926,7 +928,7 @@ export class EmployeeCompanyIntegrationResolver extends ResolverBase {
|
|
|
926
928
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
927
929
|
}
|
|
928
930
|
@Query(() => EmployeeCompanyIntegration_, { nullable: true })
|
|
929
|
-
async EmployeeCompanyIntegration(@Arg('ID', () => Int) ID:
|
|
931
|
+
async EmployeeCompanyIntegration(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EmployeeCompanyIntegration_ | null> {
|
|
930
932
|
this.CheckUserReadPermissions('Employee Company Integrations', userPayload);
|
|
931
933
|
const sSQL = `SELECT * FROM [admin].[vwEmployeeCompanyIntegrations] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Employee Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
932
934
|
const result = this.MapFieldNamesToCodeNames('Employee Company Integrations', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -1054,7 +1056,7 @@ export class EmployeeRoleResolver extends ResolverBase {
|
|
|
1054
1056
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1055
1057
|
}
|
|
1056
1058
|
@Query(() => EmployeeRole_, { nullable: true })
|
|
1057
|
-
async EmployeeRole(@Arg('ID', () => Int) ID:
|
|
1059
|
+
async EmployeeRole(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EmployeeRole_ | null> {
|
|
1058
1060
|
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
1059
1061
|
const sSQL = `SELECT * FROM [admin].[vwEmployeeRoles] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
1060
1062
|
const result = this.MapFieldNamesToCodeNames('Employee Roles', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -1182,7 +1184,7 @@ export class EmployeeSkillResolver extends ResolverBase {
|
|
|
1182
1184
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1183
1185
|
}
|
|
1184
1186
|
@Query(() => EmployeeSkill_, { nullable: true })
|
|
1185
|
-
async EmployeeSkill(@Arg('ID', () => Int) ID:
|
|
1187
|
+
async EmployeeSkill(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EmployeeSkill_ | null> {
|
|
1186
1188
|
this.CheckUserReadPermissions('Employee Skills', userPayload);
|
|
1187
1189
|
const sSQL = `SELECT * FROM [admin].[vwEmployeeSkills] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Employee Skills', userPayload, EntityPermissionType.Read, 'AND');
|
|
1188
1190
|
const result = this.MapFieldNamesToCodeNames('Employee Skills', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -1254,20 +1256,20 @@ export class Role_ {
|
|
|
1254
1256
|
@MaxLength(8)
|
|
1255
1257
|
UpdatedAt: Date;
|
|
1256
1258
|
|
|
1257
|
-
@Field(() => [EmployeeRole_])
|
|
1258
|
-
EmployeeRolesArray: EmployeeRole_[]; // Link to EmployeeRoles
|
|
1259
|
+
@Field(() => [mj_core_schema_server_object_types.EmployeeRole_])
|
|
1260
|
+
EmployeeRolesArray: mj_core_schema_server_object_types.EmployeeRole_[]; // Link to EmployeeRoles
|
|
1259
1261
|
|
|
1260
|
-
@Field(() => [EntityPermission_])
|
|
1261
|
-
EntityPermissionsArray: EntityPermission_[]; // Link to EntityPermissions
|
|
1262
|
+
@Field(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
1263
|
+
EntityPermissionsArray: mj_core_schema_server_object_types.EntityPermission_[]; // Link to EntityPermissions
|
|
1262
1264
|
|
|
1263
|
-
@Field(() => [UserRole_])
|
|
1264
|
-
UserRolesArray: UserRole_[]; // Link to UserRoles
|
|
1265
|
+
@Field(() => [mj_core_schema_server_object_types.UserRole_])
|
|
1266
|
+
UserRolesArray: mj_core_schema_server_object_types.UserRole_[]; // Link to UserRoles
|
|
1265
1267
|
|
|
1266
|
-
@Field(() => [AuthorizationRole_])
|
|
1267
|
-
AuthorizationRolesArray: AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
1268
|
+
@Field(() => [mj_core_schema_server_object_types.AuthorizationRole_])
|
|
1269
|
+
AuthorizationRolesArray: mj_core_schema_server_object_types.AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
1268
1270
|
|
|
1269
|
-
@Field(() => [QueryPermission_])
|
|
1270
|
-
QueryPermissionsArray: QueryPermission_[]; // Link to QueryPermissions
|
|
1271
|
+
@Field(() => [mj_core_schema_server_object_types.QueryPermission_])
|
|
1272
|
+
QueryPermissionsArray: mj_core_schema_server_object_types.QueryPermission_[]; // Link to QueryPermissions
|
|
1271
1273
|
|
|
1272
1274
|
}
|
|
1273
1275
|
|
|
@@ -1337,7 +1339,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1337
1339
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1338
1340
|
}
|
|
1339
1341
|
@Query(() => Role_, { nullable: true })
|
|
1340
|
-
async Role(@Arg('ID', () => Int) ID:
|
|
1342
|
+
async Role(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Role_ | null> {
|
|
1341
1343
|
this.CheckUserReadPermissions('Roles', userPayload);
|
|
1342
1344
|
const sSQL = `SELECT * FROM [admin].[vwRoles] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
1343
1345
|
const result = this.MapFieldNamesToCodeNames('Roles', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -1352,7 +1354,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1352
1354
|
return result;
|
|
1353
1355
|
}
|
|
1354
1356
|
|
|
1355
|
-
@FieldResolver(() => [EmployeeRole_])
|
|
1357
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeRole_])
|
|
1356
1358
|
async EmployeeRolesArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1357
1359
|
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
1358
1360
|
const sSQL = `SELECT * FROM [admin].[vwEmployeeRoles] WHERE [RoleID]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -1360,7 +1362,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1360
1362
|
return result;
|
|
1361
1363
|
}
|
|
1362
1364
|
|
|
1363
|
-
@FieldResolver(() => [EntityPermission_])
|
|
1365
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
1364
1366
|
async EntityPermissionsArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1365
1367
|
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
1366
1368
|
const sSQL = `SELECT * FROM [admin].[vwEntityPermissions] WHERE [RoleName]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -1368,7 +1370,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1368
1370
|
return result;
|
|
1369
1371
|
}
|
|
1370
1372
|
|
|
1371
|
-
@FieldResolver(() => [UserRole_])
|
|
1373
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserRole_])
|
|
1372
1374
|
async UserRolesArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1373
1375
|
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
1374
1376
|
const sSQL = `SELECT * FROM [admin].[vwUserRoles] WHERE [RoleName]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('User Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -1376,7 +1378,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1376
1378
|
return result;
|
|
1377
1379
|
}
|
|
1378
1380
|
|
|
1379
|
-
@FieldResolver(() => [AuthorizationRole_])
|
|
1381
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AuthorizationRole_])
|
|
1380
1382
|
async AuthorizationRolesArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1381
1383
|
this.CheckUserReadPermissions('Authorization Roles', userPayload);
|
|
1382
1384
|
const sSQL = `SELECT * FROM [admin].[vwAuthorizationRoles] WHERE [RoleName]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('Authorization Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -1384,7 +1386,7 @@ export class RoleResolver extends ResolverBase {
|
|
|
1384
1386
|
return result;
|
|
1385
1387
|
}
|
|
1386
1388
|
|
|
1387
|
-
@FieldResolver(() => [QueryPermission_])
|
|
1389
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.QueryPermission_])
|
|
1388
1390
|
async QueryPermissionsArray(@Root() role_: Role_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1389
1391
|
this.CheckUserReadPermissions('Query Permissions', userPayload);
|
|
1390
1392
|
const sSQL = `SELECT * FROM [admin].[vwQueryPermissions] WHERE [RoleName]=${role_.ID} ` + this.getRowLevelSecurityWhereClause('Query Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -1452,11 +1454,11 @@ export class Skill_ {
|
|
|
1452
1454
|
@MaxLength(100)
|
|
1453
1455
|
Parent?: string;
|
|
1454
1456
|
|
|
1455
|
-
@Field(() => [EmployeeSkill_])
|
|
1456
|
-
EmployeeSkillsArray: EmployeeSkill_[]; // Link to EmployeeSkills
|
|
1457
|
+
@Field(() => [mj_core_schema_server_object_types.EmployeeSkill_])
|
|
1458
|
+
EmployeeSkillsArray: mj_core_schema_server_object_types.EmployeeSkill_[]; // Link to EmployeeSkills
|
|
1457
1459
|
|
|
1458
|
-
@Field(() => [Skill_])
|
|
1459
|
-
SkillsArray: Skill_[]; // Link to Skills
|
|
1460
|
+
@Field(() => [mj_core_schema_server_object_types.Skill_])
|
|
1461
|
+
SkillsArray: mj_core_schema_server_object_types.Skill_[]; // Link to Skills
|
|
1460
1462
|
|
|
1461
1463
|
}
|
|
1462
1464
|
//****************************************************************************
|
|
@@ -1504,7 +1506,7 @@ export class SkillResolver extends ResolverBase {
|
|
|
1504
1506
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1505
1507
|
}
|
|
1506
1508
|
@Query(() => Skill_, { nullable: true })
|
|
1507
|
-
async Skill(@Arg('ID', () => Int) ID:
|
|
1509
|
+
async Skill(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Skill_ | null> {
|
|
1508
1510
|
this.CheckUserReadPermissions('Skills', userPayload);
|
|
1509
1511
|
const sSQL = `SELECT * FROM [admin].[vwSkills] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Skills', userPayload, EntityPermissionType.Read, 'AND');
|
|
1510
1512
|
const result = this.MapFieldNamesToCodeNames('Skills', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -1519,7 +1521,7 @@ export class SkillResolver extends ResolverBase {
|
|
|
1519
1521
|
return result;
|
|
1520
1522
|
}
|
|
1521
1523
|
|
|
1522
|
-
@FieldResolver(() => [EmployeeSkill_])
|
|
1524
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeSkill_])
|
|
1523
1525
|
async EmployeeSkillsArray(@Root() skill_: Skill_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1524
1526
|
this.CheckUserReadPermissions('Employee Skills', userPayload);
|
|
1525
1527
|
const sSQL = `SELECT * FROM [admin].[vwEmployeeSkills] WHERE [SkillID]=${skill_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Skills', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -1527,7 +1529,7 @@ export class SkillResolver extends ResolverBase {
|
|
|
1527
1529
|
return result;
|
|
1528
1530
|
}
|
|
1529
1531
|
|
|
1530
|
-
@FieldResolver(() => [Skill_])
|
|
1532
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Skill_])
|
|
1531
1533
|
async SkillsArray(@Root() skill_: Skill_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1532
1534
|
this.CheckUserReadPermissions('Skills', userPayload);
|
|
1533
1535
|
const sSQL = `SELECT * FROM [admin].[vwSkills] WHERE [ParentID]=${skill_.ID} ` + this.getRowLevelSecurityWhereClause('Skills', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -1636,7 +1638,7 @@ export class IntegrationURLFormatResolver extends ResolverBase {
|
|
|
1636
1638
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1637
1639
|
}
|
|
1638
1640
|
@Query(() => IntegrationURLFormat_, { nullable: true })
|
|
1639
|
-
async IntegrationURLFormat(@Arg('ID', () => Int) ID:
|
|
1641
|
+
async IntegrationURLFormat(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<IntegrationURLFormat_ | null> {
|
|
1640
1642
|
this.CheckUserReadPermissions('Integration URL Formats', userPayload);
|
|
1641
1643
|
const sSQL = `SELECT * FROM [admin].[vwIntegrationURLFormats] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Integration URL Formats', userPayload, EntityPermissionType.Read, 'AND');
|
|
1642
1644
|
const result = this.MapFieldNamesToCodeNames('Integration URL Formats', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -1726,11 +1728,11 @@ export class Integration_ {
|
|
|
1726
1728
|
@MaxLength(8)
|
|
1727
1729
|
UpdatedAt: Date;
|
|
1728
1730
|
|
|
1729
|
-
@Field(() => [IntegrationURLFormat_])
|
|
1730
|
-
IntegrationURLFormatsArray: IntegrationURLFormat_[]; // Link to IntegrationURLFormats
|
|
1731
|
+
@Field(() => [mj_core_schema_server_object_types.IntegrationURLFormat_])
|
|
1732
|
+
IntegrationURLFormatsArray: mj_core_schema_server_object_types.IntegrationURLFormat_[]; // Link to IntegrationURLFormats
|
|
1731
1733
|
|
|
1732
|
-
@Field(() => [CompanyIntegration_])
|
|
1733
|
-
CompanyIntegrationsArray: CompanyIntegration_[]; // Link to CompanyIntegrations
|
|
1734
|
+
@Field(() => [mj_core_schema_server_object_types.CompanyIntegration_])
|
|
1735
|
+
CompanyIntegrationsArray: mj_core_schema_server_object_types.CompanyIntegration_[]; // Link to CompanyIntegrations
|
|
1734
1736
|
|
|
1735
1737
|
}
|
|
1736
1738
|
|
|
@@ -1809,7 +1811,7 @@ export class IntegrationResolver extends ResolverBase {
|
|
|
1809
1811
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1810
1812
|
}
|
|
1811
1813
|
@Query(() => Integration_, { nullable: true })
|
|
1812
|
-
async Integration(@Arg('ID', () => Int) ID:
|
|
1814
|
+
async Integration(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Integration_ | null> {
|
|
1813
1815
|
this.CheckUserReadPermissions('Integrations', userPayload);
|
|
1814
1816
|
const sSQL = `SELECT * FROM [admin].[vwIntegrations] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
1815
1817
|
const result = this.MapFieldNamesToCodeNames('Integrations', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -1824,7 +1826,7 @@ export class IntegrationResolver extends ResolverBase {
|
|
|
1824
1826
|
return result;
|
|
1825
1827
|
}
|
|
1826
1828
|
|
|
1827
|
-
@FieldResolver(() => [IntegrationURLFormat_])
|
|
1829
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.IntegrationURLFormat_])
|
|
1828
1830
|
async IntegrationURLFormatsArray(@Root() integration_: Integration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1829
1831
|
this.CheckUserReadPermissions('Integration URL Formats', userPayload);
|
|
1830
1832
|
const sSQL = `SELECT * FROM [admin].[vwIntegrationURLFormats] WHERE [IntegrationID]=${integration_.ID} ` + this.getRowLevelSecurityWhereClause('Integration URL Formats', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -1832,7 +1834,7 @@ export class IntegrationResolver extends ResolverBase {
|
|
|
1832
1834
|
return result;
|
|
1833
1835
|
}
|
|
1834
1836
|
|
|
1835
|
-
@FieldResolver(() => [CompanyIntegration_])
|
|
1837
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegration_])
|
|
1836
1838
|
async CompanyIntegrationsArray(@Root() integration_: Integration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1837
1839
|
this.CheckUserReadPermissions('Company Integrations', userPayload);
|
|
1838
1840
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrations] WHERE [IntegrationName]=${integration_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -1968,17 +1970,17 @@ export class CompanyIntegration_ {
|
|
|
1968
1970
|
@MaxLength(8)
|
|
1969
1971
|
LastRunEndedAt?: Date;
|
|
1970
1972
|
|
|
1971
|
-
@Field(() => [List_])
|
|
1972
|
-
ListsArray: List_[]; // Link to Lists
|
|
1973
|
+
@Field(() => [mj_core_schema_server_object_types.List_])
|
|
1974
|
+
ListsArray: mj_core_schema_server_object_types.List_[]; // Link to Lists
|
|
1973
1975
|
|
|
1974
|
-
@Field(() => [EmployeeCompanyIntegration_])
|
|
1975
|
-
EmployeeCompanyIntegrationsArray: EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
1976
|
+
@Field(() => [mj_core_schema_server_object_types.EmployeeCompanyIntegration_])
|
|
1977
|
+
EmployeeCompanyIntegrationsArray: mj_core_schema_server_object_types.EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
1976
1978
|
|
|
1977
|
-
@Field(() => [CompanyIntegrationRun_])
|
|
1978
|
-
CompanyIntegrationRunsArray: CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
1979
|
+
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRun_])
|
|
1980
|
+
CompanyIntegrationRunsArray: mj_core_schema_server_object_types.CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
1979
1981
|
|
|
1980
|
-
@Field(() => [CompanyIntegrationRecordMap_])
|
|
1981
|
-
CompanyIntegrationRecordMapsArray: CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
1982
|
+
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRecordMap_])
|
|
1983
|
+
CompanyIntegrationRecordMapsArray: mj_core_schema_server_object_types.CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
1982
1984
|
|
|
1983
1985
|
}
|
|
1984
1986
|
|
|
@@ -2072,14 +2074,14 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
2072
2074
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
2073
2075
|
}
|
|
2074
2076
|
@Query(() => CompanyIntegration_, { nullable: true })
|
|
2075
|
-
async CompanyIntegration(@Arg('ID', () => Int) ID:
|
|
2077
|
+
async CompanyIntegration(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<CompanyIntegration_ | null> {
|
|
2076
2078
|
this.CheckUserReadPermissions('Company Integrations', userPayload);
|
|
2077
2079
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrations] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
2078
2080
|
const result = this.MapFieldNamesToCodeNames('Company Integrations', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
2079
2081
|
return result;
|
|
2080
2082
|
}
|
|
2081
2083
|
|
|
2082
|
-
@FieldResolver(() => [List_])
|
|
2084
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.List_])
|
|
2083
2085
|
async ListsArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2084
2086
|
this.CheckUserReadPermissions('Lists', userPayload);
|
|
2085
2087
|
const sSQL = `SELECT * FROM [admin].[vwLists] WHERE [CompanyIntegrationID]=${companyintegration_.ID} ` + this.getRowLevelSecurityWhereClause('Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -2087,7 +2089,7 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
2087
2089
|
return result;
|
|
2088
2090
|
}
|
|
2089
2091
|
|
|
2090
|
-
@FieldResolver(() => [EmployeeCompanyIntegration_])
|
|
2092
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EmployeeCompanyIntegration_])
|
|
2091
2093
|
async EmployeeCompanyIntegrationsArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2092
2094
|
this.CheckUserReadPermissions('Employee Company Integrations', userPayload);
|
|
2093
2095
|
const sSQL = `SELECT * FROM [admin].[vwEmployeeCompanyIntegrations] WHERE [CompanyIntegrationID]=${companyintegration_.ID} ` + this.getRowLevelSecurityWhereClause('Employee Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -2095,7 +2097,7 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
2095
2097
|
return result;
|
|
2096
2098
|
}
|
|
2097
2099
|
|
|
2098
|
-
@FieldResolver(() => [CompanyIntegrationRun_])
|
|
2100
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRun_])
|
|
2099
2101
|
async CompanyIntegrationRunsArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2100
2102
|
this.CheckUserReadPermissions('Company Integration Runs', userPayload);
|
|
2101
2103
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRuns] WHERE [CompanyIntegrationID]=${companyintegration_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -2103,7 +2105,7 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
2103
2105
|
return result;
|
|
2104
2106
|
}
|
|
2105
2107
|
|
|
2106
|
-
@FieldResolver(() => [CompanyIntegrationRecordMap_])
|
|
2108
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRecordMap_])
|
|
2107
2109
|
async CompanyIntegrationRecordMapsArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2108
2110
|
this.CheckUserReadPermissions('Company Integration Record Maps', userPayload);
|
|
2109
2111
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRecordMaps] WHERE [CompanyIntegrationID]=${companyintegration_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Record Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -2321,8 +2323,8 @@ export class EntityField_ {
|
|
|
2321
2323
|
@MaxLength(8000)
|
|
2322
2324
|
RelatedEntityClassName?: string;
|
|
2323
2325
|
|
|
2324
|
-
@Field(() => [EntityFieldValue_])
|
|
2325
|
-
EntityFieldValuesArray: EntityFieldValue_[]; // Link to EntityFieldValues
|
|
2326
|
+
@Field(() => [mj_core_schema_server_object_types.EntityFieldValue_])
|
|
2327
|
+
EntityFieldValuesArray: mj_core_schema_server_object_types.EntityFieldValue_[]; // Link to EntityFieldValues
|
|
2326
2328
|
|
|
2327
2329
|
}
|
|
2328
2330
|
|
|
@@ -2525,7 +2527,7 @@ export class EntityFieldResolver extends ResolverBase {
|
|
|
2525
2527
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
2526
2528
|
}
|
|
2527
2529
|
@Query(() => EntityField_, { nullable: true })
|
|
2528
|
-
async EntityField(@Arg('ID', () => Int) ID:
|
|
2530
|
+
async EntityField(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityField_ | null> {
|
|
2529
2531
|
this.CheckUserReadPermissions('Entity Fields', userPayload);
|
|
2530
2532
|
const sSQL = `SELECT * FROM [admin].[vwEntityFields] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
2531
2533
|
const result = this.MapFieldNamesToCodeNames('Entity Fields', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -2540,7 +2542,7 @@ export class EntityFieldResolver extends ResolverBase {
|
|
|
2540
2542
|
return result;
|
|
2541
2543
|
}
|
|
2542
2544
|
|
|
2543
|
-
@FieldResolver(() => [EntityFieldValue_])
|
|
2545
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityFieldValue_])
|
|
2544
2546
|
async EntityFieldValuesArray(@Root() entityfield_: EntityField_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2545
2547
|
this.CheckUserReadPermissions('Entity Field Values', userPayload);
|
|
2546
2548
|
const sSQL = `SELECT * FROM [admin].[vwEntityFieldValues] WHERE [EntityFieldID]=${entityfield_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Field Values', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -2610,7 +2612,7 @@ export class EntityFieldResolver extends ResolverBase {
|
|
|
2610
2612
|
}
|
|
2611
2613
|
|
|
2612
2614
|
@Mutation(() => EntityField_)
|
|
2613
|
-
async DeleteEntityField(@Arg('ID', () => Int) ID:
|
|
2615
|
+
async DeleteEntityField(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2614
2616
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
2615
2617
|
const entityObject = <EntityFieldEntity>await new Metadata().GetEntityObject('Entity Fields', this.GetUserFromPayload(userPayload));
|
|
2616
2618
|
await entityObject.Load(ID);
|
|
@@ -2627,11 +2629,11 @@ export class EntityFieldResolver extends ResolverBase {
|
|
|
2627
2629
|
}
|
|
2628
2630
|
|
|
2629
2631
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
2630
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
2632
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
2631
2633
|
const i = ID, d = dataSource; // prevent error;
|
|
2632
2634
|
return true;
|
|
2633
2635
|
}
|
|
2634
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
2636
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
2635
2637
|
const i = ID, d = dataSource; // prevent error
|
|
2636
2638
|
}
|
|
2637
2639
|
|
|
@@ -2804,77 +2806,77 @@ export class Entity_ {
|
|
|
2804
2806
|
@MaxLength(510)
|
|
2805
2807
|
ParentBaseView?: string;
|
|
2806
2808
|
|
|
2807
|
-
@Field(() => [EntityField_])
|
|
2808
|
-
EntityFieldsArray: EntityField_[]; // Link to EntityFields
|
|
2809
|
+
@Field(() => [mj_core_schema_server_object_types.EntityField_])
|
|
2810
|
+
EntityFieldsArray: mj_core_schema_server_object_types.EntityField_[]; // Link to EntityFields
|
|
2809
2811
|
|
|
2810
|
-
@Field(() => [EntityPermission_])
|
|
2811
|
-
EntityPermissionsArray: EntityPermission_[]; // Link to EntityPermissions
|
|
2812
|
+
@Field(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
2813
|
+
EntityPermissionsArray: mj_core_schema_server_object_types.EntityPermission_[]; // Link to EntityPermissions
|
|
2812
2814
|
|
|
2813
|
-
@Field(() => [EntityRelationship_])
|
|
2814
|
-
EntityRelationshipsArray: EntityRelationship_[]; // Link to EntityRelationships
|
|
2815
|
+
@Field(() => [mj_core_schema_server_object_types.EntityRelationship_])
|
|
2816
|
+
EntityRelationshipsArray: mj_core_schema_server_object_types.EntityRelationship_[]; // Link to EntityRelationships
|
|
2815
2817
|
|
|
2816
|
-
@Field(() => [EntityAIAction_])
|
|
2817
|
-
EntityAIActionsArray: EntityAIAction_[]; // Link to EntityAIActions
|
|
2818
|
+
@Field(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
2819
|
+
EntityAIActionsArray: mj_core_schema_server_object_types.EntityAIAction_[]; // Link to EntityAIActions
|
|
2818
2820
|
|
|
2819
|
-
@Field(() => [UserRecordLog_])
|
|
2820
|
-
UserRecordLogsArray: UserRecordLog_[]; // Link to UserRecordLogs
|
|
2821
|
+
@Field(() => [mj_core_schema_server_object_types.UserRecordLog_])
|
|
2822
|
+
UserRecordLogsArray: mj_core_schema_server_object_types.UserRecordLog_[]; // Link to UserRecordLogs
|
|
2821
2823
|
|
|
2822
|
-
@Field(() => [IntegrationURLFormat_])
|
|
2823
|
-
IntegrationURLFormatsArray: IntegrationURLFormat_[]; // Link to IntegrationURLFormats
|
|
2824
|
+
@Field(() => [mj_core_schema_server_object_types.IntegrationURLFormat_])
|
|
2825
|
+
IntegrationURLFormatsArray: mj_core_schema_server_object_types.IntegrationURLFormat_[]; // Link to IntegrationURLFormats
|
|
2824
2826
|
|
|
2825
|
-
@Field(() => [Entity_])
|
|
2826
|
-
EntitiesArray: Entity_[]; // Link to Entities
|
|
2827
|
+
@Field(() => [mj_core_schema_server_object_types.Entity_])
|
|
2828
|
+
EntitiesArray: mj_core_schema_server_object_types.Entity_[]; // Link to Entities
|
|
2827
2829
|
|
|
2828
|
-
@Field(() => [UserFavorite_])
|
|
2829
|
-
UserFavoritesArray: UserFavorite_[]; // Link to UserFavorites
|
|
2830
|
+
@Field(() => [mj_core_schema_server_object_types.UserFavorite_])
|
|
2831
|
+
UserFavoritesArray: mj_core_schema_server_object_types.UserFavorite_[]; // Link to UserFavorites
|
|
2830
2832
|
|
|
2831
|
-
@Field(() => [CompanyIntegrationRunDetail_])
|
|
2832
|
-
CompanyIntegrationRunDetailsArray: CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
2833
|
+
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRunDetail_])
|
|
2834
|
+
CompanyIntegrationRunDetailsArray: mj_core_schema_server_object_types.CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
2833
2835
|
|
|
2834
|
-
@Field(() => [ApplicationEntity_])
|
|
2835
|
-
ApplicationEntitiesArray: ApplicationEntity_[]; // Link to ApplicationEntities
|
|
2836
|
+
@Field(() => [mj_core_schema_server_object_types.ApplicationEntity_])
|
|
2837
|
+
ApplicationEntitiesArray: mj_core_schema_server_object_types.ApplicationEntity_[]; // Link to ApplicationEntities
|
|
2836
2838
|
|
|
2837
|
-
@Field(() => [UserApplicationEntity_])
|
|
2838
|
-
UserApplicationEntitiesArray: UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
2839
|
+
@Field(() => [mj_core_schema_server_object_types.UserApplicationEntity_])
|
|
2840
|
+
UserApplicationEntitiesArray: mj_core_schema_server_object_types.UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
2839
2841
|
|
|
2840
|
-
@Field(() => [List_])
|
|
2841
|
-
ListsArray: List_[]; // Link to Lists
|
|
2842
|
+
@Field(() => [mj_core_schema_server_object_types.List_])
|
|
2843
|
+
ListsArray: mj_core_schema_server_object_types.List_[]; // Link to Lists
|
|
2842
2844
|
|
|
2843
|
-
@Field(() => [UserView_])
|
|
2844
|
-
UserViewsArray: UserView_[]; // Link to UserViews
|
|
2845
|
+
@Field(() => [mj_core_schema_server_object_types.UserView_])
|
|
2846
|
+
UserViewsArray: mj_core_schema_server_object_types.UserView_[]; // Link to UserViews
|
|
2845
2847
|
|
|
2846
|
-
@Field(() => [RecordChange_])
|
|
2847
|
-
RecordChangesArray: RecordChange_[]; // Link to RecordChanges
|
|
2848
|
+
@Field(() => [mj_core_schema_server_object_types.RecordChange_])
|
|
2849
|
+
RecordChangesArray: mj_core_schema_server_object_types.RecordChange_[]; // Link to RecordChanges
|
|
2848
2850
|
|
|
2849
|
-
@Field(() => [AuditLog_])
|
|
2850
|
-
AuditLogsArray: AuditLog_[]; // Link to AuditLogs
|
|
2851
|
+
@Field(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
2852
|
+
AuditLogsArray: mj_core_schema_server_object_types.AuditLog_[]; // Link to AuditLogs
|
|
2851
2853
|
|
|
2852
|
-
@Field(() => [ResourceType_])
|
|
2853
|
-
ResourceTypesArray: ResourceType_[]; // Link to ResourceTypes
|
|
2854
|
+
@Field(() => [mj_core_schema_server_object_types.ResourceType_])
|
|
2855
|
+
ResourceTypesArray: mj_core_schema_server_object_types.ResourceType_[]; // Link to ResourceTypes
|
|
2854
2856
|
|
|
2855
|
-
@Field(() => [TaggedItem_])
|
|
2856
|
-
TaggedItemsArray: TaggedItem_[]; // Link to TaggedItems
|
|
2857
|
+
@Field(() => [mj_core_schema_server_object_types.TaggedItem_])
|
|
2858
|
+
TaggedItemsArray: mj_core_schema_server_object_types.TaggedItem_[]; // Link to TaggedItems
|
|
2857
2859
|
|
|
2858
|
-
@Field(() => [DatasetItem_])
|
|
2859
|
-
DatasetItemsArray: DatasetItem_[]; // Link to DatasetItems
|
|
2860
|
+
@Field(() => [mj_core_schema_server_object_types.DatasetItem_])
|
|
2861
|
+
DatasetItemsArray: mj_core_schema_server_object_types.DatasetItem_[]; // Link to DatasetItems
|
|
2860
2862
|
|
|
2861
|
-
@Field(() => [CompanyIntegrationRecordMap_])
|
|
2862
|
-
CompanyIntegrationRecordMapsArray: CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
2863
|
+
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRecordMap_])
|
|
2864
|
+
CompanyIntegrationRecordMapsArray: mj_core_schema_server_object_types.CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
2863
2865
|
|
|
2864
|
-
@Field(() => [RecordMergeLog_])
|
|
2865
|
-
RecordMergeLogsArray: RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
2866
|
+
@Field(() => [mj_core_schema_server_object_types.RecordMergeLog_])
|
|
2867
|
+
RecordMergeLogsArray: mj_core_schema_server_object_types.RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
2866
2868
|
|
|
2867
|
-
@Field(() => [QueryField_])
|
|
2868
|
-
QueryFieldsArray: QueryField_[]; // Link to QueryFields
|
|
2869
|
+
@Field(() => [mj_core_schema_server_object_types.QueryField_])
|
|
2870
|
+
QueryFieldsArray: mj_core_schema_server_object_types.QueryField_[]; // Link to QueryFields
|
|
2869
2871
|
|
|
2870
|
-
@Field(() => [Conversation_])
|
|
2871
|
-
ConversationsArray: Conversation_[]; // Link to Conversations
|
|
2872
|
+
@Field(() => [mj_core_schema_server_object_types.Conversation_])
|
|
2873
|
+
ConversationsArray: mj_core_schema_server_object_types.Conversation_[]; // Link to Conversations
|
|
2872
2874
|
|
|
2873
|
-
@Field(() => [EntityDocument_])
|
|
2874
|
-
EntityDocumentsArray: EntityDocument_[]; // Link to EntityDocuments
|
|
2875
|
+
@Field(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
2876
|
+
EntityDocumentsArray: mj_core_schema_server_object_types.EntityDocument_[]; // Link to EntityDocuments
|
|
2875
2877
|
|
|
2876
|
-
@Field(() => [DataContextItem_])
|
|
2877
|
-
DataContextItemsArray: DataContextItem_[]; // Link to DataContextItems
|
|
2878
|
+
@Field(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
2879
|
+
DataContextItemsArray: mj_core_schema_server_object_types.DataContextItem_[]; // Link to DataContextItems
|
|
2878
2880
|
|
|
2879
2881
|
}
|
|
2880
2882
|
|
|
@@ -3158,7 +3160,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3158
3160
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
3159
3161
|
}
|
|
3160
3162
|
@Query(() => Entity_, { nullable: true })
|
|
3161
|
-
async Entity(@Arg('ID', () => Int) ID:
|
|
3163
|
+
async Entity(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Entity_ | null> {
|
|
3162
3164
|
this.CheckUserReadPermissions('Entities', userPayload);
|
|
3163
3165
|
const sSQL = `SELECT * FROM [admin].[vwEntities] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
3164
3166
|
const result = this.MapFieldNamesToCodeNames('Entities', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -3173,7 +3175,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3173
3175
|
return result;
|
|
3174
3176
|
}
|
|
3175
3177
|
|
|
3176
|
-
@FieldResolver(() => [EntityField_])
|
|
3178
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityField_])
|
|
3177
3179
|
async EntityFieldsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3178
3180
|
this.CheckUserReadPermissions('Entity Fields', userPayload);
|
|
3179
3181
|
const sSQL = `SELECT * FROM [admin].[vwEntityFields] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3181,7 +3183,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3181
3183
|
return result;
|
|
3182
3184
|
}
|
|
3183
3185
|
|
|
3184
|
-
@FieldResolver(() => [EntityPermission_])
|
|
3186
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
3185
3187
|
async EntityPermissionsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3186
3188
|
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
3187
3189
|
const sSQL = `SELECT * FROM [admin].[vwEntityPermissions] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3189,7 +3191,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3189
3191
|
return result;
|
|
3190
3192
|
}
|
|
3191
3193
|
|
|
3192
|
-
@FieldResolver(() => [EntityRelationship_])
|
|
3194
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityRelationship_])
|
|
3193
3195
|
async EntityRelationshipsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3194
3196
|
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
3195
3197
|
const sSQL = `SELECT * FROM [admin].[vwEntityRelationships] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3197,7 +3199,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3197
3199
|
return result;
|
|
3198
3200
|
}
|
|
3199
3201
|
|
|
3200
|
-
@FieldResolver(() => [EntityAIAction_])
|
|
3202
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
3201
3203
|
async EntityAIActionsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3202
3204
|
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
3203
3205
|
const sSQL = `SELECT * FROM [admin].[vwEntityAIActions] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3205,7 +3207,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3205
3207
|
return result;
|
|
3206
3208
|
}
|
|
3207
3209
|
|
|
3208
|
-
@FieldResolver(() => [UserRecordLog_])
|
|
3210
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserRecordLog_])
|
|
3209
3211
|
async UserRecordLogsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3210
3212
|
this.CheckUserReadPermissions('User Record Logs', userPayload);
|
|
3211
3213
|
const sSQL = `SELECT * FROM [admin].[vwUserRecordLogs] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User Record Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3213,7 +3215,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3213
3215
|
return result;
|
|
3214
3216
|
}
|
|
3215
3217
|
|
|
3216
|
-
@FieldResolver(() => [IntegrationURLFormat_])
|
|
3218
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.IntegrationURLFormat_])
|
|
3217
3219
|
async IntegrationURLFormatsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3218
3220
|
this.CheckUserReadPermissions('Integration URL Formats', userPayload);
|
|
3219
3221
|
const sSQL = `SELECT * FROM [admin].[vwIntegrationURLFormats] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Integration URL Formats', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3221,7 +3223,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3221
3223
|
return result;
|
|
3222
3224
|
}
|
|
3223
3225
|
|
|
3224
|
-
@FieldResolver(() => [Entity_])
|
|
3226
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Entity_])
|
|
3225
3227
|
async EntitiesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3226
3228
|
this.CheckUserReadPermissions('Entities', userPayload);
|
|
3227
3229
|
const sSQL = `SELECT * FROM [admin].[vwEntities] WHERE [ParentID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3229,7 +3231,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3229
3231
|
return result;
|
|
3230
3232
|
}
|
|
3231
3233
|
|
|
3232
|
-
@FieldResolver(() => [UserFavorite_])
|
|
3234
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserFavorite_])
|
|
3233
3235
|
async UserFavoritesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3234
3236
|
this.CheckUserReadPermissions('User Favorites', userPayload);
|
|
3235
3237
|
const sSQL = `SELECT * FROM [admin].[vwUserFavorites] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3237,7 +3239,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3237
3239
|
return result;
|
|
3238
3240
|
}
|
|
3239
3241
|
|
|
3240
|
-
@FieldResolver(() => [CompanyIntegrationRunDetail_])
|
|
3242
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRunDetail_])
|
|
3241
3243
|
async CompanyIntegrationRunDetailsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3242
3244
|
this.CheckUserReadPermissions('Company Integration Run Details', userPayload);
|
|
3243
3245
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRunDetails] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3245,7 +3247,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3245
3247
|
return result;
|
|
3246
3248
|
}
|
|
3247
3249
|
|
|
3248
|
-
@FieldResolver(() => [ApplicationEntity_])
|
|
3250
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ApplicationEntity_])
|
|
3249
3251
|
async ApplicationEntitiesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3250
3252
|
this.CheckUserReadPermissions('Application Entities', userPayload);
|
|
3251
3253
|
const sSQL = `SELECT * FROM [admin].[vwApplicationEntities] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3253,7 +3255,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3253
3255
|
return result;
|
|
3254
3256
|
}
|
|
3255
3257
|
|
|
3256
|
-
@FieldResolver(() => [UserApplicationEntity_])
|
|
3258
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserApplicationEntity_])
|
|
3257
3259
|
async UserApplicationEntitiesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3258
3260
|
this.CheckUserReadPermissions('User Application Entities', userPayload);
|
|
3259
3261
|
const sSQL = `SELECT * FROM [admin].[vwUserApplicationEntities] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3261,7 +3263,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3261
3263
|
return result;
|
|
3262
3264
|
}
|
|
3263
3265
|
|
|
3264
|
-
@FieldResolver(() => [List_])
|
|
3266
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.List_])
|
|
3265
3267
|
async ListsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3266
3268
|
this.CheckUserReadPermissions('Lists', userPayload);
|
|
3267
3269
|
const sSQL = `SELECT * FROM [admin].[vwLists] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3269,7 +3271,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3269
3271
|
return result;
|
|
3270
3272
|
}
|
|
3271
3273
|
|
|
3272
|
-
@FieldResolver(() => [UserView_])
|
|
3274
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserView_])
|
|
3273
3275
|
async UserViewsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3274
3276
|
this.CheckUserReadPermissions('User Views', userPayload);
|
|
3275
3277
|
const sSQL = `SELECT * FROM [admin].[vwUserViews] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3277,7 +3279,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3277
3279
|
return result;
|
|
3278
3280
|
}
|
|
3279
3281
|
|
|
3280
|
-
@FieldResolver(() => [RecordChange_])
|
|
3282
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.RecordChange_])
|
|
3281
3283
|
async RecordChangesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3282
3284
|
this.CheckUserReadPermissions('Record Changes', userPayload);
|
|
3283
3285
|
const sSQL = `SELECT * FROM [admin].[vwRecordChanges] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Record Changes', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3285,7 +3287,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3285
3287
|
return result;
|
|
3286
3288
|
}
|
|
3287
3289
|
|
|
3288
|
-
@FieldResolver(() => [AuditLog_])
|
|
3290
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
3289
3291
|
async AuditLogsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3290
3292
|
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
3291
3293
|
const sSQL = `SELECT * FROM [admin].[vwAuditLogs] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3293,7 +3295,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3293
3295
|
return result;
|
|
3294
3296
|
}
|
|
3295
3297
|
|
|
3296
|
-
@FieldResolver(() => [ResourceType_])
|
|
3298
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ResourceType_])
|
|
3297
3299
|
async ResourceTypesArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3298
3300
|
this.CheckUserReadPermissions('Resource Types', userPayload);
|
|
3299
3301
|
const sSQL = `SELECT * FROM [admin].[vwResourceTypes] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Resource Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3301,7 +3303,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3301
3303
|
return result;
|
|
3302
3304
|
}
|
|
3303
3305
|
|
|
3304
|
-
@FieldResolver(() => [TaggedItem_])
|
|
3306
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.TaggedItem_])
|
|
3305
3307
|
async TaggedItemsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3306
3308
|
this.CheckUserReadPermissions('Tagged Items', userPayload);
|
|
3307
3309
|
const sSQL = `SELECT * FROM [admin].[vwTaggedItems] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Tagged Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3309,7 +3311,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3309
3311
|
return result;
|
|
3310
3312
|
}
|
|
3311
3313
|
|
|
3312
|
-
@FieldResolver(() => [DatasetItem_])
|
|
3314
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.DatasetItem_])
|
|
3313
3315
|
async DatasetItemsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3314
3316
|
this.CheckUserReadPermissions('Dataset Items', userPayload);
|
|
3315
3317
|
const sSQL = `SELECT * FROM [admin].[vwDatasetItems] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Dataset Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3317,7 +3319,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3317
3319
|
return result;
|
|
3318
3320
|
}
|
|
3319
3321
|
|
|
3320
|
-
@FieldResolver(() => [CompanyIntegrationRecordMap_])
|
|
3322
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRecordMap_])
|
|
3321
3323
|
async CompanyIntegrationRecordMapsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3322
3324
|
this.CheckUserReadPermissions('Company Integration Record Maps', userPayload);
|
|
3323
3325
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRecordMaps] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Record Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3325,7 +3327,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3325
3327
|
return result;
|
|
3326
3328
|
}
|
|
3327
3329
|
|
|
3328
|
-
@FieldResolver(() => [RecordMergeLog_])
|
|
3330
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.RecordMergeLog_])
|
|
3329
3331
|
async RecordMergeLogsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3330
3332
|
this.CheckUserReadPermissions('Record Merge Logs', userPayload);
|
|
3331
3333
|
const sSQL = `SELECT * FROM [admin].[vwRecordMergeLogs] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3333,7 +3335,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3333
3335
|
return result;
|
|
3334
3336
|
}
|
|
3335
3337
|
|
|
3336
|
-
@FieldResolver(() => [QueryField_])
|
|
3338
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.QueryField_])
|
|
3337
3339
|
async QueryFieldsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3338
3340
|
this.CheckUserReadPermissions('Query Fields', userPayload);
|
|
3339
3341
|
const sSQL = `SELECT * FROM [admin].[vwQueryFields] WHERE [SourceEntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Query Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3341,7 +3343,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3341
3343
|
return result;
|
|
3342
3344
|
}
|
|
3343
3345
|
|
|
3344
|
-
@FieldResolver(() => [Conversation_])
|
|
3346
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Conversation_])
|
|
3345
3347
|
async ConversationsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3346
3348
|
this.CheckUserReadPermissions('Conversations', userPayload);
|
|
3347
3349
|
const sSQL = `SELECT * FROM [admin].[vwConversations] WHERE [LinkedEntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3349,7 +3351,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3349
3351
|
return result;
|
|
3350
3352
|
}
|
|
3351
3353
|
|
|
3352
|
-
@FieldResolver(() => [EntityDocument_])
|
|
3354
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
3353
3355
|
async EntityDocumentsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3354
3356
|
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
3355
3357
|
const sSQL = `SELECT * FROM [admin].[vwEntityDocuments] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3357,7 +3359,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3357
3359
|
return result;
|
|
3358
3360
|
}
|
|
3359
3361
|
|
|
3360
|
-
@FieldResolver(() => [DataContextItem_])
|
|
3362
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
3361
3363
|
async DataContextItemsArray(@Root() entity_: Entity_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3362
3364
|
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
3363
3365
|
const sSQL = `SELECT * FROM [admin].[vwDataContextItems] WHERE [EntityID]=${entity_.ID} ` + this.getRowLevelSecurityWhereClause('Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3427,7 +3429,7 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3427
3429
|
}
|
|
3428
3430
|
|
|
3429
3431
|
@Mutation(() => Entity_)
|
|
3430
|
-
async DeleteEntity(@Arg('ID', () => Int) ID:
|
|
3432
|
+
async DeleteEntity(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3431
3433
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
3432
3434
|
const entityObject = <EntityEntity>await new Metadata().GetEntityObject('Entities', this.GetUserFromPayload(userPayload));
|
|
3433
3435
|
await entityObject.Load(ID);
|
|
@@ -3444,11 +3446,11 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
3444
3446
|
}
|
|
3445
3447
|
|
|
3446
3448
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
3447
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
3449
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
3448
3450
|
const i = ID, d = dataSource; // prevent error;
|
|
3449
3451
|
return true;
|
|
3450
3452
|
}
|
|
3451
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
3453
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
3452
3454
|
const i = ID, d = dataSource; // prevent error
|
|
3453
3455
|
}
|
|
3454
3456
|
|
|
@@ -3534,59 +3536,59 @@ export class User_ {
|
|
|
3534
3536
|
@MaxLength(200)
|
|
3535
3537
|
EmployeeSupervisorEmail?: string;
|
|
3536
3538
|
|
|
3537
|
-
@Field(() => [UserApplication_])
|
|
3538
|
-
UserApplicationsArray: UserApplication_[]; // Link to UserApplications
|
|
3539
|
+
@Field(() => [mj_core_schema_server_object_types.UserApplication_])
|
|
3540
|
+
UserApplicationsArray: mj_core_schema_server_object_types.UserApplication_[]; // Link to UserApplications
|
|
3539
3541
|
|
|
3540
|
-
@Field(() => [UserRole_])
|
|
3541
|
-
UserRolesArray: UserRole_[]; // Link to UserRoles
|
|
3542
|
+
@Field(() => [mj_core_schema_server_object_types.UserRole_])
|
|
3543
|
+
UserRolesArray: mj_core_schema_server_object_types.UserRole_[]; // Link to UserRoles
|
|
3542
3544
|
|
|
3543
|
-
@Field(() => [Workspace_])
|
|
3544
|
-
WorkspacesArray: Workspace_[]; // Link to Workspaces
|
|
3545
|
+
@Field(() => [mj_core_schema_server_object_types.Workspace_])
|
|
3546
|
+
WorkspacesArray: mj_core_schema_server_object_types.Workspace_[]; // Link to Workspaces
|
|
3545
3547
|
|
|
3546
|
-
@Field(() => [Report_])
|
|
3547
|
-
ReportsArray: Report_[]; // Link to Reports
|
|
3548
|
+
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
3549
|
+
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
3548
3550
|
|
|
3549
|
-
@Field(() => [ReportSnapshot_])
|
|
3550
|
-
ReportSnapshotsArray: ReportSnapshot_[]; // Link to ReportSnapshots
|
|
3551
|
+
@Field(() => [mj_core_schema_server_object_types.ReportSnapshot_])
|
|
3552
|
+
ReportSnapshotsArray: mj_core_schema_server_object_types.ReportSnapshot_[]; // Link to ReportSnapshots
|
|
3551
3553
|
|
|
3552
|
-
@Field(() => [RecordChange_])
|
|
3553
|
-
RecordChangesArray: RecordChange_[]; // Link to RecordChanges
|
|
3554
|
+
@Field(() => [mj_core_schema_server_object_types.RecordChange_])
|
|
3555
|
+
RecordChangesArray: mj_core_schema_server_object_types.RecordChange_[]; // Link to RecordChanges
|
|
3554
3556
|
|
|
3555
|
-
@Field(() => [Dashboard_])
|
|
3556
|
-
DashboardsArray: Dashboard_[]; // Link to Dashboards
|
|
3557
|
+
@Field(() => [mj_core_schema_server_object_types.Dashboard_])
|
|
3558
|
+
DashboardsArray: mj_core_schema_server_object_types.Dashboard_[]; // Link to Dashboards
|
|
3557
3559
|
|
|
3558
|
-
@Field(() => [UserViewRun_])
|
|
3559
|
-
UserViewRunsArray: UserViewRun_[]; // Link to UserViewRuns
|
|
3560
|
+
@Field(() => [mj_core_schema_server_object_types.UserViewRun_])
|
|
3561
|
+
UserViewRunsArray: mj_core_schema_server_object_types.UserViewRun_[]; // Link to UserViewRuns
|
|
3560
3562
|
|
|
3561
|
-
@Field(() => [AuditLog_])
|
|
3562
|
-
AuditLogsArray: AuditLog_[]; // Link to AuditLogs
|
|
3563
|
+
@Field(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
3564
|
+
AuditLogsArray: mj_core_schema_server_object_types.AuditLog_[]; // Link to AuditLogs
|
|
3563
3565
|
|
|
3564
|
-
@Field(() => [List_])
|
|
3565
|
-
ListsArray: List_[]; // Link to Lists
|
|
3566
|
+
@Field(() => [mj_core_schema_server_object_types.List_])
|
|
3567
|
+
ListsArray: mj_core_schema_server_object_types.List_[]; // Link to Lists
|
|
3566
3568
|
|
|
3567
|
-
@Field(() => [UserFavorite_])
|
|
3568
|
-
UserFavoritesArray: UserFavorite_[]; // Link to UserFavorites
|
|
3569
|
+
@Field(() => [mj_core_schema_server_object_types.UserFavorite_])
|
|
3570
|
+
UserFavoritesArray: mj_core_schema_server_object_types.UserFavorite_[]; // Link to UserFavorites
|
|
3569
3571
|
|
|
3570
|
-
@Field(() => [UserRecordLog_])
|
|
3571
|
-
UserRecordLogsArray: UserRecordLog_[]; // Link to UserRecordLogs
|
|
3572
|
+
@Field(() => [mj_core_schema_server_object_types.UserRecordLog_])
|
|
3573
|
+
UserRecordLogsArray: mj_core_schema_server_object_types.UserRecordLog_[]; // Link to UserRecordLogs
|
|
3572
3574
|
|
|
3573
|
-
@Field(() => [UserView_])
|
|
3574
|
-
UserViewsArray: UserView_[]; // Link to UserViews
|
|
3575
|
+
@Field(() => [mj_core_schema_server_object_types.UserView_])
|
|
3576
|
+
UserViewsArray: mj_core_schema_server_object_types.UserView_[]; // Link to UserViews
|
|
3575
3577
|
|
|
3576
|
-
@Field(() => [CompanyIntegrationRun_])
|
|
3577
|
-
CompanyIntegrationRunsArray: CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
3578
|
+
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRun_])
|
|
3579
|
+
CompanyIntegrationRunsArray: mj_core_schema_server_object_types.CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
3578
3580
|
|
|
3579
|
-
@Field(() => [UserNotification_])
|
|
3580
|
-
UserNotificationsArray: UserNotification_[]; // Link to UserNotifications
|
|
3581
|
+
@Field(() => [mj_core_schema_server_object_types.UserNotification_])
|
|
3582
|
+
UserNotificationsArray: mj_core_schema_server_object_types.UserNotification_[]; // Link to UserNotifications
|
|
3581
3583
|
|
|
3582
|
-
@Field(() => [Conversation_])
|
|
3583
|
-
ConversationsArray: Conversation_[]; // Link to Conversations
|
|
3584
|
+
@Field(() => [mj_core_schema_server_object_types.Conversation_])
|
|
3585
|
+
ConversationsArray: mj_core_schema_server_object_types.Conversation_[]; // Link to Conversations
|
|
3584
3586
|
|
|
3585
|
-
@Field(() => [RecordMergeLog_])
|
|
3586
|
-
RecordMergeLogsArray: RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
3587
|
+
@Field(() => [mj_core_schema_server_object_types.RecordMergeLog_])
|
|
3588
|
+
RecordMergeLogsArray: mj_core_schema_server_object_types.RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
3587
3589
|
|
|
3588
|
-
@Field(() => [DataContext_])
|
|
3589
|
-
DataContextsArray: DataContext_[]; // Link to DataContexts
|
|
3590
|
+
@Field(() => [mj_core_schema_server_object_types.DataContext_])
|
|
3591
|
+
DataContextsArray: mj_core_schema_server_object_types.DataContext_[]; // Link to DataContexts
|
|
3590
3592
|
|
|
3591
3593
|
}
|
|
3592
3594
|
|
|
@@ -3717,7 +3719,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3717
3719
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
3718
3720
|
}
|
|
3719
3721
|
@Query(() => User_, { nullable: true })
|
|
3720
|
-
async User(@Arg('ID', () => Int) ID:
|
|
3722
|
+
async User(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<User_ | null> {
|
|
3721
3723
|
this.CheckUserReadPermissions('Users', userPayload);
|
|
3722
3724
|
const sSQL = `SELECT * FROM [admin].[vwUsers] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Users', userPayload, EntityPermissionType.Read, 'AND');
|
|
3723
3725
|
const result = this.MapFieldNamesToCodeNames('Users', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -3732,7 +3734,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3732
3734
|
return result;
|
|
3733
3735
|
}
|
|
3734
3736
|
|
|
3735
|
-
@FieldResolver(() => [UserApplication_])
|
|
3737
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserApplication_])
|
|
3736
3738
|
async UserApplicationsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3737
3739
|
this.CheckUserReadPermissions('User Applications', userPayload);
|
|
3738
3740
|
const sSQL = `SELECT * FROM [admin].[vwUserApplications] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Applications', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3740,7 +3742,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3740
3742
|
return result;
|
|
3741
3743
|
}
|
|
3742
3744
|
|
|
3743
|
-
@FieldResolver(() => [UserRole_])
|
|
3745
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserRole_])
|
|
3744
3746
|
async UserRolesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3745
3747
|
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
3746
3748
|
const sSQL = `SELECT * FROM [admin].[vwUserRoles] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3748,7 +3750,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3748
3750
|
return result;
|
|
3749
3751
|
}
|
|
3750
3752
|
|
|
3751
|
-
@FieldResolver(() => [Workspace_])
|
|
3753
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Workspace_])
|
|
3752
3754
|
async WorkspacesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3753
3755
|
this.CheckUserReadPermissions('Workspaces', userPayload);
|
|
3754
3756
|
const sSQL = `SELECT * FROM [admin].[vwWorkspaces] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Workspaces', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3756,7 +3758,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3756
3758
|
return result;
|
|
3757
3759
|
}
|
|
3758
3760
|
|
|
3759
|
-
@FieldResolver(() => [Report_])
|
|
3761
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Report_])
|
|
3760
3762
|
async ReportsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3761
3763
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
3762
3764
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3764,7 +3766,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3764
3766
|
return result;
|
|
3765
3767
|
}
|
|
3766
3768
|
|
|
3767
|
-
@FieldResolver(() => [ReportSnapshot_])
|
|
3769
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ReportSnapshot_])
|
|
3768
3770
|
async ReportSnapshotsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3769
3771
|
this.CheckUserReadPermissions('Report Snapshots', userPayload);
|
|
3770
3772
|
const sSQL = `SELECT * FROM [admin].[vwReportSnapshots] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3772,7 +3774,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3772
3774
|
return result;
|
|
3773
3775
|
}
|
|
3774
3776
|
|
|
3775
|
-
@FieldResolver(() => [RecordChange_])
|
|
3777
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.RecordChange_])
|
|
3776
3778
|
async RecordChangesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3777
3779
|
this.CheckUserReadPermissions('Record Changes', userPayload);
|
|
3778
3780
|
const sSQL = `SELECT * FROM [admin].[vwRecordChanges] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Record Changes', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3780,7 +3782,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3780
3782
|
return result;
|
|
3781
3783
|
}
|
|
3782
3784
|
|
|
3783
|
-
@FieldResolver(() => [Dashboard_])
|
|
3785
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Dashboard_])
|
|
3784
3786
|
async DashboardsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3785
3787
|
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
3786
3788
|
const sSQL = `SELECT * FROM [admin].[vwDashboards] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3788,7 +3790,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3788
3790
|
return result;
|
|
3789
3791
|
}
|
|
3790
3792
|
|
|
3791
|
-
@FieldResolver(() => [UserViewRun_])
|
|
3793
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewRun_])
|
|
3792
3794
|
async UserViewRunsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3793
3795
|
this.CheckUserReadPermissions('User View Runs', userPayload);
|
|
3794
3796
|
const sSQL = `SELECT * FROM [admin].[vwUserViewRuns] WHERE [RunByUserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User View Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3796,7 +3798,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3796
3798
|
return result;
|
|
3797
3799
|
}
|
|
3798
3800
|
|
|
3799
|
-
@FieldResolver(() => [AuditLog_])
|
|
3801
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
3800
3802
|
async AuditLogsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3801
3803
|
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
3802
3804
|
const sSQL = `SELECT * FROM [admin].[vwAuditLogs] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3804,7 +3806,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3804
3806
|
return result;
|
|
3805
3807
|
}
|
|
3806
3808
|
|
|
3807
|
-
@FieldResolver(() => [List_])
|
|
3809
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.List_])
|
|
3808
3810
|
async ListsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3809
3811
|
this.CheckUserReadPermissions('Lists', userPayload);
|
|
3810
3812
|
const sSQL = `SELECT * FROM [admin].[vwLists] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3812,7 +3814,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3812
3814
|
return result;
|
|
3813
3815
|
}
|
|
3814
3816
|
|
|
3815
|
-
@FieldResolver(() => [UserFavorite_])
|
|
3817
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserFavorite_])
|
|
3816
3818
|
async UserFavoritesArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3817
3819
|
this.CheckUserReadPermissions('User Favorites', userPayload);
|
|
3818
3820
|
const sSQL = `SELECT * FROM [admin].[vwUserFavorites] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3820,7 +3822,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3820
3822
|
return result;
|
|
3821
3823
|
}
|
|
3822
3824
|
|
|
3823
|
-
@FieldResolver(() => [UserRecordLog_])
|
|
3825
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserRecordLog_])
|
|
3824
3826
|
async UserRecordLogsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3825
3827
|
this.CheckUserReadPermissions('User Record Logs', userPayload);
|
|
3826
3828
|
const sSQL = `SELECT * FROM [admin].[vwUserRecordLogs] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Record Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3828,7 +3830,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3828
3830
|
return result;
|
|
3829
3831
|
}
|
|
3830
3832
|
|
|
3831
|
-
@FieldResolver(() => [UserView_])
|
|
3833
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserView_])
|
|
3832
3834
|
async UserViewsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3833
3835
|
this.CheckUserReadPermissions('User Views', userPayload);
|
|
3834
3836
|
const sSQL = `SELECT * FROM [admin].[vwUserViews] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3836,7 +3838,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3836
3838
|
return result;
|
|
3837
3839
|
}
|
|
3838
3840
|
|
|
3839
|
-
@FieldResolver(() => [CompanyIntegrationRun_])
|
|
3841
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRun_])
|
|
3840
3842
|
async CompanyIntegrationRunsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3841
3843
|
this.CheckUserReadPermissions('Company Integration Runs', userPayload);
|
|
3842
3844
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRuns] WHERE [RunByUserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3844,7 +3846,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3844
3846
|
return result;
|
|
3845
3847
|
}
|
|
3846
3848
|
|
|
3847
|
-
@FieldResolver(() => [UserNotification_])
|
|
3849
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserNotification_])
|
|
3848
3850
|
async UserNotificationsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3849
3851
|
this.CheckUserReadPermissions('User Notifications', userPayload);
|
|
3850
3852
|
const sSQL = `SELECT * FROM [admin].[vwUserNotifications] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('User Notifications', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3852,7 +3854,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3852
3854
|
return result;
|
|
3853
3855
|
}
|
|
3854
3856
|
|
|
3855
|
-
@FieldResolver(() => [Conversation_])
|
|
3857
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Conversation_])
|
|
3856
3858
|
async ConversationsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3857
3859
|
this.CheckUserReadPermissions('Conversations', userPayload);
|
|
3858
3860
|
const sSQL = `SELECT * FROM [admin].[vwConversations] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3860,7 +3862,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3860
3862
|
return result;
|
|
3861
3863
|
}
|
|
3862
3864
|
|
|
3863
|
-
@FieldResolver(() => [RecordMergeLog_])
|
|
3865
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.RecordMergeLog_])
|
|
3864
3866
|
async RecordMergeLogsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3865
3867
|
this.CheckUserReadPermissions('Record Merge Logs', userPayload);
|
|
3866
3868
|
const sSQL = `SELECT * FROM [admin].[vwRecordMergeLogs] WHERE [InitiatedByUserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -3868,7 +3870,7 @@ export class UserResolverBase extends ResolverBase {
|
|
|
3868
3870
|
return result;
|
|
3869
3871
|
}
|
|
3870
3872
|
|
|
3871
|
-
@FieldResolver(() => [DataContext_])
|
|
3873
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.DataContext_])
|
|
3872
3874
|
async DataContextsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3873
3875
|
this.CheckUserReadPermissions('Data Contexts', userPayload);
|
|
3874
3876
|
const sSQL = `SELECT * FROM [admin].[vwDataContexts] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Data Contexts', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -4180,7 +4182,7 @@ export class EntityRelationshipResolver extends ResolverBase {
|
|
|
4180
4182
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
4181
4183
|
}
|
|
4182
4184
|
@Query(() => EntityRelationship_, { nullable: true })
|
|
4183
|
-
async EntityRelationship(@Arg('ID', () => Int) ID:
|
|
4185
|
+
async EntityRelationship(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityRelationship_ | null> {
|
|
4184
4186
|
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
4185
4187
|
const sSQL = `SELECT * FROM [admin].[vwEntityRelationships] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
4186
4188
|
const result = this.MapFieldNamesToCodeNames('Entity Relationships', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -4257,7 +4259,7 @@ export class EntityRelationshipResolver extends ResolverBase {
|
|
|
4257
4259
|
}
|
|
4258
4260
|
|
|
4259
4261
|
@Mutation(() => EntityRelationship_)
|
|
4260
|
-
async DeleteEntityRelationship(@Arg('ID', () => Int) ID:
|
|
4262
|
+
async DeleteEntityRelationship(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4261
4263
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
4262
4264
|
const entityObject = <EntityRelationshipEntity>await new Metadata().GetEntityObject('Entity Relationships', this.GetUserFromPayload(userPayload));
|
|
4263
4265
|
await entityObject.Load(ID);
|
|
@@ -4274,11 +4276,11 @@ export class EntityRelationshipResolver extends ResolverBase {
|
|
|
4274
4276
|
}
|
|
4275
4277
|
|
|
4276
4278
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
4277
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
4279
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
4278
4280
|
const i = ID, d = dataSource; // prevent error;
|
|
4279
4281
|
return true;
|
|
4280
4282
|
}
|
|
4281
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
4283
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
4282
4284
|
const i = ID, d = dataSource; // prevent error
|
|
4283
4285
|
}
|
|
4284
4286
|
|
|
@@ -4411,7 +4413,7 @@ export class UserRecordLogResolver extends ResolverBase {
|
|
|
4411
4413
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
4412
4414
|
}
|
|
4413
4415
|
@Query(() => UserRecordLog_, { nullable: true })
|
|
4414
|
-
async UserRecordLog(@Arg('ID', () => Int) ID:
|
|
4416
|
+
async UserRecordLog(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserRecordLog_ | null> {
|
|
4415
4417
|
this.CheckUserReadPermissions('User Record Logs', userPayload);
|
|
4416
4418
|
const sSQL = `SELECT * FROM [admin].[vwUserRecordLogs] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User Record Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
4417
4419
|
const result = this.MapFieldNamesToCodeNames('User Record Logs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -4547,14 +4549,14 @@ export class UserView_ {
|
|
|
4547
4549
|
@MaxLength(510)
|
|
4548
4550
|
EntityBaseView: string;
|
|
4549
4551
|
|
|
4550
|
-
@Field(() => [EntityRelationship_])
|
|
4551
|
-
EntityRelationshipsArray: EntityRelationship_[]; // Link to EntityRelationships
|
|
4552
|
+
@Field(() => [mj_core_schema_server_object_types.EntityRelationship_])
|
|
4553
|
+
EntityRelationshipsArray: mj_core_schema_server_object_types.EntityRelationship_[]; // Link to EntityRelationships
|
|
4552
4554
|
|
|
4553
|
-
@Field(() => [UserViewRun_])
|
|
4554
|
-
UserViewRunsArray: UserViewRun_[]; // Link to UserViewRuns
|
|
4555
|
+
@Field(() => [mj_core_schema_server_object_types.UserViewRun_])
|
|
4556
|
+
UserViewRunsArray: mj_core_schema_server_object_types.UserViewRun_[]; // Link to UserViewRuns
|
|
4555
4557
|
|
|
4556
|
-
@Field(() => [DataContextItem_])
|
|
4557
|
-
DataContextItemsArray: DataContextItem_[]; // Link to DataContextItems
|
|
4558
|
+
@Field(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
4559
|
+
DataContextItemsArray: mj_core_schema_server_object_types.DataContextItem_[]; // Link to DataContextItems
|
|
4558
4560
|
|
|
4559
4561
|
}
|
|
4560
4562
|
|
|
@@ -4721,7 +4723,7 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4721
4723
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
4722
4724
|
}
|
|
4723
4725
|
@Query(() => UserView_, { nullable: true })
|
|
4724
|
-
async UserView(@Arg('ID', () => Int) ID:
|
|
4726
|
+
async UserView(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserView_ | null> {
|
|
4725
4727
|
this.CheckUserReadPermissions('User Views', userPayload);
|
|
4726
4728
|
const sSQL = `SELECT * FROM [admin].[vwUserViews] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
4727
4729
|
const result = this.MapFieldNamesToCodeNames('User Views', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -4736,7 +4738,7 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4736
4738
|
return result;
|
|
4737
4739
|
}
|
|
4738
4740
|
|
|
4739
|
-
@FieldResolver(() => [EntityRelationship_])
|
|
4741
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityRelationship_])
|
|
4740
4742
|
async EntityRelationshipsArray(@Root() userview_: UserView_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4741
4743
|
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
4742
4744
|
const sSQL = `SELECT * FROM [admin].[vwEntityRelationships] WHERE [DisplayUserViewGUID]=${userview_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -4744,7 +4746,7 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4744
4746
|
return result;
|
|
4745
4747
|
}
|
|
4746
4748
|
|
|
4747
|
-
@FieldResolver(() => [UserViewRun_])
|
|
4749
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewRun_])
|
|
4748
4750
|
async UserViewRunsArray(@Root() userview_: UserView_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4749
4751
|
this.CheckUserReadPermissions('User View Runs', userPayload);
|
|
4750
4752
|
const sSQL = `SELECT * FROM [admin].[vwUserViewRuns] WHERE [UserViewID]=${userview_.ID} ` + this.getRowLevelSecurityWhereClause('User View Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -4752,7 +4754,7 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4752
4754
|
return result;
|
|
4753
4755
|
}
|
|
4754
4756
|
|
|
4755
|
-
@FieldResolver(() => [DataContextItem_])
|
|
4757
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
4756
4758
|
async DataContextItemsArray(@Root() userview_: UserView_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4757
4759
|
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
4758
4760
|
const sSQL = `SELECT * FROM [admin].[vwDataContextItems] WHERE [ViewID]=${userview_.ID} ` + this.getRowLevelSecurityWhereClause('Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -4822,7 +4824,7 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4822
4824
|
}
|
|
4823
4825
|
|
|
4824
4826
|
@Mutation(() => UserView_)
|
|
4825
|
-
async DeleteUserView(@Arg('ID', () => Int) ID:
|
|
4827
|
+
async DeleteUserView(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4826
4828
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
4827
4829
|
const entityObject = <UserViewEntity>await new Metadata().GetEntityObject('User Views', this.GetUserFromPayload(userPayload));
|
|
4828
4830
|
await entityObject.Load(ID);
|
|
@@ -4839,11 +4841,11 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
4839
4841
|
}
|
|
4840
4842
|
|
|
4841
4843
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
4842
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
4844
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
4843
4845
|
const i = ID, d = dataSource; // prevent error;
|
|
4844
4846
|
return true;
|
|
4845
4847
|
}
|
|
4846
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
4848
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
4847
4849
|
const i = ID, d = dataSource; // prevent error
|
|
4848
4850
|
}
|
|
4849
4851
|
|
|
@@ -4881,14 +4883,14 @@ export class CompanyIntegrationRun_ {
|
|
|
4881
4883
|
@MaxLength(200)
|
|
4882
4884
|
RunByUser: string;
|
|
4883
4885
|
|
|
4884
|
-
@Field(() => [CompanyIntegrationRunAPILog_])
|
|
4885
|
-
CompanyIntegrationRunAPILogsArray: CompanyIntegrationRunAPILog_[]; // Link to CompanyIntegrationRunAPILogs
|
|
4886
|
+
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRunAPILog_])
|
|
4887
|
+
CompanyIntegrationRunAPILogsArray: mj_core_schema_server_object_types.CompanyIntegrationRunAPILog_[]; // Link to CompanyIntegrationRunAPILogs
|
|
4886
4888
|
|
|
4887
|
-
@Field(() => [ErrorLog_])
|
|
4888
|
-
ErrorLogsArray: ErrorLog_[]; // Link to ErrorLogs
|
|
4889
|
+
@Field(() => [mj_core_schema_server_object_types.ErrorLog_])
|
|
4890
|
+
ErrorLogsArray: mj_core_schema_server_object_types.ErrorLog_[]; // Link to ErrorLogs
|
|
4889
4891
|
|
|
4890
|
-
@Field(() => [CompanyIntegrationRunDetail_])
|
|
4891
|
-
CompanyIntegrationRunDetailsArray: CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
4892
|
+
@Field(() => [mj_core_schema_server_object_types.CompanyIntegrationRunDetail_])
|
|
4893
|
+
CompanyIntegrationRunDetailsArray: mj_core_schema_server_object_types.CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
4892
4894
|
|
|
4893
4895
|
}
|
|
4894
4896
|
|
|
@@ -4964,14 +4966,14 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
4964
4966
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
4965
4967
|
}
|
|
4966
4968
|
@Query(() => CompanyIntegrationRun_, { nullable: true })
|
|
4967
|
-
async CompanyIntegrationRun(@Arg('ID', () => Int) ID:
|
|
4969
|
+
async CompanyIntegrationRun(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<CompanyIntegrationRun_ | null> {
|
|
4968
4970
|
this.CheckUserReadPermissions('Company Integration Runs', userPayload);
|
|
4969
4971
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRuns] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
4970
4972
|
const result = this.MapFieldNamesToCodeNames('Company Integration Runs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
4971
4973
|
return result;
|
|
4972
4974
|
}
|
|
4973
4975
|
|
|
4974
|
-
@FieldResolver(() => [CompanyIntegrationRunAPILog_])
|
|
4976
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRunAPILog_])
|
|
4975
4977
|
async CompanyIntegrationRunAPILogsArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4976
4978
|
this.CheckUserReadPermissions('Company Integration Run API Logs', userPayload);
|
|
4977
4979
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRunAPILogs] WHERE [CompanyIntegrationRunID]=${companyintegrationrun_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Run API Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -4979,7 +4981,7 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
4979
4981
|
return result;
|
|
4980
4982
|
}
|
|
4981
4983
|
|
|
4982
|
-
@FieldResolver(() => [ErrorLog_])
|
|
4984
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ErrorLog_])
|
|
4983
4985
|
async ErrorLogsArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4984
4986
|
this.CheckUserReadPermissions('Error Logs', userPayload);
|
|
4985
4987
|
const sSQL = `SELECT * FROM [admin].[vwErrorLogs] WHERE [CompanyIntegrationRunID]=${companyintegrationrun_.ID} ` + this.getRowLevelSecurityWhereClause('Error Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -4987,7 +4989,7 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
4987
4989
|
return result;
|
|
4988
4990
|
}
|
|
4989
4991
|
|
|
4990
|
-
@FieldResolver(() => [CompanyIntegrationRunDetail_])
|
|
4992
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.CompanyIntegrationRunDetail_])
|
|
4991
4993
|
async CompanyIntegrationRunDetailsArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4992
4994
|
this.CheckUserReadPermissions('Company Integration Run Details', userPayload);
|
|
4993
4995
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRunDetails] WHERE [CompanyIntegrationRunID]=${companyintegrationrun_.ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -5069,8 +5071,8 @@ export class CompanyIntegrationRunDetail_ {
|
|
|
5069
5071
|
@MaxLength(8)
|
|
5070
5072
|
RunEndedAt?: Date;
|
|
5071
5073
|
|
|
5072
|
-
@Field(() => [ErrorLog_])
|
|
5073
|
-
ErrorLogsArray: ErrorLog_[]; // Link to ErrorLogs
|
|
5074
|
+
@Field(() => [mj_core_schema_server_object_types.ErrorLog_])
|
|
5075
|
+
ErrorLogsArray: mj_core_schema_server_object_types.ErrorLog_[]; // Link to ErrorLogs
|
|
5074
5076
|
|
|
5075
5077
|
}
|
|
5076
5078
|
|
|
@@ -5146,14 +5148,14 @@ export class CompanyIntegrationRunDetailResolver extends ResolverBase {
|
|
|
5146
5148
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
5147
5149
|
}
|
|
5148
5150
|
@Query(() => CompanyIntegrationRunDetail_, { nullable: true })
|
|
5149
|
-
async CompanyIntegrationRunDetail(@Arg('ID', () => Int) ID:
|
|
5151
|
+
async CompanyIntegrationRunDetail(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<CompanyIntegrationRunDetail_ | null> {
|
|
5150
5152
|
this.CheckUserReadPermissions('Company Integration Run Details', userPayload);
|
|
5151
5153
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRunDetails] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
5152
5154
|
const result = this.MapFieldNamesToCodeNames('Company Integration Run Details', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
5153
5155
|
return result;
|
|
5154
5156
|
}
|
|
5155
5157
|
|
|
5156
|
-
@FieldResolver(() => [ErrorLog_])
|
|
5158
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ErrorLog_])
|
|
5157
5159
|
async ErrorLogsArray(@Root() companyintegrationrundetail_: CompanyIntegrationRunDetail_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5158
5160
|
this.CheckUserReadPermissions('Error Logs', userPayload);
|
|
5159
5161
|
const sSQL = `SELECT * FROM [admin].[vwErrorLogs] WHERE [CompanyIntegrationRunDetailID]=${companyintegrationrundetail_.ID} ` + this.getRowLevelSecurityWhereClause('Error Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -5314,7 +5316,7 @@ export class ErrorLogResolver extends ResolverBase {
|
|
|
5314
5316
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
5315
5317
|
}
|
|
5316
5318
|
@Query(() => ErrorLog_, { nullable: true })
|
|
5317
|
-
async ErrorLog(@Arg('ID', () => Int) ID:
|
|
5319
|
+
async ErrorLog(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ErrorLog_ | null> {
|
|
5318
5320
|
this.CheckUserReadPermissions('Error Logs', userPayload);
|
|
5319
5321
|
const sSQL = `SELECT * FROM [admin].[vwErrorLogs] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Error Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
5320
5322
|
const result = this.MapFieldNamesToCodeNames('Error Logs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -5378,11 +5380,11 @@ export class Application_ {
|
|
|
5378
5380
|
@MaxLength(8)
|
|
5379
5381
|
UpdatedAt: Date;
|
|
5380
5382
|
|
|
5381
|
-
@Field(() => [ApplicationEntity_])
|
|
5382
|
-
ApplicationEntitiesArray: ApplicationEntity_[]; // Link to ApplicationEntities
|
|
5383
|
+
@Field(() => [mj_core_schema_server_object_types.ApplicationEntity_])
|
|
5384
|
+
ApplicationEntitiesArray: mj_core_schema_server_object_types.ApplicationEntity_[]; // Link to ApplicationEntities
|
|
5383
5385
|
|
|
5384
|
-
@Field(() => [UserApplication_])
|
|
5385
|
-
UserApplicationsArray: UserApplication_[]; // Link to UserApplications
|
|
5386
|
+
@Field(() => [mj_core_schema_server_object_types.UserApplication_])
|
|
5387
|
+
UserApplicationsArray: mj_core_schema_server_object_types.UserApplication_[]; // Link to UserApplications
|
|
5386
5388
|
|
|
5387
5389
|
}
|
|
5388
5390
|
|
|
@@ -5446,7 +5448,7 @@ export class ApplicationResolver extends ResolverBase {
|
|
|
5446
5448
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
5447
5449
|
}
|
|
5448
5450
|
@Query(() => Application_, { nullable: true })
|
|
5449
|
-
async Application(@Arg('ID', () => Int) ID:
|
|
5451
|
+
async Application(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Application_ | null> {
|
|
5450
5452
|
this.CheckUserReadPermissions('Applications', userPayload);
|
|
5451
5453
|
const sSQL = `SELECT * FROM [admin].[vwApplications] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Applications', userPayload, EntityPermissionType.Read, 'AND');
|
|
5452
5454
|
const result = this.MapFieldNamesToCodeNames('Applications', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -5461,7 +5463,7 @@ export class ApplicationResolver extends ResolverBase {
|
|
|
5461
5463
|
return result;
|
|
5462
5464
|
}
|
|
5463
5465
|
|
|
5464
|
-
@FieldResolver(() => [ApplicationEntity_])
|
|
5466
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ApplicationEntity_])
|
|
5465
5467
|
async ApplicationEntitiesArray(@Root() application_: Application_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5466
5468
|
this.CheckUserReadPermissions('Application Entities', userPayload);
|
|
5467
5469
|
const sSQL = `SELECT * FROM [admin].[vwApplicationEntities] WHERE [ApplicationID]=${application_.ID} ` + this.getRowLevelSecurityWhereClause('Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -5469,7 +5471,7 @@ export class ApplicationResolver extends ResolverBase {
|
|
|
5469
5471
|
return result;
|
|
5470
5472
|
}
|
|
5471
5473
|
|
|
5472
|
-
@FieldResolver(() => [UserApplication_])
|
|
5474
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserApplication_])
|
|
5473
5475
|
async UserApplicationsArray(@Root() application_: Application_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5474
5476
|
this.CheckUserReadPermissions('User Applications', userPayload);
|
|
5475
5477
|
const sSQL = `SELECT * FROM [admin].[vwUserApplications] WHERE [ApplicationID]=${application_.ID} ` + this.getRowLevelSecurityWhereClause('User Applications', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -5653,7 +5655,7 @@ export class ApplicationEntityResolver extends ResolverBase {
|
|
|
5653
5655
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
5654
5656
|
}
|
|
5655
5657
|
@Query(() => ApplicationEntity_, { nullable: true })
|
|
5656
|
-
async ApplicationEntity(@Arg('ID', () => Int) ID:
|
|
5658
|
+
async ApplicationEntity(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ApplicationEntity_ | null> {
|
|
5657
5659
|
this.CheckUserReadPermissions('Application Entities', userPayload);
|
|
5658
5660
|
const sSQL = `SELECT * FROM [admin].[vwApplicationEntities] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
5659
5661
|
const result = this.MapFieldNamesToCodeNames('Application Entities', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -5722,7 +5724,7 @@ export class ApplicationEntityResolver extends ResolverBase {
|
|
|
5722
5724
|
}
|
|
5723
5725
|
|
|
5724
5726
|
@Mutation(() => ApplicationEntity_)
|
|
5725
|
-
async DeleteApplicationEntity(@Arg('ID', () => Int) ID:
|
|
5727
|
+
async DeleteApplicationEntity(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5726
5728
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
5727
5729
|
const entityObject = <ApplicationEntityEntity>await new Metadata().GetEntityObject('Application Entities', this.GetUserFromPayload(userPayload));
|
|
5728
5730
|
await entityObject.Load(ID);
|
|
@@ -5739,11 +5741,11 @@ export class ApplicationEntityResolver extends ResolverBase {
|
|
|
5739
5741
|
}
|
|
5740
5742
|
|
|
5741
5743
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
5742
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
5744
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
5743
5745
|
const i = ID, d = dataSource; // prevent error;
|
|
5744
5746
|
return true;
|
|
5745
5747
|
}
|
|
5746
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
5748
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
5747
5749
|
const i = ID, d = dataSource; // prevent error
|
|
5748
5750
|
}
|
|
5749
5751
|
|
|
@@ -5946,7 +5948,7 @@ export class EntityPermissionResolver extends ResolverBase {
|
|
|
5946
5948
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
5947
5949
|
}
|
|
5948
5950
|
@Query(() => EntityPermission_, { nullable: true })
|
|
5949
|
-
async EntityPermission(@Arg('ID', () => Int) ID:
|
|
5951
|
+
async EntityPermission(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityPermission_ | null> {
|
|
5950
5952
|
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
5951
5953
|
const sSQL = `SELECT * FROM [admin].[vwEntityPermissions] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
5952
5954
|
const result = this.MapFieldNamesToCodeNames('Entity Permissions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -6023,7 +6025,7 @@ export class EntityPermissionResolver extends ResolverBase {
|
|
|
6023
6025
|
}
|
|
6024
6026
|
|
|
6025
6027
|
@Mutation(() => EntityPermission_)
|
|
6026
|
-
async DeleteEntityPermission(@Arg('ID', () => Int) ID:
|
|
6028
|
+
async DeleteEntityPermission(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6027
6029
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
6028
6030
|
const entityObject = <EntityPermissionEntity>await new Metadata().GetEntityObject('Entity Permissions', this.GetUserFromPayload(userPayload));
|
|
6029
6031
|
await entityObject.Load(ID);
|
|
@@ -6040,11 +6042,11 @@ export class EntityPermissionResolver extends ResolverBase {
|
|
|
6040
6042
|
}
|
|
6041
6043
|
|
|
6042
6044
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
6043
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
6045
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
6044
6046
|
const i = ID, d = dataSource; // prevent error;
|
|
6045
6047
|
return true;
|
|
6046
6048
|
}
|
|
6047
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
6049
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
6048
6050
|
const i = ID, d = dataSource; // prevent error
|
|
6049
6051
|
}
|
|
6050
6052
|
|
|
@@ -6163,7 +6165,7 @@ export class UserApplicationEntityResolver extends ResolverBase {
|
|
|
6163
6165
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
6164
6166
|
}
|
|
6165
6167
|
@Query(() => UserApplicationEntity_, { nullable: true })
|
|
6166
|
-
async UserApplicationEntity(@Arg('ID', () => Int) ID:
|
|
6168
|
+
async UserApplicationEntity(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserApplicationEntity_ | null> {
|
|
6167
6169
|
this.CheckUserReadPermissions('User Application Entities', userPayload);
|
|
6168
6170
|
const sSQL = `SELECT * FROM [admin].[vwUserApplicationEntities] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
6169
6171
|
const result = this.MapFieldNamesToCodeNames('User Application Entities', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -6232,7 +6234,7 @@ export class UserApplicationEntityResolver extends ResolverBase {
|
|
|
6232
6234
|
}
|
|
6233
6235
|
|
|
6234
6236
|
@Mutation(() => UserApplicationEntity_)
|
|
6235
|
-
async DeleteUserApplicationEntity(@Arg('ID', () => Int) ID:
|
|
6237
|
+
async DeleteUserApplicationEntity(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6236
6238
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
6237
6239
|
const entityObject = <UserApplicationEntityEntity>await new Metadata().GetEntityObject('User Application Entities', this.GetUserFromPayload(userPayload));
|
|
6238
6240
|
await entityObject.Load(ID);
|
|
@@ -6249,11 +6251,11 @@ export class UserApplicationEntityResolver extends ResolverBase {
|
|
|
6249
6251
|
}
|
|
6250
6252
|
|
|
6251
6253
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
6252
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
6254
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
6253
6255
|
const i = ID, d = dataSource; // prevent error;
|
|
6254
6256
|
return true;
|
|
6255
6257
|
}
|
|
6256
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
6258
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
6257
6259
|
const i = ID, d = dataSource; // prevent error
|
|
6258
6260
|
}
|
|
6259
6261
|
|
|
@@ -6287,8 +6289,8 @@ export class UserApplication_ {
|
|
|
6287
6289
|
@MaxLength(100)
|
|
6288
6290
|
Application: string;
|
|
6289
6291
|
|
|
6290
|
-
@Field(() => [UserApplicationEntity_])
|
|
6291
|
-
UserApplicationEntitiesArray: UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
6292
|
+
@Field(() => [mj_core_schema_server_object_types.UserApplicationEntity_])
|
|
6293
|
+
UserApplicationEntitiesArray: mj_core_schema_server_object_types.UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
6292
6294
|
|
|
6293
6295
|
}
|
|
6294
6296
|
|
|
@@ -6358,14 +6360,14 @@ export class UserApplicationResolver extends ResolverBase {
|
|
|
6358
6360
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
6359
6361
|
}
|
|
6360
6362
|
@Query(() => UserApplication_, { nullable: true })
|
|
6361
|
-
async UserApplication(@Arg('ID', () => Int) ID:
|
|
6363
|
+
async UserApplication(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserApplication_ | null> {
|
|
6362
6364
|
this.CheckUserReadPermissions('User Applications', userPayload);
|
|
6363
6365
|
const sSQL = `SELECT * FROM [admin].[vwUserApplications] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User Applications', userPayload, EntityPermissionType.Read, 'AND');
|
|
6364
6366
|
const result = this.MapFieldNamesToCodeNames('User Applications', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
6365
6367
|
return result;
|
|
6366
6368
|
}
|
|
6367
6369
|
|
|
6368
|
-
@FieldResolver(() => [UserApplicationEntity_])
|
|
6370
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserApplicationEntity_])
|
|
6369
6371
|
async UserApplicationEntitiesArray(@Root() userapplication_: UserApplication_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6370
6372
|
this.CheckUserReadPermissions('User Application Entities', userPayload);
|
|
6371
6373
|
const sSQL = `SELECT * FROM [admin].[vwUserApplicationEntities] WHERE [UserApplicationID]=${userapplication_.ID} ` + this.getRowLevelSecurityWhereClause('User Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -6508,7 +6510,7 @@ export class CompanyIntegrationRunAPILogResolver extends ResolverBase {
|
|
|
6508
6510
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
6509
6511
|
}
|
|
6510
6512
|
@Query(() => CompanyIntegrationRunAPILog_, { nullable: true })
|
|
6511
|
-
async CompanyIntegrationRunAPILog(@Arg('ID', () => Int) ID:
|
|
6513
|
+
async CompanyIntegrationRunAPILog(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<CompanyIntegrationRunAPILog_ | null> {
|
|
6512
6514
|
this.CheckUserReadPermissions('Company Integration Run API Logs', userPayload);
|
|
6513
6515
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRunAPILogs] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Run API Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
6514
6516
|
const result = this.MapFieldNamesToCodeNames('Company Integration Run API Logs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -6588,8 +6590,8 @@ export class List_ {
|
|
|
6588
6590
|
@MaxLength(200)
|
|
6589
6591
|
User: string;
|
|
6590
6592
|
|
|
6591
|
-
@Field(() => [ListDetail_])
|
|
6592
|
-
ListDetailsArray: ListDetail_[]; // Link to ListDetails
|
|
6593
|
+
@Field(() => [mj_core_schema_server_object_types.ListDetail_])
|
|
6594
|
+
ListDetailsArray: mj_core_schema_server_object_types.ListDetail_[]; // Link to ListDetails
|
|
6593
6595
|
|
|
6594
6596
|
}
|
|
6595
6597
|
|
|
@@ -6693,14 +6695,14 @@ export class ListResolver extends ResolverBase {
|
|
|
6693
6695
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
6694
6696
|
}
|
|
6695
6697
|
@Query(() => List_, { nullable: true })
|
|
6696
|
-
async List(@Arg('ID', () => Int) ID:
|
|
6698
|
+
async List(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<List_ | null> {
|
|
6697
6699
|
this.CheckUserReadPermissions('Lists', userPayload);
|
|
6698
6700
|
const sSQL = `SELECT * FROM [admin].[vwLists] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
6699
6701
|
const result = this.MapFieldNamesToCodeNames('Lists', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
6700
6702
|
return result;
|
|
6701
6703
|
}
|
|
6702
6704
|
|
|
6703
|
-
@FieldResolver(() => [ListDetail_])
|
|
6705
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ListDetail_])
|
|
6704
6706
|
async ListDetailsArray(@Root() list_: List_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6705
6707
|
this.CheckUserReadPermissions('List Details', userPayload);
|
|
6706
6708
|
const sSQL = `SELECT * FROM [admin].[vwListDetails] WHERE [ListID]=${list_.ID} ` + this.getRowLevelSecurityWhereClause('List Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -6770,7 +6772,7 @@ export class ListResolver extends ResolverBase {
|
|
|
6770
6772
|
}
|
|
6771
6773
|
|
|
6772
6774
|
@Mutation(() => List_)
|
|
6773
|
-
async DeleteList(@Arg('ID', () => Int) ID:
|
|
6775
|
+
async DeleteList(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6774
6776
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
6775
6777
|
const entityObject = <ListEntity>await new Metadata().GetEntityObject('Lists', this.GetUserFromPayload(userPayload));
|
|
6776
6778
|
await entityObject.Load(ID);
|
|
@@ -6787,11 +6789,11 @@ export class ListResolver extends ResolverBase {
|
|
|
6787
6789
|
}
|
|
6788
6790
|
|
|
6789
6791
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
6790
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
6792
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
6791
6793
|
const i = ID, d = dataSource; // prevent error;
|
|
6792
6794
|
return true;
|
|
6793
6795
|
}
|
|
6794
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
6796
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
6795
6797
|
const i = ID, d = dataSource; // prevent error
|
|
6796
6798
|
}
|
|
6797
6799
|
|
|
@@ -6899,7 +6901,7 @@ export class ListDetailResolver extends ResolverBase {
|
|
|
6899
6901
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
6900
6902
|
}
|
|
6901
6903
|
@Query(() => ListDetail_, { nullable: true })
|
|
6902
|
-
async ListDetail(@Arg('ID', () => Int) ID:
|
|
6904
|
+
async ListDetail(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ListDetail_ | null> {
|
|
6903
6905
|
this.CheckUserReadPermissions('List Details', userPayload);
|
|
6904
6906
|
const sSQL = `SELECT * FROM [admin].[vwListDetails] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('List Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
6905
6907
|
const result = this.MapFieldNamesToCodeNames('List Details', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -6968,7 +6970,7 @@ export class ListDetailResolver extends ResolverBase {
|
|
|
6968
6970
|
}
|
|
6969
6971
|
|
|
6970
6972
|
@Mutation(() => ListDetail_)
|
|
6971
|
-
async DeleteListDetail(@Arg('ID', () => Int) ID:
|
|
6973
|
+
async DeleteListDetail(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6972
6974
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
6973
6975
|
const entityObject = <ListDetailEntity>await new Metadata().GetEntityObject('List Details', this.GetUserFromPayload(userPayload));
|
|
6974
6976
|
await entityObject.Load(ID);
|
|
@@ -6985,11 +6987,11 @@ export class ListDetailResolver extends ResolverBase {
|
|
|
6985
6987
|
}
|
|
6986
6988
|
|
|
6987
6989
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
6988
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
6990
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
6989
6991
|
const i = ID, d = dataSource; // prevent error;
|
|
6990
6992
|
return true;
|
|
6991
6993
|
}
|
|
6992
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
6994
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
6993
6995
|
const i = ID, d = dataSource; // prevent error
|
|
6994
6996
|
}
|
|
6995
6997
|
|
|
@@ -7021,8 +7023,8 @@ export class UserViewRun_ {
|
|
|
7021
7023
|
@MaxLength(200)
|
|
7022
7024
|
RunByUser: string;
|
|
7023
7025
|
|
|
7024
|
-
@Field(() => [UserViewRunDetail_])
|
|
7025
|
-
UserViewRunDetailsArray: UserViewRunDetail_[]; // Link to UserViewRunDetails
|
|
7026
|
+
@Field(() => [mj_core_schema_server_object_types.UserViewRunDetail_])
|
|
7027
|
+
UserViewRunDetailsArray: mj_core_schema_server_object_types.UserViewRunDetail_[]; // Link to UserViewRunDetails
|
|
7026
7028
|
|
|
7027
7029
|
}
|
|
7028
7030
|
|
|
@@ -7108,14 +7110,14 @@ export class UserViewRunResolver extends ResolverBase {
|
|
|
7108
7110
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
7109
7111
|
}
|
|
7110
7112
|
@Query(() => UserViewRun_, { nullable: true })
|
|
7111
|
-
async UserViewRun(@Arg('ID', () => Int) ID:
|
|
7113
|
+
async UserViewRun(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserViewRun_ | null> {
|
|
7112
7114
|
this.CheckUserReadPermissions('User View Runs', userPayload);
|
|
7113
7115
|
const sSQL = `SELECT * FROM [admin].[vwUserViewRuns] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User View Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
7114
7116
|
const result = this.MapFieldNamesToCodeNames('User View Runs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
7115
7117
|
return result;
|
|
7116
7118
|
}
|
|
7117
7119
|
|
|
7118
|
-
@FieldResolver(() => [UserViewRunDetail_])
|
|
7120
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewRunDetail_])
|
|
7119
7121
|
async UserViewRunDetailsArray(@Root() userviewrun_: UserViewRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7120
7122
|
this.CheckUserReadPermissions('User View Run Details', userPayload);
|
|
7121
7123
|
const sSQL = `SELECT * FROM [admin].[vwUserViewRunDetails] WHERE [UserViewRunID]=${userviewrun_.ID} ` + this.getRowLevelSecurityWhereClause('User View Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -7285,7 +7287,7 @@ export class UserViewRunDetailResolver extends ResolverBase {
|
|
|
7285
7287
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
7286
7288
|
}
|
|
7287
7289
|
@Query(() => UserViewRunDetail_, { nullable: true })
|
|
7288
|
-
async UserViewRunDetail(@Arg('ID', () => Int) ID:
|
|
7290
|
+
async UserViewRunDetail(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserViewRunDetail_ | null> {
|
|
7289
7291
|
this.CheckUserReadPermissions('User View Run Details', userPayload);
|
|
7290
7292
|
const sSQL = `SELECT * FROM [admin].[vwUserViewRunDetails] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User View Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
7291
7293
|
const result = this.MapFieldNamesToCodeNames('User View Run Details', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -7468,7 +7470,7 @@ export class WorkflowRunResolver extends ResolverBase {
|
|
|
7468
7470
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
7469
7471
|
}
|
|
7470
7472
|
@Query(() => WorkflowRun_, { nullable: true })
|
|
7471
|
-
async WorkflowRun(@Arg('ID', () => Int) ID:
|
|
7473
|
+
async WorkflowRun(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<WorkflowRun_ | null> {
|
|
7472
7474
|
this.CheckUserReadPermissions('Workflow Runs', userPayload);
|
|
7473
7475
|
const sSQL = `SELECT * FROM [admin].[vwWorkflowRuns] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Workflow Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
7474
7476
|
const result = this.MapFieldNamesToCodeNames('Workflow Runs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -7543,11 +7545,11 @@ export class Workflow_ {
|
|
|
7543
7545
|
@MaxLength(8)
|
|
7544
7546
|
UpdatedAt: Date;
|
|
7545
7547
|
|
|
7546
|
-
@Field(() => [Report_])
|
|
7547
|
-
ReportsArray: Report_[]; // Link to Reports
|
|
7548
|
+
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
7549
|
+
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
7548
7550
|
|
|
7549
|
-
@Field(() => [WorkflowRun_])
|
|
7550
|
-
WorkflowRunsArray: WorkflowRun_[]; // Link to WorkflowRuns
|
|
7551
|
+
@Field(() => [mj_core_schema_server_object_types.WorkflowRun_])
|
|
7552
|
+
WorkflowRunsArray: mj_core_schema_server_object_types.WorkflowRun_[]; // Link to WorkflowRuns
|
|
7551
7553
|
|
|
7552
7554
|
}
|
|
7553
7555
|
|
|
@@ -7620,14 +7622,14 @@ export class WorkflowResolver extends ResolverBase {
|
|
|
7620
7622
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
7621
7623
|
}
|
|
7622
7624
|
@Query(() => Workflow_, { nullable: true })
|
|
7623
|
-
async Workflow(@Arg('ID', () => Int) ID:
|
|
7625
|
+
async Workflow(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Workflow_ | null> {
|
|
7624
7626
|
this.CheckUserReadPermissions('Workflows', userPayload);
|
|
7625
7627
|
const sSQL = `SELECT * FROM [admin].[vwWorkflows] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Workflows', userPayload, EntityPermissionType.Read, 'AND');
|
|
7626
7628
|
const result = this.MapFieldNamesToCodeNames('Workflows', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
7627
7629
|
return result;
|
|
7628
7630
|
}
|
|
7629
7631
|
|
|
7630
|
-
@FieldResolver(() => [Report_])
|
|
7632
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Report_])
|
|
7631
7633
|
async ReportsArray(@Root() workflow_: Workflow_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7632
7634
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
7633
7635
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [OutputWorkflowID]=${workflow_.ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -7635,7 +7637,7 @@ export class WorkflowResolver extends ResolverBase {
|
|
|
7635
7637
|
return result;
|
|
7636
7638
|
}
|
|
7637
7639
|
|
|
7638
|
-
@FieldResolver(() => [WorkflowRun_])
|
|
7640
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.WorkflowRun_])
|
|
7639
7641
|
async WorkflowRunsArray(@Root() workflow_: Workflow_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7640
7642
|
this.CheckUserReadPermissions('Workflow Runs', userPayload);
|
|
7641
7643
|
const sSQL = `SELECT * FROM [admin].[vwWorkflowRuns] WHERE [WorkflowName]=${workflow_.ID} ` + this.getRowLevelSecurityWhereClause('Workflow Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -7707,8 +7709,8 @@ export class WorkflowEngine_ {
|
|
|
7707
7709
|
@MaxLength(8)
|
|
7708
7710
|
UpdatedAt: Date;
|
|
7709
7711
|
|
|
7710
|
-
@Field(() => [Workflow_])
|
|
7711
|
-
WorkflowsArray: Workflow_[]; // Link to Workflows
|
|
7712
|
+
@Field(() => [mj_core_schema_server_object_types.Workflow_])
|
|
7713
|
+
WorkflowsArray: mj_core_schema_server_object_types.Workflow_[]; // Link to Workflows
|
|
7712
7714
|
|
|
7713
7715
|
}
|
|
7714
7716
|
|
|
@@ -7778,14 +7780,14 @@ export class WorkflowEngineResolver extends ResolverBase {
|
|
|
7778
7780
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
7779
7781
|
}
|
|
7780
7782
|
@Query(() => WorkflowEngine_, { nullable: true })
|
|
7781
|
-
async WorkflowEngine(@Arg('ID', () => Int) ID:
|
|
7783
|
+
async WorkflowEngine(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<WorkflowEngine_ | null> {
|
|
7782
7784
|
this.CheckUserReadPermissions('Workflow Engines', userPayload);
|
|
7783
7785
|
const sSQL = `SELECT * FROM [admin].[vwWorkflowEngines] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Workflow Engines', userPayload, EntityPermissionType.Read, 'AND');
|
|
7784
7786
|
const result = this.MapFieldNamesToCodeNames('Workflow Engines', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
7785
7787
|
return result;
|
|
7786
7788
|
}
|
|
7787
7789
|
|
|
7788
|
-
@FieldResolver(() => [Workflow_])
|
|
7790
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Workflow_])
|
|
7789
7791
|
async WorkflowsArray(@Root() workflowengine_: WorkflowEngine_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7790
7792
|
this.CheckUserReadPermissions('Workflows', userPayload);
|
|
7791
7793
|
const sSQL = `SELECT * FROM [admin].[vwWorkflows] WHERE [WorkflowEngineName]=${workflowengine_.ID} ` + this.getRowLevelSecurityWhereClause('Workflows', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -7952,7 +7954,7 @@ export class RecordChangeResolver extends ResolverBase {
|
|
|
7952
7954
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
7953
7955
|
}
|
|
7954
7956
|
@Query(() => RecordChange_, { nullable: true })
|
|
7955
|
-
async RecordChange(@Arg('ID', () => Int) ID:
|
|
7957
|
+
async RecordChange(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<RecordChange_ | null> {
|
|
7956
7958
|
this.CheckUserReadPermissions('Record Changes', userPayload);
|
|
7957
7959
|
const sSQL = `SELECT * FROM [admin].[vwRecordChanges] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Record Changes', userPayload, EntityPermissionType.Read, 'AND');
|
|
7958
7960
|
const result = this.MapFieldNamesToCodeNames('Record Changes', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -8077,7 +8079,7 @@ export class UserRoleResolver extends ResolverBase {
|
|
|
8077
8079
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
8078
8080
|
}
|
|
8079
8081
|
@Query(() => UserRole_, { nullable: true })
|
|
8080
|
-
async UserRole(@Arg('ID', () => Int) ID:
|
|
8082
|
+
async UserRole(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserRole_ | null> {
|
|
8081
8083
|
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
8082
8084
|
const sSQL = `SELECT * FROM [admin].[vwUserRoles] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
8083
8085
|
const result = this.MapFieldNamesToCodeNames('User Roles', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -8150,8 +8152,8 @@ export class RowLevelSecurityFilter_ {
|
|
|
8150
8152
|
@MaxLength(8)
|
|
8151
8153
|
UpdatedAt: Date;
|
|
8152
8154
|
|
|
8153
|
-
@Field(() => [EntityPermission_])
|
|
8154
|
-
EntityPermissionsArray: EntityPermission_[]; // Link to EntityPermissions
|
|
8155
|
+
@Field(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
8156
|
+
EntityPermissionsArray: mj_core_schema_server_object_types.EntityPermission_[]; // Link to EntityPermissions
|
|
8155
8157
|
|
|
8156
8158
|
}
|
|
8157
8159
|
//****************************************************************************
|
|
@@ -8199,7 +8201,7 @@ export class RowLevelSecurityFilterResolver extends ResolverBase {
|
|
|
8199
8201
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
8200
8202
|
}
|
|
8201
8203
|
@Query(() => RowLevelSecurityFilter_, { nullable: true })
|
|
8202
|
-
async RowLevelSecurityFilter(@Arg('ID', () => Int) ID:
|
|
8204
|
+
async RowLevelSecurityFilter(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<RowLevelSecurityFilter_ | null> {
|
|
8203
8205
|
this.CheckUserReadPermissions('Row Level Security Filters', userPayload);
|
|
8204
8206
|
const sSQL = `SELECT * FROM [admin].[vwRowLevelSecurityFilters] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Row Level Security Filters', userPayload, EntityPermissionType.Read, 'AND');
|
|
8205
8207
|
const result = this.MapFieldNamesToCodeNames('Row Level Security Filters', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -8214,7 +8216,7 @@ export class RowLevelSecurityFilterResolver extends ResolverBase {
|
|
|
8214
8216
|
return result;
|
|
8215
8217
|
}
|
|
8216
8218
|
|
|
8217
|
-
@FieldResolver(() => [EntityPermission_])
|
|
8219
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityPermission_])
|
|
8218
8220
|
async EntityPermissionsArray(@Root() rowlevelsecurityfilter_: RowLevelSecurityFilter_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8219
8221
|
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
8220
8222
|
const sSQL = `SELECT * FROM [admin].[vwEntityPermissions] WHERE [ReadRLSFilterID]=${rowlevelsecurityfilter_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -8383,7 +8385,7 @@ export class AuditLogResolver extends ResolverBase {
|
|
|
8383
8385
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
8384
8386
|
}
|
|
8385
8387
|
@Query(() => AuditLog_, { nullable: true })
|
|
8386
|
-
async AuditLog(@Arg('ID', () => Int) ID:
|
|
8388
|
+
async AuditLog(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AuditLog_ | null> {
|
|
8387
8389
|
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
8388
8390
|
const sSQL = `SELECT * FROM [admin].[vwAuditLogs] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
8389
8391
|
const result = this.MapFieldNamesToCodeNames('Audit Logs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -8485,17 +8487,17 @@ export class Authorization_ {
|
|
|
8485
8487
|
@MaxLength(8)
|
|
8486
8488
|
UpdatedAt: Date;
|
|
8487
8489
|
|
|
8488
|
-
@Field(() => [AuthorizationRole_])
|
|
8489
|
-
AuthorizationRolesArray: AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
8490
|
+
@Field(() => [mj_core_schema_server_object_types.AuthorizationRole_])
|
|
8491
|
+
AuthorizationRolesArray: mj_core_schema_server_object_types.AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
8490
8492
|
|
|
8491
|
-
@Field(() => [Authorization_])
|
|
8492
|
-
AuthorizationsArray: Authorization_[]; // Link to Authorizations
|
|
8493
|
+
@Field(() => [mj_core_schema_server_object_types.Authorization_])
|
|
8494
|
+
AuthorizationsArray: mj_core_schema_server_object_types.Authorization_[]; // Link to Authorizations
|
|
8493
8495
|
|
|
8494
|
-
@Field(() => [AuditLogType_])
|
|
8495
|
-
AuditLogTypesArray: AuditLogType_[]; // Link to AuditLogTypes
|
|
8496
|
+
@Field(() => [mj_core_schema_server_object_types.AuditLogType_])
|
|
8497
|
+
AuditLogTypesArray: mj_core_schema_server_object_types.AuditLogType_[]; // Link to AuditLogTypes
|
|
8496
8498
|
|
|
8497
|
-
@Field(() => [AuditLog_])
|
|
8498
|
-
AuditLogsArray: AuditLog_[]; // Link to AuditLogs
|
|
8499
|
+
@Field(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
8500
|
+
AuditLogsArray: mj_core_schema_server_object_types.AuditLog_[]; // Link to AuditLogs
|
|
8499
8501
|
|
|
8500
8502
|
}
|
|
8501
8503
|
//****************************************************************************
|
|
@@ -8543,7 +8545,7 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
8543
8545
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
8544
8546
|
}
|
|
8545
8547
|
@Query(() => Authorization_, { nullable: true })
|
|
8546
|
-
async Authorization(@Arg('ID', () => Int) ID:
|
|
8548
|
+
async Authorization(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Authorization_ | null> {
|
|
8547
8549
|
this.CheckUserReadPermissions('Authorizations', userPayload);
|
|
8548
8550
|
const sSQL = `SELECT * FROM [admin].[vwAuthorizations] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Authorizations', userPayload, EntityPermissionType.Read, 'AND');
|
|
8549
8551
|
const result = this.MapFieldNamesToCodeNames('Authorizations', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -8558,7 +8560,7 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
8558
8560
|
return result;
|
|
8559
8561
|
}
|
|
8560
8562
|
|
|
8561
|
-
@FieldResolver(() => [AuthorizationRole_])
|
|
8563
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AuthorizationRole_])
|
|
8562
8564
|
async AuthorizationRolesArray(@Root() authorization_: Authorization_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8563
8565
|
this.CheckUserReadPermissions('Authorization Roles', userPayload);
|
|
8564
8566
|
const sSQL = `SELECT * FROM [admin].[vwAuthorizationRoles] WHERE [AuthorizationID]=${authorization_.ID} ` + this.getRowLevelSecurityWhereClause('Authorization Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -8566,7 +8568,7 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
8566
8568
|
return result;
|
|
8567
8569
|
}
|
|
8568
8570
|
|
|
8569
|
-
@FieldResolver(() => [Authorization_])
|
|
8571
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Authorization_])
|
|
8570
8572
|
async AuthorizationsArray(@Root() authorization_: Authorization_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8571
8573
|
this.CheckUserReadPermissions('Authorizations', userPayload);
|
|
8572
8574
|
const sSQL = `SELECT * FROM [admin].[vwAuthorizations] WHERE [ParentID]=${authorization_.ID} ` + this.getRowLevelSecurityWhereClause('Authorizations', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -8574,7 +8576,7 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
8574
8576
|
return result;
|
|
8575
8577
|
}
|
|
8576
8578
|
|
|
8577
|
-
@FieldResolver(() => [AuditLogType_])
|
|
8579
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLogType_])
|
|
8578
8580
|
async AuditLogTypesArray(@Root() authorization_: Authorization_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8579
8581
|
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
8580
8582
|
const sSQL = `SELECT * FROM [admin].[vwAuditLogTypes] WHERE [AuthorizationName]=${authorization_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Log Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -8582,7 +8584,7 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
8582
8584
|
return result;
|
|
8583
8585
|
}
|
|
8584
8586
|
|
|
8585
|
-
@FieldResolver(() => [AuditLog_])
|
|
8587
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
8586
8588
|
async AuditLogsArray(@Root() authorization_: Authorization_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8587
8589
|
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
8588
8590
|
const sSQL = `SELECT * FROM [admin].[vwAuditLogs] WHERE [AuthorizationName]=${authorization_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -8666,7 +8668,7 @@ export class AuthorizationRoleResolver extends ResolverBase {
|
|
|
8666
8668
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
8667
8669
|
}
|
|
8668
8670
|
@Query(() => AuthorizationRole_, { nullable: true })
|
|
8669
|
-
async AuthorizationRole(@Arg('ID', () => Int) ID:
|
|
8671
|
+
async AuthorizationRole(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AuthorizationRole_ | null> {
|
|
8670
8672
|
this.CheckUserReadPermissions('Authorization Roles', userPayload);
|
|
8671
8673
|
const sSQL = `SELECT * FROM [admin].[vwAuthorizationRoles] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Authorization Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
8672
8674
|
const result = this.MapFieldNamesToCodeNames('Authorization Roles', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -8717,11 +8719,11 @@ export class AuditLogType_ {
|
|
|
8717
8719
|
@MaxLength(100)
|
|
8718
8720
|
Parent?: string;
|
|
8719
8721
|
|
|
8720
|
-
@Field(() => [AuditLog_])
|
|
8721
|
-
AuditLogsArray: AuditLog_[]; // Link to AuditLogs
|
|
8722
|
+
@Field(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
8723
|
+
AuditLogsArray: mj_core_schema_server_object_types.AuditLog_[]; // Link to AuditLogs
|
|
8722
8724
|
|
|
8723
|
-
@Field(() => [AuditLogType_])
|
|
8724
|
-
AuditLogTypesArray: AuditLogType_[]; // Link to AuditLogTypes
|
|
8725
|
+
@Field(() => [mj_core_schema_server_object_types.AuditLogType_])
|
|
8726
|
+
AuditLogTypesArray: mj_core_schema_server_object_types.AuditLogType_[]; // Link to AuditLogTypes
|
|
8725
8727
|
|
|
8726
8728
|
}
|
|
8727
8729
|
//****************************************************************************
|
|
@@ -8769,7 +8771,7 @@ export class AuditLogTypeResolver extends ResolverBase {
|
|
|
8769
8771
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
8770
8772
|
}
|
|
8771
8773
|
@Query(() => AuditLogType_, { nullable: true })
|
|
8772
|
-
async AuditLogType(@Arg('ID', () => Int) ID:
|
|
8774
|
+
async AuditLogType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AuditLogType_ | null> {
|
|
8773
8775
|
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
8774
8776
|
const sSQL = `SELECT * FROM [admin].[vwAuditLogTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Audit Log Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
8775
8777
|
const result = this.MapFieldNamesToCodeNames('Audit Log Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -8784,7 +8786,7 @@ export class AuditLogTypeResolver extends ResolverBase {
|
|
|
8784
8786
|
return result;
|
|
8785
8787
|
}
|
|
8786
8788
|
|
|
8787
|
-
@FieldResolver(() => [AuditLog_])
|
|
8789
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLog_])
|
|
8788
8790
|
async AuditLogsArray(@Root() auditlogtype_: AuditLogType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8789
8791
|
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
8790
8792
|
const sSQL = `SELECT * FROM [admin].[vwAuditLogs] WHERE [AuditLogTypeName]=${auditlogtype_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -8792,7 +8794,7 @@ export class AuditLogTypeResolver extends ResolverBase {
|
|
|
8792
8794
|
return result;
|
|
8793
8795
|
}
|
|
8794
8796
|
|
|
8795
|
-
@FieldResolver(() => [AuditLogType_])
|
|
8797
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AuditLogType_])
|
|
8796
8798
|
async AuditLogTypesArray(@Root() auditlogtype_: AuditLogType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8797
8799
|
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
8798
8800
|
const sSQL = `SELECT * FROM [admin].[vwAuditLogTypes] WHERE [ParentID]=${auditlogtype_.ID} ` + this.getRowLevelSecurityWhereClause('Audit Log Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -8889,7 +8891,7 @@ export class EntityFieldValueResolver extends ResolverBase {
|
|
|
8889
8891
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
8890
8892
|
}
|
|
8891
8893
|
@Query(() => EntityFieldValue_, { nullable: true })
|
|
8892
|
-
async EntityFieldValue(@Arg('ID', () => Int) ID:
|
|
8894
|
+
async EntityFieldValue(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityFieldValue_ | null> {
|
|
8893
8895
|
this.CheckUserReadPermissions('Entity Field Values', userPayload);
|
|
8894
8896
|
const sSQL = `SELECT * FROM [admin].[vwEntityFieldValues] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Field Values', userPayload, EntityPermissionType.Read, 'AND');
|
|
8895
8897
|
const result = this.MapFieldNamesToCodeNames('Entity Field Values', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -8947,17 +8949,17 @@ export class AIModel_ {
|
|
|
8947
8949
|
@MaxLength(8)
|
|
8948
8950
|
UpdatedAt: Date;
|
|
8949
8951
|
|
|
8950
|
-
@Field(() => [AIAction_])
|
|
8951
|
-
AIActionsArray: AIAction_[]; // Link to AIActions
|
|
8952
|
+
@Field(() => [mj_core_schema_server_object_types.AIAction_])
|
|
8953
|
+
AIActionsArray: mj_core_schema_server_object_types.AIAction_[]; // Link to AIActions
|
|
8952
8954
|
|
|
8953
|
-
@Field(() => [AIModelAction_])
|
|
8954
|
-
AIModelActionsArray: AIModelAction_[]; // Link to AIModelActions
|
|
8955
|
+
@Field(() => [mj_core_schema_server_object_types.AIModelAction_])
|
|
8956
|
+
AIModelActionsArray: mj_core_schema_server_object_types.AIModelAction_[]; // Link to AIModelActions
|
|
8955
8957
|
|
|
8956
|
-
@Field(() => [EntityAIAction_])
|
|
8957
|
-
EntityAIActionsArray: EntityAIAction_[]; // Link to EntityAIActions
|
|
8958
|
+
@Field(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
8959
|
+
EntityAIActionsArray: mj_core_schema_server_object_types.EntityAIAction_[]; // Link to EntityAIActions
|
|
8958
8960
|
|
|
8959
|
-
@Field(() => [VectorIndex_])
|
|
8960
|
-
VectorIndexesArray: VectorIndex_[]; // Link to VectorIndexes
|
|
8961
|
+
@Field(() => [mj_core_schema_server_object_types.VectorIndex_])
|
|
8962
|
+
VectorIndexesArray: mj_core_schema_server_object_types.VectorIndex_[]; // Link to VectorIndexes
|
|
8961
8963
|
|
|
8962
8964
|
}
|
|
8963
8965
|
|
|
@@ -9036,7 +9038,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9036
9038
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
9037
9039
|
}
|
|
9038
9040
|
@Query(() => AIModel_, { nullable: true })
|
|
9039
|
-
async AIModel(@Arg('ID', () => Int) ID:
|
|
9041
|
+
async AIModel(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIModel_ | null> {
|
|
9040
9042
|
this.CheckUserReadPermissions('AI Models', userPayload);
|
|
9041
9043
|
const sSQL = `SELECT * FROM [admin].[vwAIModels] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('AI Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
9042
9044
|
const result = this.MapFieldNamesToCodeNames('AI Models', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -9051,7 +9053,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9051
9053
|
return result;
|
|
9052
9054
|
}
|
|
9053
9055
|
|
|
9054
|
-
@FieldResolver(() => [AIAction_])
|
|
9056
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AIAction_])
|
|
9055
9057
|
async AIActionsArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9056
9058
|
this.CheckUserReadPermissions('AI Actions', userPayload);
|
|
9057
9059
|
const sSQL = `SELECT * FROM [admin].[vwAIActions] WHERE [DefaultModelID]=${aimodel_.ID} ` + this.getRowLevelSecurityWhereClause('AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -9059,7 +9061,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9059
9061
|
return result;
|
|
9060
9062
|
}
|
|
9061
9063
|
|
|
9062
|
-
@FieldResolver(() => [AIModelAction_])
|
|
9064
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AIModelAction_])
|
|
9063
9065
|
async AIModelActionsArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9064
9066
|
this.CheckUserReadPermissions('AI Model Actions', userPayload);
|
|
9065
9067
|
const sSQL = `SELECT * FROM [admin].[vwAIModelActions] WHERE [AIModelID]=${aimodel_.ID} ` + this.getRowLevelSecurityWhereClause('AI Model Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -9067,7 +9069,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9067
9069
|
return result;
|
|
9068
9070
|
}
|
|
9069
9071
|
|
|
9070
|
-
@FieldResolver(() => [EntityAIAction_])
|
|
9072
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
9071
9073
|
async EntityAIActionsArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9072
9074
|
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
9073
9075
|
const sSQL = `SELECT * FROM [admin].[vwEntityAIActions] WHERE [AIModelID]=${aimodel_.ID} ` + this.getRowLevelSecurityWhereClause('Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -9075,7 +9077,7 @@ export class AIModelResolver extends ResolverBase {
|
|
|
9075
9077
|
return result;
|
|
9076
9078
|
}
|
|
9077
9079
|
|
|
9078
|
-
@FieldResolver(() => [VectorIndex_])
|
|
9080
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.VectorIndex_])
|
|
9079
9081
|
async VectorIndexesArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9080
9082
|
this.CheckUserReadPermissions('Vector Indexes', userPayload);
|
|
9081
9083
|
const sSQL = `SELECT * FROM [admin].[vwVectorIndexes] WHERE [EmbeddingModelID]=${aimodel_.ID} ` + this.getRowLevelSecurityWhereClause('Vector Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -9152,11 +9154,11 @@ export class AIAction_ {
|
|
|
9152
9154
|
@MaxLength(100)
|
|
9153
9155
|
DefaultModel?: string;
|
|
9154
9156
|
|
|
9155
|
-
@Field(() => [AIModelAction_])
|
|
9156
|
-
AIModelActionsArray: AIModelAction_[]; // Link to AIModelActions
|
|
9157
|
+
@Field(() => [mj_core_schema_server_object_types.AIModelAction_])
|
|
9158
|
+
AIModelActionsArray: mj_core_schema_server_object_types.AIModelAction_[]; // Link to AIModelActions
|
|
9157
9159
|
|
|
9158
|
-
@Field(() => [EntityAIAction_])
|
|
9159
|
-
EntityAIActionsArray: EntityAIAction_[]; // Link to EntityAIActions
|
|
9160
|
+
@Field(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
9161
|
+
EntityAIActionsArray: mj_core_schema_server_object_types.EntityAIAction_[]; // Link to EntityAIActions
|
|
9160
9162
|
|
|
9161
9163
|
}
|
|
9162
9164
|
|
|
@@ -9229,7 +9231,7 @@ export class AIActionResolver extends ResolverBase {
|
|
|
9229
9231
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
9230
9232
|
}
|
|
9231
9233
|
@Query(() => AIAction_, { nullable: true })
|
|
9232
|
-
async AIAction(@Arg('ID', () => Int) ID:
|
|
9234
|
+
async AIAction(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIAction_ | null> {
|
|
9233
9235
|
this.CheckUserReadPermissions('AI Actions', userPayload);
|
|
9234
9236
|
const sSQL = `SELECT * FROM [admin].[vwAIActions] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9235
9237
|
const result = this.MapFieldNamesToCodeNames('AI Actions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -9244,7 +9246,7 @@ export class AIActionResolver extends ResolverBase {
|
|
|
9244
9246
|
return result;
|
|
9245
9247
|
}
|
|
9246
9248
|
|
|
9247
|
-
@FieldResolver(() => [AIModelAction_])
|
|
9249
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AIModelAction_])
|
|
9248
9250
|
async AIModelActionsArray(@Root() aiaction_: AIAction_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9249
9251
|
this.CheckUserReadPermissions('AI Model Actions', userPayload);
|
|
9250
9252
|
const sSQL = `SELECT * FROM [admin].[vwAIModelActions] WHERE [AIActionID]=${aiaction_.ID} ` + this.getRowLevelSecurityWhereClause('AI Model Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -9252,7 +9254,7 @@ export class AIActionResolver extends ResolverBase {
|
|
|
9252
9254
|
return result;
|
|
9253
9255
|
}
|
|
9254
9256
|
|
|
9255
|
-
@FieldResolver(() => [EntityAIAction_])
|
|
9257
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityAIAction_])
|
|
9256
9258
|
async EntityAIActionsArray(@Root() aiaction_: AIAction_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9257
9259
|
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
9258
9260
|
const sSQL = `SELECT * FROM [admin].[vwEntityAIActions] WHERE [AIActionID]=${aiaction_.ID} ` + this.getRowLevelSecurityWhereClause('Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -9391,7 +9393,7 @@ export class AIModelActionResolver extends ResolverBase {
|
|
|
9391
9393
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
9392
9394
|
}
|
|
9393
9395
|
@Query(() => AIModelAction_, { nullable: true })
|
|
9394
|
-
async AIModelAction(@Arg('ID', () => Int) ID:
|
|
9396
|
+
async AIModelAction(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIModelAction_ | null> {
|
|
9395
9397
|
this.CheckUserReadPermissions('AI Model Actions', userPayload);
|
|
9396
9398
|
const sSQL = `SELECT * FROM [admin].[vwAIModelActions] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('AI Model Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9397
9399
|
const result = this.MapFieldNamesToCodeNames('AI Model Actions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -9595,7 +9597,7 @@ export class EntityAIActionResolver extends ResolverBase {
|
|
|
9595
9597
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
9596
9598
|
}
|
|
9597
9599
|
@Query(() => EntityAIAction_, { nullable: true })
|
|
9598
|
-
async EntityAIAction(@Arg('ID', () => Int) ID:
|
|
9600
|
+
async EntityAIAction(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityAIAction_ | null> {
|
|
9599
9601
|
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
9600
9602
|
const sSQL = `SELECT * FROM [admin].[vwEntityAIActions] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9601
9603
|
const result = this.MapFieldNamesToCodeNames('Entity AI Actions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -9658,8 +9660,8 @@ export class AIModelType_ {
|
|
|
9658
9660
|
@Field({nullable: true})
|
|
9659
9661
|
Description?: string;
|
|
9660
9662
|
|
|
9661
|
-
@Field(() => [AIModel_])
|
|
9662
|
-
AIModelsArray: AIModel_[]; // Link to AIModels
|
|
9663
|
+
@Field(() => [mj_core_schema_server_object_types.AIModel_])
|
|
9664
|
+
AIModelsArray: mj_core_schema_server_object_types.AIModel_[]; // Link to AIModels
|
|
9663
9665
|
|
|
9664
9666
|
}
|
|
9665
9667
|
|
|
@@ -9723,7 +9725,7 @@ export class AIModelTypeResolver extends ResolverBase {
|
|
|
9723
9725
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
9724
9726
|
}
|
|
9725
9727
|
@Query(() => AIModelType_, { nullable: true })
|
|
9726
|
-
async AIModelType(@Arg('ID', () => Int) ID:
|
|
9728
|
+
async AIModelType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIModelType_ | null> {
|
|
9727
9729
|
this.CheckUserReadPermissions('AI Model Types', userPayload);
|
|
9728
9730
|
const sSQL = `SELECT * FROM [admin].[vwAIModelTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('AI Model Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
9729
9731
|
const result = this.MapFieldNamesToCodeNames('AI Model Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -9738,7 +9740,7 @@ export class AIModelTypeResolver extends ResolverBase {
|
|
|
9738
9740
|
return result;
|
|
9739
9741
|
}
|
|
9740
9742
|
|
|
9741
|
-
@FieldResolver(() => [AIModel_])
|
|
9743
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.AIModel_])
|
|
9742
9744
|
async AIModelsArray(@Root() aimodeltype_: AIModelType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9743
9745
|
this.CheckUserReadPermissions('AI Models', userPayload);
|
|
9744
9746
|
const sSQL = `SELECT * FROM [admin].[vwAIModels] WHERE [AIModelTypeID]=${aimodeltype_.ID} ` + this.getRowLevelSecurityWhereClause('AI Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -9805,8 +9807,8 @@ export class QueueType_ {
|
|
|
9805
9807
|
@Field(() => Boolean)
|
|
9806
9808
|
IsActive: boolean;
|
|
9807
9809
|
|
|
9808
|
-
@Field(() => [Queue_])
|
|
9809
|
-
QueuesArray: Queue_[]; // Link to Queues
|
|
9810
|
+
@Field(() => [mj_core_schema_server_object_types.Queue_])
|
|
9811
|
+
QueuesArray: mj_core_schema_server_object_types.Queue_[]; // Link to Queues
|
|
9810
9812
|
|
|
9811
9813
|
}
|
|
9812
9814
|
//****************************************************************************
|
|
@@ -9854,14 +9856,14 @@ export class QueueTypeResolver extends ResolverBase {
|
|
|
9854
9856
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
9855
9857
|
}
|
|
9856
9858
|
@Query(() => QueueType_, { nullable: true })
|
|
9857
|
-
async QueueType(@Arg('ID', () => Int) ID:
|
|
9859
|
+
async QueueType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<QueueType_ | null> {
|
|
9858
9860
|
this.CheckUserReadPermissions('Queue Types', userPayload);
|
|
9859
9861
|
const sSQL = `SELECT * FROM [admin].[vwQueueTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Queue Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
9860
9862
|
const result = this.MapFieldNamesToCodeNames('Queue Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
9861
9863
|
return result;
|
|
9862
9864
|
}
|
|
9863
9865
|
|
|
9864
|
-
@FieldResolver(() => [Queue_])
|
|
9866
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Queue_])
|
|
9865
9867
|
async QueuesArray(@Root() queuetype_: QueueType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9866
9868
|
this.CheckUserReadPermissions('Queues', userPayload);
|
|
9867
9869
|
const sSQL = `SELECT * FROM [admin].[vwQueues] WHERE [QueueTypeID]=${queuetype_.ID} ` + this.getRowLevelSecurityWhereClause('Queues', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -9951,8 +9953,8 @@ export class Queue_ {
|
|
|
9951
9953
|
@MaxLength(100)
|
|
9952
9954
|
QueueType: string;
|
|
9953
9955
|
|
|
9954
|
-
@Field(() => [QueueTask_])
|
|
9955
|
-
QueueTasksArray: QueueTask_[]; // Link to QueueTasks
|
|
9956
|
+
@Field(() => [mj_core_schema_server_object_types.QueueTask_])
|
|
9957
|
+
QueueTasksArray: mj_core_schema_server_object_types.QueueTask_[]; // Link to QueueTasks
|
|
9956
9958
|
|
|
9957
9959
|
}
|
|
9958
9960
|
|
|
@@ -10113,14 +10115,14 @@ export class QueueResolver extends ResolverBase {
|
|
|
10113
10115
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
10114
10116
|
}
|
|
10115
10117
|
@Query(() => Queue_, { nullable: true })
|
|
10116
|
-
async Queue(@Arg('ID', () => Int) ID:
|
|
10118
|
+
async Queue(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Queue_ | null> {
|
|
10117
10119
|
this.CheckUserReadPermissions('Queues', userPayload);
|
|
10118
10120
|
const sSQL = `SELECT * FROM [admin].[vwQueues] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Queues', userPayload, EntityPermissionType.Read, 'AND');
|
|
10119
10121
|
const result = this.MapFieldNamesToCodeNames('Queues', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
10120
10122
|
return result;
|
|
10121
10123
|
}
|
|
10122
10124
|
|
|
10123
|
-
@FieldResolver(() => [QueueTask_])
|
|
10125
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.QueueTask_])
|
|
10124
10126
|
async QueueTasksArray(@Root() queue_: Queue_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10125
10127
|
this.CheckUserReadPermissions('Queue Tasks', userPayload);
|
|
10126
10128
|
const sSQL = `SELECT * FROM [admin].[vwQueueTasks] WHERE [QueueID]=${queue_.ID} ` + this.getRowLevelSecurityWhereClause('Queue Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -10346,7 +10348,7 @@ export class QueueTaskResolver extends ResolverBase {
|
|
|
10346
10348
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
10347
10349
|
}
|
|
10348
10350
|
@Query(() => QueueTask_, { nullable: true })
|
|
10349
|
-
async QueueTask(@Arg('ID', () => Int) ID:
|
|
10351
|
+
async QueueTask(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<QueueTask_ | null> {
|
|
10350
10352
|
this.CheckUserReadPermissions('Queue Tasks', userPayload);
|
|
10351
10353
|
const sSQL = `SELECT * FROM [admin].[vwQueueTasks] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Queue Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
10352
10354
|
const result = this.MapFieldNamesToCodeNames('Queue Tasks', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -10541,7 +10543,7 @@ export class DashboardResolver extends ResolverBase {
|
|
|
10541
10543
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
10542
10544
|
}
|
|
10543
10545
|
@Query(() => Dashboard_, { nullable: true })
|
|
10544
|
-
async Dashboard(@Arg('ID', () => Int) ID:
|
|
10546
|
+
async Dashboard(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Dashboard_ | null> {
|
|
10545
10547
|
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
10546
10548
|
const sSQL = `SELECT * FROM [admin].[vwDashboards] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
10547
10549
|
this.createRecordAccessAuditLogRecord(userPayload, 'Dashboards', ID)
|
|
@@ -10611,7 +10613,7 @@ export class DashboardResolver extends ResolverBase {
|
|
|
10611
10613
|
}
|
|
10612
10614
|
|
|
10613
10615
|
@Mutation(() => Dashboard_)
|
|
10614
|
-
async DeleteDashboard(@Arg('ID', () => Int) ID:
|
|
10616
|
+
async DeleteDashboard(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10615
10617
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
10616
10618
|
const entityObject = <DashboardEntity>await new Metadata().GetEntityObject('Dashboards', this.GetUserFromPayload(userPayload));
|
|
10617
10619
|
await entityObject.Load(ID);
|
|
@@ -10628,11 +10630,11 @@ export class DashboardResolver extends ResolverBase {
|
|
|
10628
10630
|
}
|
|
10629
10631
|
|
|
10630
10632
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
10631
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
10633
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
10632
10634
|
const i = ID, d = dataSource; // prevent error;
|
|
10633
10635
|
return true;
|
|
10634
10636
|
}
|
|
10635
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
10637
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
10636
10638
|
const i = ID, d = dataSource; // prevent error
|
|
10637
10639
|
}
|
|
10638
10640
|
|
|
@@ -10653,8 +10655,8 @@ export class OutputTriggerType_ {
|
|
|
10653
10655
|
@Field({nullable: true})
|
|
10654
10656
|
Description?: string;
|
|
10655
10657
|
|
|
10656
|
-
@Field(() => [Report_])
|
|
10657
|
-
ReportsArray: Report_[]; // Link to Reports
|
|
10658
|
+
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
10659
|
+
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
10658
10660
|
|
|
10659
10661
|
}
|
|
10660
10662
|
//****************************************************************************
|
|
@@ -10702,7 +10704,7 @@ export class OutputTriggerTypeResolver extends ResolverBase {
|
|
|
10702
10704
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
10703
10705
|
}
|
|
10704
10706
|
@Query(() => OutputTriggerType_, { nullable: true })
|
|
10705
|
-
async OutputTriggerType(@Arg('ID', () => Int) ID:
|
|
10707
|
+
async OutputTriggerType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<OutputTriggerType_ | null> {
|
|
10706
10708
|
this.CheckUserReadPermissions('Output Trigger Types', userPayload);
|
|
10707
10709
|
const sSQL = `SELECT * FROM [admin].[vwOutputTriggerTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Output Trigger Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
10708
10710
|
this.createRecordAccessAuditLogRecord(userPayload, 'Output Trigger Types', ID)
|
|
@@ -10710,7 +10712,7 @@ export class OutputTriggerTypeResolver extends ResolverBase {
|
|
|
10710
10712
|
return result;
|
|
10711
10713
|
}
|
|
10712
10714
|
|
|
10713
|
-
@FieldResolver(() => [Report_])
|
|
10715
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Report_])
|
|
10714
10716
|
async ReportsArray(@Root() outputtriggertype_: OutputTriggerType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10715
10717
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
10716
10718
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [OutputTriggerTypeID]=${outputtriggertype_.ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -10738,8 +10740,8 @@ export class OutputFormatType_ {
|
|
|
10738
10740
|
@Field({nullable: true})
|
|
10739
10741
|
DisplayFormat?: string;
|
|
10740
10742
|
|
|
10741
|
-
@Field(() => [Report_])
|
|
10742
|
-
ReportsArray: Report_[]; // Link to Reports
|
|
10743
|
+
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
10744
|
+
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
10743
10745
|
|
|
10744
10746
|
}
|
|
10745
10747
|
//****************************************************************************
|
|
@@ -10787,7 +10789,7 @@ export class OutputFormatTypeResolver extends ResolverBase {
|
|
|
10787
10789
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
10788
10790
|
}
|
|
10789
10791
|
@Query(() => OutputFormatType_, { nullable: true })
|
|
10790
|
-
async OutputFormatType(@Arg('ID', () => Int) ID:
|
|
10792
|
+
async OutputFormatType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<OutputFormatType_ | null> {
|
|
10791
10793
|
this.CheckUserReadPermissions('Output Format Types', userPayload);
|
|
10792
10794
|
const sSQL = `SELECT * FROM [admin].[vwOutputFormatTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Output Format Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
10793
10795
|
this.createRecordAccessAuditLogRecord(userPayload, 'Output Format Types', ID)
|
|
@@ -10795,7 +10797,7 @@ export class OutputFormatTypeResolver extends ResolverBase {
|
|
|
10795
10797
|
return result;
|
|
10796
10798
|
}
|
|
10797
10799
|
|
|
10798
|
-
@FieldResolver(() => [Report_])
|
|
10800
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Report_])
|
|
10799
10801
|
async ReportsArray(@Root() outputformattype_: OutputFormatType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10800
10802
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
10801
10803
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [OutputFormatTypeID]=${outputformattype_.ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -10820,8 +10822,8 @@ export class OutputDeliveryType_ {
|
|
|
10820
10822
|
@Field({nullable: true})
|
|
10821
10823
|
Description?: string;
|
|
10822
10824
|
|
|
10823
|
-
@Field(() => [Report_])
|
|
10824
|
-
ReportsArray: Report_[]; // Link to Reports
|
|
10825
|
+
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
10826
|
+
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
10825
10827
|
|
|
10826
10828
|
}
|
|
10827
10829
|
//****************************************************************************
|
|
@@ -10869,7 +10871,7 @@ export class OutputDeliveryTypeResolver extends ResolverBase {
|
|
|
10869
10871
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
10870
10872
|
}
|
|
10871
10873
|
@Query(() => OutputDeliveryType_, { nullable: true })
|
|
10872
|
-
async OutputDeliveryType(@Arg('ID', () => Int) ID:
|
|
10874
|
+
async OutputDeliveryType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<OutputDeliveryType_ | null> {
|
|
10873
10875
|
this.CheckUserReadPermissions('Output Delivery Types', userPayload);
|
|
10874
10876
|
const sSQL = `SELECT * FROM [admin].[vwOutputDeliveryTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Output Delivery Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
10875
10877
|
this.createRecordAccessAuditLogRecord(userPayload, 'Output Delivery Types', ID)
|
|
@@ -10877,7 +10879,7 @@ export class OutputDeliveryTypeResolver extends ResolverBase {
|
|
|
10877
10879
|
return result;
|
|
10878
10880
|
}
|
|
10879
10881
|
|
|
10880
|
-
@FieldResolver(() => [Report_])
|
|
10882
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Report_])
|
|
10881
10883
|
async ReportsArray(@Root() outputdeliverytype_: OutputDeliveryType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10882
10884
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
10883
10885
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [OutputDeliveryTypeID]=${outputdeliverytype_.ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -10987,8 +10989,8 @@ export class Report_ {
|
|
|
10987
10989
|
@MaxLength(510)
|
|
10988
10990
|
OutputEvent?: string;
|
|
10989
10991
|
|
|
10990
|
-
@Field(() => [ReportSnapshot_])
|
|
10991
|
-
ReportSnapshotsArray: ReportSnapshot_[]; // Link to ReportSnapshots
|
|
10992
|
+
@Field(() => [mj_core_schema_server_object_types.ReportSnapshot_])
|
|
10993
|
+
ReportSnapshotsArray: mj_core_schema_server_object_types.ReportSnapshot_[]; // Link to ReportSnapshots
|
|
10992
10994
|
|
|
10993
10995
|
}
|
|
10994
10996
|
|
|
@@ -11149,14 +11151,14 @@ export class ReportResolver extends ResolverBase {
|
|
|
11149
11151
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
11150
11152
|
}
|
|
11151
11153
|
@Query(() => Report_, { nullable: true })
|
|
11152
|
-
async Report(@Arg('ID', () => Int) ID:
|
|
11154
|
+
async Report(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Report_ | null> {
|
|
11153
11155
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
11154
11156
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
11155
11157
|
const result = this.MapFieldNamesToCodeNames('Reports', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
11156
11158
|
return result;
|
|
11157
11159
|
}
|
|
11158
11160
|
|
|
11159
|
-
@FieldResolver(() => [ReportSnapshot_])
|
|
11161
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ReportSnapshot_])
|
|
11160
11162
|
async ReportSnapshotsArray(@Root() report_: Report_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11161
11163
|
this.CheckUserReadPermissions('Report Snapshots', userPayload);
|
|
11162
11164
|
const sSQL = `SELECT * FROM [admin].[vwReportSnapshots] WHERE [ReportID]=${report_.ID} ` + this.getRowLevelSecurityWhereClause('Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -11226,7 +11228,7 @@ export class ReportResolver extends ResolverBase {
|
|
|
11226
11228
|
}
|
|
11227
11229
|
|
|
11228
11230
|
@Mutation(() => Report_)
|
|
11229
|
-
async DeleteReport(@Arg('ID', () => Int) ID:
|
|
11231
|
+
async DeleteReport(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11230
11232
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
11231
11233
|
const entityObject = <ReportEntity>await new Metadata().GetEntityObject('Reports', this.GetUserFromPayload(userPayload));
|
|
11232
11234
|
await entityObject.Load(ID);
|
|
@@ -11243,11 +11245,11 @@ export class ReportResolver extends ResolverBase {
|
|
|
11243
11245
|
}
|
|
11244
11246
|
|
|
11245
11247
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
11246
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
11248
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
11247
11249
|
const i = ID, d = dataSource; // prevent error;
|
|
11248
11250
|
return true;
|
|
11249
11251
|
}
|
|
11250
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
11252
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
11251
11253
|
const i = ID, d = dataSource; // prevent error
|
|
11252
11254
|
}
|
|
11253
11255
|
|
|
@@ -11363,7 +11365,7 @@ export class ReportSnapshotResolver extends ResolverBase {
|
|
|
11363
11365
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
11364
11366
|
}
|
|
11365
11367
|
@Query(() => ReportSnapshot_, { nullable: true })
|
|
11366
|
-
async ReportSnapshot(@Arg('ID', () => Int) ID:
|
|
11368
|
+
async ReportSnapshot(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ReportSnapshot_ | null> {
|
|
11367
11369
|
this.CheckUserReadPermissions('Report Snapshots', userPayload);
|
|
11368
11370
|
const sSQL = `SELECT * FROM [admin].[vwReportSnapshots] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
11369
11371
|
const result = this.MapFieldNamesToCodeNames('Report Snapshots', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -11432,7 +11434,7 @@ export class ReportSnapshotResolver extends ResolverBase {
|
|
|
11432
11434
|
}
|
|
11433
11435
|
|
|
11434
11436
|
@Mutation(() => ReportSnapshot_)
|
|
11435
|
-
async DeleteReportSnapshot(@Arg('ID', () => Int) ID:
|
|
11437
|
+
async DeleteReportSnapshot(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11436
11438
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
11437
11439
|
const entityObject = <ReportSnapshotEntity>await new Metadata().GetEntityObject('Report Snapshots', this.GetUserFromPayload(userPayload));
|
|
11438
11440
|
await entityObject.Load(ID);
|
|
@@ -11449,11 +11451,11 @@ export class ReportSnapshotResolver extends ResolverBase {
|
|
|
11449
11451
|
}
|
|
11450
11452
|
|
|
11451
11453
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
11452
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
11454
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
11453
11455
|
const i = ID, d = dataSource; // prevent error;
|
|
11454
11456
|
return true;
|
|
11455
11457
|
}
|
|
11456
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
11458
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
11457
11459
|
const i = ID, d = dataSource; // prevent error
|
|
11458
11460
|
}
|
|
11459
11461
|
|
|
@@ -11497,8 +11499,8 @@ export class ResourceType_ {
|
|
|
11497
11499
|
@MaxLength(510)
|
|
11498
11500
|
Entity?: string;
|
|
11499
11501
|
|
|
11500
|
-
@Field(() => [WorkspaceItem_])
|
|
11501
|
-
WorkspaceItemsArray: WorkspaceItem_[]; // Link to WorkspaceItems
|
|
11502
|
+
@Field(() => [mj_core_schema_server_object_types.WorkspaceItem_])
|
|
11503
|
+
WorkspaceItemsArray: mj_core_schema_server_object_types.WorkspaceItem_[]; // Link to WorkspaceItems
|
|
11502
11504
|
|
|
11503
11505
|
}
|
|
11504
11506
|
//****************************************************************************
|
|
@@ -11546,7 +11548,7 @@ export class ResourceTypeResolver extends ResolverBase {
|
|
|
11546
11548
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
11547
11549
|
}
|
|
11548
11550
|
@Query(() => ResourceType_, { nullable: true })
|
|
11549
|
-
async ResourceType(@Arg('ID', () => Int) ID:
|
|
11551
|
+
async ResourceType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ResourceType_ | null> {
|
|
11550
11552
|
this.CheckUserReadPermissions('Resource Types', userPayload);
|
|
11551
11553
|
const sSQL = `SELECT * FROM [admin].[vwResourceTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Resource Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
11552
11554
|
this.createRecordAccessAuditLogRecord(userPayload, 'Resource Types', ID)
|
|
@@ -11554,7 +11556,7 @@ export class ResourceTypeResolver extends ResolverBase {
|
|
|
11554
11556
|
return result;
|
|
11555
11557
|
}
|
|
11556
11558
|
|
|
11557
|
-
@FieldResolver(() => [WorkspaceItem_])
|
|
11559
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.WorkspaceItem_])
|
|
11558
11560
|
async WorkspaceItemsArray(@Root() resourcetype_: ResourceType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11559
11561
|
this.CheckUserReadPermissions('Workspace Items', userPayload);
|
|
11560
11562
|
const sSQL = `SELECT * FROM [admin].[vwWorkspaceItems] WHERE [ResourceTypeID]=${resourcetype_.ID} ` + this.getRowLevelSecurityWhereClause('Workspace Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -11590,11 +11592,11 @@ export class Tag_ {
|
|
|
11590
11592
|
@MaxLength(510)
|
|
11591
11593
|
Parent?: string;
|
|
11592
11594
|
|
|
11593
|
-
@Field(() => [Tag_])
|
|
11594
|
-
TagsArray: Tag_[]; // Link to Tags
|
|
11595
|
+
@Field(() => [mj_core_schema_server_object_types.Tag_])
|
|
11596
|
+
TagsArray: mj_core_schema_server_object_types.Tag_[]; // Link to Tags
|
|
11595
11597
|
|
|
11596
|
-
@Field(() => [TaggedItem_])
|
|
11597
|
-
TaggedItemsArray: TaggedItem_[]; // Link to TaggedItems
|
|
11598
|
+
@Field(() => [mj_core_schema_server_object_types.TaggedItem_])
|
|
11599
|
+
TaggedItemsArray: mj_core_schema_server_object_types.TaggedItem_[]; // Link to TaggedItems
|
|
11598
11600
|
|
|
11599
11601
|
}
|
|
11600
11602
|
//****************************************************************************
|
|
@@ -11642,7 +11644,7 @@ export class TagResolver extends ResolverBase {
|
|
|
11642
11644
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
11643
11645
|
}
|
|
11644
11646
|
@Query(() => Tag_, { nullable: true })
|
|
11645
|
-
async Tag(@Arg('ID', () => Int) ID:
|
|
11647
|
+
async Tag(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Tag_ | null> {
|
|
11646
11648
|
this.CheckUserReadPermissions('Tags', userPayload);
|
|
11647
11649
|
const sSQL = `SELECT * FROM [admin].[vwTags] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Tags', userPayload, EntityPermissionType.Read, 'AND');
|
|
11648
11650
|
this.createRecordAccessAuditLogRecord(userPayload, 'Tags', ID)
|
|
@@ -11650,7 +11652,7 @@ export class TagResolver extends ResolverBase {
|
|
|
11650
11652
|
return result;
|
|
11651
11653
|
}
|
|
11652
11654
|
|
|
11653
|
-
@FieldResolver(() => [Tag_])
|
|
11655
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Tag_])
|
|
11654
11656
|
async TagsArray(@Root() tag_: Tag_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11655
11657
|
this.CheckUserReadPermissions('Tags', userPayload);
|
|
11656
11658
|
const sSQL = `SELECT * FROM [admin].[vwTags] WHERE [ParentID]=${tag_.ID} ` + this.getRowLevelSecurityWhereClause('Tags', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -11658,7 +11660,7 @@ export class TagResolver extends ResolverBase {
|
|
|
11658
11660
|
return result;
|
|
11659
11661
|
}
|
|
11660
11662
|
|
|
11661
|
-
@FieldResolver(() => [TaggedItem_])
|
|
11663
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.TaggedItem_])
|
|
11662
11664
|
async TaggedItemsArray(@Root() tag_: Tag_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11663
11665
|
this.CheckUserReadPermissions('Tagged Items', userPayload);
|
|
11664
11666
|
const sSQL = `SELECT * FROM [admin].[vwTaggedItems] WHERE [TagID]=${tag_.ID} ` + this.getRowLevelSecurityWhereClause('Tagged Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -11736,7 +11738,7 @@ export class TaggedItemResolver extends ResolverBase {
|
|
|
11736
11738
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
11737
11739
|
}
|
|
11738
11740
|
@Query(() => TaggedItem_, { nullable: true })
|
|
11739
|
-
async TaggedItem(@Arg('ID', () => Int) ID:
|
|
11741
|
+
async TaggedItem(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<TaggedItem_ | null> {
|
|
11740
11742
|
this.CheckUserReadPermissions('Tagged Items', userPayload);
|
|
11741
11743
|
const sSQL = `SELECT * FROM [admin].[vwTaggedItems] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Tagged Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
11742
11744
|
this.createRecordAccessAuditLogRecord(userPayload, 'Tagged Items', ID)
|
|
@@ -11768,8 +11770,8 @@ export class Workspace_ {
|
|
|
11768
11770
|
@MaxLength(200)
|
|
11769
11771
|
User: string;
|
|
11770
11772
|
|
|
11771
|
-
@Field(() => [WorkspaceItem_])
|
|
11772
|
-
WorkspaceItemsArray: WorkspaceItem_[]; // Link to WorkspaceItems
|
|
11773
|
+
@Field(() => [mj_core_schema_server_object_types.WorkspaceItem_])
|
|
11774
|
+
WorkspaceItemsArray: mj_core_schema_server_object_types.WorkspaceItem_[]; // Link to WorkspaceItems
|
|
11773
11775
|
|
|
11774
11776
|
}
|
|
11775
11777
|
|
|
@@ -11852,7 +11854,7 @@ export class WorkspaceResolver extends ResolverBase {
|
|
|
11852
11854
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
11853
11855
|
}
|
|
11854
11856
|
@Query(() => Workspace_, { nullable: true })
|
|
11855
|
-
async Workspace(@Arg('ID', () => Int) ID:
|
|
11857
|
+
async Workspace(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Workspace_ | null> {
|
|
11856
11858
|
this.CheckUserReadPermissions('Workspaces', userPayload);
|
|
11857
11859
|
const sSQL = `SELECT * FROM [admin].[vwWorkspaces] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Workspaces', userPayload, EntityPermissionType.Read, 'AND');
|
|
11858
11860
|
this.createRecordAccessAuditLogRecord(userPayload, 'Workspaces', ID)
|
|
@@ -11860,7 +11862,7 @@ export class WorkspaceResolver extends ResolverBase {
|
|
|
11860
11862
|
return result;
|
|
11861
11863
|
}
|
|
11862
11864
|
|
|
11863
|
-
@FieldResolver(() => [WorkspaceItem_])
|
|
11865
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.WorkspaceItem_])
|
|
11864
11866
|
async WorkspaceItemsArray(@Root() workspace_: Workspace_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11865
11867
|
this.CheckUserReadPermissions('Workspace Items', userPayload);
|
|
11866
11868
|
const sSQL = `SELECT * FROM [admin].[vwWorkspaceItems] WHERE [WorkSpaceID]=${workspace_.ID} ` + this.getRowLevelSecurityWhereClause('Workspace Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -11930,7 +11932,7 @@ export class WorkspaceResolver extends ResolverBase {
|
|
|
11930
11932
|
}
|
|
11931
11933
|
|
|
11932
11934
|
@Mutation(() => Workspace_)
|
|
11933
|
-
async DeleteWorkspace(@Arg('ID', () => Int) ID:
|
|
11935
|
+
async DeleteWorkspace(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11934
11936
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
11935
11937
|
const entityObject = <WorkspaceEntity>await new Metadata().GetEntityObject('Workspaces', this.GetUserFromPayload(userPayload));
|
|
11936
11938
|
await entityObject.Load(ID);
|
|
@@ -11947,11 +11949,11 @@ export class WorkspaceResolver extends ResolverBase {
|
|
|
11947
11949
|
}
|
|
11948
11950
|
|
|
11949
11951
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
11950
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
11952
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
11951
11953
|
const i = ID, d = dataSource; // prevent error;
|
|
11952
11954
|
return true;
|
|
11953
11955
|
}
|
|
11954
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
11956
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
11955
11957
|
const i = ID, d = dataSource; // prevent error
|
|
11956
11958
|
}
|
|
11957
11959
|
|
|
@@ -12101,7 +12103,7 @@ export class WorkspaceItemResolver extends ResolverBase {
|
|
|
12101
12103
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
12102
12104
|
}
|
|
12103
12105
|
@Query(() => WorkspaceItem_, { nullable: true })
|
|
12104
|
-
async WorkspaceItem(@Arg('ID', () => Int) ID:
|
|
12106
|
+
async WorkspaceItem(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<WorkspaceItem_ | null> {
|
|
12105
12107
|
this.CheckUserReadPermissions('Workspace Items', userPayload);
|
|
12106
12108
|
const sSQL = `SELECT * FROM [admin].[vwWorkspaceItems] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Workspace Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
12107
12109
|
this.createRecordAccessAuditLogRecord(userPayload, 'Workspace Items', ID)
|
|
@@ -12171,7 +12173,7 @@ export class WorkspaceItemResolver extends ResolverBase {
|
|
|
12171
12173
|
}
|
|
12172
12174
|
|
|
12173
12175
|
@Mutation(() => WorkspaceItem_)
|
|
12174
|
-
async DeleteWorkspaceItem(@Arg('ID', () => Int) ID:
|
|
12176
|
+
async DeleteWorkspaceItem(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12175
12177
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
12176
12178
|
const entityObject = <WorkspaceItemEntity>await new Metadata().GetEntityObject('Workspace Items', this.GetUserFromPayload(userPayload));
|
|
12177
12179
|
await entityObject.Load(ID);
|
|
@@ -12188,11 +12190,11 @@ export class WorkspaceItemResolver extends ResolverBase {
|
|
|
12188
12190
|
}
|
|
12189
12191
|
|
|
12190
12192
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
12191
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
12193
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
12192
12194
|
const i = ID, d = dataSource; // prevent error;
|
|
12193
12195
|
return true;
|
|
12194
12196
|
}
|
|
12195
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
12197
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
12196
12198
|
const i = ID, d = dataSource; // prevent error
|
|
12197
12199
|
}
|
|
12198
12200
|
|
|
@@ -12221,8 +12223,8 @@ export class Dataset_ {
|
|
|
12221
12223
|
@MaxLength(8)
|
|
12222
12224
|
UpdatedAt: Date;
|
|
12223
12225
|
|
|
12224
|
-
@Field(() => [DatasetItem_])
|
|
12225
|
-
DatasetItemsArray: DatasetItem_[]; // Link to DatasetItems
|
|
12226
|
+
@Field(() => [mj_core_schema_server_object_types.DatasetItem_])
|
|
12227
|
+
DatasetItemsArray: mj_core_schema_server_object_types.DatasetItem_[]; // Link to DatasetItems
|
|
12226
12228
|
|
|
12227
12229
|
}
|
|
12228
12230
|
//****************************************************************************
|
|
@@ -12270,14 +12272,14 @@ export class DatasetResolver extends ResolverBase {
|
|
|
12270
12272
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
12271
12273
|
}
|
|
12272
12274
|
@Query(() => Dataset_, { nullable: true })
|
|
12273
|
-
async Dataset(@Arg('ID', () => Int) ID:
|
|
12275
|
+
async Dataset(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Dataset_ | null> {
|
|
12274
12276
|
this.CheckUserReadPermissions('Datasets', userPayload);
|
|
12275
12277
|
const sSQL = `SELECT * FROM [admin].[vwDatasets] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Datasets', userPayload, EntityPermissionType.Read, 'AND');
|
|
12276
12278
|
const result = this.MapFieldNamesToCodeNames('Datasets', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
12277
12279
|
return result;
|
|
12278
12280
|
}
|
|
12279
12281
|
|
|
12280
|
-
@FieldResolver(() => [DatasetItem_])
|
|
12282
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.DatasetItem_])
|
|
12281
12283
|
async DatasetItemsArray(@Root() dataset_: Dataset_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12282
12284
|
this.CheckUserReadPermissions('Dataset Items', userPayload);
|
|
12283
12285
|
const sSQL = `SELECT * FROM [admin].[vwDatasetItems] WHERE [DatasetName]=${dataset_.ID} ` + this.getRowLevelSecurityWhereClause('Dataset Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -12377,7 +12379,7 @@ export class DatasetItemResolver extends ResolverBase {
|
|
|
12377
12379
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
12378
12380
|
}
|
|
12379
12381
|
@Query(() => DatasetItem_, { nullable: true })
|
|
12380
|
-
async DatasetItem(@Arg('ID', () => Int) ID:
|
|
12382
|
+
async DatasetItem(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<DatasetItem_ | null> {
|
|
12381
12383
|
this.CheckUserReadPermissions('Dataset Items', userPayload);
|
|
12382
12384
|
const sSQL = `SELECT * FROM [admin].[vwDatasetItems] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Dataset Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
12383
12385
|
const result = this.MapFieldNamesToCodeNames('Dataset Items', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -12426,8 +12428,8 @@ export class ConversationDetail_ {
|
|
|
12426
12428
|
@MaxLength(200)
|
|
12427
12429
|
Conversation?: string;
|
|
12428
12430
|
|
|
12429
|
-
@Field(() => [Report_])
|
|
12430
|
-
ReportsArray: Report_[]; // Link to Reports
|
|
12431
|
+
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
12432
|
+
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
12431
12433
|
|
|
12432
12434
|
}
|
|
12433
12435
|
|
|
@@ -12528,14 +12530,14 @@ export class ConversationDetailResolver extends ResolverBase {
|
|
|
12528
12530
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
12529
12531
|
}
|
|
12530
12532
|
@Query(() => ConversationDetail_, { nullable: true })
|
|
12531
|
-
async ConversationDetail(@Arg('ID', () => Int) ID:
|
|
12533
|
+
async ConversationDetail(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ConversationDetail_ | null> {
|
|
12532
12534
|
this.CheckUserReadPermissions('Conversation Details', userPayload);
|
|
12533
12535
|
const sSQL = `SELECT * FROM [admin].[vwConversationDetails] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
12534
12536
|
const result = this.MapFieldNamesToCodeNames('Conversation Details', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
12535
12537
|
return result;
|
|
12536
12538
|
}
|
|
12537
12539
|
|
|
12538
|
-
@FieldResolver(() => [Report_])
|
|
12540
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Report_])
|
|
12539
12541
|
async ReportsArray(@Root() conversationdetail_: ConversationDetail_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12540
12542
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
12541
12543
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [ConversationDetailID]=${conversationdetail_.ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -12605,7 +12607,7 @@ export class ConversationDetailResolver extends ResolverBase {
|
|
|
12605
12607
|
}
|
|
12606
12608
|
|
|
12607
12609
|
@Mutation(() => ConversationDetail_)
|
|
12608
|
-
async DeleteConversationDetail(@Arg('ID', () => Int) ID:
|
|
12610
|
+
async DeleteConversationDetail(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12609
12611
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
12610
12612
|
const entityObject = <ConversationDetailEntity>await new Metadata().GetEntityObject('Conversation Details', this.GetUserFromPayload(userPayload));
|
|
12611
12613
|
await entityObject.Load(ID);
|
|
@@ -12622,11 +12624,11 @@ export class ConversationDetailResolver extends ResolverBase {
|
|
|
12622
12624
|
}
|
|
12623
12625
|
|
|
12624
12626
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
12625
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
12627
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
12626
12628
|
const i = ID, d = dataSource; // prevent error;
|
|
12627
12629
|
return true;
|
|
12628
12630
|
}
|
|
12629
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
12631
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
12630
12632
|
const i = ID, d = dataSource; // prevent error
|
|
12631
12633
|
}
|
|
12632
12634
|
|
|
@@ -12686,11 +12688,11 @@ export class Conversation_ {
|
|
|
12686
12688
|
@MaxLength(510)
|
|
12687
12689
|
LinkedEntity?: string;
|
|
12688
12690
|
|
|
12689
|
-
@Field(() => [ConversationDetail_])
|
|
12690
|
-
ConversationDetailsArray: ConversationDetail_[]; // Link to ConversationDetails
|
|
12691
|
+
@Field(() => [mj_core_schema_server_object_types.ConversationDetail_])
|
|
12692
|
+
ConversationDetailsArray: mj_core_schema_server_object_types.ConversationDetail_[]; // Link to ConversationDetails
|
|
12691
12693
|
|
|
12692
|
-
@Field(() => [Report_])
|
|
12693
|
-
ReportsArray: Report_[]; // Link to Reports
|
|
12694
|
+
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
12695
|
+
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
12694
12696
|
|
|
12695
12697
|
}
|
|
12696
12698
|
|
|
@@ -12809,14 +12811,14 @@ export class ConversationResolver extends ResolverBase {
|
|
|
12809
12811
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
12810
12812
|
}
|
|
12811
12813
|
@Query(() => Conversation_, { nullable: true })
|
|
12812
|
-
async Conversation(@Arg('ID', () => Int) ID:
|
|
12814
|
+
async Conversation(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Conversation_ | null> {
|
|
12813
12815
|
this.CheckUserReadPermissions('Conversations', userPayload);
|
|
12814
12816
|
const sSQL = `SELECT * FROM [admin].[vwConversations] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
12815
12817
|
const result = this.MapFieldNamesToCodeNames('Conversations', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
12816
12818
|
return result;
|
|
12817
12819
|
}
|
|
12818
12820
|
|
|
12819
|
-
@FieldResolver(() => [ConversationDetail_])
|
|
12821
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ConversationDetail_])
|
|
12820
12822
|
async ConversationDetailsArray(@Root() conversation_: Conversation_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12821
12823
|
this.CheckUserReadPermissions('Conversation Details', userPayload);
|
|
12822
12824
|
const sSQL = `SELECT * FROM [admin].[vwConversationDetails] WHERE [ConversationID]=${conversation_.ID} ` + this.getRowLevelSecurityWhereClause('Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -12824,7 +12826,7 @@ export class ConversationResolver extends ResolverBase {
|
|
|
12824
12826
|
return result;
|
|
12825
12827
|
}
|
|
12826
12828
|
|
|
12827
|
-
@FieldResolver(() => [Report_])
|
|
12829
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Report_])
|
|
12828
12830
|
async ReportsArray(@Root() conversation_: Conversation_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12829
12831
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
12830
12832
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [ConversationID]=${conversation_.ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -12894,7 +12896,7 @@ export class ConversationResolver extends ResolverBase {
|
|
|
12894
12896
|
}
|
|
12895
12897
|
|
|
12896
12898
|
@Mutation(() => Conversation_)
|
|
12897
|
-
async DeleteConversation(@Arg('ID', () => Int) ID:
|
|
12899
|
+
async DeleteConversation(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12898
12900
|
if (await this.BeforeDelete(dataSource, ID)) { // fire event and proceed if it wasn't cancelled
|
|
12899
12901
|
const entityObject = <ConversationEntity>await new Metadata().GetEntityObject('Conversations', this.GetUserFromPayload(userPayload));
|
|
12900
12902
|
await entityObject.Load(ID);
|
|
@@ -12911,11 +12913,11 @@ export class ConversationResolver extends ResolverBase {
|
|
|
12911
12913
|
}
|
|
12912
12914
|
|
|
12913
12915
|
// Before/After UPDATE Event Hooks for Sub-Classes to Override
|
|
12914
|
-
protected async BeforeDelete(dataSource: DataSource, ID:
|
|
12916
|
+
protected async BeforeDelete(dataSource: DataSource, ID: number): Promise<boolean> {
|
|
12915
12917
|
const i = ID, d = dataSource; // prevent error;
|
|
12916
12918
|
return true;
|
|
12917
12919
|
}
|
|
12918
|
-
protected async AfterDelete(dataSource: DataSource, ID:
|
|
12920
|
+
protected async AfterDelete(dataSource: DataSource, ID: number) {
|
|
12919
12921
|
const i = ID, d = dataSource; // prevent error
|
|
12920
12922
|
}
|
|
12921
12923
|
|
|
@@ -13078,7 +13080,7 @@ export class UserNotificationResolver extends ResolverBase {
|
|
|
13078
13080
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
13079
13081
|
}
|
|
13080
13082
|
@Query(() => UserNotification_, { nullable: true })
|
|
13081
|
-
async UserNotification(@Arg('ID', () => Int) ID:
|
|
13083
|
+
async UserNotification(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserNotification_ | null> {
|
|
13082
13084
|
this.CheckUserReadPermissions('User Notifications', userPayload);
|
|
13083
13085
|
const sSQL = `SELECT * FROM [admin].[vwUserNotifications] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User Notifications', userPayload, EntityPermissionType.Read, 'AND');
|
|
13084
13086
|
const result = this.MapFieldNamesToCodeNames('User Notifications', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -13264,7 +13266,7 @@ export class SchemaInfoResolver extends ResolverBase {
|
|
|
13264
13266
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
13265
13267
|
}
|
|
13266
13268
|
@Query(() => SchemaInfo_, { nullable: true })
|
|
13267
|
-
async SchemaInfo(@Arg('ID', () => Int) ID:
|
|
13269
|
+
async SchemaInfo(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<SchemaInfo_ | null> {
|
|
13268
13270
|
this.CheckUserReadPermissions('Schema Info', userPayload);
|
|
13269
13271
|
const sSQL = `SELECT * FROM [admin].[vwSchemaInfos] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Schema Info', userPayload, EntityPermissionType.Read, 'AND');
|
|
13270
13272
|
const result = this.MapFieldNamesToCodeNames('Schema Info', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -13451,7 +13453,7 @@ export class CompanyIntegrationRecordMapResolver extends ResolverBase {
|
|
|
13451
13453
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
13452
13454
|
}
|
|
13453
13455
|
@Query(() => CompanyIntegrationRecordMap_, { nullable: true })
|
|
13454
|
-
async CompanyIntegrationRecordMap(@Arg('ID', () => Int) ID:
|
|
13456
|
+
async CompanyIntegrationRecordMap(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<CompanyIntegrationRecordMap_ | null> {
|
|
13455
13457
|
this.CheckUserReadPermissions('Company Integration Record Maps', userPayload);
|
|
13456
13458
|
const sSQL = `SELECT * FROM [admin].[vwCompanyIntegrationRecordMaps] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Company Integration Record Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
13457
13459
|
const result = this.MapFieldNamesToCodeNames('Company Integration Record Maps', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -13580,8 +13582,8 @@ export class RecordMergeLog_ {
|
|
|
13580
13582
|
@MaxLength(200)
|
|
13581
13583
|
InitiatedByUser: string;
|
|
13582
13584
|
|
|
13583
|
-
@Field(() => [RecordMergeDeletionLog_])
|
|
13584
|
-
RecordMergeDeletionLogsArray: RecordMergeDeletionLog_[]; // Link to RecordMergeDeletionLogs
|
|
13585
|
+
@Field(() => [mj_core_schema_server_object_types.RecordMergeDeletionLog_])
|
|
13586
|
+
RecordMergeDeletionLogsArray: mj_core_schema_server_object_types.RecordMergeDeletionLog_[]; // Link to RecordMergeDeletionLogs
|
|
13585
13587
|
|
|
13586
13588
|
}
|
|
13587
13589
|
|
|
@@ -13706,14 +13708,14 @@ export class RecordMergeLogResolver extends ResolverBase {
|
|
|
13706
13708
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
13707
13709
|
}
|
|
13708
13710
|
@Query(() => RecordMergeLog_, { nullable: true })
|
|
13709
|
-
async RecordMergeLog(@Arg('ID', () => Int) ID:
|
|
13711
|
+
async RecordMergeLog(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<RecordMergeLog_ | null> {
|
|
13710
13712
|
this.CheckUserReadPermissions('Record Merge Logs', userPayload);
|
|
13711
13713
|
const sSQL = `SELECT * FROM [admin].[vwRecordMergeLogs] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
13712
13714
|
const result = this.MapFieldNamesToCodeNames('Record Merge Logs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
13713
13715
|
return result;
|
|
13714
13716
|
}
|
|
13715
13717
|
|
|
13716
|
-
@FieldResolver(() => [RecordMergeDeletionLog_])
|
|
13718
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.RecordMergeDeletionLog_])
|
|
13717
13719
|
async RecordMergeDeletionLogsArray(@Root() recordmergelog_: RecordMergeLog_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13718
13720
|
this.CheckUserReadPermissions('Record Merge Deletion Logs', userPayload);
|
|
13719
13721
|
const sSQL = `SELECT * FROM [admin].[vwRecordMergeDeletionLogs] WHERE [RecordMergeLogID]=${recordmergelog_.ID} ` + this.getRowLevelSecurityWhereClause('Record Merge Deletion Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -13901,7 +13903,7 @@ export class RecordMergeDeletionLogResolver extends ResolverBase {
|
|
|
13901
13903
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
13902
13904
|
}
|
|
13903
13905
|
@Query(() => RecordMergeDeletionLog_, { nullable: true })
|
|
13904
|
-
async RecordMergeDeletionLog(@Arg('ID', () => Int) ID:
|
|
13906
|
+
async RecordMergeDeletionLog(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<RecordMergeDeletionLog_ | null> {
|
|
13905
13907
|
this.CheckUserReadPermissions('Record Merge Deletion Logs', userPayload);
|
|
13906
13908
|
const sSQL = `SELECT * FROM [admin].[vwRecordMergeDeletionLogs] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Record Merge Deletion Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
13907
13909
|
const result = this.MapFieldNamesToCodeNames('Record Merge Deletion Logs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -14166,7 +14168,7 @@ export class QueryFieldResolver extends ResolverBase {
|
|
|
14166
14168
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
14167
14169
|
}
|
|
14168
14170
|
@Query(() => QueryField_, { nullable: true })
|
|
14169
|
-
async QueryField(@Arg('ID', () => Int) ID:
|
|
14171
|
+
async QueryField(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<QueryField_ | null> {
|
|
14170
14172
|
this.CheckUserReadPermissions('Query Fields', userPayload);
|
|
14171
14173
|
const sSQL = `SELECT * FROM [admin].[vwQueryFields] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Query Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
14172
14174
|
const result = this.MapFieldNamesToCodeNames('Query Fields', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -14266,11 +14268,11 @@ export class QueryCategory_ {
|
|
|
14266
14268
|
@MaxLength(100)
|
|
14267
14269
|
Parent?: string;
|
|
14268
14270
|
|
|
14269
|
-
@Field(() => [QueryCategory_])
|
|
14270
|
-
QueryCategoriesArray: QueryCategory_[]; // Link to QueryCategories
|
|
14271
|
+
@Field(() => [mj_core_schema_server_object_types.QueryCategory_])
|
|
14272
|
+
QueryCategoriesArray: mj_core_schema_server_object_types.QueryCategory_[]; // Link to QueryCategories
|
|
14271
14273
|
|
|
14272
|
-
@Field(() => [Query_])
|
|
14273
|
-
QueriesArray: Query_[]; // Link to Queries
|
|
14274
|
+
@Field(() => [mj_core_schema_server_object_types.Query_])
|
|
14275
|
+
QueriesArray: mj_core_schema_server_object_types.Query_[]; // Link to Queries
|
|
14274
14276
|
|
|
14275
14277
|
}
|
|
14276
14278
|
|
|
@@ -14353,14 +14355,14 @@ export class QueryCategoryResolver extends ResolverBase {
|
|
|
14353
14355
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
14354
14356
|
}
|
|
14355
14357
|
@Query(() => QueryCategory_, { nullable: true })
|
|
14356
|
-
async QueryCategory(@Arg('ID', () => Int) ID:
|
|
14358
|
+
async QueryCategory(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<QueryCategory_ | null> {
|
|
14357
14359
|
this.CheckUserReadPermissions('Query Categories', userPayload);
|
|
14358
14360
|
const sSQL = `SELECT * FROM [admin].[vwQueryCategories] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Query Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
14359
14361
|
const result = this.MapFieldNamesToCodeNames('Query Categories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
14360
14362
|
return result;
|
|
14361
14363
|
}
|
|
14362
14364
|
|
|
14363
|
-
@FieldResolver(() => [QueryCategory_])
|
|
14365
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.QueryCategory_])
|
|
14364
14366
|
async QueryCategoriesArray(@Root() querycategory_: QueryCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14365
14367
|
this.CheckUserReadPermissions('Query Categories', userPayload);
|
|
14366
14368
|
const sSQL = `SELECT * FROM [admin].[vwQueryCategories] WHERE [ParentID]=${querycategory_.ID} ` + this.getRowLevelSecurityWhereClause('Query Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -14368,7 +14370,7 @@ export class QueryCategoryResolver extends ResolverBase {
|
|
|
14368
14370
|
return result;
|
|
14369
14371
|
}
|
|
14370
14372
|
|
|
14371
|
-
@FieldResolver(() => [Query_])
|
|
14373
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Query_])
|
|
14372
14374
|
async QueriesArray(@Root() querycategory_: QueryCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14373
14375
|
this.CheckUserReadPermissions('Queries', userPayload);
|
|
14374
14376
|
const sSQL = `SELECT * FROM [admin].[vwQueries] WHERE [CategoryID]=${querycategory_.ID} ` + this.getRowLevelSecurityWhereClause('Queries', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -14485,14 +14487,14 @@ export class Query_ {
|
|
|
14485
14487
|
@MaxLength(100)
|
|
14486
14488
|
Category: string;
|
|
14487
14489
|
|
|
14488
|
-
@Field(() => [QueryField_])
|
|
14489
|
-
QueryFieldsArray: QueryField_[]; // Link to QueryFields
|
|
14490
|
+
@Field(() => [mj_core_schema_server_object_types.QueryField_])
|
|
14491
|
+
QueryFieldsArray: mj_core_schema_server_object_types.QueryField_[]; // Link to QueryFields
|
|
14490
14492
|
|
|
14491
|
-
@Field(() => [QueryPermission_])
|
|
14492
|
-
QueryPermissionsArray: QueryPermission_[]; // Link to QueryPermissions
|
|
14493
|
+
@Field(() => [mj_core_schema_server_object_types.QueryPermission_])
|
|
14494
|
+
QueryPermissionsArray: mj_core_schema_server_object_types.QueryPermission_[]; // Link to QueryPermissions
|
|
14493
14495
|
|
|
14494
|
-
@Field(() => [DataContextItem_])
|
|
14495
|
-
DataContextItemsArray: DataContextItem_[]; // Link to DataContextItems
|
|
14496
|
+
@Field(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
14497
|
+
DataContextItemsArray: mj_core_schema_server_object_types.DataContextItem_[]; // Link to DataContextItems
|
|
14496
14498
|
|
|
14497
14499
|
}
|
|
14498
14500
|
|
|
@@ -14605,14 +14607,14 @@ export class QueryResolver extends ResolverBase {
|
|
|
14605
14607
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
14606
14608
|
}
|
|
14607
14609
|
@Query(() => Query_, { nullable: true })
|
|
14608
|
-
async Query(@Arg('ID', () => Int) ID:
|
|
14610
|
+
async Query(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Query_ | null> {
|
|
14609
14611
|
this.CheckUserReadPermissions('Queries', userPayload);
|
|
14610
14612
|
const sSQL = `SELECT * FROM [admin].[vwQueries] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Queries', userPayload, EntityPermissionType.Read, 'AND');
|
|
14611
14613
|
const result = this.MapFieldNamesToCodeNames('Queries', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
14612
14614
|
return result;
|
|
14613
14615
|
}
|
|
14614
14616
|
|
|
14615
|
-
@FieldResolver(() => [QueryField_])
|
|
14617
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.QueryField_])
|
|
14616
14618
|
async QueryFieldsArray(@Root() query_: Query_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14617
14619
|
this.CheckUserReadPermissions('Query Fields', userPayload);
|
|
14618
14620
|
const sSQL = `SELECT * FROM [admin].[vwQueryFields] WHERE [QueryID]=${query_.ID} ` + this.getRowLevelSecurityWhereClause('Query Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -14620,7 +14622,7 @@ export class QueryResolver extends ResolverBase {
|
|
|
14620
14622
|
return result;
|
|
14621
14623
|
}
|
|
14622
14624
|
|
|
14623
|
-
@FieldResolver(() => [QueryPermission_])
|
|
14625
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.QueryPermission_])
|
|
14624
14626
|
async QueryPermissionsArray(@Root() query_: Query_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14625
14627
|
this.CheckUserReadPermissions('Query Permissions', userPayload);
|
|
14626
14628
|
const sSQL = `SELECT * FROM [admin].[vwQueryPermissions] WHERE [QueryID]=${query_.ID} ` + this.getRowLevelSecurityWhereClause('Query Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -14628,7 +14630,7 @@ export class QueryResolver extends ResolverBase {
|
|
|
14628
14630
|
return result;
|
|
14629
14631
|
}
|
|
14630
14632
|
|
|
14631
|
-
@FieldResolver(() => [DataContextItem_])
|
|
14633
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
14632
14634
|
async DataContextItemsArray(@Root() query_: Query_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
14633
14635
|
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
14634
14636
|
const sSQL = `SELECT * FROM [admin].[vwDataContextItems] WHERE [QueryID]=${query_.ID} ` + this.getRowLevelSecurityWhereClause('Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -14797,7 +14799,7 @@ export class QueryPermissionResolver extends ResolverBase {
|
|
|
14797
14799
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
14798
14800
|
}
|
|
14799
14801
|
@Query(() => QueryPermission_, { nullable: true })
|
|
14800
|
-
async QueryPermission(@Arg('ID', () => Int) ID:
|
|
14802
|
+
async QueryPermission(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<QueryPermission_ | null> {
|
|
14801
14803
|
this.CheckUserReadPermissions('Query Permissions', userPayload);
|
|
14802
14804
|
const sSQL = `SELECT * FROM [admin].[vwQueryPermissions] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Query Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
14803
14805
|
const result = this.MapFieldNamesToCodeNames('Query Permissions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -14991,7 +14993,7 @@ export class VectorIndexResolver extends ResolverBase {
|
|
|
14991
14993
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
14992
14994
|
}
|
|
14993
14995
|
@Query(() => VectorIndex_, { nullable: true })
|
|
14994
|
-
async VectorIndex(@Arg('ID', () => Int) ID:
|
|
14996
|
+
async VectorIndex(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<VectorIndex_ | null> {
|
|
14995
14997
|
this.CheckUserReadPermissions('Vector Indexes', userPayload);
|
|
14996
14998
|
const sSQL = `SELECT * FROM [admin].[vwVectorIndexes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Vector Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
14997
14999
|
const result = this.MapFieldNamesToCodeNames('Vector Indexes', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -15084,8 +15086,8 @@ export class EntityDocumentType_ {
|
|
|
15084
15086
|
@MaxLength(8)
|
|
15085
15087
|
UpdatedAt: Date;
|
|
15086
15088
|
|
|
15087
|
-
@Field(() => [EntityDocument_])
|
|
15088
|
-
EntityDocumentsArray: EntityDocument_[]; // Link to EntityDocuments
|
|
15089
|
+
@Field(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
15090
|
+
EntityDocumentsArray: mj_core_schema_server_object_types.EntityDocument_[]; // Link to EntityDocuments
|
|
15089
15091
|
|
|
15090
15092
|
}
|
|
15091
15093
|
|
|
@@ -15162,14 +15164,14 @@ export class EntityDocumentTypeResolver extends ResolverBase {
|
|
|
15162
15164
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
15163
15165
|
}
|
|
15164
15166
|
@Query(() => EntityDocumentType_, { nullable: true })
|
|
15165
|
-
async EntityDocumentType(@Arg('ID', () => Int) ID:
|
|
15167
|
+
async EntityDocumentType(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityDocumentType_ | null> {
|
|
15166
15168
|
this.CheckUserReadPermissions('Entity Document Types', userPayload);
|
|
15167
15169
|
const sSQL = `SELECT * FROM [admin].[vwEntityDocumentTypes] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Document Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
15168
15170
|
const result = this.MapFieldNamesToCodeNames('Entity Document Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
15169
15171
|
return result;
|
|
15170
15172
|
}
|
|
15171
15173
|
|
|
15172
|
-
@FieldResolver(() => [EntityDocument_])
|
|
15174
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityDocument_])
|
|
15173
15175
|
async EntityDocumentsArray(@Root() entitydocumenttype_: EntityDocumentType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15174
15176
|
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
15175
15177
|
const sSQL = `SELECT * FROM [admin].[vwEntityDocuments] WHERE [TypeID]=${entitydocumenttype_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -15362,7 +15364,7 @@ export class EntityDocumentRunResolver extends ResolverBase {
|
|
|
15362
15364
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
15363
15365
|
}
|
|
15364
15366
|
@Query(() => EntityDocumentRun_, { nullable: true })
|
|
15365
|
-
async EntityDocumentRun(@Arg('ID', () => Int) ID:
|
|
15367
|
+
async EntityDocumentRun(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityDocumentRun_ | null> {
|
|
15366
15368
|
this.CheckUserReadPermissions('Entity Document Runs', userPayload);
|
|
15367
15369
|
const sSQL = `SELECT * FROM [admin].[vwEntityDocumentRuns] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Document Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
15368
15370
|
const result = this.MapFieldNamesToCodeNames('Entity Document Runs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -15463,8 +15465,8 @@ export class VectorDatabase_ {
|
|
|
15463
15465
|
@MaxLength(8)
|
|
15464
15466
|
UpdatedAt: Date;
|
|
15465
15467
|
|
|
15466
|
-
@Field(() => [VectorIndex_])
|
|
15467
|
-
VectorIndexesArray: VectorIndex_[]; // Link to VectorIndexes
|
|
15468
|
+
@Field(() => [mj_core_schema_server_object_types.VectorIndex_])
|
|
15469
|
+
VectorIndexesArray: mj_core_schema_server_object_types.VectorIndex_[]; // Link to VectorIndexes
|
|
15468
15470
|
|
|
15469
15471
|
}
|
|
15470
15472
|
|
|
@@ -15553,14 +15555,14 @@ export class VectorDatabaseResolver extends ResolverBase {
|
|
|
15553
15555
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
15554
15556
|
}
|
|
15555
15557
|
@Query(() => VectorDatabase_, { nullable: true })
|
|
15556
|
-
async VectorDatabase(@Arg('ID', () => Int) ID:
|
|
15558
|
+
async VectorDatabase(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<VectorDatabase_ | null> {
|
|
15557
15559
|
this.CheckUserReadPermissions('Vector Databases', userPayload);
|
|
15558
15560
|
const sSQL = `SELECT * FROM [admin].[vwVectorDatabases] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Vector Databases', userPayload, EntityPermissionType.Read, 'AND');
|
|
15559
15561
|
const result = this.MapFieldNamesToCodeNames('Vector Databases', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
15560
15562
|
return result;
|
|
15561
15563
|
}
|
|
15562
15564
|
|
|
15563
|
-
@FieldResolver(() => [VectorIndex_])
|
|
15565
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.VectorIndex_])
|
|
15564
15566
|
async VectorIndexesArray(@Root() vectordatabase_: VectorDatabase_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15565
15567
|
this.CheckUserReadPermissions('Vector Indexes', userPayload);
|
|
15566
15568
|
const sSQL = `SELECT * FROM [admin].[vwVectorIndexes] WHERE [VectorDatabaseID]=${vectordatabase_.ID} ` + this.getRowLevelSecurityWhereClause('Vector Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -15776,7 +15778,7 @@ export class EntityRecordDocumentResolver extends ResolverBase {
|
|
|
15776
15778
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
15777
15779
|
}
|
|
15778
15780
|
@Query(() => EntityRecordDocument_, { nullable: true })
|
|
15779
|
-
async EntityRecordDocument(@Arg('ID', () => Int) ID:
|
|
15781
|
+
async EntityRecordDocument(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityRecordDocument_ | null> {
|
|
15780
15782
|
this.CheckUserReadPermissions('Entity Record Documents', userPayload);
|
|
15781
15783
|
const sSQL = `SELECT * FROM [admin].[vwEntityRecordDocuments] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Record Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
15782
15784
|
const result = this.MapFieldNamesToCodeNames('Entity Record Documents', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -15883,8 +15885,8 @@ export class EntityDocument_ {
|
|
|
15883
15885
|
@MaxLength(200)
|
|
15884
15886
|
Type: string;
|
|
15885
15887
|
|
|
15886
|
-
@Field(() => [EntityDocumentRun_])
|
|
15887
|
-
EntityDocumentRunsArray: EntityDocumentRun_[]; // Link to EntityDocumentRuns
|
|
15888
|
+
@Field(() => [mj_core_schema_server_object_types.EntityDocumentRun_])
|
|
15889
|
+
EntityDocumentRunsArray: mj_core_schema_server_object_types.EntityDocumentRun_[]; // Link to EntityDocumentRuns
|
|
15888
15890
|
|
|
15889
15891
|
}
|
|
15890
15892
|
|
|
@@ -15979,14 +15981,14 @@ export class EntityDocumentResolver extends ResolverBase {
|
|
|
15979
15981
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
15980
15982
|
}
|
|
15981
15983
|
@Query(() => EntityDocument_, { nullable: true })
|
|
15982
|
-
async EntityDocument(@Arg('ID', () => Int) ID:
|
|
15984
|
+
async EntityDocument(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityDocument_ | null> {
|
|
15983
15985
|
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
15984
15986
|
const sSQL = `SELECT * FROM [admin].[vwEntityDocuments] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
15985
15987
|
const result = this.MapFieldNamesToCodeNames('Entity Documents', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
15986
15988
|
return result;
|
|
15987
15989
|
}
|
|
15988
15990
|
|
|
15989
|
-
@FieldResolver(() => [EntityDocumentRun_])
|
|
15991
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.EntityDocumentRun_])
|
|
15990
15992
|
async EntityDocumentRunsArray(@Root() entitydocument_: EntityDocument_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15991
15993
|
this.CheckUserReadPermissions('Entity Document Runs', userPayload);
|
|
15992
15994
|
const sSQL = `SELECT * FROM [admin].[vwEntityDocumentRuns] WHERE [EntityDocumentID]=${entitydocument_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Document Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -16232,7 +16234,7 @@ export class DataContextItemResolver extends ResolverBase {
|
|
|
16232
16234
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
16233
16235
|
}
|
|
16234
16236
|
@Query(() => DataContextItem_, { nullable: true })
|
|
16235
|
-
async DataContextItem(@Arg('ID', () => Int) ID:
|
|
16237
|
+
async DataContextItem(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<DataContextItem_ | null> {
|
|
16236
16238
|
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
16237
16239
|
const sSQL = `SELECT * FROM [admin].[vwDataContextItems] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
16238
16240
|
const result = this.MapFieldNamesToCodeNames('Data Context Items', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
@@ -16336,11 +16338,11 @@ export class DataContext_ {
|
|
|
16336
16338
|
@MaxLength(200)
|
|
16337
16339
|
User: string;
|
|
16338
16340
|
|
|
16339
|
-
@Field(() => [DataContextItem_])
|
|
16340
|
-
DataContextItemsArray: DataContextItem_[]; // Link to DataContextItems
|
|
16341
|
+
@Field(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
16342
|
+
DataContextItemsArray: mj_core_schema_server_object_types.DataContextItem_[]; // Link to DataContextItems
|
|
16341
16343
|
|
|
16342
|
-
@Field(() => [Report_])
|
|
16343
|
-
ReportsArray: Report_[]; // Link to Reports
|
|
16344
|
+
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
16345
|
+
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
16344
16346
|
|
|
16345
16347
|
}
|
|
16346
16348
|
|
|
@@ -16429,14 +16431,14 @@ export class DataContextResolver extends ResolverBase {
|
|
|
16429
16431
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
16430
16432
|
}
|
|
16431
16433
|
@Query(() => DataContext_, { nullable: true })
|
|
16432
|
-
async DataContext(@Arg('ID', () => Int) ID:
|
|
16434
|
+
async DataContext(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<DataContext_ | null> {
|
|
16433
16435
|
this.CheckUserReadPermissions('Data Contexts', userPayload);
|
|
16434
16436
|
const sSQL = `SELECT * FROM [admin].[vwDataContexts] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Data Contexts', userPayload, EntityPermissionType.Read, 'AND');
|
|
16435
16437
|
const result = this.MapFieldNamesToCodeNames('Data Contexts', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
16436
16438
|
return result;
|
|
16437
16439
|
}
|
|
16438
16440
|
|
|
16439
|
-
@FieldResolver(() => [DataContextItem_])
|
|
16441
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.DataContextItem_])
|
|
16440
16442
|
async DataContextItemsArray(@Root() datacontext_: DataContext_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16441
16443
|
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
16442
16444
|
const sSQL = `SELECT * FROM [admin].[vwDataContextItems] WHERE [DataContextID]=${datacontext_.ID} ` + this.getRowLevelSecurityWhereClause('Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -16444,7 +16446,7 @@ export class DataContextResolver extends ResolverBase {
|
|
|
16444
16446
|
return result;
|
|
16445
16447
|
}
|
|
16446
16448
|
|
|
16447
|
-
@FieldResolver(() => [Report_])
|
|
16449
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Report_])
|
|
16448
16450
|
async ReportsArray(@Root() datacontext_: DataContext_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16449
16451
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
16450
16452
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [DataContextID]=${datacontext_.ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -16545,11 +16547,11 @@ export class UserViewCategory_ {
|
|
|
16545
16547
|
@MaxLength(200)
|
|
16546
16548
|
Parent?: string;
|
|
16547
16549
|
|
|
16548
|
-
@Field(() => [UserViewCategory_])
|
|
16549
|
-
UserViewCategoriesArray: UserViewCategory_[]; // Link to UserViewCategories
|
|
16550
|
+
@Field(() => [mj_core_schema_server_object_types.UserViewCategory_])
|
|
16551
|
+
UserViewCategoriesArray: mj_core_schema_server_object_types.UserViewCategory_[]; // Link to UserViewCategories
|
|
16550
16552
|
|
|
16551
|
-
@Field(() => [UserView_])
|
|
16552
|
-
UserViewsArray: UserView_[]; // Link to UserViews
|
|
16553
|
+
@Field(() => [mj_core_schema_server_object_types.UserView_])
|
|
16554
|
+
UserViewsArray: mj_core_schema_server_object_types.UserView_[]; // Link to UserViews
|
|
16553
16555
|
|
|
16554
16556
|
}
|
|
16555
16557
|
|
|
@@ -16632,14 +16634,14 @@ export class UserViewCategoryResolver extends ResolverBase {
|
|
|
16632
16634
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
16633
16635
|
}
|
|
16634
16636
|
@Query(() => UserViewCategory_, { nullable: true })
|
|
16635
|
-
async UserViewCategory(@Arg('ID', () => Int) ID:
|
|
16637
|
+
async UserViewCategory(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<UserViewCategory_ | null> {
|
|
16636
16638
|
this.CheckUserReadPermissions('User View Categories', userPayload);
|
|
16637
16639
|
const sSQL = `SELECT * FROM [admin].[vwUserViewCategories] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('User View Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
16638
16640
|
const result = this.MapFieldNamesToCodeNames('User View Categories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
16639
16641
|
return result;
|
|
16640
16642
|
}
|
|
16641
16643
|
|
|
16642
|
-
@FieldResolver(() => [UserViewCategory_])
|
|
16644
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserViewCategory_])
|
|
16643
16645
|
async UserViewCategoriesArray(@Root() userviewcategory_: UserViewCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16644
16646
|
this.CheckUserReadPermissions('User View Categories', userPayload);
|
|
16645
16647
|
const sSQL = `SELECT * FROM [admin].[vwUserViewCategories] WHERE [ParentID]=${userviewcategory_.ID} ` + this.getRowLevelSecurityWhereClause('User View Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -16647,7 +16649,7 @@ export class UserViewCategoryResolver extends ResolverBase {
|
|
|
16647
16649
|
return result;
|
|
16648
16650
|
}
|
|
16649
16651
|
|
|
16650
|
-
@FieldResolver(() => [UserView_])
|
|
16652
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.UserView_])
|
|
16651
16653
|
async UserViewsArray(@Root() userviewcategory_: UserViewCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16652
16654
|
this.CheckUserReadPermissions('User Views', userPayload);
|
|
16653
16655
|
const sSQL = `SELECT * FROM [admin].[vwUserViews] WHERE [CategoryID]=${userviewcategory_.ID} ` + this.getRowLevelSecurityWhereClause('User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -16748,11 +16750,11 @@ export class DashboardCategory_ {
|
|
|
16748
16750
|
@MaxLength(200)
|
|
16749
16751
|
Parent?: string;
|
|
16750
16752
|
|
|
16751
|
-
@Field(() => [Dashboard_])
|
|
16752
|
-
DashboardsArray: Dashboard_[]; // Link to Dashboards
|
|
16753
|
+
@Field(() => [mj_core_schema_server_object_types.Dashboard_])
|
|
16754
|
+
DashboardsArray: mj_core_schema_server_object_types.Dashboard_[]; // Link to Dashboards
|
|
16753
16755
|
|
|
16754
|
-
@Field(() => [DashboardCategory_])
|
|
16755
|
-
DashboardCategoriesArray: DashboardCategory_[]; // Link to DashboardCategories
|
|
16756
|
+
@Field(() => [mj_core_schema_server_object_types.DashboardCategory_])
|
|
16757
|
+
DashboardCategoriesArray: mj_core_schema_server_object_types.DashboardCategory_[]; // Link to DashboardCategories
|
|
16756
16758
|
|
|
16757
16759
|
}
|
|
16758
16760
|
|
|
@@ -16838,14 +16840,14 @@ export class DashboardCategoryResolver extends ResolverBase {
|
|
|
16838
16840
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
16839
16841
|
}
|
|
16840
16842
|
@Query(() => DashboardCategory_, { nullable: true })
|
|
16841
|
-
async DashboardCategory(@Arg('ID', () => Int) ID:
|
|
16843
|
+
async DashboardCategory(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<DashboardCategory_ | null> {
|
|
16842
16844
|
this.CheckUserReadPermissions('Dashboard Categories', userPayload);
|
|
16843
16845
|
const sSQL = `SELECT * FROM [admin].[vwDashboardCategories] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
16844
16846
|
const result = this.MapFieldNamesToCodeNames('Dashboard Categories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
16845
16847
|
return result;
|
|
16846
16848
|
}
|
|
16847
16849
|
|
|
16848
|
-
@FieldResolver(() => [Dashboard_])
|
|
16850
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Dashboard_])
|
|
16849
16851
|
async DashboardsArray(@Root() dashboardcategory_: DashboardCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16850
16852
|
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
16851
16853
|
const sSQL = `SELECT * FROM [admin].[vwDashboards] WHERE [CategoryID]=${dashboardcategory_.ID} ` + this.getRowLevelSecurityWhereClause('Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -16853,7 +16855,7 @@ export class DashboardCategoryResolver extends ResolverBase {
|
|
|
16853
16855
|
return result;
|
|
16854
16856
|
}
|
|
16855
16857
|
|
|
16856
|
-
@FieldResolver(() => [DashboardCategory_])
|
|
16858
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.DashboardCategory_])
|
|
16857
16859
|
async DashboardCategoriesArray(@Root() dashboardcategory_: DashboardCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16858
16860
|
this.CheckUserReadPermissions('Dashboard Categories', userPayload);
|
|
16859
16861
|
const sSQL = `SELECT * FROM [admin].[vwDashboardCategories] WHERE [ParentID]=${dashboardcategory_.ID} ` + this.getRowLevelSecurityWhereClause('Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -16954,11 +16956,11 @@ export class ReportCategory_ {
|
|
|
16954
16956
|
@MaxLength(200)
|
|
16955
16957
|
Parent: string;
|
|
16956
16958
|
|
|
16957
|
-
@Field(() => [ReportCategory_])
|
|
16958
|
-
ReportCategoriesArray: ReportCategory_[]; // Link to ReportCategories
|
|
16959
|
+
@Field(() => [mj_core_schema_server_object_types.ReportCategory_])
|
|
16960
|
+
ReportCategoriesArray: mj_core_schema_server_object_types.ReportCategory_[]; // Link to ReportCategories
|
|
16959
16961
|
|
|
16960
|
-
@Field(() => [Report_])
|
|
16961
|
-
ReportsArray: Report_[]; // Link to Reports
|
|
16962
|
+
@Field(() => [mj_core_schema_server_object_types.Report_])
|
|
16963
|
+
ReportsArray: mj_core_schema_server_object_types.Report_[]; // Link to Reports
|
|
16962
16964
|
|
|
16963
16965
|
}
|
|
16964
16966
|
|
|
@@ -17041,14 +17043,14 @@ export class ReportCategoryResolver extends ResolverBase {
|
|
|
17041
17043
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
17042
17044
|
}
|
|
17043
17045
|
@Query(() => ReportCategory_, { nullable: true })
|
|
17044
|
-
async ReportCategory(@Arg('ID', () => Int) ID:
|
|
17046
|
+
async ReportCategory(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ReportCategory_ | null> {
|
|
17045
17047
|
this.CheckUserReadPermissions('Report Categories', userPayload);
|
|
17046
17048
|
const sSQL = `SELECT * FROM [admin].[vwReportCategories] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
17047
17049
|
const result = this.MapFieldNamesToCodeNames('Report Categories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
17048
17050
|
return result;
|
|
17049
17051
|
}
|
|
17050
17052
|
|
|
17051
|
-
@FieldResolver(() => [ReportCategory_])
|
|
17053
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.ReportCategory_])
|
|
17052
17054
|
async ReportCategoriesArray(@Root() reportcategory_: ReportCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17053
17055
|
this.CheckUserReadPermissions('Report Categories', userPayload);
|
|
17054
17056
|
const sSQL = `SELECT * FROM [admin].[vwReportCategories] WHERE [ParentID]=${reportcategory_.ID} ` + this.getRowLevelSecurityWhereClause('Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
@@ -17056,7 +17058,7 @@ export class ReportCategoryResolver extends ResolverBase {
|
|
|
17056
17058
|
return result;
|
|
17057
17059
|
}
|
|
17058
17060
|
|
|
17059
|
-
@FieldResolver(() => [Report_])
|
|
17061
|
+
@FieldResolver(() => [mj_core_schema_server_object_types.Report_])
|
|
17060
17062
|
async ReportsArray(@Root() reportcategory_: ReportCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17061
17063
|
this.CheckUserReadPermissions('Reports', userPayload);
|
|
17062
17064
|
const sSQL = `SELECT * FROM [admin].[vwReports] WHERE [CategoryID]=${reportcategory_.ID} ` + this.getRowLevelSecurityWhereClause('Reports', userPayload, EntityPermissionType.Read, 'AND');
|