@memberjunction/server 5.28.0 → 5.30.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.
Files changed (57) hide show
  1. package/dist/auth/newUsers.d.ts.map +1 -1
  2. package/dist/auth/newUsers.js +63 -70
  3. package/dist/auth/newUsers.js.map +1 -1
  4. package/dist/config.d.ts +151 -0
  5. package/dist/config.d.ts.map +1 -1
  6. package/dist/config.js +15 -0
  7. package/dist/config.js.map +1 -1
  8. package/dist/generated/generated.d.ts +452 -6
  9. package/dist/generated/generated.d.ts.map +1 -1
  10. package/dist/generated/generated.js +2788 -303
  11. package/dist/generated/generated.js.map +1 -1
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/resolvers/FeedbackResolver.d.ts +150 -0
  17. package/dist/resolvers/FeedbackResolver.d.ts.map +1 -0
  18. package/dist/resolvers/FeedbackResolver.js +876 -0
  19. package/dist/resolvers/FeedbackResolver.js.map +1 -0
  20. package/dist/resolvers/FileResolver.d.ts +27 -0
  21. package/dist/resolvers/FileResolver.d.ts.map +1 -1
  22. package/dist/resolvers/FileResolver.js +32 -3
  23. package/dist/resolvers/FileResolver.js.map +1 -1
  24. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts +100 -1
  25. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
  26. package/dist/resolvers/IntegrationDiscoveryResolver.js +532 -41
  27. package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
  28. package/dist/resolvers/MCPResolver.d.ts +77 -0
  29. package/dist/resolvers/MCPResolver.d.ts.map +1 -1
  30. package/dist/resolvers/MCPResolver.js +300 -1
  31. package/dist/resolvers/MCPResolver.js.map +1 -1
  32. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  33. package/dist/resolvers/RunAIAgentResolver.js +87 -32
  34. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  35. package/dist/resolvers/SyncDataResolver.d.ts.map +1 -1
  36. package/dist/resolvers/SyncDataResolver.js +20 -12
  37. package/dist/resolvers/SyncDataResolver.js.map +1 -1
  38. package/dist/resolvers/SyncRolesUsersResolver.d.ts +20 -9
  39. package/dist/resolvers/SyncRolesUsersResolver.d.ts.map +1 -1
  40. package/dist/resolvers/SyncRolesUsersResolver.js +153 -116
  41. package/dist/resolvers/SyncRolesUsersResolver.js.map +1 -1
  42. package/dist/services/TaskOrchestrator.d.ts.map +1 -1
  43. package/dist/services/TaskOrchestrator.js +78 -79
  44. package/dist/services/TaskOrchestrator.js.map +1 -1
  45. package/package.json +68 -66
  46. package/src/auth/newUsers.ts +65 -74
  47. package/src/config.ts +19 -0
  48. package/src/generated/generated.ts +1753 -40
  49. package/src/index.ts +1 -0
  50. package/src/resolvers/FeedbackResolver.ts +940 -0
  51. package/src/resolvers/FileResolver.ts +33 -4
  52. package/src/resolvers/IntegrationDiscoveryResolver.ts +543 -43
  53. package/src/resolvers/MCPResolver.ts +297 -1
  54. package/src/resolvers/RunAIAgentResolver.ts +89 -32
  55. package/src/resolvers/SyncDataResolver.ts +24 -14
  56. package/src/resolvers/SyncRolesUsersResolver.ts +177 -141
  57. package/src/services/TaskOrchestrator.ts +86 -93
@@ -2999,6 +2999,19 @@ __decorate([
2999
2999
  Field({ nullable: true, description: `Optional JSON configuration for the action. For integration actions, contains routing info: integrationName, objectName, verb, and optional connectorConfig. Non-integration actions leave this NULL.` }),
3000
3000
  __metadata("design:type", String)
3001
3001
  ], MJAction_.prototype, "Config", void 0);
