@memberjunction/server 2.30.0 → 2.31.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.
@@ -9886,6 +9886,7 @@ let User_ = class User_ {
9886
9886
  ListCategories_UserIDArray;
9887
9887
  ScheduledActions_CreatedByUserIDArray;
9888
9888
  AIAgentRequests_ResponseByUserIDArray;
9889
+ MJ_ReportUserStates_UserIDArray;
9889
9890
  AIAgentNotes_UserIDArray;
9890
9891
  ResourcePermissions_UserIDArray;
9891
9892
  AIAgentRequests_RequestForUserIDArray;
@@ -10126,6 +10127,10 @@ __decorate([
10126
10127
  Field(() => [AIAgentRequest_]),
10127
10128
  __metadata("design:type", Array)
10128
10129
  ], User_.prototype, "AIAgentRequests_ResponseByUserIDArray", void 0);
10130
+ __decorate([
10131
+ Field(() => [ReportUserState_]),
10132
+ __metadata("design:type", Array)
10133
+ ], User_.prototype, "MJ_ReportUserStates_UserIDArray", void 0);
10129
10134
  __decorate([
10130
10135
  Field(() => [AIAgentNote_]),
10131
10136
  __metadata("design:type", Array)
@@ -10585,6 +10590,13 @@ let UserResolverBase = class UserResolverBase extends ResolverBase {
10585
10590
  const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Requests', await dataSource.query(sSQL));
10586
10591
  return result;
10587
10592
  }
10593
+ async MJ_ReportUserStates_UserIDArray(user_, { dataSources, userPayload }, pubSub) {
10594
+ this.CheckUserReadPermissions('MJ: Report User States', userPayload);
10595
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
10596
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportUserStates] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Report User States', userPayload, EntityPermissionType.Read, 'AND');
10597
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Report User States', await dataSource.query(sSQL));
10598
+ return result;
10599
+ }
10588
10600
  async AIAgentNotes_UserIDArray(user_, { dataSources, userPayload }, pubSub) {
10589
10601
  this.CheckUserReadPermissions('AI Agent Notes', userPayload);
10590
10602
  const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
@@ -10977,6 +10989,15 @@ __decorate([
10977
10989
  __metadata("design:paramtypes", [User_, Object, PubSubEngine]),
10978
10990
  __metadata("design:returntype", Promise)
10979
10991
  ], UserResolverBase.prototype, "AIAgentRequests_ResponseByUserIDArray", null);
10992
+ __decorate([
10993
+ FieldResolver(() => [ReportUserState_]),
10994
+ __param(0, Root()),
10995
+ __param(1, Ctx()),
10996
+ __param(2, PubSub()),
10997
+ __metadata("design:type", Function),
10998
+ __metadata("design:paramtypes", [User_, Object, PubSubEngine]),
10999
+ __metadata("design:returntype", Promise)
11000
+ ], UserResolverBase.prototype, "MJ_ReportUserStates_UserIDArray", null);
10980
11001
  __decorate([
10981
11002
  FieldResolver(() => [AIAgentNote_]),
10982
11003
  __param(0, Root()),
@@ -22794,6 +22815,8 @@ let Report_ = class Report_ {
22794
22815
  OutputDeliveryType;
22795
22816
  OutputWorkflow;
22796
22817
  ReportSnapshots_ReportIDArray;
22818
+ MJ_ReportVersions_ReportIDArray;
22819
+ MJ_ReportUserStates_ReportIDArray;
22797
22820
  };
22798
22821
  __decorate([
22799
22822
  Field(),
@@ -22927,6 +22950,14 @@ __decorate([
22927
22950
  Field(() => [ReportSnapshot_]),
22928
22951
  __metadata("design:type", Array)
22929
22952
  ], Report_.prototype, "ReportSnapshots_ReportIDArray", void 0);
22953
+ __decorate([
22954
+ Field(() => [ReportVersion_]),
22955
+ __metadata("design:type", Array)
22956
+ ], Report_.prototype, "MJ_ReportVersions_ReportIDArray", void 0);
22957
+ __decorate([
22958
+ Field(() => [ReportUserState_]),
22959
+ __metadata("design:type", Array)
22960
+ ], Report_.prototype, "MJ_ReportUserStates_ReportIDArray", void 0);
22930
22961
  Report_ = __decorate([
22931
22962
  ObjectType()
22932
22963
  ], Report_);
@@ -23172,6 +23203,20 @@ let ReportResolver = class ReportResolver extends ResolverBase {
23172
23203
  const result = this.ArrayMapFieldNamesToCodeNames('Report Snapshots', await dataSource.query(sSQL));
23173
23204
  return result;
23174
23205
  }
23206
+ async MJ_ReportVersions_ReportIDArray(report_, { dataSources, userPayload }, pubSub) {
23207
+ this.CheckUserReadPermissions('MJ: Report Versions', userPayload);
23208
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
23209
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportVersions] WHERE [ReportID]='${report_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Report Versions', userPayload, EntityPermissionType.Read, 'AND');
23210
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Report Versions', await dataSource.query(sSQL));
23211
+ return result;
23212
+ }
23213
+ async MJ_ReportUserStates_ReportIDArray(report_, { dataSources, userPayload }, pubSub) {
23214
+ this.CheckUserReadPermissions('MJ: Report User States', userPayload);
23215
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
23216
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportUserStates] WHERE [ReportID]='${report_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Report User States', userPayload, EntityPermissionType.Read, 'AND');
23217
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Report User States', await dataSource.query(sSQL));
23218
+ return result;
23219
+ }
23175
23220
  async CreateReport(input, { dataSources, userPayload }, pubSub) {
23176
23221
  const dataSource = GetReadWriteDataSource(dataSources);
23177
23222
  return this.CreateRecord('Reports', input, dataSource, userPayload, pubSub);
@@ -23231,6 +23276,24 @@ __decorate([
23231
23276
  __metadata("design:paramtypes", [Report_, Object, PubSubEngine]),
23232
23277
  __metadata("design:returntype", Promise)
23233
23278
  ], ReportResolver.prototype, "ReportSnapshots_ReportIDArray", null);
23279
+ __decorate([
23280
+ FieldResolver(() => [ReportVersion_]),
23281
+ __param(0, Root()),
23282
+ __param(1, Ctx()),
23283
+ __param(2, PubSub()),
23284
+ __metadata("design:type", Function),
23285
+ __metadata("design:paramtypes", [Report_, Object, PubSubEngine]),
23286
+ __metadata("design:returntype", Promise)
23287
+ ], ReportResolver.prototype, "MJ_ReportVersions_ReportIDArray", null);
23288
+ __decorate([
23289
+ FieldResolver(() => [ReportUserState_]),
23290
+ __param(0, Root()),
23291
+ __param(1, Ctx()),
23292
+ __param(2, PubSub()),
23293
+ __metadata("design:type", Function),
23294
+ __metadata("design:paramtypes", [Report_, Object, PubSubEngine]),
23295
+ __metadata("design:returntype", Promise)
23296
+ ], ReportResolver.prototype, "MJ_ReportUserStates_ReportIDArray", null);
23234
23297
  __decorate([
23235
23298
  Mutation(() => Report_),
23236
23299
  __param(0, Arg('input', () => CreateReportInput)),
@@ -46930,6 +46993,255 @@ AIAgentRequestResolver = __decorate([
46930
46993
  Resolver(AIAgentRequest_)
46931
46994
  ], AIAgentRequestResolver);
46932
46995
  export { AIAgentRequestResolver };
46996
+ let ReportUserState_ = class ReportUserState_ {
46997
+ ID;
46998
+ ReportID;
46999
+ UserID;
47000
+ ReportState;
47001
+ _mj__CreatedAt;
47002
+ _mj__UpdatedAt;
47003
+ Report;
47004
+ User;
47005
+ };
47006
+ __decorate([
47007
+ Field(),
47008
+ MaxLength(16),
47009
+ __metadata("design:type", String)
47010
+ ], ReportUserState_.prototype, "ID", void 0);
47011
+ __decorate([
47012
+ Field(),
47013
+ MaxLength(16),
47014
+ __metadata("design:type", String)
47015
+ ], ReportUserState_.prototype, "ReportID", void 0);
47016
+ __decorate([
47017
+ Field(),
47018
+ MaxLength(16),
47019
+ __metadata("design:type", String)
47020
+ ], ReportUserState_.prototype, "UserID", void 0);
47021
+ __decorate([
47022
+ Field({ nullable: true, description: `JSON serialized state of user interaction with the report` }),
47023
+ __metadata("design:type", String)
47024
+ ], ReportUserState_.prototype, "ReportState", void 0);
47025
+ __decorate([
47026
+ Field(),
47027
+ MaxLength(10),
47028
+ __metadata("design:type", Date)
47029
+ ], ReportUserState_.prototype, "_mj__CreatedAt", void 0);
47030
+ __decorate([
47031
+ Field(),
47032
+ MaxLength(10),
47033
+ __metadata("design:type", Date)
47034
+ ], ReportUserState_.prototype, "_mj__UpdatedAt", void 0);
47035
+ __decorate([
47036
+ Field(),
47037
+ MaxLength(510),
47038
+ __metadata("design:type", String)
47039
+ ], ReportUserState_.prototype, "Report", void 0);
47040
+ __decorate([
47041
+ Field(),
47042
+ MaxLength(200),
47043
+ __metadata("design:type", String)
47044
+ ], ReportUserState_.prototype, "User", void 0);
47045
+ ReportUserState_ = __decorate([
47046
+ ObjectType()
47047
+ ], ReportUserState_);
47048
+ export { ReportUserState_ };
47049
+ let CreateReportUserStateInput = class CreateReportUserStateInput {
47050
+ ReportID;
47051
+ UserID;
47052
+ ReportState;
47053
+ };
47054
+ __decorate([
47055
+ Field({ nullable: true }),
47056
+ __metadata("design:type", String)
47057
+ ], CreateReportUserStateInput.prototype, "ReportID", void 0);
47058
+ __decorate([
47059
+ Field({ nullable: true }),
47060
+ __metadata("design:type", String)
47061
+ ], CreateReportUserStateInput.prototype, "UserID", void 0);
47062
+ __decorate([
47063
+ Field({ nullable: true }),
47064
+ __metadata("design:type", String)
47065
+ ], CreateReportUserStateInput.prototype, "ReportState", void 0);
47066
+ CreateReportUserStateInput = __decorate([
47067
+ InputType()
47068
+ ], CreateReportUserStateInput);
47069
+ export { CreateReportUserStateInput };
47070
+ let UpdateReportUserStateInput = class UpdateReportUserStateInput {
47071
+ ID;
47072
+ ReportID;
47073
+ UserID;
47074
+ ReportState;
47075
+ OldValues___;
47076
+ };
47077
+ __decorate([
47078
+ Field(),
47079
+ __metadata("design:type", String)
47080
+ ], UpdateReportUserStateInput.prototype, "ID", void 0);
47081
+ __decorate([
47082
+ Field({ nullable: true }),
47083
+ __metadata("design:type", String)
47084
+ ], UpdateReportUserStateInput.prototype, "ReportID", void 0);
47085
+ __decorate([
47086
+ Field({ nullable: true }),
47087
+ __metadata("design:type", String)
47088
+ ], UpdateReportUserStateInput.prototype, "UserID", void 0);
47089
+ __decorate([
47090
+ Field({ nullable: true }),
47091
+ __metadata("design:type", String)
47092
+ ], UpdateReportUserStateInput.prototype, "ReportState", void 0);
47093
+ __decorate([
47094
+ Field(() => [KeyValuePairInput], { nullable: true }),
47095
+ __metadata("design:type", Array)
47096
+ ], UpdateReportUserStateInput.prototype, "OldValues___", void 0);
47097
+ UpdateReportUserStateInput = __decorate([
47098
+ InputType()
47099
+ ], UpdateReportUserStateInput);
47100
+ export { UpdateReportUserStateInput };
47101
+ let RunReportUserStateViewResult = class RunReportUserStateViewResult {
47102
+ Results;
47103
+ UserViewRunID;
47104
+ RowCount;
47105
+ TotalRowCount;
47106
+ ExecutionTime;
47107
+ ErrorMessage;
47108
+ Success;
47109
+ };
47110
+ __decorate([
47111
+ Field(() => [ReportUserState_]),
47112
+ __metadata("design:type", Array)
47113
+ ], RunReportUserStateViewResult.prototype, "Results", void 0);
47114
+ __decorate([
47115
+ Field(() => String, { nullable: true }),
47116
+ __metadata("design:type", String)
47117
+ ], RunReportUserStateViewResult.prototype, "UserViewRunID", void 0);
47118
+ __decorate([
47119
+ Field(() => Int, { nullable: true }),
47120
+ __metadata("design:type", Number)
47121
+ ], RunReportUserStateViewResult.prototype, "RowCount", void 0);
47122
+ __decorate([
47123
+ Field(() => Int, { nullable: true }),
47124
+ __metadata("design:type", Number)
47125
+ ], RunReportUserStateViewResult.prototype, "TotalRowCount", void 0);
47126
+ __decorate([
47127
+ Field(() => Int, { nullable: true }),
47128
+ __metadata("design:type", Number)
47129
+ ], RunReportUserStateViewResult.prototype, "ExecutionTime", void 0);
47130
+ __decorate([
47131
+ Field({ nullable: true }),
47132
+ __metadata("design:type", String)
47133
+ ], RunReportUserStateViewResult.prototype, "ErrorMessage", void 0);
47134
+ __decorate([
47135
+ Field(() => Boolean, { nullable: false }),
47136
+ __metadata("design:type", Boolean)
47137
+ ], RunReportUserStateViewResult.prototype, "Success", void 0);
47138
+ RunReportUserStateViewResult = __decorate([
47139
+ ObjectType()
47140
+ ], RunReportUserStateViewResult);
47141
+ export { RunReportUserStateViewResult };
47142
+ let ReportUserStateResolver = class ReportUserStateResolver extends ResolverBase {
47143
+ async RunReportUserStateViewByID(input, { dataSources, userPayload }, pubSub) {
47144
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
47145
+ return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
47146
+ }
47147
+ async RunReportUserStateViewByName(input, { dataSources, userPayload }, pubSub) {
47148
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
47149
+ return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
47150
+ }
47151
+ async RunReportUserStateDynamicView(input, { dataSources, userPayload }, pubSub) {
47152
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
47153
+ input.EntityName = 'MJ: Report User States';
47154
+ return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
47155
+ }
47156
+ async ReportUserState(ID, { dataSources, userPayload }, pubSub) {
47157
+ this.CheckUserReadPermissions('MJ: Report User States', userPayload);
47158
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
47159
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportUserStates] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Report User States', userPayload, EntityPermissionType.Read, 'AND');
47160
+ const result = this.MapFieldNamesToCodeNames('MJ: Report User States', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
47161
+ return result;
47162
+ }
47163
+ async CreateReportUserState(input, { dataSources, userPayload }, pubSub) {
47164
+ const dataSource = GetReadWriteDataSource(dataSources);
47165
+ return this.CreateRecord('MJ: Report User States', input, dataSource, userPayload, pubSub);
47166
+ }
47167
+ async UpdateReportUserState(input, { dataSources, userPayload }, pubSub) {
47168
+ const dataSource = GetReadWriteDataSource(dataSources);
47169
+ return this.UpdateRecord('MJ: Report User States', input, dataSource, userPayload, pubSub);
47170
+ }
47171
+ async DeleteReportUserState(ID, options, { dataSources, userPayload }, pubSub) {
47172
+ const dataSource = GetReadWriteDataSource(dataSources);
47173
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
47174
+ return this.DeleteRecord('MJ: Report User States', key, options, dataSource, userPayload, pubSub);
47175
+ }
47176
+ };
47177
+ __decorate([
47178
+ Query(() => RunReportUserStateViewResult),
47179
+ __param(0, Arg('input', () => RunViewByIDInput)),
47180
+ __param(1, Ctx()),
47181
+ __param(2, PubSub()),
47182
+ __metadata("design:type", Function),
47183
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
47184
+ __metadata("design:returntype", Promise)
47185
+ ], ReportUserStateResolver.prototype, "RunReportUserStateViewByID", null);
47186
+ __decorate([
47187
+ Query(() => RunReportUserStateViewResult),
47188
+ __param(0, Arg('input', () => RunViewByNameInput)),
47189
+ __param(1, Ctx()),
47190
+ __param(2, PubSub()),
47191
+ __metadata("design:type", Function),
47192
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
47193
+ __metadata("design:returntype", Promise)
47194
+ ], ReportUserStateResolver.prototype, "RunReportUserStateViewByName", null);
47195
+ __decorate([
47196
+ Query(() => RunReportUserStateViewResult),
47197
+ __param(0, Arg('input', () => RunDynamicViewInput)),
47198
+ __param(1, Ctx()),
47199
+ __param(2, PubSub()),
47200
+ __metadata("design:type", Function),
47201
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
47202
+ __metadata("design:returntype", Promise)
47203
+ ], ReportUserStateResolver.prototype, "RunReportUserStateDynamicView", null);
47204
+ __decorate([
47205
+ Query(() => ReportUserState_, { nullable: true }),
47206
+ __param(0, Arg('ID', () => String)),
47207
+ __param(1, Ctx()),
47208
+ __param(2, PubSub()),
47209
+ __metadata("design:type", Function),
47210
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
47211
+ __metadata("design:returntype", Promise)
47212
+ ], ReportUserStateResolver.prototype, "ReportUserState", null);
47213
+ __decorate([
47214
+ Mutation(() => ReportUserState_),
47215
+ __param(0, Arg('input', () => CreateReportUserStateInput)),
47216
+ __param(1, Ctx()),
47217
+ __param(2, PubSub()),
47218
+ __metadata("design:type", Function),
47219
+ __metadata("design:paramtypes", [CreateReportUserStateInput, Object, PubSubEngine]),
47220
+ __metadata("design:returntype", Promise)
47221
+ ], ReportUserStateResolver.prototype, "CreateReportUserState", null);
47222
+ __decorate([
47223
+ Mutation(() => ReportUserState_),
47224
+ __param(0, Arg('input', () => UpdateReportUserStateInput)),
47225
+ __param(1, Ctx()),
47226
+ __param(2, PubSub()),
47227
+ __metadata("design:type", Function),
47228
+ __metadata("design:paramtypes", [UpdateReportUserStateInput, Object, PubSubEngine]),
47229
+ __metadata("design:returntype", Promise)
47230
+ ], ReportUserStateResolver.prototype, "UpdateReportUserState", null);
47231
+ __decorate([
47232
+ Mutation(() => ReportUserState_),
47233
+ __param(0, Arg('ID', () => String)),
47234
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
47235
+ __param(2, Ctx()),
47236
+ __param(3, PubSub()),
47237
+ __metadata("design:type", Function),
47238
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
47239
+ __metadata("design:returntype", Promise)
47240
+ ], ReportUserStateResolver.prototype, "DeleteReportUserState", null);
47241
+ ReportUserStateResolver = __decorate([
47242
+ Resolver(ReportUserState_)
47243
+ ], ReportUserStateResolver);
47244
+ export { ReportUserStateResolver };
46933
47245
  let QueryEntity_ = class QueryEntity_ {
46934
47246
  ID;
46935
47247
  QueryID;
@@ -50919,4 +51231,292 @@ AIAgentLearningCycleResolver = __decorate([
50919
51231
  Resolver(AIAgentLearningCycle_)
50920
51232
  ], AIAgentLearningCycleResolver);
50921
51233
  export { AIAgentLearningCycleResolver };
51234
+ let ReportVersion_ = class ReportVersion_ {
51235
+ ID;
51236
+ ReportID;
51237
+ VersionNumber;
51238
+ Name;
51239
+ Description;
51240
+ Configuration;
51241
+ DataContextUpdated;
51242
+ _mj__CreatedAt;
51243
+ _mj__UpdatedAt;
51244
+ Report;
51245
+ };
51246
+ __decorate([
51247
+ Field(),
51248
+ MaxLength(16),
51249
+ __metadata("design:type", String)
51250
+ ], ReportVersion_.prototype, "ID", void 0);
51251
+ __decorate([
51252
+ Field(),
51253
+ MaxLength(16),
51254
+ __metadata("design:type", String)
51255
+ ], ReportVersion_.prototype, "ReportID", void 0);
51256
+ __decorate([
51257
+ Field(() => Int, { description: `Report version number, sequential per report starting at 1` }),
51258
+ __metadata("design:type", Number)
51259
+ ], ReportVersion_.prototype, "VersionNumber", void 0);
51260
+ __decorate([
51261
+ Field({ description: `Name of this report version` }),
51262
+ MaxLength(510),
51263
+ __metadata("design:type", String)
51264
+ ], ReportVersion_.prototype, "Name", void 0);
51265
+ __decorate([
51266
+ Field({ nullable: true, description: `Description of this report version` }),
51267
+ __metadata("design:type", String)
51268
+ ], ReportVersion_.prototype, "Description", void 0);
51269
+ __decorate([
51270
+ Field({ nullable: true, description: `JSON configuration of report structure, layout and logic` }),
51271
+ __metadata("design:type", String)
51272
+ ], ReportVersion_.prototype, "Configuration", void 0);
51273
+ __decorate([
51274
+ Field(() => Boolean, { description: `Indicates if the data context was updated in this version` }),
51275
+ __metadata("design:type", Boolean)
51276
+ ], ReportVersion_.prototype, "DataContextUpdated", void 0);
51277
+ __decorate([
51278
+ Field(),
51279
+ MaxLength(10),
51280
+ __metadata("design:type", Date)
51281
+ ], ReportVersion_.prototype, "_mj__CreatedAt", void 0);
51282
+ __decorate([
51283
+ Field(),
51284
+ MaxLength(10),
51285
+ __metadata("design:type", Date)
51286
+ ], ReportVersion_.prototype, "_mj__UpdatedAt", void 0);
51287
+ __decorate([
51288
+ Field(),
51289
+ MaxLength(510),
51290
+ __metadata("design:type", String)
51291
+ ], ReportVersion_.prototype, "Report", void 0);
51292
+ ReportVersion_ = __decorate([
51293
+ ObjectType()
51294
+ ], ReportVersion_);
51295
+ export { ReportVersion_ };
51296
+ let CreateReportVersionInput = class CreateReportVersionInput {
51297
+ ReportID;
51298
+ VersionNumber;
51299
+ Name;
51300
+ Description;
51301
+ Configuration;
51302
+ DataContextUpdated;
51303
+ };
51304
+ __decorate([
51305
+ Field({ nullable: true }),
51306
+ __metadata("design:type", String)
51307
+ ], CreateReportVersionInput.prototype, "ReportID", void 0);
51308
+ __decorate([
51309
+ Field(() => Int, { nullable: true }),
51310
+ __metadata("design:type", Number)
51311
+ ], CreateReportVersionInput.prototype, "VersionNumber", void 0);
51312
+ __decorate([
51313
+ Field({ nullable: true }),
51314
+ __metadata("design:type", String)
51315
+ ], CreateReportVersionInput.prototype, "Name", void 0);
51316
+ __decorate([
51317
+ Field({ nullable: true }),
51318
+ __metadata("design:type", String)
51319
+ ], CreateReportVersionInput.prototype, "Description", void 0);
51320
+ __decorate([
51321
+ Field({ nullable: true }),
51322
+ __metadata("design:type", String)
51323
+ ], CreateReportVersionInput.prototype, "Configuration", void 0);
51324
+ __decorate([
51325
+ Field(() => Boolean, { nullable: true }),
51326
+ __metadata("design:type", Boolean)
51327
+ ], CreateReportVersionInput.prototype, "DataContextUpdated", void 0);
51328
+ CreateReportVersionInput = __decorate([
51329
+ InputType()
51330
+ ], CreateReportVersionInput);
51331
+ export { CreateReportVersionInput };
51332
+ let UpdateReportVersionInput = class UpdateReportVersionInput {
51333
+ ID;
51334
+ ReportID;
51335
+ VersionNumber;
51336
+ Name;
51337
+ Description;
51338
+ Configuration;
51339
+ DataContextUpdated;
51340
+ OldValues___;
51341
+ };
51342
+ __decorate([
51343
+ Field(),
51344
+ __metadata("design:type", String)
51345
+ ], UpdateReportVersionInput.prototype, "ID", void 0);
51346
+ __decorate([
51347
+ Field({ nullable: true }),
51348
+ __metadata("design:type", String)
51349
+ ], UpdateReportVersionInput.prototype, "ReportID", void 0);
51350
+ __decorate([
51351
+ Field(() => Int, { nullable: true }),
51352
+ __metadata("design:type", Number)
51353
+ ], UpdateReportVersionInput.prototype, "VersionNumber", void 0);
51354
+ __decorate([
51355
+ Field({ nullable: true }),
51356
+ __metadata("design:type", String)
51357
+ ], UpdateReportVersionInput.prototype, "Name", void 0);
51358
+ __decorate([
51359
+ Field({ nullable: true }),
51360
+ __metadata("design:type", String)
51361
+ ], UpdateReportVersionInput.prototype, "Description", void 0);
51362
+ __decorate([
51363
+ Field({ nullable: true }),
51364
+ __metadata("design:type", String)
51365
+ ], UpdateReportVersionInput.prototype, "Configuration", void 0);
51366
+ __decorate([
51367
+ Field(() => Boolean, { nullable: true }),
51368
+ __metadata("design:type", Boolean)
51369
+ ], UpdateReportVersionInput.prototype, "DataContextUpdated", void 0);
51370
+ __decorate([
51371
+ Field(() => [KeyValuePairInput], { nullable: true }),
51372
+ __metadata("design:type", Array)
51373
+ ], UpdateReportVersionInput.prototype, "OldValues___", void 0);
51374
+ UpdateReportVersionInput = __decorate([
51375
+ InputType()
51376
+ ], UpdateReportVersionInput);
51377
+ export { UpdateReportVersionInput };
51378
+ let RunReportVersionViewResult = class RunReportVersionViewResult {
51379
+ Results;
51380
+ UserViewRunID;
51381
+ RowCount;
51382
+ TotalRowCount;
51383
+ ExecutionTime;
51384
+ ErrorMessage;
51385
+ Success;
51386
+ };
51387
+ __decorate([
51388
+ Field(() => [ReportVersion_]),
51389
+ __metadata("design:type", Array)
51390
+ ], RunReportVersionViewResult.prototype, "Results", void 0);
51391
+ __decorate([
51392
+ Field(() => String, { nullable: true }),
51393
+ __metadata("design:type", String)
51394
+ ], RunReportVersionViewResult.prototype, "UserViewRunID", void 0);
51395
+ __decorate([
51396
+ Field(() => Int, { nullable: true }),
51397
+ __metadata("design:type", Number)
51398
+ ], RunReportVersionViewResult.prototype, "RowCount", void 0);
51399
+ __decorate([
51400
+ Field(() => Int, { nullable: true }),
51401
+ __metadata("design:type", Number)
51402
+ ], RunReportVersionViewResult.prototype, "TotalRowCount", void 0);
51403
+ __decorate([
51404
+ Field(() => Int, { nullable: true }),
51405
+ __metadata("design:type", Number)
51406
+ ], RunReportVersionViewResult.prototype, "ExecutionTime", void 0);
51407
+ __decorate([
51408
+ Field({ nullable: true }),
51409
+ __metadata("design:type", String)
51410
+ ], RunReportVersionViewResult.prototype, "ErrorMessage", void 0);
51411
+ __decorate([
51412
+ Field(() => Boolean, { nullable: false }),
51413
+ __metadata("design:type", Boolean)
51414
+ ], RunReportVersionViewResult.prototype, "Success", void 0);
51415
+ RunReportVersionViewResult = __decorate([
51416
+ ObjectType()
51417
+ ], RunReportVersionViewResult);
51418
+ export { RunReportVersionViewResult };
51419
+ let ReportVersionResolver = class ReportVersionResolver extends ResolverBase {
51420
+ async RunReportVersionViewByID(input, { dataSources, userPayload }, pubSub) {
51421
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
51422
+ return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
51423
+ }
51424
+ async RunReportVersionViewByName(input, { dataSources, userPayload }, pubSub) {
51425
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
51426
+ return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
51427
+ }
51428
+ async RunReportVersionDynamicView(input, { dataSources, userPayload }, pubSub) {
51429
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
51430
+ input.EntityName = 'MJ: Report Versions';
51431
+ return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
51432
+ }
51433
+ async ReportVersion(ID, { dataSources, userPayload }, pubSub) {
51434
+ this.CheckUserReadPermissions('MJ: Report Versions', userPayload);
51435
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
51436
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportVersions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Report Versions', userPayload, EntityPermissionType.Read, 'AND');
51437
+ const result = this.MapFieldNamesToCodeNames('MJ: Report Versions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
51438
+ return result;
51439
+ }
51440
+ async CreateReportVersion(input, { dataSources, userPayload }, pubSub) {
51441
+ const dataSource = GetReadWriteDataSource(dataSources);
51442
+ return this.CreateRecord('MJ: Report Versions', input, dataSource, userPayload, pubSub);
51443
+ }
51444
+ async UpdateReportVersion(input, { dataSources, userPayload }, pubSub) {
51445
+ const dataSource = GetReadWriteDataSource(dataSources);
51446
+ return this.UpdateRecord('MJ: Report Versions', input, dataSource, userPayload, pubSub);
51447
+ }
51448
+ async DeleteReportVersion(ID, options, { dataSources, userPayload }, pubSub) {
51449
+ const dataSource = GetReadWriteDataSource(dataSources);
51450
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
51451
+ return this.DeleteRecord('MJ: Report Versions', key, options, dataSource, userPayload, pubSub);
51452
+ }
51453
+ };
51454
+ __decorate([
51455
+ Query(() => RunReportVersionViewResult),
51456
+ __param(0, Arg('input', () => RunViewByIDInput)),
51457
+ __param(1, Ctx()),
51458
+ __param(2, PubSub()),
51459
+ __metadata("design:type", Function),
51460
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
51461
+ __metadata("design:returntype", Promise)
51462
+ ], ReportVersionResolver.prototype, "RunReportVersionViewByID", null);
51463
+ __decorate([
51464
+ Query(() => RunReportVersionViewResult),
51465
+ __param(0, Arg('input', () => RunViewByNameInput)),
51466
+ __param(1, Ctx()),
51467
+ __param(2, PubSub()),
51468
+ __metadata("design:type", Function),
51469
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
51470
+ __metadata("design:returntype", Promise)
51471
+ ], ReportVersionResolver.prototype, "RunReportVersionViewByName", null);
51472
+ __decorate([
51473
+ Query(() => RunReportVersionViewResult),
51474
+ __param(0, Arg('input', () => RunDynamicViewInput)),
51475
+ __param(1, Ctx()),
51476
+ __param(2, PubSub()),
51477
+ __metadata("design:type", Function),
51478
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
51479
+ __metadata("design:returntype", Promise)
51480
+ ], ReportVersionResolver.prototype, "RunReportVersionDynamicView", null);
51481
+ __decorate([
51482
+ Query(() => ReportVersion_, { nullable: true }),
51483
+ __param(0, Arg('ID', () => String)),
51484
+ __param(1, Ctx()),
51485
+ __param(2, PubSub()),
51486
+ __metadata("design:type", Function),
51487
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
51488
+ __metadata("design:returntype", Promise)
51489
+ ], ReportVersionResolver.prototype, "ReportVersion", null);
51490
+ __decorate([
51491
+ Mutation(() => ReportVersion_),
51492
+ __param(0, Arg('input', () => CreateReportVersionInput)),
51493
+ __param(1, Ctx()),
51494
+ __param(2, PubSub()),
51495
+ __metadata("design:type", Function),
51496
+ __metadata("design:paramtypes", [CreateReportVersionInput, Object, PubSubEngine]),
51497
+ __metadata("design:returntype", Promise)
51498
+ ], ReportVersionResolver.prototype, "CreateReportVersion", null);
51499
+ __decorate([
51500
+ Mutation(() => ReportVersion_),
51501
+ __param(0, Arg('input', () => UpdateReportVersionInput)),
51502
+ __param(1, Ctx()),
51503
+ __param(2, PubSub()),
51504
+ __metadata("design:type", Function),
51505
+ __metadata("design:paramtypes", [UpdateReportVersionInput, Object, PubSubEngine]),
51506
+ __metadata("design:returntype", Promise)
51507
+ ], ReportVersionResolver.prototype, "UpdateReportVersion", null);
51508
+ __decorate([
51509
+ Mutation(() => ReportVersion_),
51510
+ __param(0, Arg('ID', () => String)),
51511
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
51512
+ __param(2, Ctx()),
51513
+ __param(3, PubSub()),
51514
+ __metadata("design:type", Function),
51515
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
51516
+ __metadata("design:returntype", Promise)
51517
+ ], ReportVersionResolver.prototype, "DeleteReportVersion", null);
51518
+ ReportVersionResolver = __decorate([
51519
+ Resolver(ReportVersion_)
51520
+ ], ReportVersionResolver);
51521
+ export { ReportVersionResolver };
50922
51522
  //# sourceMappingURL=generated.js.map