@memberjunction/server 5.28.0 → 5.29.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 (35) hide show
  1. package/dist/config.d.ts +151 -0
  2. package/dist/config.d.ts.map +1 -1
  3. package/dist/config.js +15 -0
  4. package/dist/config.js.map +1 -1
  5. package/dist/generated/generated.d.ts +332 -4
  6. package/dist/generated/generated.d.ts.map +1 -1
  7. package/dist/generated/generated.js +1862 -24
  8. package/dist/generated/generated.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/resolvers/FeedbackResolver.d.ts +150 -0
  14. package/dist/resolvers/FeedbackResolver.d.ts.map +1 -0
  15. package/dist/resolvers/FeedbackResolver.js +876 -0
  16. package/dist/resolvers/FeedbackResolver.js.map +1 -0
  17. package/dist/resolvers/FileResolver.d.ts +27 -0
  18. package/dist/resolvers/FileResolver.d.ts.map +1 -1
  19. package/dist/resolvers/FileResolver.js +32 -3
  20. package/dist/resolvers/FileResolver.js.map +1 -1
  21. package/dist/resolvers/MCPResolver.d.ts +77 -0
  22. package/dist/resolvers/MCPResolver.d.ts.map +1 -1
  23. package/dist/resolvers/MCPResolver.js +300 -1
  24. package/dist/resolvers/MCPResolver.js.map +1 -1
  25. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  26. package/dist/resolvers/RunAIAgentResolver.js +87 -32
  27. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  28. package/package.json +68 -66
  29. package/src/config.ts +19 -0
  30. package/src/generated/generated.ts +1281 -21
  31. package/src/index.ts +1 -0
  32. package/src/resolvers/FeedbackResolver.ts +940 -0
  33. package/src/resolvers/FileResolver.ts +33 -4
  34. package/src/resolvers/MCPResolver.ts +297 -1
  35. package/src/resolvers/RunAIAgentResolver.ts +89 -32
@@ -28717,6 +28717,1468 @@ MJApplicationResolver = __decorate([
28717
28717
  ], MJApplicationResolver);
28718
28718
  export { MJApplicationResolver };
28719
28719
  //****************************************************************************
