@memberjunction/server 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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: 6/12/2024, 12:19:28 AM
5
+ * GENERATED: 6/19/2024, 9:50:27 AM
6
6
  *
7
7
  * >>> DO NOT MODIFY THIS FILE!!!!!!!!!!!!
8
8
  * >>> YOUR CHANGES WILL BE OVERWRITTEN
@@ -20,7 +20,7 @@ import { mj_core_schema } from '../config';
20
20
 
21
21
  import * as mj_core_schema_server_object_types from '@memberjunction/server'
22
22
 
23
- import { CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, EntityBehaviorEntity, EntityBehaviorTypeEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity } from '@memberjunction/core-entities';
23
+ import { CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, EntityBehaviorEntity, EntityBehaviorTypeEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity } from '@memberjunction/core-entities';
24
24
 
25
25
 
26
26
  //****************************************************************************
@@ -47,17 +47,17 @@ export class Company_ {
47
47
  @MaxLength(1000)
48
48
  LogoURL?: string;
49
49
 
50
- @Field()
51
- @MaxLength(8)
52
- CreatedAt: Date;
53
-
54
- @Field()
55
- @MaxLength(8)
56
- UpdatedAt: Date;
57
-
58
50
  @Field({nullable: true})
59
51
  @MaxLength(510)
60
52
  Domain?: string;
53
+
54
+ @Field()
55
+ @MaxLength(10)
56
+ _mj__CreatedAt: Date;
57
+
58
+ @Field()
59
+ @MaxLength(10)
60
+ _mj__UpdatedAt: Date;
61
61
 
62
62
  @Field(() => [mj_core_schema_server_object_types.Employee_])
63
63
  EmployeesArray: mj_core_schema_server_object_types.Employee_[]; // Link to Employees
@@ -271,12 +271,12 @@ export class Employee_ {
271
271
  SupervisorID?: number;
272
272
 
273
273
  @Field()
274
- @MaxLength(8)
275
- CreatedAt: Date;
274
+ @MaxLength(10)
275
+ _mj__CreatedAt: Date;
276
276
 
277
277
  @Field()
278
- @MaxLength(8)
279
- UpdatedAt: Date;
278
+ @MaxLength(10)
279
+ _mj__UpdatedAt: Date;
280
280
 
281
281
  @Field({nullable: true})
282
282
  @MaxLength(162)
@@ -796,12 +796,12 @@ export class EmployeeRole_ {
796
796
  RoleID: number;
797
797
 
798
798
  @Field()
799
- @MaxLength(8)
800
- CreatedAt: Date;
799
+ @MaxLength(10)
800
+ _mj__CreatedAt: Date;
801
801
 
802
802
  @Field()
803
- @MaxLength(8)
804
- UpdatedAt: Date;
803
+ @MaxLength(10)
804
+ _mj__UpdatedAt: Date;
805
805
 
806
806
  @Field()
807
807
  @MaxLength(100)
@@ -905,12 +905,12 @@ export class EmployeeSkill_ {
905
905
  SkillID: number;
906
906
 
907
907
  @Field()
908
- @MaxLength(8)
909
- CreatedAt: Date;
908
+ @MaxLength(10)
909
+ _mj__CreatedAt: Date;
910
910
 
911
911
  @Field()
912
- @MaxLength(8)
913
- UpdatedAt: Date;
912
+ @MaxLength(10)
913
+ _mj__UpdatedAt: Date;
914
914
 
915
915
  @Field()
916
916
  @MaxLength(100)
@@ -1023,12 +1023,12 @@ export class Role_ {
1023
1023
  SQLName?: string;
1024
1024
 
1025
1025
  @Field()
1026
- @MaxLength(8)
1027
- CreatedAt: Date;
1026
+ @MaxLength(10)
1027
+ _mj__CreatedAt: Date;
1028
1028
 
1029
1029
  @Field()
1030
- @MaxLength(8)
1031
- UpdatedAt: Date;
1030
+ @MaxLength(10)
1031
+ _mj__UpdatedAt: Date;
1032
1032
 
1033
1033
  @Field(() => [mj_core_schema_server_object_types.EmployeeRole_])
1034
1034
  EmployeeRolesArray: mj_core_schema_server_object_types.EmployeeRole_[]; // Link to EmployeeRoles
@@ -2014,13 +2014,17 @@ export class EntityField_ {
2014
2014
  @MaxLength(510)
2015
2015
  RelatedEntityNameFieldMap?: string;
2016
2016
 
2017
+ @Field({description: 'Controls the generated form in the MJ Explorer UI - defaults to a search box, other option is a drop down. Possible values are Search and Dropdown'})
2018
+ @MaxLength(40)
2019
+ RelatedEntityDisplayType: string;
2020
+
2017
2021
  @Field()
2018
- @MaxLength(8)
2019
- CreatedAt: Date;
2022
+ @MaxLength(10)
2023
+ _mj__CreatedAt: Date;
2020
2024
 
2021
2025
  @Field()
2022
- @MaxLength(8)
2023
- UpdatedAt: Date;
2026
+ @MaxLength(10)
2027
+ _mj__UpdatedAt: Date;
2024
2028
 
2025
2029
  @Field()
2026
2030
  @MaxLength(510)
@@ -2147,6 +2151,9 @@ export class CreateEntityFieldInput {
2147
2151
 
2148
2152
  @Field({ nullable: true })
2149
2153
  RelatedEntityNameFieldMap?: string;
2154
+
2155
+ @Field()
2156
+ RelatedEntityDisplayType: string;
2150
2157
  }
2151
2158
 
2152
2159
 
@@ -2230,6 +2237,9 @@ export class UpdateEntityFieldInput {
2230
2237
  @Field({ nullable: true })
2231
2238
  RelatedEntityNameFieldMap?: string;
2232
2239
 
2240
+ @Field()
2241
+ RelatedEntityDisplayType: string;
2242
+
2233
2243
  @Field(() => [KeyValuePairInput], { nullable: true })
2234
2244
  OldValues___?: KeyValuePairInput[];
2235
2245
  }
@@ -2371,7 +2381,7 @@ export class Entity_ {
2371
2381
  @Field(() => Boolean)
2372
2382
  VirtualEntity: boolean;
2373
2383
 
2374
- @Field(() => Boolean, {description: 'When set to 1, changes made via the MemberJunction architecture will result in tracking records being created in the RecordChange table'})
2384
+ @Field(() => Boolean, {description: 'When set to 1, changes made via the MemberJunction architecture will result in tracking records being created in the RecordChange table. In addition, when turned on CodeGen will ensure that your table has two fields: __mj_CreatedAt and __mj_UpdatedAt which are special fields used in conjunction with the RecordChange table to track changes to rows in your entity.'})
2375
2385
  TrackRecordChanges: boolean;
2376
2386
 
2377
2387
  @Field(() => Boolean, {description: 'When set to 1, accessing a record by an end-user will result in an Audit Log record being created'})
@@ -2467,14 +2477,6 @@ export class Entity_ {
2467
2477
  @MaxLength(510)
2468
2478
  EntityObjectSubclassImport?: string;
2469
2479
 
2470
- @Field()
2471
- @MaxLength(8)
2472
- CreatedAt: Date;
2473
-
2474
- @Field()
2475
- @MaxLength(8)
2476
- UpdatedAt: Date;
2477
-
2478
2480
  @Field({nullable: true, description: 'Used to specify a field within the entity that in turn contains the field name that will be used for record-level communication preferences. For example in a hypothetical entity called Contacts, say there is a field called PreferredComm and that field had possible values of Email1, SMS, and Phone, and those value in turn corresponded to field names in the entity. Each record in the Contacts entity could have a specific preference for which field would be used for communication. The MJ Communication Framework will use this information when available, as a priority ahead of the data in the Entity Communication Fields entity which is entity-level and not record-level.'})
2479
2481
  @MaxLength(510)
2480
2482
  PreferredCommunicationField?: string;
@@ -2483,6 +2485,14 @@ export class Entity_ {
2483
2485
  @MaxLength(1000)
2484
2486
  Icon?: string;
2485
2487
 
2488
+ @Field()
2489
+ @MaxLength(10)
2490
+ _mj__CreatedAt: Date;
2491
+
2492
+ @Field()
2493
+ @MaxLength(10)
2494
+ _mj__UpdatedAt: Date;
2495
+
2486
2496
  @Field({nullable: true})
2487
2497
  CodeName?: string;
2488
2498
 
@@ -3293,12 +3303,12 @@ export class User_ {
3293
3303
  LinkedEntityRecordID?: number;
3294
3304
 
3295
3305
  @Field()
3296
- @MaxLength(8)
3297
- CreatedAt: Date;
3306
+ @MaxLength(10)
3307
+ _mj__CreatedAt: Date;
3298
3308
 
3299
3309
  @Field()
3300
- @MaxLength(8)
3301
- UpdatedAt: Date;
3310
+ @MaxLength(10)
3311
+ _mj__UpdatedAt: Date;
3302
3312
 
3303
3313
  @Field({nullable: true})
3304
3314
  @MaxLength(202)
@@ -3411,6 +3421,9 @@ export class User_ {
3411
3421
  @Field(() => [mj_core_schema_server_object_types.RecommendationRun_])
3412
3422
  RecommendationRunsArray: mj_core_schema_server_object_types.RecommendationRun_[]; // Link to RecommendationRuns
3413
3423
 
3424
+ @Field(() => [mj_core_schema_server_object_types.RecordChangeReplayRun_])
3425
+ RecordChangeReplayRunsArray: mj_core_schema_server_object_types.RecordChangeReplayRun_[]; // Link to RecordChangeReplayRuns
3426
+
3414
3427
  }
3415
3428
 
3416
3429
  //****************************************************************************
@@ -3789,6 +3802,14 @@ export class UserResolverBase extends ResolverBase {
3789
3802
  const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Runs', await dataSource.query(sSQL));
3790
3803
  return result;
3791
3804
  }
3805
+
3806
+ @FieldResolver(() => [mj_core_schema_server_object_types.RecordChangeReplayRun_])
3807
+ async RecordChangeReplayRunsArray(@Root() user_: User_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
3808
+ this.CheckUserReadPermissions('Record Change Replay Runs', userPayload);
3809
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChangeReplayRuns] WHERE [UserID]=${user_.ID} ` + this.getRowLevelSecurityWhereClause('Record Change Replay Runs', userPayload, EntityPermissionType.Read, 'AND');
3810
+ const result = this.ArrayMapFieldNamesToCodeNames('Record Change Replay Runs', await dataSource.query(sSQL));
3811
+ return result;
3812
+ }
3792
3813
 
3793
3814
  @Mutation(() => User_)
3794
3815
  async CreateUser(
@@ -3863,24 +3884,42 @@ export class EntityRelationship_ {
3863
3884
  @MaxLength(510)
3864
3885
  JoinEntityInverseJoinField?: string;
3865
3886
 
3866
- @Field(() => Boolean)
3887
+ @Field(() => Boolean, {description: 'When unchecked the relationship will NOT be displayed on the generated form'})
3867
3888
  DisplayInForm: boolean;
3868
3889
 
3869
- @Field({nullable: true})
3890
+ @Field()
3891
+ @MaxLength(100)
3892
+ DisplayLocation: string;
3893
+
3894
+ @Field({nullable: true, description: 'Optional, when specified this value overrides the related entity name for the label on the tab'})
3870
3895
  @MaxLength(510)
3871
3896
  DisplayName?: string;
3872
3897
 
3898
+ @Field({description: 'When Related Entity Icon - uses the icon from the related entity, if one exists. When Custom, uses the value in the DisplayIcon field in this record, and when None, no icon is displayed'})
3899
+ @MaxLength(100)
3900
+ DisplayIconType: string;
3901
+
3902
+ @Field({nullable: true, description: 'If specified, the icon '})
3903
+ @MaxLength(510)
3904
+ DisplayIcon?: string;
3905
+
3873
3906
  @Field({nullable: true})
3874
3907
  @MaxLength(16)
3875
3908
  DisplayUserViewGUID?: string;
3876
3909
 
3910
+ @Field(() => Int, {nullable: true, description: 'If specified, this component will be used for displaying the relationship within the parent entity\'s form'})
3911
+ DisplayComponentID?: number;
3912
+
3913
+ @Field({nullable: true, description: 'If DisplayComponentID is specified, this field can optionally be used to track component-specific and relationship-specific configuration details that will be used by CodeGen to provide to the display component selected.'})
3914
+ DisplayComponentConfiguration?: string;
3915
+
3877
3916
  @Field()
3878
- @MaxLength(8)
3879
- CreatedAt: Date;
3917
+ @MaxLength(10)
3918
+ _mj__CreatedAt: Date;
3880
3919
 
3881
3920
  @Field()
3882
- @MaxLength(8)
3883
- UpdatedAt: Date;
3921
+ @MaxLength(10)
3922
+ _mj__UpdatedAt: Date;
3884
3923
 
3885
3924
  @Field()
3886
3925
  @MaxLength(510)
@@ -3965,8 +4004,23 @@ export class CreateEntityRelationshipInput {
3965
4004
  @Field(() => Boolean)
3966
4005
  DisplayInForm: boolean;
3967
4006
 
4007
+ @Field()
4008
+ DisplayLocation: string;
4009
+
3968
4010
  @Field({ nullable: true })
3969
4011
  DisplayName?: string;
4012
+
4013
+ @Field()
4014
+ DisplayIconType: string;
4015
+
4016
+ @Field({ nullable: true })
4017
+ DisplayIcon?: string;
4018
+
4019
+ @Field(() => Int, { nullable: true })
4020
+ DisplayComponentID?: number;
4021
+
4022
+ @Field({ nullable: true })
4023
+ DisplayComponentConfiguration?: string;
3970
4024
  }
3971
4025
 
3972
4026
 
@@ -4014,9 +4068,24 @@ export class UpdateEntityRelationshipInput {
4014
4068
  @Field(() => Boolean)
4015
4069
  DisplayInForm: boolean;
4016
4070
 
4071
+ @Field()
4072
+ DisplayLocation: string;
4073
+
4017
4074
  @Field({ nullable: true })
4018
4075
  DisplayName?: string;
4019
4076
 
4077
+ @Field()
4078
+ DisplayIconType: string;
4079
+
4080
+ @Field({ nullable: true })
4081
+ DisplayIcon?: string;
4082
+
4083
+ @Field(() => Int, { nullable: true })
4084
+ DisplayComponentID?: number;
4085
+
4086
+ @Field({ nullable: true })
4087
+ DisplayComponentConfiguration?: string;
4088
+
4020
4089
  @Field(() => [KeyValuePairInput], { nullable: true })
4021
4090
  OldValues___?: KeyValuePairInput[];
4022
4091
  }
@@ -4319,13 +4388,13 @@ export class UserView_ {
4319
4388
  @Field({nullable: true})
4320
4389
  SortState?: string;
4321
4390
 
4322
- @Field({nullable: true})
4323
- @MaxLength(8)
4324
- CreatedAt?: Date;
4391
+ @Field()
4392
+ @MaxLength(10)
4393
+ _mj__CreatedAt: Date;
4325
4394
 
4326
- @Field({nullable: true})
4327
- @MaxLength(8)
4328
- UpdatedAt?: Date;
4395
+ @Field()
4396
+ @MaxLength(10)
4397
+ _mj__UpdatedAt: Date;
4329
4398
 
4330
4399
  @Field()
4331
4400
  @MaxLength(200)
@@ -5064,12 +5133,12 @@ export class Application_ {
5064
5133
  DefaultForNewUser: boolean;
5065
5134
 
5066
5135
  @Field()
5067
- @MaxLength(8)
5068
- CreatedAt: Date;
5136
+ @MaxLength(10)
5137
+ _mj__CreatedAt: Date;
5069
5138
 
5070
5139
  @Field()
5071
- @MaxLength(8)
5072
- UpdatedAt: Date;
5140
+ @MaxLength(10)
5141
+ _mj__UpdatedAt: Date;
5073
5142
 
5074
5143
  @Field(() => [mj_core_schema_server_object_types.ApplicationEntity_])
5075
5144
  ApplicationEntitiesArray: mj_core_schema_server_object_types.ApplicationEntity_[]; // Link to ApplicationEntities
@@ -5257,12 +5326,12 @@ export class ApplicationEntity_ {
5257
5326
  DefaultForNewUser: boolean;
5258
5327
 
5259
5328
  @Field()
5260
- @MaxLength(8)
5261
- CreatedAt: Date;
5329
+ @MaxLength(10)
5330
+ _mj__CreatedAt: Date;
5262
5331
 
5263
5332
  @Field()
5264
- @MaxLength(8)
5265
- UpdatedAt: Date;
5333
+ @MaxLength(10)
5334
+ _mj__UpdatedAt: Date;
5266
5335
 
5267
5336
  @Field()
5268
5337
  @MaxLength(100)
@@ -5448,12 +5517,12 @@ export class EntityPermission_ {
5448
5517
  DeleteRLSFilterID?: number;
5449
5518
 
5450
5519
  @Field()
5451
- @MaxLength(8)
5452
- CreatedAt: Date;
5520
+ @MaxLength(10)
5521
+ _mj__CreatedAt: Date;
5453
5522
 
5454
5523
  @Field()
5455
- @MaxLength(8)
5456
- UpdatedAt: Date;
5524
+ @MaxLength(10)
5525
+ _mj__UpdatedAt: Date;
5457
5526
 
5458
5527
  @Field()
5459
5528
  @MaxLength(510)
@@ -7165,15 +7234,15 @@ export class RecordChange_ {
7165
7234
  @MaxLength(40)
7166
7235
  Type: string;
7167
7236
 
7168
- @Field({nullable: true, description: 'Internal or External'})
7237
+ @Field({description: 'Internal or External'})
7169
7238
  @MaxLength(40)
7170
- Source?: string;
7239
+ Source: string;
7171
7240
 
7172
7241
  @Field(() => Int, {nullable: true, description: 'If Source=External, this field can optionally specify which integration created the change, if known'})
7173
7242
  IntegrationID?: number;
7174
7243
 
7175
7244
  @Field({description: 'The date/time that the change occured.'})
7176
- @MaxLength(8)
7245
+ @MaxLength(10)
7177
7246
  ChangedAt: Date;
7178
7247
 
7179
7248
  @Field({description: 'JSON structure that describes what was changed in a structured format.'})
@@ -7189,6 +7258,9 @@ export class RecordChange_ {
7189
7258
  @MaxLength(100)
7190
7259
  Status: string;
7191
7260
 
7261
+ @Field(() => Int, {nullable: true, description: 'For external changes only, this run ID is the link to the replay run that the change record was part of'})
7262
+ ReplayRunID?: number;
7263
+
7192
7264
  @Field({nullable: true})
7193
7265
  ErrorLog?: string;
7194
7266
 
@@ -7196,11 +7268,11 @@ export class RecordChange_ {
7196
7268
  Comments?: string;
7197
7269
 
7198
7270
  @Field()
7199
- @MaxLength(8)
7271
+ @MaxLength(10)
7200
7272
  CreatedAt: Date;
7201
7273
 
7202
7274
  @Field()
7203
- @MaxLength(8)
7275
+ @MaxLength(10)
7204
7276
  UpdatedAt: Date;
7205
7277
 
7206
7278
  @Field()
@@ -7234,8 +7306,60 @@ export class CreateRecordChangeInput {
7234
7306
  @Field()
7235
7307
  Type: string;
7236
7308
 
7309
+ @Field()
7310
+ Source: string;
7311
+
7312
+ @Field(() => Int, { nullable: true })
7313
+ IntegrationID?: number;
7314
+
7315
+ @Field()
7316
+ ChangedAt: Date;
7317
+
7318
+ @Field()
7319
+ ChangesJSON: string;
7320
+
7321
+ @Field()
7322
+ ChangesDescription: string;
7323
+
7324
+ @Field()
7325
+ FullRecordJSON: string;
7326
+
7327
+ @Field()
7328
+ Status: string;
7329
+
7330
+ @Field(() => Int, { nullable: true })
7331
+ ReplayRunID?: number;
7332
+
7333
+ @Field({ nullable: true })
7334
+ ErrorLog?: string;
7335
+
7237
7336
  @Field({ nullable: true })
7238
- Source?: string;
7337
+ Comments?: string;
7338
+ }
7339
+
7340
+
7341
+ //****************************************************************************
7342
+ // INPUT TYPE for Record Changes
7343
+ //****************************************************************************
7344
+ @InputType()
7345
+ export class UpdateRecordChangeInput {
7346
+ @Field(() => Int)
7347
+ ID: number;
7348
+
7349
+ @Field(() => Int)
7350
+ EntityID: number;
7351
+
7352
+ @Field()
7353
+ RecordID: string;
7354
+
7355
+ @Field(() => Int)
7356
+ UserID: number;
7357
+
7358
+ @Field()
7359
+ Type: string;
7360
+
7361
+ @Field()
7362
+ Source: string;
7239
7363
 
7240
7364
  @Field(() => Int, { nullable: true })
7241
7365
  IntegrationID?: number;
@@ -7255,11 +7379,17 @@ export class CreateRecordChangeInput {
7255
7379
  @Field()
7256
7380
  Status: string;
7257
7381
 
7382
+ @Field(() => Int, { nullable: true })
7383
+ ReplayRunID?: number;
7384
+
7258
7385
  @Field({ nullable: true })
7259
7386
  ErrorLog?: string;
7260
7387
 
7261
7388
  @Field({ nullable: true })
7262
7389
  Comments?: string;
7390
+
7391
+ @Field(() => [KeyValuePairInput], { nullable: true })
7392
+ OldValues___?: KeyValuePairInput[];
7263
7393
  }
7264
7394
 
7265
7395
  //****************************************************************************
@@ -7323,6 +7453,15 @@ export class RecordChangeResolver extends ResolverBase {
7323
7453
  return this.CreateRecord('Record Changes', input, dataSource, userPayload, pubSub)
7324
7454
  }
7325
7455
 
7456
+ @Mutation(() => RecordChange_)
7457
+ async UpdateRecordChange(
7458
+ @Arg('input', () => UpdateRecordChangeInput) input: UpdateRecordChangeInput,
7459
+ @Ctx() { dataSource, userPayload }: AppContext,
7460
+ @PubSub() pubSub: PubSubEngine
7461
+ ) {
7462
+ return this.UpdateRecord('Record Changes', input, dataSource, userPayload, pubSub);
7463
+ }
7464
+
7326
7465
  }
7327
7466
 
7328
7467
  //****************************************************************************
@@ -7341,12 +7480,12 @@ export class UserRole_ {
7341
7480
  RoleName: string;
7342
7481
 
7343
7482
  @Field()
7344
- @MaxLength(8)
7345
- CreatedAt: Date;
7483
+ @MaxLength(10)
7484
+ _mj__CreatedAt: Date;
7346
7485
 
7347
7486
  @Field()
7348
- @MaxLength(8)
7349
- UpdatedAt: Date;
7487
+ @MaxLength(10)
7488
+ _mj__UpdatedAt: Date;
7350
7489
 
7351
7490
  @Field()
7352
7491
  @MaxLength(200)
@@ -7462,12 +7601,12 @@ export class RowLevelSecurityFilter_ {
7462
7601
  FilterText?: string;
7463
7602
 
7464
7603
  @Field()
7465
- @MaxLength(8)
7466
- CreatedAt: Date;
7604
+ @MaxLength(10)
7605
+ _mj__CreatedAt: Date;
7467
7606
 
7468
7607
  @Field()
7469
- @MaxLength(8)
7470
- UpdatedAt: Date;
7608
+ @MaxLength(10)
7609
+ _mj__UpdatedAt: Date;
7471
7610
 
7472
7611
  @Field(() => [mj_core_schema_server_object_types.EntityPermission_])
7473
7612
  EntityPermissionsArray: mj_core_schema_server_object_types.EntityPermission_[]; // Link to EntityPermissions
@@ -7761,12 +7900,12 @@ export class Authorization_ {
7761
7900
  Description?: string;
7762
7901
 
7763
7902
  @Field()
7764
- @MaxLength(8)
7765
- CreatedAt: Date;
7903
+ @MaxLength(10)
7904
+ _mj__CreatedAt: Date;
7766
7905
 
7767
7906
  @Field()
7768
- @MaxLength(8)
7769
- UpdatedAt: Date;
7907
+ @MaxLength(10)
7908
+ _mj__UpdatedAt: Date;
7770
7909
 
7771
7910
  @Field({nullable: true})
7772
7911
  @MaxLength(200)
@@ -8004,12 +8143,12 @@ export class AuditLogType_ {
8004
8143
  AuthorizationName?: string;
8005
8144
 
8006
8145
  @Field()
8007
- @MaxLength(8)
8008
- CreatedAt: Date;
8146
+ @MaxLength(10)
8147
+ _mj__CreatedAt: Date;
8009
8148
 
8010
8149
  @Field()
8011
- @MaxLength(8)
8012
- UpdatedAt: Date;
8150
+ @MaxLength(10)
8151
+ _mj__UpdatedAt: Date;
8013
8152
 
8014
8153
  @Field({nullable: true})
8015
8154
  @MaxLength(100)
@@ -8130,12 +8269,12 @@ export class EntityFieldValue_ {
8130
8269
  Description?: string;
8131
8270
 
8132
8271
  @Field()
8133
- @MaxLength(8)
8134
- CreatedAt: Date;
8272
+ @MaxLength(10)
8273
+ _mj__CreatedAt: Date;
8135
8274
 
8136
8275
  @Field()
8137
- @MaxLength(8)
8138
- UpdatedAt: Date;
8276
+ @MaxLength(10)
8277
+ _mj__UpdatedAt: Date;
8139
8278
 
8140
8279
  @Field()
8141
8280
  @MaxLength(510)
@@ -8146,6 +8285,37 @@ export class EntityFieldValue_ {
8146
8285
  Entity: string;
8147
8286
 
8148
8287
  }
8288
+
8289
+ //****************************************************************************
8290
+ // INPUT TYPE for Entity Field Values
8291
+ //****************************************************************************
8292
+ @InputType()
8293
+ export class UpdateEntityFieldValueInput {
8294
+ @Field(() => Int)
8295
+ ID: number;
8296
+
8297
+ @Field(() => Int)
8298
+ EntityID: number;
8299
+
8300
+ @Field()
8301
+ EntityFieldName: string;
8302
+
8303
+ @Field(() => Int)
8304
+ Sequence: number;
8305
+
8306
+ @Field()
8307
+ Value: string;
8308
+
8309
+ @Field({ nullable: true })
8310
+ Code?: string;
8311
+
8312
+ @Field({ nullable: true })
8313
+ Description?: string;
8314
+
8315
+ @Field(() => [KeyValuePairInput], { nullable: true })
8316
+ OldValues___?: KeyValuePairInput[];
8317
+ }
8318
+
8149
8319
  //****************************************************************************
8150
8320
  // RESOLVER for Entity Field Values
8151
8321
  //****************************************************************************
@@ -8206,6 +8376,15 @@ export class EntityFieldValueResolver extends ResolverBase {
8206
8376
  return result;
8207
8377
  }
8208
8378
 
8379
+ @Mutation(() => EntityFieldValue_)
8380
+ async UpdateEntityFieldValue(
8381
+ @Arg('input', () => UpdateEntityFieldValueInput) input: UpdateEntityFieldValueInput,
8382
+ @Ctx() { dataSource, userPayload }: AppContext,
8383
+ @PubSub() pubSub: PubSubEngine
8384
+ ) {
8385
+ return this.UpdateRecord('Entity Field Values', input, dataSource, userPayload, pubSub);
8386
+ }
8387
+
8209
8388
  }
8210
8389
 
8211
8390
  //****************************************************************************
@@ -8877,6 +9056,14 @@ export class EntityAIAction_ {
8877
9056
  @Field({nullable: true})
8878
9057
  Comments?: string;
8879
9058
 
9059
+ @Field()
9060
+ @MaxLength(10)
9061
+ _mj__CreatedAt: Date;
9062
+
9063
+ @Field()
9064
+ @MaxLength(10)
9065
+ _mj__UpdatedAt: Date;
9066
+
8880
9067
  @Field()
8881
9068
  @MaxLength(510)
8882
9069
  Entity: string;
@@ -10668,12 +10855,12 @@ export class ResourceType_ {
10668
10855
  EntityID?: number;
10669
10856
 
10670
10857
  @Field()
10671
- @MaxLength(8)
10672
- CreatedAt: Date;
10858
+ @MaxLength(10)
10859
+ _mj__CreatedAt: Date;
10673
10860
 
10674
10861
  @Field()
10675
- @MaxLength(8)
10676
- UpdatedAt: Date;
10862
+ @MaxLength(10)
10863
+ _mj__UpdatedAt: Date;
10677
10864
 
10678
10865
  @Field({nullable: true})
10679
10866
  @MaxLength(510)
@@ -12799,12 +12986,12 @@ export class QueryField_ {
12799
12986
  SummaryDescription?: string;
12800
12987
 
12801
12988
  @Field()
12802
- @MaxLength(8)
12803
- CreatedAt: Date;
12989
+ @MaxLength(10)
12990
+ _mj__CreatedAt: Date;
12804
12991
 
12805
12992
  @Field()
12806
- @MaxLength(8)
12807
- UpdatedAt: Date;
12993
+ @MaxLength(10)
12994
+ _mj__UpdatedAt: Date;
12808
12995
 
12809
12996
  @Field()
12810
12997
  @MaxLength(510)
@@ -12997,16 +13184,16 @@ export class QueryCategory_ {
12997
13184
  @Field({nullable: true})
12998
13185
  Description?: string;
12999
13186
 
13000
- @Field()
13001
- @MaxLength(8)
13002
- CreatedAt: Date;
13187
+ @Field(() => Int)
13188
+ UserID: number;
13003
13189
 
13004
13190
  @Field()
13005
- @MaxLength(8)
13006
- UpdatedAt: Date;
13191
+ @MaxLength(10)
13192
+ _mj__CreatedAt: Date;
13007
13193
 
13008
- @Field(() => Int)
13009
- UserID: number;
13194
+ @Field()
13195
+ @MaxLength(10)
13196
+ _mj__UpdatedAt: Date;
13010
13197
 
13011
13198
  @Field({nullable: true})
13012
13199
  @MaxLength(100)
@@ -13205,12 +13392,12 @@ export class Query_ {
13205
13392
  ExecutionCostRank?: number;
13206
13393
 
13207
13394
  @Field()
13208
- @MaxLength(8)
13209
- CreatedAt: Date;
13395
+ @MaxLength(10)
13396
+ _mj__CreatedAt: Date;
13210
13397
 
13211
13398
  @Field()
13212
- @MaxLength(8)
13213
- UpdatedAt: Date;
13399
+ @MaxLength(10)
13400
+ _mj__UpdatedAt: Date;
13214
13401
 
13215
13402
  @Field({nullable: true})
13216
13403
  @MaxLength(100)
@@ -13424,12 +13611,12 @@ export class QueryPermission_ {
13424
13611
  RoleName: string;
13425
13612
 
13426
13613
  @Field()
13427
- @MaxLength(8)
13428
- CreatedAt: Date;
13614
+ @MaxLength(10)
13615
+ _mj__CreatedAt: Date;
13429
13616
 
13430
13617
  @Field()
13431
- @MaxLength(8)
13432
- UpdatedAt: Date;
13618
+ @MaxLength(10)
13619
+ _mj__UpdatedAt: Date;
13433
13620
 
13434
13621
  }
13435
13622
 
@@ -13706,12 +13893,12 @@ export class EntityDocumentType_ {
13706
13893
  Description?: string;
13707
13894
 
13708
13895
  @Field()
13709
- @MaxLength(8)
13710
- CreatedAt: Date;
13896
+ @MaxLength(10)
13897
+ _mj__CreatedAt: Date;
13711
13898
 
13712
13899
  @Field()
13713
- @MaxLength(8)
13714
- UpdatedAt: Date;
13900
+ @MaxLength(10)
13901
+ _mj__UpdatedAt: Date;
13715
13902
 
13716
13903
  @Field(() => [mj_core_schema_server_object_types.EntityDocument_])
13717
13904
  EntityDocumentsArray: mj_core_schema_server_object_types.EntityDocument_[]; // Link to EntityDocuments
@@ -13853,12 +14040,12 @@ export class EntityDocumentRun_ {
13853
14040
  Status: string;
13854
14041
 
13855
14042
  @Field()
13856
- @MaxLength(8)
13857
- CreatedAt: Date;
14043
+ @MaxLength(10)
14044
+ _mj__CreatedAt: Date;
13858
14045
 
13859
14046
  @Field()
13860
- @MaxLength(8)
13861
- UpdatedAt: Date;
14047
+ @MaxLength(10)
14048
+ _mj__UpdatedAt: Date;
13862
14049
 
13863
14050
  @Field()
13864
14051
  @MaxLength(500)
@@ -14183,16 +14370,16 @@ export class EntityRecordDocument_ {
14183
14370
  @MaxLength(8)
14184
14371
  EntityRecordUpdatedAt: Date;
14185
14372
 
14186
- @Field()
14187
- @MaxLength(8)
14188
- CreatedAt: Date;
14373
+ @Field(() => Int)
14374
+ EntityDocumentID: number;
14189
14375
 
14190
14376
  @Field()
14191
- @MaxLength(8)
14192
- UpdatedAt: Date;
14377
+ @MaxLength(10)
14378
+ _mj__CreatedAt: Date;
14193
14379
 
14194
- @Field(() => Int)
14195
- EntityDocumentID: number;
14380
+ @Field()
14381
+ @MaxLength(10)
14382
+ _mj__UpdatedAt: Date;
14196
14383
 
14197
14384
  }
14198
14385
 
@@ -14373,12 +14560,12 @@ export class EntityDocument_ {
14373
14560
  AbsoluteMatchThreshold: number;
14374
14561
 
14375
14562
  @Field()
14376
- @MaxLength(8)
14377
- CreatedAt: Date;
14563
+ @MaxLength(10)
14564
+ _mj__CreatedAt: Date;
14378
14565
 
14379
14566
  @Field()
14380
- @MaxLength(8)
14381
- UpdatedAt: Date;
14567
+ @MaxLength(10)
14568
+ _mj__UpdatedAt: Date;
14382
14569
 
14383
14570
  @Field()
14384
14571
  @MaxLength(510)
@@ -16614,12 +16801,12 @@ export class EntityDocumentSetting_ {
16614
16801
  Comments?: string;
16615
16802
 
16616
16803
  @Field()
16617
- @MaxLength(8)
16618
- CreatedAt: Date;
16804
+ @MaxLength(10)
16805
+ _mj__CreatedAt: Date;
16619
16806
 
16620
16807
  @Field()
16621
- @MaxLength(8)
16622
- UpdatedAt: Date;
16808
+ @MaxLength(10)
16809
+ _mj__UpdatedAt: Date;
16623
16810
 
16624
16811
  @Field()
16625
16812
  @MaxLength(500)
@@ -16764,12 +16951,12 @@ export class EntitySetting_ {
16764
16951
  Comments?: string;
16765
16952
 
16766
16953
  @Field()
16767
- @MaxLength(8)
16768
- CreatedAt: Date;
16954
+ @MaxLength(10)
16955
+ _mj__CreatedAt: Date;
16769
16956
 
16770
16957
  @Field()
16771
- @MaxLength(8)
16772
- UpdatedAt: Date;
16958
+ @MaxLength(10)
16959
+ _mj__UpdatedAt: Date;
16773
16960
 
16774
16961
  @Field()
16775
16962
  @MaxLength(510)
@@ -17338,12 +17525,12 @@ export class EntityBehavior_ {
17338
17525
  CodeGenerated: boolean;
17339
17526
 
17340
17527
  @Field()
17341
- @MaxLength(8)
17342
- CreatedAt: Date;
17528
+ @MaxLength(10)
17529
+ _mj__CreatedAt: Date;
17343
17530
 
17344
17531
  @Field()
17345
- @MaxLength(8)
17346
- UpdatedAt: Date;
17532
+ @MaxLength(10)
17533
+ _mj__UpdatedAt: Date;
17347
17534
 
17348
17535
  @Field()
17349
17536
  @MaxLength(510)
@@ -17506,12 +17693,12 @@ export class EntityBehaviorType_ {
17506
17693
  Description?: string;
17507
17694
 
17508
17695
  @Field()
17509
- @MaxLength(8)
17510
- CreatedAt: Date;
17696
+ @MaxLength(10)
17697
+ _mj__CreatedAt: Date;
17511
17698
 
17512
17699
  @Field()
17513
- @MaxLength(8)
17514
- UpdatedAt: Date;
17700
+ @MaxLength(10)
17701
+ _mj__UpdatedAt: Date;
17515
17702
 
17516
17703
  @Field(() => [mj_core_schema_server_object_types.EntityBehavior_])
17517
17704
  EntityBehaviorsArray: mj_core_schema_server_object_types.EntityBehavior_[]; // Link to EntityBehaviors
@@ -17658,12 +17845,12 @@ export class ApplicationSetting_ {
17658
17845
  Comments?: string;
17659
17846
 
17660
17847
  @Field()
17661
- @MaxLength(8)
17662
- CreatedAt: Date;
17848
+ @MaxLength(10)
17849
+ _mj__CreatedAt: Date;
17663
17850
 
17664
17851
  @Field()
17665
- @MaxLength(8)
17666
- UpdatedAt: Date;
17852
+ @MaxLength(10)
17853
+ _mj__UpdatedAt: Date;
17667
17854
 
17668
17855
  }
17669
17856
 
@@ -17811,12 +17998,12 @@ export class ActionCategory_ {
17811
17998
  Status: string;
17812
17999
 
17813
18000
  @Field()
17814
- @MaxLength(8)
17815
- CreatedAt: Date;
18001
+ @MaxLength(10)
18002
+ _mj__CreatedAt: Date;
17816
18003
 
17817
18004
  @Field()
17818
- @MaxLength(8)
17819
- UpdatedAt: Date;
18005
+ @MaxLength(10)
18006
+ _mj__UpdatedAt: Date;
17820
18007
 
17821
18008
  @Field({nullable: true})
17822
18009
  @MaxLength(510)
@@ -17986,12 +18173,12 @@ export class EntityAction_ {
17986
18173
  Status: string;
17987
18174
 
17988
18175
  @Field()
17989
- @MaxLength(8)
17990
- CreatedAt: Date;
18176
+ @MaxLength(10)
18177
+ _mj__CreatedAt: Date;
17991
18178
 
17992
18179
  @Field()
17993
- @MaxLength(8)
17994
- UpdatedAt: Date;
18180
+ @MaxLength(10)
18181
+ _mj__UpdatedAt: Date;
17995
18182
 
17996
18183
  @Field()
17997
18184
  @MaxLength(510)
@@ -18159,12 +18346,12 @@ export class EntityActionInvocation_ {
18159
18346
  Status: string;
18160
18347
 
18161
18348
  @Field()
18162
- @MaxLength(8)
18163
- CreatedAt: Date;
18349
+ @MaxLength(10)
18350
+ _mj__CreatedAt: Date;
18164
18351
 
18165
18352
  @Field()
18166
- @MaxLength(8)
18167
- UpdatedAt: Date;
18353
+ @MaxLength(10)
18354
+ _mj__UpdatedAt: Date;
18168
18355
 
18169
18356
  @Field()
18170
18357
  @MaxLength(510)
@@ -18453,12 +18640,12 @@ export class EntityActionInvocationType_ {
18453
18640
  DisplaySequence: number;
18454
18641
 
18455
18642
  @Field()
18456
- @MaxLength(8)
18457
- CreatedAt: Date;
18643
+ @MaxLength(10)
18644
+ _mj__CreatedAt: Date;
18458
18645
 
18459
18646
  @Field()
18460
- @MaxLength(8)
18461
- UpdatedAt: Date;
18647
+ @MaxLength(10)
18648
+ _mj__UpdatedAt: Date;
18462
18649
 
18463
18650
  @Field(() => [mj_core_schema_server_object_types.EntityActionInvocation_])
18464
18651
  EntityActionInvocationsArray: mj_core_schema_server_object_types.EntityActionInvocation_[]; // Link to EntityActionInvocations
@@ -18640,12 +18827,12 @@ export class Action_ {
18640
18827
  Status: string;
18641
18828
 
18642
18829
  @Field()
18643
- @MaxLength(8)
18644
- CreatedAt: Date;
18830
+ @MaxLength(10)
18831
+ _mj__CreatedAt: Date;
18645
18832
 
18646
18833
  @Field()
18647
- @MaxLength(8)
18648
- UpdatedAt: Date;
18834
+ @MaxLength(10)
18835
+ _mj__UpdatedAt: Date;
18649
18836
 
18650
18837
  @Field({nullable: true})
18651
18838
  @MaxLength(510)
@@ -18655,8 +18842,11 @@ export class Action_ {
18655
18842
  @MaxLength(200)
18656
18843
  CodeApprovedByUser?: string;
18657
18844
 
18658
- @Field(() => [mj_core_schema_server_object_types.ActionAuthorization_])
18659
- ActionAuthorizationsArray: mj_core_schema_server_object_types.ActionAuthorization_[]; // Link to ActionAuthorizations
18845
+ @Field(() => [mj_core_schema_server_object_types.ActionParam_])
18846
+ ActionParamsArray: mj_core_schema_server_object_types.ActionParam_[]; // Link to ActionParams
18847
+
18848
+ @Field(() => [mj_core_schema_server_object_types.ActionLibrary_])
18849
+ ActionLibrariesArray: mj_core_schema_server_object_types.ActionLibrary_[]; // Link to ActionLibraries
18660
18850
 
18661
18851
  @Field(() => [mj_core_schema_server_object_types.ActionResultCode_])
18662
18852
  ActionResultCodesArray: mj_core_schema_server_object_types.ActionResultCode_[]; // Link to ActionResultCodes
@@ -18670,11 +18860,8 @@ export class Action_ {
18670
18860
  @Field(() => [mj_core_schema_server_object_types.ActionExecutionLog_])
18671
18861
  ActionExecutionLogsArray: mj_core_schema_server_object_types.ActionExecutionLog_[]; // Link to ActionExecutionLogs
18672
18862
 
18673
- @Field(() => [mj_core_schema_server_object_types.ActionParam_])
18674
- ActionParamsArray: mj_core_schema_server_object_types.ActionParam_[]; // Link to ActionParams
18675
-
18676
- @Field(() => [mj_core_schema_server_object_types.ActionLibrary_])
18677
- ActionLibrariesArray: mj_core_schema_server_object_types.ActionLibrary_[]; // Link to ActionLibraries
18863
+ @Field(() => [mj_core_schema_server_object_types.ActionAuthorization_])
18864
+ ActionAuthorizationsArray: mj_core_schema_server_object_types.ActionAuthorization_[]; // Link to ActionAuthorizations
18678
18865
 
18679
18866
  }
18680
18867
 
@@ -18827,11 +19014,19 @@ export class ActionResolver extends ResolverBase {
18827
19014
  return result;
18828
19015
  }
18829
19016
 
18830
- @FieldResolver(() => [mj_core_schema_server_object_types.ActionAuthorization_])
18831
- async ActionAuthorizationsArray(@Root() action_: Action_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
18832
- this.CheckUserReadPermissions('Action Authorizations', userPayload);
18833
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionAuthorizations] WHERE [ActionID]=${action_.ID} ` + this.getRowLevelSecurityWhereClause('Action Authorizations', userPayload, EntityPermissionType.Read, 'AND');
18834
- const result = this.ArrayMapFieldNamesToCodeNames('Action Authorizations', await dataSource.query(sSQL));
19017
+ @FieldResolver(() => [mj_core_schema_server_object_types.ActionParam_])
19018
+ async ActionParamsArray(@Root() action_: Action_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
19019
+ this.CheckUserReadPermissions('Action Params', userPayload);
19020
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionParams] WHERE [ActionID]=${action_.ID} ` + this.getRowLevelSecurityWhereClause('Action Params', userPayload, EntityPermissionType.Read, 'AND');
19021
+ const result = this.ArrayMapFieldNamesToCodeNames('Action Params', await dataSource.query(sSQL));
19022
+ return result;
19023
+ }
19024
+
19025
+ @FieldResolver(() => [mj_core_schema_server_object_types.ActionLibrary_])
19026
+ async ActionLibrariesArray(@Root() action_: Action_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
19027
+ this.CheckUserReadPermissions('Action Libraries', userPayload);
19028
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionLibraries] WHERE [ActionID]=${action_.ID} ` + this.getRowLevelSecurityWhereClause('Action Libraries', userPayload, EntityPermissionType.Read, 'AND');
19029
+ const result = this.ArrayMapFieldNamesToCodeNames('Action Libraries', await dataSource.query(sSQL));
18835
19030
  return result;
18836
19031
  }
18837
19032
 
@@ -18867,19 +19062,11 @@ export class ActionResolver extends ResolverBase {
18867
19062
  return result;
18868
19063
  }
18869
19064
 
18870
- @FieldResolver(() => [mj_core_schema_server_object_types.ActionParam_])
18871
- async ActionParamsArray(@Root() action_: Action_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
18872
- this.CheckUserReadPermissions('Action Params', userPayload);
18873
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionParams] WHERE [ActionID]=${action_.ID} ` + this.getRowLevelSecurityWhereClause('Action Params', userPayload, EntityPermissionType.Read, 'AND');
18874
- const result = this.ArrayMapFieldNamesToCodeNames('Action Params', await dataSource.query(sSQL));
18875
- return result;
18876
- }
18877
-
18878
- @FieldResolver(() => [mj_core_schema_server_object_types.ActionLibrary_])
18879
- async ActionLibrariesArray(@Root() action_: Action_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
18880
- this.CheckUserReadPermissions('Action Libraries', userPayload);
18881
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionLibraries] WHERE [ActionID]=${action_.ID} ` + this.getRowLevelSecurityWhereClause('Action Libraries', userPayload, EntityPermissionType.Read, 'AND');
18882
- const result = this.ArrayMapFieldNamesToCodeNames('Action Libraries', await dataSource.query(sSQL));
19065
+ @FieldResolver(() => [mj_core_schema_server_object_types.ActionAuthorization_])
19066
+ async ActionAuthorizationsArray(@Root() action_: Action_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
19067
+ this.CheckUserReadPermissions('Action Authorizations', userPayload);
19068
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionAuthorizations] WHERE [ActionID]=${action_.ID} ` + this.getRowLevelSecurityWhereClause('Action Authorizations', userPayload, EntityPermissionType.Read, 'AND');
19069
+ const result = this.ArrayMapFieldNamesToCodeNames('Action Authorizations', await dataSource.query(sSQL));
18883
19070
  return result;
18884
19071
  }
18885
19072
 
@@ -18931,12 +19118,12 @@ export class EntityActionFilter_ {
18931
19118
  Status: string;
18932
19119
 
18933
19120
  @Field()
18934
- @MaxLength(8)
18935
- CreatedAt: Date;
19121
+ @MaxLength(10)
19122
+ _mj__CreatedAt: Date;
18936
19123
 
18937
19124
  @Field()
18938
- @MaxLength(8)
18939
- UpdatedAt: Date;
19125
+ @MaxLength(10)
19126
+ _mj__UpdatedAt: Date;
18940
19127
 
18941
19128
  }
18942
19129
 
@@ -19082,12 +19269,12 @@ export class ActionFilter_ {
19082
19269
  CodeExplanation?: string;
19083
19270
 
19084
19271
  @Field()
19085
- @MaxLength(8)
19086
- CreatedAt: Date;
19272
+ @MaxLength(10)
19273
+ _mj__CreatedAt: Date;
19087
19274
 
19088
19275
  @Field()
19089
- @MaxLength(8)
19090
- UpdatedAt: Date;
19276
+ @MaxLength(10)
19277
+ _mj__UpdatedAt: Date;
19091
19278
 
19092
19279
  @Field(() => [mj_core_schema_server_object_types.EntityActionFilter_])
19093
19280
  EntityActionFiltersArray: mj_core_schema_server_object_types.EntityActionFilter_[]; // Link to EntityActionFilters
@@ -19902,6 +20089,9 @@ export class ActionParam_ {
19902
20089
  @MaxLength(850)
19903
20090
  Action: string;
19904
20091
 
20092
+ @Field(() => [mj_core_schema_server_object_types.EntityActionParam_])
20093
+ EntityActionParamsArray: mj_core_schema_server_object_types.EntityActionParam_[]; // Link to EntityActionParams
20094
+
19905
20095
  }
19906
20096
 
19907
20097
  //****************************************************************************
@@ -20022,7 +20212,15 @@ export class ActionParamResolver extends ResolverBase {
20022
20212
  const result = this.MapFieldNamesToCodeNames('Action Params', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
20023
20213
  return result;
20024
20214
  }
20025
-
20215
+
20216
+ @FieldResolver(() => [mj_core_schema_server_object_types.EntityActionParam_])
20217
+ async EntityActionParamsArray(@Root() actionparam_: ActionParam_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
20218
+ this.CheckUserReadPermissions('Entity Action Params', userPayload);
20219
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityActionParams] WHERE [ActionParamID]=${actionparam_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Action Params', userPayload, EntityPermissionType.Read, 'AND');
20220
+ const result = this.ArrayMapFieldNamesToCodeNames('Entity Action Params', await dataSource.query(sSQL));
20221
+ return result;
20222
+ }
20223
+
20026
20224
  @Mutation(() => ActionParam_)
20027
20225
  async CreateActionParam(
20028
20226
  @Arg('input', () => CreateActionParamInput) input: CreateActionParamInput,
@@ -20218,9 +20416,6 @@ export class Library_ {
20218
20416
  @MaxLength(40)
20219
20417
  Status: string;
20220
20418
 
20221
- @Field({nullable: true, description: 'List of classes and functions exported by the library.'})
20222
- ExportedItems?: string;
20223
-
20224
20419
  @Field({nullable: true, description: 'Code showing the types and functions defined in the library to be used for reference by humans and AI'})
20225
20420
  TypeDefinitions?: string;
20226
20421
 
@@ -20228,16 +20423,19 @@ export class Library_ {
20228
20423
  SampleCode?: string;
20229
20424
 
20230
20425
  @Field()
20231
- @MaxLength(8)
20232
- CreatedAt: Date;
20426
+ @MaxLength(10)
20427
+ _mj__CreatedAt: Date;
20233
20428
 
20234
20429
  @Field()
20235
- @MaxLength(8)
20236
- UpdatedAt: Date;
20430
+ @MaxLength(10)
20431
+ _mj__UpdatedAt: Date;
20237
20432
 
20238
20433
  @Field(() => [mj_core_schema_server_object_types.ActionLibrary_])
20239
20434
  ActionLibrariesArray: mj_core_schema_server_object_types.ActionLibrary_[]; // Link to ActionLibraries
20240
20435
 
20436
+ @Field(() => [mj_core_schema_server_object_types.LibraryItem_])
20437
+ LibraryItemsArray: mj_core_schema_server_object_types.LibraryItem_[]; // Link to LibraryItems
20438
+
20241
20439
  }
20242
20440
 
20243
20441
  //****************************************************************************
@@ -20254,9 +20452,6 @@ export class CreateLibraryInput {
20254
20452
  @Field()
20255
20453
  Status: string;
20256
20454
 
20257
- @Field({ nullable: true })
20258
- ExportedItems?: string;
20259
-
20260
20455
  @Field({ nullable: true })
20261
20456
  TypeDefinitions?: string;
20262
20457
 
@@ -20282,9 +20477,6 @@ export class UpdateLibraryInput {
20282
20477
  @Field()
20283
20478
  Status: string;
20284
20479
 
20285
- @Field({ nullable: true })
20286
- ExportedItems?: string;
20287
-
20288
20480
  @Field({ nullable: true })
20289
20481
  TypeDefinitions?: string;
20290
20482
 
@@ -20354,6 +20546,14 @@ export class LibraryResolver extends ResolverBase {
20354
20546
  const result = this.ArrayMapFieldNamesToCodeNames('Action Libraries', await dataSource.query(sSQL));
20355
20547
  return result;
20356
20548
  }
20549
+
20550
+ @FieldResolver(() => [mj_core_schema_server_object_types.LibraryItem_])
20551
+ async LibraryItemsArray(@Root() library_: Library_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
20552
+ this.CheckUserReadPermissions('Library Items', userPayload);
20553
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwLibraryItems] WHERE [LibraryID]=${library_.ID} ` + this.getRowLevelSecurityWhereClause('Library Items', userPayload, EntityPermissionType.Read, 'AND');
20554
+ const result = this.ArrayMapFieldNamesToCodeNames('Library Items', await dataSource.query(sSQL));
20555
+ return result;
20556
+ }
20357
20557
 
20358
20558
  @Mutation(() => Library_)
20359
20559
  async CreateLibrary(
@@ -21063,6 +21263,12 @@ export class CommunicationProviderMessageTypeResolver extends ResolverBase {
21063
21263
  return this.UpdateRecord('Communication Provider Message Types', input, dataSource, userPayload, pubSub);
21064
21264
  }
21065
21265
 
21266
+ @Mutation(() => CommunicationProviderMessageType_)
21267
+ async DeleteCommunicationProviderMessageType(@Arg('ID', () => Int) ID: number, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
21268
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
21269
+ return this.DeleteRecord('Communication Provider Message Types', key, options, dataSource, userPayload, pubSub);
21270
+ }
21271
+
21066
21272
  }
21067
21273
 
21068
21274
  //****************************************************************************
@@ -22959,12 +23165,12 @@ export class EntityCommunicationMessageType_ {
22959
23165
  IsActive: boolean;
22960
23166
 
22961
23167
  @Field()
22962
- @MaxLength(8)
22963
- CreatedAt: Date;
23168
+ @MaxLength(10)
23169
+ _mj__CreatedAt: Date;
22964
23170
 
22965
23171
  @Field()
22966
- @MaxLength(8)
22967
- UpdatedAt: Date;
23172
+ @MaxLength(10)
23173
+ _mj__UpdatedAt: Date;
22968
23174
 
22969
23175
  @Field()
22970
23176
  @MaxLength(510)
@@ -23115,12 +23321,12 @@ export class EntityCommunicationField_ {
23115
23321
  Priority: number;
23116
23322
 
23117
23323
  @Field()
23118
- @MaxLength(8)
23119
- CreatedAt: Date;
23324
+ @MaxLength(10)
23325
+ _mj__CreatedAt: Date;
23120
23326
 
23121
23327
  @Field()
23122
- @MaxLength(8)
23123
- UpdatedAt: Date;
23328
+ @MaxLength(10)
23329
+ _mj__UpdatedAt: Date;
23124
23330
 
23125
23331
  }
23126
23332
 
@@ -23231,4 +23437,614 @@ export class EntityCommunicationFieldResolver extends ResolverBase {
23231
23437
  return this.UpdateRecord('Entity Communication Fields', input, dataSource, userPayload, pubSub);
23232
23438
  }
23233
23439
 
23440
+ }
23441
+
23442
+ //****************************************************************************
23443
+ // ENTITY CLASS for Record Change Replay Runs
23444
+ //****************************************************************************
23445
+ @ObjectType({ description: 'Table to track the runs of replaying external record changes' })
23446
+ export class RecordChangeReplayRun_ {
23447
+ @Field(() => Int)
23448
+ ID: number;
23449
+
23450
+ @Field({description: 'Timestamp when the replay run started'})
23451
+ @MaxLength(8)
23452
+ StartedAt: Date;
23453
+
23454
+ @Field({nullable: true, description: 'Timestamp when the replay run ended'})
23455
+ @MaxLength(8)
23456
+ EndedAt?: Date;
23457
+
23458
+ @Field({description: 'Status of the replay run (Pending, In Progress, Complete, Error)'})
23459
+ @MaxLength(100)
23460
+ Status: string;
23461
+
23462
+ @Field(() => Int)
23463
+ UserID: number;
23464
+
23465
+ @Field()
23466
+ @MaxLength(8)
23467
+ CreatedAt: Date;
23468
+
23469
+ @Field()
23470
+ @MaxLength(8)
23471
+ UpdatedAt: Date;
23472
+
23473
+ @Field()
23474
+ @MaxLength(200)
23475
+ User: string;
23476
+
23477
+ @Field(() => [mj_core_schema_server_object_types.RecordChange_])
23478
+ RecordChangesArray: mj_core_schema_server_object_types.RecordChange_[]; // Link to RecordChanges
23479
+
23480
+ }
23481
+
23482
+ //****************************************************************************
23483
+ // INPUT TYPE for Record Change Replay Runs
23484
+ //****************************************************************************
23485
+ @InputType()
23486
+ export class CreateRecordChangeReplayRunInput {
23487
+ @Field()
23488
+ StartedAt: Date;
23489
+
23490
+ @Field({ nullable: true })
23491
+ EndedAt?: Date;
23492
+
23493
+ @Field()
23494
+ Status: string;
23495
+
23496
+ @Field(() => Int)
23497
+ UserID: number;
23498
+ }
23499
+
23500
+
23501
+ //****************************************************************************
23502
+ // INPUT TYPE for Record Change Replay Runs
23503
+ //****************************************************************************
23504
+ @InputType()
23505
+ export class UpdateRecordChangeReplayRunInput {
23506
+ @Field(() => Int)
23507
+ ID: number;
23508
+
23509
+ @Field()
23510
+ StartedAt: Date;
23511
+
23512
+ @Field({ nullable: true })
23513
+ EndedAt?: Date;
23514
+
23515
+ @Field()
23516
+ Status: string;
23517
+
23518
+ @Field(() => Int)
23519
+ UserID: number;
23520
+
23521
+ @Field(() => [KeyValuePairInput], { nullable: true })
23522
+ OldValues___?: KeyValuePairInput[];
23523
+ }
23524
+
23525
+ //****************************************************************************
23526
+ // RESOLVER for Record Change Replay Runs
23527
+ //****************************************************************************
23528
+ @ObjectType()
23529
+ export class RunRecordChangeReplayRunViewResult {
23530
+ @Field(() => [RecordChangeReplayRun_])
23531
+ Results: RecordChangeReplayRun_[];
23532
+
23533
+ @Field(() => Int, {nullable: true})
23534
+ UserViewRunID?: number;
23535
+
23536
+ @Field(() => Int, {nullable: true})
23537
+ RowCount: number;
23538
+
23539
+ @Field(() => Int, {nullable: true})
23540
+ TotalRowCount: number;
23541
+
23542
+ @Field(() => Int, {nullable: true})
23543
+ ExecutionTime: number;
23544
+
23545
+ @Field({nullable: true})
23546
+ ErrorMessage?: string;
23547
+
23548
+ @Field(() => Boolean, {nullable: false})
23549
+ Success: boolean;
23550
+ }
23551
+
23552
+ @Resolver(RecordChangeReplayRun_)
23553
+ export class RecordChangeReplayRunResolver extends ResolverBase {
23554
+ @Query(() => RunRecordChangeReplayRunViewResult)
23555
+ async RunRecordChangeReplayRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23556
+ return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
23557
+ }
23558
+
23559
+ @Query(() => RunRecordChangeReplayRunViewResult)
23560
+ async RunRecordChangeReplayRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23561
+ return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
23562
+ }
23563
+
23564
+ @Query(() => RunRecordChangeReplayRunViewResult)
23565
+ async RunRecordChangeReplayRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23566
+ input.EntityName = 'Record Change Replay Runs';
23567
+ return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
23568
+ }
23569
+ @Query(() => RecordChangeReplayRun_, { nullable: true })
23570
+ async RecordChangeReplayRun(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<RecordChangeReplayRun_ | null> {
23571
+ this.CheckUserReadPermissions('Record Change Replay Runs', userPayload);
23572
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChangeReplayRuns] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Record Change Replay Runs', userPayload, EntityPermissionType.Read, 'AND');
23573
+ const result = this.MapFieldNamesToCodeNames('Record Change Replay Runs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
23574
+ return result;
23575
+ }
23576
+
23577
+ @FieldResolver(() => [mj_core_schema_server_object_types.RecordChange_])
23578
+ async RecordChangesArray(@Root() recordchangereplayrun_: RecordChangeReplayRun_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23579
+ this.CheckUserReadPermissions('Record Changes', userPayload);
23580
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChanges] WHERE [ReplayRunID]=${recordchangereplayrun_.ID} ` + this.getRowLevelSecurityWhereClause('Record Changes', userPayload, EntityPermissionType.Read, 'AND');
23581
+ const result = this.ArrayMapFieldNamesToCodeNames('Record Changes', await dataSource.query(sSQL));
23582
+ return result;
23583
+ }
23584
+
23585
+ @Mutation(() => RecordChangeReplayRun_)
23586
+ async CreateRecordChangeReplayRun(
23587
+ @Arg('input', () => CreateRecordChangeReplayRunInput) input: CreateRecordChangeReplayRunInput,
23588
+ @Ctx() { dataSource, userPayload }: AppContext,
23589
+ @PubSub() pubSub: PubSubEngine
23590
+ ) {
23591
+ return this.CreateRecord('Record Change Replay Runs', input, dataSource, userPayload, pubSub)
23592
+ }
23593
+
23594
+ @Mutation(() => RecordChangeReplayRun_)
23595
+ async UpdateRecordChangeReplayRun(
23596
+ @Arg('input', () => UpdateRecordChangeReplayRunInput) input: UpdateRecordChangeReplayRunInput,
23597
+ @Ctx() { dataSource, userPayload }: AppContext,
23598
+ @PubSub() pubSub: PubSubEngine
23599
+ ) {
23600
+ return this.UpdateRecord('Record Change Replay Runs', input, dataSource, userPayload, pubSub);
23601
+ }
23602
+
23603
+ }
23604
+
23605
+ //****************************************************************************
23606
+ // ENTITY CLASS for Library Items
23607
+ //****************************************************************************
23608
+ @ObjectType({ description: 'Table to store individual library items' })
23609
+ export class LibraryItem_ {
23610
+ @Field(() => Int, {description: 'Primary key of the LibraryItem table.'})
23611
+ ID: number;
23612
+
23613
+ @Field()
23614
+ @MaxLength(510)
23615
+ Name: string;
23616
+
23617
+ @Field(() => Int)
23618
+ LibraryID: number;
23619
+
23620
+ @Field({description: 'Type of the library item for example Class, Interface, etc.'})
23621
+ @MaxLength(100)
23622
+ Type: string;
23623
+
23624
+ @Field()
23625
+ @MaxLength(8)
23626
+ CreatedAt: Date;
23627
+
23628
+ @Field()
23629
+ @MaxLength(8)
23630
+ UpdatedAt: Date;
23631
+
23632
+ @Field()
23633
+ @MaxLength(510)
23634
+ Library: string;
23635
+
23636
+ }
23637
+
23638
+ //****************************************************************************
23639
+ // INPUT TYPE for Library Items
23640
+ //****************************************************************************
23641
+ @InputType()
23642
+ export class CreateLibraryItemInput {
23643
+ @Field()
23644
+ Name: string;
23645
+
23646
+ @Field(() => Int)
23647
+ LibraryID: number;
23648
+
23649
+ @Field()
23650
+ Type: string;
23651
+ }
23652
+
23653
+
23654
+ //****************************************************************************
23655
+ // INPUT TYPE for Library Items
23656
+ //****************************************************************************
23657
+ @InputType()
23658
+ export class UpdateLibraryItemInput {
23659
+ @Field(() => Int)
23660
+ ID: number;
23661
+
23662
+ @Field()
23663
+ Name: string;
23664
+
23665
+ @Field(() => Int)
23666
+ LibraryID: number;
23667
+
23668
+ @Field()
23669
+ Type: string;
23670
+
23671
+ @Field(() => [KeyValuePairInput], { nullable: true })
23672
+ OldValues___?: KeyValuePairInput[];
23673
+ }
23674
+
23675
+ //****************************************************************************
23676
+ // RESOLVER for Library Items
23677
+ //****************************************************************************
23678
+ @ObjectType()
23679
+ export class RunLibraryItemViewResult {
23680
+ @Field(() => [LibraryItem_])
23681
+ Results: LibraryItem_[];
23682
+
23683
+ @Field(() => Int, {nullable: true})
23684
+ UserViewRunID?: number;
23685
+
23686
+ @Field(() => Int, {nullable: true})
23687
+ RowCount: number;
23688
+
23689
+ @Field(() => Int, {nullable: true})
23690
+ TotalRowCount: number;
23691
+
23692
+ @Field(() => Int, {nullable: true})
23693
+ ExecutionTime: number;
23694
+
23695
+ @Field({nullable: true})
23696
+ ErrorMessage?: string;
23697
+
23698
+ @Field(() => Boolean, {nullable: false})
23699
+ Success: boolean;
23700
+ }
23701
+
23702
+ @Resolver(LibraryItem_)
23703
+ export class LibraryItemResolver extends ResolverBase {
23704
+ @Query(() => RunLibraryItemViewResult)
23705
+ async RunLibraryItemViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23706
+ return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
23707
+ }
23708
+
23709
+ @Query(() => RunLibraryItemViewResult)
23710
+ async RunLibraryItemViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23711
+ return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
23712
+ }
23713
+
23714
+ @Query(() => RunLibraryItemViewResult)
23715
+ async RunLibraryItemDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23716
+ input.EntityName = 'Library Items';
23717
+ return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
23718
+ }
23719
+ @Query(() => LibraryItem_, { nullable: true })
23720
+ async LibraryItem(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<LibraryItem_ | null> {
23721
+ this.CheckUserReadPermissions('Library Items', userPayload);
23722
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwLibraryItems] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Library Items', userPayload, EntityPermissionType.Read, 'AND');
23723
+ const result = this.MapFieldNamesToCodeNames('Library Items', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
23724
+ return result;
23725
+ }
23726
+
23727
+ @Mutation(() => LibraryItem_)
23728
+ async CreateLibraryItem(
23729
+ @Arg('input', () => CreateLibraryItemInput) input: CreateLibraryItemInput,
23730
+ @Ctx() { dataSource, userPayload }: AppContext,
23731
+ @PubSub() pubSub: PubSubEngine
23732
+ ) {
23733
+ return this.CreateRecord('Library Items', input, dataSource, userPayload, pubSub)
23734
+ }
23735
+
23736
+ @Mutation(() => LibraryItem_)
23737
+ async UpdateLibraryItem(
23738
+ @Arg('input', () => UpdateLibraryItemInput) input: UpdateLibraryItemInput,
23739
+ @Ctx() { dataSource, userPayload }: AppContext,
23740
+ @PubSub() pubSub: PubSubEngine
23741
+ ) {
23742
+ return this.UpdateRecord('Library Items', input, dataSource, userPayload, pubSub);
23743
+ }
23744
+
23745
+ }
23746
+
23747
+ //****************************************************************************
23748
+ // ENTITY CLASS for Entity Relationship Display Components
23749
+ //****************************************************************************
23750
+ @ObjectType({ description: 'This table stores a list of components that are available for displaying relationships in the MJ Explorer UI' })
23751
+ export class EntityRelationshipDisplayComponent_ {
23752
+ @Field(() => Int)
23753
+ ID: number;
23754
+
23755
+ @Field()
23756
+ @MaxLength(510)
23757
+ Name: string;
23758
+
23759
+ @Field({nullable: true})
23760
+ Description?: string;
23761
+
23762
+ @Field({description: 'The type of relationship the component displays. Valid values are "One to Many", "Many to Many", or "Both".'})
23763
+ @MaxLength(40)
23764
+ RelationshipType: string;
23765
+
23766
+ @Field()
23767
+ @MaxLength(10)
23768
+ _mj__CreatedAt: Date;
23769
+
23770
+ @Field()
23771
+ @MaxLength(10)
23772
+ _mj__UpdatedAt: Date;
23773
+
23774
+ @Field(() => [mj_core_schema_server_object_types.EntityRelationship_])
23775
+ EntityRelationshipsArray: mj_core_schema_server_object_types.EntityRelationship_[]; // Link to EntityRelationships
23776
+
23777
+ }
23778
+
23779
+ //****************************************************************************
23780
+ // INPUT TYPE for Entity Relationship Display Components
23781
+ //****************************************************************************
23782
+ @InputType()
23783
+ export class CreateEntityRelationshipDisplayComponentInput {
23784
+ @Field()
23785
+ Name: string;
23786
+
23787
+ @Field({ nullable: true })
23788
+ Description?: string;
23789
+
23790
+ @Field()
23791
+ RelationshipType: string;
23792
+ }
23793
+
23794
+
23795
+ //****************************************************************************
23796
+ // INPUT TYPE for Entity Relationship Display Components
23797
+ //****************************************************************************
23798
+ @InputType()
23799
+ export class UpdateEntityRelationshipDisplayComponentInput {
23800
+ @Field(() => Int)
23801
+ ID: number;
23802
+
23803
+ @Field()
23804
+ Name: string;
23805
+
23806
+ @Field({ nullable: true })
23807
+ Description?: string;
23808
+
23809
+ @Field()
23810
+ RelationshipType: string;
23811
+
23812
+ @Field(() => [KeyValuePairInput], { nullable: true })
23813
+ OldValues___?: KeyValuePairInput[];
23814
+ }
23815
+
23816
+ //****************************************************************************
23817
+ // RESOLVER for Entity Relationship Display Components
23818
+ //****************************************************************************
23819
+ @ObjectType()
23820
+ export class RunEntityRelationshipDisplayComponentViewResult {
23821
+ @Field(() => [EntityRelationshipDisplayComponent_])
23822
+ Results: EntityRelationshipDisplayComponent_[];
23823
+
23824
+ @Field(() => Int, {nullable: true})
23825
+ UserViewRunID?: number;
23826
+
23827
+ @Field(() => Int, {nullable: true})
23828
+ RowCount: number;
23829
+
23830
+ @Field(() => Int, {nullable: true})
23831
+ TotalRowCount: number;
23832
+
23833
+ @Field(() => Int, {nullable: true})
23834
+ ExecutionTime: number;
23835
+
23836
+ @Field({nullable: true})
23837
+ ErrorMessage?: string;
23838
+
23839
+ @Field(() => Boolean, {nullable: false})
23840
+ Success: boolean;
23841
+ }
23842
+
23843
+ @Resolver(EntityRelationshipDisplayComponent_)
23844
+ export class EntityRelationshipDisplayComponentResolver extends ResolverBase {
23845
+ @Query(() => RunEntityRelationshipDisplayComponentViewResult)
23846
+ async RunEntityRelationshipDisplayComponentViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23847
+ return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
23848
+ }
23849
+
23850
+ @Query(() => RunEntityRelationshipDisplayComponentViewResult)
23851
+ async RunEntityRelationshipDisplayComponentViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23852
+ return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
23853
+ }
23854
+
23855
+ @Query(() => RunEntityRelationshipDisplayComponentViewResult)
23856
+ async RunEntityRelationshipDisplayComponentDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23857
+ input.EntityName = 'Entity Relationship Display Components';
23858
+ return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
23859
+ }
23860
+ @Query(() => EntityRelationshipDisplayComponent_, { nullable: true })
23861
+ async EntityRelationshipDisplayComponent(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityRelationshipDisplayComponent_ | null> {
23862
+ this.CheckUserReadPermissions('Entity Relationship Display Components', userPayload);
23863
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRelationshipDisplayComponents] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Relationship Display Components', userPayload, EntityPermissionType.Read, 'AND');
23864
+ const result = this.MapFieldNamesToCodeNames('Entity Relationship Display Components', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
23865
+ return result;
23866
+ }
23867
+
23868
+ @FieldResolver(() => [mj_core_schema_server_object_types.EntityRelationship_])
23869
+ async EntityRelationshipsArray(@Root() entityrelationshipdisplaycomponent_: EntityRelationshipDisplayComponent_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
23870
+ this.CheckUserReadPermissions('Entity Relationships', userPayload);
23871
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRelationships] WHERE [DisplayComponentID]=${entityrelationshipdisplaycomponent_.ID} ` + this.getRowLevelSecurityWhereClause('Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
23872
+ const result = this.ArrayMapFieldNamesToCodeNames('Entity Relationships', await dataSource.query(sSQL));
23873
+ return result;
23874
+ }
23875
+
23876
+ @Mutation(() => EntityRelationshipDisplayComponent_)
23877
+ async CreateEntityRelationshipDisplayComponent(
23878
+ @Arg('input', () => CreateEntityRelationshipDisplayComponentInput) input: CreateEntityRelationshipDisplayComponentInput,
23879
+ @Ctx() { dataSource, userPayload }: AppContext,
23880
+ @PubSub() pubSub: PubSubEngine
23881
+ ) {
23882
+ return this.CreateRecord('Entity Relationship Display Components', input, dataSource, userPayload, pubSub)
23883
+ }
23884
+
23885
+ @Mutation(() => EntityRelationshipDisplayComponent_)
23886
+ async UpdateEntityRelationshipDisplayComponent(
23887
+ @Arg('input', () => UpdateEntityRelationshipDisplayComponentInput) input: UpdateEntityRelationshipDisplayComponentInput,
23888
+ @Ctx() { dataSource, userPayload }: AppContext,
23889
+ @PubSub() pubSub: PubSubEngine
23890
+ ) {
23891
+ return this.UpdateRecord('Entity Relationship Display Components', input, dataSource, userPayload, pubSub);
23892
+ }
23893
+
23894
+ }
23895
+
23896
+ //****************************************************************************
23897
+ // ENTITY CLASS for Entity Action Params
23898
+ //****************************************************************************
23899
+ @ObjectType({ description: 'Stores paramater mappings to enable Entity Actions to automatically invoke Actions' })
23900
+ export class EntityActionParam_ {
23901
+ @Field(() => Int)
23902
+ ID: number;
23903
+
23904
+ @Field(() => Int)
23905
+ ActionParamID: number;
23906
+
23907
+ @Field({description: 'Type of the value, which can be Static, Entity Object, or Script.'})
23908
+ @MaxLength(40)
23909
+ ValueType: string;
23910
+
23911
+ @Field({nullable: true, description: 'Value of the parameter, used only when ValueType is Static or Script. When value is Script, any valid JavaScript code can be provided. The script will have access to an object called EntityActionContext. This object will have a property called EntityObject on it that will contain the BaseEntity derived sub-class with the current data for the entity object this action is operating against. The script must provide the parameter value to the EntityActionContext.result property. This scripting capabilty is designed for very small and simple code, for anything of meaningful complexity, create a sub-class instead.'})
23912
+ Value?: string;
23913
+
23914
+ @Field({nullable: true, description: 'Additional comments regarding the parameter.'})
23915
+ Comments?: string;
23916
+
23917
+ @Field()
23918
+ @MaxLength(10)
23919
+ _mj__CreatedAt: Date;
23920
+
23921
+ @Field()
23922
+ @MaxLength(10)
23923
+ _mj__UpdatedAt: Date;
23924
+
23925
+ @Field()
23926
+ @MaxLength(510)
23927
+ ActionParam: string;
23928
+
23929
+ }
23930
+
23931
+ //****************************************************************************
23932
+ // INPUT TYPE for Entity Action Params
23933
+ //****************************************************************************
23934
+ @InputType()
23935
+ export class CreateEntityActionParamInput {
23936
+ @Field(() => Int)
23937
+ ActionParamID: number;
23938
+
23939
+ @Field()
23940
+ ValueType: string;
23941
+
23942
+ @Field({ nullable: true })
23943
+ Value?: string;
23944
+
23945
+ @Field({ nullable: true })
23946
+ Comments?: string;
23947
+ }
23948
+
23949
+
23950
+ //****************************************************************************
23951
+ // INPUT TYPE for Entity Action Params
23952
+ //****************************************************************************
23953
+ @InputType()
23954
+ export class UpdateEntityActionParamInput {
23955
+ @Field(() => Int)
23956
+ ID: number;
23957
+
23958
+ @Field(() => Int)
23959
+ ActionParamID: number;
23960
+
23961
+ @Field()
23962
+ ValueType: string;
23963
+
23964
+ @Field({ nullable: true })
23965
+ Value?: string;
23966
+
23967
+ @Field({ nullable: true })
23968
+ Comments?: string;
23969
+
23970
+ @Field(() => [KeyValuePairInput], { nullable: true })
23971
+ OldValues___?: KeyValuePairInput[];
23972
+ }
23973
+
23974
+ //****************************************************************************
23975
+ // RESOLVER for Entity Action Params
23976
+ //****************************************************************************
23977
+ @ObjectType()
23978
+ export class RunEntityActionParamViewResult {
23979
+ @Field(() => [EntityActionParam_])
23980
+ Results: EntityActionParam_[];
23981
+
23982
+ @Field(() => Int, {nullable: true})
23983
+ UserViewRunID?: number;
23984
+
23985
+ @Field(() => Int, {nullable: true})
23986
+ RowCount: number;
23987
+
23988
+ @Field(() => Int, {nullable: true})
23989
+ TotalRowCount: number;
23990
+
23991
+ @Field(() => Int, {nullable: true})
23992
+ ExecutionTime: number;
23993
+
23994
+ @Field({nullable: true})
23995
+ ErrorMessage?: string;
23996
+
23997
+ @Field(() => Boolean, {nullable: false})
23998
+ Success: boolean;
23999
+ }
24000
+
24001
+ @Resolver(EntityActionParam_)
24002
+ export class EntityActionParamResolver extends ResolverBase {
24003
+ @Query(() => RunEntityActionParamViewResult)
24004
+ async RunEntityActionParamViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
24005
+ return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
24006
+ }
24007
+
24008
+ @Query(() => RunEntityActionParamViewResult)
24009
+ async RunEntityActionParamViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
24010
+ return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
24011
+ }
24012
+
24013
+ @Query(() => RunEntityActionParamViewResult)
24014
+ async RunEntityActionParamDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
24015
+ input.EntityName = 'Entity Action Params';
24016
+ return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
24017
+ }
24018
+ @Query(() => EntityActionParam_, { nullable: true })
24019
+ async EntityActionParam(@Arg('ID', () => Int) ID: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<EntityActionParam_ | null> {
24020
+ this.CheckUserReadPermissions('Entity Action Params', userPayload);
24021
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityActionParams] WHERE [ID]=${ID} ` + this.getRowLevelSecurityWhereClause('Entity Action Params', userPayload, EntityPermissionType.Read, 'AND');
24022
+ const result = this.MapFieldNamesToCodeNames('Entity Action Params', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
24023
+ return result;
24024
+ }
24025
+
24026
+ @Mutation(() => EntityActionParam_)
24027
+ async CreateEntityActionParam(
24028
+ @Arg('input', () => CreateEntityActionParamInput) input: CreateEntityActionParamInput,
24029
+ @Ctx() { dataSource, userPayload }: AppContext,
24030
+ @PubSub() pubSub: PubSubEngine
24031
+ ) {
24032
+ return this.CreateRecord('Entity Action Params', input, dataSource, userPayload, pubSub)
24033
+ }
24034
+
24035
+ @Mutation(() => EntityActionParam_)
24036
+ async UpdateEntityActionParam(
24037
+ @Arg('input', () => UpdateEntityActionParamInput) input: UpdateEntityActionParamInput,
24038
+ @Ctx() { dataSource, userPayload }: AppContext,
24039
+ @PubSub() pubSub: PubSubEngine
24040
+ ) {
24041
+ return this.UpdateRecord('Entity Action Params', input, dataSource, userPayload, pubSub);
24042
+ }
24043
+
24044
+ @Mutation(() => EntityActionParam_)
24045
+ async DeleteEntityActionParam(@Arg('ID', () => Int) ID: number, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
24046
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
24047
+ return this.DeleteRecord('Entity Action Params', key, options, dataSource, userPayload, pubSub);
24048
+ }
24049
+
23234
24050
  }