3002
+ __decorate([
3003
+ Field({ nullable: true, description: `JSON blob holding configuration specific to Type='Runtime' actions: declarative permission scopes (allowedEntities, allowedActions, allowedAgents with id+name pairs), resource limits (maxMemoryMB, maxBridgeCalls), and sandbox options (additionalLibraries, debugMode). Evolvable — new keys can be introduced without schema changes. NULL for non-Runtime actions.` }),
3004
+ __metadata("design:type", String)
3005
+ ], MJAction_.prototype, "RuntimeActionConfiguration", void 0);
3006
+ __decorate([
3007
+ Field(() => Int, { nullable: true, description: `Universal maximum execution time in milliseconds for a single action invocation. Enforced by ActionEngine across ALL action types (Custom, Generated, Runtime) via AbortSignal passed through RunActionParams. NULL means use the engine default.` }),
3008
+ __metadata("design:type", Number)
3009
+ ], MJAction_.prototype, "MaxExecutionTimeMS", void 0);
3010
+ __decorate([
3011
+ Field({ nullable: true, description: `Optional reference to the AI Agent that authored this action — populated when an agent (e.g. ActionSmith) dynamically generates a Runtime action. NULL for human-authored Custom/Generated actions. Provides an audit trail linking agent-generated capabilities back to their creator.` }),
3012
+ MaxLength(36),
3013
+ __metadata("design:type", String)
3014
+ ], MJAction_.prototype, "CreatedByAgentID", void 0);
3002
3015
  __decorate([
3003
3016
  Field({ nullable: true }),
3004
3017
  MaxLength(255),
@@ -3019,6 +3032,11 @@ __decorate([
3019
3032
  MaxLength(255),
3020
3033
  __metadata("design:type", String)
3021
3034
  ], MJAction_.prototype, "DefaultCompactPrompt", void 0);
3035
+ __decorate([
3036
+ Field({ nullable: true }),
3037
+ MaxLength(255),
3038
+ __metadata("design:type", String)
3039
+ ], MJAction_.prototype, "CreatedByAgent", void 0);
3022
3040
  __decorate([
3023
3041
  Field({ nullable: true }),
3024
3042
  MaxLength(36),
@@ -3169,6 +3187,18 @@ __decorate([
3169
3187
  Field({ nullable: true }),
3170
3188
  __metadata("design:type", String)
3171
3189
  ], CreateMJActionInput.prototype, "Config", void 0);
3190
+ __decorate([
3191
+ Field({ nullable: true }),
3192
+ __metadata("design:type", String)
3193
+ ], CreateMJActionInput.prototype, "RuntimeActionConfiguration", void 0);
3194
+ __decorate([
3195
+ Field(() => Int, { nullable: true }),
3196
+ __metadata("design:type", Number)
3197
+ ], CreateMJActionInput.prototype, "MaxExecutionTimeMS", void 0);
3198
+ __decorate([
3199
+ Field({ nullable: true }),
3200
+ __metadata("design:type", String)
3201
+ ], CreateMJActionInput.prototype, "CreatedByAgentID", void 0);
3172
3202
  __decorate([
3173
3203
  Field(() => RestoreContextInput, { nullable: true }),
3174
3204
  __metadata("design:type", RestoreContextInput)
@@ -3270,6 +3300,18 @@ __decorate([
3270
3300
  Field({ nullable: true }),
3271
3301
  __metadata("design:type", String)
3272
3302
  ], UpdateMJActionInput.prototype, "Config", void 0);
3303
+ __decorate([
3304
+ Field({ nullable: true }),
3305
+ __metadata("design:type", String)
3306
+ ], UpdateMJActionInput.prototype, "RuntimeActionConfiguration", void 0);
3307
+ __decorate([
3308
+ Field(() => Int, { nullable: true }),
3309
+ __metadata("design:type", Number)
3310
+ ], UpdateMJActionInput.prototype, "MaxExecutionTimeMS", void 0);
3311
+ __decorate([
3312
+ Field({ nullable: true }),
3313
+ __metadata("design:type", String)
3314
+ ], UpdateMJActionInput.prototype, "CreatedByAgentID", void 0);
3273
3315
  __decorate([
3274
3316
  Field(() => [KeyValuePairInput], { nullable: true }),
3275
3317
  __metadata("design:type", Array)
@@ -7597,6 +7639,28 @@ __decorate([
7597
7639
  Field({ nullable: true, description: `Optional expiration timestamp. Notes past this date are candidates for archival. NULL means no expiration.` }),
7598
7640
  __metadata("design:type", Date)
7599
7641
  ], MJAIAgentNote_.prototype, "ExpiresAt", void 0);
7642
+ __decorate([
7643
+ Field({ nullable: true, description: `Self-referential FK. Points to the consolidated note that replaced this one when revoked during consolidation or contradiction resolution.` }),
7644
+ MaxLength(36),
7645
+ __metadata("design:type", String)
7646
+ ], MJAIAgentNote_.prototype, "ConsolidatedIntoNoteID", void 0);
7647
+ __decorate([
7648
+ Field(() => Int, { description: `Tracks re-summarization depth. 0=raw extraction, 1=first consolidation, etc. Capped at 3 to prevent semantic drift.` }),
7649
+ __metadata("design:type", Number)
7650
+ ], MJAIAgentNote_.prototype, "ConsolidationCount", void 0);
7651
+ __decorate([
7652
+ Field({ nullable: true, description: `JSON array of source note IDs that were consolidated into this note. Enables provenance chain resolution and rollback.` }),
7653
+ __metadata("design:type", String)
7654
+ ], MJAIAgentNote_.prototype, "DerivedFromNoteIDs", void 0);
7655
+ __decorate([
7656
+ Field({ description: `Protection level: Immutable (never consolidated/archived), Protected (no consolidation, extended 365-day retention), Standard (default), Ephemeral (aggressive consolidation, 2x decay rate).` }),
7657
+ MaxLength(20),
7658
+ __metadata("design:type", String)
7659
+ ], MJAIAgentNote_.prototype, "ProtectionTier", void 0);
7660
+ __decorate([
7661
+ Field(() => Float, { nullable: true, description: `Composite importance score (0-10) computed from 7 signals: recency, LLM-importance, relevance, uniqueness, correction boost, goal alignment, user mark. Replaces raw AccessCount for authority and retention decisions.` }),
7662
+ __metadata("design:type", Number)
7663
+ ], MJAIAgentNote_.prototype, "ImportanceScore", void 0);
7600
7664
  __decorate([
7601
7665
  Field({ nullable: true }),
7602
7666
  MaxLength(255),
@@ -7641,6 +7705,19 @@ __decorate([
7641
7705
  MaxLength(255),
7642
7706
  __metadata("design:type", String)
7643
7707
  ], MJAIAgentNote_.prototype, "PrimaryScopeEntity", void 0);
7708
+ __decorate([
7709
+ Field({ nullable: true }),
7710
+ __metadata("design:type", String)
7711
+ ], MJAIAgentNote_.prototype, "ConsolidatedIntoNote", void 0);
7712
+ __decorate([
7713
+ Field({ nullable: true }),
7714
+ MaxLength(36),
7715
+ __metadata("design:type", String)
7716
+ ], MJAIAgentNote_.prototype, "RootConsolidatedIntoNoteID", void 0);
7717
+ __decorate([
7718
+ Field(() => [MJAIAgentNote_]),
7719
+ __metadata("design:type", Array)
7720
+ ], MJAIAgentNote_.prototype, "MJAIAgentNotes_ConsolidatedIntoNoteIDArray", void 0);
7644
7721
  MJAIAgentNote_ = __decorate([
7645
7722
  ObjectType({ description: `Stores notes, observations, and learnings for AI agents with multi-dimensional scoping (Agent, User, company). Scoping is determined by which FK fields are populated: all NULL = global, AgentID only = agent-specific, UserID only = user-specific across all agents, etc.` })
7646
7723
  ], MJAIAgentNote_);
@@ -7734,6 +7811,26 @@ __decorate([
7734
7811
  Field({ nullable: true }),
7735
7812
  __metadata("design:type", Date)
7736
7813
  ], CreateMJAIAgentNoteInput.prototype, "ExpiresAt", void 0);
7814
+ __decorate([
7815
+ Field({ nullable: true }),
7816
+ __metadata("design:type", String)
7817
+ ], CreateMJAIAgentNoteInput.prototype, "ConsolidatedIntoNoteID", void 0);
7818
+ __decorate([
7819
+ Field(() => Int, { nullable: true }),
7820
+ __metadata("design:type", Number)
7821
+ ], CreateMJAIAgentNoteInput.prototype, "ConsolidationCount", void 0);
7822
+ __decorate([
7823
+ Field({ nullable: true }),
7824
+ __metadata("design:type", String)
7825
+ ], CreateMJAIAgentNoteInput.prototype, "DerivedFromNoteIDs", void 0);
7826
+ __decorate([
7827
+ Field({ nullable: true }),
7828
+ __metadata("design:type", String)
7829
+ ], CreateMJAIAgentNoteInput.prototype, "ProtectionTier", void 0);
7830
+ __decorate([
7831
+ Field(() => Float, { nullable: true }),
7832
+ __metadata("design:type", Number)
7833
+ ], CreateMJAIAgentNoteInput.prototype, "ImportanceScore", void 0);
7737
7834
  __decorate([
7738
7835
  Field(() => RestoreContextInput, { nullable: true }),
7739
7836
  __metadata("design:type", RestoreContextInput)
@@ -7831,6 +7928,26 @@ __decorate([
7831
7928
  Field({ nullable: true }),
7832
7929
  __metadata("design:type", Date)
7833
7930
  ], UpdateMJAIAgentNoteInput.prototype, "ExpiresAt", void 0);
7931
+ __decorate([
7932
+ Field({ nullable: true }),
7933
+ __metadata("design:type", String)
7934
+ ], UpdateMJAIAgentNoteInput.prototype, "ConsolidatedIntoNoteID", void 0);
7935
+ __decorate([
7936
+ Field(() => Int, { nullable: true }),
7937
+ __metadata("design:type", Number)
7938
+ ], UpdateMJAIAgentNoteInput.prototype, "ConsolidationCount", void 0);
7939
+ __decorate([
7940
+ Field({ nullable: true }),
7941
+ __metadata("design:type", String)
7942
+ ], UpdateMJAIAgentNoteInput.prototype, "DerivedFromNoteIDs", void 0);
7943
+ __decorate([
7944
+ Field({ nullable: true }),
7945
+ __metadata("design:type", String)
7946
+ ], UpdateMJAIAgentNoteInput.prototype, "ProtectionTier", void 0);
7947
+ __decorate([
7948
+ Field(() => Float, { nullable: true }),
7949
+ __metadata("design:type", Number)
7950
+ ], UpdateMJAIAgentNoteInput.prototype, "ImportanceScore", void 0);
7834
7951
  __decorate([
7835
7952
  Field(() => [KeyValuePairInput], { nullable: true }),
7836
7953
  __metadata("design:type", Array)
@@ -7902,6 +8019,14 @@ let MJAIAgentNoteResolver = class MJAIAgentNoteResolver extends ResolverBase {
7902
8019
  const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Notes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
7903
8020
  return result;
7904
8021
  }
8022
+ async MJAIAgentNotes_ConsolidatedIntoNoteIDArray(mjaiagentnote_, { userPayload, providers }, pubSub) {
8023
+ this.CheckUserReadPermissions('MJ: AI Agent Notes', userPayload);
8024
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8025
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentNotes')} WHERE ${provider.QuoteIdentifier('ConsolidatedIntoNoteID')}='${mjaiagentnote_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
8026
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
8027
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Notes', rows, this.GetUserFromPayload(userPayload));
8028
+ return result;
8029
+ }
7905
8030
  async CreateMJAIAgentNote(input, { providers, userPayload }, pubSub) {
7906
8031
  const provider = GetReadWriteProvider(providers);
7907
8032
  return this.CreateRecord('MJ: AI Agent Notes', input, provider, userPayload, pubSub);
@@ -7952,6 +8077,15 @@ __decorate([
7952
8077
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
7953
8078
  __metadata("design:returntype", Promise)
7954
8079
  ], MJAIAgentNoteResolver.prototype, "MJAIAgentNote", null);
8080
+ __decorate([
8081
+ FieldResolver(() => [MJAIAgentNote_]),
8082
+ __param(0, Root()),
8083
+ __param(1, Ctx()),
8084
+ __param(2, PubSub()),
8085
+ __metadata("design:type", Function),
8086
+ __metadata("design:paramtypes", [MJAIAgentNote_, Object, PubSubEngine]),
8087
+ __metadata("design:returntype", Promise)
8088
+ ], MJAIAgentNoteResolver.prototype, "MJAIAgentNotes_ConsolidatedIntoNoteIDArray", null);
7955
8089
  __decorate([
7956
8090
  Mutation(() => MJAIAgentNote_),
7957
8091
  __param(0, Arg('input', () => CreateMJAIAgentNoteInput)),
@@ -10818,6 +10952,11 @@ __decorate([
10818
10952
  MaxLength(200),
10819
10953
  __metadata("design:type", String)
10820
10954
  ], MJAIAgentRun_.prototype, "ExternalReferenceID", void 0);
10955
+ __decorate([
10956
+ Field({ nullable: true, description: `Optional company scope for multi-tenant memory. When populated, Memory Manager uses this to scope extracted notes to the company. Flows from ExecuteAgentParams.companyId at agent invocation time.` }),
10957
+ MaxLength(36),
10958
+ __metadata("design:type", String)
10959
+ ], MJAIAgentRun_.prototype, "CompanyID", void 0);
10821
10960
  __decorate([
10822
10961
  Field({ nullable: true }),
10823
10962
  MaxLength(255),
@@ -11104,6 +11243,10 @@ __decorate([
11104
11243
  Field({ nullable: true }),
11105
11244
  __metadata("design:type", String)
11106
11245
  ], CreateMJAIAgentRunInput.prototype, "ExternalReferenceID", void 0);
11246
+ __decorate([
11247
+ Field({ nullable: true }),
11248
+ __metadata("design:type", String)
11249
+ ], CreateMJAIAgentRunInput.prototype, "CompanyID", void 0);
11107
11250
  __decorate([
11108
11251
  Field(() => RestoreContextInput, { nullable: true }),
11109
11252
  __metadata("design:type", RestoreContextInput)
@@ -11289,6 +11432,10 @@ __decorate([
11289
11432
  Field({ nullable: true }),
11290
11433
  __metadata("design:type", String)
11291
11434
  ], UpdateMJAIAgentRunInput.prototype, "ExternalReferenceID", void 0);
11435
+ __decorate([
11436
+ Field({ nullable: true }),
11437
+ __metadata("design:type", String)
11438
+ ], UpdateMJAIAgentRunInput.prototype, "CompanyID", void 0);
11292
11439
  __decorate([
11293
11440
  Field(() => [KeyValuePairInput], { nullable: true }),
11294
11441
  __metadata("design:type", Array)
@@ -13206,6 +13353,10 @@ __decorate([
13206
13353
  Field(() => [MJAIAgent_]),
13207
13354
  __metadata("design:type", Array)
13208
13355
  ], MJAIAgent_.prototype, "MJAIAgents_ParentIDArray", void 0);
13356
+ __decorate([
13357
+ Field(() => [MJAction_]),
13358
+ __metadata("design:type", Array)
13359
+ ], MJAIAgent_.prototype, "MJActions_CreatedByAgentIDArray", void 0);
13209
13360
  MJAIAgent_ = __decorate([
13210
13361
  ObjectType({ description: `Table to store information about AI agents.` })
13211
13362
  ], MJAIAgent_);
@@ -13979,6 +14130,14 @@ let MJAIAgentResolver = class MJAIAgentResolver extends ResolverBase {
13979
14130
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agents', rows, this.GetUserFromPayload(userPayload));
13980
14131
  return result;
13981
14132
  }
14133
+ async MJActions_CreatedByAgentIDArray(mjaiagent_, { userPayload, providers }, pubSub) {
14134
+ this.CheckUserReadPermissions('MJ: Actions', userPayload);
14135
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
14136
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwActions')} WHERE ${provider.QuoteIdentifier('CreatedByAgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Actions', userPayload, EntityPermissionType.Read, 'AND');
14137
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
14138
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Actions', rows, this.GetUserFromPayload(userPayload));
14139
+ return result;
14140
+ }
13982
14141
  async CreateMJAIAgent(input, { providers, userPayload }, pubSub) {
13983
14142
  const provider = GetReadWriteProvider(providers);
13984
14143
  return this.CreateRecord('MJ: AI Agents', input, provider, userPayload, pubSub);
@@ -14236,6 +14395,15 @@ __decorate([
14236
14395
  __metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
14237
14396
  __metadata("design:returntype", Promise)
14238
14397
  ], MJAIAgentResolver.prototype, "MJAIAgents_ParentIDArray", null);
14398
+ __decorate([
14399
+ FieldResolver(() => [MJAction_]),
14400
+ __param(0, Root()),
14401
+ __param(1, Ctx()),
14402
+ __param(2, PubSub()),
14403
+ __metadata("design:type", Function),
14404
+ __metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
14405
+ __metadata("design:returntype", Promise)
14406
+ ], MJAIAgentResolver.prototype, "MJActions_CreatedByAgentIDArray", null);
14239
14407
  __decorate([
14240
14408
  Mutation(() => MJAIAgent_),
14241
14409
  __param(0, Arg('input', () => CreateMJAIAgentInput)),
@@ -28276,434 +28444,1964 @@ __decorate([
28276
28444
  __metadata("design:type", Array)
28277
28445
  ], MJApplication_.prototype, "MJApplicationEntities_ApplicationIDArray", void 0);
28278
28446
  __decorate([
28279
- Field(() => [MJUserApplication_]),
28280
- __metadata("design:type", Array)
28281
- ], MJApplication_.prototype, "MJUserApplications_ApplicationIDArray", void 0);
28447
+ Field(() => [MJUserApplication_]),
28448
+ __metadata("design:type", Array)
28449
+ ], MJApplication_.prototype, "MJUserApplications_ApplicationIDArray", void 0);
28450
+ __decorate([
28451
+ Field(() => [MJApplicationSetting_]),
28452
+ __metadata("design:type", Array)
28453
+ ], MJApplication_.prototype, "MJApplicationSettings_ApplicationIDArray", void 0);
28454
+ __decorate([
28455
+ Field(() => [MJDashboard_]),
28456
+ __metadata("design:type", Array)
28457
+ ], MJApplication_.prototype, "MJDashboards_ApplicationIDArray", void 0);
28458
+ __decorate([
28459
+ Field(() => [MJDashboardUserPreference_]),
28460
+ __metadata("design:type", Array)
28461
+ ], MJApplication_.prototype, "MJDashboardUserPreferences_ApplicationIDArray", void 0);
28462
+ __decorate([
28463
+ Field(() => [MJApplicationRole_]),
28464
+ __metadata("design:type", Array)
28465
+ ], MJApplication_.prototype, "MJApplicationRoles_ApplicationIDArray", void 0);
28466
+ MJApplication_ = __decorate([
28467
+ ObjectType({ description: `Applications are used to group entities in the user interface for ease of user access` })
28468
+ ], MJApplication_);
28469
+ export { MJApplication_ };
28470
+ //****************************************************************************
28471
+ // INPUT TYPE for MJ: Applications
28472
+ //****************************************************************************
28473
+ let CreateMJApplicationInput = class CreateMJApplicationInput {
28474
+ };
28475
+ __decorate([
28476
+ Field({ nullable: true }),
28477
+ __metadata("design:type", String)
28478
+ ], CreateMJApplicationInput.prototype, "ID", void 0);
28479
+ __decorate([
28480
+ Field({ nullable: true }),
28481
+ __metadata("design:type", String)
28482
+ ], CreateMJApplicationInput.prototype, "Name", void 0);
28483
+ __decorate([
28484
+ Field({ nullable: true }),
28485
+ __metadata("design:type", String)
28486
+ ], CreateMJApplicationInput.prototype, "Description", void 0);
28487
+ __decorate([
28488
+ Field({ nullable: true }),
28489
+ __metadata("design:type", String)
28490
+ ], CreateMJApplicationInput.prototype, "Icon", void 0);
28491
+ __decorate([
28492
+ Field(() => Boolean, { nullable: true }),
28493
+ __metadata("design:type", Boolean)
28494
+ ], CreateMJApplicationInput.prototype, "DefaultForNewUser", void 0);
28495
+ __decorate([
28496
+ Field({ nullable: true }),
28497
+ __metadata("design:type", String)
28498
+ ], CreateMJApplicationInput.prototype, "SchemaAutoAddNewEntities", void 0);
28499
+ __decorate([
28500
+ Field({ nullable: true }),
28501
+ __metadata("design:type", String)
28502
+ ], CreateMJApplicationInput.prototype, "Color", void 0);
28503
+ __decorate([
28504
+ Field({ nullable: true }),
28505
+ __metadata("design:type", String)
28506
+ ], CreateMJApplicationInput.prototype, "DefaultNavItems", void 0);
28507
+ __decorate([
28508
+ Field({ nullable: true }),
28509
+ __metadata("design:type", String)
28510
+ ], CreateMJApplicationInput.prototype, "ClassName", void 0);
28511
+ __decorate([
28512
+ Field(() => Int, { nullable: true }),
28513
+ __metadata("design:type", Number)
28514
+ ], CreateMJApplicationInput.prototype, "DefaultSequence", void 0);
28515
+ __decorate([
28516
+ Field({ nullable: true }),
28517
+ __metadata("design:type", String)
28518
+ ], CreateMJApplicationInput.prototype, "Status", void 0);
28519
+ __decorate([
28520
+ Field({ nullable: true }),
28521
+ __metadata("design:type", String)
28522
+ ], CreateMJApplicationInput.prototype, "NavigationStyle", void 0);
28523
+ __decorate([
28524
+ Field({ nullable: true }),
28525
+ __metadata("design:type", String)
28526
+ ], CreateMJApplicationInput.prototype, "TopNavLocation", void 0);
28527
+ __decorate([
28528
+ Field(() => Boolean, { nullable: true }),
28529
+ __metadata("design:type", Boolean)
28530
+ ], CreateMJApplicationInput.prototype, "HideNavBarIconWhenActive", void 0);
28531
+ __decorate([
28532
+ Field({ nullable: true }),
28533
+ __metadata("design:type", String)
28534
+ ], CreateMJApplicationInput.prototype, "Path", void 0);
28535
+ __decorate([
28536
+ Field(() => Boolean, { nullable: true }),
28537
+ __metadata("design:type", Boolean)
28538
+ ], CreateMJApplicationInput.prototype, "AutoUpdatePath", void 0);
28539
+ __decorate([
28540
+ Field(() => RestoreContextInput, { nullable: true }),
28541
+ __metadata("design:type", RestoreContextInput)
28542
+ ], CreateMJApplicationInput.prototype, "RestoreContext___", void 0);
28543
+ CreateMJApplicationInput = __decorate([
28544
+ InputType()
28545
+ ], CreateMJApplicationInput);
28546
+ export { CreateMJApplicationInput };
28547
+ //****************************************************************************
28548
+ // INPUT TYPE for MJ: Applications
28549
+ //****************************************************************************
28550
+ let UpdateMJApplicationInput = class UpdateMJApplicationInput {
28551
+ };
28552
+ __decorate([
28553
+ Field(),
28554
+ __metadata("design:type", String)
28555
+ ], UpdateMJApplicationInput.prototype, "ID", void 0);
28556
+ __decorate([
28557
+ Field({ nullable: true }),
28558
+ __metadata("design:type", String)
28559
+ ], UpdateMJApplicationInput.prototype, "Name", void 0);
28560
+ __decorate([
28561
+ Field({ nullable: true }),
28562
+ __metadata("design:type", String)
28563
+ ], UpdateMJApplicationInput.prototype, "Description", void 0);
28564
+ __decorate([
28565
+ Field({ nullable: true }),
28566
+ __metadata("design:type", String)
28567
+ ], UpdateMJApplicationInput.prototype, "Icon", void 0);
28568
+ __decorate([
28569
+ Field(() => Boolean, { nullable: true }),
28570
+ __metadata("design:type", Boolean)
28571
+ ], UpdateMJApplicationInput.prototype, "DefaultForNewUser", void 0);
28572
+ __decorate([
28573
+ Field({ nullable: true }),
28574
+ __metadata("design:type", String)
28575
+ ], UpdateMJApplicationInput.prototype, "SchemaAutoAddNewEntities", void 0);
28576
+ __decorate([
28577
+ Field({ nullable: true }),
28578
+ __metadata("design:type", String)
28579
+ ], UpdateMJApplicationInput.prototype, "Color", void 0);
28580
+ __decorate([
28581
+ Field({ nullable: true }),
28582
+ __metadata("design:type", String)
28583
+ ], UpdateMJApplicationInput.prototype, "DefaultNavItems", void 0);
28584
+ __decorate([
28585
+ Field({ nullable: true }),
28586
+ __metadata("design:type", String)
28587
+ ], UpdateMJApplicationInput.prototype, "ClassName", void 0);
28588
+ __decorate([
28589
+ Field(() => Int, { nullable: true }),
28590
+ __metadata("design:type", Number)
28591
+ ], UpdateMJApplicationInput.prototype, "DefaultSequence", void 0);
28592
+ __decorate([
28593
+ Field({ nullable: true }),
28594
+ __metadata("design:type", String)
28595
+ ], UpdateMJApplicationInput.prototype, "Status", void 0);
28596
+ __decorate([
28597
+ Field({ nullable: true }),
28598
+ __metadata("design:type", String)
28599
+ ], UpdateMJApplicationInput.prototype, "NavigationStyle", void 0);
28600
+ __decorate([
28601
+ Field({ nullable: true }),
28602
+ __metadata("design:type", String)
28603
+ ], UpdateMJApplicationInput.prototype, "TopNavLocation", void 0);
28604
+ __decorate([
28605
+ Field(() => Boolean, { nullable: true }),
28606
+ __metadata("design:type", Boolean)
28607
+ ], UpdateMJApplicationInput.prototype, "HideNavBarIconWhenActive", void 0);
28608
+ __decorate([
28609
+ Field({ nullable: true }),
28610
+ __metadata("design:type", String)
28611
+ ], UpdateMJApplicationInput.prototype, "Path", void 0);
28612
+ __decorate([
28613
+ Field(() => Boolean, { nullable: true }),
28614
+ __metadata("design:type", Boolean)
28615
+ ], UpdateMJApplicationInput.prototype, "AutoUpdatePath", void 0);
28616
+ __decorate([
28617
+ Field(() => [KeyValuePairInput], { nullable: true }),
28618
+ __metadata("design:type", Array)
28619
+ ], UpdateMJApplicationInput.prototype, "OldValues___", void 0);
28620
+ __decorate([
28621
+ Field(() => RestoreContextInput, { nullable: true }),
28622
+ __metadata("design:type", RestoreContextInput)
28623
+ ], UpdateMJApplicationInput.prototype, "RestoreContext___", void 0);
28624
+ UpdateMJApplicationInput = __decorate([
28625
+ InputType()
28626
+ ], UpdateMJApplicationInput);
28627
+ export { UpdateMJApplicationInput };
28628
+ //****************************************************************************
28629
+ // RESOLVER for MJ: Applications
28630
+ //****************************************************************************
28631
+ let RunMJApplicationViewResult = class RunMJApplicationViewResult {
28632
+ };
28633
+ __decorate([
28634
+ Field(() => [MJApplication_]),
28635
+ __metadata("design:type", Array)
28636
+ ], RunMJApplicationViewResult.prototype, "Results", void 0);
28637
+ __decorate([
28638
+ Field(() => String, { nullable: true }),
28639
+ __metadata("design:type", String)
28640
+ ], RunMJApplicationViewResult.prototype, "UserViewRunID", void 0);
28641
+ __decorate([
28642
+ Field(() => Int, { nullable: true }),
28643
+ __metadata("design:type", Number)
28644
+ ], RunMJApplicationViewResult.prototype, "RowCount", void 0);
28645
+ __decorate([
28646
+ Field(() => Int, { nullable: true }),
28647
+ __metadata("design:type", Number)
28648
+ ], RunMJApplicationViewResult.prototype, "TotalRowCount", void 0);
28649
+ __decorate([
28650
+ Field(() => Int, { nullable: true }),
28651
+ __metadata("design:type", Number)
28652
+ ], RunMJApplicationViewResult.prototype, "ExecutionTime", void 0);
28653
+ __decorate([
28654
+ Field({ nullable: true }),
28655
+ __metadata("design:type", String)
28656
+ ], RunMJApplicationViewResult.prototype, "ErrorMessage", void 0);
28657
+ __decorate([
28658
+ Field(() => Boolean, { nullable: false }),
28659
+ __metadata("design:type", Boolean)
28660
+ ], RunMJApplicationViewResult.prototype, "Success", void 0);
28661
+ RunMJApplicationViewResult = __decorate([
28662
+ ObjectType()
28663
+ ], RunMJApplicationViewResult);
28664
+ export { RunMJApplicationViewResult };
28665
+ let MJApplicationResolver = class MJApplicationResolver extends ResolverBase {
28666
+ async RunMJApplicationViewByID(input, { providers, userPayload }, pubSub) {
28667
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28668
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
28669
+ }
28670
+ async RunMJApplicationViewByName(input, { providers, userPayload }, pubSub) {
28671
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28672
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
28673
+ }
28674
+ async RunMJApplicationDynamicView(input, { providers, userPayload }, pubSub) {
28675
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28676
+ input.EntityName = 'MJ: Applications';
28677
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
28678
+ }
28679
+ async MJApplication(ID, { userPayload, providers }, pubSub) {
28680
+ this.CheckUserReadPermissions('MJ: Applications', userPayload);
28681
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28682
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplications')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Applications', userPayload, EntityPermissionType.Read, 'AND');
28683
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28684
+ const result = await this.MapFieldNamesToCodeNames('MJ: Applications', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
28685
+ return result;
28686
+ }
28687
+ async AllMJApplications({ userPayload, providers }, pubSub) {
28688
+ this.CheckUserReadPermissions('MJ: Applications', userPayload);
28689
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28690
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplications')}` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Applications', userPayload, EntityPermissionType.Read, ' WHERE');
28691
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28692
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Applications', rows, this.GetUserFromPayload(userPayload));
28693
+ return result;
28694
+ }
28695
+ async MJApplicationEntities_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28696
+ this.CheckUserReadPermissions('MJ: Application Entities', userPayload);
28697
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28698
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplicationEntities')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Application Entities', userPayload, EntityPermissionType.Read, 'AND');
28699
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28700
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Application Entities', rows, this.GetUserFromPayload(userPayload));
28701
+ return result;
28702
+ }
28703
+ async MJUserApplications_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28704
+ this.CheckUserReadPermissions('MJ: User Applications', userPayload);
28705
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28706
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserApplications')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Applications', userPayload, EntityPermissionType.Read, 'AND');
28707
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28708
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Applications', rows, this.GetUserFromPayload(userPayload));
28709
+ return result;
28710
+ }
28711
+ async MJApplicationSettings_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28712
+ this.CheckUserReadPermissions('MJ: Application Settings', userPayload);
28713
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28714
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplicationSettings')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Application Settings', userPayload, EntityPermissionType.Read, 'AND');
28715
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28716
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Application Settings', rows, this.GetUserFromPayload(userPayload));
28717
+ return result;
28718
+ }
28719
+ async MJDashboards_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28720
+ this.CheckUserReadPermissions('MJ: Dashboards', userPayload);
28721
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28722
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboards')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboards', userPayload, EntityPermissionType.Read, 'AND');
28723
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28724
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboards', rows, this.GetUserFromPayload(userPayload));
28725
+ return result;
28726
+ }
28727
+ async MJDashboardUserPreferences_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28728
+ this.CheckUserReadPermissions('MJ: Dashboard User Preferences', userPayload);
28729
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28730
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardUserPreferences')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User Preferences', userPayload, EntityPermissionType.Read, 'AND');
28731
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28732
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User Preferences', rows, this.GetUserFromPayload(userPayload));
28733
+ return result;
28734
+ }
28735
+ async MJApplicationRoles_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28736
+ this.CheckUserReadPermissions('MJ: Application Roles', userPayload);
28737
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28738
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplicationRoles')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Application Roles', userPayload, EntityPermissionType.Read, 'AND');
28739
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28740
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Application Roles', rows, this.GetUserFromPayload(userPayload));
28741
+ return result;
28742
+ }
28743
+ async CreateMJApplication(input, { providers, userPayload }, pubSub) {
28744
+ const provider = GetReadWriteProvider(providers);
28745
+ return this.CreateRecord('MJ: Applications', input, provider, userPayload, pubSub);
28746
+ }
28747
+ async UpdateMJApplication(input, { providers, userPayload }, pubSub) {
28748
+ const provider = GetReadWriteProvider(providers);
28749
+ return this.UpdateRecord('MJ: Applications', input, provider, userPayload, pubSub);
28750
+ }
28751
+ async DeleteMJApplication(ID, options, { providers, userPayload }, pubSub) {
28752
+ const provider = GetReadWriteProvider(providers);
28753
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
28754
+ return this.DeleteRecord('MJ: Applications', key, options, provider, userPayload, pubSub);
28755
+ }
28756
+ };
28757
+ __decorate([
28758
+ Query(() => RunMJApplicationViewResult),
28759
+ __param(0, Arg('input', () => RunViewByIDInput)),
28760
+ __param(1, Ctx()),
28761
+ __param(2, PubSub()),
28762
+ __metadata("design:type", Function),
28763
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
28764
+ __metadata("design:returntype", Promise)
28765
+ ], MJApplicationResolver.prototype, "RunMJApplicationViewByID", null);
28766
+ __decorate([
28767
+ Query(() => RunMJApplicationViewResult),
28768
+ __param(0, Arg('input', () => RunViewByNameInput)),
28769
+ __param(1, Ctx()),
28770
+ __param(2, PubSub()),
28771
+ __metadata("design:type", Function),
28772
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
28773
+ __metadata("design:returntype", Promise)
28774
+ ], MJApplicationResolver.prototype, "RunMJApplicationViewByName", null);
28775
+ __decorate([
28776
+ Query(() => RunMJApplicationViewResult),
28777
+ __param(0, Arg('input', () => RunDynamicViewInput)),
28778
+ __param(1, Ctx()),
28779
+ __param(2, PubSub()),
28780
+ __metadata("design:type", Function),
28781
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
28782
+ __metadata("design:returntype", Promise)
28783
+ ], MJApplicationResolver.prototype, "RunMJApplicationDynamicView", null);
28784
+ __decorate([
28785
+ Query(() => MJApplication_, { nullable: true }),
28786
+ __param(0, Arg('ID', () => String)),
28787
+ __param(1, Ctx()),
28788
+ __param(2, PubSub()),
28789
+ __metadata("design:type", Function),
28790
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
28791
+ __metadata("design:returntype", Promise)
28792
+ ], MJApplicationResolver.prototype, "MJApplication", null);
28793
+ __decorate([
28794
+ Query(() => [MJApplication_]),
28795
+ __param(0, Ctx()),
28796
+ __param(1, PubSub()),
28797
+ __metadata("design:type", Function),
28798
+ __metadata("design:paramtypes", [Object, PubSubEngine]),
28799
+ __metadata("design:returntype", Promise)
28800
+ ], MJApplicationResolver.prototype, "AllMJApplications", null);
28801
+ __decorate([
28802
+ FieldResolver(() => [MJApplicationEntity_]),
28803
+ __param(0, Root()),
28804
+ __param(1, Ctx()),
28805
+ __param(2, PubSub()),
28806
+ __metadata("design:type", Function),
28807
+ __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28808
+ __metadata("design:returntype", Promise)
28809
+ ], MJApplicationResolver.prototype, "MJApplicationEntities_ApplicationIDArray", null);
28810
+ __decorate([
28811
+ FieldResolver(() => [MJUserApplication_]),
28812
+ __param(0, Root()),
28813
+ __param(1, Ctx()),
28814
+ __param(2, PubSub()),
28815
+ __metadata("design:type", Function),
28816
+ __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28817
+ __metadata("design:returntype", Promise)
28818
+ ], MJApplicationResolver.prototype, "MJUserApplications_ApplicationIDArray", null);
28819
+ __decorate([
28820
+ FieldResolver(() => [MJApplicationSetting_]),
28821
+ __param(0, Root()),
28822
+ __param(1, Ctx()),
28823
+ __param(2, PubSub()),
28824
+ __metadata("design:type", Function),
28825
+ __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28826
+ __metadata("design:returntype", Promise)
28827
+ ], MJApplicationResolver.prototype, "MJApplicationSettings_ApplicationIDArray", null);
28828
+ __decorate([
28829
+ FieldResolver(() => [MJDashboard_]),
28830
+ __param(0, Root()),
28831
+ __param(1, Ctx()),
28832
+ __param(2, PubSub()),
28833
+ __metadata("design:type", Function),
28834
+ __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28835
+ __metadata("design:returntype", Promise)
28836
+ ], MJApplicationResolver.prototype, "MJDashboards_ApplicationIDArray", null);
28837
+ __decorate([
28838
+ FieldResolver(() => [MJDashboardUserPreference_]),
28839
+ __param(0, Root()),
28840
+ __param(1, Ctx()),
28841
+ __param(2, PubSub()),
28842
+ __metadata("design:type", Function),
28843
+ __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28844
+ __metadata("design:returntype", Promise)
28845
+ ], MJApplicationResolver.prototype, "MJDashboardUserPreferences_ApplicationIDArray", null);
28846
+ __decorate([
28847
+ FieldResolver(() => [MJApplicationRole_]),
28848
+ __param(0, Root()),
28849
+ __param(1, Ctx()),
28850
+ __param(2, PubSub()),
28851
+ __metadata("design:type", Function),
28852
+ __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28853
+ __metadata("design:returntype", Promise)
28854
+ ], MJApplicationResolver.prototype, "MJApplicationRoles_ApplicationIDArray", null);
28855
+ __decorate([
28856
+ Mutation(() => MJApplication_),
28857
+ __param(0, Arg('input', () => CreateMJApplicationInput)),
28858
+ __param(1, Ctx()),
28859
+ __param(2, PubSub()),
28860
+ __metadata("design:type", Function),
28861
+ __metadata("design:paramtypes", [CreateMJApplicationInput, Object, PubSubEngine]),
28862
+ __metadata("design:returntype", Promise)
28863
+ ], MJApplicationResolver.prototype, "CreateMJApplication", null);
28864
+ __decorate([
28865
+ Mutation(() => MJApplication_),
28866
+ __param(0, Arg('input', () => UpdateMJApplicationInput)),
28867
+ __param(1, Ctx()),
28868
+ __param(2, PubSub()),
28869
+ __metadata("design:type", Function),
28870
+ __metadata("design:paramtypes", [UpdateMJApplicationInput, Object, PubSubEngine]),
28871
+ __metadata("design:returntype", Promise)
28872
+ ], MJApplicationResolver.prototype, "UpdateMJApplication", null);
28873
+ __decorate([
28874
+ Mutation(() => MJApplication_),
28875
+ __param(0, Arg('ID', () => String)),
28876
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
28877
+ __param(2, Ctx()),
28878
+ __param(3, PubSub()),
28879
+ __metadata("design:type", Function),
28880
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
28881
+ __metadata("design:returntype", Promise)
28882
+ ], MJApplicationResolver.prototype, "DeleteMJApplication", null);
28883
+ MJApplicationResolver = __decorate([
28884
+ Resolver(MJApplication_)
28885
+ ], MJApplicationResolver);
28886
+ export { MJApplicationResolver };
28887
+ //****************************************************************************
28888
+ // ENTITY CLASS for MJ: Archive Configuration Entities
28889
+ //****************************************************************************
28890
+ let MJArchiveConfigurationEntity_ = class MJArchiveConfigurationEntity_ {
28891
+ };
28892
+ __decorate([
28893
+ Field(),
28894
+ MaxLength(36),
28895
+ __metadata("design:type", String)
28896
+ ], MJArchiveConfigurationEntity_.prototype, "ID", void 0);
28897
+ __decorate([
28898
+ Field({ description: `Foreign key to the parent ArchiveConfiguration.` }),
28899
+ MaxLength(36),
28900
+ __metadata("design:type", String)
28901
+ ], MJArchiveConfigurationEntity_.prototype, "ArchiveConfigurationID", void 0);
28902
+ __decorate([
28903
+ Field({ description: `Foreign key to the Entity being archived.` }),
28904
+ MaxLength(36),
28905
+ __metadata("design:type", String)
28906
+ ], MJArchiveConfigurationEntity_.prototype, "EntityID", void 0);
28907
+ __decorate([
28908
+ Field({ nullable: true, description: `Archive mode override for this entity. NULL inherits from the parent configuration's DefaultMode.` }),
28909
+ MaxLength(20),
28910
+ __metadata("design:type", String)
28911
+ ], MJArchiveConfigurationEntity_.prototype, "Mode", void 0);
28912
+ __decorate([
28913
+ Field(() => Int, { nullable: true, description: `Retention period override in days. NULL inherits from the parent configuration's DefaultRetentionDays.` }),
28914
+ __metadata("design:type", Number)
28915
+ ], MJArchiveConfigurationEntity_.prototype, "RetentionDays", void 0);
28916
+ __decorate([
28917
+ Field({ description: `The date field on the entity used to determine record age for retention policy evaluation. Defaults to __mj_CreatedAt.` }),
28918
+ MaxLength(100),
28919
+ __metadata("design:type", String)
28920
+ ], MJArchiveConfigurationEntity_.prototype, "DateField", void 0);
28921
+ __decorate([
28922
+ Field({ nullable: true, description: `Optional SQL WHERE clause fragment to further filter which records are eligible for archiving (e.g., "Status = 'Closed'").` }),
28923
+ __metadata("design:type", String)
28924
+ ], MJArchiveConfigurationEntity_.prototype, "FilterExpression", void 0);
28925
+ __decorate([
28926
+ Field(() => Int, { nullable: true, description: `Batch size override for this entity. NULL inherits from the parent configuration's DefaultBatchSize.` }),
28927
+ __metadata("design:type", Number)
28928
+ ], MJArchiveConfigurationEntity_.prototype, "BatchSize", void 0);
28929
+ __decorate([
28930
+ Field(() => Int, { description: `Processing priority — lower numbers are archived first. Default is 100.` }),
28931
+ __metadata("design:type", Number)
28932
+ ], MJArchiveConfigurationEntity_.prototype, "Priority", void 0);
28933
+ __decorate([
28934
+ Field({ description: `JSON configuration specifying which fields to include/exclude in the archive output. Required for all modes.` }),
28935
+ __metadata("design:type", String)
28936
+ ], MJArchiveConfigurationEntity_.prototype, "FieldConfiguration", void 0);
28937
+ __decorate([
28938
+ Field({ nullable: true, description: `Optional fully-qualified class name of a custom archive driver to use for this entity, overriding the default archiver.` }),
28939
+ MaxLength(500),
28940
+ __metadata("design:type", String)
28941
+ ], MJArchiveConfigurationEntity_.prototype, "DriverClass", void 0);
28942
+ __decorate([
28943
+ Field(() => Boolean, { nullable: true, description: `Override for archiving related Record Changes. NULL inherits from the parent configuration.` }),
28944
+ __metadata("design:type", Boolean)
28945
+ ], MJArchiveConfigurationEntity_.prototype, "ArchiveRelatedRecordChanges", void 0);
28946
+ __decorate([
28947
+ Field(() => Boolean, { description: `Whether this entity is active within the archive configuration.` }),
28948
+ __metadata("design:type", Boolean)
28949
+ ], MJArchiveConfigurationEntity_.prototype, "IsActive", void 0);
28950
+ __decorate([
28951
+ Field(),
28952
+ __metadata("design:type", Date)
28953
+ ], MJArchiveConfigurationEntity_.prototype, "_mj__CreatedAt", void 0);
28954
+ __decorate([
28955
+ Field(),
28956
+ __metadata("design:type", Date)
28957
+ ], MJArchiveConfigurationEntity_.prototype, "_mj__UpdatedAt", void 0);
28958
+ __decorate([
28959
+ Field(),
28960
+ MaxLength(255),
28961
+ __metadata("design:type", String)
28962
+ ], MJArchiveConfigurationEntity_.prototype, "ArchiveConfiguration", void 0);
28963
+ __decorate([
28964
+ Field(),
28965
+ MaxLength(255),
28966
+ __metadata("design:type", String)
28967
+ ], MJArchiveConfigurationEntity_.prototype, "Entity", void 0);
28968
+ MJArchiveConfigurationEntity_ = __decorate([
28969
+ ObjectType({ description: `Per-entity configuration within an archive pipeline. Allows overriding the parent configuration\'s defaults for mode, retention, batch size, and filtering on a per-entity basis.` })
28970
+ ], MJArchiveConfigurationEntity_);
28971
+ export { MJArchiveConfigurationEntity_ };
28972
+ //****************************************************************************
28973
+ // INPUT TYPE for MJ: Archive Configuration Entities
28974
+ //****************************************************************************
28975
+ let CreateMJArchiveConfigurationEntityInput = class CreateMJArchiveConfigurationEntityInput {
28976
+ };
28977
+ __decorate([
28978
+ Field({ nullable: true }),
28979
+ __metadata("design:type", String)
28980
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "ID", void 0);
28981
+ __decorate([
28982
+ Field({ nullable: true }),
28983
+ __metadata("design:type", String)
28984
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "ArchiveConfigurationID", void 0);
28985
+ __decorate([
28986
+ Field({ nullable: true }),
28987
+ __metadata("design:type", String)
28988
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "EntityID", void 0);
28989
+ __decorate([
28990
+ Field({ nullable: true }),
28991
+ __metadata("design:type", String)
28992
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "Mode", void 0);
28993
+ __decorate([
28994
+ Field(() => Int, { nullable: true }),
28995
+ __metadata("design:type", Number)
28996
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "RetentionDays", void 0);
28997
+ __decorate([
28998
+ Field({ nullable: true }),
28999
+ __metadata("design:type", String)
29000
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "DateField", void 0);
29001
+ __decorate([
29002
+ Field({ nullable: true }),
29003
+ __metadata("design:type", String)
29004
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "FilterExpression", void 0);
29005
+ __decorate([
29006
+ Field(() => Int, { nullable: true }),
29007
+ __metadata("design:type", Number)
29008
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "BatchSize", void 0);
29009
+ __decorate([
29010
+ Field(() => Int, { nullable: true }),
29011
+ __metadata("design:type", Number)
29012
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "Priority", void 0);
29013
+ __decorate([
29014
+ Field({ nullable: true }),
29015
+ __metadata("design:type", String)
29016
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "FieldConfiguration", void 0);
29017
+ __decorate([
29018
+ Field({ nullable: true }),
29019
+ __metadata("design:type", String)
29020
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "DriverClass", void 0);
29021
+ __decorate([
29022
+ Field(() => Boolean, { nullable: true }),
29023
+ __metadata("design:type", Boolean)
29024
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "ArchiveRelatedRecordChanges", void 0);
29025
+ __decorate([
29026
+ Field(() => Boolean, { nullable: true }),
29027
+ __metadata("design:type", Boolean)
29028
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "IsActive", void 0);
29029
+ __decorate([
29030
+ Field(() => RestoreContextInput, { nullable: true }),
29031
+ __metadata("design:type", RestoreContextInput)
29032
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "RestoreContext___", void 0);
29033
+ CreateMJArchiveConfigurationEntityInput = __decorate([
29034
+ InputType()
29035
+ ], CreateMJArchiveConfigurationEntityInput);
29036
+ export { CreateMJArchiveConfigurationEntityInput };
29037
+ //****************************************************************************
29038
+ // INPUT TYPE for MJ: Archive Configuration Entities
29039
+ //****************************************************************************
29040
+ let UpdateMJArchiveConfigurationEntityInput = class UpdateMJArchiveConfigurationEntityInput {
29041
+ };
29042
+ __decorate([
29043
+ Field(),
29044
+ __metadata("design:type", String)
29045
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "ID", void 0);
29046
+ __decorate([
29047
+ Field({ nullable: true }),
29048
+ __metadata("design:type", String)
29049
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "ArchiveConfigurationID", void 0);
29050
+ __decorate([
29051
+ Field({ nullable: true }),
29052
+ __metadata("design:type", String)
29053
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "EntityID", void 0);
29054
+ __decorate([
29055
+ Field({ nullable: true }),
29056
+ __metadata("design:type", String)
29057
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "Mode", void 0);
29058
+ __decorate([
29059
+ Field(() => Int, { nullable: true }),
29060
+ __metadata("design:type", Number)
29061
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "RetentionDays", void 0);
29062
+ __decorate([
29063
+ Field({ nullable: true }),
29064
+ __metadata("design:type", String)
29065
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "DateField", void 0);
29066
+ __decorate([
29067
+ Field({ nullable: true }),
29068
+ __metadata("design:type", String)
29069
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "FilterExpression", void 0);
29070
+ __decorate([
29071
+ Field(() => Int, { nullable: true }),
29072
+ __metadata("design:type", Number)
29073
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "BatchSize", void 0);
29074
+ __decorate([
29075
+ Field(() => Int, { nullable: true }),
29076
+ __metadata("design:type", Number)
29077
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "Priority", void 0);
29078
+ __decorate([
29079
+ Field({ nullable: true }),
29080
+ __metadata("design:type", String)
29081
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "FieldConfiguration", void 0);
29082
+ __decorate([
29083
+ Field({ nullable: true }),
29084
+ __metadata("design:type", String)
29085
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "DriverClass", void 0);
29086
+ __decorate([
29087
+ Field(() => Boolean, { nullable: true }),
29088
+ __metadata("design:type", Boolean)
29089
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "ArchiveRelatedRecordChanges", void 0);
29090
+ __decorate([
29091
+ Field(() => Boolean, { nullable: true }),
29092
+ __metadata("design:type", Boolean)
29093
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "IsActive", void 0);
29094
+ __decorate([
29095
+ Field(() => [KeyValuePairInput], { nullable: true }),
29096
+ __metadata("design:type", Array)
29097
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "OldValues___", void 0);
29098
+ __decorate([
29099
+ Field(() => RestoreContextInput, { nullable: true }),
29100
+ __metadata("design:type", RestoreContextInput)
29101
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "RestoreContext___", void 0);
29102
+ UpdateMJArchiveConfigurationEntityInput = __decorate([
29103
+ InputType()
29104
+ ], UpdateMJArchiveConfigurationEntityInput);
29105
+ export { UpdateMJArchiveConfigurationEntityInput };
29106
+ //****************************************************************************
29107
+ // RESOLVER for MJ: Archive Configuration Entities
29108
+ //****************************************************************************
29109
+ let RunMJArchiveConfigurationEntityViewResult = class RunMJArchiveConfigurationEntityViewResult {
29110
+ };
29111
+ __decorate([
29112
+ Field(() => [MJArchiveConfigurationEntity_]),
29113
+ __metadata("design:type", Array)
29114
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "Results", void 0);
29115
+ __decorate([
29116
+ Field(() => String, { nullable: true }),
29117
+ __metadata("design:type", String)
29118
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "UserViewRunID", void 0);
29119
+ __decorate([
29120
+ Field(() => Int, { nullable: true }),
29121
+ __metadata("design:type", Number)
29122
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "RowCount", void 0);
29123
+ __decorate([
29124
+ Field(() => Int, { nullable: true }),
29125
+ __metadata("design:type", Number)
29126
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "TotalRowCount", void 0);
29127
+ __decorate([
29128
+ Field(() => Int, { nullable: true }),
29129
+ __metadata("design:type", Number)
29130
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "ExecutionTime", void 0);
29131
+ __decorate([
29132
+ Field({ nullable: true }),
29133
+ __metadata("design:type", String)
29134
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "ErrorMessage", void 0);
29135
+ __decorate([
29136
+ Field(() => Boolean, { nullable: false }),
29137
+ __metadata("design:type", Boolean)
29138
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "Success", void 0);
29139
+ RunMJArchiveConfigurationEntityViewResult = __decorate([
29140
+ ObjectType()
29141
+ ], RunMJArchiveConfigurationEntityViewResult);
29142
+ export { RunMJArchiveConfigurationEntityViewResult };
29143
+ let MJArchiveConfigurationEntityResolver = class MJArchiveConfigurationEntityResolver extends ResolverBase {
29144
+ async RunMJArchiveConfigurationEntityViewByID(input, { providers, userPayload }, pubSub) {
29145
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29146
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
29147
+ }
29148
+ async RunMJArchiveConfigurationEntityViewByName(input, { providers, userPayload }, pubSub) {
29149
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29150
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
29151
+ }
29152
+ async RunMJArchiveConfigurationEntityDynamicView(input, { providers, userPayload }, pubSub) {
29153
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29154
+ input.EntityName = 'MJ: Archive Configuration Entities';
29155
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
29156
+ }
29157
+ async MJArchiveConfigurationEntity(ID, { userPayload, providers }, pubSub) {
29158
+ this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
29159
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29160
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurationEntities')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configuration Entities', userPayload, EntityPermissionType.Read, 'AND');
29161
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29162
+ const result = await this.MapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
29163
+ return result;
29164
+ }
29165
+ async AllMJArchiveConfigurationEntities({ userPayload, providers }, pubSub) {
29166
+ this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
29167
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29168
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurationEntities')}` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configuration Entities', userPayload, EntityPermissionType.Read, ' WHERE');
29169
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29170
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows, this.GetUserFromPayload(userPayload));
29171
+ return result;
29172
+ }
29173
+ async CreateMJArchiveConfigurationEntity(input, { providers, userPayload }, pubSub) {
29174
+ const provider = GetReadWriteProvider(providers);
29175
+ return this.CreateRecord('MJ: Archive Configuration Entities', input, provider, userPayload, pubSub);
29176
+ }
29177
+ async UpdateMJArchiveConfigurationEntity(input, { providers, userPayload }, pubSub) {
29178
+ const provider = GetReadWriteProvider(providers);
29179
+ return this.UpdateRecord('MJ: Archive Configuration Entities', input, provider, userPayload, pubSub);
29180
+ }
29181
+ async DeleteMJArchiveConfigurationEntity(ID, options, { providers, userPayload }, pubSub) {
29182
+ const provider = GetReadWriteProvider(providers);
29183
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
29184
+ return this.DeleteRecord('MJ: Archive Configuration Entities', key, options, provider, userPayload, pubSub);
29185
+ }
29186
+ };
29187
+ __decorate([
29188
+ Query(() => RunMJArchiveConfigurationEntityViewResult),
29189
+ __param(0, Arg('input', () => RunViewByIDInput)),
29190
+ __param(1, Ctx()),
29191
+ __param(2, PubSub()),
29192
+ __metadata("design:type", Function),
29193
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
29194
+ __metadata("design:returntype", Promise)
29195
+ ], MJArchiveConfigurationEntityResolver.prototype, "RunMJArchiveConfigurationEntityViewByID", null);
29196
+ __decorate([
29197
+ Query(() => RunMJArchiveConfigurationEntityViewResult),
29198
+ __param(0, Arg('input', () => RunViewByNameInput)),
29199
+ __param(1, Ctx()),
29200
+ __param(2, PubSub()),
29201
+ __metadata("design:type", Function),
29202
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
29203
+ __metadata("design:returntype", Promise)
29204
+ ], MJArchiveConfigurationEntityResolver.prototype, "RunMJArchiveConfigurationEntityViewByName", null);
29205
+ __decorate([
29206
+ Query(() => RunMJArchiveConfigurationEntityViewResult),
29207
+ __param(0, Arg('input', () => RunDynamicViewInput)),
29208
+ __param(1, Ctx()),
29209
+ __param(2, PubSub()),
29210
+ __metadata("design:type", Function),
29211
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
29212
+ __metadata("design:returntype", Promise)
29213
+ ], MJArchiveConfigurationEntityResolver.prototype, "RunMJArchiveConfigurationEntityDynamicView", null);
29214
+ __decorate([
29215
+ Query(() => MJArchiveConfigurationEntity_, { nullable: true }),
29216
+ __param(0, Arg('ID', () => String)),
29217
+ __param(1, Ctx()),
29218
+ __param(2, PubSub()),
29219
+ __metadata("design:type", Function),
29220
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
29221
+ __metadata("design:returntype", Promise)
29222
+ ], MJArchiveConfigurationEntityResolver.prototype, "MJArchiveConfigurationEntity", null);
29223
+ __decorate([
29224
+ Query(() => [MJArchiveConfigurationEntity_]),
29225
+ __param(0, Ctx()),
29226
+ __param(1, PubSub()),
29227
+ __metadata("design:type", Function),
29228
+ __metadata("design:paramtypes", [Object, PubSubEngine]),
29229
+ __metadata("design:returntype", Promise)
29230
+ ], MJArchiveConfigurationEntityResolver.prototype, "AllMJArchiveConfigurationEntities", null);
29231
+ __decorate([
29232
+ Mutation(() => MJArchiveConfigurationEntity_),
29233
+ __param(0, Arg('input', () => CreateMJArchiveConfigurationEntityInput)),
29234
+ __param(1, Ctx()),
29235
+ __param(2, PubSub()),
29236
+ __metadata("design:type", Function),
29237
+ __metadata("design:paramtypes", [CreateMJArchiveConfigurationEntityInput, Object, PubSubEngine]),
29238
+ __metadata("design:returntype", Promise)
29239
+ ], MJArchiveConfigurationEntityResolver.prototype, "CreateMJArchiveConfigurationEntity", null);
29240
+ __decorate([
29241
+ Mutation(() => MJArchiveConfigurationEntity_),
29242
+ __param(0, Arg('input', () => UpdateMJArchiveConfigurationEntityInput)),
29243
+ __param(1, Ctx()),
29244
+ __param(2, PubSub()),
29245
+ __metadata("design:type", Function),
29246
+ __metadata("design:paramtypes", [UpdateMJArchiveConfigurationEntityInput, Object, PubSubEngine]),
29247
+ __metadata("design:returntype", Promise)
29248
+ ], MJArchiveConfigurationEntityResolver.prototype, "UpdateMJArchiveConfigurationEntity", null);
29249
+ __decorate([
29250
+ Mutation(() => MJArchiveConfigurationEntity_),
29251
+ __param(0, Arg('ID', () => String)),
29252
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
29253
+ __param(2, Ctx()),
29254
+ __param(3, PubSub()),
29255
+ __metadata("design:type", Function),
29256
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
29257
+ __metadata("design:returntype", Promise)
29258
+ ], MJArchiveConfigurationEntityResolver.prototype, "DeleteMJArchiveConfigurationEntity", null);
29259
+ MJArchiveConfigurationEntityResolver = __decorate([
29260
+ Resolver(MJArchiveConfigurationEntity_)
29261
+ ], MJArchiveConfigurationEntityResolver);
29262
+ export { MJArchiveConfigurationEntityResolver };
29263
+ //****************************************************************************
29264
+ // ENTITY CLASS for MJ: Archive Configurations
29265
+ //****************************************************************************
29266
+ let MJArchiveConfiguration_ = class MJArchiveConfiguration_ {
29267
+ };
29268
+ __decorate([
29269
+ Field(),
29270
+ MaxLength(36),
29271
+ __metadata("design:type", String)
29272
+ ], MJArchiveConfiguration_.prototype, "ID", void 0);
29273
+ __decorate([
29274
+ Field({ description: `Human-readable name for this archive configuration.` }),
29275
+ MaxLength(255),
29276
+ __metadata("design:type", String)
29277
+ ], MJArchiveConfiguration_.prototype, "Name", void 0);
29278
+ __decorate([
29279
+ Field({ nullable: true }),
29280
+ __metadata("design:type", String)
29281
+ ], MJArchiveConfiguration_.prototype, "Description", void 0);
29282
+ __decorate([
29283
+ Field({ nullable: true, description: `Foreign key to FileStorageAccount — the blob/file storage target for archived data.` }),
29284
+ MaxLength(36),
29285
+ __metadata("design:type", String)
29286
+ ], MJArchiveConfiguration_.prototype, "StorageAccountID", void 0);
29287
+ __decorate([
29288
+ Field({ description: `Root path within the storage account where archive files are written (e.g., "archives/production/").` }),
29289
+ MaxLength(500),
29290
+ __metadata("design:type", String)
29291
+ ], MJArchiveConfiguration_.prototype, "RootPath", void 0);
29292
+ __decorate([
29293
+ Field({ description: `Output format for archived records: JSON, Parquet, or CSV.` }),
29294
+ MaxLength(20),
29295
+ __metadata("design:type", String)
29296
+ ], MJArchiveConfiguration_.prototype, "ArchiveFormat", void 0);
29297
+ __decorate([
29298
+ Field(() => Boolean, { description: `Whether this configuration is active and eligible for scheduled archive runs.` }),
29299
+ __metadata("design:type", Boolean)
29300
+ ], MJArchiveConfiguration_.prototype, "IsActive", void 0);
29301
+ __decorate([
29302
+ Field(() => Int, { description: `Default number of days after which records become eligible for archiving. Can be overridden per entity.` }),
29303
+ __metadata("design:type", Number)
29304
+ ], MJArchiveConfiguration_.prototype, "DefaultRetentionDays", void 0);
29305
+ __decorate([
29306
+ Field({ description: `Default archive mode: StripFields (null out specified fields), HardDelete (delete from source after archiving), ArchiveOnly (copy to storage without modifying source).` }),
29307
+ MaxLength(20),
29308
+ __metadata("design:type", String)
29309
+ ], MJArchiveConfiguration_.prototype, "DefaultMode", void 0);
29310
+ __decorate([
29311
+ Field(() => Int, { description: `Default number of records to process per batch during archive runs.` }),
29312
+ __metadata("design:type", Number)
29313
+ ], MJArchiveConfiguration_.prototype, "DefaultBatchSize", void 0);
29314
+ __decorate([
29315
+ Field(() => Boolean, { description: `When enabled, related Record Changes entries are also archived alongside the source records.` }),
29316
+ __metadata("design:type", Boolean)
29317
+ ], MJArchiveConfiguration_.prototype, "ArchiveRelatedRecordChanges", void 0);
29318
+ __decorate([
29319
+ Field({ description: `Current operational status of this configuration: Idle, Running, Error, or Disabled.` }),
29320
+ MaxLength(20),
29321
+ __metadata("design:type", String)
29322
+ ], MJArchiveConfiguration_.prototype, "Status", void 0);
29323
+ __decorate([
29324
+ Field({ description: `The user who created this archive configuration.` }),
29325
+ MaxLength(36),
29326
+ __metadata("design:type", String)
29327
+ ], MJArchiveConfiguration_.prototype, "CreatedByUserID", void 0);
29328
+ __decorate([
29329
+ Field(),
29330
+ __metadata("design:type", Date)
29331
+ ], MJArchiveConfiguration_.prototype, "_mj__CreatedAt", void 0);
29332
+ __decorate([
29333
+ Field(),
29334
+ __metadata("design:type", Date)
29335
+ ], MJArchiveConfiguration_.prototype, "_mj__UpdatedAt", void 0);
29336
+ __decorate([
29337
+ Field({ nullable: true }),
29338
+ MaxLength(200),
29339
+ __metadata("design:type", String)
29340
+ ], MJArchiveConfiguration_.prototype, "StorageAccount", void 0);
29341
+ __decorate([
29342
+ Field(),
29343
+ MaxLength(100),
29344
+ __metadata("design:type", String)
29345
+ ], MJArchiveConfiguration_.prototype, "CreatedByUser", void 0);
29346
+ __decorate([
29347
+ Field(() => [MJArchiveConfigurationEntity_]),
29348
+ __metadata("design:type", Array)
29349
+ ], MJArchiveConfiguration_.prototype, "MJArchiveConfigurationEntities_ArchiveConfigurationIDArray", void 0);
29350
+ __decorate([
29351
+ Field(() => [MJArchiveRun_]),
29352
+ __metadata("design:type", Array)
29353
+ ], MJArchiveConfiguration_.prototype, "MJArchiveRuns_ArchiveConfigurationIDArray", void 0);
29354
+ MJArchiveConfiguration_ = __decorate([
29355
+ ObjectType({ description: `Top-level configuration for an archive pipeline. Defines the storage target, default retention policy, archive format, and operational mode for archiving entity records.` })
29356
+ ], MJArchiveConfiguration_);
29357
+ export { MJArchiveConfiguration_ };
29358
+ //****************************************************************************
29359
+ // INPUT TYPE for MJ: Archive Configurations
29360
+ //****************************************************************************
29361
+ let CreateMJArchiveConfigurationInput = class CreateMJArchiveConfigurationInput {
29362
+ };
29363
+ __decorate([
29364
+ Field({ nullable: true }),
29365
+ __metadata("design:type", String)
29366
+ ], CreateMJArchiveConfigurationInput.prototype, "ID", void 0);
29367
+ __decorate([
29368
+ Field({ nullable: true }),
29369
+ __metadata("design:type", String)
29370
+ ], CreateMJArchiveConfigurationInput.prototype, "Name", void 0);
29371
+ __decorate([
29372
+ Field({ nullable: true }),
29373
+ __metadata("design:type", String)
29374
+ ], CreateMJArchiveConfigurationInput.prototype, "Description", void 0);
29375
+ __decorate([
29376
+ Field({ nullable: true }),
29377
+ __metadata("design:type", String)
29378
+ ], CreateMJArchiveConfigurationInput.prototype, "StorageAccountID", void 0);
29379
+ __decorate([
29380
+ Field({ nullable: true }),
29381
+ __metadata("design:type", String)
29382
+ ], CreateMJArchiveConfigurationInput.prototype, "RootPath", void 0);
29383
+ __decorate([
29384
+ Field({ nullable: true }),
29385
+ __metadata("design:type", String)
29386
+ ], CreateMJArchiveConfigurationInput.prototype, "ArchiveFormat", void 0);
29387
+ __decorate([
29388
+ Field(() => Boolean, { nullable: true }),
29389
+ __metadata("design:type", Boolean)
29390
+ ], CreateMJArchiveConfigurationInput.prototype, "IsActive", void 0);
29391
+ __decorate([
29392
+ Field(() => Int, { nullable: true }),
29393
+ __metadata("design:type", Number)
29394
+ ], CreateMJArchiveConfigurationInput.prototype, "DefaultRetentionDays", void 0);
29395
+ __decorate([
29396
+ Field({ nullable: true }),
29397
+ __metadata("design:type", String)
29398
+ ], CreateMJArchiveConfigurationInput.prototype, "DefaultMode", void 0);
29399
+ __decorate([
29400
+ Field(() => Int, { nullable: true }),
29401
+ __metadata("design:type", Number)
29402
+ ], CreateMJArchiveConfigurationInput.prototype, "DefaultBatchSize", void 0);
29403
+ __decorate([
29404
+ Field(() => Boolean, { nullable: true }),
29405
+ __metadata("design:type", Boolean)
29406
+ ], CreateMJArchiveConfigurationInput.prototype, "ArchiveRelatedRecordChanges", void 0);
29407
+ __decorate([
29408
+ Field({ nullable: true }),
29409
+ __metadata("design:type", String)
29410
+ ], CreateMJArchiveConfigurationInput.prototype, "Status", void 0);
29411
+ __decorate([
29412
+ Field({ nullable: true }),
29413
+ __metadata("design:type", String)
29414
+ ], CreateMJArchiveConfigurationInput.prototype, "CreatedByUserID", void 0);
29415
+ __decorate([
29416
+ Field(() => RestoreContextInput, { nullable: true }),
29417
+ __metadata("design:type", RestoreContextInput)
29418
+ ], CreateMJArchiveConfigurationInput.prototype, "RestoreContext___", void 0);
29419
+ CreateMJArchiveConfigurationInput = __decorate([
29420
+ InputType()
29421
+ ], CreateMJArchiveConfigurationInput);
29422
+ export { CreateMJArchiveConfigurationInput };
29423
+ //****************************************************************************
29424
+ // INPUT TYPE for MJ: Archive Configurations
29425
+ //****************************************************************************
29426
+ let UpdateMJArchiveConfigurationInput = class UpdateMJArchiveConfigurationInput {
29427
+ };
29428
+ __decorate([
29429
+ Field(),
29430
+ __metadata("design:type", String)
29431
+ ], UpdateMJArchiveConfigurationInput.prototype, "ID", void 0);
29432
+ __decorate([
29433
+ Field({ nullable: true }),
29434
+ __metadata("design:type", String)
29435
+ ], UpdateMJArchiveConfigurationInput.prototype, "Name", void 0);
29436
+ __decorate([
29437
+ Field({ nullable: true }),
29438
+ __metadata("design:type", String)
29439
+ ], UpdateMJArchiveConfigurationInput.prototype, "Description", void 0);
29440
+ __decorate([
29441
+ Field({ nullable: true }),
29442
+ __metadata("design:type", String)
29443
+ ], UpdateMJArchiveConfigurationInput.prototype, "StorageAccountID", void 0);
29444
+ __decorate([
29445
+ Field({ nullable: true }),
29446
+ __metadata("design:type", String)
29447
+ ], UpdateMJArchiveConfigurationInput.prototype, "RootPath", void 0);
29448
+ __decorate([
29449
+ Field({ nullable: true }),
29450
+ __metadata("design:type", String)
29451
+ ], UpdateMJArchiveConfigurationInput.prototype, "ArchiveFormat", void 0);
29452
+ __decorate([
29453
+ Field(() => Boolean, { nullable: true }),
29454
+ __metadata("design:type", Boolean)
29455
+ ], UpdateMJArchiveConfigurationInput.prototype, "IsActive", void 0);
29456
+ __decorate([
29457
+ Field(() => Int, { nullable: true }),
29458
+ __metadata("design:type", Number)
29459
+ ], UpdateMJArchiveConfigurationInput.prototype, "DefaultRetentionDays", void 0);
29460
+ __decorate([
29461
+ Field({ nullable: true }),
29462
+ __metadata("design:type", String)
29463
+ ], UpdateMJArchiveConfigurationInput.prototype, "DefaultMode", void 0);
29464
+ __decorate([
29465
+ Field(() => Int, { nullable: true }),
29466
+ __metadata("design:type", Number)
29467
+ ], UpdateMJArchiveConfigurationInput.prototype, "DefaultBatchSize", void 0);
29468
+ __decorate([
29469
+ Field(() => Boolean, { nullable: true }),
29470
+ __metadata("design:type", Boolean)
29471
+ ], UpdateMJArchiveConfigurationInput.prototype, "ArchiveRelatedRecordChanges", void 0);
29472
+ __decorate([
29473
+ Field({ nullable: true }),
29474
+ __metadata("design:type", String)
29475
+ ], UpdateMJArchiveConfigurationInput.prototype, "Status", void 0);
29476
+ __decorate([
29477
+ Field({ nullable: true }),
29478
+ __metadata("design:type", String)
29479
+ ], UpdateMJArchiveConfigurationInput.prototype, "CreatedByUserID", void 0);
29480
+ __decorate([
29481
+ Field(() => [KeyValuePairInput], { nullable: true }),
29482
+ __metadata("design:type", Array)
29483
+ ], UpdateMJArchiveConfigurationInput.prototype, "OldValues___", void 0);
29484
+ __decorate([
29485
+ Field(() => RestoreContextInput, { nullable: true }),
29486
+ __metadata("design:type", RestoreContextInput)
29487
+ ], UpdateMJArchiveConfigurationInput.prototype, "RestoreContext___", void 0);
29488
+ UpdateMJArchiveConfigurationInput = __decorate([
29489
+ InputType()
29490
+ ], UpdateMJArchiveConfigurationInput);
29491
+ export { UpdateMJArchiveConfigurationInput };
29492
+ //****************************************************************************
29493
+ // RESOLVER for MJ: Archive Configurations
29494
+ //****************************************************************************
29495
+ let RunMJArchiveConfigurationViewResult = class RunMJArchiveConfigurationViewResult {
29496
+ };
29497
+ __decorate([
29498
+ Field(() => [MJArchiveConfiguration_]),
29499
+ __metadata("design:type", Array)
29500
+ ], RunMJArchiveConfigurationViewResult.prototype, "Results", void 0);
29501
+ __decorate([
29502
+ Field(() => String, { nullable: true }),
29503
+ __metadata("design:type", String)
29504
+ ], RunMJArchiveConfigurationViewResult.prototype, "UserViewRunID", void 0);
29505
+ __decorate([
29506
+ Field(() => Int, { nullable: true }),
29507
+ __metadata("design:type", Number)
29508
+ ], RunMJArchiveConfigurationViewResult.prototype, "RowCount", void 0);
29509
+ __decorate([
29510
+ Field(() => Int, { nullable: true }),
29511
+ __metadata("design:type", Number)
29512
+ ], RunMJArchiveConfigurationViewResult.prototype, "TotalRowCount", void 0);
29513
+ __decorate([
29514
+ Field(() => Int, { nullable: true }),
29515
+ __metadata("design:type", Number)
29516
+ ], RunMJArchiveConfigurationViewResult.prototype, "ExecutionTime", void 0);
29517
+ __decorate([
29518
+ Field({ nullable: true }),
29519
+ __metadata("design:type", String)
29520
+ ], RunMJArchiveConfigurationViewResult.prototype, "ErrorMessage", void 0);
29521
+ __decorate([
29522
+ Field(() => Boolean, { nullable: false }),
29523
+ __metadata("design:type", Boolean)
29524
+ ], RunMJArchiveConfigurationViewResult.prototype, "Success", void 0);
29525
+ RunMJArchiveConfigurationViewResult = __decorate([
29526
+ ObjectType()
29527
+ ], RunMJArchiveConfigurationViewResult);
29528
+ export { RunMJArchiveConfigurationViewResult };
29529
+ let MJArchiveConfigurationResolver = class MJArchiveConfigurationResolver extends ResolverBase {
29530
+ async RunMJArchiveConfigurationViewByID(input, { providers, userPayload }, pubSub) {
29531
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29532
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
29533
+ }
29534
+ async RunMJArchiveConfigurationViewByName(input, { providers, userPayload }, pubSub) {
29535
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29536
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
29537
+ }
29538
+ async RunMJArchiveConfigurationDynamicView(input, { providers, userPayload }, pubSub) {
29539
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29540
+ input.EntityName = 'MJ: Archive Configurations';
29541
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
29542
+ }
29543
+ async MJArchiveConfiguration(ID, { userPayload, providers }, pubSub) {
29544
+ this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
29545
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29546
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurations')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configurations', userPayload, EntityPermissionType.Read, 'AND');
29547
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29548
+ const result = await this.MapFieldNamesToCodeNames('MJ: Archive Configurations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
29549
+ return result;
29550
+ }
29551
+ async AllMJArchiveConfigurations({ userPayload, providers }, pubSub) {
29552
+ this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
29553
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29554
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurations')}` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configurations', userPayload, EntityPermissionType.Read, ' WHERE');
29555
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29556
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configurations', rows, this.GetUserFromPayload(userPayload));
29557
+ return result;
29558
+ }
29559
+ async MJArchiveConfigurationEntities_ArchiveConfigurationIDArray(mjarchiveconfiguration_, { userPayload, providers }, pubSub) {
29560
+ this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
29561
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29562
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurationEntities')} WHERE ${provider.QuoteIdentifier('ArchiveConfigurationID')}='${mjarchiveconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configuration Entities', userPayload, EntityPermissionType.Read, 'AND');
29563
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29564
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows, this.GetUserFromPayload(userPayload));
29565
+ return result;
29566
+ }
29567
+ async MJArchiveRuns_ArchiveConfigurationIDArray(mjarchiveconfiguration_, { userPayload, providers }, pubSub) {
29568
+ this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
29569
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29570
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRuns')} WHERE ${provider.QuoteIdentifier('ArchiveConfigurationID')}='${mjarchiveconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Runs', userPayload, EntityPermissionType.Read, 'AND');
29571
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29572
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Runs', rows, this.GetUserFromPayload(userPayload));
29573
+ return result;
29574
+ }
29575
+ async CreateMJArchiveConfiguration(input, { providers, userPayload }, pubSub) {
29576
+ const provider = GetReadWriteProvider(providers);
29577
+ return this.CreateRecord('MJ: Archive Configurations', input, provider, userPayload, pubSub);
29578
+ }
29579
+ async UpdateMJArchiveConfiguration(input, { providers, userPayload }, pubSub) {
29580
+ const provider = GetReadWriteProvider(providers);
29581
+ return this.UpdateRecord('MJ: Archive Configurations', input, provider, userPayload, pubSub);
29582
+ }
29583
+ async DeleteMJArchiveConfiguration(ID, options, { providers, userPayload }, pubSub) {
29584
+ const provider = GetReadWriteProvider(providers);
29585
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
29586
+ return this.DeleteRecord('MJ: Archive Configurations', key, options, provider, userPayload, pubSub);
29587
+ }
29588
+ };
29589
+ __decorate([
29590
+ Query(() => RunMJArchiveConfigurationViewResult),
29591
+ __param(0, Arg('input', () => RunViewByIDInput)),
29592
+ __param(1, Ctx()),
29593
+ __param(2, PubSub()),
29594
+ __metadata("design:type", Function),
29595
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
29596
+ __metadata("design:returntype", Promise)
29597
+ ], MJArchiveConfigurationResolver.prototype, "RunMJArchiveConfigurationViewByID", null);
29598
+ __decorate([
29599
+ Query(() => RunMJArchiveConfigurationViewResult),
29600
+ __param(0, Arg('input', () => RunViewByNameInput)),
29601
+ __param(1, Ctx()),
29602
+ __param(2, PubSub()),
29603
+ __metadata("design:type", Function),
29604
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
29605
+ __metadata("design:returntype", Promise)
29606
+ ], MJArchiveConfigurationResolver.prototype, "RunMJArchiveConfigurationViewByName", null);
29607
+ __decorate([
29608
+ Query(() => RunMJArchiveConfigurationViewResult),
29609
+ __param(0, Arg('input', () => RunDynamicViewInput)),
29610
+ __param(1, Ctx()),
29611
+ __param(2, PubSub()),
29612
+ __metadata("design:type", Function),
29613
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
29614
+ __metadata("design:returntype", Promise)
29615
+ ], MJArchiveConfigurationResolver.prototype, "RunMJArchiveConfigurationDynamicView", null);
29616
+ __decorate([
29617
+ Query(() => MJArchiveConfiguration_, { nullable: true }),
29618
+ __param(0, Arg('ID', () => String)),
29619
+ __param(1, Ctx()),
29620
+ __param(2, PubSub()),
29621
+ __metadata("design:type", Function),
29622
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
29623
+ __metadata("design:returntype", Promise)
29624
+ ], MJArchiveConfigurationResolver.prototype, "MJArchiveConfiguration", null);
29625
+ __decorate([
29626
+ Query(() => [MJArchiveConfiguration_]),
29627
+ __param(0, Ctx()),
29628
+ __param(1, PubSub()),
29629
+ __metadata("design:type", Function),
29630
+ __metadata("design:paramtypes", [Object, PubSubEngine]),
29631
+ __metadata("design:returntype", Promise)
29632
+ ], MJArchiveConfigurationResolver.prototype, "AllMJArchiveConfigurations", null);
29633
+ __decorate([
29634
+ FieldResolver(() => [MJArchiveConfigurationEntity_]),
29635
+ __param(0, Root()),
29636
+ __param(1, Ctx()),
29637
+ __param(2, PubSub()),
29638
+ __metadata("design:type", Function),
29639
+ __metadata("design:paramtypes", [MJArchiveConfiguration_, Object, PubSubEngine]),
29640
+ __metadata("design:returntype", Promise)
29641
+ ], MJArchiveConfigurationResolver.prototype, "MJArchiveConfigurationEntities_ArchiveConfigurationIDArray", null);
29642
+ __decorate([
29643
+ FieldResolver(() => [MJArchiveRun_]),
29644
+ __param(0, Root()),
29645
+ __param(1, Ctx()),
29646
+ __param(2, PubSub()),
29647
+ __metadata("design:type", Function),
29648
+ __metadata("design:paramtypes", [MJArchiveConfiguration_, Object, PubSubEngine]),
29649
+ __metadata("design:returntype", Promise)
29650
+ ], MJArchiveConfigurationResolver.prototype, "MJArchiveRuns_ArchiveConfigurationIDArray", null);
29651
+ __decorate([
29652
+ Mutation(() => MJArchiveConfiguration_),
29653
+ __param(0, Arg('input', () => CreateMJArchiveConfigurationInput)),
29654
+ __param(1, Ctx()),
29655
+ __param(2, PubSub()),
29656
+ __metadata("design:type", Function),
29657
+ __metadata("design:paramtypes", [CreateMJArchiveConfigurationInput, Object, PubSubEngine]),
29658
+ __metadata("design:returntype", Promise)
29659
+ ], MJArchiveConfigurationResolver.prototype, "CreateMJArchiveConfiguration", null);
29660
+ __decorate([
29661
+ Mutation(() => MJArchiveConfiguration_),
29662
+ __param(0, Arg('input', () => UpdateMJArchiveConfigurationInput)),
29663
+ __param(1, Ctx()),
29664
+ __param(2, PubSub()),
29665
+ __metadata("design:type", Function),
29666
+ __metadata("design:paramtypes", [UpdateMJArchiveConfigurationInput, Object, PubSubEngine]),
29667
+ __metadata("design:returntype", Promise)
29668
+ ], MJArchiveConfigurationResolver.prototype, "UpdateMJArchiveConfiguration", null);
29669
+ __decorate([
29670
+ Mutation(() => MJArchiveConfiguration_),
29671
+ __param(0, Arg('ID', () => String)),
29672
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
29673
+ __param(2, Ctx()),
29674
+ __param(3, PubSub()),
29675
+ __metadata("design:type", Function),
29676
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
29677
+ __metadata("design:returntype", Promise)
29678
+ ], MJArchiveConfigurationResolver.prototype, "DeleteMJArchiveConfiguration", null);
29679
+ MJArchiveConfigurationResolver = __decorate([
29680
+ Resolver(MJArchiveConfiguration_)
29681
+ ], MJArchiveConfigurationResolver);
29682
+ export { MJArchiveConfigurationResolver };
29683
+ //****************************************************************************
29684
+ // ENTITY CLASS for MJ: Archive Run Details
29685
+ //****************************************************************************
29686
+ let MJArchiveRunDetail_ = class MJArchiveRunDetail_ {
29687
+ };
29688
+ __decorate([
29689
+ Field(),
29690
+ MaxLength(36),
29691
+ __metadata("design:type", String)
29692
+ ], MJArchiveRunDetail_.prototype, "ID", void 0);
29693
+ __decorate([
29694
+ Field({ description: `Foreign key to the parent ArchiveRun.` }),
29695
+ MaxLength(36),
29696
+ __metadata("design:type", String)
29697
+ ], MJArchiveRunDetail_.prototype, "ArchiveRunID", void 0);
29698
+ __decorate([
29699
+ Field({ description: `Foreign key to the Entity this record belongs to.` }),
29700
+ MaxLength(36),
29701
+ __metadata("design:type", String)
29702
+ ], MJArchiveRunDetail_.prototype, "EntityID", void 0);
29703
+ __decorate([
29704
+ Field({ description: `The primary key value of the archived record (string representation to support all key types).` }),
29705
+ MaxLength(750),
29706
+ __metadata("design:type", String)
29707
+ ], MJArchiveRunDetail_.prototype, "RecordID", void 0);
29708
+ __decorate([
29709
+ Field({ description: `Outcome for this record: Success, Failed, or Skipped.` }),
29710
+ MaxLength(50),
29711
+ __metadata("design:type", String)
29712
+ ], MJArchiveRunDetail_.prototype, "Status", void 0);
29713
+ __decorate([
29714
+ Field({ nullable: true, description: `Full path to the archived file in storage (e.g., "archives/production/Users/2026/04/record-id.json").` }),
29715
+ MaxLength(1000),
29716
+ __metadata("design:type", String)
29717
+ ], MJArchiveRunDetail_.prototype, "StoragePath", void 0);
29718
+ __decorate([
29719
+ Field(() => Int, { description: `Number of bytes written to storage for this record.` }),
29720
+ __metadata("design:type", Number)
29721
+ ], MJArchiveRunDetail_.prototype, "BytesArchived", void 0);
29722
+ __decorate([
29723
+ Field({ nullable: true, description: `Error details when Status is Failed.` }),
29724
+ __metadata("design:type", String)
29725
+ ], MJArchiveRunDetail_.prototype, "ErrorMessage", void 0);
29726
+ __decorate([
29727
+ Field({ nullable: true, description: `Timestamp when this record was successfully archived.` }),
29728
+ __metadata("design:type", Date)
29729
+ ], MJArchiveRunDetail_.prototype, "ArchivedAt", void 0);
29730
+ __decorate([
29731
+ Field({ nullable: true, description: `The __mj_UpdatedAt timestamp of the record at the time of archiving, used for conflict detection during restore.` }),
29732
+ __metadata("design:type", Date)
29733
+ ], MJArchiveRunDetail_.prototype, "VersionStamp", void 0);
29734
+ __decorate([
29735
+ Field(() => Boolean, { description: `When true, this detail row represents an archived Record Change entry rather than a primary entity record.` }),
29736
+ __metadata("design:type", Boolean)
29737
+ ], MJArchiveRunDetail_.prototype, "IsRecordChangeArchive", void 0);
29738
+ __decorate([
29739
+ Field(),
29740
+ __metadata("design:type", Date)
29741
+ ], MJArchiveRunDetail_.prototype, "_mj__CreatedAt", void 0);
29742
+ __decorate([
29743
+ Field(),
29744
+ __metadata("design:type", Date)
29745
+ ], MJArchiveRunDetail_.prototype, "_mj__UpdatedAt", void 0);
29746
+ __decorate([
29747
+ Field(),
29748
+ __metadata("design:type", Date)
29749
+ ], MJArchiveRunDetail_.prototype, "ArchiveRun", void 0);
29750
+ __decorate([
29751
+ Field(),
29752
+ MaxLength(255),
29753
+ __metadata("design:type", String)
29754
+ ], MJArchiveRunDetail_.prototype, "Entity", void 0);
29755
+ MJArchiveRunDetail_ = __decorate([
29756
+ ObjectType({ description: `Per-record detail for each archive run. Tracks the outcome, storage location, and error information for each individual record processed.` })
29757
+ ], MJArchiveRunDetail_);
29758
+ export { MJArchiveRunDetail_ };
29759
+ //****************************************************************************
29760
+ // INPUT TYPE for MJ: Archive Run Details
29761
+ //****************************************************************************
29762
+ let CreateMJArchiveRunDetailInput = class CreateMJArchiveRunDetailInput {
29763
+ };
29764
+ __decorate([
29765
+ Field({ nullable: true }),
29766
+ __metadata("design:type", String)
29767
+ ], CreateMJArchiveRunDetailInput.prototype, "ID", void 0);
29768
+ __decorate([
29769
+ Field({ nullable: true }),
29770
+ __metadata("design:type", String)
29771
+ ], CreateMJArchiveRunDetailInput.prototype, "ArchiveRunID", void 0);
29772
+ __decorate([
29773
+ Field({ nullable: true }),
29774
+ __metadata("design:type", String)
29775
+ ], CreateMJArchiveRunDetailInput.prototype, "EntityID", void 0);
29776
+ __decorate([
29777
+ Field({ nullable: true }),
29778
+ __metadata("design:type", String)
29779
+ ], CreateMJArchiveRunDetailInput.prototype, "RecordID", void 0);
29780
+ __decorate([
29781
+ Field({ nullable: true }),
29782
+ __metadata("design:type", String)
29783
+ ], CreateMJArchiveRunDetailInput.prototype, "Status", void 0);
29784
+ __decorate([
29785
+ Field({ nullable: true }),
29786
+ __metadata("design:type", String)
29787
+ ], CreateMJArchiveRunDetailInput.prototype, "StoragePath", void 0);
29788
+ __decorate([
29789
+ Field(() => Int, { nullable: true }),
29790
+ __metadata("design:type", Number)
29791
+ ], CreateMJArchiveRunDetailInput.prototype, "BytesArchived", void 0);
29792
+ __decorate([
29793
+ Field({ nullable: true }),
29794
+ __metadata("design:type", String)
29795
+ ], CreateMJArchiveRunDetailInput.prototype, "ErrorMessage", void 0);
29796
+ __decorate([
29797
+ Field({ nullable: true }),
29798
+ __metadata("design:type", Date)
29799
+ ], CreateMJArchiveRunDetailInput.prototype, "ArchivedAt", void 0);
29800
+ __decorate([
29801
+ Field({ nullable: true }),
29802
+ __metadata("design:type", Date)
29803
+ ], CreateMJArchiveRunDetailInput.prototype, "VersionStamp", void 0);
29804
+ __decorate([
29805
+ Field(() => Boolean, { nullable: true }),
29806
+ __metadata("design:type", Boolean)
29807
+ ], CreateMJArchiveRunDetailInput.prototype, "IsRecordChangeArchive", void 0);
29808
+ __decorate([
29809
+ Field(() => RestoreContextInput, { nullable: true }),
29810
+ __metadata("design:type", RestoreContextInput)
29811
+ ], CreateMJArchiveRunDetailInput.prototype, "RestoreContext___", void 0);
29812
+ CreateMJArchiveRunDetailInput = __decorate([
29813
+ InputType()
29814
+ ], CreateMJArchiveRunDetailInput);
29815
+ export { CreateMJArchiveRunDetailInput };
29816
+ //****************************************************************************
29817
+ // INPUT TYPE for MJ: Archive Run Details
29818
+ //****************************************************************************
29819
+ let UpdateMJArchiveRunDetailInput = class UpdateMJArchiveRunDetailInput {
29820
+ };
29821
+ __decorate([
29822
+ Field(),
29823
+ __metadata("design:type", String)
29824
+ ], UpdateMJArchiveRunDetailInput.prototype, "ID", void 0);
29825
+ __decorate([
29826
+ Field({ nullable: true }),
29827
+ __metadata("design:type", String)
29828
+ ], UpdateMJArchiveRunDetailInput.prototype, "ArchiveRunID", void 0);
29829
+ __decorate([
29830
+ Field({ nullable: true }),
29831
+ __metadata("design:type", String)
29832
+ ], UpdateMJArchiveRunDetailInput.prototype, "EntityID", void 0);
29833
+ __decorate([
29834
+ Field({ nullable: true }),
29835
+ __metadata("design:type", String)
29836
+ ], UpdateMJArchiveRunDetailInput.prototype, "RecordID", void 0);
29837
+ __decorate([
29838
+ Field({ nullable: true }),
29839
+ __metadata("design:type", String)
29840
+ ], UpdateMJArchiveRunDetailInput.prototype, "Status", void 0);
29841
+ __decorate([
29842
+ Field({ nullable: true }),
29843
+ __metadata("design:type", String)
29844
+ ], UpdateMJArchiveRunDetailInput.prototype, "StoragePath", void 0);
29845
+ __decorate([
29846
+ Field(() => Int, { nullable: true }),
29847
+ __metadata("design:type", Number)
29848
+ ], UpdateMJArchiveRunDetailInput.prototype, "BytesArchived", void 0);
29849
+ __decorate([
29850
+ Field({ nullable: true }),
29851
+ __metadata("design:type", String)
29852
+ ], UpdateMJArchiveRunDetailInput.prototype, "ErrorMessage", void 0);
29853
+ __decorate([
29854
+ Field({ nullable: true }),
29855
+ __metadata("design:type", Date)
29856
+ ], UpdateMJArchiveRunDetailInput.prototype, "ArchivedAt", void 0);
29857
+ __decorate([
29858
+ Field({ nullable: true }),
29859
+ __metadata("design:type", Date)
29860
+ ], UpdateMJArchiveRunDetailInput.prototype, "VersionStamp", void 0);
29861
+ __decorate([
29862
+ Field(() => Boolean, { nullable: true }),
29863
+ __metadata("design:type", Boolean)
29864
+ ], UpdateMJArchiveRunDetailInput.prototype, "IsRecordChangeArchive", void 0);
29865
+ __decorate([
29866
+ Field(() => [KeyValuePairInput], { nullable: true }),
29867
+ __metadata("design:type", Array)
29868
+ ], UpdateMJArchiveRunDetailInput.prototype, "OldValues___", void 0);
29869
+ __decorate([
29870
+ Field(() => RestoreContextInput, { nullable: true }),
29871
+ __metadata("design:type", RestoreContextInput)
29872
+ ], UpdateMJArchiveRunDetailInput.prototype, "RestoreContext___", void 0);
29873
+ UpdateMJArchiveRunDetailInput = __decorate([
29874
+ InputType()
29875
+ ], UpdateMJArchiveRunDetailInput);
29876
+ export { UpdateMJArchiveRunDetailInput };
29877
+ //****************************************************************************
29878
+ // RESOLVER for MJ: Archive Run Details
29879
+ //****************************************************************************
29880
+ let RunMJArchiveRunDetailViewResult = class RunMJArchiveRunDetailViewResult {
29881
+ };
29882
+ __decorate([
29883
+ Field(() => [MJArchiveRunDetail_]),
29884
+ __metadata("design:type", Array)
29885
+ ], RunMJArchiveRunDetailViewResult.prototype, "Results", void 0);
29886
+ __decorate([
29887
+ Field(() => String, { nullable: true }),
29888
+ __metadata("design:type", String)
29889
+ ], RunMJArchiveRunDetailViewResult.prototype, "UserViewRunID", void 0);
29890
+ __decorate([
29891
+ Field(() => Int, { nullable: true }),
29892
+ __metadata("design:type", Number)
29893
+ ], RunMJArchiveRunDetailViewResult.prototype, "RowCount", void 0);
29894
+ __decorate([
29895
+ Field(() => Int, { nullable: true }),
29896
+ __metadata("design:type", Number)
29897
+ ], RunMJArchiveRunDetailViewResult.prototype, "TotalRowCount", void 0);
29898
+ __decorate([
29899
+ Field(() => Int, { nullable: true }),
29900
+ __metadata("design:type", Number)
29901
+ ], RunMJArchiveRunDetailViewResult.prototype, "ExecutionTime", void 0);
29902
+ __decorate([
29903
+ Field({ nullable: true }),
29904
+ __metadata("design:type", String)
29905
+ ], RunMJArchiveRunDetailViewResult.prototype, "ErrorMessage", void 0);
29906
+ __decorate([
29907
+ Field(() => Boolean, { nullable: false }),
29908
+ __metadata("design:type", Boolean)
29909
+ ], RunMJArchiveRunDetailViewResult.prototype, "Success", void 0);
29910
+ RunMJArchiveRunDetailViewResult = __decorate([
29911
+ ObjectType()
29912
+ ], RunMJArchiveRunDetailViewResult);
29913
+ export { RunMJArchiveRunDetailViewResult };
29914
+ let MJArchiveRunDetailResolver = class MJArchiveRunDetailResolver extends ResolverBase {
29915
+ async RunMJArchiveRunDetailViewByID(input, { providers, userPayload }, pubSub) {
29916
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29917
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
29918
+ }
29919
+ async RunMJArchiveRunDetailViewByName(input, { providers, userPayload }, pubSub) {
29920
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29921
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
29922
+ }
29923
+ async RunMJArchiveRunDetailDynamicView(input, { providers, userPayload }, pubSub) {
29924
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29925
+ input.EntityName = 'MJ: Archive Run Details';
29926
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
29927
+ }
29928
+ async MJArchiveRunDetail(ID, { userPayload, providers }, pubSub) {
29929
+ this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
29930
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29931
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRunDetails')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Run Details', userPayload, EntityPermissionType.Read, 'AND');
29932
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29933
+ const result = await this.MapFieldNamesToCodeNames('MJ: Archive Run Details', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
29934
+ return result;
29935
+ }
29936
+ async AllMJArchiveRunDetails({ userPayload, providers }, pubSub) {
29937
+ this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
29938
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29939
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRunDetails')}` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Run Details', userPayload, EntityPermissionType.Read, ' WHERE');
29940
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29941
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Run Details', rows, this.GetUserFromPayload(userPayload));
29942
+ return result;
29943
+ }
29944
+ async CreateMJArchiveRunDetail(input, { providers, userPayload }, pubSub) {
29945
+ const provider = GetReadWriteProvider(providers);
29946
+ return this.CreateRecord('MJ: Archive Run Details', input, provider, userPayload, pubSub);
29947
+ }
29948
+ async UpdateMJArchiveRunDetail(input, { providers, userPayload }, pubSub) {
29949
+ const provider = GetReadWriteProvider(providers);
29950
+ return this.UpdateRecord('MJ: Archive Run Details', input, provider, userPayload, pubSub);
29951
+ }
29952
+ async DeleteMJArchiveRunDetail(ID, options, { providers, userPayload }, pubSub) {
29953
+ const provider = GetReadWriteProvider(providers);
29954
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
29955
+ return this.DeleteRecord('MJ: Archive Run Details', key, options, provider, userPayload, pubSub);
29956
+ }
29957
+ };
29958
+ __decorate([
29959
+ Query(() => RunMJArchiveRunDetailViewResult),
29960
+ __param(0, Arg('input', () => RunViewByIDInput)),
29961
+ __param(1, Ctx()),
29962
+ __param(2, PubSub()),
29963
+ __metadata("design:type", Function),
29964
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
29965
+ __metadata("design:returntype", Promise)
29966
+ ], MJArchiveRunDetailResolver.prototype, "RunMJArchiveRunDetailViewByID", null);
29967
+ __decorate([
29968
+ Query(() => RunMJArchiveRunDetailViewResult),
29969
+ __param(0, Arg('input', () => RunViewByNameInput)),
29970
+ __param(1, Ctx()),
29971
+ __param(2, PubSub()),
29972
+ __metadata("design:type", Function),
29973
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
29974
+ __metadata("design:returntype", Promise)
29975
+ ], MJArchiveRunDetailResolver.prototype, "RunMJArchiveRunDetailViewByName", null);
29976
+ __decorate([
29977
+ Query(() => RunMJArchiveRunDetailViewResult),
29978
+ __param(0, Arg('input', () => RunDynamicViewInput)),
29979
+ __param(1, Ctx()),
29980
+ __param(2, PubSub()),
29981
+ __metadata("design:type", Function),
29982
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
29983
+ __metadata("design:returntype", Promise)
29984
+ ], MJArchiveRunDetailResolver.prototype, "RunMJArchiveRunDetailDynamicView", null);
29985
+ __decorate([
29986
+ Query(() => MJArchiveRunDetail_, { nullable: true }),
29987
+ __param(0, Arg('ID', () => String)),
29988
+ __param(1, Ctx()),
29989
+ __param(2, PubSub()),
29990
+ __metadata("design:type", Function),
29991
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
29992
+ __metadata("design:returntype", Promise)
29993
+ ], MJArchiveRunDetailResolver.prototype, "MJArchiveRunDetail", null);
29994
+ __decorate([
29995
+ Query(() => [MJArchiveRunDetail_]),
29996
+ __param(0, Ctx()),
29997
+ __param(1, PubSub()),
29998
+ __metadata("design:type", Function),
29999
+ __metadata("design:paramtypes", [Object, PubSubEngine]),
30000
+ __metadata("design:returntype", Promise)
30001
+ ], MJArchiveRunDetailResolver.prototype, "AllMJArchiveRunDetails", null);
30002
+ __decorate([
30003
+ Mutation(() => MJArchiveRunDetail_),
30004
+ __param(0, Arg('input', () => CreateMJArchiveRunDetailInput)),
30005
+ __param(1, Ctx()),
30006
+ __param(2, PubSub()),
30007
+ __metadata("design:type", Function),
30008
+ __metadata("design:paramtypes", [CreateMJArchiveRunDetailInput, Object, PubSubEngine]),
30009
+ __metadata("design:returntype", Promise)
30010
+ ], MJArchiveRunDetailResolver.prototype, "CreateMJArchiveRunDetail", null);
30011
+ __decorate([
30012
+ Mutation(() => MJArchiveRunDetail_),
30013
+ __param(0, Arg('input', () => UpdateMJArchiveRunDetailInput)),
30014
+ __param(1, Ctx()),
30015
+ __param(2, PubSub()),
30016
+ __metadata("design:type", Function),
30017
+ __metadata("design:paramtypes", [UpdateMJArchiveRunDetailInput, Object, PubSubEngine]),
30018
+ __metadata("design:returntype", Promise)
30019
+ ], MJArchiveRunDetailResolver.prototype, "UpdateMJArchiveRunDetail", null);
30020
+ __decorate([
30021
+ Mutation(() => MJArchiveRunDetail_),
30022
+ __param(0, Arg('ID', () => String)),
30023
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
30024
+ __param(2, Ctx()),
30025
+ __param(3, PubSub()),
30026
+ __metadata("design:type", Function),
30027
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
30028
+ __metadata("design:returntype", Promise)
30029
+ ], MJArchiveRunDetailResolver.prototype, "DeleteMJArchiveRunDetail", null);
30030
+ MJArchiveRunDetailResolver = __decorate([
30031
+ Resolver(MJArchiveRunDetail_)
30032
+ ], MJArchiveRunDetailResolver);
30033
+ export { MJArchiveRunDetailResolver };
30034
+ //****************************************************************************
30035
+ // ENTITY CLASS for MJ: Archive Runs
30036
+ //****************************************************************************
30037
+ let MJArchiveRun_ = class MJArchiveRun_ {
30038
+ };
30039
+ __decorate([
30040
+ Field(),
30041
+ MaxLength(36),
30042
+ __metadata("design:type", String)
30043
+ ], MJArchiveRun_.prototype, "ID", void 0);
30044
+ __decorate([
30045
+ Field({ description: `Foreign key to the ArchiveConfiguration that was executed.` }),
30046
+ MaxLength(36),
30047
+ __metadata("design:type", String)
30048
+ ], MJArchiveRun_.prototype, "ArchiveConfigurationID", void 0);
30049
+ __decorate([
30050
+ Field({ description: `Timestamp when the archive run started.` }),
30051
+ __metadata("design:type", Date)
30052
+ ], MJArchiveRun_.prototype, "StartedAt", void 0);
30053
+ __decorate([
30054
+ Field({ nullable: true, description: `Timestamp when the archive run completed (NULL while still running).` }),
30055
+ __metadata("design:type", Date)
30056
+ ], MJArchiveRun_.prototype, "CompletedAt", void 0);
30057
+ __decorate([
30058
+ Field({ description: `Current status: Running, Complete, Failed, Cancelled, or PartialSuccess.` }),
30059
+ MaxLength(50),
30060
+ __metadata("design:type", String)
30061
+ ], MJArchiveRun_.prototype, "Status", void 0);
30062
+ __decorate([
30063
+ Field(() => Int, { description: `Total number of records identified for archiving in this run.` }),
30064
+ __metadata("design:type", Number)
30065
+ ], MJArchiveRun_.prototype, "TotalRecords", void 0);
30066
+ __decorate([
30067
+ Field(() => Int, { description: `Number of records successfully archived.` }),
30068
+ __metadata("design:type", Number)
30069
+ ], MJArchiveRun_.prototype, "ArchivedRecords", void 0);
30070
+ __decorate([
30071
+ Field(() => Int, { description: `Number of records that failed to archive.` }),
30072
+ __metadata("design:type", Number)
30073
+ ], MJArchiveRun_.prototype, "FailedRecords", void 0);
30074
+ __decorate([
30075
+ Field(() => Int, { description: `Number of records skipped (e.g., already archived or filtered out).` }),
30076
+ __metadata("design:type", Number)
30077
+ ], MJArchiveRun_.prototype, "SkippedRecords", void 0);
30078
+ __decorate([
30079
+ Field(() => Int, { description: `Total bytes written to archive storage during this run.` }),
30080
+ __metadata("design:type", Number)
30081
+ ], MJArchiveRun_.prototype, "TotalBytesArchived", void 0);
30082
+ __decorate([
30083
+ Field({ nullable: true, description: `Aggregated error log for the run. Contains error details when Status is Failed or PartialSuccess.` }),
30084
+ __metadata("design:type", String)
30085
+ ], MJArchiveRun_.prototype, "ErrorLog", void 0);
30086
+ __decorate([
30087
+ Field({ description: `The user who initiated this archive run.` }),
30088
+ MaxLength(36),
30089
+ __metadata("design:type", String)
30090
+ ], MJArchiveRun_.prototype, "UserID", void 0);
28282
30091
  __decorate([
28283
- Field(() => [MJApplicationSetting_]),
28284
- __metadata("design:type", Array)
28285
- ], MJApplication_.prototype, "MJApplicationSettings_ApplicationIDArray", void 0);
30092
+ Field(),
30093
+ __metadata("design:type", Date)
30094
+ ], MJArchiveRun_.prototype, "_mj__CreatedAt", void 0);
28286
30095
  __decorate([
28287
- Field(() => [MJDashboard_]),
28288
- __metadata("design:type", Array)
28289
- ], MJApplication_.prototype, "MJDashboards_ApplicationIDArray", void 0);
30096
+ Field(),
30097
+ __metadata("design:type", Date)
30098
+ ], MJArchiveRun_.prototype, "_mj__UpdatedAt", void 0);
28290
30099
  __decorate([
28291
- Field(() => [MJDashboardUserPreference_]),
28292
- __metadata("design:type", Array)
28293
- ], MJApplication_.prototype, "MJDashboardUserPreferences_ApplicationIDArray", void 0);
30100
+ Field(),
30101
+ MaxLength(255),
30102
+ __metadata("design:type", String)
30103
+ ], MJArchiveRun_.prototype, "ArchiveConfiguration", void 0);
28294
30104
  __decorate([
28295
- Field(() => [MJApplicationRole_]),
30105
+ Field(),
30106
+ MaxLength(100),
30107
+ __metadata("design:type", String)
30108
+ ], MJArchiveRun_.prototype, "User", void 0);
30109
+ __decorate([
30110
+ Field(() => [MJArchiveRunDetail_]),
28296
30111
  __metadata("design:type", Array)
28297
- ], MJApplication_.prototype, "MJApplicationRoles_ApplicationIDArray", void 0);
28298
- MJApplication_ = __decorate([
28299
- ObjectType({ description: `Applications are used to group entities in the user interface for ease of user access` })
28300
- ], MJApplication_);
28301
- export { MJApplication_ };
30112
+ ], MJArchiveRun_.prototype, "MJArchiveRunDetails_ArchiveRunIDArray", void 0);
30113
+ MJArchiveRun_ = __decorate([
30114
+ ObjectType({ description: `Tracks each execution of an archive configuration, including timing, aggregate statistics, and overall status.` })
30115
+ ], MJArchiveRun_);
30116
+ export { MJArchiveRun_ };
28302
30117
  //****************************************************************************
28303
- // INPUT TYPE for MJ: Applications
30118
+ // INPUT TYPE for MJ: Archive Runs
28304
30119
  //****************************************************************************
28305
- let CreateMJApplicationInput = class CreateMJApplicationInput {
30120
+ let CreateMJArchiveRunInput = class CreateMJArchiveRunInput {
28306
30121
  };
28307
30122
  __decorate([
28308
30123
  Field({ nullable: true }),
28309
30124
  __metadata("design:type", String)
28310
- ], CreateMJApplicationInput.prototype, "ID", void 0);
28311
- __decorate([
28312
- Field({ nullable: true }),
28313
- __metadata("design:type", String)
28314
- ], CreateMJApplicationInput.prototype, "Name", void 0);
30125
+ ], CreateMJArchiveRunInput.prototype, "ID", void 0);
28315
30126
  __decorate([
28316
30127
  Field({ nullable: true }),
28317
30128
  __metadata("design:type", String)
28318
- ], CreateMJApplicationInput.prototype, "Description", void 0);
30129
+ ], CreateMJArchiveRunInput.prototype, "ArchiveConfigurationID", void 0);
28319
30130
  __decorate([
28320
30131
  Field({ nullable: true }),
28321
- __metadata("design:type", String)
28322
- ], CreateMJApplicationInput.prototype, "Icon", void 0);
28323
- __decorate([
28324
- Field(() => Boolean, { nullable: true }),
28325
- __metadata("design:type", Boolean)
28326
- ], CreateMJApplicationInput.prototype, "DefaultForNewUser", void 0);
30132
+ __metadata("design:type", Date)
30133
+ ], CreateMJArchiveRunInput.prototype, "StartedAt", void 0);
28327
30134
  __decorate([
28328
30135
  Field({ nullable: true }),
28329
- __metadata("design:type", String)
28330
- ], CreateMJApplicationInput.prototype, "SchemaAutoAddNewEntities", void 0);
30136
+ __metadata("design:type", Date)
30137
+ ], CreateMJArchiveRunInput.prototype, "CompletedAt", void 0);
28331
30138
  __decorate([
28332
30139
  Field({ nullable: true }),
28333
30140
  __metadata("design:type", String)
28334
- ], CreateMJApplicationInput.prototype, "Color", void 0);
30141
+ ], CreateMJArchiveRunInput.prototype, "Status", void 0);
28335
30142
  __decorate([
28336
- Field({ nullable: true }),
28337
- __metadata("design:type", String)
28338
- ], CreateMJApplicationInput.prototype, "DefaultNavItems", void 0);
30143
+ Field(() => Int, { nullable: true }),
30144
+ __metadata("design:type", Number)
30145
+ ], CreateMJArchiveRunInput.prototype, "TotalRecords", void 0);
28339
30146
  __decorate([
28340
- Field({ nullable: true }),
28341
- __metadata("design:type", String)
28342
- ], CreateMJApplicationInput.prototype, "ClassName", void 0);
30147
+ Field(() => Int, { nullable: true }),
30148
+ __metadata("design:type", Number)
30149
+ ], CreateMJArchiveRunInput.prototype, "ArchivedRecords", void 0);
28343
30150
  __decorate([
28344
30151
  Field(() => Int, { nullable: true }),
28345
30152
  __metadata("design:type", Number)
28346
- ], CreateMJApplicationInput.prototype, "DefaultSequence", void 0);
30153
+ ], CreateMJArchiveRunInput.prototype, "FailedRecords", void 0);
28347
30154
  __decorate([
28348
- Field({ nullable: true }),
28349
- __metadata("design:type", String)
28350
- ], CreateMJApplicationInput.prototype, "Status", void 0);
30155
+ Field(() => Int, { nullable: true }),
30156
+ __metadata("design:type", Number)
30157
+ ], CreateMJArchiveRunInput.prototype, "SkippedRecords", void 0);
28351
30158
  __decorate([
28352
- Field({ nullable: true }),
28353
- __metadata("design:type", String)
28354
- ], CreateMJApplicationInput.prototype, "NavigationStyle", void 0);
30159
+ Field(() => Int, { nullable: true }),
30160
+ __metadata("design:type", Number)
30161
+ ], CreateMJArchiveRunInput.prototype, "TotalBytesArchived", void 0);
28355
30162
  __decorate([
28356
30163
  Field({ nullable: true }),
28357
30164
  __metadata("design:type", String)
28358
- ], CreateMJApplicationInput.prototype, "TopNavLocation", void 0);
28359
- __decorate([
28360
- Field(() => Boolean, { nullable: true }),
28361
- __metadata("design:type", Boolean)
28362
- ], CreateMJApplicationInput.prototype, "HideNavBarIconWhenActive", void 0);
30165
+ ], CreateMJArchiveRunInput.prototype, "ErrorLog", void 0);
28363
30166
  __decorate([
28364
30167
  Field({ nullable: true }),
28365
30168
  __metadata("design:type", String)
28366
- ], CreateMJApplicationInput.prototype, "Path", void 0);
28367
- __decorate([
28368
- Field(() => Boolean, { nullable: true }),
28369
- __metadata("design:type", Boolean)
28370
- ], CreateMJApplicationInput.prototype, "AutoUpdatePath", void 0);
30169
+ ], CreateMJArchiveRunInput.prototype, "UserID", void 0);
28371
30170
  __decorate([
28372
30171
  Field(() => RestoreContextInput, { nullable: true }),
28373
30172
  __metadata("design:type", RestoreContextInput)
28374
- ], CreateMJApplicationInput.prototype, "RestoreContext___", void 0);
28375
- CreateMJApplicationInput = __decorate([
30173
+ ], CreateMJArchiveRunInput.prototype, "RestoreContext___", void 0);
30174
+ CreateMJArchiveRunInput = __decorate([
28376
30175
  InputType()
28377
- ], CreateMJApplicationInput);
28378
- export { CreateMJApplicationInput };
30176
+ ], CreateMJArchiveRunInput);
30177
+ export { CreateMJArchiveRunInput };
28379
30178
  //****************************************************************************
28380
- // INPUT TYPE for MJ: Applications
30179
+ // INPUT TYPE for MJ: Archive Runs
28381
30180
  //****************************************************************************
28382
- let UpdateMJApplicationInput = class UpdateMJApplicationInput {
30181
+ let UpdateMJArchiveRunInput = class UpdateMJArchiveRunInput {
28383
30182
  };
28384
30183
  __decorate([
28385
30184
  Field(),
28386
30185
  __metadata("design:type", String)
28387
- ], UpdateMJApplicationInput.prototype, "ID", void 0);
28388
- __decorate([
28389
- Field({ nullable: true }),
28390
- __metadata("design:type", String)
28391
- ], UpdateMJApplicationInput.prototype, "Name", void 0);
30186
+ ], UpdateMJArchiveRunInput.prototype, "ID", void 0);
28392
30187
  __decorate([
28393
30188
  Field({ nullable: true }),
28394
30189
  __metadata("design:type", String)
28395
- ], UpdateMJApplicationInput.prototype, "Description", void 0);
30190
+ ], UpdateMJArchiveRunInput.prototype, "ArchiveConfigurationID", void 0);
28396
30191
  __decorate([
28397
30192
  Field({ nullable: true }),
28398
- __metadata("design:type", String)
28399
- ], UpdateMJApplicationInput.prototype, "Icon", void 0);
28400
- __decorate([
28401
- Field(() => Boolean, { nullable: true }),
28402
- __metadata("design:type", Boolean)
28403
- ], UpdateMJApplicationInput.prototype, "DefaultForNewUser", void 0);
30193
+ __metadata("design:type", Date)
30194
+ ], UpdateMJArchiveRunInput.prototype, "StartedAt", void 0);
28404
30195
  __decorate([
28405
30196
  Field({ nullable: true }),
28406
- __metadata("design:type", String)
28407
- ], UpdateMJApplicationInput.prototype, "SchemaAutoAddNewEntities", void 0);
30197
+ __metadata("design:type", Date)
30198
+ ], UpdateMJArchiveRunInput.prototype, "CompletedAt", void 0);
28408
30199
  __decorate([
28409
30200
  Field({ nullable: true }),
28410
30201
  __metadata("design:type", String)
28411
- ], UpdateMJApplicationInput.prototype, "Color", void 0);
30202
+ ], UpdateMJArchiveRunInput.prototype, "Status", void 0);
28412
30203
  __decorate([
28413
- Field({ nullable: true }),
28414
- __metadata("design:type", String)
28415
- ], UpdateMJApplicationInput.prototype, "DefaultNavItems", void 0);
30204
+ Field(() => Int, { nullable: true }),
30205
+ __metadata("design:type", Number)
30206
+ ], UpdateMJArchiveRunInput.prototype, "TotalRecords", void 0);
28416
30207
  __decorate([
28417
- Field({ nullable: true }),
28418
- __metadata("design:type", String)
28419
- ], UpdateMJApplicationInput.prototype, "ClassName", void 0);
30208
+ Field(() => Int, { nullable: true }),
30209
+ __metadata("design:type", Number)
30210
+ ], UpdateMJArchiveRunInput.prototype, "ArchivedRecords", void 0);
28420
30211
  __decorate([
28421
30212
  Field(() => Int, { nullable: true }),
28422
30213
  __metadata("design:type", Number)
28423
- ], UpdateMJApplicationInput.prototype, "DefaultSequence", void 0);
30214
+ ], UpdateMJArchiveRunInput.prototype, "FailedRecords", void 0);
28424
30215
  __decorate([
28425
- Field({ nullable: true }),
28426
- __metadata("design:type", String)
28427
- ], UpdateMJApplicationInput.prototype, "Status", void 0);
30216
+ Field(() => Int, { nullable: true }),
30217
+ __metadata("design:type", Number)
30218
+ ], UpdateMJArchiveRunInput.prototype, "SkippedRecords", void 0);
28428
30219
  __decorate([
28429
- Field({ nullable: true }),
28430
- __metadata("design:type", String)
28431
- ], UpdateMJApplicationInput.prototype, "NavigationStyle", void 0);
30220
+ Field(() => Int, { nullable: true }),
30221
+ __metadata("design:type", Number)
30222
+ ], UpdateMJArchiveRunInput.prototype, "TotalBytesArchived", void 0);
28432
30223
  __decorate([
28433
30224
  Field({ nullable: true }),
28434
30225
  __metadata("design:type", String)
28435
- ], UpdateMJApplicationInput.prototype, "TopNavLocation", void 0);
28436
- __decorate([
28437
- Field(() => Boolean, { nullable: true }),
28438
- __metadata("design:type", Boolean)
28439
- ], UpdateMJApplicationInput.prototype, "HideNavBarIconWhenActive", void 0);
30226
+ ], UpdateMJArchiveRunInput.prototype, "ErrorLog", void 0);
28440
30227
  __decorate([
28441
30228
  Field({ nullable: true }),
28442
30229
  __metadata("design:type", String)
28443
- ], UpdateMJApplicationInput.prototype, "Path", void 0);
28444
- __decorate([
28445
- Field(() => Boolean, { nullable: true }),
28446
- __metadata("design:type", Boolean)
28447
- ], UpdateMJApplicationInput.prototype, "AutoUpdatePath", void 0);
30230
+ ], UpdateMJArchiveRunInput.prototype, "UserID", void 0);
28448
30231
  __decorate([
28449
30232
  Field(() => [KeyValuePairInput], { nullable: true }),
28450
30233
  __metadata("design:type", Array)
28451
- ], UpdateMJApplicationInput.prototype, "OldValues___", void 0);
30234
+ ], UpdateMJArchiveRunInput.prototype, "OldValues___", void 0);
28452
30235
  __decorate([
28453
30236
  Field(() => RestoreContextInput, { nullable: true }),
28454
30237
  __metadata("design:type", RestoreContextInput)
28455
- ], UpdateMJApplicationInput.prototype, "RestoreContext___", void 0);
28456
- UpdateMJApplicationInput = __decorate([
30238
+ ], UpdateMJArchiveRunInput.prototype, "RestoreContext___", void 0);
30239
+ UpdateMJArchiveRunInput = __decorate([
28457
30240
  InputType()
28458
- ], UpdateMJApplicationInput);
28459
- export { UpdateMJApplicationInput };
30241
+ ], UpdateMJArchiveRunInput);
30242
+ export { UpdateMJArchiveRunInput };
28460
30243
  //****************************************************************************