28720
+ // ENTITY CLASS for MJ: Archive Configuration Entities
28721
+ //****************************************************************************
28722
+ let MJArchiveConfigurationEntity_ = class MJArchiveConfigurationEntity_ {
28723
+ };
28724
+ __decorate([
28725
+ Field(),
28726
+ MaxLength(36),
28727
+ __metadata("design:type", String)
28728
+ ], MJArchiveConfigurationEntity_.prototype, "ID", void 0);
28729
+ __decorate([
28730
+ Field({ description: `Foreign key to the parent ArchiveConfiguration.` }),
28731
+ MaxLength(36),
28732
+ __metadata("design:type", String)
28733
+ ], MJArchiveConfigurationEntity_.prototype, "ArchiveConfigurationID", void 0);
28734
+ __decorate([
28735
+ Field({ description: `Foreign key to the Entity being archived.` }),
28736
+ MaxLength(36),
28737
+ __metadata("design:type", String)
28738
+ ], MJArchiveConfigurationEntity_.prototype, "EntityID", void 0);
28739
+ __decorate([
28740
+ Field({ nullable: true, description: `Archive mode override for this entity. NULL inherits from the parent configuration's DefaultMode.` }),
28741
+ MaxLength(20),
28742
+ __metadata("design:type", String)
28743
+ ], MJArchiveConfigurationEntity_.prototype, "Mode", void 0);
28744
+ __decorate([
28745
+ Field(() => Int, { nullable: true, description: `Retention period override in days. NULL inherits from the parent configuration's DefaultRetentionDays.` }),
28746
+ __metadata("design:type", Number)
28747
+ ], MJArchiveConfigurationEntity_.prototype, "RetentionDays", void 0);
28748
+ __decorate([
28749
+ Field({ description: `The date field on the entity used to determine record age for retention policy evaluation. Defaults to __mj_CreatedAt.` }),
28750
+ MaxLength(100),
28751
+ __metadata("design:type", String)
28752
+ ], MJArchiveConfigurationEntity_.prototype, "DateField", void 0);
28753
+ __decorate([
28754
+ Field({ nullable: true, description: `Optional SQL WHERE clause fragment to further filter which records are eligible for archiving (e.g., "Status = 'Closed'").` }),
28755
+ __metadata("design:type", String)
28756
+ ], MJArchiveConfigurationEntity_.prototype, "FilterExpression", void 0);
28757
+ __decorate([
28758
+ Field(() => Int, { nullable: true, description: `Batch size override for this entity. NULL inherits from the parent configuration's DefaultBatchSize.` }),
28759
+ __metadata("design:type", Number)
28760
+ ], MJArchiveConfigurationEntity_.prototype, "BatchSize", void 0);
28761
+ __decorate([
28762
+ Field(() => Int, { description: `Processing priority — lower numbers are archived first. Default is 100.` }),
28763
+ __metadata("design:type", Number)
28764
+ ], MJArchiveConfigurationEntity_.prototype, "Priority", void 0);
28765
+ __decorate([
28766
+ Field({ description: `JSON configuration specifying which fields to include/exclude in the archive output. Required for all modes.` }),
28767
+ __metadata("design:type", String)
28768
+ ], MJArchiveConfigurationEntity_.prototype, "FieldConfiguration", void 0);
28769
+ __decorate([
28770
+ Field({ nullable: true, description: `Optional fully-qualified class name of a custom archive driver to use for this entity, overriding the default archiver.` }),
28771
+ MaxLength(500),
28772
+ __metadata("design:type", String)
28773
+ ], MJArchiveConfigurationEntity_.prototype, "DriverClass", void 0);
28774
+ __decorate([
28775
+ Field(() => Boolean, { nullable: true, description: `Override for archiving related Record Changes. NULL inherits from the parent configuration.` }),
28776
+ __metadata("design:type", Boolean)
28777
+ ], MJArchiveConfigurationEntity_.prototype, "ArchiveRelatedRecordChanges", void 0);
28778
+ __decorate([
28779
+ Field(() => Boolean, { description: `Whether this entity is active within the archive configuration.` }),
28780
+ __metadata("design:type", Boolean)
28781
+ ], MJArchiveConfigurationEntity_.prototype, "IsActive", void 0);
28782
+ __decorate([
28783
+ Field(),
28784
+ __metadata("design:type", Date)
28785
+ ], MJArchiveConfigurationEntity_.prototype, "_mj__CreatedAt", void 0);
28786
+ __decorate([
28787
+ Field(),
28788
+ __metadata("design:type", Date)
28789
+ ], MJArchiveConfigurationEntity_.prototype, "_mj__UpdatedAt", void 0);
28790
+ __decorate([
28791
+ Field(),
28792
+ MaxLength(255),
28793
+ __metadata("design:type", String)
28794
+ ], MJArchiveConfigurationEntity_.prototype, "ArchiveConfiguration", void 0);
28795
+ __decorate([
28796
+ Field(),
28797
+ MaxLength(255),
28798
+ __metadata("design:type", String)
28799
+ ], MJArchiveConfigurationEntity_.prototype, "Entity", void 0);
28800
+ MJArchiveConfigurationEntity_ = __decorate([
28801
+ 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.` })
28802
+ ], MJArchiveConfigurationEntity_);
28803
+ export { MJArchiveConfigurationEntity_ };
28804
+ //****************************************************************************
28805
+ // INPUT TYPE for MJ: Archive Configuration Entities
28806
+ //****************************************************************************
28807
+ let CreateMJArchiveConfigurationEntityInput = class CreateMJArchiveConfigurationEntityInput {
28808
+ };
28809
+ __decorate([
28810
+ Field({ nullable: true }),
28811
+ __metadata("design:type", String)
28812
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "ID", void 0);
28813
+ __decorate([
28814
+ Field({ nullable: true }),
28815
+ __metadata("design:type", String)
28816
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "ArchiveConfigurationID", void 0);
28817
+ __decorate([
28818
+ Field({ nullable: true }),
28819
+ __metadata("design:type", String)
28820
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "EntityID", void 0);
28821
+ __decorate([
28822
+ Field({ nullable: true }),
28823
+ __metadata("design:type", String)
28824
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "Mode", void 0);
28825
+ __decorate([
28826
+ Field(() => Int, { nullable: true }),
28827
+ __metadata("design:type", Number)
28828
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "RetentionDays", void 0);
28829
+ __decorate([
28830
+ Field({ nullable: true }),
28831
+ __metadata("design:type", String)
28832
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "DateField", void 0);
28833
+ __decorate([
28834
+ Field({ nullable: true }),
28835
+ __metadata("design:type", String)
28836
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "FilterExpression", void 0);
28837
+ __decorate([
28838
+ Field(() => Int, { nullable: true }),
28839
+ __metadata("design:type", Number)
28840
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "BatchSize", void 0);
28841
+ __decorate([
28842
+ Field(() => Int, { nullable: true }),
28843
+ __metadata("design:type", Number)
28844
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "Priority", void 0);
28845
+ __decorate([
28846
+ Field({ nullable: true }),
28847
+ __metadata("design:type", String)
28848
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "FieldConfiguration", void 0);
28849
+ __decorate([
28850
+ Field({ nullable: true }),
28851
+ __metadata("design:type", String)
28852
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "DriverClass", void 0);
28853
+ __decorate([
28854
+ Field(() => Boolean, { nullable: true }),
28855
+ __metadata("design:type", Boolean)
28856
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "ArchiveRelatedRecordChanges", void 0);
28857
+ __decorate([
28858
+ Field(() => Boolean, { nullable: true }),
28859
+ __metadata("design:type", Boolean)
28860
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "IsActive", void 0);
28861
+ __decorate([
28862
+ Field(() => RestoreContextInput, { nullable: true }),
28863
+ __metadata("design:type", RestoreContextInput)
28864
+ ], CreateMJArchiveConfigurationEntityInput.prototype, "RestoreContext___", void 0);
28865
+ CreateMJArchiveConfigurationEntityInput = __decorate([
28866
+ InputType()
28867
+ ], CreateMJArchiveConfigurationEntityInput);
28868
+ export { CreateMJArchiveConfigurationEntityInput };
28869
+ //****************************************************************************
28870
+ // INPUT TYPE for MJ: Archive Configuration Entities
28871
+ //****************************************************************************
28872
+ let UpdateMJArchiveConfigurationEntityInput = class UpdateMJArchiveConfigurationEntityInput {
28873
+ };
28874
+ __decorate([
28875
+ Field(),
28876
+ __metadata("design:type", String)
28877
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "ID", void 0);
28878
+ __decorate([
28879
+ Field({ nullable: true }),
28880
+ __metadata("design:type", String)
28881
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "ArchiveConfigurationID", void 0);
28882
+ __decorate([
28883
+ Field({ nullable: true }),
28884
+ __metadata("design:type", String)
28885
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "EntityID", void 0);
28886
+ __decorate([
28887
+ Field({ nullable: true }),
28888
+ __metadata("design:type", String)
28889
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "Mode", void 0);
28890
+ __decorate([
28891
+ Field(() => Int, { nullable: true }),
28892
+ __metadata("design:type", Number)
28893
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "RetentionDays", void 0);
28894
+ __decorate([
28895
+ Field({ nullable: true }),
28896
+ __metadata("design:type", String)
28897
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "DateField", void 0);
28898
+ __decorate([
28899
+ Field({ nullable: true }),
28900
+ __metadata("design:type", String)
28901
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "FilterExpression", void 0);
28902
+ __decorate([
28903
+ Field(() => Int, { nullable: true }),
28904
+ __metadata("design:type", Number)
28905
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "BatchSize", void 0);
28906
+ __decorate([
28907
+ Field(() => Int, { nullable: true }),
28908
+ __metadata("design:type", Number)
28909
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "Priority", void 0);
28910
+ __decorate([
28911
+ Field({ nullable: true }),
28912
+ __metadata("design:type", String)
28913
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "FieldConfiguration", void 0);
28914
+ __decorate([
28915
+ Field({ nullable: true }),
28916
+ __metadata("design:type", String)
28917
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "DriverClass", void 0);
28918
+ __decorate([
28919
+ Field(() => Boolean, { nullable: true }),
28920
+ __metadata("design:type", Boolean)
28921
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "ArchiveRelatedRecordChanges", void 0);
28922
+ __decorate([
28923
+ Field(() => Boolean, { nullable: true }),
28924
+ __metadata("design:type", Boolean)
28925
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "IsActive", void 0);
28926
+ __decorate([
28927
+ Field(() => [KeyValuePairInput], { nullable: true }),
28928
+ __metadata("design:type", Array)
28929
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "OldValues___", void 0);
28930
+ __decorate([
28931
+ Field(() => RestoreContextInput, { nullable: true }),
28932
+ __metadata("design:type", RestoreContextInput)
28933
+ ], UpdateMJArchiveConfigurationEntityInput.prototype, "RestoreContext___", void 0);
28934
+ UpdateMJArchiveConfigurationEntityInput = __decorate([
28935
+ InputType()
28936
+ ], UpdateMJArchiveConfigurationEntityInput);
28937
+ export { UpdateMJArchiveConfigurationEntityInput };
28938
+ //****************************************************************************
28939
+ // RESOLVER for MJ: Archive Configuration Entities
28940
+ //****************************************************************************
28941
+ let RunMJArchiveConfigurationEntityViewResult = class RunMJArchiveConfigurationEntityViewResult {
28942
+ };
28943
+ __decorate([
28944
+ Field(() => [MJArchiveConfigurationEntity_]),
28945
+ __metadata("design:type", Array)
28946
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "Results", void 0);
28947
+ __decorate([
28948
+ Field(() => String, { nullable: true }),
28949
+ __metadata("design:type", String)
28950
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "UserViewRunID", void 0);
28951
+ __decorate([
28952
+ Field(() => Int, { nullable: true }),
28953
+ __metadata("design:type", Number)
28954
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "RowCount", void 0);
28955
+ __decorate([
28956
+ Field(() => Int, { nullable: true }),
28957
+ __metadata("design:type", Number)
28958
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "TotalRowCount", void 0);
28959
+ __decorate([
28960
+ Field(() => Int, { nullable: true }),
28961
+ __metadata("design:type", Number)
28962
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "ExecutionTime", void 0);
28963
+ __decorate([
28964
+ Field({ nullable: true }),
28965
+ __metadata("design:type", String)
28966
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "ErrorMessage", void 0);
28967
+ __decorate([
28968
+ Field(() => Boolean, { nullable: false }),
28969
+ __metadata("design:type", Boolean)
28970
+ ], RunMJArchiveConfigurationEntityViewResult.prototype, "Success", void 0);
28971
+ RunMJArchiveConfigurationEntityViewResult = __decorate([
28972
+ ObjectType()
28973
+ ], RunMJArchiveConfigurationEntityViewResult);
28974
+ export { RunMJArchiveConfigurationEntityViewResult };
28975
+ let MJArchiveConfigurationEntityResolver = class MJArchiveConfigurationEntityResolver extends ResolverBase {
28976
+ async RunMJArchiveConfigurationEntityViewByID(input, { providers, userPayload }, pubSub) {
28977
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28978
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
28979
+ }
28980
+ async RunMJArchiveConfigurationEntityViewByName(input, { providers, userPayload }, pubSub) {
28981
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28982
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
28983
+ }
28984
+ async RunMJArchiveConfigurationEntityDynamicView(input, { providers, userPayload }, pubSub) {
28985
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28986
+ input.EntityName = 'MJ: Archive Configuration Entities';
28987
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
28988
+ }
28989
+ async MJArchiveConfigurationEntity(ID, { userPayload, providers }, pubSub) {
28990
+ this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
28991
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
28992
+ 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');
28993
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
28994
+ const result = await this.MapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
28995
+ return result;
28996
+ }
28997
+ async CreateMJArchiveConfigurationEntity(input, { providers, userPayload }, pubSub) {
28998
+ const provider = GetReadWriteProvider(providers);
28999
+ return this.CreateRecord('MJ: Archive Configuration Entities', input, provider, userPayload, pubSub);
29000
+ }
29001
+ async UpdateMJArchiveConfigurationEntity(input, { providers, userPayload }, pubSub) {
29002
+ const provider = GetReadWriteProvider(providers);
29003
+ return this.UpdateRecord('MJ: Archive Configuration Entities', input, provider, userPayload, pubSub);
29004
+ }
29005
+ async DeleteMJArchiveConfigurationEntity(ID, options, { providers, userPayload }, pubSub) {
29006
+ const provider = GetReadWriteProvider(providers);
29007
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
29008
+ return this.DeleteRecord('MJ: Archive Configuration Entities', key, options, provider, userPayload, pubSub);
29009
+ }
29010
+ };
29011
+ __decorate([
29012
+ Query(() => RunMJArchiveConfigurationEntityViewResult),
29013
+ __param(0, Arg('input', () => RunViewByIDInput)),
29014
+ __param(1, Ctx()),
29015
+ __param(2, PubSub()),
29016
+ __metadata("design:type", Function),
29017
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
29018
+ __metadata("design:returntype", Promise)
29019
+ ], MJArchiveConfigurationEntityResolver.prototype, "RunMJArchiveConfigurationEntityViewByID", null);
29020
+ __decorate([
29021
+ Query(() => RunMJArchiveConfigurationEntityViewResult),
29022
+ __param(0, Arg('input', () => RunViewByNameInput)),
29023
+ __param(1, Ctx()),
29024
+ __param(2, PubSub()),
29025
+ __metadata("design:type", Function),
29026
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
29027
+ __metadata("design:returntype", Promise)
29028
+ ], MJArchiveConfigurationEntityResolver.prototype, "RunMJArchiveConfigurationEntityViewByName", null);
29029
+ __decorate([
29030
+ Query(() => RunMJArchiveConfigurationEntityViewResult),
29031
+ __param(0, Arg('input', () => RunDynamicViewInput)),
29032
+ __param(1, Ctx()),
29033
+ __param(2, PubSub()),
29034
+ __metadata("design:type", Function),
29035
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
29036
+ __metadata("design:returntype", Promise)
29037
+ ], MJArchiveConfigurationEntityResolver.prototype, "RunMJArchiveConfigurationEntityDynamicView", null);
29038
+ __decorate([
29039
+ Query(() => MJArchiveConfigurationEntity_, { nullable: true }),
29040
+ __param(0, Arg('ID', () => String)),
29041
+ __param(1, Ctx()),
29042
+ __param(2, PubSub()),
29043
+ __metadata("design:type", Function),
29044
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
29045
+ __metadata("design:returntype", Promise)
29046
+ ], MJArchiveConfigurationEntityResolver.prototype, "MJArchiveConfigurationEntity", null);
29047
+ __decorate([
29048
+ Mutation(() => MJArchiveConfigurationEntity_),
29049
+ __param(0, Arg('input', () => CreateMJArchiveConfigurationEntityInput)),
29050
+ __param(1, Ctx()),
29051
+ __param(2, PubSub()),
29052
+ __metadata("design:type", Function),
29053
+ __metadata("design:paramtypes", [CreateMJArchiveConfigurationEntityInput, Object, PubSubEngine]),
29054
+ __metadata("design:returntype", Promise)
29055
+ ], MJArchiveConfigurationEntityResolver.prototype, "CreateMJArchiveConfigurationEntity", null);
29056
+ __decorate([
29057
+ Mutation(() => MJArchiveConfigurationEntity_),
29058
+ __param(0, Arg('input', () => UpdateMJArchiveConfigurationEntityInput)),
29059
+ __param(1, Ctx()),
29060
+ __param(2, PubSub()),
29061
+ __metadata("design:type", Function),
29062
+ __metadata("design:paramtypes", [UpdateMJArchiveConfigurationEntityInput, Object, PubSubEngine]),
29063
+ __metadata("design:returntype", Promise)
29064
+ ], MJArchiveConfigurationEntityResolver.prototype, "UpdateMJArchiveConfigurationEntity", null);
29065
+ __decorate([
29066
+ Mutation(() => MJArchiveConfigurationEntity_),
29067
+ __param(0, Arg('ID', () => String)),
29068
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
29069
+ __param(2, Ctx()),
29070
+ __param(3, PubSub()),
29071
+ __metadata("design:type", Function),
29072
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
29073
+ __metadata("design:returntype", Promise)
29074
+ ], MJArchiveConfigurationEntityResolver.prototype, "DeleteMJArchiveConfigurationEntity", null);
29075
+ MJArchiveConfigurationEntityResolver = __decorate([
29076
+ Resolver(MJArchiveConfigurationEntity_)
29077
+ ], MJArchiveConfigurationEntityResolver);
29078
+ export { MJArchiveConfigurationEntityResolver };
29079
+ //****************************************************************************
29080
+ // ENTITY CLASS for MJ: Archive Configurations
29081
+ //****************************************************************************
29082
+ let MJArchiveConfiguration_ = class MJArchiveConfiguration_ {
29083
+ };
29084
+ __decorate([
29085
+ Field(),
29086
+ MaxLength(36),
29087
+ __metadata("design:type", String)
29088
+ ], MJArchiveConfiguration_.prototype, "ID", void 0);
29089
+ __decorate([
29090
+ Field({ description: `Human-readable name for this archive configuration.` }),
29091
+ MaxLength(255),
29092
+ __metadata("design:type", String)
29093
+ ], MJArchiveConfiguration_.prototype, "Name", void 0);
29094
+ __decorate([
29095
+ Field({ nullable: true }),
29096
+ __metadata("design:type", String)
29097
+ ], MJArchiveConfiguration_.prototype, "Description", void 0);
29098
+ __decorate([
29099
+ Field({ nullable: true, description: `Foreign key to FileStorageAccount — the blob/file storage target for archived data.` }),
29100
+ MaxLength(36),
29101
+ __metadata("design:type", String)
29102
+ ], MJArchiveConfiguration_.prototype, "StorageAccountID", void 0);
29103
+ __decorate([
29104
+ Field({ description: `Root path within the storage account where archive files are written (e.g., "archives/production/").` }),
29105
+ MaxLength(500),
29106
+ __metadata("design:type", String)
29107
+ ], MJArchiveConfiguration_.prototype, "RootPath", void 0);
29108
+ __decorate([
29109
+ Field({ description: `Output format for archived records: JSON, Parquet, or CSV.` }),
29110
+ MaxLength(20),
29111
+ __metadata("design:type", String)
29112
+ ], MJArchiveConfiguration_.prototype, "ArchiveFormat", void 0);
29113
+ __decorate([
29114
+ Field(() => Boolean, { description: `Whether this configuration is active and eligible for scheduled archive runs.` }),
29115
+ __metadata("design:type", Boolean)
29116
+ ], MJArchiveConfiguration_.prototype, "IsActive", void 0);
29117
+ __decorate([
29118
+ Field(() => Int, { description: `Default number of days after which records become eligible for archiving. Can be overridden per entity.` }),
29119
+ __metadata("design:type", Number)
29120
+ ], MJArchiveConfiguration_.prototype, "DefaultRetentionDays", void 0);
29121
+ __decorate([
29122
+ Field({ description: `Default archive mode: StripFields (null out specified fields), HardDelete (delete from source after archiving), ArchiveOnly (copy to storage without modifying source).` }),
29123
+ MaxLength(20),
29124
+ __metadata("design:type", String)
29125
+ ], MJArchiveConfiguration_.prototype, "DefaultMode", void 0);
29126
+ __decorate([
29127
+ Field(() => Int, { description: `Default number of records to process per batch during archive runs.` }),
29128
+ __metadata("design:type", Number)
29129
+ ], MJArchiveConfiguration_.prototype, "DefaultBatchSize", void 0);
29130
+ __decorate([
29131
+ Field(() => Boolean, { description: `When enabled, related Record Changes entries are also archived alongside the source records.` }),
29132
+ __metadata("design:type", Boolean)
29133
+ ], MJArchiveConfiguration_.prototype, "ArchiveRelatedRecordChanges", void 0);
29134
+ __decorate([
29135
+ Field({ description: `Current operational status of this configuration: Idle, Running, Error, or Disabled.` }),
29136
+ MaxLength(20),
29137
+ __metadata("design:type", String)
29138
+ ], MJArchiveConfiguration_.prototype, "Status", void 0);
29139
+ __decorate([
29140
+ Field({ description: `The user who created this archive configuration.` }),
29141
+ MaxLength(36),
29142
+ __metadata("design:type", String)
29143
+ ], MJArchiveConfiguration_.prototype, "CreatedByUserID", void 0);
29144
+ __decorate([
29145
+ Field(),
29146
+ __metadata("design:type", Date)
29147
+ ], MJArchiveConfiguration_.prototype, "_mj__CreatedAt", void 0);
29148
+ __decorate([
29149
+ Field(),
29150
+ __metadata("design:type", Date)
29151
+ ], MJArchiveConfiguration_.prototype, "_mj__UpdatedAt", void 0);
29152
+ __decorate([
29153
+ Field({ nullable: true }),
29154
+ MaxLength(200),
29155
+ __metadata("design:type", String)
29156
+ ], MJArchiveConfiguration_.prototype, "StorageAccount", void 0);
29157
+ __decorate([
29158
+ Field(),
29159
+ MaxLength(100),
29160
+ __metadata("design:type", String)
29161
+ ], MJArchiveConfiguration_.prototype, "CreatedByUser", void 0);
29162
+ __decorate([
29163
+ Field(() => [MJArchiveConfigurationEntity_]),
29164
+ __metadata("design:type", Array)
29165
+ ], MJArchiveConfiguration_.prototype, "MJArchiveConfigurationEntities_ArchiveConfigurationIDArray", void 0);
29166
+ __decorate([
29167
+ Field(() => [MJArchiveRun_]),
29168
+ __metadata("design:type", Array)
29169
+ ], MJArchiveConfiguration_.prototype, "MJArchiveRuns_ArchiveConfigurationIDArray", void 0);
29170
+ MJArchiveConfiguration_ = __decorate([
29171
+ 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.` })
29172
+ ], MJArchiveConfiguration_);
29173
+ export { MJArchiveConfiguration_ };
29174
+ //****************************************************************************
29175
+ // INPUT TYPE for MJ: Archive Configurations
29176
+ //****************************************************************************
29177
+ let CreateMJArchiveConfigurationInput = class CreateMJArchiveConfigurationInput {
29178
+ };
29179
+ __decorate([
29180
+ Field({ nullable: true }),
29181
+ __metadata("design:type", String)
29182
+ ], CreateMJArchiveConfigurationInput.prototype, "ID", void 0);
29183
+ __decorate([
29184
+ Field({ nullable: true }),
29185
+ __metadata("design:type", String)
29186
+ ], CreateMJArchiveConfigurationInput.prototype, "Name", void 0);
29187
+ __decorate([
29188
+ Field({ nullable: true }),
29189
+ __metadata("design:type", String)
29190
+ ], CreateMJArchiveConfigurationInput.prototype, "Description", void 0);
29191
+ __decorate([
29192
+ Field({ nullable: true }),
29193
+ __metadata("design:type", String)
29194
+ ], CreateMJArchiveConfigurationInput.prototype, "StorageAccountID", void 0);
29195
+ __decorate([
29196
+ Field({ nullable: true }),
29197
+ __metadata("design:type", String)
29198
+ ], CreateMJArchiveConfigurationInput.prototype, "RootPath", void 0);
29199
+ __decorate([
29200
+ Field({ nullable: true }),
29201
+ __metadata("design:type", String)
29202
+ ], CreateMJArchiveConfigurationInput.prototype, "ArchiveFormat", void 0);
29203
+ __decorate([
29204
+ Field(() => Boolean, { nullable: true }),
29205
+ __metadata("design:type", Boolean)
29206
+ ], CreateMJArchiveConfigurationInput.prototype, "IsActive", void 0);
29207
+ __decorate([
29208
+ Field(() => Int, { nullable: true }),
29209
+ __metadata("design:type", Number)
29210
+ ], CreateMJArchiveConfigurationInput.prototype, "DefaultRetentionDays", void 0);
29211
+ __decorate([
29212
+ Field({ nullable: true }),
29213
+ __metadata("design:type", String)
29214
+ ], CreateMJArchiveConfigurationInput.prototype, "DefaultMode", void 0);
29215
+ __decorate([
29216
+ Field(() => Int, { nullable: true }),
29217
+ __metadata("design:type", Number)
29218
+ ], CreateMJArchiveConfigurationInput.prototype, "DefaultBatchSize", void 0);
29219
+ __decorate([
29220
+ Field(() => Boolean, { nullable: true }),
29221
+ __metadata("design:type", Boolean)
29222
+ ], CreateMJArchiveConfigurationInput.prototype, "ArchiveRelatedRecordChanges", void 0);
29223
+ __decorate([
29224
+ Field({ nullable: true }),
29225
+ __metadata("design:type", String)
29226
+ ], CreateMJArchiveConfigurationInput.prototype, "Status", void 0);
29227
+ __decorate([
29228
+ Field({ nullable: true }),
29229
+ __metadata("design:type", String)
29230
+ ], CreateMJArchiveConfigurationInput.prototype, "CreatedByUserID", void 0);
29231
+ __decorate([
29232
+ Field(() => RestoreContextInput, { nullable: true }),
29233
+ __metadata("design:type", RestoreContextInput)
29234
+ ], CreateMJArchiveConfigurationInput.prototype, "RestoreContext___", void 0);
29235
+ CreateMJArchiveConfigurationInput = __decorate([
29236
+ InputType()
29237
+ ], CreateMJArchiveConfigurationInput);
29238
+ export { CreateMJArchiveConfigurationInput };
29239
+ //****************************************************************************
29240
+ // INPUT TYPE for MJ: Archive Configurations
29241
+ //****************************************************************************
29242
+ let UpdateMJArchiveConfigurationInput = class UpdateMJArchiveConfigurationInput {
29243
+ };
29244
+ __decorate([
29245
+ Field(),
29246
+ __metadata("design:type", String)
29247
+ ], UpdateMJArchiveConfigurationInput.prototype, "ID", void 0);
29248
+ __decorate([
29249
+ Field({ nullable: true }),
29250
+ __metadata("design:type", String)
29251
+ ], UpdateMJArchiveConfigurationInput.prototype, "Name", void 0);
29252
+ __decorate([
29253
+ Field({ nullable: true }),
29254
+ __metadata("design:type", String)
29255
+ ], UpdateMJArchiveConfigurationInput.prototype, "Description", void 0);
29256
+ __decorate([
29257
+ Field({ nullable: true }),
29258
+ __metadata("design:type", String)
29259
+ ], UpdateMJArchiveConfigurationInput.prototype, "StorageAccountID", void 0);
29260
+ __decorate([
29261
+ Field({ nullable: true }),
29262
+ __metadata("design:type", String)
29263
+ ], UpdateMJArchiveConfigurationInput.prototype, "RootPath", void 0);
29264
+ __decorate([
29265
+ Field({ nullable: true }),
29266
+ __metadata("design:type", String)
29267
+ ], UpdateMJArchiveConfigurationInput.prototype, "ArchiveFormat", void 0);
29268
+ __decorate([
29269
+ Field(() => Boolean, { nullable: true }),
29270
+ __metadata("design:type", Boolean)
29271
+ ], UpdateMJArchiveConfigurationInput.prototype, "IsActive", void 0);
29272
+ __decorate([
29273
+ Field(() => Int, { nullable: true }),
29274
+ __metadata("design:type", Number)
29275
+ ], UpdateMJArchiveConfigurationInput.prototype, "DefaultRetentionDays", void 0);
29276
+ __decorate([
29277
+ Field({ nullable: true }),
29278
+ __metadata("design:type", String)
29279
+ ], UpdateMJArchiveConfigurationInput.prototype, "DefaultMode", void 0);
29280
+ __decorate([
29281
+ Field(() => Int, { nullable: true }),
29282
+ __metadata("design:type", Number)
29283
+ ], UpdateMJArchiveConfigurationInput.prototype, "DefaultBatchSize", void 0);
29284
+ __decorate([
29285
+ Field(() => Boolean, { nullable: true }),
29286
+ __metadata("design:type", Boolean)
29287
+ ], UpdateMJArchiveConfigurationInput.prototype, "ArchiveRelatedRecordChanges", void 0);
29288
+ __decorate([
29289
+ Field({ nullable: true }),
29290
+ __metadata("design:type", String)
29291
+ ], UpdateMJArchiveConfigurationInput.prototype, "Status", void 0);
29292
+ __decorate([
29293
+ Field({ nullable: true }),
29294
+ __metadata("design:type", String)
29295
+ ], UpdateMJArchiveConfigurationInput.prototype, "CreatedByUserID", void 0);
29296
+ __decorate([
29297
+ Field(() => [KeyValuePairInput], { nullable: true }),
29298
+ __metadata("design:type", Array)
29299
+ ], UpdateMJArchiveConfigurationInput.prototype, "OldValues___", void 0);
29300
+ __decorate([
29301
+ Field(() => RestoreContextInput, { nullable: true }),
29302
+ __metadata("design:type", RestoreContextInput)
29303
+ ], UpdateMJArchiveConfigurationInput.prototype, "RestoreContext___", void 0);
29304
+ UpdateMJArchiveConfigurationInput = __decorate([
29305
+ InputType()
29306
+ ], UpdateMJArchiveConfigurationInput);
29307
+ export { UpdateMJArchiveConfigurationInput };
29308
+ //****************************************************************************
29309
+ // RESOLVER for MJ: Archive Configurations
29310
+ //****************************************************************************
29311
+ let RunMJArchiveConfigurationViewResult = class RunMJArchiveConfigurationViewResult {
29312
+ };
29313
+ __decorate([
29314
+ Field(() => [MJArchiveConfiguration_]),
29315
+ __metadata("design:type", Array)
29316
+ ], RunMJArchiveConfigurationViewResult.prototype, "Results", void 0);
29317
+ __decorate([
29318
+ Field(() => String, { nullable: true }),
29319
+ __metadata("design:type", String)
29320
+ ], RunMJArchiveConfigurationViewResult.prototype, "UserViewRunID", void 0);
29321
+ __decorate([
29322
+ Field(() => Int, { nullable: true }),
29323
+ __metadata("design:type", Number)
29324
+ ], RunMJArchiveConfigurationViewResult.prototype, "RowCount", void 0);
29325
+ __decorate([
29326
+ Field(() => Int, { nullable: true }),
29327
+ __metadata("design:type", Number)
29328
+ ], RunMJArchiveConfigurationViewResult.prototype, "TotalRowCount", void 0);
29329
+ __decorate([
29330
+ Field(() => Int, { nullable: true }),
29331
+ __metadata("design:type", Number)
29332
+ ], RunMJArchiveConfigurationViewResult.prototype, "ExecutionTime", void 0);
29333
+ __decorate([
29334
+ Field({ nullable: true }),
29335
+ __metadata("design:type", String)
29336
+ ], RunMJArchiveConfigurationViewResult.prototype, "ErrorMessage", void 0);
29337
+ __decorate([
29338
+ Field(() => Boolean, { nullable: false }),
29339
+ __metadata("design:type", Boolean)
29340
+ ], RunMJArchiveConfigurationViewResult.prototype, "Success", void 0);
29341
+ RunMJArchiveConfigurationViewResult = __decorate([
29342
+ ObjectType()
29343
+ ], RunMJArchiveConfigurationViewResult);
29344
+ export { RunMJArchiveConfigurationViewResult };
29345
+ let MJArchiveConfigurationResolver = class MJArchiveConfigurationResolver extends ResolverBase {
29346
+ async RunMJArchiveConfigurationViewByID(input, { providers, userPayload }, pubSub) {
29347
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29348
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
29349
+ }
29350
+ async RunMJArchiveConfigurationViewByName(input, { providers, userPayload }, pubSub) {
29351
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29352
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
29353
+ }
29354
+ async RunMJArchiveConfigurationDynamicView(input, { providers, userPayload }, pubSub) {
29355
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29356
+ input.EntityName = 'MJ: Archive Configurations';
29357
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
29358
+ }
29359
+ async MJArchiveConfiguration(ID, { userPayload, providers }, pubSub) {
29360
+ this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
29361
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29362
+ 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');
29363
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29364
+ const result = await this.MapFieldNamesToCodeNames('MJ: Archive Configurations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
29365
+ return result;
29366
+ }
29367
+ async MJArchiveConfigurationEntities_ArchiveConfigurationIDArray(mjarchiveconfiguration_, { userPayload, providers }, pubSub) {
29368
+ this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
29369
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29370
+ 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');
29371
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29372
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows, this.GetUserFromPayload(userPayload));
29373
+ return result;
29374
+ }
29375
+ async MJArchiveRuns_ArchiveConfigurationIDArray(mjarchiveconfiguration_, { userPayload, providers }, pubSub) {
29376
+ this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
29377
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29378
+ 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');
29379
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29380
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Runs', rows, this.GetUserFromPayload(userPayload));
29381
+ return result;
29382
+ }
29383
+ async CreateMJArchiveConfiguration(input, { providers, userPayload }, pubSub) {
29384
+ const provider = GetReadWriteProvider(providers);
29385
+ return this.CreateRecord('MJ: Archive Configurations', input, provider, userPayload, pubSub);
29386
+ }
29387
+ async UpdateMJArchiveConfiguration(input, { providers, userPayload }, pubSub) {
29388
+ const provider = GetReadWriteProvider(providers);
29389
+ return this.UpdateRecord('MJ: Archive Configurations', input, provider, userPayload, pubSub);
29390
+ }
29391
+ async DeleteMJArchiveConfiguration(ID, options, { providers, userPayload }, pubSub) {
29392
+ const provider = GetReadWriteProvider(providers);
29393
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
29394
+ return this.DeleteRecord('MJ: Archive Configurations', key, options, provider, userPayload, pubSub);
29395
+ }
29396
+ };
29397
+ __decorate([
29398
+ Query(() => RunMJArchiveConfigurationViewResult),
29399
+ __param(0, Arg('input', () => RunViewByIDInput)),
29400
+ __param(1, Ctx()),
29401
+ __param(2, PubSub()),
29402
+ __metadata("design:type", Function),
29403
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
29404
+ __metadata("design:returntype", Promise)
29405
+ ], MJArchiveConfigurationResolver.prototype, "RunMJArchiveConfigurationViewByID", null);
29406
+ __decorate([
29407
+ Query(() => RunMJArchiveConfigurationViewResult),
29408
+ __param(0, Arg('input', () => RunViewByNameInput)),
29409
+ __param(1, Ctx()),
29410
+ __param(2, PubSub()),
29411
+ __metadata("design:type", Function),
29412
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
29413
+ __metadata("design:returntype", Promise)
29414
+ ], MJArchiveConfigurationResolver.prototype, "RunMJArchiveConfigurationViewByName", null);
29415
+ __decorate([
29416
+ Query(() => RunMJArchiveConfigurationViewResult),
29417
+ __param(0, Arg('input', () => RunDynamicViewInput)),
29418
+ __param(1, Ctx()),
29419
+ __param(2, PubSub()),
29420
+ __metadata("design:type", Function),
29421
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
29422
+ __metadata("design:returntype", Promise)
29423
+ ], MJArchiveConfigurationResolver.prototype, "RunMJArchiveConfigurationDynamicView", null);
29424
+ __decorate([
29425
+ Query(() => MJArchiveConfiguration_, { nullable: true }),
29426
+ __param(0, Arg('ID', () => String)),
29427
+ __param(1, Ctx()),
29428
+ __param(2, PubSub()),
29429
+ __metadata("design:type", Function),
29430
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
29431
+ __metadata("design:returntype", Promise)
29432
+ ], MJArchiveConfigurationResolver.prototype, "MJArchiveConfiguration", null);
29433
+ __decorate([
29434
+ FieldResolver(() => [MJArchiveConfigurationEntity_]),
29435
+ __param(0, Root()),
29436
+ __param(1, Ctx()),
29437
+ __param(2, PubSub()),
29438
+ __metadata("design:type", Function),
29439
+ __metadata("design:paramtypes", [MJArchiveConfiguration_, Object, PubSubEngine]),
29440
+ __metadata("design:returntype", Promise)
29441
+ ], MJArchiveConfigurationResolver.prototype, "MJArchiveConfigurationEntities_ArchiveConfigurationIDArray", null);
29442
+ __decorate([
29443
+ FieldResolver(() => [MJArchiveRun_]),
29444
+ __param(0, Root()),
29445
+ __param(1, Ctx()),
29446
+ __param(2, PubSub()),
29447
+ __metadata("design:type", Function),
29448
+ __metadata("design:paramtypes", [MJArchiveConfiguration_, Object, PubSubEngine]),
29449
+ __metadata("design:returntype", Promise)
29450
+ ], MJArchiveConfigurationResolver.prototype, "MJArchiveRuns_ArchiveConfigurationIDArray", null);
29451
+ __decorate([
29452
+ Mutation(() => MJArchiveConfiguration_),
29453
+ __param(0, Arg('input', () => CreateMJArchiveConfigurationInput)),
29454
+ __param(1, Ctx()),
29455
+ __param(2, PubSub()),
29456
+ __metadata("design:type", Function),
29457
+ __metadata("design:paramtypes", [CreateMJArchiveConfigurationInput, Object, PubSubEngine]),
29458
+ __metadata("design:returntype", Promise)
29459
+ ], MJArchiveConfigurationResolver.prototype, "CreateMJArchiveConfiguration", null);
29460
+ __decorate([
29461
+ Mutation(() => MJArchiveConfiguration_),
29462
+ __param(0, Arg('input', () => UpdateMJArchiveConfigurationInput)),
29463
+ __param(1, Ctx()),
29464
+ __param(2, PubSub()),
29465
+ __metadata("design:type", Function),
29466
+ __metadata("design:paramtypes", [UpdateMJArchiveConfigurationInput, Object, PubSubEngine]),
29467
+ __metadata("design:returntype", Promise)
29468
+ ], MJArchiveConfigurationResolver.prototype, "UpdateMJArchiveConfiguration", null);
29469
+ __decorate([
29470
+ Mutation(() => MJArchiveConfiguration_),
29471
+ __param(0, Arg('ID', () => String)),
29472
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
29473
+ __param(2, Ctx()),
29474
+ __param(3, PubSub()),
29475
+ __metadata("design:type", Function),
29476
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
29477
+ __metadata("design:returntype", Promise)
29478
+ ], MJArchiveConfigurationResolver.prototype, "DeleteMJArchiveConfiguration", null);
29479
+ MJArchiveConfigurationResolver = __decorate([
29480
+ Resolver(MJArchiveConfiguration_)
29481
+ ], MJArchiveConfigurationResolver);
29482
+ export { MJArchiveConfigurationResolver };
29483
+ //****************************************************************************
29484
+ // ENTITY CLASS for MJ: Archive Run Details
29485
+ //****************************************************************************
29486
+ let MJArchiveRunDetail_ = class MJArchiveRunDetail_ {
29487
+ };
29488
+ __decorate([
29489
+ Field(),
29490
+ MaxLength(36),
29491
+ __metadata("design:type", String)
29492
+ ], MJArchiveRunDetail_.prototype, "ID", void 0);
29493
+ __decorate([
29494
+ Field({ description: `Foreign key to the parent ArchiveRun.` }),
29495
+ MaxLength(36),
29496
+ __metadata("design:type", String)
29497
+ ], MJArchiveRunDetail_.prototype, "ArchiveRunID", void 0);
29498
+ __decorate([
29499
+ Field({ description: `Foreign key to the Entity this record belongs to.` }),
29500
+ MaxLength(36),
29501
+ __metadata("design:type", String)
29502
+ ], MJArchiveRunDetail_.prototype, "EntityID", void 0);
29503
+ __decorate([
29504
+ Field({ description: `The primary key value of the archived record (string representation to support all key types).` }),
29505
+ MaxLength(750),
29506
+ __metadata("design:type", String)
29507
+ ], MJArchiveRunDetail_.prototype, "RecordID", void 0);
29508
+ __decorate([
29509
+ Field({ description: `Outcome for this record: Success, Failed, or Skipped.` }),
29510
+ MaxLength(50),
29511
+ __metadata("design:type", String)
29512
+ ], MJArchiveRunDetail_.prototype, "Status", void 0);
29513
+ __decorate([
29514
+ Field({ nullable: true, description: `Full path to the archived file in storage (e.g., "archives/production/Users/2026/04/record-id.json").` }),
29515
+ MaxLength(1000),
29516
+ __metadata("design:type", String)
29517
+ ], MJArchiveRunDetail_.prototype, "StoragePath", void 0);
29518
+ __decorate([
29519
+ Field(() => Int, { description: `Number of bytes written to storage for this record.` }),
29520
+ __metadata("design:type", Number)
29521
+ ], MJArchiveRunDetail_.prototype, "BytesArchived", void 0);
29522
+ __decorate([
29523
+ Field({ nullable: true, description: `Error details when Status is Failed.` }),
29524
+ __metadata("design:type", String)
29525
+ ], MJArchiveRunDetail_.prototype, "ErrorMessage", void 0);
29526
+ __decorate([
29527
+ Field({ nullable: true, description: `Timestamp when this record was successfully archived.` }),
29528
+ __metadata("design:type", Date)
29529
+ ], MJArchiveRunDetail_.prototype, "ArchivedAt", void 0);
29530
+ __decorate([
29531
+ Field({ nullable: true, description: `The __mj_UpdatedAt timestamp of the record at the time of archiving, used for conflict detection during restore.` }),
29532
+ __metadata("design:type", Date)
29533
+ ], MJArchiveRunDetail_.prototype, "VersionStamp", void 0);
29534
+ __decorate([
29535
+ Field(() => Boolean, { description: `When true, this detail row represents an archived Record Change entry rather than a primary entity record.` }),
29536
+ __metadata("design:type", Boolean)
29537
+ ], MJArchiveRunDetail_.prototype, "IsRecordChangeArchive", void 0);
29538
+ __decorate([
29539
+ Field(),
29540
+ __metadata("design:type", Date)
29541
+ ], MJArchiveRunDetail_.prototype, "_mj__CreatedAt", void 0);
29542
+ __decorate([
29543
+ Field(),
29544
+ __metadata("design:type", Date)
29545
+ ], MJArchiveRunDetail_.prototype, "_mj__UpdatedAt", void 0);
29546
+ __decorate([
29547
+ Field(),
29548
+ MaxLength(255),
29549
+ __metadata("design:type", String)
29550
+ ], MJArchiveRunDetail_.prototype, "Entity", void 0);
29551
+ MJArchiveRunDetail_ = __decorate([
29552
+ ObjectType({ description: `Per-record detail for each archive run. Tracks the outcome, storage location, and error information for each individual record processed.` })
29553
+ ], MJArchiveRunDetail_);
29554
+ export { MJArchiveRunDetail_ };
29555
+ //****************************************************************************
29556
+ // INPUT TYPE for MJ: Archive Run Details
29557
+ //****************************************************************************
29558
+ let CreateMJArchiveRunDetailInput = class CreateMJArchiveRunDetailInput {
29559
+ };
29560
+ __decorate([
29561
+ Field({ nullable: true }),
29562
+ __metadata("design:type", String)
29563
+ ], CreateMJArchiveRunDetailInput.prototype, "ID", void 0);
29564
+ __decorate([
29565
+ Field({ nullable: true }),
29566
+ __metadata("design:type", String)
29567
+ ], CreateMJArchiveRunDetailInput.prototype, "ArchiveRunID", void 0);
29568
+ __decorate([
29569
+ Field({ nullable: true }),
29570
+ __metadata("design:type", String)
29571
+ ], CreateMJArchiveRunDetailInput.prototype, "EntityID", void 0);
29572
+ __decorate([
29573
+ Field({ nullable: true }),
29574
+ __metadata("design:type", String)
29575
+ ], CreateMJArchiveRunDetailInput.prototype, "RecordID", void 0);
29576
+ __decorate([
29577
+ Field({ nullable: true }),
29578
+ __metadata("design:type", String)
29579
+ ], CreateMJArchiveRunDetailInput.prototype, "Status", void 0);
29580
+ __decorate([
29581
+ Field({ nullable: true }),
29582
+ __metadata("design:type", String)
29583
+ ], CreateMJArchiveRunDetailInput.prototype, "StoragePath", void 0);
29584
+ __decorate([
29585
+ Field(() => Int, { nullable: true }),
29586
+ __metadata("design:type", Number)
29587
+ ], CreateMJArchiveRunDetailInput.prototype, "BytesArchived", void 0);
29588
+ __decorate([
29589
+ Field({ nullable: true }),
29590
+ __metadata("design:type", String)
29591
+ ], CreateMJArchiveRunDetailInput.prototype, "ErrorMessage", void 0);
29592
+ __decorate([
29593
+ Field({ nullable: true }),
29594
+ __metadata("design:type", Date)
29595
+ ], CreateMJArchiveRunDetailInput.prototype, "ArchivedAt", void 0);
29596
+ __decorate([
29597
+ Field({ nullable: true }),
29598
+ __metadata("design:type", Date)
29599
+ ], CreateMJArchiveRunDetailInput.prototype, "VersionStamp", void 0);
29600
+ __decorate([
29601
+ Field(() => Boolean, { nullable: true }),
29602
+ __metadata("design:type", Boolean)
29603
+ ], CreateMJArchiveRunDetailInput.prototype, "IsRecordChangeArchive", void 0);
29604
+ __decorate([
29605
+ Field(() => RestoreContextInput, { nullable: true }),
29606
+ __metadata("design:type", RestoreContextInput)
29607
+ ], CreateMJArchiveRunDetailInput.prototype, "RestoreContext___", void 0);
29608
+ CreateMJArchiveRunDetailInput = __decorate([
29609
+ InputType()
29610
+ ], CreateMJArchiveRunDetailInput);
29611
+ export { CreateMJArchiveRunDetailInput };
29612
+ //****************************************************************************
29613
+ // INPUT TYPE for MJ: Archive Run Details
29614
+ //****************************************************************************
29615
+ let UpdateMJArchiveRunDetailInput = class UpdateMJArchiveRunDetailInput {
29616
+ };
29617
+ __decorate([
29618
+ Field(),
29619
+ __metadata("design:type", String)
29620
+ ], UpdateMJArchiveRunDetailInput.prototype, "ID", void 0);
29621
+ __decorate([
29622
+ Field({ nullable: true }),
29623
+ __metadata("design:type", String)
29624
+ ], UpdateMJArchiveRunDetailInput.prototype, "ArchiveRunID", void 0);
29625
+ __decorate([
29626
+ Field({ nullable: true }),
29627
+ __metadata("design:type", String)
29628
+ ], UpdateMJArchiveRunDetailInput.prototype, "EntityID", void 0);
29629
+ __decorate([
29630
+ Field({ nullable: true }),
29631
+ __metadata("design:type", String)
29632
+ ], UpdateMJArchiveRunDetailInput.prototype, "RecordID", void 0);
29633
+ __decorate([
29634
+ Field({ nullable: true }),
29635
+ __metadata("design:type", String)
29636
+ ], UpdateMJArchiveRunDetailInput.prototype, "Status", void 0);
29637
+ __decorate([
29638
+ Field({ nullable: true }),
29639
+ __metadata("design:type", String)
29640
+ ], UpdateMJArchiveRunDetailInput.prototype, "StoragePath", void 0);
29641
+ __decorate([
29642
+ Field(() => Int, { nullable: true }),
29643
+ __metadata("design:type", Number)
29644
+ ], UpdateMJArchiveRunDetailInput.prototype, "BytesArchived", void 0);
29645
+ __decorate([
29646
+ Field({ nullable: true }),
29647
+ __metadata("design:type", String)
29648
+ ], UpdateMJArchiveRunDetailInput.prototype, "ErrorMessage", void 0);
29649
+ __decorate([
29650
+ Field({ nullable: true }),
29651
+ __metadata("design:type", Date)
29652
+ ], UpdateMJArchiveRunDetailInput.prototype, "ArchivedAt", void 0);
29653
+ __decorate([
29654
+ Field({ nullable: true }),
29655
+ __metadata("design:type", Date)
29656
+ ], UpdateMJArchiveRunDetailInput.prototype, "VersionStamp", void 0);
29657
+ __decorate([
29658
+ Field(() => Boolean, { nullable: true }),
29659
+ __metadata("design:type", Boolean)
29660
+ ], UpdateMJArchiveRunDetailInput.prototype, "IsRecordChangeArchive", void 0);
29661
+ __decorate([
29662
+ Field(() => [KeyValuePairInput], { nullable: true }),
29663
+ __metadata("design:type", Array)
29664
+ ], UpdateMJArchiveRunDetailInput.prototype, "OldValues___", void 0);
29665
+ __decorate([
29666
+ Field(() => RestoreContextInput, { nullable: true }),
29667
+ __metadata("design:type", RestoreContextInput)
29668
+ ], UpdateMJArchiveRunDetailInput.prototype, "RestoreContext___", void 0);
29669
+ UpdateMJArchiveRunDetailInput = __decorate([
29670
+ InputType()
29671
+ ], UpdateMJArchiveRunDetailInput);
29672
+ export { UpdateMJArchiveRunDetailInput };
29673
+ //****************************************************************************
29674
+ // RESOLVER for MJ: Archive Run Details
29675
+ //****************************************************************************
29676
+ let RunMJArchiveRunDetailViewResult = class RunMJArchiveRunDetailViewResult {
29677
+ };
29678
+ __decorate([
29679
+ Field(() => [MJArchiveRunDetail_]),
29680
+ __metadata("design:type", Array)
29681
+ ], RunMJArchiveRunDetailViewResult.prototype, "Results", void 0);
29682
+ __decorate([
29683
+ Field(() => String, { nullable: true }),
29684
+ __metadata("design:type", String)
29685
+ ], RunMJArchiveRunDetailViewResult.prototype, "UserViewRunID", void 0);
29686
+ __decorate([
29687
+ Field(() => Int, { nullable: true }),
29688
+ __metadata("design:type", Number)
29689
+ ], RunMJArchiveRunDetailViewResult.prototype, "RowCount", void 0);
29690
+ __decorate([
29691
+ Field(() => Int, { nullable: true }),
29692
+ __metadata("design:type", Number)
29693
+ ], RunMJArchiveRunDetailViewResult.prototype, "TotalRowCount", void 0);
29694
+ __decorate([
29695
+ Field(() => Int, { nullable: true }),
29696
+ __metadata("design:type", Number)
29697
+ ], RunMJArchiveRunDetailViewResult.prototype, "ExecutionTime", void 0);
29698
+ __decorate([
29699
+ Field({ nullable: true }),
29700
+ __metadata("design:type", String)
29701
+ ], RunMJArchiveRunDetailViewResult.prototype, "ErrorMessage", void 0);
29702
+ __decorate([
29703
+ Field(() => Boolean, { nullable: false }),
29704
+ __metadata("design:type", Boolean)
29705
+ ], RunMJArchiveRunDetailViewResult.prototype, "Success", void 0);
29706
+ RunMJArchiveRunDetailViewResult = __decorate([
29707
+ ObjectType()
29708
+ ], RunMJArchiveRunDetailViewResult);
29709
+ export { RunMJArchiveRunDetailViewResult };
29710
+ let MJArchiveRunDetailResolver = class MJArchiveRunDetailResolver extends ResolverBase {
29711
+ async RunMJArchiveRunDetailViewByID(input, { providers, userPayload }, pubSub) {
29712
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29713
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
29714
+ }
29715
+ async RunMJArchiveRunDetailViewByName(input, { providers, userPayload }, pubSub) {
29716
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29717
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
29718
+ }
29719
+ async RunMJArchiveRunDetailDynamicView(input, { providers, userPayload }, pubSub) {
29720
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29721
+ input.EntityName = 'MJ: Archive Run Details';
29722
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
29723
+ }
29724
+ async MJArchiveRunDetail(ID, { userPayload, providers }, pubSub) {
29725
+ this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
29726
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
29727
+ 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');
29728
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
29729
+ const result = await this.MapFieldNamesToCodeNames('MJ: Archive Run Details', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
29730
+ return result;
29731
+ }
29732
+ async CreateMJArchiveRunDetail(input, { providers, userPayload }, pubSub) {
29733
+ const provider = GetReadWriteProvider(providers);
29734
+ return this.CreateRecord('MJ: Archive Run Details', input, provider, userPayload, pubSub);
29735
+ }
29736
+ async UpdateMJArchiveRunDetail(input, { providers, userPayload }, pubSub) {
29737
+ const provider = GetReadWriteProvider(providers);
29738
+ return this.UpdateRecord('MJ: Archive Run Details', input, provider, userPayload, pubSub);
29739
+ }
29740
+ async DeleteMJArchiveRunDetail(ID, options, { providers, userPayload }, pubSub) {
29741
+ const provider = GetReadWriteProvider(providers);
29742
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
29743
+ return this.DeleteRecord('MJ: Archive Run Details', key, options, provider, userPayload, pubSub);
29744
+ }
29745
+ };
29746
+ __decorate([
29747
+ Query(() => RunMJArchiveRunDetailViewResult),
29748
+ __param(0, Arg('input', () => RunViewByIDInput)),
29749
+ __param(1, Ctx()),
29750
+ __param(2, PubSub()),
29751
+ __metadata("design:type", Function),
29752
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
29753
+ __metadata("design:returntype", Promise)
29754
+ ], MJArchiveRunDetailResolver.prototype, "RunMJArchiveRunDetailViewByID", null);
29755
+ __decorate([
29756
+ Query(() => RunMJArchiveRunDetailViewResult),
29757
+ __param(0, Arg('input', () => RunViewByNameInput)),
29758
+ __param(1, Ctx()),
29759
+ __param(2, PubSub()),
29760
+ __metadata("design:type", Function),
29761
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
29762
+ __metadata("design:returntype", Promise)
29763
+ ], MJArchiveRunDetailResolver.prototype, "RunMJArchiveRunDetailViewByName", null);
29764
+ __decorate([
29765
+ Query(() => RunMJArchiveRunDetailViewResult),
29766
+ __param(0, Arg('input', () => RunDynamicViewInput)),
29767
+ __param(1, Ctx()),
29768
+ __param(2, PubSub()),
29769
+ __metadata("design:type", Function),
29770
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
29771
+ __metadata("design:returntype", Promise)
29772
+ ], MJArchiveRunDetailResolver.prototype, "RunMJArchiveRunDetailDynamicView", null);
29773
+ __decorate([
29774
+ Query(() => MJArchiveRunDetail_, { nullable: true }),
29775
+ __param(0, Arg('ID', () => String)),
29776
+ __param(1, Ctx()),
29777
+ __param(2, PubSub()),
29778
+ __metadata("design:type", Function),
29779
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
29780
+ __metadata("design:returntype", Promise)
29781
+ ], MJArchiveRunDetailResolver.prototype, "MJArchiveRunDetail", null);
29782
+ __decorate([
29783
+ Mutation(() => MJArchiveRunDetail_),
29784
+ __param(0, Arg('input', () => CreateMJArchiveRunDetailInput)),
29785
+ __param(1, Ctx()),
29786
+ __param(2, PubSub()),
29787
+ __metadata("design:type", Function),
29788
+ __metadata("design:paramtypes", [CreateMJArchiveRunDetailInput, Object, PubSubEngine]),
29789
+ __metadata("design:returntype", Promise)
29790
+ ], MJArchiveRunDetailResolver.prototype, "CreateMJArchiveRunDetail", null);
29791
+ __decorate([
29792
+ Mutation(() => MJArchiveRunDetail_),
29793
+ __param(0, Arg('input', () => UpdateMJArchiveRunDetailInput)),
29794
+ __param(1, Ctx()),
29795
+ __param(2, PubSub()),
29796
+ __metadata("design:type", Function),
29797
+ __metadata("design:paramtypes", [UpdateMJArchiveRunDetailInput, Object, PubSubEngine]),
29798
+ __metadata("design:returntype", Promise)
29799
+ ], MJArchiveRunDetailResolver.prototype, "UpdateMJArchiveRunDetail", null);
29800
+ __decorate([
29801
+ Mutation(() => MJArchiveRunDetail_),
29802
+ __param(0, Arg('ID', () => String)),
29803
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
29804
+ __param(2, Ctx()),
29805
+ __param(3, PubSub()),
29806
+ __metadata("design:type", Function),
29807
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
29808
+ __metadata("design:returntype", Promise)
29809
+ ], MJArchiveRunDetailResolver.prototype, "DeleteMJArchiveRunDetail", null);
29810
+ MJArchiveRunDetailResolver = __decorate([
29811
+ Resolver(MJArchiveRunDetail_)
29812
+ ], MJArchiveRunDetailResolver);
29813
+ export { MJArchiveRunDetailResolver };
29814
+ //****************************************************************************
29815
+ // ENTITY CLASS for MJ: Archive Runs
29816
+ //****************************************************************************
29817
+ let MJArchiveRun_ = class MJArchiveRun_ {
29818
+ };
29819
+ __decorate([
29820
+ Field(),
29821
+ MaxLength(36),
29822
+ __metadata("design:type", String)
29823
+ ], MJArchiveRun_.prototype, "ID", void 0);
29824
+ __decorate([
29825
+ Field({ description: `Foreign key to the ArchiveConfiguration that was executed.` }),
29826
+ MaxLength(36),
29827
+ __metadata("design:type", String)
29828
+ ], MJArchiveRun_.prototype, "ArchiveConfigurationID", void 0);
29829
+ __decorate([
29830
+ Field({ description: `Timestamp when the archive run started.` }),
29831
+ __metadata("design:type", Date)
29832
+ ], MJArchiveRun_.prototype, "StartedAt", void 0);
29833
+ __decorate([
29834
+ Field({ nullable: true, description: `Timestamp when the archive run completed (NULL while still running).` }),
29835
+ __metadata("design:type", Date)
29836
+ ], MJArchiveRun_.prototype, "CompletedAt", void 0);
29837
+ __decorate([
29838
+ Field({ description: `Current status: Running, Complete, Failed, Cancelled, or PartialSuccess.` }),
29839
+ MaxLength(50),
29840
+ __metadata("design:type", String)
29841
+ ], MJArchiveRun_.prototype, "Status", void 0);
29842
+ __decorate([
29843
+ Field(() => Int, { description: `Total number of records identified for archiving in this run.` }),
29844
+ __metadata("design:type", Number)
29845
+ ], MJArchiveRun_.prototype, "TotalRecords", void 0);
29846
+ __decorate([
29847
+ Field(() => Int, { description: `Number of records successfully archived.` }),
29848
+ __metadata("design:type", Number)
29849
+ ], MJArchiveRun_.prototype, "ArchivedRecords", void 0);
29850
+ __decorate([
29851
+ Field(() => Int, { description: `Number of records that failed to archive.` }),
29852
+ __metadata("design:type", Number)
29853
+ ], MJArchiveRun_.prototype, "FailedRecords", void 0);
29854
+ __decorate([
29855
+ Field(() => Int, { description: `Number of records skipped (e.g., already archived or filtered out).` }),
29856
+ __metadata("design:type", Number)
29857
+ ], MJArchiveRun_.prototype, "SkippedRecords", void 0);
29858
+ __decorate([
29859
+ Field(() => Int, { description: `Total bytes written to archive storage during this run.` }),
29860
+ __metadata("design:type", Number)
29861
+ ], MJArchiveRun_.prototype, "TotalBytesArchived", void 0);
29862
+ __decorate([
29863
+ Field({ nullable: true, description: `Aggregated error log for the run. Contains error details when Status is Failed or PartialSuccess.` }),
29864
+ __metadata("design:type", String)
29865
+ ], MJArchiveRun_.prototype, "ErrorLog", void 0);
29866
+ __decorate([
29867
+ Field({ description: `The user who initiated this archive run.` }),
29868
+ MaxLength(36),
29869
+ __metadata("design:type", String)
29870
+ ], MJArchiveRun_.prototype, "UserID", void 0);
29871
+ __decorate([
29872
+ Field(),
29873
+ __metadata("design:type", Date)
29874
+ ], MJArchiveRun_.prototype, "_mj__CreatedAt", void 0);
29875
+ __decorate([
29876
+ Field(),
29877
+ __metadata("design:type", Date)
29878
+ ], MJArchiveRun_.prototype, "_mj__UpdatedAt", void 0);
29879
+ __decorate([
29880
+ Field(),
29881
+ MaxLength(255),
29882
+ __metadata("design:type", String)
29883
+ ], MJArchiveRun_.prototype, "ArchiveConfiguration", void 0);
29884
+ __decorate([
29885
+ Field(),
29886
+ MaxLength(100),
29887
+ __metadata("design:type", String)
29888
+ ], MJArchiveRun_.prototype, "User", void 0);
29889
+ __decorate([
29890
+ Field(() => [MJArchiveRunDetail_]),
29891
+ __metadata("design:type", Array)
29892
+ ], MJArchiveRun_.prototype, "MJArchiveRunDetails_ArchiveRunIDArray", void 0);
29893
+ MJArchiveRun_ = __decorate([
29894
+ ObjectType({ description: `Tracks each execution of an archive configuration, including timing, aggregate statistics, and overall status.` })
29895
+ ], MJArchiveRun_);
29896
+ export { MJArchiveRun_ };
29897
+ //****************************************************************************
29898
+ // INPUT TYPE for MJ: Archive Runs
29899
+ //****************************************************************************
29900
+ let CreateMJArchiveRunInput = class CreateMJArchiveRunInput {
29901
+ };
29902
+ __decorate([
29903
+ Field({ nullable: true }),
29904
+ __metadata("design:type", String)
29905
+ ], CreateMJArchiveRunInput.prototype, "ID", void 0);
29906
+ __decorate([
29907
+ Field({ nullable: true }),
29908
+ __metadata("design:type", String)
29909
+ ], CreateMJArchiveRunInput.prototype, "ArchiveConfigurationID", void 0);
29910
+ __decorate([
29911
+ Field({ nullable: true }),
29912
+ __metadata("design:type", Date)
29913
+ ], CreateMJArchiveRunInput.prototype, "StartedAt", void 0);
29914
+ __decorate([
29915
+ Field({ nullable: true }),
29916
+ __metadata("design:type", Date)
29917
+ ], CreateMJArchiveRunInput.prototype, "CompletedAt", void 0);
29918
+ __decorate([
29919
+ Field({ nullable: true }),
29920
+ __metadata("design:type", String)
29921
+ ], CreateMJArchiveRunInput.prototype, "Status", void 0);
29922
+ __decorate([
29923
+ Field(() => Int, { nullable: true }),
29924
+ __metadata("design:type", Number)
29925
+ ], CreateMJArchiveRunInput.prototype, "TotalRecords", void 0);
29926
+ __decorate([
29927
+ Field(() => Int, { nullable: true }),
29928
+ __metadata("design:type", Number)
29929
+ ], CreateMJArchiveRunInput.prototype, "ArchivedRecords", void 0);
29930
+ __decorate([
29931
+ Field(() => Int, { nullable: true }),
29932
+ __metadata("design:type", Number)
29933
+ ], CreateMJArchiveRunInput.prototype, "FailedRecords", void 0);
29934
+ __decorate([
29935
+ Field(() => Int, { nullable: true }),
29936
+ __metadata("design:type", Number)
29937
+ ], CreateMJArchiveRunInput.prototype, "SkippedRecords", void 0);
29938
+ __decorate([
29939
+ Field(() => Int, { nullable: true }),
29940
+ __metadata("design:type", Number)
29941
+ ], CreateMJArchiveRunInput.prototype, "TotalBytesArchived", void 0);
29942
+ __decorate([
29943
+ Field({ nullable: true }),
29944
+ __metadata("design:type", String)
29945
+ ], CreateMJArchiveRunInput.prototype, "ErrorLog", void 0);
29946
+ __decorate([
29947
+ Field({ nullable: true }),
29948
+ __metadata("design:type", String)
29949
+ ], CreateMJArchiveRunInput.prototype, "UserID", void 0);
29950
+ __decorate([
29951
+ Field(() => RestoreContextInput, { nullable: true }),
29952
+ __metadata("design:type", RestoreContextInput)
29953
+ ], CreateMJArchiveRunInput.prototype, "RestoreContext___", void 0);
29954
+ CreateMJArchiveRunInput = __decorate([
29955
+ InputType()
29956
+ ], CreateMJArchiveRunInput);
29957
+ export { CreateMJArchiveRunInput };
29958
+ //****************************************************************************
29959
+ // INPUT TYPE for MJ: Archive Runs
29960
+ //****************************************************************************
29961
+ let UpdateMJArchiveRunInput = class UpdateMJArchiveRunInput {
29962
+ };
29963
+ __decorate([
29964
+ Field(),
29965
+ __metadata("design:type", String)
29966
+ ], UpdateMJArchiveRunInput.prototype, "ID", void 0);
29967
+ __decorate([
29968
+ Field({ nullable: true }),
29969
+ __metadata("design:type", String)
29970
+ ], UpdateMJArchiveRunInput.prototype, "ArchiveConfigurationID", void 0);
29971
+ __decorate([
29972
+ Field({ nullable: true }),
29973
+ __metadata("design:type", Date)
29974
+ ], UpdateMJArchiveRunInput.prototype, "StartedAt", void 0);
29975
+ __decorate([
29976
+ Field({ nullable: true }),
29977
+ __metadata("design:type", Date)
29978
+ ], UpdateMJArchiveRunInput.prototype, "CompletedAt", void 0);
29979
+ __decorate([
29980
+ Field({ nullable: true }),
29981
+ __metadata("design:type", String)
29982
+ ], UpdateMJArchiveRunInput.prototype, "Status", void 0);
29983
+ __decorate([
29984
+ Field(() => Int, { nullable: true }),
29985
+ __metadata("design:type", Number)
29986
+ ], UpdateMJArchiveRunInput.prototype, "TotalRecords", void 0);
29987
+ __decorate([
29988
+ Field(() => Int, { nullable: true }),
29989
+ __metadata("design:type", Number)
29990
+ ], UpdateMJArchiveRunInput.prototype, "ArchivedRecords", void 0);
29991
+ __decorate([
29992
+ Field(() => Int, { nullable: true }),
29993
+ __metadata("design:type", Number)
29994
+ ], UpdateMJArchiveRunInput.prototype, "FailedRecords", void 0);
29995
+ __decorate([
29996
+ Field(() => Int, { nullable: true }),
29997
+ __metadata("design:type", Number)
29998
+ ], UpdateMJArchiveRunInput.prototype, "SkippedRecords", void 0);
29999
+ __decorate([
30000
+ Field(() => Int, { nullable: true }),
30001
+ __metadata("design:type", Number)
30002
+ ], UpdateMJArchiveRunInput.prototype, "TotalBytesArchived", void 0);
30003
+ __decorate([
30004
+ Field({ nullable: true }),
30005
+ __metadata("design:type", String)
30006
+ ], UpdateMJArchiveRunInput.prototype, "ErrorLog", void 0);
30007
+ __decorate([
30008
+ Field({ nullable: true }),
30009
+ __metadata("design:type", String)
30010
+ ], UpdateMJArchiveRunInput.prototype, "UserID", void 0);
30011
+ __decorate([
30012
+ Field(() => [KeyValuePairInput], { nullable: true }),
30013
+ __metadata("design:type", Array)
30014
+ ], UpdateMJArchiveRunInput.prototype, "OldValues___", void 0);
30015
+ __decorate([
30016
+ Field(() => RestoreContextInput, { nullable: true }),
30017
+ __metadata("design:type", RestoreContextInput)
30018
+ ], UpdateMJArchiveRunInput.prototype, "RestoreContext___", void 0);
30019
+ UpdateMJArchiveRunInput = __decorate([
30020
+ InputType()
30021
+ ], UpdateMJArchiveRunInput);
30022
+ export { UpdateMJArchiveRunInput };
30023
+ //****************************************************************************
30024
+ // RESOLVER for MJ: Archive Runs
30025
+ //****************************************************************************
30026
+ let RunMJArchiveRunViewResult = class RunMJArchiveRunViewResult {
30027
+ };
30028
+ __decorate([
30029
+ Field(() => [MJArchiveRun_]),
30030
+ __metadata("design:type", Array)
30031
+ ], RunMJArchiveRunViewResult.prototype, "Results", void 0);
30032
+ __decorate([
30033
+ Field(() => String, { nullable: true }),
30034
+ __metadata("design:type", String)
30035
+ ], RunMJArchiveRunViewResult.prototype, "UserViewRunID", void 0);
30036
+ __decorate([
30037
+ Field(() => Int, { nullable: true }),
30038
+ __metadata("design:type", Number)
30039
+ ], RunMJArchiveRunViewResult.prototype, "RowCount", void 0);
30040
+ __decorate([
30041
+ Field(() => Int, { nullable: true }),
30042
+ __metadata("design:type", Number)
30043
+ ], RunMJArchiveRunViewResult.prototype, "TotalRowCount", void 0);
30044
+ __decorate([
30045
+ Field(() => Int, { nullable: true }),
30046
+ __metadata("design:type", Number)
30047
+ ], RunMJArchiveRunViewResult.prototype, "ExecutionTime", void 0);
30048
+ __decorate([
30049
+ Field({ nullable: true }),
30050
+ __metadata("design:type", String)
30051
+ ], RunMJArchiveRunViewResult.prototype, "ErrorMessage", void 0);
30052
+ __decorate([
30053
+ Field(() => Boolean, { nullable: false }),
30054
+ __metadata("design:type", Boolean)
30055
+ ], RunMJArchiveRunViewResult.prototype, "Success", void 0);
30056
+ RunMJArchiveRunViewResult = __decorate([
30057
+ ObjectType()
30058
+ ], RunMJArchiveRunViewResult);
30059
+ export { RunMJArchiveRunViewResult };
30060
+ let MJArchiveRunResolver = class MJArchiveRunResolver extends ResolverBase {
30061
+ async RunMJArchiveRunViewByID(input, { providers, userPayload }, pubSub) {
30062
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
30063
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
30064
+ }
30065
+ async RunMJArchiveRunViewByName(input, { providers, userPayload }, pubSub) {
30066
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
30067
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
30068
+ }
30069
+ async RunMJArchiveRunDynamicView(input, { providers, userPayload }, pubSub) {
30070
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
30071
+ input.EntityName = 'MJ: Archive Runs';
30072
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
30073
+ }
30074
+ async MJArchiveRun(ID, { userPayload, providers }, pubSub) {
30075
+ this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
30076
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
30077
+ 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');
30078
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
30079
+ const result = await this.MapFieldNamesToCodeNames('MJ: Archive Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
30080
+ return result;
30081
+ }
30082
+ async MJArchiveRunDetails_ArchiveRunIDArray(mjarchiverun_, { userPayload, providers }, pubSub) {
30083
+ this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
30084
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
30085
+ 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');
30086
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
30087
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Run Details', rows, this.GetUserFromPayload(userPayload));
30088
+ return result;
30089
+ }
30090
+ async CreateMJArchiveRun(input, { providers, userPayload }, pubSub) {
30091
+ const provider = GetReadWriteProvider(providers);
30092
+ return this.CreateRecord('MJ: Archive Runs', input, provider, userPayload, pubSub);
30093
+ }
30094
+ async UpdateMJArchiveRun(input, { providers, userPayload }, pubSub) {
30095
+ const provider = GetReadWriteProvider(providers);
30096
+ return this.UpdateRecord('MJ: Archive Runs', input, provider, userPayload, pubSub);
30097
+ }
30098
+ async DeleteMJArchiveRun(ID, options, { providers, userPayload }, pubSub) {
30099
+ const provider = GetReadWriteProvider(providers);
30100
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
30101
+ return this.DeleteRecord('MJ: Archive Runs', key, options, provider, userPayload, pubSub);
30102
+ }
30103
+ };
30104
+ __decorate([
30105
+ Query(() => RunMJArchiveRunViewResult),
30106
+ __param(0, Arg('input', () => RunViewByIDInput)),
30107
+ __param(1, Ctx()),
30108
+ __param(2, PubSub()),
30109
+ __metadata("design:type", Function),
30110
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
30111
+ __metadata("design:returntype", Promise)
30112
+ ], MJArchiveRunResolver.prototype, "RunMJArchiveRunViewByID", null);
30113
+ __decorate([
30114
+ Query(() => RunMJArchiveRunViewResult),
30115
+ __param(0, Arg('input', () => RunViewByNameInput)),
30116
+ __param(1, Ctx()),
30117
+ __param(2, PubSub()),
30118
+ __metadata("design:type", Function),
30119
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
30120
+ __metadata("design:returntype", Promise)
30121
+ ], MJArchiveRunResolver.prototype, "RunMJArchiveRunViewByName", null);
30122
+ __decorate([
30123
+ Query(() => RunMJArchiveRunViewResult),
30124
+ __param(0, Arg('input', () => RunDynamicViewInput)),
30125
+ __param(1, Ctx()),
30126
+ __param(2, PubSub()),
30127
+ __metadata("design:type", Function),
30128
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
30129
+ __metadata("design:returntype", Promise)
30130
+ ], MJArchiveRunResolver.prototype, "RunMJArchiveRunDynamicView", null);
30131
+ __decorate([
30132
+ Query(() => MJArchiveRun_, { nullable: true }),
30133
+ __param(0, Arg('ID', () => String)),
30134
+ __param(1, Ctx()),
30135
+ __param(2, PubSub()),
30136
+ __metadata("design:type", Function),
30137
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
30138
+ __metadata("design:returntype", Promise)
30139
+ ], MJArchiveRunResolver.prototype, "MJArchiveRun", null);
30140
+ __decorate([
30141
+ FieldResolver(() => [MJArchiveRunDetail_]),
30142
+ __param(0, Root()),
30143
+ __param(1, Ctx()),
30144
+ __param(2, PubSub()),
30145
+ __metadata("design:type", Function),
30146
+ __metadata("design:paramtypes", [MJArchiveRun_, Object, PubSubEngine]),
30147
+ __metadata("design:returntype", Promise)
30148
+ ], MJArchiveRunResolver.prototype, "MJArchiveRunDetails_ArchiveRunIDArray", null);
30149
+ __decorate([
30150
+ Mutation(() => MJArchiveRun_),
30151
+ __param(0, Arg('input', () => CreateMJArchiveRunInput)),
30152
+ __param(1, Ctx()),
30153
+ __param(2, PubSub()),
30154
+ __metadata("design:type", Function),
30155
+ __metadata("design:paramtypes", [CreateMJArchiveRunInput, Object, PubSubEngine]),
30156
+ __metadata("design:returntype", Promise)
30157
+ ], MJArchiveRunResolver.prototype, "CreateMJArchiveRun", null);
30158
+ __decorate([
30159
+ Mutation(() => MJArchiveRun_),
30160
+ __param(0, Arg('input', () => UpdateMJArchiveRunInput)),
30161
+ __param(1, Ctx()),
30162
+ __param(2, PubSub()),
30163
+ __metadata("design:type", Function),
30164
+ __metadata("design:paramtypes", [UpdateMJArchiveRunInput, Object, PubSubEngine]),
30165
+ __metadata("design:returntype", Promise)
30166
+ ], MJArchiveRunResolver.prototype, "UpdateMJArchiveRun", null);
30167
+ __decorate([
30168
+ Mutation(() => MJArchiveRun_),
30169
+ __param(0, Arg('ID', () => String)),
30170
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
30171
+ __param(2, Ctx()),
30172
+ __param(3, PubSub()),
30173
+ __metadata("design:type", Function),
30174
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
30175
+ __metadata("design:returntype", Promise)
30176
+ ], MJArchiveRunResolver.prototype, "DeleteMJArchiveRun", null);
30177
+ MJArchiveRunResolver = __decorate([
30178
+ Resolver(MJArchiveRun_)
30179
+ ], MJArchiveRunResolver);
30180
+ export { MJArchiveRunResolver };
30181
+ //****************************************************************************
28720
30182
  // ENTITY CLASS for MJ: Artifact Permissions
28721
30183
  //****************************************************************************
28722
30184
  let MJArtifactPermission_ = class MJArtifactPermission_ {
@@ -56405,6 +57867,14 @@ __decorate([
56405
57867
  Field(() => [MJEntityField_]),
56406
57868
  __metadata("design:type", Array)
56407
57869
  ], MJEntity_.prototype, "MJEntityFields_RelatedEntityIDArray", void 0);
57870
+ __decorate([
57871
+ Field(() => [MJArchiveConfigurationEntity_]),
57872
+ __metadata("design:type", Array)
57873
+ ], MJEntity_.prototype, "MJArchiveConfigurationEntities_EntityIDArray", void 0);
57874
+ __decorate([
57875
+ Field(() => [MJArchiveRunDetail_]),
57876
+ __metadata("design:type", Array)
57877
+ ], MJEntity_.prototype, "MJArchiveRunDetails_EntityIDArray", void 0);
56408
57878
  __decorate([
56409
57879
  Field(() => [MJResourceType_]),
56410
57880
  __metadata("design:type", Array)
@@ -57418,6 +58888,22 @@ let MJEntityResolverBase = class MJEntityResolverBase extends ResolverBase {
57418
58888
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Fields', rows, this.GetUserFromPayload(userPayload));
57419
58889
  return result;
57420
58890
  }
58891
+ async MJArchiveConfigurationEntities_EntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
58892
+ this.CheckUserReadPermissions('MJ: Archive Configuration Entities', userPayload);
58893
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
58894
+ 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');
58895
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
58896
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configuration Entities', rows, this.GetUserFromPayload(userPayload));
58897
+ return result;
58898
+ }
58899
+ async MJArchiveRunDetails_EntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
58900
+ this.CheckUserReadPermissions('MJ: Archive Run Details', userPayload);
58901
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
58902
+ 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');
58903
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
58904
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Run Details', rows, this.GetUserFromPayload(userPayload));
58905
+ return result;
58906
+ }
57421
58907
  async MJResourceTypes_CategoryEntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
57422
58908
  this.CheckUserReadPermissions('MJ: Resource Types', userPayload);
57423
58909
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -57967,6 +59453,24 @@ __decorate([
57967
59453
  __metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
57968
59454
  __metadata("design:returntype", Promise)
57969
59455
  ], MJEntityResolverBase.prototype, "MJEntityFields_RelatedEntityIDArray", null);
59456
+ __decorate([
59457
+ FieldResolver(() => [MJArchiveConfigurationEntity_]),
59458
+ __param(0, Root()),
59459
+ __param(1, Ctx()),
59460
+ __param(2, PubSub()),
59461
+ __metadata("design:type", Function),
59462
+ __metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
59463
+ __metadata("design:returntype", Promise)
59464
+ ], MJEntityResolverBase.prototype, "MJArchiveConfigurationEntities_EntityIDArray", null);
59465
+ __decorate([
59466
+ FieldResolver(() => [MJArchiveRunDetail_]),
59467
+ __param(0, Root()),
59468
+ __param(1, Ctx()),
59469
+ __param(2, PubSub()),
59470
+ __metadata("design:type", Function),
59471
+ __metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
59472
+ __metadata("design:returntype", Promise)
59473
+ ], MJEntityResolverBase.prototype, "MJArchiveRunDetails_EntityIDArray", null);
57970
59474
  __decorate([
57971
59475
  FieldResolver(() => [MJResourceType_]),
57972
59476
  __param(0, Root()),
@@ -67137,6 +68641,10 @@ __decorate([
67137
68641
  Field(() => [MJAIAgentType_]),
67138
68642
  __metadata("design:type", Array)
67139
68643
  ], MJFileStorageAccount_.prototype, "MJAIAgentTypes_DefaultStorageAccountIDArray", void 0);
68644
+ __decorate([
68645
+ Field(() => [MJArchiveConfiguration_]),
68646
+ __metadata("design:type", Array)
68647
+ ], MJFileStorageAccount_.prototype, "MJArchiveConfigurations_StorageAccountIDArray", void 0);
67140
68648
  __decorate([
67141
68649
  Field(() => [MJFileStorageAccountPermission_]),
67142
68650
  __metadata("design:type", Array)
@@ -67298,6 +68806,14 @@ let MJFileStorageAccountResolver = class MJFileStorageAccountResolver extends Re
67298
68806
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', rows, this.GetUserFromPayload(userPayload));
67299
68807
  return result;
67300
68808
  }
68809
+ async MJArchiveConfigurations_StorageAccountIDArray(mjfilestorageaccount_, { userPayload, providers }, pubSub) {
68810
+ this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
68811
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
68812
+ 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');
68813
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
68814
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configurations', rows, this.GetUserFromPayload(userPayload));
68815
+ return result;
68816
+ }
67301
68817
  async MJFileStorageAccountPermissions_FileStorageAccountIDArray(mjfilestorageaccount_, { userPayload, providers }, pubSub) {
67302
68818
  this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
67303
68819
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -67381,6 +68897,15 @@ __decorate([
67381
68897
  __metadata("design:paramtypes", [MJFileStorageAccount_, Object, PubSubEngine]),
67382
68898
  __metadata("design:returntype", Promise)
67383
68899
  ], MJFileStorageAccountResolver.prototype, "MJAIAgentTypes_DefaultStorageAccountIDArray", null);
68900
+ __decorate([
68901
+ FieldResolver(() => [MJArchiveConfiguration_]),
68902
+ __param(0, Root()),
68903
+ __param(1, Ctx()),
68904
+ __param(2, PubSub()),
68905
+ __metadata("design:type", Function),
68906
+ __metadata("design:paramtypes", [MJFileStorageAccount_, Object, PubSubEngine]),
68907
+ __metadata("design:returntype", Promise)
68908
+ ], MJFileStorageAccountResolver.prototype, "MJArchiveConfigurations_StorageAccountIDArray", null);
67384
68909
  __decorate([
67385
68910
  FieldResolver(() => [MJFileStorageAccountPermission_]),
67386
68911
  __param(0, Root()),
@@ -74711,6 +76236,10 @@ __decorate([
74711
76236
  Field(() => [MJMCPServerConnectionTool_]),
74712
76237
  __metadata("design:type", Array)
74713
76238
  ], MJMCPServerTool_.prototype, "MJMCPServerConnectionTools_MCPServerToolIDArray", void 0);
76239
+ __decorate([
76240
+ Field(() => [MJMCPToolFavorite_]),
76241
+ __metadata("design:type", Array)
76242
+ ], MJMCPServerTool_.prototype, "MJMCPToolFavorites_MCPServerToolIDArray", void 0);
74714
76243
  __decorate([
74715
76244
  Field(() => [MJMCPToolExecutionLog_]),
74716
76245
  __metadata("design:type", Array)
@@ -74920,6 +76449,14 @@ let MJMCPServerToolResolver = class MJMCPServerToolResolver extends ResolverBase
74920
76449
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Server Connection Tools', rows, this.GetUserFromPayload(userPayload));
74921
76450
  return result;
74922
76451
  }
76452
+ async MJMCPToolFavorites_MCPServerToolIDArray(mjmcpservertool_, { userPayload, providers }, pubSub) {
76453
+ this.CheckUserReadPermissions('MJ: MCP Tool Favorites', userPayload);
76454
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
76455
+ 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');
76456
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
76457
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Tool Favorites', rows, this.GetUserFromPayload(userPayload));
76458
+ return result;
76459
+ }
74923
76460
  async MJMCPToolExecutionLogs_MCPServerToolIDArray(mjmcpservertool_, { userPayload, providers }, pubSub) {
74924
76461
  this.CheckUserReadPermissions('MJ: MCP Tool Execution Logs', userPayload);
74925
76462
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -74987,6 +76524,15 @@ __decorate([
74987
76524
  __metadata("design:paramtypes", [MJMCPServerTool_, Object, PubSubEngine]),
74988
76525
  __metadata("design:returntype", Promise)
74989
76526
  ], MJMCPServerToolResolver.prototype, "MJMCPServerConnectionTools_MCPServerToolIDArray", null);
76527
+ __decorate([
76528
+ FieldResolver(() => [MJMCPToolFavorite_]),
76529
+ __param(0, Root()),
76530
+ __param(1, Ctx()),
76531
+ __param(2, PubSub()),
76532
+ __metadata("design:type", Function),
76533
+ __metadata("design:paramtypes", [MJMCPServerTool_, Object, PubSubEngine]),
76534
+ __metadata("design:returntype", Promise)
76535
+ ], MJMCPServerToolResolver.prototype, "MJMCPToolFavorites_MCPServerToolIDArray", null);
74990
76536
  __decorate([
74991
76537
  FieldResolver(() => [MJMCPToolExecutionLog_]),
74992
76538
  __param(0, Root()),
@@ -75938,6 +77484,235 @@ MJMCPToolExecutionLogResolver = __decorate([
75938
77484
  ], MJMCPToolExecutionLogResolver);
75939
77485
  export { MJMCPToolExecutionLogResolver };
75940
77486
  //****************************************************************************
77487
+ // ENTITY CLASS for MJ: MCP Tool Favorites
77488
+ //****************************************************************************
77489
+ let MJMCPToolFavorite_ = class MJMCPToolFavorite_ {
77490
+ };
77491
+ __decorate([
77492
+ Field(),
77493
+ MaxLength(36),
77494
+ __metadata("design:type", String)
77495
+ ], MJMCPToolFavorite_.prototype, "ID", void 0);
77496
+ __decorate([
77497
+ Field(),
77498
+ MaxLength(36),
77499
+ __metadata("design:type", String)
77500
+ ], MJMCPToolFavorite_.prototype, "UserID", void 0);
77501
+ __decorate([
77502
+ Field(),
77503
+ MaxLength(36),
77504
+ __metadata("design:type", String)
77505
+ ], MJMCPToolFavorite_.prototype, "MCPServerToolID", void 0);
77506
+ __decorate([
77507
+ Field(),
77508
+ __metadata("design:type", Date)
77509
+ ], MJMCPToolFavorite_.prototype, "_mj__CreatedAt", void 0);
77510
+ __decorate([
77511
+ Field(),
77512
+ __metadata("design:type", Date)
77513
+ ], MJMCPToolFavorite_.prototype, "_mj__UpdatedAt", void 0);
77514
+ __decorate([
77515
+ Field(),
77516
+ MaxLength(100),
77517
+ __metadata("design:type", String)
77518
+ ], MJMCPToolFavorite_.prototype, "User", void 0);
77519
+ __decorate([
77520
+ Field({ nullable: true }),
77521
+ MaxLength(255),
77522
+ __metadata("design:type", String)
77523
+ ], MJMCPToolFavorite_.prototype, "MCPServerTool", void 0);
77524
+ MJMCPToolFavorite_ = __decorate([
77525
+ ObjectType({ description: `Per-user favorite marker for an MCP Server Tool. Lets users star tools for quick access in the MCP Dashboard and Test dialog.` })
77526
+ ], MJMCPToolFavorite_);
77527
+ export { MJMCPToolFavorite_ };
77528
+ //****************************************************************************
77529
+ // INPUT TYPE for MJ: MCP Tool Favorites
77530
+ //****************************************************************************
77531
+ let CreateMJMCPToolFavoriteInput = class CreateMJMCPToolFavoriteInput {
77532
+ };
77533
+ __decorate([
77534
+ Field({ nullable: true }),
77535
+ __metadata("design:type", String)
77536
+ ], CreateMJMCPToolFavoriteInput.prototype, "ID", void 0);
77537
+ __decorate([
77538
+ Field({ nullable: true }),
77539
+ __metadata("design:type", String)
77540
+ ], CreateMJMCPToolFavoriteInput.prototype, "UserID", void 0);
77541
+ __decorate([
77542
+ Field({ nullable: true }),
77543
+ __metadata("design:type", String)
77544
+ ], CreateMJMCPToolFavoriteInput.prototype, "MCPServerToolID", void 0);
77545
+ CreateMJMCPToolFavoriteInput = __decorate([
77546
+ InputType()
77547
+ ], CreateMJMCPToolFavoriteInput);
77548
+ export { CreateMJMCPToolFavoriteInput };
77549
+ //****************************************************************************
77550
+ // INPUT TYPE for MJ: MCP Tool Favorites
77551
+ //****************************************************************************
77552
+ let UpdateMJMCPToolFavoriteInput = class UpdateMJMCPToolFavoriteInput {
77553
+ };
77554
+ __decorate([
77555
+ Field(),
77556
+ __metadata("design:type", String)
77557
+ ], UpdateMJMCPToolFavoriteInput.prototype, "ID", void 0);
77558
+ __decorate([
77559
+ Field({ nullable: true }),
77560
+ __metadata("design:type", String)
77561
+ ], UpdateMJMCPToolFavoriteInput.prototype, "UserID", void 0);
77562
+ __decorate([
77563
+ Field({ nullable: true }),
77564
+ __metadata("design:type", String)
77565
+ ], UpdateMJMCPToolFavoriteInput.prototype, "MCPServerToolID", void 0);
77566
+ __decorate([
77567
+ Field(() => [KeyValuePairInput], { nullable: true }),
77568
+ __metadata("design:type", Array)
77569
+ ], UpdateMJMCPToolFavoriteInput.prototype, "OldValues___", void 0);
77570
+ UpdateMJMCPToolFavoriteInput = __decorate([
77571
+ InputType()
77572
+ ], UpdateMJMCPToolFavoriteInput);
77573
+ export { UpdateMJMCPToolFavoriteInput };
77574
+ //****************************************************************************
77575
+ // RESOLVER for MJ: MCP Tool Favorites
77576
+ //****************************************************************************
77577
+ let RunMJMCPToolFavoriteViewResult = class RunMJMCPToolFavoriteViewResult {
77578
+ };
77579
+ __decorate([
77580
+ Field(() => [MJMCPToolFavorite_]),
77581
+ __metadata("design:type", Array)
77582
+ ], RunMJMCPToolFavoriteViewResult.prototype, "Results", void 0);
77583
+ __decorate([
77584
+ Field(() => String, { nullable: true }),
77585
+ __metadata("design:type", String)
77586
+ ], RunMJMCPToolFavoriteViewResult.prototype, "UserViewRunID", void 0);
77587
+ __decorate([
77588
+ Field(() => Int, { nullable: true }),
77589
+ __metadata("design:type", Number)
77590
+ ], RunMJMCPToolFavoriteViewResult.prototype, "RowCount", void 0);
77591
+ __decorate([
77592
+ Field(() => Int, { nullable: true }),
77593
+ __metadata("design:type", Number)
77594
+ ], RunMJMCPToolFavoriteViewResult.prototype, "TotalRowCount", void 0);
77595
+ __decorate([
77596
+ Field(() => Int, { nullable: true }),
77597
+ __metadata("design:type", Number)
77598
+ ], RunMJMCPToolFavoriteViewResult.prototype, "ExecutionTime", void 0);
77599
+ __decorate([
77600
+ Field({ nullable: true }),
77601
+ __metadata("design:type", String)
77602
+ ], RunMJMCPToolFavoriteViewResult.prototype, "ErrorMessage", void 0);
77603
+ __decorate([
77604
+ Field(() => Boolean, { nullable: false }),
77605
+ __metadata("design:type", Boolean)
77606
+ ], RunMJMCPToolFavoriteViewResult.prototype, "Success", void 0);
77607
+ RunMJMCPToolFavoriteViewResult = __decorate([
77608
+ ObjectType()
77609
+ ], RunMJMCPToolFavoriteViewResult);
77610
+ export { RunMJMCPToolFavoriteViewResult };
77611
+ let MJMCPToolFavoriteResolver = class MJMCPToolFavoriteResolver extends ResolverBase {
77612
+ async RunMJMCPToolFavoriteViewByID(input, { providers, userPayload }, pubSub) {
77613
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
77614
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
77615
+ }
77616
+ async RunMJMCPToolFavoriteViewByName(input, { providers, userPayload }, pubSub) {
77617
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
77618
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
77619
+ }
77620
+ async RunMJMCPToolFavoriteDynamicView(input, { providers, userPayload }, pubSub) {
77621
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
77622
+ input.EntityName = 'MJ: MCP Tool Favorites';
77623
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
77624
+ }
77625
+ async MJMCPToolFavorite(ID, { userPayload, providers }, pubSub) {
77626
+ this.CheckUserReadPermissions('MJ: MCP Tool Favorites', userPayload);
77627
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
77628
+ 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');
77629
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
77630
+ const result = await this.MapFieldNamesToCodeNames('MJ: MCP Tool Favorites', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
77631
+ return result;
77632
+ }
77633
+ async CreateMJMCPToolFavorite(input, { providers, userPayload }, pubSub) {
77634
+ const provider = GetReadWriteProvider(providers);
77635
+ return this.CreateRecord('MJ: MCP Tool Favorites', input, provider, userPayload, pubSub);
77636
+ }
77637
+ async UpdateMJMCPToolFavorite(input, { providers, userPayload }, pubSub) {
77638
+ const provider = GetReadWriteProvider(providers);
77639
+ return this.UpdateRecord('MJ: MCP Tool Favorites', input, provider, userPayload, pubSub);
77640
+ }
77641
+ async DeleteMJMCPToolFavorite(ID, options, { providers, userPayload }, pubSub) {
77642
+ const provider = GetReadWriteProvider(providers);
77643
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
77644
+ return this.DeleteRecord('MJ: MCP Tool Favorites', key, options, provider, userPayload, pubSub);
77645
+ }
77646
+ };
77647
+ __decorate([
77648
+ Query(() => RunMJMCPToolFavoriteViewResult),
77649
+ __param(0, Arg('input', () => RunViewByIDInput)),
77650
+ __param(1, Ctx()),
77651
+ __param(2, PubSub()),
77652
+ __metadata("design:type", Function),
77653
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
77654
+ __metadata("design:returntype", Promise)
77655
+ ], MJMCPToolFavoriteResolver.prototype, "RunMJMCPToolFavoriteViewByID", null);
77656
+ __decorate([
77657
+ Query(() => RunMJMCPToolFavoriteViewResult),
77658
+ __param(0, Arg('input', () => RunViewByNameInput)),
77659
+ __param(1, Ctx()),
77660
+ __param(2, PubSub()),
77661
+ __metadata("design:type", Function),
77662
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
77663
+ __metadata("design:returntype", Promise)
77664
+ ], MJMCPToolFavoriteResolver.prototype, "RunMJMCPToolFavoriteViewByName", null);
77665
+ __decorate([
77666
+ Query(() => RunMJMCPToolFavoriteViewResult),
77667
+ __param(0, Arg('input', () => RunDynamicViewInput)),
77668
+ __param(1, Ctx()),
77669
+ __param(2, PubSub()),
77670
+ __metadata("design:type", Function),
77671
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
77672
+ __metadata("design:returntype", Promise)
77673
+ ], MJMCPToolFavoriteResolver.prototype, "RunMJMCPToolFavoriteDynamicView", null);
77674
+ __decorate([
77675
+ Query(() => MJMCPToolFavorite_, { nullable: true }),
77676
+ __param(0, Arg('ID', () => String)),
77677
+ __param(1, Ctx()),
77678
+ __param(2, PubSub()),
77679
+ __metadata("design:type", Function),
77680
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
77681
+ __metadata("design:returntype", Promise)
77682
+ ], MJMCPToolFavoriteResolver.prototype, "MJMCPToolFavorite", null);
77683
+ __decorate([
77684
+ Mutation(() => MJMCPToolFavorite_),
77685
+ __param(0, Arg('input', () => CreateMJMCPToolFavoriteInput)),
77686
+ __param(1, Ctx()),
77687
+ __param(2, PubSub()),
77688
+ __metadata("design:type", Function),
77689
+ __metadata("design:paramtypes", [CreateMJMCPToolFavoriteInput, Object, PubSubEngine]),
77690
+ __metadata("design:returntype", Promise)
77691
+ ], MJMCPToolFavoriteResolver.prototype, "CreateMJMCPToolFavorite", null);
77692
+ __decorate([
77693
+ Mutation(() => MJMCPToolFavorite_),
77694
+ __param(0, Arg('input', () => UpdateMJMCPToolFavoriteInput)),
77695
+ __param(1, Ctx()),
77696
+ __param(2, PubSub()),
77697
+ __metadata("design:type", Function),
77698
+ __metadata("design:paramtypes", [UpdateMJMCPToolFavoriteInput, Object, PubSubEngine]),
77699
+ __metadata("design:returntype", Promise)
77700
+ ], MJMCPToolFavoriteResolver.prototype, "UpdateMJMCPToolFavorite", null);
77701
+ __decorate([
77702
+ Mutation(() => MJMCPToolFavorite_),
77703
+ __param(0, Arg('ID', () => String)),
77704
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
77705
+ __param(2, Ctx()),
77706
+ __param(3, PubSub()),
77707
+ __metadata("design:type", Function),
77708
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
77709
+ __metadata("design:returntype", Promise)
77710
+ ], MJMCPToolFavoriteResolver.prototype, "DeleteMJMCPToolFavorite", null);
77711
+ MJMCPToolFavoriteResolver = __decorate([
77712
+ Resolver(MJMCPToolFavorite_)
77713
+ ], MJMCPToolFavoriteResolver);
77714
+ export { MJMCPToolFavoriteResolver };
77715
+ //****************************************************************************
75941
77716
  // ENTITY CLASS for MJ: O Auth Auth Server Metadata Caches
75942
77717
  //****************************************************************************
75943
77718
  let MJOAuthAuthServerMetadataCache_ = class MJOAuthAuthServerMetadataCache_ {
@@ -94806,14 +96581,14 @@ __decorate([
94806
96581
  Field(() => [MJTagCoOccurrence_]),
94807
96582
  __metadata("design:type", Array)
94808
96583
  ], MJTag_.prototype, "MJTagCoOccurrences_TagAIDArray", void 0);
94809
- __decorate([
94810
- Field(() => [MJTagAuditLog_]),
94811
- __metadata("design:type", Array)
94812
- ], MJTag_.prototype, "MJTagAuditLogs_TagIDArray", void 0);
94813
96584
  __decorate([
94814
96585
  Field(() => [MJTag_]),
94815
96586
  __metadata("design:type", Array)
94816
96587
  ], MJTag_.prototype, "MJTags_MergedIntoTagIDArray", void 0);
96588
+ __decorate([
96589
+ Field(() => [MJTagAuditLog_]),
96590
+ __metadata("design:type", Array)
96591
+ ], MJTag_.prototype, "MJTagAuditLogs_TagIDArray", void 0);
94817
96592
  MJTag_ = __decorate([
94818
96593
  ObjectType({ description: `Tags are used to arbitrarily associate any record in any entity with addtional information.` })
94819
96594
  ], MJTag_);
@@ -95011,14 +96786,6 @@ let MJTagResolver = class MJTagResolver extends ResolverBase {
95011
96786
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Co Occurrences', rows, this.GetUserFromPayload(userPayload));
95012
96787
  return result;
95013
96788
  }
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
96789
  async MJTags_MergedIntoTagIDArray(mjtag_, { userPayload, providers }, pubSub) {
95023
96790
  this.CheckUserReadPermissions('MJ: Tags', userPayload);
95024
96791
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -95027,6 +96794,14 @@ let MJTagResolver = class MJTagResolver extends ResolverBase {
95027
96794
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tags', rows, this.GetUserFromPayload(userPayload));
95028
96795
  return result;
95029
96796
  }
96797
+ async MJTagAuditLogs_TagIDArray(mjtag_, { userPayload, providers }, pubSub) {
96798
+ this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
96799
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
96800
+ 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');
96801
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
96802
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
96803
+ return result;
96804
+ }
95030
96805
  async CreateMJTag(input, { providers, userPayload }, pubSub) {
95031
96806
  const provider = GetReadWriteProvider(providers);
95032
96807
  return this.CreateRecord('MJ: Tags', input, provider, userPayload, pubSub);
@@ -95132,23 +96907,23 @@ __decorate([
95132
96907
  __metadata("design:returntype", Promise)
95133
96908
  ], MJTagResolver.prototype, "MJTagCoOccurrences_TagAIDArray", null);
95134
96909
  __decorate([
95135
- FieldResolver(() => [MJTagAuditLog_]),
96910
+ FieldResolver(() => [MJTag_]),
95136
96911
  __param(0, Root()),
95137
96912
  __param(1, Ctx()),
95138
96913
  __param(2, PubSub()),
95139
96914
  __metadata("design:type", Function),
95140
96915
  __metadata("design:paramtypes", [MJTag_, Object, PubSubEngine]),
95141
96916
  __metadata("design:returntype", Promise)
95142
- ], MJTagResolver.prototype, "MJTagAuditLogs_TagIDArray", null);
96917
+ ], MJTagResolver.prototype, "MJTags_MergedIntoTagIDArray", null);
95143
96918
  __decorate([
95144
- FieldResolver(() => [MJTag_]),
96919
+ FieldResolver(() => [MJTagAuditLog_]),
95145
96920
  __param(0, Root()),
95146
96921
  __param(1, Ctx()),
95147
96922
  __param(2, PubSub()),
95148
96923
  __metadata("design:type", Function),
95149
96924
  __metadata("design:paramtypes", [MJTag_, Object, PubSubEngine]),
95150
96925
  __metadata("design:returntype", Promise)
95151
- ], MJTagResolver.prototype, "MJTags_MergedIntoTagIDArray", null);
96926
+ ], MJTagResolver.prototype, "MJTagAuditLogs_TagIDArray", null);
95152
96927
  __decorate([
95153
96928
  Mutation(() => MJTag_),
95154
96929
  __param(0, Arg('input', () => CreateMJTagInput)),
@@ -106033,6 +107808,10 @@ __decorate([
106033
107808
  Field(() => [MJContentItemDuplicate_]),
106034
107809
  __metadata("design:type", Array)
106035
107810
  ], MJUser_.prototype, "MJContentItemDuplicates_ResolvedByUserIDArray", void 0);
107811
+ __decorate([
107812
+ Field(() => [MJTagAuditLog_]),
107813
+ __metadata("design:type", Array)
107814
+ ], MJUser_.prototype, "MJTagAuditLogs_PerformedByUserIDArray", void 0);
106036
107815
  __decorate([
106037
107816
  Field(() => [MJContentProcessRun_]),
106038
107817
  __metadata("design:type", Array)
@@ -106042,9 +107821,13 @@ __decorate([
106042
107821
  __metadata("design:type", Array)
106043
107822
  ], MJUser_.prototype, "MJKnowledgeHubSavedSearches_UserIDArray", void 0);
106044
107823
  __decorate([
106045
- Field(() => [MJTagAuditLog_]),
107824
+ Field(() => [MJMCPToolFavorite_]),
106046
107825
  __metadata("design:type", Array)
106047
- ], MJUser_.prototype, "MJTagAuditLogs_PerformedByUserIDArray", void 0);
107826
+ ], MJUser_.prototype, "MJMCPToolFavorites_UserIDArray", void 0);
107827
+ __decorate([
107828
+ Field(() => [MJArchiveConfiguration_]),
107829
+ __metadata("design:type", Array)
107830
+ ], MJUser_.prototype, "MJArchiveConfigurations_CreatedByUserIDArray", void 0);
106048
107831
  __decorate([
106049
107832
  Field(() => [MJResourcePermission_]),
106050
107833
  __metadata("design:type", Array)
@@ -106109,6 +107892,10 @@ __decorate([
106109
107892
  Field(() => [MJFileStorageAccountPermission_]),
106110
107893
  __metadata("design:type", Array)
106111
107894
  ], MJUser_.prototype, "MJFileStorageAccountPermissions_UserIDArray", void 0);
107895
+ __decorate([
107896
+ Field(() => [MJArchiveRun_]),
107897
+ __metadata("design:type", Array)
107898
+ ], MJUser_.prototype, "MJArchiveRuns_UserIDArray", void 0);
106112
107899
  __decorate([
106113
107900
  Field(() => [MJAIAgentRun_]),
106114
107901
  __metadata("design:type", Array)
@@ -106842,6 +108629,14 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
106842
108629
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Duplicates', rows, this.GetUserFromPayload(userPayload));
106843
108630
  return result;
106844
108631
  }
108632
+ async MJTagAuditLogs_PerformedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
108633
+ this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
108634
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
108635
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('PerformedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
108636
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
108637
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
108638
+ return result;
108639
+ }
106845
108640
  async MJContentProcessRuns_StartedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
106846
108641
  this.CheckUserReadPermissions('MJ: Content Process Runs', userPayload);
106847
108642
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -106858,12 +108653,20 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
106858
108653
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Knowledge Hub Saved Searches', rows, this.GetUserFromPayload(userPayload));
106859
108654
  return result;
106860
108655
  }
106861
- async MJTagAuditLogs_PerformedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
106862
- this.CheckUserReadPermissions('MJ: Tag Audit Logs', userPayload);
108656
+ async MJMCPToolFavorites_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
108657
+ this.CheckUserReadPermissions('MJ: MCP Tool Favorites', userPayload);
106863
108658
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
106864
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagAuditLogs')} WHERE ${provider.QuoteIdentifier('PerformedByUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
108659
+ 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');
106865
108660
  const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
106866
- const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Audit Logs', rows, this.GetUserFromPayload(userPayload));
108661
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: MCP Tool Favorites', rows, this.GetUserFromPayload(userPayload));
108662
+ return result;
108663
+ }
108664
+ async MJArchiveConfigurations_CreatedByUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
108665
+ this.CheckUserReadPermissions('MJ: Archive Configurations', userPayload);
108666
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
108667
+ 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');
108668
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
108669
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configurations', rows, this.GetUserFromPayload(userPayload));
106867
108670
  return result;
106868
108671
  }
106869
108672
  async MJResourcePermissions_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
@@ -106994,6 +108797,14 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
106994
108797
  const result = await this.ArrayMapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows, this.GetUserFromPayload(userPayload));
106995
108798
  return result;
106996
108799
  }
108800
+ async MJArchiveRuns_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
108801
+ this.CheckUserReadPermissions('MJ: Archive Runs', userPayload);
108802
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
108803
+ 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');
108804
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
108805
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Runs', rows, this.GetUserFromPayload(userPayload));
108806
+ return result;
108807
+ }
106997
108808
  async MJAIAgentRuns_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
106998
108809
  this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
106999
108810
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -107665,6 +109476,15 @@ __decorate([
107665
109476
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
107666
109477
  __metadata("design:returntype", Promise)
107667
109478
  ], MJUserResolverBase.prototype, "MJContentItemDuplicates_ResolvedByUserIDArray", null);
109479
+ __decorate([
109480
+ FieldResolver(() => [MJTagAuditLog_]),
109481
+ __param(0, Root()),
109482
+ __param(1, Ctx()),
109483
+ __param(2, PubSub()),
109484
+ __metadata("design:type", Function),
109485
+ __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
109486
+ __metadata("design:returntype", Promise)
109487
+ ], MJUserResolverBase.prototype, "MJTagAuditLogs_PerformedByUserIDArray", null);
107668
109488
  __decorate([
107669
109489
  FieldResolver(() => [MJContentProcessRun_]),
107670
109490
  __param(0, Root()),
@@ -107684,14 +109504,23 @@ __decorate([
107684
109504
  __metadata("design:returntype", Promise)
107685
109505
  ], MJUserResolverBase.prototype, "MJKnowledgeHubSavedSearches_UserIDArray", null);
107686
109506
  __decorate([
107687
- FieldResolver(() => [MJTagAuditLog_]),
109507
+ FieldResolver(() => [MJMCPToolFavorite_]),
107688
109508
  __param(0, Root()),
107689
109509
  __param(1, Ctx()),
107690
109510
  __param(2, PubSub()),
107691
109511
  __metadata("design:type", Function),
107692
109512
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
107693
109513
  __metadata("design:returntype", Promise)
107694
- ], MJUserResolverBase.prototype, "MJTagAuditLogs_PerformedByUserIDArray", null);
109514
+ ], MJUserResolverBase.prototype, "MJMCPToolFavorites_UserIDArray", null);
109515
+ __decorate([
109516
+ FieldResolver(() => [MJArchiveConfiguration_]),
109517
+ __param(0, Root()),
109518
+ __param(1, Ctx()),
109519
+ __param(2, PubSub()),
109520
+ __metadata("design:type", Function),
109521
+ __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
109522
+ __metadata("design:returntype", Promise)
109523
+ ], MJUserResolverBase.prototype, "MJArchiveConfigurations_CreatedByUserIDArray", null);
107695
109524
  __decorate([
107696
109525
  FieldResolver(() => [MJResourcePermission_]),
107697
109526
  __param(0, Root()),
@@ -107836,6 +109665,15 @@ __decorate([
107836
109665
  __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
107837
109666
  __metadata("design:returntype", Promise)
107838
109667
  ], MJUserResolverBase.prototype, "MJFileStorageAccountPermissions_UserIDArray", null);
109668
+ __decorate([
109669
+ FieldResolver(() => [MJArchiveRun_]),
109670
+ __param(0, Root()),
109671
+ __param(1, Ctx()),
109672
+ __param(2, PubSub()),
109673
+ __metadata("design:type", Function),
109674
+ __metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
109675
+ __metadata("design:returntype", Promise)
109676
+ ], MJUserResolverBase.prototype, "MJArchiveRuns_UserIDArray", null);
107839
109677
  __decorate([
107840
109678
  FieldResolver(() => [MJAIAgentRun_]),
107841
109679
  __param(0, Root()),