@memberjunction/server 2.17.0 → 2.18.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.
@@ -1196,24 +1196,24 @@ let AIAgentModelResolver = class AIAgentModelResolver extends ResolverBase {
1196
1196
  return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
1197
1197
  }
1198
1198
  async RunAIAgentModelDynamicView(input, { dataSource, userPayload }, pubSub) {
1199
- input.EntityName = 'AIAgent Models';
1199
+ input.EntityName = 'AI Agent Models';
1200
1200
  return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
1201
1201
  }
1202
1202
  async AIAgentModel(ID, { dataSource, userPayload }, pubSub) {
1203
- this.CheckUserReadPermissions('AIAgent Models', userPayload);
1204
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Models', userPayload, EntityPermissionType.Read, 'AND');
1205
- const result = this.MapFieldNamesToCodeNames('AIAgent Models', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
1203
+ this.CheckUserReadPermissions('AI Agent Models', userPayload);
1204
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
1205
+ const result = this.MapFieldNamesToCodeNames('AI Agent Models', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
1206
1206
  return result;
1207
1207
  }
1208
1208
  async CreateAIAgentModel(input, { dataSource, userPayload }, pubSub) {
1209
- return this.CreateRecord('AIAgent Models', input, dataSource, userPayload, pubSub);
1209
+ return this.CreateRecord('AI Agent Models', input, dataSource, userPayload, pubSub);
1210
1210
  }
1211
1211
  async UpdateAIAgentModel(input, { dataSource, userPayload }, pubSub) {
1212
- return this.UpdateRecord('AIAgent Models', input, dataSource, userPayload, pubSub);
1212
+ return this.UpdateRecord('AI Agent Models', input, dataSource, userPayload, pubSub);
1213
1213
  }
1214
1214
  async DeleteAIAgentModel(ID, options, { dataSource, userPayload }, pubSub) {
1215
1215
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
1216
- return this.DeleteRecord('AIAgent Models', key, options, dataSource, userPayload, pubSub);
1216
+ return this.DeleteRecord('AI Agent Models', key, options, dataSource, userPayload, pubSub);
1217
1217
  }
1218
1218
  };
1219
1219
  __decorate([
@@ -1415,30 +1415,30 @@ let AIAgentNoteTypeResolver = class AIAgentNoteTypeResolver extends ResolverBase
1415
1415
  return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
1416
1416
  }
1417
1417
  async RunAIAgentNoteTypeDynamicView(input, { dataSource, userPayload }, pubSub) {
1418
- input.EntityName = 'AIAgent Note Types';
1418
+ input.EntityName = 'AI Agent Note Types';
1419
1419
  return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
1420
1420
  }
1421
1421
  async AIAgentNoteType(ID, { dataSource, userPayload }, pubSub) {
1422
- this.CheckUserReadPermissions('AIAgent Note Types', userPayload);
1423
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNoteTypes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Note Types', userPayload, EntityPermissionType.Read, 'AND');
1424
- const result = this.MapFieldNamesToCodeNames('AIAgent Note Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
1422
+ this.CheckUserReadPermissions('AI Agent Note Types', userPayload);
1423
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNoteTypes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Note Types', userPayload, EntityPermissionType.Read, 'AND');
1424
+ const result = this.MapFieldNamesToCodeNames('AI Agent Note Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
1425
1425
  return result;
1426
1426
  }
1427
1427
  async AIAgentNotes_AgentNoteTypeIDArray(aiagentnotetype_, { dataSource, userPayload }, pubSub) {
1428
- this.CheckUserReadPermissions('AIAgent Notes', userPayload);
1429
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [AgentNoteTypeID]='${aiagentnotetype_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Notes', userPayload, EntityPermissionType.Read, 'AND');
1430
- const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Notes', await dataSource.query(sSQL));
1428
+ this.CheckUserReadPermissions('AI Agent Notes', userPayload);
1429
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [AgentNoteTypeID]='${aiagentnotetype_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
1430
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', await dataSource.query(sSQL));
1431
1431
  return result;
1432
1432
  }
1433
1433
  async CreateAIAgentNoteType(input, { dataSource, userPayload }, pubSub) {
1434
- return this.CreateRecord('AIAgent Note Types', input, dataSource, userPayload, pubSub);
1434
+ return this.CreateRecord('AI Agent Note Types', input, dataSource, userPayload, pubSub);
1435
1435
  }
1436
1436
  async UpdateAIAgentNoteType(input, { dataSource, userPayload }, pubSub) {
1437
- return this.UpdateRecord('AIAgent Note Types', input, dataSource, userPayload, pubSub);
1437
+ return this.UpdateRecord('AI Agent Note Types', input, dataSource, userPayload, pubSub);
1438
1438
  }
1439
1439
  async DeleteAIAgentNoteType(ID, options, { dataSource, userPayload }, pubSub) {
1440
1440
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
1441
- return this.DeleteRecord('AIAgent Note Types', key, options, dataSource, userPayload, pubSub);
1441
+ return this.DeleteRecord('AI Agent Note Types', key, options, dataSource, userPayload, pubSub);
1442
1442
  }
1443
1443
  };
1444
1444
  __decorate([
@@ -1525,6 +1525,7 @@ let AIAgent_ = class AIAgent_ {
1525
1525
  LogoURL;
1526
1526
  _mj__CreatedAt;
1527
1527
  _mj__UpdatedAt;
1528
+ AIAgentRequests_AgentIDArray;
1528
1529
  AIAgentLearningCycles_AgentIDArray;
1529
1530
  AIAgentModels_AgentIDArray;
1530
1531
  AIAgentActions_AgentIDArray;
@@ -1559,6 +1560,10 @@ __decorate([
1559
1560
  MaxLength(10),
1560
1561
  __metadata("design:type", Date)
1561
1562
  ], AIAgent_.prototype, "_mj__UpdatedAt", void 0);
1563
+ __decorate([
1564
+ Field(() => [AIAgentRequest_]),
1565
+ __metadata("design:type", Array)
1566
+ ], AIAgent_.prototype, "AIAgentRequests_AgentIDArray", void 0);
1562
1567
  __decorate([
1563
1568
  Field(() => [AIAgentLearningCycle_]),
1564
1569
  __metadata("design:type", Array)
@@ -1680,48 +1685,54 @@ let AIAgentResolver = class AIAgentResolver extends ResolverBase {
1680
1685
  return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
1681
1686
  }
1682
1687
  async RunAIAgentDynamicView(input, { dataSource, userPayload }, pubSub) {
1683
- input.EntityName = 'AIAgents';
1688
+ input.EntityName = 'AI Agents';
1684
1689
  return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
1685
1690
  }
1686
1691
  async AIAgent(ID, { dataSource, userPayload }, pubSub) {
1687
- this.CheckUserReadPermissions('AIAgents', userPayload);
1688
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgents] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgents', userPayload, EntityPermissionType.Read, 'AND');
1689
- const result = this.MapFieldNamesToCodeNames('AIAgents', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
1692
+ this.CheckUserReadPermissions('AI Agents', userPayload);
1693
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgents] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AI Agents', userPayload, EntityPermissionType.Read, 'AND');
1694
+ const result = this.MapFieldNamesToCodeNames('AI Agents', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
1695
+ return result;
1696
+ }
1697
+ async AIAgentRequests_AgentIDArray(aiagent_, { dataSource, userPayload }, pubSub) {
1698
+ this.CheckUserReadPermissions('AI Agent Requests', userPayload);
1699
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRequests] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Requests', userPayload, EntityPermissionType.Read, 'AND');
1700
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Requests', await dataSource.query(sSQL));
1690
1701
  return result;
1691
1702
  }
1692
1703
  async AIAgentLearningCycles_AgentIDArray(aiagent_, { dataSource, userPayload }, pubSub) {
1693
- this.CheckUserReadPermissions('AIAgent Learning Cycles', userPayload);
1694
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentLearningCycles] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Learning Cycles', userPayload, EntityPermissionType.Read, 'AND');
1695
- const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Learning Cycles', await dataSource.query(sSQL));
1704
+ this.CheckUserReadPermissions('AI Agent Learning Cycles', userPayload);
1705
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentLearningCycles] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Learning Cycles', userPayload, EntityPermissionType.Read, 'AND');
1706
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Learning Cycles', await dataSource.query(sSQL));
1696
1707
  return result;
1697
1708
  }
1698
1709
  async AIAgentModels_AgentIDArray(aiagent_, { dataSource, userPayload }, pubSub) {
1699
- this.CheckUserReadPermissions('AIAgent Models', userPayload);
1700
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Models', userPayload, EntityPermissionType.Read, 'AND');
1701
- const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Models', await dataSource.query(sSQL));
1710
+ this.CheckUserReadPermissions('AI Agent Models', userPayload);
1711
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
1712
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', await dataSource.query(sSQL));
1702
1713
  return result;
1703
1714
  }
1704
1715
  async AIAgentActions_AgentIDArray(aiagent_, { dataSource, userPayload }, pubSub) {
1705
- this.CheckUserReadPermissions('AIAgent Actions', userPayload);
1706
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Actions', userPayload, EntityPermissionType.Read, 'AND');
1707
- const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Actions', await dataSource.query(sSQL));
1716
+ this.CheckUserReadPermissions('AI Agent Actions', userPayload);
1717
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Actions', userPayload, EntityPermissionType.Read, 'AND');
1718
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Actions', await dataSource.query(sSQL));
1708
1719
  return result;
1709
1720
  }
1710
1721
  async AIAgentNotes_AgentIDArray(aiagent_, { dataSource, userPayload }, pubSub) {
1711
- this.CheckUserReadPermissions('AIAgent Notes', userPayload);
1712
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Notes', userPayload, EntityPermissionType.Read, 'AND');
1713
- const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Notes', await dataSource.query(sSQL));
1722
+ this.CheckUserReadPermissions('AI Agent Notes', userPayload);
1723
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
1724
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', await dataSource.query(sSQL));
1714
1725
  return result;
1715
1726
  }
1716
1727
  async CreateAIAgent(input, { dataSource, userPayload }, pubSub) {
1717
- return this.CreateRecord('AIAgents', input, dataSource, userPayload, pubSub);
1728
+ return this.CreateRecord('AI Agents', input, dataSource, userPayload, pubSub);
1718
1729
  }
1719
1730
  async UpdateAIAgent(input, { dataSource, userPayload }, pubSub) {
1720
- return this.UpdateRecord('AIAgents', input, dataSource, userPayload, pubSub);
1731
+ return this.UpdateRecord('AI Agents', input, dataSource, userPayload, pubSub);
1721
1732
  }
1722
1733
  async DeleteAIAgent(ID, options, { dataSource, userPayload }, pubSub) {
1723
1734
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
1724
- return this.DeleteRecord('AIAgents', key, options, dataSource, userPayload, pubSub);
1735
+ return this.DeleteRecord('AI Agents', key, options, dataSource, userPayload, pubSub);
1725
1736
  }
1726
1737
  };
1727
1738
  __decorate([
@@ -1760,6 +1771,15 @@ __decorate([
1760
1771
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
1761
1772
  __metadata("design:returntype", Promise)
1762
1773
  ], AIAgentResolver.prototype, "AIAgent", null);
1774
+ __decorate([
1775
+ FieldResolver(() => [AIAgentRequest_]),
1776
+ __param(0, Root()),
1777
+ __param(1, Ctx()),
1778
+ __param(2, PubSub()),
1779
+ __metadata("design:type", Function),
1780
+ __metadata("design:paramtypes", [AIAgent_, Object, PubSubEngine]),
1781
+ __metadata("design:returntype", Promise)
1782
+ ], AIAgentResolver.prototype, "AIAgentRequests_AgentIDArray", null);
1763
1783
  __decorate([
1764
1784
  FieldResolver(() => [AIAgentLearningCycle_]),
1765
1785
  __param(0, Root()),
@@ -1835,8 +1855,11 @@ let AIAgentNote_ = class AIAgentNote_ {
1835
1855
  Note;
1836
1856
  _mj__CreatedAt;
1837
1857
  _mj__UpdatedAt;
1858
+ Type;
1859
+ UserID;
1838
1860
  Agent;
1839
1861
  AgentNoteType;
1862
+ User;
1840
1863
  };
1841
1864
  __decorate([
1842
1865
  Field(),
@@ -1867,6 +1890,16 @@ __decorate([
1867
1890
  MaxLength(10),
1868
1891
  __metadata("design:type", Date)
1869
1892
  ], AIAgentNote_.prototype, "_mj__UpdatedAt", void 0);
1893
+ __decorate([
1894
+ Field({ description: 'Indicates the type of note, either User-specific or Global.' }),
1895
+ MaxLength(40),
1896
+ __metadata("design:type", String)
1897
+ ], AIAgentNote_.prototype, "Type", void 0);
1898
+ __decorate([
1899
+ Field({ nullable: true, description: 'Foreign key referencing the ID column in the User table, indicating the user associated with the note. Used when Type=User' }),
1900
+ MaxLength(16),
1901
+ __metadata("design:type", String)
1902
+ ], AIAgentNote_.prototype, "UserID", void 0);
1870
1903
  __decorate([
1871
1904
  Field({ nullable: true }),
1872
1905
  MaxLength(510),
@@ -1877,6 +1910,11 @@ __decorate([
1877
1910
  MaxLength(510),
1878
1911
  __metadata("design:type", String)
1879
1912
  ], AIAgentNote_.prototype, "AgentNoteType", void 0);
1913
+ __decorate([
1914
+ Field({ nullable: true }),
1915
+ MaxLength(200),
1916
+ __metadata("design:type", String)
1917
+ ], AIAgentNote_.prototype, "User", void 0);
1880
1918
  AIAgentNote_ = __decorate([
1881
1919
  ObjectType()
1882
1920
  ], AIAgentNote_);
@@ -1885,6 +1923,8 @@ let CreateAIAgentNoteInput = class CreateAIAgentNoteInput {
1885
1923
  AgentID;
1886
1924
  AgentNoteTypeID;
1887
1925
  Note;
1926
+ Type;
1927
+ UserID;
1888
1928
  };
1889
1929
  __decorate([
1890
1930
  Field({ nullable: true }),
@@ -1898,6 +1938,14 @@ __decorate([
1898
1938
  Field({ nullable: true }),
1899
1939
  __metadata("design:type", String)
1900
1940
  ], CreateAIAgentNoteInput.prototype, "Note", void 0);
1941
+ __decorate([
1942
+ Field(),
1943
+ __metadata("design:type", String)
1944
+ ], CreateAIAgentNoteInput.prototype, "Type", void 0);
1945
+ __decorate([
1946
+ Field({ nullable: true }),
1947
+ __metadata("design:type", String)
1948
+ ], CreateAIAgentNoteInput.prototype, "UserID", void 0);
1901
1949
  CreateAIAgentNoteInput = __decorate([
1902
1950
  InputType()
1903
1951
  ], CreateAIAgentNoteInput);
@@ -1907,6 +1955,8 @@ let UpdateAIAgentNoteInput = class UpdateAIAgentNoteInput {
1907
1955
  AgentID;
1908
1956
  AgentNoteTypeID;
1909
1957
  Note;
1958
+ Type;
1959
+ UserID;
1910
1960
  OldValues___;
1911
1961
  };
1912
1962
  __decorate([
@@ -1925,6 +1975,14 @@ __decorate([
1925
1975
  Field({ nullable: true }),
1926
1976
  __metadata("design:type", String)
1927
1977
  ], UpdateAIAgentNoteInput.prototype, "Note", void 0);
1978
+ __decorate([
1979
+ Field(),
1980
+ __metadata("design:type", String)
1981
+ ], UpdateAIAgentNoteInput.prototype, "Type", void 0);
1982
+ __decorate([
1983
+ Field({ nullable: true }),
1984
+ __metadata("design:type", String)
1985
+ ], UpdateAIAgentNoteInput.prototype, "UserID", void 0);
1928
1986
  __decorate([
1929
1987
  Field(() => [KeyValuePairInput], { nullable: true }),
1930
1988
  __metadata("design:type", Array)
@@ -1982,24 +2040,24 @@ let AIAgentNoteResolver = class AIAgentNoteResolver extends ResolverBase {
1982
2040
  return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
1983
2041
  }
1984
2042
  async RunAIAgentNoteDynamicView(input, { dataSource, userPayload }, pubSub) {
1985
- input.EntityName = 'AIAgent Notes';
2043
+ input.EntityName = 'AI Agent Notes';
1986
2044
  return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
1987
2045
  }
1988
2046
  async AIAgentNote(ID, { dataSource, userPayload }, pubSub) {
1989
- this.CheckUserReadPermissions('AIAgent Notes', userPayload);
1990
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Notes', userPayload, EntityPermissionType.Read, 'AND');
1991
- const result = this.MapFieldNamesToCodeNames('AIAgent Notes', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
2047
+ this.CheckUserReadPermissions('AI Agent Notes', userPayload);
2048
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
2049
+ const result = this.MapFieldNamesToCodeNames('AI Agent Notes', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
1992
2050
  return result;
1993
2051
  }
1994
2052
  async CreateAIAgentNote(input, { dataSource, userPayload }, pubSub) {
1995
- return this.CreateRecord('AIAgent Notes', input, dataSource, userPayload, pubSub);
2053
+ return this.CreateRecord('AI Agent Notes', input, dataSource, userPayload, pubSub);
1996
2054
  }
1997
2055
  async UpdateAIAgentNote(input, { dataSource, userPayload }, pubSub) {
1998
- return this.UpdateRecord('AIAgent Notes', input, dataSource, userPayload, pubSub);
2056
+ return this.UpdateRecord('AI Agent Notes', input, dataSource, userPayload, pubSub);
1999
2057
  }
2000
2058
  async DeleteAIAgentNote(ID, options, { dataSource, userPayload }, pubSub) {
2001
2059
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
2002
- return this.DeleteRecord('AIAgent Notes', key, options, dataSource, userPayload, pubSub);
2060
+ return this.DeleteRecord('AI Agent Notes', key, options, dataSource, userPayload, pubSub);
2003
2061
  }
2004
2062
  };
2005
2063
  __decorate([
@@ -2225,24 +2283,24 @@ let AIAgentActionResolver = class AIAgentActionResolver extends ResolverBase {
2225
2283
  return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
2226
2284
  }
2227
2285
  async RunAIAgentActionDynamicView(input, { dataSource, userPayload }, pubSub) {
2228
- input.EntityName = 'AIAgent Actions';
2286
+ input.EntityName = 'AI Agent Actions';
2229
2287
  return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
2230
2288
  }
2231
2289
  async AIAgentAction(ID, { dataSource, userPayload }, pubSub) {
2232
- this.CheckUserReadPermissions('AIAgent Actions', userPayload);
2233
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Actions', userPayload, EntityPermissionType.Read, 'AND');
2234
- const result = this.MapFieldNamesToCodeNames('AIAgent Actions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
2290
+ this.CheckUserReadPermissions('AI Agent Actions', userPayload);
2291
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Actions', userPayload, EntityPermissionType.Read, 'AND');
2292
+ const result = this.MapFieldNamesToCodeNames('AI Agent Actions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
2235
2293
  return result;
2236
2294
  }
2237
2295
  async CreateAIAgentAction(input, { dataSource, userPayload }, pubSub) {
2238
- return this.CreateRecord('AIAgent Actions', input, dataSource, userPayload, pubSub);
2296
+ return this.CreateRecord('AI Agent Actions', input, dataSource, userPayload, pubSub);
2239
2297
  }
2240
2298
  async UpdateAIAgentAction(input, { dataSource, userPayload }, pubSub) {
2241
- return this.UpdateRecord('AIAgent Actions', input, dataSource, userPayload, pubSub);
2299
+ return this.UpdateRecord('AI Agent Actions', input, dataSource, userPayload, pubSub);
2242
2300
  }
2243
2301
  async DeleteAIAgentAction(ID, options, { dataSource, userPayload }, pubSub) {
2244
2302
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
2245
- return this.DeleteRecord('AIAgent Actions', key, options, dataSource, userPayload, pubSub);
2303
+ return this.DeleteRecord('AI Agent Actions', key, options, dataSource, userPayload, pubSub);
2246
2304
  }
2247
2305
  };
2248
2306
  __decorate([
@@ -8985,7 +9043,10 @@ let User_ = class User_ {
8985
9043
  ListCategories_UserIDArray;
8986
9044
  ScheduledActions_CreatedByUserIDArray;
8987
9045
  ResourceLinks_UserIDArray;
9046
+ AIAgentRequests_ResponseByUserIDArray;
9047
+ AIAgentNotes_UserIDArray;
8988
9048
  ResourcePermissions_UserIDArray;
9049
+ AIAgentRequests_RequestForUserIDArray;
8989
9050
  };
8990
9051
  __decorate([
8991
9052
  Field(),
@@ -9218,10 +9279,22 @@ __decorate([
9218
9279
  Field(() => [ResourceLink_]),
9219
9280
  __metadata("design:type", Array)
9220
9281
  ], User_.prototype, "ResourceLinks_UserIDArray", void 0);
9282
+ __decorate([
9283
+ Field(() => [AIAgentRequest_]),
9284
+ __metadata("design:type", Array)
9285
+ ], User_.prototype, "AIAgentRequests_ResponseByUserIDArray", void 0);
9286
+ __decorate([
9287
+ Field(() => [AIAgentNote_]),
9288
+ __metadata("design:type", Array)
9289
+ ], User_.prototype, "AIAgentNotes_UserIDArray", void 0);
9221
9290
  __decorate([
9222
9291
  Field(() => [ResourcePermission_]),
9223
9292
  __metadata("design:type", Array)
9224
9293
  ], User_.prototype, "ResourcePermissions_UserIDArray", void 0);
9294
+ __decorate([
9295
+ Field(() => [AIAgentRequest_]),
9296
+ __metadata("design:type", Array)
9297
+ ], User_.prototype, "AIAgentRequests_RequestForUserIDArray", void 0);
9225
9298
  User_ = __decorate([
9226
9299
  ObjectType({ description: 'A list of all users who have or had access to the system' })
9227
9300
  ], User_);
@@ -9620,12 +9693,30 @@ let UserResolverBase = class UserResolverBase extends ResolverBase {
9620
9693
  const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL));
9621
9694
  return result;
9622
9695
  }
9696
+ async AIAgentRequests_ResponseByUserIDArray(user_, { dataSource, userPayload }, pubSub) {
9697
+ this.CheckUserReadPermissions('AI Agent Requests', userPayload);
9698
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRequests] WHERE [ResponseByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Requests', userPayload, EntityPermissionType.Read, 'AND');
9699
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Requests', await dataSource.query(sSQL));
9700
+ return result;
9701
+ }
9702
+ async AIAgentNotes_UserIDArray(user_, { dataSource, userPayload }, pubSub) {
9703
+ this.CheckUserReadPermissions('AI Agent Notes', userPayload);
9704
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
9705
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', await dataSource.query(sSQL));
9706
+ return result;
9707
+ }
9623
9708
  async ResourcePermissions_UserIDArray(user_, { dataSource, userPayload }, pubSub) {
9624
9709
  this.CheckUserReadPermissions('Resource Permissions', userPayload);
9625
9710
  const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourcePermissions] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Permissions', userPayload, EntityPermissionType.Read, 'AND');
9626
9711
  const result = this.ArrayMapFieldNamesToCodeNames('Resource Permissions', await dataSource.query(sSQL));
9627
9712
  return result;
9628
9713
  }
9714
+ async AIAgentRequests_RequestForUserIDArray(user_, { dataSource, userPayload }, pubSub) {
9715
+ this.CheckUserReadPermissions('AI Agent Requests', userPayload);
9716
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRequests] WHERE [RequestForUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Requests', userPayload, EntityPermissionType.Read, 'AND');
9717
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Requests', await dataSource.query(sSQL));
9718
+ return result;
9719
+ }
9629
9720
  async CreateUser(input, { dataSource, userPayload }, pubSub) {
9630
9721
  return this.CreateRecord('Users', input, dataSource, userPayload, pubSub);
9631
9722
  }
@@ -9978,6 +10069,24 @@ __decorate([
9978
10069
  __metadata("design:paramtypes", [User_, Object, PubSubEngine]),
9979
10070
  __metadata("design:returntype", Promise)
9980
10071
  ], UserResolverBase.prototype, "ResourceLinks_UserIDArray", null);
10072
+ __decorate([
10073
+ FieldResolver(() => [AIAgentRequest_]),
10074
+ __param(0, Root()),
10075
+ __param(1, Ctx()),
10076
+ __param(2, PubSub()),
10077
+ __metadata("design:type", Function),
10078
+ __metadata("design:paramtypes", [User_, Object, PubSubEngine]),
10079
+ __metadata("design:returntype", Promise)
10080
+ ], UserResolverBase.prototype, "AIAgentRequests_ResponseByUserIDArray", null);
10081
+ __decorate([
10082
+ FieldResolver(() => [AIAgentNote_]),
10083
+ __param(0, Root()),
10084
+ __param(1, Ctx()),
10085
+ __param(2, PubSub()),
10086
+ __metadata("design:type", Function),
10087
+ __metadata("design:paramtypes", [User_, Object, PubSubEngine]),
10088
+ __metadata("design:returntype", Promise)
10089
+ ], UserResolverBase.prototype, "AIAgentNotes_UserIDArray", null);
9981
10090
  __decorate([
9982
10091
  FieldResolver(() => [ResourcePermission_]),
9983
10092
  __param(0, Root()),
@@ -9987,6 +10096,15 @@ __decorate([
9987
10096
  __metadata("design:paramtypes", [User_, Object, PubSubEngine]),
9988
10097
  __metadata("design:returntype", Promise)
9989
10098
  ], UserResolverBase.prototype, "ResourcePermissions_UserIDArray", null);
10099
+ __decorate([
10100
+ FieldResolver(() => [AIAgentRequest_]),
10101
+ __param(0, Root()),
10102
+ __param(1, Ctx()),
10103
+ __param(2, PubSub()),
10104
+ __metadata("design:type", Function),
10105
+ __metadata("design:paramtypes", [User_, Object, PubSubEngine]),
10106
+ __metadata("design:returntype", Promise)
10107
+ ], UserResolverBase.prototype, "AIAgentRequests_RequestForUserIDArray", null);
9990
10108
  __decorate([
9991
10109
  Mutation(() => User_),
9992
10110
  __param(0, Arg('input', () => CreateUserInput)),
@@ -18319,9 +18437,9 @@ let AIModelResolver = class AIModelResolver extends ResolverBase {
18319
18437
  return result;
18320
18438
  }
18321
18439
  async AIAgentModels_ModelIDArray(aimodel_, { dataSource, userPayload }, pubSub) {
18322
- this.CheckUserReadPermissions('AIAgent Models', userPayload);
18323
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [ModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Models', userPayload, EntityPermissionType.Read, 'AND');
18324
- const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Models', await dataSource.query(sSQL));
18440
+ this.CheckUserReadPermissions('AI Agent Models', userPayload);
18441
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [ModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
18442
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', await dataSource.query(sSQL));
18325
18443
  return result;
18326
18444
  }
18327
18445
  async CreateAIModel(input, { dataSource, userPayload }, pubSub) {
@@ -35235,9 +35353,9 @@ let ActionResolver = class ActionResolver extends ResolverBase {
35235
35353
  return result;
35236
35354
  }
35237
35355
  async AIAgentActions_ActionIDArray(action_, { dataSource, userPayload }, pubSub) {
35238
- this.CheckUserReadPermissions('AIAgent Actions', userPayload);
35239
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [ActionID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Actions', userPayload, EntityPermissionType.Read, 'AND');
35240
- const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Actions', await dataSource.query(sSQL));
35356
+ this.CheckUserReadPermissions('AI Agent Actions', userPayload);
35357
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [ActionID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Actions', userPayload, EntityPermissionType.Read, 'AND');
35358
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Actions', await dataSource.query(sSQL));
35241
35359
  return result;
35242
35360
  }
35243
35361
  async ActionContexts_ActionIDArray(action_, { dataSource, userPayload }, pubSub) {
@@ -44532,6 +44650,348 @@ flyway_schema_historyResolver = __decorate([
44532
44650
  Resolver(flyway_schema_history_)
44533
44651
  ], flyway_schema_historyResolver);
44534
44652
  export { flyway_schema_historyResolver };
44653
+ let AIAgentRequest_ = class AIAgentRequest_ {
44654
+ ID;
44655
+ AgentID;
44656
+ RequestedAt;
44657
+ RequestForUserID;
44658
+ Status;
44659
+ Request;
44660
+ Response;
44661
+ ResponseByUserID;
44662
+ RespondedAt;
44663
+ Comments;
44664
+ _mj__CreatedAt;
44665
+ _mj__UpdatedAt;
44666
+ Agent;
44667
+ RequestForUser;
44668
+ ResponseByUser;
44669
+ };
44670
+ __decorate([
44671
+ Field({ description: 'Primary key for the AIAgentRequest table, uniquely identifies each record.' }),
44672
+ MaxLength(16),
44673
+ __metadata("design:type", String)
44674
+ ], AIAgentRequest_.prototype, "ID", void 0);
44675
+ __decorate([
44676
+ Field({ description: 'Foreign key referencing the ID column in the AIAgent table.' }),
44677
+ MaxLength(16),
44678
+ __metadata("design:type", String)
44679
+ ], AIAgentRequest_.prototype, "AgentID", void 0);
44680
+ __decorate([
44681
+ Field({ description: 'Timestamp when the request was made by the agent.' }),
44682
+ MaxLength(8),
44683
+ __metadata("design:type", Date)
44684
+ ], AIAgentRequest_.prototype, "RequestedAt", void 0);
44685
+ __decorate([
44686
+ Field({ nullable: true, description: 'Optional, a user that the AI specifically is directing the request to, if null intended for general system owner.' }),
44687
+ MaxLength(16),
44688
+ __metadata("design:type", String)
44689
+ ], AIAgentRequest_.prototype, "RequestForUserID", void 0);
44690
+ __decorate([
44691
+ Field({ description: 'Current status of the request (Requested, Approved, Rejected, Canceled).' }),
44692
+ MaxLength(40),
44693
+ __metadata("design:type", String)
44694
+ ], AIAgentRequest_.prototype, "Status", void 0);
44695
+ __decorate([
44696
+ Field({ description: 'Details of what the AI Agent is requesting.' }),
44697
+ __metadata("design:type", String)
44698
+ ], AIAgentRequest_.prototype, "Request", void 0);
44699
+ __decorate([
44700
+ Field({ nullable: true, description: 'Response provided by the human to the agent request.' }),
44701
+ __metadata("design:type", String)
44702
+ ], AIAgentRequest_.prototype, "Response", void 0);
44703
+ __decorate([
44704
+ Field({ nullable: true, description: 'Populated when a user responds indicating which user responded to the request.' }),
44705
+ MaxLength(16),
44706
+ __metadata("design:type", String)
44707
+ ], AIAgentRequest_.prototype, "ResponseByUserID", void 0);
44708
+ __decorate([
44709
+ Field({ nullable: true, description: 'Timestamp when the response was provided by the human.' }),
44710
+ MaxLength(8),
44711
+ __metadata("design:type", Date)
44712
+ ], AIAgentRequest_.prototype, "RespondedAt", void 0);
44713
+ __decorate([
44714
+ Field({ nullable: true, description: 'Additional comments about the request. Not shared with the agent, purely record keeping.' }),
44715
+ __metadata("design:type", String)
44716
+ ], AIAgentRequest_.prototype, "Comments", void 0);
44717
+ __decorate([
44718
+ Field(),
44719
+ MaxLength(10),
44720
+ __metadata("design:type", Date)
44721
+ ], AIAgentRequest_.prototype, "_mj__CreatedAt", void 0);
44722
+ __decorate([
44723
+ Field(),
44724
+ MaxLength(10),
44725
+ __metadata("design:type", Date)
44726
+ ], AIAgentRequest_.prototype, "_mj__UpdatedAt", void 0);
44727
+ __decorate([
44728
+ Field({ nullable: true }),
44729
+ MaxLength(510),
44730
+ __metadata("design:type", String)
44731
+ ], AIAgentRequest_.prototype, "Agent", void 0);
44732
+ __decorate([
44733
+ Field({ nullable: true }),
44734
+ MaxLength(200),
44735
+ __metadata("design:type", String)
44736
+ ], AIAgentRequest_.prototype, "RequestForUser", void 0);
44737
+ __decorate([
44738
+ Field({ nullable: true }),
44739
+ MaxLength(200),
44740
+ __metadata("design:type", String)
44741
+ ], AIAgentRequest_.prototype, "ResponseByUser", void 0);
44742
+ AIAgentRequest_ = __decorate([
44743
+ ObjectType()
44744
+ ], AIAgentRequest_);
44745
+ export { AIAgentRequest_ };
44746
+ let CreateAIAgentRequestInput = class CreateAIAgentRequestInput {
44747
+ AgentID;
44748
+ RequestedAt;
44749
+ RequestForUserID;
44750
+ Status;
44751
+ Request;
44752
+ Response;
44753
+ ResponseByUserID;
44754
+ RespondedAt;
44755
+ Comments;
44756
+ };
44757
+ __decorate([
44758
+ Field(),
44759
+ __metadata("design:type", String)
44760
+ ], CreateAIAgentRequestInput.prototype, "AgentID", void 0);
44761
+ __decorate([
44762
+ Field(),
44763
+ __metadata("design:type", Date)
44764
+ ], CreateAIAgentRequestInput.prototype, "RequestedAt", void 0);
44765
+ __decorate([
44766
+ Field({ nullable: true }),
44767
+ __metadata("design:type", String)
44768
+ ], CreateAIAgentRequestInput.prototype, "RequestForUserID", void 0);
44769
+ __decorate([
44770
+ Field(),
44771
+ __metadata("design:type", String)
44772
+ ], CreateAIAgentRequestInput.prototype, "Status", void 0);
44773
+ __decorate([
44774
+ Field(),
44775
+ __metadata("design:type", String)
44776
+ ], CreateAIAgentRequestInput.prototype, "Request", void 0);
44777
+ __decorate([
44778
+ Field({ nullable: true }),
44779
+ __metadata("design:type", String)
44780
+ ], CreateAIAgentRequestInput.prototype, "Response", void 0);
44781
+ __decorate([
44782
+ Field({ nullable: true }),
44783
+ __metadata("design:type", String)
44784
+ ], CreateAIAgentRequestInput.prototype, "ResponseByUserID", void 0);
44785
+ __decorate([
44786
+ Field({ nullable: true }),
44787
+ __metadata("design:type", Date)
44788
+ ], CreateAIAgentRequestInput.prototype, "RespondedAt", void 0);
44789
+ __decorate([
44790
+ Field({ nullable: true }),
44791
+ __metadata("design:type", String)
44792
+ ], CreateAIAgentRequestInput.prototype, "Comments", void 0);
44793
+ CreateAIAgentRequestInput = __decorate([
44794
+ InputType()
44795
+ ], CreateAIAgentRequestInput);
44796
+ export { CreateAIAgentRequestInput };
44797
+ let UpdateAIAgentRequestInput = class UpdateAIAgentRequestInput {
44798
+ ID;
44799
+ AgentID;
44800
+ RequestedAt;
44801
+ RequestForUserID;
44802
+ Status;
44803
+ Request;
44804
+ Response;
44805
+ ResponseByUserID;
44806
+ RespondedAt;
44807
+ Comments;
44808
+ OldValues___;
44809
+ };
44810
+ __decorate([
44811
+ Field(),
44812
+ __metadata("design:type", String)
44813
+ ], UpdateAIAgentRequestInput.prototype, "ID", void 0);
44814
+ __decorate([
44815
+ Field(),
44816
+ __metadata("design:type", String)
44817
+ ], UpdateAIAgentRequestInput.prototype, "AgentID", void 0);
44818
+ __decorate([
44819
+ Field(),
44820
+ __metadata("design:type", Date)
44821
+ ], UpdateAIAgentRequestInput.prototype, "RequestedAt", void 0);
44822
+ __decorate([
44823
+ Field({ nullable: true }),
44824
+ __metadata("design:type", String)
44825
+ ], UpdateAIAgentRequestInput.prototype, "RequestForUserID", void 0);
44826
+ __decorate([
44827
+ Field(),
44828
+ __metadata("design:type", String)
44829
+ ], UpdateAIAgentRequestInput.prototype, "Status", void 0);
44830
+ __decorate([
44831
+ Field(),
44832
+ __metadata("design:type", String)
44833
+ ], UpdateAIAgentRequestInput.prototype, "Request", void 0);
44834
+ __decorate([
44835
+ Field({ nullable: true }),
44836
+ __metadata("design:type", String)
44837
+ ], UpdateAIAgentRequestInput.prototype, "Response", void 0);
44838
+ __decorate([
44839
+ Field({ nullable: true }),
44840
+ __metadata("design:type", String)
44841
+ ], UpdateAIAgentRequestInput.prototype, "ResponseByUserID", void 0);
44842
+ __decorate([
44843
+ Field({ nullable: true }),
44844
+ __metadata("design:type", Date)
44845
+ ], UpdateAIAgentRequestInput.prototype, "RespondedAt", void 0);
44846
+ __decorate([
44847
+ Field({ nullable: true }),
44848
+ __metadata("design:type", String)
44849
+ ], UpdateAIAgentRequestInput.prototype, "Comments", void 0);
44850
+ __decorate([
44851
+ Field(() => [KeyValuePairInput], { nullable: true }),
44852
+ __metadata("design:type", Array)
44853
+ ], UpdateAIAgentRequestInput.prototype, "OldValues___", void 0);
44854
+ UpdateAIAgentRequestInput = __decorate([
44855
+ InputType()
44856
+ ], UpdateAIAgentRequestInput);
44857
+ export { UpdateAIAgentRequestInput };
44858
+ let RunAIAgentRequestViewResult = class RunAIAgentRequestViewResult {
44859
+ Results;
44860
+ UserViewRunID;
44861
+ RowCount;
44862
+ TotalRowCount;
44863
+ ExecutionTime;
44864
+ ErrorMessage;
44865
+ Success;
44866
+ };
44867
+ __decorate([
44868
+ Field(() => [AIAgentRequest_]),
44869
+ __metadata("design:type", Array)
44870
+ ], RunAIAgentRequestViewResult.prototype, "Results", void 0);
44871
+ __decorate([
44872
+ Field(() => String, { nullable: true }),
44873
+ __metadata("design:type", String)
44874
+ ], RunAIAgentRequestViewResult.prototype, "UserViewRunID", void 0);
44875
+ __decorate([
44876
+ Field(() => Int, { nullable: true }),
44877
+ __metadata("design:type", Number)
44878
+ ], RunAIAgentRequestViewResult.prototype, "RowCount", void 0);
44879
+ __decorate([
44880
+ Field(() => Int, { nullable: true }),
44881
+ __metadata("design:type", Number)
44882
+ ], RunAIAgentRequestViewResult.prototype, "TotalRowCount", void 0);
44883
+ __decorate([
44884
+ Field(() => Int, { nullable: true }),
44885
+ __metadata("design:type", Number)
44886
+ ], RunAIAgentRequestViewResult.prototype, "ExecutionTime", void 0);
44887
+ __decorate([
44888
+ Field({ nullable: true }),
44889
+ __metadata("design:type", String)
44890
+ ], RunAIAgentRequestViewResult.prototype, "ErrorMessage", void 0);
44891
+ __decorate([
44892
+ Field(() => Boolean, { nullable: false }),
44893
+ __metadata("design:type", Boolean)
44894
+ ], RunAIAgentRequestViewResult.prototype, "Success", void 0);
44895
+ RunAIAgentRequestViewResult = __decorate([
44896
+ ObjectType()
44897
+ ], RunAIAgentRequestViewResult);
44898
+ export { RunAIAgentRequestViewResult };
44899
+ let AIAgentRequestResolver = class AIAgentRequestResolver extends ResolverBase {
44900
+ async RunAIAgentRequestViewByID(input, { dataSource, userPayload }, pubSub) {
44901
+ return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
44902
+ }
44903
+ async RunAIAgentRequestViewByName(input, { dataSource, userPayload }, pubSub) {
44904
+ return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
44905
+ }
44906
+ async RunAIAgentRequestDynamicView(input, { dataSource, userPayload }, pubSub) {
44907
+ input.EntityName = 'AI Agent Requests';
44908
+ return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
44909
+ }
44910
+ async AIAgentRequest(ID, { dataSource, userPayload }, pubSub) {
44911
+ this.CheckUserReadPermissions('AI Agent Requests', userPayload);
44912
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRequests] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Requests', userPayload, EntityPermissionType.Read, 'AND');
44913
+ const result = this.MapFieldNamesToCodeNames('AI Agent Requests', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
44914
+ return result;
44915
+ }
44916
+ async CreateAIAgentRequest(input, { dataSource, userPayload }, pubSub) {
44917
+ return this.CreateRecord('AI Agent Requests', input, dataSource, userPayload, pubSub);
44918
+ }
44919
+ async UpdateAIAgentRequest(input, { dataSource, userPayload }, pubSub) {
44920
+ return this.UpdateRecord('AI Agent Requests', input, dataSource, userPayload, pubSub);
44921
+ }
44922
+ async DeleteAIAgentRequest(ID, options, { dataSource, userPayload }, pubSub) {
44923
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
44924
+ return this.DeleteRecord('AI Agent Requests', key, options, dataSource, userPayload, pubSub);
44925
+ }
44926
+ };
44927
+ __decorate([
44928
+ Query(() => RunAIAgentRequestViewResult),
44929
+ __param(0, Arg('input', () => RunViewByIDInput)),
44930
+ __param(1, Ctx()),
44931
+ __param(2, PubSub()),
44932
+ __metadata("design:type", Function),
44933
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
44934
+ __metadata("design:returntype", Promise)
44935
+ ], AIAgentRequestResolver.prototype, "RunAIAgentRequestViewByID", null);
44936
+ __decorate([
44937
+ Query(() => RunAIAgentRequestViewResult),
44938
+ __param(0, Arg('input', () => RunViewByNameInput)),
44939
+ __param(1, Ctx()),
44940
+ __param(2, PubSub()),
44941
+ __metadata("design:type", Function),
44942
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
44943
+ __metadata("design:returntype", Promise)
44944
+ ], AIAgentRequestResolver.prototype, "RunAIAgentRequestViewByName", null);
44945
+ __decorate([
44946
+ Query(() => RunAIAgentRequestViewResult),
44947
+ __param(0, Arg('input', () => RunDynamicViewInput)),
44948
+ __param(1, Ctx()),
44949
+ __param(2, PubSub()),
44950
+ __metadata("design:type", Function),
44951
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
44952
+ __metadata("design:returntype", Promise)
44953
+ ], AIAgentRequestResolver.prototype, "RunAIAgentRequestDynamicView", null);
44954
+ __decorate([
44955
+ Query(() => AIAgentRequest_, { nullable: true }),
44956
+ __param(0, Arg('ID', () => String)),
44957
+ __param(1, Ctx()),
44958
+ __param(2, PubSub()),
44959
+ __metadata("design:type", Function),
44960
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
44961
+ __metadata("design:returntype", Promise)
44962
+ ], AIAgentRequestResolver.prototype, "AIAgentRequest", null);
44963
+ __decorate([
44964
+ Mutation(() => AIAgentRequest_),
44965
+ __param(0, Arg('input', () => CreateAIAgentRequestInput)),
44966
+ __param(1, Ctx()),
44967
+ __param(2, PubSub()),
44968
+ __metadata("design:type", Function),
44969
+ __metadata("design:paramtypes", [CreateAIAgentRequestInput, Object, PubSubEngine]),
44970
+ __metadata("design:returntype", Promise)
44971
+ ], AIAgentRequestResolver.prototype, "CreateAIAgentRequest", null);
44972
+ __decorate([
44973
+ Mutation(() => AIAgentRequest_),
44974
+ __param(0, Arg('input', () => UpdateAIAgentRequestInput)),
44975
+ __param(1, Ctx()),
44976
+ __param(2, PubSub()),
44977
+ __metadata("design:type", Function),
44978
+ __metadata("design:paramtypes", [UpdateAIAgentRequestInput, Object, PubSubEngine]),
44979
+ __metadata("design:returntype", Promise)
44980
+ ], AIAgentRequestResolver.prototype, "UpdateAIAgentRequest", null);
44981
+ __decorate([
44982
+ Mutation(() => AIAgentRequest_),
44983
+ __param(0, Arg('ID', () => String)),
44984
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
44985
+ __param(2, Ctx()),
44986
+ __param(3, PubSub()),
44987
+ __metadata("design:type", Function),
44988
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
44989
+ __metadata("design:returntype", Promise)
44990
+ ], AIAgentRequestResolver.prototype, "DeleteAIAgentRequest", null);
44991
+ AIAgentRequestResolver = __decorate([
44992
+ Resolver(AIAgentRequest_)
44993
+ ], AIAgentRequestResolver);
44994
+ export { AIAgentRequestResolver };
44535
44995
  let QueryEntity_ = class QueryEntity_ {
44536
44996
  ID;
44537
44997
  QueryID;
@@ -47951,24 +48411,24 @@ let AIAgentLearningCycleResolver = class AIAgentLearningCycleResolver extends Re
47951
48411
  return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
47952
48412
  }
47953
48413
  async RunAIAgentLearningCycleDynamicView(input, { dataSource, userPayload }, pubSub) {
47954
- input.EntityName = 'AIAgent Learning Cycles';
48414
+ input.EntityName = 'AI Agent Learning Cycles';
47955
48415
  return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
47956
48416
  }
47957
48417
  async AIAgentLearningCycle(ID, { dataSource, userPayload }, pubSub) {
47958
- this.CheckUserReadPermissions('AIAgent Learning Cycles', userPayload);
47959
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentLearningCycles] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Learning Cycles', userPayload, EntityPermissionType.Read, 'AND');
47960
- const result = this.MapFieldNamesToCodeNames('AIAgent Learning Cycles', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
48418
+ this.CheckUserReadPermissions('AI Agent Learning Cycles', userPayload);
48419
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentLearningCycles] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AI Agent Learning Cycles', userPayload, EntityPermissionType.Read, 'AND');
48420
+ const result = this.MapFieldNamesToCodeNames('AI Agent Learning Cycles', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
47961
48421
  return result;
47962
48422
  }
47963
48423
  async CreateAIAgentLearningCycle(input, { dataSource, userPayload }, pubSub) {
47964
- return this.CreateRecord('AIAgent Learning Cycles', input, dataSource, userPayload, pubSub);
48424
+ return this.CreateRecord('AI Agent Learning Cycles', input, dataSource, userPayload, pubSub);
47965
48425
  }
47966
48426
  async UpdateAIAgentLearningCycle(input, { dataSource, userPayload }, pubSub) {
47967
- return this.UpdateRecord('AIAgent Learning Cycles', input, dataSource, userPayload, pubSub);
48427
+ return this.UpdateRecord('AI Agent Learning Cycles', input, dataSource, userPayload, pubSub);
47968
48428
  }
47969
48429
  async DeleteAIAgentLearningCycle(ID, options, { dataSource, userPayload }, pubSub) {
47970
48430
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
47971
- return this.DeleteRecord('AIAgent Learning Cycles', key, options, dataSource, userPayload, pubSub);
48431
+ return this.DeleteRecord('AI Agent Learning Cycles', key, options, dataSource, userPayload, pubSub);
47972
48432
  }
47973
48433
  };
47974
48434
  __decorate([