28461
- // RESOLVER for MJ: Applications
30244
+ // RESOLVER for MJ: Archive Runs
28462
30245
  //****************************************************************************
28463
- let RunMJApplicationViewResult = class RunMJApplicationViewResult {
30246
+ let RunMJArchiveRunViewResult = class RunMJArchiveRunViewResult {
28464
30247
  };
28465
30248
  __decorate([
28466
- Field(() => [MJApplication_]),
30249
+ Field(() => [MJArchiveRun_]),
28467
30250
  __metadata("design:type", Array)
28468
- ], RunMJApplicationViewResult.prototype, "Results", void 0);
30251
+ ], RunMJArchiveRunViewResult.prototype, "Results", void 0);
28469
30252
  __decorate([
28470
30253
  Field(() => String, { nullable: true }),
28471
30254
  __metadata("design:type", String)
28472
- ], RunMJApplicationViewResult.prototype, "UserViewRunID", void 0);
30255
+ ], RunMJArchiveRunViewResult.prototype, "UserViewRunID", void 0);
28473
30256
  __decorate([
28474
30257
  Field(() => Int, { nullable: true }),
28475
30258
  __metadata("design:type", Number)
28476
- ], RunMJApplicationViewResult.prototype, "RowCount", void 0);
30259
+ ], RunMJArchiveRunViewResult.prototype, "RowCount", void 0);
28477
30260
  __decorate([
28478
30261
  Field(() => Int, { nullable: true }),
28479
30262
  __metadata("design:type", Number)
28480
- ], RunMJApplicationViewResult.prototype, "TotalRowCount", void 0);
30263
+ ], RunMJArchiveRunViewResult.prototype, "TotalRowCount", void 0);
28481
30264
  __decorate([
28482
30265
  Field(() => Int, { nullable: true }),
28483
30266
  __metadata("design:type", Number)
28484
- ], RunMJApplicationViewResult.prototype, "ExecutionTime", void 0);
30267
+ ], RunMJArchiveRunViewResult.prototype, "ExecutionTime", void 0);
28485
30268
  __decorate([
28486
30269
  Field({ nullable: true }),
28487
30270
  __metadata("design:type", String)
28488
- ], RunMJApplicationViewResult.prototype, "ErrorMessage", void 0);
30271
+ ], RunMJArchiveRunViewResult.prototype, "ErrorMessage", void 0);
28489
30272
  __decorate([
28490
30273
  Field(() => Boolean, { nullable: false }),
28491
30274
  __metadata("design:type", Boolean)
28492
- ], RunMJApplicationViewResult.prototype, "Success", void 0);
28493
- RunMJApplicationViewResult = __decorate([
30275
+ ], RunMJArchiveRunViewResult.prototype, "Success", void 0);
30276
+ RunMJArchiveRunViewResult = __decorate([
28494
30277
  ObjectType()
28495
- ], RunMJApplicationViewResult);
28496
- export { RunMJApplicationViewResult };
28497
- let MJApplicationResolver = class MJApplicationResolver extends ResolverBase {
28498
- async RunMJApplicationViewByID(input, { providers, userPayload }, pubSub) {
30278
+ ], RunMJArchiveRunViewResult);
30279
+ export { RunMJArchiveRunViewResult };
30280
+ let MJArchiveRunResolver = class MJArchiveRunResolver extends ResolverBase {
30281
+ async RunMJArchiveRunViewByID(input, { providers, userPayload }, pubSub) {
28499
30282
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28500
30283
  return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
28501
30284
  }
28502
- async RunMJApplicationViewByName(input, { providers, userPayload }, pubSub) {
30285
+ async RunMJArchiveRunViewByName(input, { providers, userPayload }, pubSub) {
28503
30286
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28504
30287
  return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
28505
30288
  }
28506
- async RunMJApplicationDynamicView(input, { providers, userPayload }, pubSub) {
30289
+ async RunMJArchiveRunDynamicView(input, { providers, userPayload }, pubSub) {
28507
30290
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28508
- input.EntityName = 'MJ: Applications';
30291
+ input.EntityName = 'MJ: Archive Runs';
28509
30292
  return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
28510
30293
  }
28511
- async MJApplication(ID, { userPayload, providers }, pubSub) {
28512
- this.CheckUserReadPermissions('MJ: Applications', userPayload);
28513
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28514
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplications')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Applications', userPayload, EntityPermissionType.Read, 'AND');
28515
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28516
- const result = await this.MapFieldNamesToCodeNames('MJ: Applications', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
28517
- return result;
28518
- }
28519
- async AllMJApplications({ userPayload, providers }, pubSub) {
28520
- this.CheckUserReadPermissions('MJ: Applications', userPayload);
28521
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28522
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplications')}` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Applications', userPayload, EntityPermissionType.Read, ' WHERE');
28523
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28524
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Applications', rows, this.GetUserFromPayload(userPayload));
28525
- return result;
28526
- }
28527
- async MJApplicationEntities_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28528
- this.CheckUserReadPermissions('MJ: Application Entities', userPayload);
28529
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28530
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplicationEntities')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Application Entities', userPayload, EntityPermissionType.Read, 'AND');
28531
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28532
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Application Entities', rows, this.GetUserFromPayload(userPayload));
28533
- return result;
28534
- }
28535
- async MJUserApplications_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28536
- this.CheckUserReadPermissions('MJ: User Applications', userPayload);
28537
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28538
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserApplications')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Applications', userPayload, EntityPermissionType.Read, 'AND');
28539
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28540
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Applications', rows, this.GetUserFromPayload(userPayload));
28541
- return result;
28542
- }
28543
- async MJApplicationSettings_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28544
- this.CheckUserReadPermissions('MJ: Application Settings', userPayload);
28545
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28546
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplicationSettings')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Application Settings', userPayload, EntityPermissionType.Read, 'AND');
28547
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28548
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Application Settings', rows, this.GetUserFromPayload(userPayload));
28549
- return result;
28550
- }
28551
- async MJDashboards_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28552
- this.CheckUserReadPermissions('MJ: Dashboards', userPayload);
30294
+ async MJArchiveRun(ID, { userPayload, providers }, pubSub) {
30295
+ this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
28553
30296
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28554
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboards')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboards', userPayload, EntityPermissionType.Read, 'AND');
30297
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRuns')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Runs', userPayload, EntityPermissionType.Read, 'AND');
28555
30298
  const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28556
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboards', rows, this.GetUserFromPayload(userPayload));
30299
+ const result = await this.MapFieldNamesToCodeNames('MJ: Archive Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
28557
30300
  return result;
28558
30301
  }
28559
- async MJDashboardUserPreferences_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28560
- this.CheckUserReadPermissions('MJ: Dashboard User Preferences', userPayload);
30302
+ async AllMJArchiveRuns({ userPayload, providers }, pubSub) {
30303
+ this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
28561
30304
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28562
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwDashboardUserPreferences')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User Preferences', userPayload, EntityPermissionType.Read, 'AND');
30305
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRuns')}` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Runs', userPayload, EntityPermissionType.Read, ' WHERE');
28563
30306
  const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28564
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User Preferences', rows, this.GetUserFromPayload(userPayload));
30307
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Runs', rows, this.GetUserFromPayload(userPayload));
28565
30308
  return result;
28566
30309
  }
28567
- async MJApplicationRoles_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
28568
- this.CheckUserReadPermissions('MJ: Application Roles', userPayload);
30310
+ async MJArchiveRunDetails_ArchiveRunIDArray(mjarchiverun_, { userPayload, providers }, pubSub) {
30311
+ this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
28569
30312
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28570
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplicationRoles')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Application Roles', userPayload, EntityPermissionType.Read, 'AND');
30313
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRunDetails')} WHERE ${provider.QuoteIdentifier('ArchiveRunID')}='${mjarchiverun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Run Details', userPayload, EntityPermissionType.Read, 'AND');
28571
30314
  const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28572
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Application Roles', rows, this.GetUserFromPayload(userPayload));
30315
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Run Details', rows, this.GetUserFromPayload(userPayload));
28573
30316
  return result;
28574
30317
  }
28575
- async CreateMJApplication(input, { providers, userPayload }, pubSub) {
30318
+ async CreateMJArchiveRun(input, { providers, userPayload }, pubSub) {
28576
30319
  const provider = GetReadWriteProvider(providers);
28577
- return this.CreateRecord('MJ: Applications', input, provider, userPayload, pubSub);
30320
+ return this.CreateRecord('MJ: Archive Runs', input, provider, userPayload, pubSub);
28578
30321
  }
28579
- async UpdateMJApplication(input, { providers, userPayload }, pubSub) {
30322
+ async UpdateMJArchiveRun(input, { providers, userPayload }, pubSub) {
28580
30323
  const provider = GetReadWriteProvider(providers);
28581
- return this.UpdateRecord('MJ: Applications', input, provider, userPayload, pubSub);
30324
+ return this.UpdateRecord('MJ: Archive Runs', input, provider, userPayload, pubSub);
28582
30325
  }
28583
- async DeleteMJApplication(ID, options, { providers, userPayload }, pubSub) {
30326
+ async DeleteMJArchiveRun(ID, options, { providers, userPayload }, pubSub) {
28584
30327
  const provider = GetReadWriteProvider(providers);
28585
30328
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
28586
- return this.DeleteRecord('MJ: Applications', key, options, provider, userPayload, pubSub);
30329
+ return this.DeleteRecord('MJ: Archive Runs', key, options, provider, userPayload, pubSub);
28587
30330
  }
28588
30331
  };
28589
30332
  __decorate([
28590
- Query(() => RunMJApplicationViewResult),
30333
+ Query(() => RunMJArchiveRunViewResult),
28591
30334
  __param(0, Arg('input', () => RunViewByIDInput)),
28592
30335
  __param(1, Ctx()),
28593
30336
  __param(2, PubSub()),
28594
30337
  __metadata("design:type", Function),
28595
30338
  __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
28596
30339
  __metadata("design:returntype", Promise)
28597
- ], MJApplicationResolver.prototype, "RunMJApplicationViewByID", null);
30340
+ ], MJArchiveRunResolver.prototype, "RunMJArchiveRunViewByID", null);
28598
30341
  __decorate([
28599
- Query(() => RunMJApplicationViewResult),
30342
+ Query(() => RunMJArchiveRunViewResult),
28600
30343
  __param(0, Arg('input', () => RunViewByNameInput)),
28601
30344
  __param(1, Ctx()),
28602
30345
  __param(2, PubSub()),
28603
30346
  __metadata("design:type", Function),
28604
30347
  __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
28605
30348
  __metadata("design:returntype", Promise)
28606
- ], MJApplicationResolver.prototype, "RunMJApplicationViewByName", null);
30349
+ ], MJArchiveRunResolver.prototype, "RunMJArchiveRunViewByName", null);
28607
30350
  __decorate([
28608
- Query(() => RunMJApplicationViewResult),
30351
+ Query(() => RunMJArchiveRunViewResult),
28609
30352
  __param(0, Arg('input', () => RunDynamicViewInput)),
28610
30353
  __param(1, Ctx()),
28611
30354
  __param(2, PubSub()),
28612
30355
  __metadata("design:type", Function),
28613
30356
  __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
28614
30357
  __metadata("design:returntype", Promise)
28615
- ], MJApplicationResolver.prototype, "RunMJApplicationDynamicView", null);
30358
+ ], MJArchiveRunResolver.prototype, "RunMJArchiveRunDynamicView", null);
28616
30359
  __decorate([
28617
- Query(() => MJApplication_, { nullable: true }),
30360
+ Query(() => MJArchiveRun_, { nullable: true }),
28618
30361
  __param(0, Arg('ID', () => String)),
28619
30362
  __param(1, Ctx()),
28620
30363
  __param(2, PubSub()),
28621
30364
  __metadata("design:type", Function),
28622
30365
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
28623
30366
  __metadata("design:returntype", Promise)
28624
- ], MJApplicationResolver.prototype, "MJApplication", null);
30367
+ ], MJArchiveRunResolver.prototype, "MJArchiveRun", null);
28625
30368
  __decorate([
28626
- Query(() => [MJApplication_]),
30369
+ Query(() => [MJArchiveRun_]),
28627
30370
  __param(0, Ctx()),
28628
30371
  __param(1, PubSub()),
28629
30372
  __metadata("design:type", Function),
28630
30373
  __metadata("design:paramtypes", [Object, PubSubEngine]),
28631
30374
  __metadata("design:returntype", Promise)
28632
- ], MJApplicationResolver.prototype, "AllMJApplications", null);
28633
- __decorate([
28634
- FieldResolver(() => [MJApplicationEntity_]),
28635
- __param(0, Root()),
28636
- __param(1, Ctx()),
28637
- __param(2, PubSub()),
28638
- __metadata("design:type", Function),
28639
- __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28640
- __metadata("design:returntype", Promise)
28641
- ], MJApplicationResolver.prototype, "MJApplicationEntities_ApplicationIDArray", null);
28642
- __decorate([
28643
- FieldResolver(() => [MJUserApplication_]),
28644
- __param(0, Root()),
28645
- __param(1, Ctx()),
28646
- __param(2, PubSub()),
28647
- __metadata("design:type", Function),
28648
- __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28649
- __metadata("design:returntype", Promise)
28650
- ], MJApplicationResolver.prototype, "MJUserApplications_ApplicationIDArray", null);
28651
- __decorate([
28652
- FieldResolver(() => [MJApplicationSetting_]),
28653
- __param(0, Root()),
28654
- __param(1, Ctx()),
28655
- __param(2, PubSub()),
28656
- __metadata("design:type", Function),
28657
- __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28658
- __metadata("design:returntype", Promise)
28659
- ], MJApplicationResolver.prototype, "MJApplicationSettings_ApplicationIDArray", null);
28660
- __decorate([
28661
- FieldResolver(() => [MJDashboard_]),
28662
- __param(0, Root()),
28663
- __param(1, Ctx()),
28664
- __param(2, PubSub()),
28665
- __metadata("design:type", Function),
28666
- __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28667
- __metadata("design:returntype", Promise)
28668
- ], MJApplicationResolver.prototype, "MJDashboards_ApplicationIDArray", null);
28669
- __decorate([
28670
- FieldResolver(() => [MJDashboardUserPreference_]),
28671
- __param(0, Root()),
28672
- __param(1, Ctx()),
28673
- __param(2, PubSub()),
28674
- __metadata("design:type", Function),
28675
- __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
28676
- __metadata("design:returntype", Promise)
28677
- ], MJApplicationResolver.prototype, "MJDashboardUserPreferences_ApplicationIDArray", null);
30375
+ ], MJArchiveRunResolver.prototype, "AllMJArchiveRuns", null);
28678
30376
  __decorate([
28679
- FieldResolver(() => [MJApplicationRole_]),
30377
+ FieldResolver(() => [MJArchiveRunDetail_]),
28680
30378
  __param(0, Root()),
28681
30379
  __param(1, Ctx()),
28682
30380
  __param(2, PubSub()),
28683
30381
  __metadata("design:type", Function),
28684
- __metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
30382
+ __metadata("design:paramtypes", [MJArchiveRun_, Object, PubSubEngine]),
28685
30383
  __metadata("design:returntype", Promise)
28686
- ], MJApplicationResolver.prototype, "MJApplicationRoles_ApplicationIDArray", null);
30384
+ ], MJArchiveRunResolver.prototype, "MJArchiveRunDetails_ArchiveRunIDArray", null);
28687
30385
  __decorate([
28688
- Mutation(() => MJApplication_),
28689
- __param(0, Arg('input', () => CreateMJApplicationInput)),
30386
+ Mutation(() => MJArchiveRun_),
30387
+ __param(0, Arg('input', () => CreateMJArchiveRunInput)),
28690
30388
  __param(1, Ctx()),
28691
30389
  __param(2, PubSub()),
28692
30390
  __metadata("design:type", Function),
28693
- __metadata("design:paramtypes", [CreateMJApplicationInput, Object, PubSubEngine]),
30391
+ __metadata("design:paramtypes", [CreateMJArchiveRunInput, Object, PubSubEngine]),
28694
30392
  __metadata("design:returntype", Promise)
28695
- ], MJApplicationResolver.prototype, "CreateMJApplication", null);
30393
+ ], MJArchiveRunResolver.prototype, "CreateMJArchiveRun", null);
28696
30394
  __decorate([
28697
- Mutation(() => MJApplication_),
28698
- __param(0, Arg('input', () => UpdateMJApplicationInput)),
30395
+ Mutation(() => MJArchiveRun_),
30396
+ __param(0, Arg('input', () => UpdateMJArchiveRunInput)),
28699
30397
  __param(1, Ctx()),
28700
30398
  __param(2, PubSub()),
28701
30399
  __metadata("design:type", Function),
28702
- __metadata("design:paramtypes", [UpdateMJApplicationInput, Object, PubSubEngine]),
30400
+ __metadata("design:paramtypes", [UpdateMJArchiveRunInput, Object, PubSubEngine]),
28703
30401
  __metadata("design:returntype", Promise)
28704
- ], MJApplicationResolver.prototype, "UpdateMJApplication", null);
30402
+ ], MJArchiveRunResolver.prototype, "UpdateMJArchiveRun", null);
28705
30403
  __decorate([
28706
- Mutation(() => MJApplication_),
30404
+ Mutation(() => MJArchiveRun_),
28707
30405
  __param(0, Arg('ID', () => String)),
28708
30406
  __param(1, Arg('options___', () => DeleteOptionsInput)),
28709
30407
  __param(2, Ctx()),
@@ -28711,11 +30409,11 @@ __decorate([
28711
30409
  __metadata("design:type", Function),
28712
30410
  __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
28713
30411
  __metadata("design:returntype", Promise)
28714
- ], MJApplicationResolver.prototype, "DeleteMJApplication", null);
28715
- MJApplicationResolver = __decorate([
28716
- Resolver(MJApplication_)
28717
- ], MJApplicationResolver);
28718
- export { MJApplicationResolver };
30412
+ ], MJArchiveRunResolver.prototype, "DeleteMJArchiveRun", null);
30413
+ MJArchiveRunResolver = __decorate([
30414
+ Resolver(MJArchiveRun_)
30415
+ ], MJArchiveRunResolver);
30416
+ export { MJArchiveRunResolver };
28719
30417
  //****************************************************************************
28720
30418
  // ENTITY CLASS for MJ: Artifact Permissions
28721
30419
  //****************************************************************************
@@ -29079,6 +30777,11 @@ __decorate([
29079
30777
  MaxLength(10),
29080
30778
  __metadata("design:type", String)
29081
30779
  ], MJArtifactType_.prototype, "ContentCategory", void 0);
30780
+ __decorate([
30781
+ Field({ nullable: true, description: `Class name for the BaseArtifactToolLibrary subclass that provides type-specific artifact exploration tools for agents. Resolved via ClassFactory. When NULL, ArtifactToolManager uses name-based fallback resolution.` }),
30782
+ MaxLength(100),
30783
+ __metadata("design:type", String)
30784
+ ], MJArtifactType_.prototype, "ToolLibraryClass", void 0);
29082
30785
  __decorate([
29083
30786
  Field({ nullable: true }),
29084
30787
  MaxLength(100),
@@ -29158,6 +30861,10 @@ __decorate([
29158
30861
  Field({ nullable: true }),
29159
30862
  __metadata("design:type", String)
29160
30863
  ], CreateMJArtifactTypeInput.prototype, "ContentCategory", void 0);
30864
+ __decorate([
30865
+ Field({ nullable: true }),
30866
+ __metadata("design:type", String)
30867
+ ], CreateMJArtifactTypeInput.prototype, "ToolLibraryClass", void 0);
29161
30868
  __decorate([
29162
30869
  Field(() => RestoreContextInput, { nullable: true }),
29163
30870
  __metadata("design:type", RestoreContextInput)
@@ -29211,6 +30918,10 @@ __decorate([
29211
30918
  Field({ nullable: true }),
29212
30919
  __metadata("design:type", String)
29213
30920
  ], UpdateMJArtifactTypeInput.prototype, "ContentCategory", void 0);
30921
+ __decorate([
30922
+ Field({ nullable: true }),
30923
+ __metadata("design:type", String)
30924
+ ], UpdateMJArtifactTypeInput.prototype, "ToolLibraryClass", void 0);
29214
30925
  __decorate([
29215
30926
  Field(() => [KeyValuePairInput], { nullable: true }),
29216
30927
  __metadata("design:type", Array)
@@ -56405,6 +58116,14 @@ __decorate([
56405
58116
  Field(() => [MJEntityField_]),
56406
58117
  __metadata("design:type", Array)
56407
58118
  ], MJEntity_.prototype, "MJEntityFields_RelatedEntityIDArray", void 0);
58119
+ __decorate([
58120
+ Field(() => [MJArchiveConfigurationEntity_]),
58121
+ __metadata("design:type", Array)
58122
+ ], MJEntity_.prototype, "MJArchiveConfigurationEntities_EntityIDArray", void 0);
58123
+ __decorate([
58124
+ Field(() => [MJArchiveRunDetail_]),
58125
+ __metadata("design:type", Array)
58126
+ ], MJEntity_.prototype, "MJArchiveRunDetails_EntityIDArray", void 0);
56408
58127
  __decorate([
56409
58128
  Field(() => [MJResourceType_]),
56410
58129
  __metadata("design:type", Array)
@@ -57418,6 +59137,22 @@ let MJEntityResolverBase = class MJEntityResolverBase extends ResolverBase {
57418
59137
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Fields', rows, this.GetUserFromPayload(userPayload));
57419
59138
  return result;
57420
59139
  }
59140
+ async MJArchiveConfigurationEntities_EntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
59141
+ this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
59142
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
59143
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurationEntities')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configuration Entities', userPayload, EntityPermissionType.Read, 'AND');
59144
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
59145
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows, this.GetUserFromPayload(userPayload));
59146
+ return result;
59147
+ }
59148
+ async MJArchiveRunDetails_EntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
59149
+ this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
59150
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
59151
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRunDetails')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Run Details', userPayload, EntityPermissionType.Read, 'AND');
59152
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
59153
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Run Details', rows, this.GetUserFromPayload(userPayload));
59154
+ return result;
59155
+ }
57421
59156
  async MJResourceTypes_CategoryEntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
57422
59157
  this.CheckUserReadPermissions('MJ: Resource Types', userPayload);
57423
59158
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -57967,6 +59702,24 @@ __decorate([
57967
59702
  __metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
57968
59703
  __metadata("design:returntype", Promise)
57969
59704
  ], MJEntityResolverBase.prototype, "MJEntityFields_RelatedEntityIDArray", null);
59705
+ __decorate([
59706
+ FieldResolver(() => [MJArchiveConfigurationEntity_]),
59707
+ __param(0, Root()),
59708
+ __param(1, Ctx()),
59709
+ __param(2, PubSub()),
59710
+ __metadata("design:type", Function),
59711
+ __metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
59712
+ __metadata("design:returntype", Promise)
59713
+ ], MJEntityResolverBase.prototype, "MJArchiveConfigurationEntities_EntityIDArray", null);
59714
+ __decorate([
59715
+ FieldResolver(() => [MJArchiveRunDetail_]),
59716
+ __param(0, Root()),
59717
+ __param(1, Ctx()),
59718
+ __param(2, PubSub()),
59719
+ __metadata("design:type", Function),
59720
+ __metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
59721
+ __metadata("design:returntype", Promise)
59722
+ ], MJEntityResolverBase.prototype, "MJArchiveRunDetails_EntityIDArray", null);
57970
59723
  __decorate([
57971
59724
  FieldResolver(() => [MJResourceType_]),
57972
59725
  __param(0, Root()),
@@ -63525,6 +65278,11 @@ __decorate([
63525
65278
  Field(),
63526
65279
  __metadata("design:type", Date)
63527
65280
  ], MJEntityPermission_.prototype, "_mj__UpdatedAt", void 0);
65281
+ __decorate([
65282
+ Field({ description: `Allow or Deny. Deny rows override any Allow grants on the same (EntityID, RoleID, action) at evaluation time, letting administrators exclude a role from an action another role grants.` }),
65283
+ MaxLength(10),
65284
+ __metadata("design:type", String)
65285
+ ], MJEntityPermission_.prototype, "Type", void 0);
63528
65286
  __decorate([
63529
65287
  Field(),
63530
65288
  MaxLength(255),
@@ -63613,6 +65371,10 @@ __decorate([
63613
65371
  Field({ nullable: true }),
63614
65372
  __metadata("design:type", String)
63615
65373
  ], CreateMJEntityPermissionInput.prototype, "DeleteRLSFilterID", void 0);
65374
+ __decorate([
65375
+ Field({ nullable: true }),
65376
+ __metadata("design:type", String)
65377
+ ], CreateMJEntityPermissionInput.prototype, "Type", void 0);
63616
65378
  __decorate([
63617
65379
  Field(() => RestoreContextInput, { nullable: true }),
63618
65380
  __metadata("design:type", RestoreContextInput)
@@ -63670,6 +65432,10 @@ __decorate([
63670
65432
  Field({ nullable: true }),
63671
65433
  __metadata("design:type", String)
63672
65434
  ], UpdateMJEntityPermissionInput.prototype, "DeleteRLSFilterID", void 0);
65435
+ __decorate([
65436
+ Field({ nullable: true }),
65437
+ __metadata("design:type", String)
65438
+ ], UpdateMJEntityPermissionInput.prototype, "Type", void 0);
63673
65439
  __decorate([
63674
65440
  Field(() => [KeyValuePairInput], { nullable: true }),
63675
65441
  __metadata("design:type", Array)
@@ -67137,6 +68903,10 @@ __decorate([
67137
68903
  Field(() => [MJAIAgentType_]),
67138
68904
  __metadata("design:type", Array)
67139
68905
  ], MJFileStorageAccount_.prototype, "MJAIAgentTypes_DefaultStorageAccountIDArray", void 0);
68906
+ __decorate([
68907
+ Field(() => [MJArchiveConfiguration_]),
68908
+ __metadata("design:type", Array)
68909
+ ], MJFileStorageAccount_.prototype, "MJArchiveConfigurations_StorageAccountIDArray", void 0);
67140
68910
  __decorate([
67141
68911
  Field(() => [MJFileStorageAccountPermission_]),
67142
68912
  __metadata("design:type", Array)
@@ -67298,6 +69068,14 @@ let MJFileStorageAccountResolver = class MJFileStorageAccountResolver extends Re
67298
69068
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', rows, this.GetUserFromPayload(userPayload));
67299
69069
  return result;
67300
69070
  }
69071
+ async MJArchiveConfigurations_StorageAccountIDArray(mjfilestorageaccount_, { userPayload, providers }, pubSub) {
69072
+ this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
69073
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
69074
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurations')} WHERE ${provider.QuoteIdentifier('StorageAccountID')}='${mjfilestorageaccount_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configurations', userPayload, EntityPermissionType.Read, 'AND');
69075
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
69076
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configurations', rows, this.GetUserFromPayload(userPayload));
69077
+ return result;
69078
+ }
67301
69079
  async MJFileStorageAccountPermissions_FileStorageAccountIDArray(mjfilestorageaccount_, { userPayload, providers }, pubSub) {
67302
69080
  this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
67303
69081
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -67381,6 +69159,15 @@ __decorate([
67381
69159
  __metadata("design:paramtypes", [MJFileStorageAccount_, Object, PubSubEngine]),
67382
69160
  __metadata("design:returntype", Promise)
67383
69161
  ], MJFileStorageAccountResolver.prototype, "MJAIAgentTypes_DefaultStorageAccountIDArray", null);
69162
+ __decorate([
69163
+ FieldResolver(() => [MJArchiveConfiguration_]),
69164
+ __param(0, Root()),
69165
+ __param(1, Ctx()),
69166
+ __param(2, PubSub()),
69167
+ __metadata("design:type", Function),
69168
+ __metadata("design:paramtypes", [MJFileStorageAccount_, Object, PubSubEngine]),
69169
+ __metadata("design:returntype", Promise)
69170
+ ], MJFileStorageAccountResolver.prototype, "MJArchiveConfigurations_StorageAccountIDArray", null);
67384
69171
  __decorate([
67385
69172
  FieldResolver(() => [MJFileStorageAccountPermission_]),
67386
69173
  __param(0, Root()),
@@ -74711,6 +76498,10 @@ __decorate([
74711
76498
  Field(() => [MJMCPServerConnectionTool_]),
74712
76499
  __metadata("design:type", Array)
74713
76500
  ], MJMCPServerTool_.prototype, "MJMCPServerConnectionTools_MCPServerToolIDArray", void 0);
76501
+ __decorate([
76502
+ Field(() => [MJMCPToolFavorite_]),
76503
+ __metadata("design:type", Array)
76504
+ ], MJMCPServerTool_.prototype, "MJMCPToolFavorites_MCPServerToolIDArray", void 0);
74714
76505
  __decorate([
74715
76506
  Field(() => [MJMCPToolExecutionLog_]),
74716
76507
  __metadata("design:type", Array)
@@ -74920,6 +76711,14 @@ let MJMCPServerToolResolver = class MJMCPServerToolResolver extends ResolverBase
74920
76711
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Server Connection Tools', rows, this.GetUserFromPayload(userPayload));
74921
76712
  return result;
74922
76713
  }
76714
+ async MJMCPToolFavorites_MCPServerToolIDArray(mjmcpservertool_, { userPayload, providers }, pubSub) {
76715
+ this.CheckUserReadPermissions('MJ: MCP Tool Favorites', userPayload);
76716
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
76717
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMCPToolFavorites')} WHERE ${provider.QuoteIdentifier('MCPServerToolID')}='${mjmcpservertool_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: MCP Tool Favorites', userPayload, EntityPermissionType.Read, 'AND');
76718
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
76719
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Tool Favorites', rows, this.GetUserFromPayload(userPayload));
76720
+ return result;
76721
+ }
74923
76722
  async MJMCPToolExecutionLogs_MCPServerToolIDArray(mjmcpservertool_, { userPayload, providers }, pubSub) {
74924
76723
  this.CheckUserReadPermissions('MJ: MCP Tool Execution Logs', userPayload);
74925
76724
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -74987,6 +76786,15 @@ __decorate([
74987
76786
  __metadata("design:paramtypes", [MJMCPServerTool_, Object, PubSubEngine]),
74988
76787
  __metadata("design:returntype", Promise)
74989
76788
  ], MJMCPServerToolResolver.prototype, "MJMCPServerConnectionTools_MCPServerToolIDArray", null);
76789
+ __decorate([
76790
+ FieldResolver(() => [MJMCPToolFavorite_]),
76791
+ __param(0, Root()),
76792
+ __param(1, Ctx()),
76793
+ __param(2, PubSub()),
76794
+ __metadata("design:type", Function),
76795
+ __metadata("design:paramtypes", [MJMCPServerTool_, Object, PubSubEngine]),
76796
+ __metadata("design:returntype", Promise)
76797
+ ], MJMCPServerToolResolver.prototype, "MJMCPToolFavorites_MCPServerToolIDArray", null);
74990
76798
  __decorate([
74991
76799
  FieldResolver(() => [MJMCPToolExecutionLog_]),
74992
76800
  __param(0, Root()),
@@ -75938,6 +77746,243 @@ MJMCPToolExecutionLogResolver = __decorate([
75938
77746
  ], MJMCPToolExecutionLogResolver);
75939
77747
  export { MJMCPToolExecutionLogResolver };
75940
77748
  //****************************************************************************
77749
+ // ENTITY CLASS for MJ: MCP Tool Favorites
77750
+ //****************************************************************************
77751
+ let MJMCPToolFavorite_ = class MJMCPToolFavorite_ {
77752
+ };
77753
+ __decorate([
77754
+ Field(),
77755
+ MaxLength(36),
77756
+ __metadata("design:type", String)
77757
+ ], MJMCPToolFavorite_.prototype, "ID", void 0);
77758
+ __decorate([
77759
+ Field({ description: `The user who starred this tool. Favorites are per-user; multiple users can favorite the same tool independently. References the MJ User table.` }),
77760
+ MaxLength(36),
77761
+ __metadata("design:type", String)
77762
+ ], MJMCPToolFavorite_.prototype, "UserID", void 0);
77763
+ __decorate([
77764
+ Field({ description: `The MCP Server Tool that has been favorited. Combined with UserID this forms a unique constraint so a user cannot favorite the same tool twice.` }),
77765
+ MaxLength(36),
77766
+ __metadata("design:type", String)
77767
+ ], MJMCPToolFavorite_.prototype, "MCPServerToolID", void 0);
77768
+ __decorate([
77769
+ Field(),
77770
+ __metadata("design:type", Date)
77771
+ ], MJMCPToolFavorite_.prototype, "_mj__CreatedAt", void 0);
77772
+ __decorate([
77773
+ Field(),
77774
+ __metadata("design:type", Date)
77775
+ ], MJMCPToolFavorite_.prototype, "_mj__UpdatedAt", void 0);
77776
+ __decorate([
77777
+ Field(),
77778
+ MaxLength(100),
77779
+ __metadata("design:type", String)
77780
+ ], MJMCPToolFavorite_.prototype, "User", void 0);
77781
+ __decorate([
77782
+ Field({ nullable: true }),
77783
+ MaxLength(255),
77784
+ __metadata("design:type", String)
77785
+ ], MJMCPToolFavorite_.prototype, "MCPServerTool", void 0);
77786
+ MJMCPToolFavorite_ = __decorate([
77787
+ ObjectType({ description: `Per-user favorite marker for an MCP Server Tool. Each row indicates the user has starred the referenced tool for quick access in the MCP Dashboard Tools tab and in the Test Tool dialog picker. Combined with UserID forms a unique pair so a user cannot favorite the same tool twice.` })
77788
+ ], MJMCPToolFavorite_);
77789
+ export { MJMCPToolFavorite_ };
77790
+ //****************************************************************************
77791
+ // INPUT TYPE for MJ: MCP Tool Favorites
77792
+ //****************************************************************************
77793
+ let CreateMJMCPToolFavoriteInput = class CreateMJMCPToolFavoriteInput {
77794
+ };
77795
+ __decorate([
77796
+ Field({ nullable: true }),
77797
+ __metadata("design:type", String)
77798
+ ], CreateMJMCPToolFavoriteInput.prototype, "ID", void 0);
77799
+ __decorate([
77800
+ Field({ nullable: true }),
77801
+ __metadata("design:type", String)
77802
+ ], CreateMJMCPToolFavoriteInput.prototype, "UserID", void 0);
77803
+ __decorate([
77804
+ Field({ nullable: true }),
77805
+ __metadata("design:type", String)
77806
+ ], CreateMJMCPToolFavoriteInput.prototype, "MCPServerToolID", void 0);
77807
+ __decorate([
77808
+ Field(() => RestoreContextInput, { nullable: true }),
77809
+ __metadata("design:type", RestoreContextInput)
77810
+ ], CreateMJMCPToolFavoriteInput.prototype, "RestoreContext___", void 0);
77811
+ CreateMJMCPToolFavoriteInput = __decorate([
77812
+ InputType()
77813
+ ], CreateMJMCPToolFavoriteInput);
77814
+ export { CreateMJMCPToolFavoriteInput };
77815
+ //****************************************************************************
77816
+ // INPUT TYPE for MJ: MCP Tool Favorites
77817
+ //****************************************************************************
77818
+ let UpdateMJMCPToolFavoriteInput = class UpdateMJMCPToolFavoriteInput {
77819
+ };
77820
+ __decorate([
77821
+ Field(),
77822
+ __metadata("design:type", String)
77823
+ ], UpdateMJMCPToolFavoriteInput.prototype, "ID", void 0);
77824
+ __decorate([
77825
+ Field({ nullable: true }),
77826
+ __metadata("design:type", String)
77827
+ ], UpdateMJMCPToolFavoriteInput.prototype, "UserID", void 0);
77828
+ __decorate([
77829
+ Field({ nullable: true }),
77830
+ __metadata("design:type", String)
77831
+ ], UpdateMJMCPToolFavoriteInput.prototype, "MCPServerToolID", void 0);
77832
+ __decorate([
77833
+ Field(() => [KeyValuePairInput], { nullable: true }),
77834
+ __metadata("design:type", Array)
77835
+ ], UpdateMJMCPToolFavoriteInput.prototype, "OldValues___", void 0);
77836
+ __decorate([
77837
+ Field(() => RestoreContextInput, { nullable: true }),
77838
+ __metadata("design:type", RestoreContextInput)
77839
+ ], UpdateMJMCPToolFavoriteInput.prototype, "RestoreContext___", void 0);
77840
+ UpdateMJMCPToolFavoriteInput = __decorate([
77841
+ InputType()
77842
+ ], UpdateMJMCPToolFavoriteInput);
77843
+ export { UpdateMJMCPToolFavoriteInput };
77844
+ //****************************************************************************
77845
+ // RESOLVER for MJ: MCP Tool Favorites
77846
+ //****************************************************************************
77847
+ let RunMJMCPToolFavoriteViewResult = class RunMJMCPToolFavoriteViewResult {
77848
+ };
77849
+ __decorate([
77850
+ Field(() => [MJMCPToolFavorite_]),
77851
+ __metadata("design:type", Array)
77852
+ ], RunMJMCPToolFavoriteViewResult.prototype, "Results", void 0);
77853
+ __decorate([
77854
+ Field(() => String, { nullable: true }),
77855
+ __metadata("design:type", String)
77856
+ ], RunMJMCPToolFavoriteViewResult.prototype, "UserViewRunID", void 0);
77857
+ __decorate([
77858
+ Field(() => Int, { nullable: true }),
77859
+ __metadata("design:type", Number)
77860
+ ], RunMJMCPToolFavoriteViewResult.prototype, "RowCount", void 0);
77861
+ __decorate([
77862
+ Field(() => Int, { nullable: true }),
77863
+ __metadata("design:type", Number)
77864
+ ], RunMJMCPToolFavoriteViewResult.prototype, "TotalRowCount", void 0);
77865
+ __decorate([
77866
+ Field(() => Int, { nullable: true }),
77867
+ __metadata("design:type", Number)
77868
+ ], RunMJMCPToolFavoriteViewResult.prototype, "ExecutionTime", void 0);
77869
+ __decorate([
77870
+ Field({ nullable: true }),
77871
+ __metadata("design:type", String)
77872
+ ], RunMJMCPToolFavoriteViewResult.prototype, "ErrorMessage", void 0);
77873
+ __decorate([
77874
+ Field(() => Boolean, { nullable: false }),
77875
+ __metadata("design:type", Boolean)
77876
+ ], RunMJMCPToolFavoriteViewResult.prototype, "Success", void 0);
77877
+ RunMJMCPToolFavoriteViewResult = __decorate([
77878
+ ObjectType()
77879
+ ], RunMJMCPToolFavoriteViewResult);
77880
+ export { RunMJMCPToolFavoriteViewResult };
77881
+ let MJMCPToolFavoriteResolver = class MJMCPToolFavoriteResolver extends ResolverBase {
77882
+ async RunMJMCPToolFavoriteViewByID(input, { providers, userPayload }, pubSub) {
77883
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
77884
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
77885
+ }
77886
+ async RunMJMCPToolFavoriteViewByName(input, { providers, userPayload }, pubSub) {
77887
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
77888
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
77889
+ }
77890
+ async RunMJMCPToolFavoriteDynamicView(input, { providers, userPayload }, pubSub) {
77891
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
77892
+ input.EntityName = 'MJ: MCP Tool Favorites';
77893
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
77894
+ }
77895
+ async MJMCPToolFavorite(ID, { userPayload, providers }, pubSub) {
77896
+ this.CheckUserReadPermissions('MJ: MCP Tool Favorites', userPayload);
77897
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
77898
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMCPToolFavorites')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: MCP Tool Favorites', userPayload, EntityPermissionType.Read, 'AND');
77899
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
77900
+ const result = await this.MapFieldNamesToCodeNames('MJ: MCP Tool Favorites', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
77901
+ return result;
77902
+ }
77903
+ async CreateMJMCPToolFavorite(input, { providers, userPayload }, pubSub) {
77904
+ const provider = GetReadWriteProvider(providers);
77905
+ return this.CreateRecord('MJ: MCP Tool Favorites', input, provider, userPayload, pubSub);
77906
+ }
77907
+ async UpdateMJMCPToolFavorite(input, { providers, userPayload }, pubSub) {
77908
+ const provider = GetReadWriteProvider(providers);
77909
+ return this.UpdateRecord('MJ: MCP Tool Favorites', input, provider, userPayload, pubSub);
77910
+ }
77911
+ async DeleteMJMCPToolFavorite(ID, options, { providers, userPayload }, pubSub) {
77912
+ const provider = GetReadWriteProvider(providers);
77913
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
77914
+ return this.DeleteRecord('MJ: MCP Tool Favorites', key, options, provider, userPayload, pubSub);
77915
+ }
77916
+ };
77917
+ __decorate([
77918
+ Query(() => RunMJMCPToolFavoriteViewResult),
77919
+ __param(0, Arg('input', () => RunViewByIDInput)),
77920
+ __param(1, Ctx()),
77921
+ __param(2, PubSub()),
77922
+ __metadata("design:type", Function),
77923
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
77924
+ __metadata("design:returntype", Promise)
77925
+ ], MJMCPToolFavoriteResolver.prototype, "RunMJMCPToolFavoriteViewByID", null);
77926
+ __decorate([
77927
+ Query(() => RunMJMCPToolFavoriteViewResult),
77928
+ __param(0, Arg('input', () => RunViewByNameInput)),
77929
+ __param(1, Ctx()),
77930
+ __param(2, PubSub()),
77931
+ __metadata("design:type", Function),
77932
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
77933
+ __metadata("design:returntype", Promise)
77934
+ ], MJMCPToolFavoriteResolver.prototype, "RunMJMCPToolFavoriteViewByName", null);
77935
+ __decorate([
77936
+ Query(() => RunMJMCPToolFavoriteViewResult),
77937
+ __param(0, Arg('input', () => RunDynamicViewInput)),
77938
+ __param(1, Ctx()),
77939
+ __param(2, PubSub()),
77940
+ __metadata("design:type", Function),
77941
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
77942
+ __metadata("design:returntype", Promise)
77943
+ ], MJMCPToolFavoriteResolver.prototype, "RunMJMCPToolFavoriteDynamicView", null);
77944
+ __decorate([
77945
+ Query(() => MJMCPToolFavorite_, { nullable: true }),
77946
+ __param(0, Arg('ID', () => String)),
77947
+ __param(1, Ctx()),
77948
+ __param(2, PubSub()),
77949
+ __metadata("design:type", Function),
77950
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
77951
+ __metadata("design:returntype", Promise)
77952
+ ], MJMCPToolFavoriteResolver.prototype, "MJMCPToolFavorite", null);
77953
+ __decorate([
77954
+ Mutation(() => MJMCPToolFavorite_),
77955
+ __param(0, Arg('input', () => CreateMJMCPToolFavoriteInput)),
77956
+ __param(1, Ctx()),
77957
+ __param(2, PubSub()),
77958
+ __metadata("design:type", Function),
77959
+ __metadata("design:paramtypes", [CreateMJMCPToolFavoriteInput, Object, PubSubEngine]),
77960
+ __metadata("design:returntype", Promise)
77961
+ ], MJMCPToolFavoriteResolver.prototype, "CreateMJMCPToolFavorite", null);
77962
+ __decorate([
77963
+ Mutation(() => MJMCPToolFavorite_),
77964
+ __param(0, Arg('input', () => UpdateMJMCPToolFavoriteInput)),
77965
+ __param(1, Ctx()),
77966
+ __param(2, PubSub()),
77967
+ __metadata("design:type", Function),
77968
+ __metadata("design:paramtypes", [UpdateMJMCPToolFavoriteInput, Object, PubSubEngine]),
77969
+ __metadata("design:returntype", Promise)
77970
+ ], MJMCPToolFavoriteResolver.prototype, "UpdateMJMCPToolFavorite", null);
77971
+ __decorate([
77972
+ Mutation(() => MJMCPToolFavorite_),
77973
+ __param(0, Arg('ID', () => String)),
77974
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
77975
+ __param(2, Ctx()),
77976
+ __param(3, PubSub()),
77977
+ __metadata("design:type", Function),
77978
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
77979
+ __metadata("design:returntype", Promise)
77980
+ ], MJMCPToolFavoriteResolver.prototype, "DeleteMJMCPToolFavorite", null);
77981
+ MJMCPToolFavoriteResolver = __decorate([
77982
+ Resolver(MJMCPToolFavorite_)
77983
+ ], MJMCPToolFavoriteResolver);
77984
+ export { MJMCPToolFavoriteResolver };
77985
+ //****************************************************************************
75941
77986
  // ENTITY CLASS for MJ: O Auth Auth Server Metadata Caches
75942
77987
  //****************************************************************************
75943
77988
  let MJOAuthAuthServerMetadataCache_ = class MJOAuthAuthServerMetadataCache_ {
@@ -79326,6 +81371,344 @@ MJOutputTriggerTypeResolver = __decorate([
79326
81371
  ], MJOutputTriggerTypeResolver);
79327
81372
  export { MJOutputTriggerTypeResolver };
79328
81373
  //****************************************************************************
81374
+ // ENTITY CLASS for MJ: Permission Domains
81375
+ //****************************************************************************
81376
+ let MJPermissionDomain_ = class MJPermissionDomain_ {
81377
+ };
81378
+ __decorate([
81379
+ Field(),
81380
+ MaxLength(36),
81381
+ __metadata("design:type", String)
81382
+ ], MJPermissionDomain_.prototype, "ID", void 0);
81383
+ __decorate([
81384
+ Field({ description: `Human-readable unique name for the permission domain (e.g., "Entity Permissions", "Dashboard Permissions"). Used in admin UI and as the domain identifier in PermissionEngine API calls.` }),
81385
+ MaxLength(200),
81386
+ __metadata("design:type", String)
81387
+ ], MJPermissionDomain_.prototype, "Name", void 0);
81388
+ __decorate([
81389
+ Field({ nullable: true, description: `Detailed description of what this permission domain covers and how permissions are enforced.` }),
81390
+ __metadata("design:type", String)
81391
+ ], MJPermissionDomain_.prototype, "Description", void 0);
81392
+ __decorate([
81393
+ Field({ description: `ClassFactory key used to instantiate this provider. Must match the key passed to @RegisterClass(PermissionProviderBase, 'ClassName'). Convention: prefix with MJ for built-in providers (e.g., MJEntityPermissionProvider).` }),
81394
+ MaxLength(500),
81395
+ __metadata("design:type", String)
81396
+ ], MJPermissionDomain_.prototype, "ProviderClassName", void 0);
81397
+ __decorate([
81398
+ Field({ description: `Comma-delimited list of grantee types this provider supports. Valid tokens: User, Role, Everyone, Public. Example: "User,Role".` }),
81399
+ MaxLength(200),
81400
+ __metadata("design:type", String)
81401
+ ], MJPermissionDomain_.prototype, "SupportedGranteeTypes", void 0);
81402
+ __decorate([
81403
+ Field({ description: `Comma-delimited list of permission actions this provider can evaluate. Valid tokens: Read, Create, Update, Delete, Share, Execute, Admin. Example: "Read,Create,Update,Delete".` }),
81404
+ MaxLength(500),
81405
+ __metadata("design:type", String)
81406
+ ], MJPermissionDomain_.prototype, "SupportedActions", void 0);
81407
+ __decorate([
81408
+ Field(() => Boolean, { description: `When true, this provider supports explicit Deny records that override Allow grants at the same scope.` }),
81409
+ __metadata("design:type", Boolean)
81410
+ ], MJPermissionDomain_.prototype, "SupportsDeny", void 0);
81411
+ __decorate([
81412
+ Field(() => Boolean, { description: `When true, this provider supports time-bound permissions with an expiration timestamp.` }),
81413
+ __metadata("design:type", Boolean)
81414
+ ], MJPermissionDomain_.prototype, "SupportsExpiration", void 0);
81415
+ __decorate([
81416
+ Field(() => Boolean, { description: `When true, this provider resolves permissions hierarchically (e.g., category-level grants cascade to items within the category).` }),
81417
+ __metadata("design:type", Boolean)
81418
+ ], MJPermissionDomain_.prototype, "SupportsHierarchyInheritance", void 0);
81419
+ __decorate([
81420
+ Field(() => Boolean, { description: `When false, the PermissionEngine skips loading this provider at startup. Use to temporarily disable a provider without removing its record.` }),
81421
+ __metadata("design:type", Boolean)
81422
+ ], MJPermissionDomain_.prototype, "IsActive", void 0);
81423
+ __decorate([
81424
+ Field(() => Int, { description: `Sort order for displaying domains in the Sharing Center admin UI. Lower numbers appear first.` }),
81425
+ __metadata("design:type", Number)
81426
+ ], MJPermissionDomain_.prototype, "DisplayOrder", void 0);
81427
+ __decorate([
81428
+ Field({ nullable: true, description: `Optional Font Awesome icon class for display in admin UI (e.g., "fa-solid fa-shield").` }),
81429
+ MaxLength(100),
81430
+ __metadata("design:type", String)
81431
+ ], MJPermissionDomain_.prototype, "Icon", void 0);
81432
+ __decorate([
81433
+ Field(),
81434
+ __metadata("design:type", Date)
81435
+ ], MJPermissionDomain_.prototype, "_mj__CreatedAt", void 0);
81436
+ __decorate([
81437
+ Field(),
81438
+ __metadata("design:type", Date)
81439
+ ], MJPermissionDomain_.prototype, "_mj__UpdatedAt", void 0);
81440
+ MJPermissionDomain_ = __decorate([
81441
+ ObjectType({ description: `Catalog of registered permission subsystems. Each row describes one permission provider; the PermissionEngine uses ProviderClassName as the ClassFactory key to instantiate providers at startup. Enables unified permission queries across all subsystems.` })
81442
+ ], MJPermissionDomain_);
81443
+ export { MJPermissionDomain_ };
81444
+ //****************************************************************************
81445
+ // INPUT TYPE for MJ: Permission Domains
81446
+ //****************************************************************************
81447
+ let CreateMJPermissionDomainInput = class CreateMJPermissionDomainInput {
81448
+ };
81449
+ __decorate([
81450
+ Field({ nullable: true }),
81451
+ __metadata("design:type", String)
81452
+ ], CreateMJPermissionDomainInput.prototype, "ID", void 0);
81453
+ __decorate([
81454
+ Field({ nullable: true }),
81455
+ __metadata("design:type", String)
81456
+ ], CreateMJPermissionDomainInput.prototype, "Name", void 0);
81457
+ __decorate([
81458
+ Field({ nullable: true }),
81459
+ __metadata("design:type", String)
81460
+ ], CreateMJPermissionDomainInput.prototype, "Description", void 0);
81461
+ __decorate([
81462
+ Field({ nullable: true }),
81463
+ __metadata("design:type", String)
81464
+ ], CreateMJPermissionDomainInput.prototype, "ProviderClassName", void 0);
81465
+ __decorate([
81466
+ Field({ nullable: true }),
81467
+ __metadata("design:type", String)
81468
+ ], CreateMJPermissionDomainInput.prototype, "SupportedGranteeTypes", void 0);
81469
+ __decorate([
81470
+ Field({ nullable: true }),
81471
+ __metadata("design:type", String)
81472
+ ], CreateMJPermissionDomainInput.prototype, "SupportedActions", void 0);
81473
+ __decorate([
81474
+ Field(() => Boolean, { nullable: true }),
81475
+ __metadata("design:type", Boolean)
81476
+ ], CreateMJPermissionDomainInput.prototype, "SupportsDeny", void 0);
81477
+ __decorate([
81478
+ Field(() => Boolean, { nullable: true }),
81479
+ __metadata("design:type", Boolean)
81480
+ ], CreateMJPermissionDomainInput.prototype, "SupportsExpiration", void 0);
81481
+ __decorate([
81482
+ Field(() => Boolean, { nullable: true }),
81483
+ __metadata("design:type", Boolean)
81484
+ ], CreateMJPermissionDomainInput.prototype, "SupportsHierarchyInheritance", void 0);
81485
+ __decorate([
81486
+ Field(() => Boolean, { nullable: true }),
81487
+ __metadata("design:type", Boolean)
81488
+ ], CreateMJPermissionDomainInput.prototype, "IsActive", void 0);
81489
+ __decorate([
81490
+ Field(() => Int, { nullable: true }),
81491
+ __metadata("design:type", Number)
81492
+ ], CreateMJPermissionDomainInput.prototype, "DisplayOrder", void 0);
81493
+ __decorate([
81494
+ Field({ nullable: true }),
81495
+ __metadata("design:type", String)
81496
+ ], CreateMJPermissionDomainInput.prototype, "Icon", void 0);
81497
+ __decorate([
81498
+ Field(() => RestoreContextInput, { nullable: true }),
81499
+ __metadata("design:type", RestoreContextInput)
81500
+ ], CreateMJPermissionDomainInput.prototype, "RestoreContext___", void 0);
81501
+ CreateMJPermissionDomainInput = __decorate([
81502
+ InputType()
81503
+ ], CreateMJPermissionDomainInput);
81504
+ export { CreateMJPermissionDomainInput };
81505
+ //****************************************************************************
81506
+ // INPUT TYPE for MJ: Permission Domains
81507
+ //****************************************************************************
81508
+ let UpdateMJPermissionDomainInput = class UpdateMJPermissionDomainInput {
81509
+ };
81510
+ __decorate([
81511
+ Field(),
81512
+ __metadata("design:type", String)
81513
+ ], UpdateMJPermissionDomainInput.prototype, "ID", void 0);
81514
+ __decorate([
81515
+ Field({ nullable: true }),
81516
+ __metadata("design:type", String)
81517
+ ], UpdateMJPermissionDomainInput.prototype, "Name", void 0);
81518
+ __decorate([
81519
+ Field({ nullable: true }),
81520
+ __metadata("design:type", String)
81521
+ ], UpdateMJPermissionDomainInput.prototype, "Description", void 0);
81522
+ __decorate([
81523
+ Field({ nullable: true }),
81524
+ __metadata("design:type", String)
81525
+ ], UpdateMJPermissionDomainInput.prototype, "ProviderClassName", void 0);
81526
+ __decorate([
81527
+ Field({ nullable: true }),
81528
+ __metadata("design:type", String)
81529
+ ], UpdateMJPermissionDomainInput.prototype, "SupportedGranteeTypes", void 0);
81530
+ __decorate([
81531
+ Field({ nullable: true }),
81532
+ __metadata("design:type", String)
81533
+ ], UpdateMJPermissionDomainInput.prototype, "SupportedActions", void 0);
81534
+ __decorate([
81535
+ Field(() => Boolean, { nullable: true }),
81536
+ __metadata("design:type", Boolean)
81537
+ ], UpdateMJPermissionDomainInput.prototype, "SupportsDeny", void 0);
81538
+ __decorate([
81539
+ Field(() => Boolean, { nullable: true }),
81540
+ __metadata("design:type", Boolean)
81541
+ ], UpdateMJPermissionDomainInput.prototype, "SupportsExpiration", void 0);
81542
+ __decorate([
81543
+ Field(() => Boolean, { nullable: true }),
81544
+ __metadata("design:type", Boolean)
81545
+ ], UpdateMJPermissionDomainInput.prototype, "SupportsHierarchyInheritance", void 0);
81546
+ __decorate([
81547
+ Field(() => Boolean, { nullable: true }),
81548
+ __metadata("design:type", Boolean)
81549
+ ], UpdateMJPermissionDomainInput.prototype, "IsActive", void 0);
81550
+ __decorate([
81551
+ Field(() => Int, { nullable: true }),
81552
+ __metadata("design:type", Number)
81553
+ ], UpdateMJPermissionDomainInput.prototype, "DisplayOrder", void 0);
81554
+ __decorate([
81555
+ Field({ nullable: true }),
81556
+ __metadata("design:type", String)
81557
+ ], UpdateMJPermissionDomainInput.prototype, "Icon", void 0);
81558
+ __decorate([
81559
+ Field(() => [KeyValuePairInput], { nullable: true }),
81560
+ __metadata("design:type", Array)
81561
+ ], UpdateMJPermissionDomainInput.prototype, "OldValues___", void 0);
81562
+ __decorate([
81563
+ Field(() => RestoreContextInput, { nullable: true }),
81564
+ __metadata("design:type", RestoreContextInput)
81565
+ ], UpdateMJPermissionDomainInput.prototype, "RestoreContext___", void 0);
81566
+ UpdateMJPermissionDomainInput = __decorate([
81567
+ InputType()
81568
+ ], UpdateMJPermissionDomainInput);
81569
+ export { UpdateMJPermissionDomainInput };
81570
+ //****************************************************************************
81571
+ // RESOLVER for MJ: Permission Domains
81572
+ //****************************************************************************
81573
+ let RunMJPermissionDomainViewResult = class RunMJPermissionDomainViewResult {
81574
+ };
81575
+ __decorate([
81576
+ Field(() => [MJPermissionDomain_]),
81577
+ __metadata("design:type", Array)
81578
+ ], RunMJPermissionDomainViewResult.prototype, "Results", void 0);
81579
+ __decorate([
81580
+ Field(() => String, { nullable: true }),
81581
+ __metadata("design:type", String)
81582
+ ], RunMJPermissionDomainViewResult.prototype, "UserViewRunID", void 0);
81583
+ __decorate([
81584
+ Field(() => Int, { nullable: true }),
81585
+ __metadata("design:type", Number)
81586
+ ], RunMJPermissionDomainViewResult.prototype, "RowCount", void 0);
81587
+ __decorate([
81588
+ Field(() => Int, { nullable: true }),
81589
+ __metadata("design:type", Number)
81590
+ ], RunMJPermissionDomainViewResult.prototype, "TotalRowCount", void 0);
81591
+ __decorate([
81592
+ Field(() => Int, { nullable: true }),
81593
+ __metadata("design:type", Number)
81594
+ ], RunMJPermissionDomainViewResult.prototype, "ExecutionTime", void 0);
81595
+ __decorate([
81596
+ Field({ nullable: true }),
81597
+ __metadata("design:type", String)
81598
+ ], RunMJPermissionDomainViewResult.prototype, "ErrorMessage", void 0);
81599
+ __decorate([
81600
+ Field(() => Boolean, { nullable: false }),
81601
+ __metadata("design:type", Boolean)
81602
+ ], RunMJPermissionDomainViewResult.prototype, "Success", void 0);
81603
+ RunMJPermissionDomainViewResult = __decorate([
81604
+ ObjectType()
81605
+ ], RunMJPermissionDomainViewResult);
81606
+ export { RunMJPermissionDomainViewResult };
81607
+ let MJPermissionDomainResolver = class MJPermissionDomainResolver extends ResolverBase {
81608
+ async RunMJPermissionDomainViewByID(input, { providers, userPayload }, pubSub) {
81609
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
81610
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
81611
+ }
81612
+ async RunMJPermissionDomainViewByName(input, { providers, userPayload }, pubSub) {
81613
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
81614
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
81615
+ }
81616
+ async RunMJPermissionDomainDynamicView(input, { providers, userPayload }, pubSub) {
81617
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
81618
+ input.EntityName = 'MJ: Permission Domains';
81619
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
81620
+ }
81621
+ async MJPermissionDomain(ID, { userPayload, providers }, pubSub) {
81622
+ this.CheckUserReadPermissions('MJ: Permission Domains', userPayload);
81623
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
81624
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwPermissionDomains')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Permission Domains', userPayload, EntityPermissionType.Read, 'AND');
81625
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
81626
+ const result = await this.MapFieldNamesToCodeNames('MJ: Permission Domains', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
81627
+ return result;
81628
+ }
81629
+ async CreateMJPermissionDomain(input, { providers, userPayload }, pubSub) {
81630
+ const provider = GetReadWriteProvider(providers);
81631
+ return this.CreateRecord('MJ: Permission Domains', input, provider, userPayload, pubSub);
81632
+ }
81633
+ async UpdateMJPermissionDomain(input, { providers, userPayload }, pubSub) {
81634
+ const provider = GetReadWriteProvider(providers);
81635
+ return this.UpdateRecord('MJ: Permission Domains', input, provider, userPayload, pubSub);
81636
+ }
81637
+ async DeleteMJPermissionDomain(ID, options, { providers, userPayload }, pubSub) {
81638
+ const provider = GetReadWriteProvider(providers);
81639
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
81640
+ return this.DeleteRecord('MJ: Permission Domains', key, options, provider, userPayload, pubSub);
81641
+ }
81642
+ };
81643
+ __decorate([
81644
+ Query(() => RunMJPermissionDomainViewResult),
81645
+ __param(0, Arg('input', () => RunViewByIDInput)),
81646
+ __param(1, Ctx()),
81647
+ __param(2, PubSub()),
81648
+ __metadata("design:type", Function),
81649
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
81650
+ __metadata("design:returntype", Promise)
81651
+ ], MJPermissionDomainResolver.prototype, "RunMJPermissionDomainViewByID", null);
81652
+ __decorate([
81653
+ Query(() => RunMJPermissionDomainViewResult),
81654
+ __param(0, Arg('input', () => RunViewByNameInput)),
81655
+ __param(1, Ctx()),
81656
+ __param(2, PubSub()),
81657
+ __metadata("design:type", Function),
81658
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
81659
+ __metadata("design:returntype", Promise)
81660
+ ], MJPermissionDomainResolver.prototype, "RunMJPermissionDomainViewByName", null);
81661
+ __decorate([
81662
+ Query(() => RunMJPermissionDomainViewResult),
81663
+ __param(0, Arg('input', () => RunDynamicViewInput)),
81664
+ __param(1, Ctx()),
81665
+ __param(2, PubSub()),
81666
+ __metadata("design:type", Function),
81667
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
81668
+ __metadata("design:returntype", Promise)
81669
+ ], MJPermissionDomainResolver.prototype, "RunMJPermissionDomainDynamicView", null);
81670
+ __decorate([
81671
+ Query(() => MJPermissionDomain_, { nullable: true }),
81672
+ __param(0, Arg('ID', () => String)),
81673
+ __param(1, Ctx()),
81674
+ __param(2, PubSub()),
81675
+ __metadata("design:type", Function),
81676
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
81677
+ __metadata("design:returntype", Promise)
81678
+ ], MJPermissionDomainResolver.prototype, "MJPermissionDomain", null);
81679
+ __decorate([
81680
+ Mutation(() => MJPermissionDomain_),
81681
+ __param(0, Arg('input', () => CreateMJPermissionDomainInput)),
81682
+ __param(1, Ctx()),
81683
+ __param(2, PubSub()),
81684
+ __metadata("design:type", Function),
81685
+ __metadata("design:paramtypes", [CreateMJPermissionDomainInput, Object, PubSubEngine]),
81686
+ __metadata("design:returntype", Promise)
81687
+ ], MJPermissionDomainResolver.prototype, "CreateMJPermissionDomain", null);
81688
+ __decorate([
81689
+ Mutation(() => MJPermissionDomain_),
81690
+ __param(0, Arg('input', () => UpdateMJPermissionDomainInput)),
81691
+ __param(1, Ctx()),
81692
+ __param(2, PubSub()),
81693
+ __metadata("design:type", Function),
81694
+ __metadata("design:paramtypes", [UpdateMJPermissionDomainInput, Object, PubSubEngine]),
81695
+ __metadata("design:returntype", Promise)
81696
+ ], MJPermissionDomainResolver.prototype, "UpdateMJPermissionDomain", null);
81697
+ __decorate([
81698
+ Mutation(() => MJPermissionDomain_),
81699
+ __param(0, Arg('ID', () => String)),
81700
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
81701
+ __param(2, Ctx()),
81702
+ __param(3, PubSub()),
81703
+ __metadata("design:type", Function),
81704
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
81705
+ __metadata("design:returntype", Promise)
81706
+ ], MJPermissionDomainResolver.prototype, "DeleteMJPermissionDomain", null);
81707
+ MJPermissionDomainResolver = __decorate([
81708
+ Resolver(MJPermissionDomain_)
81709
+ ], MJPermissionDomainResolver);
81710
+ export { MJPermissionDomainResolver };
81711
+ //****************************************************************************
79329
81712
  // ENTITY CLASS for MJ: Projects
79330
81713
  //****************************************************************************
79331
81714
  let MJProject_ = class MJProject_ {
@@ -88906,6 +91289,11 @@ __decorate([
88906
91289
  MaxLength(20),
88907
91290
  __metadata("design:type", String)
88908
91291
  ], MJResourcePermission_.prototype, "Status", void 0);
91292
+ __decorate([
91293
+ Field({ nullable: true, description: `The user who granted this permission. NULL when the share pre-dates this column or when the grantor is unknown (e.g., a system-seeded permission).` }),
91294
+ MaxLength(36),
91295
+ __metadata("design:type", String)
91296
+ ], MJResourcePermission_.prototype, "SharedByUserID", void 0);
88909
91297
  __decorate([
88910
91298
  Field(),
88911
91299
  MaxLength(255),
@@ -88921,6 +91309,11 @@ __decorate([
88921
91309
  MaxLength(100),
88922
91310
  __metadata("design:type", String)
88923
91311
  ], MJResourcePermission_.prototype, "User", void 0);
91312
+ __decorate([
91313
+ Field({ nullable: true }),
91314
+ MaxLength(100),
91315
+ __metadata("design:type", String)
91316
+ ], MJResourcePermission_.prototype, "SharedByUser", void 0);
88924
91317
  MJResourcePermission_ = __decorate([
88925
91318
  ObjectType({ description: `Table for managing sharing of resources to users or roles with time constraints and permission levels` })
88926
91319
  ], MJResourcePermission_);
@@ -88970,6 +91363,10 @@ __decorate([
88970
91363
  Field({ nullable: true }),
88971
91364
  __metadata("design:type", String)
88972
91365
  ], CreateMJResourcePermissionInput.prototype, "Status", void 0);
91366
+ __decorate([
91367
+ Field({ nullable: true }),
91368
+ __metadata("design:type", String)
91369
+ ], CreateMJResourcePermissionInput.prototype, "SharedByUserID", void 0);
88973
91370
  __decorate([
88974
91371
  Field(() => RestoreContextInput, { nullable: true }),
88975
91372
  __metadata("design:type", RestoreContextInput)
@@ -89023,6 +91420,10 @@ __decorate([
89023
91420
  Field({ nullable: true }),
89024
91421
  __metadata("design:type", String)
89025
91422
  ], UpdateMJResourcePermissionInput.prototype, "Status", void 0);
91423
+ __decorate([
91424
+ Field({ nullable: true }),
91425
+ __metadata("design:type", String)
91426
+ ], UpdateMJResourcePermissionInput.prototype, "SharedByUserID", void 0);
89026
91427
  __decorate([
89027
91428
  Field(() => [KeyValuePairInput], { nullable: true }),
89028
91429
  __metadata("design:type", Array)
@@ -94790,14 +97191,14 @@ __decorate([
94790
97191
  Field(() => [MJTaggedItem_]),
94791
97192
  __metadata("design:type", Array)
94792
97193
  ], MJTag_.prototype, "MJTaggedItems_TagIDArray", void 0);
94793
- __decorate([
94794
- Field(() => [MJContentItemTag_]),
94795
- __metadata("design:type", Array)
94796
- ], MJTag_.prototype, "MJContentItemTags_TagIDArray", void 0);
94797
97194
  __decorate([
94798
97195
  Field(() => [MJTagCoOccurrence_]),
94799
97196
  __metadata("design:type", Array)
94800
97197
  ], MJTag_.prototype, "MJTagCoOccurrences_TagBIDArray", void 0);
97198
+ __decorate([
97199
+ Field(() => [MJContentItemTag_]),
97200
+ __metadata("design:type", Array)
97201
+ ], MJTag_.prototype, "MJContentItemTags_TagIDArray", void 0);
94801
97202
  __decorate([
94802
97203
  Field(() => [MJTagAuditLog_]),
94803
97204
  __metadata("design:type", Array)
@@ -94806,14 +97207,14 @@ __decorate([
94806
97207
  Field(() => [MJTagCoOccurrence_]),
94807
97208
  __metadata("design:type", Array)
94808
97209
  ], MJTag_.prototype, "MJTagCoOccurrences_TagAIDArray", void 0);
94809
- __decorate([
94810
- Field(() => [MJTagAuditLog_]),
94811
- __metadata("design:type", Array)
94812
- ], MJTag_.prototype, "MJTagAuditLogs_TagIDArray", void 0);
94813
97210
  __decorate([
94814
97211
  Field(() => [MJTag_]),
94815
97212
  __metadata("design:type", Array)
94816
97213
  ], MJTag_.prototype, "MJTags_MergedIntoTagIDArray", void 0);
97214
+ __decorate([
97215
+ Field(() => [MJTagAuditLog_]),
97216
+ __metadata("design:type", Array)
97217
+ ], MJTag_.prototype, "MJTagAuditLogs_TagIDArray", void 0);
94817
97218
  MJTag_ = __decorate([
94818
97219
  ObjectType({ description: `Tags are used to arbitrarily associate any record in any entity with addtional information.` })
94819
97220
  ], MJTag_);
@@ -94979,14 +97380,6 @@ let MJTagResolver = class MJTagResolver extends ResolverBase {
94979
97380
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tagged Items', rows, this.GetUserFromPayload(userPayload));
94980
97381
  return result;
94981
97382
  }
94982
- async MJContentItemTags_TagIDArray(mjtag_, { userPayload, providers }, pubSub) {
94983
- this.CheckUserReadPermissions('MJ: Content Item Tags', userPayload);
94984
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
94985
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemTags')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Tags', userPayload, EntityPermissionType.Read, 'AND');
94986
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
94987
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Tags', rows, this.GetUserFromPayload(userPayload));
94988
- return result;
94989
- }
94990
97383
  async MJTagCoOccurrences_TagBIDArray(mjtag_, { userPayload, providers }, pubSub) {
94991
97384
  this.CheckUserReadPermissions('MJ: Tag Co Occurrences', userPayload);
94992
97385
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -94995,6 +97388,14 @@ let MJTagResolver = class MJTagResolver extends ResolverBase {
94995
97388
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Co Occurrences', rows, this.GetUserFromPayload(userPayload));
94996
97389
  return result;
94997
97390
  }
97391
+ async MJContentItemTags_TagIDArray(mjtag_, { userPayload, providers }, pubSub) {
97392
+ this.CheckUserReadPermissions('MJ: Content Item Tags', userPayload);
97393
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
97394
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemTags')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Tags', userPayload, EntityPermissionType.Read, 'AND');
97395
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
97396
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Tags', rows, this.GetUserFromPayload(userPayload));
97397
+ return result;
97398
+ }
94998
97399
  async MJTagAuditLogs_RelatedTagIDArray(mjtag_, { userPayload, providers }, pubSub) {
94999
97400
  this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
95000
97401
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -95011,14 +97412,6 @@ let MJTagResolver = class MJTagResolver extends ResolverBase {
95011
97412
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Co Occurrences', rows, this.GetUserFromPayload(userPayload));
95012
97413
  return result;
95013
97414
  }
95014
- async MJTagAuditLogs_TagIDArray(mjtag_, { userPayload, providers }, pubSub) {
95015
- this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
95016
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
95017
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
95018
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
95019
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
95020
- return result;
95021
- }
95022
97415
  async MJTags_MergedIntoTagIDArray(mjtag_, { userPayload, providers }, pubSub) {
95023
97416
  this.CheckUserReadPermissions('MJ: Tags', userPayload);
95024
97417
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -95027,6 +97420,14 @@ let MJTagResolver = class MJTagResolver extends ResolverBase {
95027
97420
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tags', rows, this.GetUserFromPayload(userPayload));
95028
97421
  return result;
95029
97422
  }
97423
+ async MJTagAuditLogs_TagIDArray(mjtag_, { userPayload, providers }, pubSub) {
97424
+ this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
97425
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
97426
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('TagID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
97427
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
97428
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
97429
+ return result;
97430
+ }
95030
97431
  async CreateMJTag(input, { providers, userPayload }, pubSub) {
95031
97432
  const provider = GetReadWriteProvider(providers);
95032
97433
  return this.CreateRecord('MJ: Tags', input, provider, userPayload, pubSub);
@@ -95096,23 +97497,23 @@ __decorate([
95096
97497
  __metadata("design:returntype", Promise)
95097
97498
  ], MJTagResolver.prototype, "MJTaggedItems_TagIDArray", null);
95098
97499
  __decorate([
95099
- FieldResolver(() => [MJContentItemTag_]),
97500
+ FieldResolver(() => [MJTagCoOccurrence_]),
95100
97501
  __param(0, Root()),
95101
97502
  __param(1, Ctx()),
95102
97503
  __param(2, PubSub()),
95103
97504
  __metadata("design:type", Function),
95104
97505
  __metadata("design:paramtypes", [MJTag_, Object, PubSubEngine]),
95105
97506
  __metadata("design:returntype", Promise)
95106
- ], MJTagResolver.prototype, "MJContentItemTags_TagIDArray", null);
97507
+ ], MJTagResolver.prototype, "MJTagCoOccurrences_TagBIDArray", null);
95107
97508
  __decorate([
95108
- FieldResolver(() => [MJTagCoOccurrence_]),
97509
+ FieldResolver(() => [MJContentItemTag_]),
95109
97510
  __param(0, Root()),
95110
97511
  __param(1, Ctx()),
95111
97512
  __param(2, PubSub()),
95112
97513
  __metadata("design:type", Function),
95113
97514
  __metadata("design:paramtypes", [MJTag_, Object, PubSubEngine]),
95114
97515
  __metadata("design:returntype", Promise)
95115
- ], MJTagResolver.prototype, "MJTagCoOccurrences_TagBIDArray", null);
97516
+ ], MJTagResolver.prototype, "MJContentItemTags_TagIDArray", null);
95116
97517
  __decorate([
95117
97518
  FieldResolver(() => [MJTagAuditLog_]),
95118
97519
  __param(0, Root()),
@@ -95132,23 +97533,23 @@ __decorate([
95132
97533
  __metadata("design:returntype", Promise)
95133
97534
  ], MJTagResolver.prototype, "MJTagCoOccurrences_TagAIDArray", null);
95134
97535
  __decorate([
95135
- FieldResolver(() => [MJTagAuditLog_]),
97536
+ FieldResolver(() => [MJTag_]),
95136
97537
  __param(0, Root()),
95137
97538
  __param(1, Ctx()),
95138
97539
  __param(2, PubSub()),
95139
97540
  __metadata("design:type", Function),
95140
97541
  __metadata("design:paramtypes", [MJTag_, Object, PubSubEngine]),
95141
97542
  __metadata("design:returntype", Promise)
95142
- ], MJTagResolver.prototype, "MJTagAuditLogs_TagIDArray", null);
97543
+ ], MJTagResolver.prototype, "MJTags_MergedIntoTagIDArray", null);
95143
97544
  __decorate([
95144
- FieldResolver(() => [MJTag_]),
97545
+ FieldResolver(() => [MJTagAuditLog_]),
95145
97546
  __param(0, Root()),
95146
97547
  __param(1, Ctx()),
95147
97548
  __param(2, PubSub()),
95148
97549
  __metadata("design:type", Function),
95149
97550
  __metadata("design:paramtypes", [MJTag_, Object, PubSubEngine]),
95150
97551
  __metadata("design:returntype", Promise)
95151
- ], MJTagResolver.prototype, "MJTags_MergedIntoTagIDArray", null);
97552
+ ], MJTagResolver.prototype, "MJTagAuditLogs_TagIDArray", null);
95152
97553
  __decorate([
95153
97554
  Mutation(() => MJTag_),
95154
97555
  __param(0, Arg('input', () => CreateMJTagInput)),
@@ -106021,14 +108422,14 @@ __decorate([
106021
108422
  Field(() => [MJOAuthAuthorizationState_]),
106022
108423
  __metadata("design:type", Array)
106023
108424
  ], MJUser_.prototype, "MJOAuthAuthorizationStates_UserIDArray", void 0);
106024
- __decorate([
106025
- Field(() => [MJOpenAppInstallHistory_]),
106026
- __metadata("design:type", Array)
106027
- ], MJUser_.prototype, "MJOpenAppInstallHistories_ExecutedByUserIDArray", void 0);
106028
108425
  __decorate([
106029
108426
  Field(() => [MJOpenApp_]),
106030
108427
  __metadata("design:type", Array)
106031
108428
  ], MJUser_.prototype, "MJOpenApps_InstalledByUserIDArray", void 0);
108429
+ __decorate([
108430
+ Field(() => [MJOpenAppInstallHistory_]),
108431
+ __metadata("design:type", Array)
108432
+ ], MJUser_.prototype, "MJOpenAppInstallHistories_ExecutedByUserIDArray", void 0);
106032
108433
  __decorate([
106033
108434
  Field(() => [MJContentItemDuplicate_]),
106034
108435
  __metadata("design:type", Array)
@@ -106045,6 +108446,18 @@ __decorate([
106045
108446
  Field(() => [MJTagAuditLog_]),
106046
108447
  __metadata("design:type", Array)
106047
108448
  ], MJUser_.prototype, "MJTagAuditLogs_PerformedByUserIDArray", void 0);
108449
+ __decorate([
108450
+ Field(() => [MJArchiveConfiguration_]),
108451
+ __metadata("design:type", Array)
108452
+ ], MJUser_.prototype, "MJArchiveConfigurations_CreatedByUserIDArray", void 0);
108453
+ __decorate([
108454
+ Field(() => [MJMCPToolFavorite_]),
108455
+ __metadata("design:type", Array)
108456
+ ], MJUser_.prototype, "MJMCPToolFavorites_UserIDArray", void 0);
108457
+ __decorate([
108458
+ Field(() => [MJResourcePermission_]),
108459
+ __metadata("design:type", Array)
108460
+ ], MJUser_.prototype, "MJResourcePermissions_SharedByUserIDArray", void 0);
106048
108461
  __decorate([
106049
108462
  Field(() => [MJResourcePermission_]),
106050
108463
  __metadata("design:type", Array)
@@ -106109,6 +108522,10 @@ __decorate([
106109
108522
  Field(() => [MJFileStorageAccountPermission_]),
106110
108523
  __metadata("design:type", Array)
106111
108524
  ], MJUser_.prototype, "MJFileStorageAccountPermissions_UserIDArray", void 0);
108525
+ __decorate([
108526
+ Field(() => [MJArchiveRun_]),
108527
+ __metadata("design:type", Array)
108528
+ ], MJUser_.prototype, "MJArchiveRuns_UserIDArray", void 0);
106112
108529
  __decorate([
106113
108530
  Field(() => [MJAIAgentRun_]),
106114
108531
  __metadata("design:type", Array)
@@ -106818,14 +109235,6 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
106818
109235
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: O Auth Authorization States', rows, this.GetUserFromPayload(userPayload));
106819
109236
  return result;
106820
109237
  }
106821
- async MJOpenAppInstallHistories_ExecutedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
106822
- this.CheckUserReadPermissions('MJ: Open App Install Histories', userPayload);
106823
- const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
106824
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenAppInstallHistories')} WHERE ${provider.QuoteIdentifier('ExecutedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Open App Install Histories', userPayload, EntityPermissionType.Read, 'AND');
106825
- const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
106826
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open App Install Histories', rows, this.GetUserFromPayload(userPayload));
106827
- return result;
106828
- }
106829
109238
  async MJOpenApps_InstalledByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
106830
109239
  this.CheckUserReadPermissions('MJ: Open Apps', userPayload);
106831
109240
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -106834,6 +109243,14 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
106834
109243
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open Apps', rows, this.GetUserFromPayload(userPayload));
106835
109244
  return result;
106836
109245
  }
109246
+ async MJOpenAppInstallHistories_ExecutedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
109247
+ this.CheckUserReadPermissions('MJ: Open App Install Histories', userPayload);
109248
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
109249
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOpenAppInstallHistories')} WHERE ${provider.QuoteIdentifier('ExecutedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Open App Install Histories', userPayload, EntityPermissionType.Read, 'AND');
109250
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
109251
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Open App Install Histories', rows, this.GetUserFromPayload(userPayload));
109252
+ return result;
109253
+ }
106837
109254
  async MJContentItemDuplicates_ResolvedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
106838
109255
  this.CheckUserReadPermissions('MJ: Content Item Duplicates', userPayload);
106839
109256
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -106866,6 +109283,30 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
106866
109283
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
106867
109284
  return result;
106868
109285
  }
109286
+ async MJArchiveConfigurations_CreatedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
109287
+ this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
109288
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
109289
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveConfigurations')} WHERE ${provider.QuoteIdentifier('CreatedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Configurations', userPayload, EntityPermissionType.Read, 'AND');
109290
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
109291
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configurations', rows, this.GetUserFromPayload(userPayload));
109292
+ return result;
109293
+ }
109294
+ async MJMCPToolFavorites_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
109295
+ this.CheckUserReadPermissions('MJ: MCP Tool Favorites', userPayload);
109296
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
109297
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwMCPToolFavorites')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: MCP Tool Favorites', userPayload, EntityPermissionType.Read, 'AND');
109298
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
109299
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Tool Favorites', rows, this.GetUserFromPayload(userPayload));
109300
+ return result;
109301
+ }
109302
+ async MJResourcePermissions_SharedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
109303
+ this.CheckUserReadPermissions('MJ: Resource Permissions', userPayload);
109304
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
109305
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwResourcePermissions')} WHERE ${provider.QuoteIdentifier('SharedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Resource Permissions', userPayload, EntityPermissionType.Read, 'AND');
109306
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
109307
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Resource Permissions', rows, this.GetUserFromPayload(userPayload));
109308
+ return result;
109309
+ }
106869
109310
  async MJResourcePermissions_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
106870
109311
  this.CheckUserReadPermissions('MJ: Resource Permissions', userPayload);
106871
109312
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -106994,6 +109435,14 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
106994
109435
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows, this.GetUserFromPayload(userPayload));
106995
109436
  return result;
106996
109437
  }
109438
+ async MJArchiveRuns_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
109439
+ this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
109440
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
109441
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArchiveRuns')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Archive Runs', userPayload, EntityPermissionType.Read, 'AND');
109442
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
109443
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Runs', rows, this.GetUserFromPayload(userPayload));
109444
+ return result;
109445
+ }
106997
109446
  async MJAIAgentRuns_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
106998
109447
  this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
106999
109448
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -107639,23 +110088,23 @@ __decorate([
107639
110088
  __metadata("design:returntype", Promise)
107640
110089
  ], MJUserResolverBase.prototype, "MJOAuthAuthorizationStates_UserIDArray", null);
107641
110090
  __decorate([
107642
- FieldResolver(() => [MJOpenAppInstallHistory_]),
110091
+ FieldResolver(() => [MJOpenApp_]),
107643
110092
  __param(0, Root()),
107644
110093
  __param(1, Ctx()),
107645
110094
  __param(2, PubSub()),
107646
110095
  __metadata("design:type", Function),
107647
110096
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
107648
110097
  __metadata("design:returntype", Promise)
107649
- ], MJUserResolverBase.prototype, "MJOpenAppInstallHistories_ExecutedByUserIDArray", null);
110098
+ ], MJUserResolverBase.prototype, "MJOpenApps_InstalledByUserIDArray", null);
107650
110099
  __decorate([
107651
- FieldResolver(() => [MJOpenApp_]),
110100
+ FieldResolver(() => [MJOpenAppInstallHistory_]),
107652
110101
  __param(0, Root()),
107653
110102
  __param(1, Ctx()),
107654
110103
  __param(2, PubSub()),
107655
110104
  __metadata("design:type", Function),
107656
110105
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
107657
110106
  __metadata("design:returntype", Promise)
107658
- ], MJUserResolverBase.prototype, "MJOpenApps_InstalledByUserIDArray", null);
110107
+ ], MJUserResolverBase.prototype, "MJOpenAppInstallHistories_ExecutedByUserIDArray", null);
107659
110108
  __decorate([
107660
110109
  FieldResolver(() => [MJContentItemDuplicate_]),
107661
110110
  __param(0, Root()),
@@ -107692,6 +110141,33 @@ __decorate([
107692
110141
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
107693
110142
  __metadata("design:returntype", Promise)
107694
110143
  ], MJUserResolverBase.prototype, "MJTagAuditLogs_PerformedByUserIDArray", null);
110144
+ __decorate([
110145
+ FieldResolver(() => [MJArchiveConfiguration_]),
110146
+ __param(0, Root()),
110147
+ __param(1, Ctx()),
110148
+ __param(2, PubSub()),
110149
+ __metadata("design:type", Function),
110150
+ __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
110151
+ __metadata("design:returntype", Promise)
110152
+ ], MJUserResolverBase.prototype, "MJArchiveConfigurations_CreatedByUserIDArray", null);
110153
+ __decorate([
110154
+ FieldResolver(() => [MJMCPToolFavorite_]),
110155
+ __param(0, Root()),
110156
+ __param(1, Ctx()),
110157
+ __param(2, PubSub()),
110158
+ __metadata("design:type", Function),
110159
+ __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
110160
+ __metadata("design:returntype", Promise)
110161
+ ], MJUserResolverBase.prototype, "MJMCPToolFavorites_UserIDArray", null);
110162
+ __decorate([
110163
+ FieldResolver(() => [MJResourcePermission_]),
110164
+ __param(0, Root()),
110165
+ __param(1, Ctx()),
110166
+ __param(2, PubSub()),
110167
+ __metadata("design:type", Function),
110168
+ __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
110169
+ __metadata("design:returntype", Promise)
110170
+ ], MJUserResolverBase.prototype, "MJResourcePermissions_SharedByUserIDArray", null);
107695
110171
  __decorate([
107696
110172
  FieldResolver(() => [MJResourcePermission_]),
107697
110173
  __param(0, Root()),
@@ -107836,6 +110312,15 @@ __decorate([
107836
110312
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
107837
110313
  __metadata("design:returntype", Promise)
107838
110314
  ], MJUserResolverBase.prototype, "MJFileStorageAccountPermissions_UserIDArray", null);
110315
+ __decorate([
110316
+ FieldResolver(() => [MJArchiveRun_]),
110317
+ __param(0, Root()),
110318
+ __param(1, Ctx()),
110319
+ __param(2, PubSub()),
110320
+ __metadata("design:type", Function),
110321
+ __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
110322
+ __metadata("design:returntype", Promise)
110323
+ ], MJUserResolverBase.prototype, "MJArchiveRuns_UserIDArray", null);
107839
110324
  __decorate([
107840
110325
  FieldResolver(() => [MJAIAgentRun_]),
107841
110326
  __param(0, Root()),