@memberjunction/server 2.102.0 → 2.104.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/agents/skip-agent.d.ts +29 -0
  2. package/dist/agents/skip-agent.d.ts.map +1 -0
  3. package/dist/agents/skip-agent.js +143 -0
  4. package/dist/agents/skip-agent.js.map +1 -0
  5. package/dist/agents/skip-sdk.d.ts +47 -0
  6. package/dist/agents/skip-sdk.d.ts.map +1 -0
  7. package/dist/agents/skip-sdk.js +270 -0
  8. package/dist/agents/skip-sdk.js.map +1 -0
  9. package/dist/config.d.ts +9 -0
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +1 -0
  12. package/dist/config.js.map +1 -1
  13. package/dist/generated/generated.d.ts +121 -16
  14. package/dist/generated/generated.d.ts.map +1 -1
  15. package/dist/generated/generated.js +829 -120
  16. package/dist/generated/generated.js.map +1 -1
  17. package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
  18. package/dist/resolvers/AskSkipResolver.js +24 -9
  19. package/dist/resolvers/AskSkipResolver.js.map +1 -1
  20. package/dist/resolvers/ComponentRegistryResolver.d.ts +19 -0
  21. package/dist/resolvers/ComponentRegistryResolver.d.ts.map +1 -1
  22. package/dist/resolvers/ComponentRegistryResolver.js +140 -2
  23. package/dist/resolvers/ComponentRegistryResolver.js.map +1 -1
  24. package/dist/resolvers/RunAIAgentResolver.d.ts +3 -3
  25. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  26. package/dist/resolvers/RunAIAgentResolver.js +16 -13
  27. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  28. package/package.json +40 -40
  29. package/src/agents/skip-agent.ts +285 -0
  30. package/src/agents/skip-sdk.ts +543 -0
  31. package/src/config.ts +3 -2
  32. package/src/generated/generated.ts +544 -93
  33. package/src/resolvers/AskSkipResolver.ts +32 -10
  34. package/src/resolvers/ComponentRegistryResolver.ts +133 -4
  35. package/src/resolvers/RunAIAgentResolver.ts +16 -10
@@ -2493,8 +2493,8 @@ let AIAgentRun_ = class AIAgentRun_ {
2493
2493
  Configuration;
2494
2494
  OverrideModel;
2495
2495
  OverrideVendor;
2496
- MJ_AIAgentRunSteps_AgentRunIDArray;
2497
2496
  MJ_AIAgentRuns_ParentRunIDArray;
2497
+ MJ_AIAgentRunSteps_AgentRunIDArray;
2498
2498
  MJ_AIPromptRuns_AgentRunIDArray;
2499
2499
  };
2500
2500
  __decorate([
@@ -2702,14 +2702,14 @@ __decorate([
2702
2702
  MaxLength(100),
2703
2703
  __metadata("design:type", String)
2704
2704
  ], AIAgentRun_.prototype, "OverrideVendor", void 0);
2705
- __decorate([
2706
- Field(() => [AIAgentRunStep_]),
2707
- __metadata("design:type", Array)
2708
- ], AIAgentRun_.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", void 0);
2709
2705
  __decorate([
2710
2706
  Field(() => [AIAgentRun_]),
2711
2707
  __metadata("design:type", Array)
2712
2708
  ], AIAgentRun_.prototype, "MJ_AIAgentRuns_ParentRunIDArray", void 0);
2709
+ __decorate([
2710
+ Field(() => [AIAgentRunStep_]),
2711
+ __metadata("design:type", Array)
2712
+ ], AIAgentRun_.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", void 0);
2713
2713
  __decorate([
2714
2714
  Field(() => [AIPromptRun_]),
2715
2715
  __metadata("design:type", Array)
@@ -3169,22 +3169,22 @@ let AIAgentRunResolver = class AIAgentRunResolver extends ResolverBase {
3169
3169
  const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Runs', rows && rows.length > 0 ? rows[0] : {});
3170
3170
  return result;
3171
3171
  }
3172
- async MJ_AIAgentRunSteps_AgentRunIDArray(aiagentrun_, { dataSources, userPayload, providers }, pubSub) {
3173
- this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
3172
+ async MJ_AIAgentRuns_ParentRunIDArray(aiagentrun_, { dataSources, userPayload, providers }, pubSub) {
3173
+ this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
3174
3174
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
3175
3175
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
3176
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunSteps] WHERE [AgentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Steps', userPayload, EntityPermissionType.Read, 'AND');
3176
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [ParentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
3177
3177
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
3178
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Steps', rows);
3178
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
3179
3179
  return result;
3180
3180
  }
3181
- async MJ_AIAgentRuns_ParentRunIDArray(aiagentrun_, { dataSources, userPayload, providers }, pubSub) {
3182
- this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
3181
+ async MJ_AIAgentRunSteps_AgentRunIDArray(aiagentrun_, { dataSources, userPayload, providers }, pubSub) {
3182
+ this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
3183
3183
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
3184
3184
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
3185
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [ParentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
3185
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunSteps] WHERE [AgentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Steps', userPayload, EntityPermissionType.Read, 'AND');
3186
3186
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
3187
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
3187
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Steps', rows);
3188
3188
  return result;
3189
3189
  }
3190
3190
  async MJ_AIPromptRuns_AgentRunIDArray(aiagentrun_, { dataSources, userPayload, providers }, pubSub) {
@@ -3247,23 +3247,23 @@ __decorate([
3247
3247
  __metadata("design:returntype", Promise)
3248
3248
  ], AIAgentRunResolver.prototype, "AIAgentRun", null);
3249
3249
  __decorate([
3250
- FieldResolver(() => [AIAgentRunStep_]),
3250
+ FieldResolver(() => [AIAgentRun_]),
3251
3251
  __param(0, Root()),
3252
3252
  __param(1, Ctx()),
3253
3253
  __param(2, PubSub()),
3254
3254
  __metadata("design:type", Function),
3255
3255
  __metadata("design:paramtypes", [AIAgentRun_, Object, PubSubEngine]),
3256
3256
  __metadata("design:returntype", Promise)
3257
- ], AIAgentRunResolver.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", null);
3257
+ ], AIAgentRunResolver.prototype, "MJ_AIAgentRuns_ParentRunIDArray", null);
3258
3258
  __decorate([
3259
- FieldResolver(() => [AIAgentRun_]),
3259
+ FieldResolver(() => [AIAgentRunStep_]),
3260
3260
  __param(0, Root()),
3261
3261
  __param(1, Ctx()),
3262
3262
  __param(2, PubSub()),
3263
3263
  __metadata("design:type", Function),
3264
3264
  __metadata("design:paramtypes", [AIAgentRun_, Object, PubSubEngine]),
3265
3265
  __metadata("design:returntype", Promise)
3266
- ], AIAgentRunResolver.prototype, "MJ_AIAgentRuns_ParentRunIDArray", null);
3266
+ ], AIAgentRunResolver.prototype, "MJ_AIAgentRunSteps_AgentRunIDArray", null);
3267
3267
  __decorate([
3268
3268
  FieldResolver(() => [AIPromptRun_]),
3269
3269
  __param(0, Root()),
@@ -3313,8 +3313,8 @@ let AIVendor_ = class AIVendor_ {
3313
3313
  _mj__UpdatedAt;
3314
3314
  MJ_AIPromptModels_VendorIDArray;
3315
3315
  AIResultCache_VendorIDArray;
3316
- MJ_AIModelVendors_VendorIDArray;
3317
3316
  MJ_AIPromptRuns_VendorIDArray;
3317
+ MJ_AIModelVendors_VendorIDArray;
3318
3318
  MJ_AIVendorTypes_VendorIDArray;
3319
3319
  MJ_AIModelCosts_VendorIDArray;
3320
3320
  MJ_AIAgentRuns_OverrideVendorIDArray;
@@ -3351,14 +3351,14 @@ __decorate([
3351
3351
  Field(() => [AIResultCache_]),
3352
3352
  __metadata("design:type", Array)
3353
3353
  ], AIVendor_.prototype, "AIResultCache_VendorIDArray", void 0);
3354
- __decorate([
3355
- Field(() => [AIModelVendor_]),
3356
- __metadata("design:type", Array)
3357
- ], AIVendor_.prototype, "MJ_AIModelVendors_VendorIDArray", void 0);
3358
3354
  __decorate([
3359
3355
  Field(() => [AIPromptRun_]),
3360
3356
  __metadata("design:type", Array)
3361
3357
  ], AIVendor_.prototype, "MJ_AIPromptRuns_VendorIDArray", void 0);
3358
+ __decorate([
3359
+ Field(() => [AIModelVendor_]),
3360
+ __metadata("design:type", Array)
3361
+ ], AIVendor_.prototype, "MJ_AIModelVendors_VendorIDArray", void 0);
3362
3362
  __decorate([
3363
3363
  Field(() => [AIVendorType_]),
3364
3364
  __metadata("design:type", Array)
@@ -3504,22 +3504,22 @@ let AIVendorResolver = class AIVendorResolver extends ResolverBase {
3504
3504
  const result = this.ArrayMapFieldNamesToCodeNames('AI Result Cache', rows);
3505
3505
  return result;
3506
3506
  }
3507
- async MJ_AIModelVendors_VendorIDArray(aivendor_, { dataSources, userPayload, providers }, pubSub) {
3508
- this.CheckUserReadPermissions('MJ: AI Model Vendors', userPayload);
3507
+ async MJ_AIPromptRuns_VendorIDArray(aivendor_, { dataSources, userPayload, providers }, pubSub) {
3508
+ this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
3509
3509
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
3510
3510
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
3511
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelVendors] WHERE [VendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Vendors', userPayload, EntityPermissionType.Read, 'AND');
3511
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [VendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
3512
3512
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
3513
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Vendors', rows);
3513
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
3514
3514
  return result;
3515
3515
  }
3516
- async MJ_AIPromptRuns_VendorIDArray(aivendor_, { dataSources, userPayload, providers }, pubSub) {
3517
- this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
3516
+ async MJ_AIModelVendors_VendorIDArray(aivendor_, { dataSources, userPayload, providers }, pubSub) {
3517
+ this.CheckUserReadPermissions('MJ: AI Model Vendors', userPayload);
3518
3518
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
3519
3519
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
3520
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [VendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
3520
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelVendors] WHERE [VendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Vendors', userPayload, EntityPermissionType.Read, 'AND');
3521
3521
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
3522
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
3522
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Vendors', rows);
3523
3523
  return result;
3524
3524
  }
3525
3525
  async MJ_AIVendorTypes_VendorIDArray(aivendor_, { dataSources, userPayload, providers }, pubSub) {
@@ -3618,23 +3618,23 @@ __decorate([
3618
3618
  __metadata("design:returntype", Promise)
3619
3619
  ], AIVendorResolver.prototype, "AIResultCache_VendorIDArray", null);
3620
3620
  __decorate([
3621
- FieldResolver(() => [AIModelVendor_]),
3621
+ FieldResolver(() => [AIPromptRun_]),
3622
3622
  __param(0, Root()),
3623
3623
  __param(1, Ctx()),
3624
3624
  __param(2, PubSub()),
3625
3625
  __metadata("design:type", Function),
3626
3626
  __metadata("design:paramtypes", [AIVendor_, Object, PubSubEngine]),
3627
3627
  __metadata("design:returntype", Promise)
3628
- ], AIVendorResolver.prototype, "MJ_AIModelVendors_VendorIDArray", null);
3628
+ ], AIVendorResolver.prototype, "MJ_AIPromptRuns_VendorIDArray", null);
3629
3629
  __decorate([
3630
- FieldResolver(() => [AIPromptRun_]),
3630
+ FieldResolver(() => [AIModelVendor_]),
3631
3631
  __param(0, Root()),
3632
3632
  __param(1, Ctx()),
3633
3633
  __param(2, PubSub()),
3634
3634
  __metadata("design:type", Function),
3635
3635
  __metadata("design:paramtypes", [AIVendor_, Object, PubSubEngine]),
3636
3636
  __metadata("design:returntype", Promise)
3637
- ], AIVendorResolver.prototype, "MJ_AIPromptRuns_VendorIDArray", null);
3637
+ ], AIVendorResolver.prototype, "MJ_AIModelVendors_VendorIDArray", null);
3638
3638
  __decorate([
3639
3639
  FieldResolver(() => [AIVendorType_]),
3640
3640
  __param(0, Root()),
@@ -3959,9 +3959,9 @@ let AIConfiguration_ = class AIConfiguration_ {
3959
3959
  DefaultPromptForContextSummarization;
3960
3960
  MJ_AIConfigurationParams_ConfigurationIDArray;
3961
3961
  MJ_AIAgentPrompts_ConfigurationIDArray;
3962
- MJ_AIPromptModels_ConfigurationIDArray;
3963
- AIResultCache_ConfigurationIDArray;
3964
3962
  MJ_AIPromptRuns_ConfigurationIDArray;
3963
+ AIResultCache_ConfigurationIDArray;
3964
+ MJ_AIPromptModels_ConfigurationIDArray;
3965
3965
  MJ_AIAgentRuns_ConfigurationIDArray;
3966
3966
  };
3967
3967
  __decorate([
@@ -4026,17 +4026,17 @@ __decorate([
4026
4026
  __metadata("design:type", Array)
4027
4027
  ], AIConfiguration_.prototype, "MJ_AIAgentPrompts_ConfigurationIDArray", void 0);
4028
4028
  __decorate([
4029
- Field(() => [AIPromptModel_]),
4029
+ Field(() => [AIPromptRun_]),
4030
4030
  __metadata("design:type", Array)
4031
- ], AIConfiguration_.prototype, "MJ_AIPromptModels_ConfigurationIDArray", void 0);
4031
+ ], AIConfiguration_.prototype, "MJ_AIPromptRuns_ConfigurationIDArray", void 0);
4032
4032
  __decorate([
4033
4033
  Field(() => [AIResultCache_]),
4034
4034
  __metadata("design:type", Array)
4035
4035
  ], AIConfiguration_.prototype, "AIResultCache_ConfigurationIDArray", void 0);
4036
4036
  __decorate([
4037
- Field(() => [AIPromptRun_]),
4037
+ Field(() => [AIPromptModel_]),
4038
4038
  __metadata("design:type", Array)
4039
- ], AIConfiguration_.prototype, "MJ_AIPromptRuns_ConfigurationIDArray", void 0);
4039
+ ], AIConfiguration_.prototype, "MJ_AIPromptModels_ConfigurationIDArray", void 0);
4040
4040
  __decorate([
4041
4041
  Field(() => [AIAgentRun_]),
4042
4042
  __metadata("design:type", Array)
@@ -4214,13 +4214,13 @@ let AIConfigurationResolver = class AIConfigurationResolver extends ResolverBase
4214
4214
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
4215
4215
  return result;
4216
4216
  }
4217
- async MJ_AIPromptModels_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
4218
- this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
4217
+ async MJ_AIPromptRuns_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
4218
+ this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
4219
4219
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4220
4220
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
4221
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
4221
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
4222
4222
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
4223
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows);
4223
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
4224
4224
  return result;
4225
4225
  }
4226
4226
  async AIResultCache_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
@@ -4232,13 +4232,13 @@ let AIConfigurationResolver = class AIConfigurationResolver extends ResolverBase
4232
4232
  const result = this.ArrayMapFieldNamesToCodeNames('AI Result Cache', rows);
4233
4233
  return result;
4234
4234
  }
4235
- async MJ_AIPromptRuns_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
4236
- this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
4235
+ async MJ_AIPromptModels_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
4236
+ this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
4237
4237
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4238
4238
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
4239
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
4239
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
4240
4240
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
4241
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
4241
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows);
4242
4242
  return result;
4243
4243
  }
4244
4244
  async MJ_AIAgentRuns_ConfigurationIDArray(aiconfiguration_, { dataSources, userPayload, providers }, pubSub) {
@@ -4319,14 +4319,14 @@ __decorate([
4319
4319
  __metadata("design:returntype", Promise)
4320
4320
  ], AIConfigurationResolver.prototype, "MJ_AIAgentPrompts_ConfigurationIDArray", null);
4321
4321
  __decorate([
4322
- FieldResolver(() => [AIPromptModel_]),
4322
+ FieldResolver(() => [AIPromptRun_]),
4323
4323
  __param(0, Root()),
4324
4324
  __param(1, Ctx()),
4325
4325
  __param(2, PubSub()),
4326
4326
  __metadata("design:type", Function),
4327
4327
  __metadata("design:paramtypes", [AIConfiguration_, Object, PubSubEngine]),
4328
4328
  __metadata("design:returntype", Promise)
4329
- ], AIConfigurationResolver.prototype, "MJ_AIPromptModels_ConfigurationIDArray", null);
4329
+ ], AIConfigurationResolver.prototype, "MJ_AIPromptRuns_ConfigurationIDArray", null);
4330
4330
  __decorate([
4331
4331
  FieldResolver(() => [AIResultCache_]),
4332
4332
  __param(0, Root()),
@@ -4337,14 +4337,14 @@ __decorate([
4337
4337
  __metadata("design:returntype", Promise)
4338
4338
  ], AIConfigurationResolver.prototype, "AIResultCache_ConfigurationIDArray", null);
4339
4339
  __decorate([
4340
- FieldResolver(() => [AIPromptRun_]),
4340
+ FieldResolver(() => [AIPromptModel_]),
4341
4341
  __param(0, Root()),
4342
4342
  __param(1, Ctx()),
4343
4343
  __param(2, PubSub()),
4344
4344
  __metadata("design:type", Function),
4345
4345
  __metadata("design:paramtypes", [AIConfiguration_, Object, PubSubEngine]),
4346
4346
  __metadata("design:returntype", Promise)
4347
- ], AIConfigurationResolver.prototype, "MJ_AIPromptRuns_ConfigurationIDArray", null);
4347
+ ], AIConfigurationResolver.prototype, "MJ_AIPromptModels_ConfigurationIDArray", null);
4348
4348
  __decorate([
4349
4349
  FieldResolver(() => [AIAgentRun_]),
4350
4350
  __param(0, Root()),
@@ -4427,8 +4427,8 @@ let AIAgent_ = class AIAgent_ {
4427
4427
  Parent;
4428
4428
  ContextCompressionPrompt;
4429
4429
  Type;
4430
- AIAgentActions_AgentIDArray;
4431
4430
  AIAgentModels_AgentIDArray;
4431
+ AIAgentActions_AgentIDArray;
4432
4432
  AIAgentLearningCycles_AgentIDArray;
4433
4433
  AIAgentRequests_AgentIDArray;
4434
4434
  MJ_AIAgentSteps_AgentIDArray;
@@ -4441,6 +4441,7 @@ let AIAgent_ = class AIAgent_ {
4441
4441
  MJ_Tasks_AgentIDArray;
4442
4442
  AIResultCache_AgentIDArray;
4443
4443
  MJ_AIPromptRuns_AgentIDArray;
4444
+ ConversationDetails_AgentIDArray;
4444
4445
  AIAgents_ParentIDArray;
4445
4446
  };
4446
4447
  __decorate([
@@ -4629,14 +4630,14 @@ __decorate([
4629
4630
  MaxLength(200),
4630
4631
  __metadata("design:type", String)
4631
4632
  ], AIAgent_.prototype, "Type", void 0);
4632
- __decorate([
4633
- Field(() => [AIAgentAction_]),
4634
- __metadata("design:type", Array)
4635
- ], AIAgent_.prototype, "AIAgentActions_AgentIDArray", void 0);
4636
4633
  __decorate([
4637
4634
  Field(() => [AIAgentModel_]),
4638
4635
  __metadata("design:type", Array)
4639
4636
  ], AIAgent_.prototype, "AIAgentModels_AgentIDArray", void 0);
4637
+ __decorate([
4638
+ Field(() => [AIAgentAction_]),
4639
+ __metadata("design:type", Array)
4640
+ ], AIAgent_.prototype, "AIAgentActions_AgentIDArray", void 0);
4640
4641
  __decorate([
4641
4642
  Field(() => [AIAgentLearningCycle_]),
4642
4643
  __metadata("design:type", Array)
@@ -4685,6 +4686,10 @@ __decorate([
4685
4686
  Field(() => [AIPromptRun_]),
4686
4687
  __metadata("design:type", Array)
4687
4688
  ], AIAgent_.prototype, "MJ_AIPromptRuns_AgentIDArray", void 0);
4689
+ __decorate([
4690
+ Field(() => [ConversationDetail_]),
4691
+ __metadata("design:type", Array)
4692
+ ], AIAgent_.prototype, "ConversationDetails_AgentIDArray", void 0);
4688
4693
  __decorate([
4689
4694
  Field(() => [AIAgent_]),
4690
4695
  __metadata("design:type", Array)
@@ -5124,22 +5129,22 @@ let AIAgentResolver = class AIAgentResolver extends ResolverBase {
5124
5129
  const result = this.MapFieldNamesToCodeNames('AI Agents', rows && rows.length > 0 ? rows[0] : {});
5125
5130
  return result;
5126
5131
  }
5127
- async AIAgentActions_AgentIDArray(aiagent_, { dataSources, userPayload, providers }, pubSub) {
5128
- this.CheckUserReadPermissions('AI Agent Actions', userPayload);
5132
+ async AIAgentModels_AgentIDArray(aiagent_, { dataSources, userPayload, providers }, pubSub) {
5133
+ this.CheckUserReadPermissions('AI Agent Models', userPayload);
5129
5134
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5130
5135
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
5131
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Actions', userPayload, EntityPermissionType.Read, 'AND');
5136
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
5132
5137
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
5133
- const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Actions', rows);
5138
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', rows);
5134
5139
  return result;
5135
5140
  }
5136
- async AIAgentModels_AgentIDArray(aiagent_, { dataSources, userPayload, providers }, pubSub) {
5137
- this.CheckUserReadPermissions('AI Agent Models', userPayload);
5141
+ async AIAgentActions_AgentIDArray(aiagent_, { dataSources, userPayload, providers }, pubSub) {
5142
+ this.CheckUserReadPermissions('AI Agent Actions', userPayload);
5138
5143
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5139
5144
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
5140
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
5145
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Actions', userPayload, EntityPermissionType.Read, 'AND');
5141
5146
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
5142
- const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', rows);
5147
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Actions', rows);
5143
5148
  return result;
5144
5149
  }
5145
5150
  async AIAgentLearningCycles_AgentIDArray(aiagent_, { dataSources, userPayload, providers }, pubSub) {
@@ -5250,6 +5255,15 @@ let AIAgentResolver = class AIAgentResolver extends ResolverBase {
5250
5255
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
5251
5256
  return result;
5252
5257
  }
5258
+ async ConversationDetails_AgentIDArray(aiagent_, { dataSources, userPayload, providers }, pubSub) {
5259
+ this.CheckUserReadPermissions('Conversation Details', userPayload);
5260
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5261
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
5262
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetails] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
5263
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
5264
+ const result = this.ArrayMapFieldNamesToCodeNames('Conversation Details', rows);
5265
+ return result;
5266
+ }
5253
5267
  async AIAgents_ParentIDArray(aiagent_, { dataSources, userPayload, providers }, pubSub) {
5254
5268
  this.CheckUserReadPermissions('AI Agents', userPayload);
5255
5269
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -5310,23 +5324,23 @@ __decorate([
5310
5324
  __metadata("design:returntype", Promise)
5311
5325
  ], AIAgentResolver.prototype, "AIAgent", null);
5312
5326
  __decorate([
5313
- FieldResolver(() => [AIAgentAction_]),
5327
+ FieldResolver(() => [AIAgentModel_]),
5314
5328
  __param(0, Root()),
5315
5329
  __param(1, Ctx()),
5316
5330
  __param(2, PubSub()),
5317
5331
  __metadata("design:type", Function),
5318
5332
  __metadata("design:paramtypes", [AIAgent_, Object, PubSubEngine]),
5319
5333
  __metadata("design:returntype", Promise)
5320
- ], AIAgentResolver.prototype, "AIAgentActions_AgentIDArray", null);
5334
+ ], AIAgentResolver.prototype, "AIAgentModels_AgentIDArray", null);
5321
5335
  __decorate([
5322
- FieldResolver(() => [AIAgentModel_]),
5336
+ FieldResolver(() => [AIAgentAction_]),
5323
5337
  __param(0, Root()),
5324
5338
  __param(1, Ctx()),
5325
5339
  __param(2, PubSub()),
5326
5340
  __metadata("design:type", Function),
5327
5341
  __metadata("design:paramtypes", [AIAgent_, Object, PubSubEngine]),
5328
5342
  __metadata("design:returntype", Promise)
5329
- ], AIAgentResolver.prototype, "AIAgentModels_AgentIDArray", null);
5343
+ ], AIAgentResolver.prototype, "AIAgentActions_AgentIDArray", null);
5330
5344
  __decorate([
5331
5345
  FieldResolver(() => [AIAgentLearningCycle_]),
5332
5346
  __param(0, Root()),
@@ -5435,6 +5449,15 @@ __decorate([
5435
5449
  __metadata("design:paramtypes", [AIAgent_, Object, PubSubEngine]),
5436
5450
  __metadata("design:returntype", Promise)
5437
5451
  ], AIAgentResolver.prototype, "MJ_AIPromptRuns_AgentIDArray", null);
5452
+ __decorate([
5453
+ FieldResolver(() => [ConversationDetail_]),
5454
+ __param(0, Root()),
5455
+ __param(1, Ctx()),
5456
+ __param(2, PubSub()),
5457
+ __metadata("design:type", Function),
5458
+ __metadata("design:paramtypes", [AIAgent_, Object, PubSubEngine]),
5459
+ __metadata("design:returntype", Promise)
5460
+ ], AIAgentResolver.prototype, "ConversationDetails_AgentIDArray", null);
5438
5461
  __decorate([
5439
5462
  FieldResolver(() => [AIAgent_]),
5440
5463
  __param(0, Root()),
@@ -8448,6 +8471,262 @@ TaskDependencyResolver = __decorate([
8448
8471
  Resolver(TaskDependency_)
8449
8472
  ], TaskDependencyResolver);
8450
8473
  export { TaskDependencyResolver };
8474
+ let CollectionArtifact_ = class CollectionArtifact_ {
8475
+ ID;
8476
+ CollectionID;
8477
+ ArtifactID;
8478
+ Sequence;
8479
+ _mj__CreatedAt;
8480
+ _mj__UpdatedAt;
8481
+ Collection;
8482
+ Artifact;
8483
+ };
8484
+ __decorate([
8485
+ Field(),
8486
+ MaxLength(16),
8487
+ __metadata("design:type", String)
8488
+ ], CollectionArtifact_.prototype, "ID", void 0);
8489
+ __decorate([
8490
+ Field(),
8491
+ MaxLength(16),
8492
+ __metadata("design:type", String)
8493
+ ], CollectionArtifact_.prototype, "CollectionID", void 0);
8494
+ __decorate([
8495
+ Field(),
8496
+ MaxLength(16),
8497
+ __metadata("design:type", String)
8498
+ ], CollectionArtifact_.prototype, "ArtifactID", void 0);
8499
+ __decorate([
8500
+ Field(() => Int, { description: `Sequence number for ordering artifacts within a collection` }),
8501
+ __metadata("design:type", Number)
8502
+ ], CollectionArtifact_.prototype, "Sequence", void 0);
8503
+ __decorate([
8504
+ Field(),
8505
+ MaxLength(10),
8506
+ __metadata("design:type", Date)
8507
+ ], CollectionArtifact_.prototype, "_mj__CreatedAt", void 0);
8508
+ __decorate([
8509
+ Field(),
8510
+ MaxLength(10),
8511
+ __metadata("design:type", Date)
8512
+ ], CollectionArtifact_.prototype, "_mj__UpdatedAt", void 0);
8513
+ __decorate([
8514
+ Field(),
8515
+ MaxLength(510),
8516
+ __metadata("design:type", String)
8517
+ ], CollectionArtifact_.prototype, "Collection", void 0);
8518
+ __decorate([
8519
+ Field(),
8520
+ MaxLength(510),
8521
+ __metadata("design:type", String)
8522
+ ], CollectionArtifact_.prototype, "Artifact", void 0);
8523
+ CollectionArtifact_ = __decorate([
8524
+ ObjectType({ description: `Join table that establishes many-to-many relationships between Collections and Artifacts, allowing artifacts to be organized within collections` })
8525
+ ], CollectionArtifact_);
8526
+ export { CollectionArtifact_ };
8527
+ let CreateCollectionArtifactInput = class CreateCollectionArtifactInput {
8528
+ ID;
8529
+ CollectionID;
8530
+ ArtifactID;
8531
+ Sequence;
8532
+ };
8533
+ __decorate([
8534
+ Field({ nullable: true }),
8535
+ __metadata("design:type", String)
8536
+ ], CreateCollectionArtifactInput.prototype, "ID", void 0);
8537
+ __decorate([
8538
+ Field({ nullable: true }),
8539
+ __metadata("design:type", String)
8540
+ ], CreateCollectionArtifactInput.prototype, "CollectionID", void 0);
8541
+ __decorate([
8542
+ Field({ nullable: true }),
8543
+ __metadata("design:type", String)
8544
+ ], CreateCollectionArtifactInput.prototype, "ArtifactID", void 0);
8545
+ __decorate([
8546
+ Field(() => Int, { nullable: true }),
8547
+ __metadata("design:type", Number)
8548
+ ], CreateCollectionArtifactInput.prototype, "Sequence", void 0);
8549
+ CreateCollectionArtifactInput = __decorate([
8550
+ InputType()
8551
+ ], CreateCollectionArtifactInput);
8552
+ export { CreateCollectionArtifactInput };
8553
+ let UpdateCollectionArtifactInput = class UpdateCollectionArtifactInput {
8554
+ ID;
8555
+ CollectionID;
8556
+ ArtifactID;
8557
+ Sequence;
8558
+ OldValues___;
8559
+ };
8560
+ __decorate([
8561
+ Field(),
8562
+ __metadata("design:type", String)
8563
+ ], UpdateCollectionArtifactInput.prototype, "ID", void 0);
8564
+ __decorate([
8565
+ Field({ nullable: true }),
8566
+ __metadata("design:type", String)
8567
+ ], UpdateCollectionArtifactInput.prototype, "CollectionID", void 0);
8568
+ __decorate([
8569
+ Field({ nullable: true }),
8570
+ __metadata("design:type", String)
8571
+ ], UpdateCollectionArtifactInput.prototype, "ArtifactID", void 0);
8572
+ __decorate([
8573
+ Field(() => Int, { nullable: true }),
8574
+ __metadata("design:type", Number)
8575
+ ], UpdateCollectionArtifactInput.prototype, "Sequence", void 0);
8576
+ __decorate([
8577
+ Field(() => [KeyValuePairInput], { nullable: true }),
8578
+ __metadata("design:type", Array)
8579
+ ], UpdateCollectionArtifactInput.prototype, "OldValues___", void 0);
8580
+ UpdateCollectionArtifactInput = __decorate([
8581
+ InputType()
8582
+ ], UpdateCollectionArtifactInput);
8583
+ export { UpdateCollectionArtifactInput };
8584
+ let RunCollectionArtifactViewResult = class RunCollectionArtifactViewResult {
8585
+ Results;
8586
+ UserViewRunID;
8587
+ RowCount;
8588
+ TotalRowCount;
8589
+ ExecutionTime;
8590
+ ErrorMessage;
8591
+ Success;
8592
+ };
8593
+ __decorate([
8594
+ Field(() => [CollectionArtifact_]),
8595
+ __metadata("design:type", Array)
8596
+ ], RunCollectionArtifactViewResult.prototype, "Results", void 0);
8597
+ __decorate([
8598
+ Field(() => String, { nullable: true }),
8599
+ __metadata("design:type", String)
8600
+ ], RunCollectionArtifactViewResult.prototype, "UserViewRunID", void 0);
8601
+ __decorate([
8602
+ Field(() => Int, { nullable: true }),
8603
+ __metadata("design:type", Number)
8604
+ ], RunCollectionArtifactViewResult.prototype, "RowCount", void 0);
8605
+ __decorate([
8606
+ Field(() => Int, { nullable: true }),
8607
+ __metadata("design:type", Number)
8608
+ ], RunCollectionArtifactViewResult.prototype, "TotalRowCount", void 0);
8609
+ __decorate([
8610
+ Field(() => Int, { nullable: true }),
8611
+ __metadata("design:type", Number)
8612
+ ], RunCollectionArtifactViewResult.prototype, "ExecutionTime", void 0);
8613
+ __decorate([
8614
+ Field({ nullable: true }),
8615
+ __metadata("design:type", String)
8616
+ ], RunCollectionArtifactViewResult.prototype, "ErrorMessage", void 0);
8617
+ __decorate([
8618
+ Field(() => Boolean, { nullable: false }),
8619
+ __metadata("design:type", Boolean)
8620
+ ], RunCollectionArtifactViewResult.prototype, "Success", void 0);
8621
+ RunCollectionArtifactViewResult = __decorate([
8622
+ ObjectType()
8623
+ ], RunCollectionArtifactViewResult);
8624
+ export { RunCollectionArtifactViewResult };
8625
+ let CollectionArtifactResolver = class CollectionArtifactResolver extends ResolverBase {
8626
+ async RunCollectionArtifactViewByID(input, { providers, userPayload }, pubSub) {
8627
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8628
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
8629
+ }
8630
+ async RunCollectionArtifactViewByName(input, { providers, userPayload }, pubSub) {
8631
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8632
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
8633
+ }
8634
+ async RunCollectionArtifactDynamicView(input, { providers, userPayload }, pubSub) {
8635
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8636
+ input.EntityName = 'MJ: Collection Artifacts';
8637
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
8638
+ }
8639
+ async CollectionArtifact(ID, { dataSources, userPayload, providers }, pubSub) {
8640
+ this.CheckUserReadPermissions('MJ: Collection Artifacts', userPayload);
8641
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8642
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
8643
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionArtifacts] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Artifacts', userPayload, EntityPermissionType.Read, 'AND');
8644
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
8645
+ const result = this.MapFieldNamesToCodeNames('MJ: Collection Artifacts', rows && rows.length > 0 ? rows[0] : {});
8646
+ return result;
8647
+ }
8648
+ async CreateCollectionArtifact(input, { providers, userPayload }, pubSub) {
8649
+ const provider = GetReadWriteProvider(providers);
8650
+ return this.CreateRecord('MJ: Collection Artifacts', input, provider, userPayload, pubSub);
8651
+ }
8652
+ async UpdateCollectionArtifact(input, { providers, userPayload }, pubSub) {
8653
+ const provider = GetReadWriteProvider(providers);
8654
+ return this.UpdateRecord('MJ: Collection Artifacts', input, provider, userPayload, pubSub);
8655
+ }
8656
+ async DeleteCollectionArtifact(ID, options, { providers, userPayload }, pubSub) {
8657
+ const provider = GetReadWriteProvider(providers);
8658
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
8659
+ return this.DeleteRecord('MJ: Collection Artifacts', key, options, provider, userPayload, pubSub);
8660
+ }
8661
+ };
8662
+ __decorate([
8663
+ Query(() => RunCollectionArtifactViewResult),
8664
+ __param(0, Arg('input', () => RunViewByIDInput)),
8665
+ __param(1, Ctx()),
8666
+ __param(2, PubSub()),
8667
+ __metadata("design:type", Function),
8668
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
8669
+ __metadata("design:returntype", Promise)
8670
+ ], CollectionArtifactResolver.prototype, "RunCollectionArtifactViewByID", null);
8671
+ __decorate([
8672
+ Query(() => RunCollectionArtifactViewResult),
8673
+ __param(0, Arg('input', () => RunViewByNameInput)),
8674
+ __param(1, Ctx()),
8675
+ __param(2, PubSub()),
8676
+ __metadata("design:type", Function),
8677
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
8678
+ __metadata("design:returntype", Promise)
8679
+ ], CollectionArtifactResolver.prototype, "RunCollectionArtifactViewByName", null);
8680
+ __decorate([
8681
+ Query(() => RunCollectionArtifactViewResult),
8682
+ __param(0, Arg('input', () => RunDynamicViewInput)),
8683
+ __param(1, Ctx()),
8684
+ __param(2, PubSub()),
8685
+ __metadata("design:type", Function),
8686
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
8687
+ __metadata("design:returntype", Promise)
8688
+ ], CollectionArtifactResolver.prototype, "RunCollectionArtifactDynamicView", null);
8689
+ __decorate([
8690
+ Query(() => CollectionArtifact_, { nullable: true }),
8691
+ __param(0, Arg('ID', () => String)),
8692
+ __param(1, Ctx()),
8693
+ __param(2, PubSub()),
8694
+ __metadata("design:type", Function),
8695
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
8696
+ __metadata("design:returntype", Promise)
8697
+ ], CollectionArtifactResolver.prototype, "CollectionArtifact", null);
8698
+ __decorate([
8699
+ Mutation(() => CollectionArtifact_),
8700
+ __param(0, Arg('input', () => CreateCollectionArtifactInput)),
8701
+ __param(1, Ctx()),
8702
+ __param(2, PubSub()),
8703
+ __metadata("design:type", Function),
8704
+ __metadata("design:paramtypes", [CreateCollectionArtifactInput, Object, PubSubEngine]),
8705
+ __metadata("design:returntype", Promise)
8706
+ ], CollectionArtifactResolver.prototype, "CreateCollectionArtifact", null);
8707
+ __decorate([
8708
+ Mutation(() => CollectionArtifact_),
8709
+ __param(0, Arg('input', () => UpdateCollectionArtifactInput)),
8710
+ __param(1, Ctx()),
8711
+ __param(2, PubSub()),
8712
+ __metadata("design:type", Function),
8713
+ __metadata("design:paramtypes", [UpdateCollectionArtifactInput, Object, PubSubEngine]),
8714
+ __metadata("design:returntype", Promise)
8715
+ ], CollectionArtifactResolver.prototype, "UpdateCollectionArtifact", null);
8716
+ __decorate([
8717
+ Mutation(() => CollectionArtifact_),
8718
+ __param(0, Arg('ID', () => String)),
8719
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
8720
+ __param(2, Ctx()),
8721
+ __param(3, PubSub()),
8722
+ __metadata("design:type", Function),
8723
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
8724
+ __metadata("design:returntype", Promise)
8725
+ ], CollectionArtifactResolver.prototype, "DeleteCollectionArtifact", null);
8726
+ CollectionArtifactResolver = __decorate([
8727
+ Resolver(CollectionArtifact_)
8728
+ ], CollectionArtifactResolver);
8729
+ export { CollectionArtifactResolver };
8451
8730
  let AIModelPriceType_ = class AIModelPriceType_ {
8452
8731
  ID;
8453
8732
  Name;
@@ -8712,6 +8991,7 @@ let Collection_ = class Collection_ {
8712
8991
  _mj__UpdatedAt;
8713
8992
  Environment;
8714
8993
  Parent;
8994
+ MJ_CollectionArtifacts_CollectionIDArray;
8715
8995
  MJ_Collections_ParentIDArray;
8716
8996
  };
8717
8997
  __decorate([
@@ -8772,6 +9052,10 @@ __decorate([
8772
9052
  MaxLength(510),
8773
9053
  __metadata("design:type", String)
8774
9054
  ], Collection_.prototype, "Parent", void 0);
9055
+ __decorate([
9056
+ Field(() => [CollectionArtifact_]),
9057
+ __metadata("design:type", Array)
9058
+ ], Collection_.prototype, "MJ_CollectionArtifacts_CollectionIDArray", void 0);
8775
9059
  __decorate([
8776
9060
  Field(() => [Collection_]),
8777
9061
  __metadata("design:type", Array)
@@ -8941,6 +9225,15 @@ let CollectionResolver = class CollectionResolver extends ResolverBase {
8941
9225
  const result = this.MapFieldNamesToCodeNames('MJ: Collections', rows && rows.length > 0 ? rows[0] : {});
8942
9226
  return result;
8943
9227
  }
9228
+ async MJ_CollectionArtifacts_CollectionIDArray(collection_, { dataSources, userPayload, providers }, pubSub) {
9229
+ this.CheckUserReadPermissions('MJ: Collection Artifacts', userPayload);
9230
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
9231
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
9232
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionArtifacts] WHERE [CollectionID]='${collection_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Artifacts', userPayload, EntityPermissionType.Read, 'AND');
9233
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
9234
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Artifacts', rows);
9235
+ return result;
9236
+ }
8944
9237
  async MJ_Collections_ParentIDArray(collection_, { dataSources, userPayload, providers }, pubSub) {
8945
9238
  this.CheckUserReadPermissions('MJ: Collections', userPayload);
8946
9239
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -9000,6 +9293,15 @@ __decorate([
9000
9293
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
9001
9294
  __metadata("design:returntype", Promise)
9002
9295
  ], CollectionResolver.prototype, "Collection", null);
9296
+ __decorate([
9297
+ FieldResolver(() => [CollectionArtifact_]),
9298
+ __param(0, Root()),
9299
+ __param(1, Ctx()),
9300
+ __param(2, PubSub()),
9301
+ __metadata("design:type", Function),
9302
+ __metadata("design:paramtypes", [Collection_, Object, PubSubEngine]),
9303
+ __metadata("design:returntype", Promise)
9304
+ ], CollectionResolver.prototype, "MJ_CollectionArtifacts_CollectionIDArray", null);
9003
9305
  __decorate([
9004
9306
  FieldResolver(() => [Collection_]),
9005
9307
  __param(0, Root()),
@@ -9422,8 +9724,8 @@ let AIPrompt_ = class AIPrompt_ {
9422
9724
  MJ_AIAgentTypes_SystemPromptIDArray;
9423
9725
  MJ_AIConfigurations_DefaultPromptForContextSummarizationIDArray;
9424
9726
  AIPrompts_ResultSelectorPromptIDArray;
9425
- MJ_AIPromptModels_PromptIDArray;
9426
9727
  MJ_AIAgentPrompts_PromptIDArray;
9728
+ MJ_AIPromptModels_PromptIDArray;
9427
9729
  MJ_AIAgentSteps_PromptIDArray;
9428
9730
  MJ_AIPromptRuns_PromptIDArray;
9429
9731
  AIAgents_ContextCompressionPromptIDArray;
@@ -9702,14 +10004,14 @@ __decorate([
9702
10004
  Field(() => [AIPrompt_]),
9703
10005
  __metadata("design:type", Array)
9704
10006
  ], AIPrompt_.prototype, "AIPrompts_ResultSelectorPromptIDArray", void 0);
9705
- __decorate([
9706
- Field(() => [AIPromptModel_]),
9707
- __metadata("design:type", Array)
9708
- ], AIPrompt_.prototype, "MJ_AIPromptModels_PromptIDArray", void 0);
9709
10007
  __decorate([
9710
10008
  Field(() => [AIAgentPrompt_]),
9711
10009
  __metadata("design:type", Array)
9712
10010
  ], AIPrompt_.prototype, "MJ_AIAgentPrompts_PromptIDArray", void 0);
10011
+ __decorate([
10012
+ Field(() => [AIPromptModel_]),
10013
+ __metadata("design:type", Array)
10014
+ ], AIPrompt_.prototype, "MJ_AIPromptModels_PromptIDArray", void 0);
9713
10015
  __decorate([
9714
10016
  Field(() => [AIAgentStep_]),
9715
10017
  __metadata("design:type", Array)
@@ -10342,22 +10644,22 @@ let AIPromptResolver = class AIPromptResolver extends ResolverBase {
10342
10644
  const result = this.ArrayMapFieldNamesToCodeNames('AI Prompts', rows);
10343
10645
  return result;
10344
10646
  }
10345
- async MJ_AIPromptModels_PromptIDArray(aiprompt_, { dataSources, userPayload, providers }, pubSub) {
10346
- this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
10647
+ async MJ_AIAgentPrompts_PromptIDArray(aiprompt_, { dataSources, userPayload, providers }, pubSub) {
10648
+ this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
10347
10649
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
10348
10650
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
10349
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
10651
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
10350
10652
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
10351
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows);
10653
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
10352
10654
  return result;
10353
10655
  }
10354
- async MJ_AIAgentPrompts_PromptIDArray(aiprompt_, { dataSources, userPayload, providers }, pubSub) {
10355
- this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
10656
+ async MJ_AIPromptModels_PromptIDArray(aiprompt_, { dataSources, userPayload, providers }, pubSub) {
10657
+ this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
10356
10658
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
10357
10659
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
10358
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
10660
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
10359
10661
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
10360
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
10662
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows);
10361
10663
  return result;
10362
10664
  }
10363
10665
  async MJ_AIAgentSteps_PromptIDArray(aiprompt_, { dataSources, userPayload, providers }, pubSub) {
@@ -10483,23 +10785,23 @@ __decorate([
10483
10785
  __metadata("design:returntype", Promise)
10484
10786
  ], AIPromptResolver.prototype, "AIPrompts_ResultSelectorPromptIDArray", null);
10485
10787
  __decorate([
10486
- FieldResolver(() => [AIPromptModel_]),
10788
+ FieldResolver(() => [AIAgentPrompt_]),
10487
10789
  __param(0, Root()),
10488
10790
  __param(1, Ctx()),
10489
10791
  __param(2, PubSub()),
10490
10792
  __metadata("design:type", Function),
10491
10793
  __metadata("design:paramtypes", [AIPrompt_, Object, PubSubEngine]),
10492
10794
  __metadata("design:returntype", Promise)
10493
- ], AIPromptResolver.prototype, "MJ_AIPromptModels_PromptIDArray", null);
10795
+ ], AIPromptResolver.prototype, "MJ_AIAgentPrompts_PromptIDArray", null);
10494
10796
  __decorate([
10495
- FieldResolver(() => [AIAgentPrompt_]),
10797
+ FieldResolver(() => [AIPromptModel_]),
10496
10798
  __param(0, Root()),
10497
10799
  __param(1, Ctx()),
10498
10800
  __param(2, PubSub()),
10499
10801
  __metadata("design:type", Function),
10500
10802
  __metadata("design:paramtypes", [AIPrompt_, Object, PubSubEngine]),
10501
10803
  __metadata("design:returntype", Promise)
10502
- ], AIPromptResolver.prototype, "MJ_AIAgentPrompts_PromptIDArray", null);
10804
+ ], AIPromptResolver.prototype, "MJ_AIPromptModels_PromptIDArray", null);
10503
10805
  __decorate([
10504
10806
  FieldResolver(() => [AIAgentStep_]),
10505
10807
  __param(0, Root()),
@@ -16248,8 +16550,8 @@ let Entity_ = class Entity_ {
16248
16550
  RecommendationItems_DestinationEntityIDArray;
16249
16551
  EntityCommunicationMessageTypes_EntityIDArray;
16250
16552
  QueryEntities_EntityIDArray;
16251
- MJ_RecordLinks_SourceEntityIDArray;
16252
16553
  MJ_AccessControlRules_EntityIDArray;
16554
+ MJ_RecordLinks_SourceEntityIDArray;
16253
16555
  GeneratedCodes_LinkedEntityIDArray;
16254
16556
  MJ_RecordLinks_TargetEntityIDArray;
16255
16557
  };
@@ -16680,14 +16982,14 @@ __decorate([
16680
16982
  Field(() => [QueryEntity_]),
16681
16983
  __metadata("design:type", Array)
16682
16984
  ], Entity_.prototype, "QueryEntities_EntityIDArray", void 0);
16683
- __decorate([
16684
- Field(() => [RecordLink_]),
16685
- __metadata("design:type", Array)
16686
- ], Entity_.prototype, "MJ_RecordLinks_SourceEntityIDArray", void 0);
16687
16985
  __decorate([
16688
16986
  Field(() => [AccessControlRule_]),
16689
16987
  __metadata("design:type", Array)
16690
16988
  ], Entity_.prototype, "MJ_AccessControlRules_EntityIDArray", void 0);
16989
+ __decorate([
16990
+ Field(() => [RecordLink_]),
16991
+ __metadata("design:type", Array)
16992
+ ], Entity_.prototype, "MJ_RecordLinks_SourceEntityIDArray", void 0);
16691
16993
  __decorate([
16692
16994
  Field(() => [GeneratedCode_]),
16693
16995
  __metadata("design:type", Array)
@@ -17644,22 +17946,22 @@ let EntityResolverBase = class EntityResolverBase extends ResolverBase {
17644
17946
  const result = this.ArrayMapFieldNamesToCodeNames('Query Entities', rows);
17645
17947
  return result;
17646
17948
  }
17647
- async MJ_RecordLinks_SourceEntityIDArray(entity_, { dataSources, userPayload, providers }, pubSub) {
17648
- this.CheckUserReadPermissions('MJ: Record Links', userPayload);
17949
+ async MJ_AccessControlRules_EntityIDArray(entity_, { dataSources, userPayload, providers }, pubSub) {
17950
+ this.CheckUserReadPermissions('MJ: Access Control Rules', userPayload);
17649
17951
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
17650
17952
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
17651
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordLinks] WHERE [SourceEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Links', userPayload, EntityPermissionType.Read, 'AND');
17953
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAccessControlRules] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Access Control Rules', userPayload, EntityPermissionType.Read, 'AND');
17652
17954
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
17653
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: Record Links', rows);
17955
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Access Control Rules', rows);
17654
17956
  return result;
17655
17957
  }
17656
- async MJ_AccessControlRules_EntityIDArray(entity_, { dataSources, userPayload, providers }, pubSub) {
17657
- this.CheckUserReadPermissions('MJ: Access Control Rules', userPayload);
17958
+ async MJ_RecordLinks_SourceEntityIDArray(entity_, { dataSources, userPayload, providers }, pubSub) {
17959
+ this.CheckUserReadPermissions('MJ: Record Links', userPayload);
17658
17960
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
17659
17961
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
17660
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAccessControlRules] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Access Control Rules', userPayload, EntityPermissionType.Read, 'AND');
17962
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordLinks] WHERE [SourceEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Links', userPayload, EntityPermissionType.Read, 'AND');
17661
17963
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
17662
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: Access Control Rules', rows);
17964
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Record Links', rows);
17663
17965
  return result;
17664
17966
  }
17665
17967
  async GeneratedCodes_LinkedEntityIDArray(entity_, { dataSources, userPayload, providers }, pubSub) {
@@ -18063,23 +18365,23 @@ __decorate([
18063
18365
  __metadata("design:returntype", Promise)
18064
18366
  ], EntityResolverBase.prototype, "QueryEntities_EntityIDArray", null);
18065
18367
  __decorate([
18066
- FieldResolver(() => [RecordLink_]),
18368
+ FieldResolver(() => [AccessControlRule_]),
18067
18369
  __param(0, Root()),
18068
18370
  __param(1, Ctx()),
18069
18371
  __param(2, PubSub()),
18070
18372
  __metadata("design:type", Function),
18071
18373
  __metadata("design:paramtypes", [Entity_, Object, PubSubEngine]),
18072
18374
  __metadata("design:returntype", Promise)
18073
- ], EntityResolverBase.prototype, "MJ_RecordLinks_SourceEntityIDArray", null);
18375
+ ], EntityResolverBase.prototype, "MJ_AccessControlRules_EntityIDArray", null);
18074
18376
  __decorate([
18075
- FieldResolver(() => [AccessControlRule_]),
18377
+ FieldResolver(() => [RecordLink_]),
18076
18378
  __param(0, Root()),
18077
18379
  __param(1, Ctx()),
18078
18380
  __param(2, PubSub()),
18079
18381
  __metadata("design:type", Function),
18080
18382
  __metadata("design:paramtypes", [Entity_, Object, PubSubEngine]),
18081
18383
  __metadata("design:returntype", Promise)
18082
- ], EntityResolverBase.prototype, "MJ_AccessControlRules_EntityIDArray", null);
18384
+ ], EntityResolverBase.prototype, "MJ_RecordLinks_SourceEntityIDArray", null);
18083
18385
  __decorate([
18084
18386
  FieldResolver(() => [GeneratedCode_]),
18085
18387
  __param(0, Root()),
@@ -36368,11 +36670,17 @@ let ConversationDetail_ = class ConversationDetail_ {
36368
36670
  ArtifactVersionID;
36369
36671
  CompletionTime;
36370
36672
  IsPinned;
36673
+ ParentID;
36674
+ AgentID;
36675
+ Status;
36371
36676
  Conversation;
36372
36677
  User;
36373
36678
  Artifact;
36679
+ Agent;
36374
36680
  Reports_ConversationDetailIDArray;
36681
+ MJ_ConversationDetailArtifacts_ConversationDetailIDArray;
36375
36682
  MJ_AIAgentRuns_ConversationDetailIDArray;
36683
+ ConversationDetails_ParentIDArray;
36376
36684
  MJ_Tasks_ConversationDetailIDArray;
36377
36685
  };
36378
36686
  __decorate([
@@ -36456,6 +36764,21 @@ __decorate([
36456
36764
  Field(() => Boolean, { description: `Indicates if this message is pinned within the conversation for easy reference` }),
36457
36765
  __metadata("design:type", Boolean)
36458
36766
  ], ConversationDetail_.prototype, "IsPinned", void 0);
36767
+ __decorate([
36768
+ Field({ nullable: true, description: `Optional reference to parent message for threaded conversations. NULL for top-level messages.` }),
36769
+ MaxLength(16),
36770
+ __metadata("design:type", String)
36771
+ ], ConversationDetail_.prototype, "ParentID", void 0);
36772
+ __decorate([
36773
+ Field({ nullable: true, description: `Denormalized agent ID for quick lookup of agent name and icon without joining through AgentRun` }),
36774
+ MaxLength(16),
36775
+ __metadata("design:type", String)
36776
+ ], ConversationDetail_.prototype, "AgentID", void 0);
36777
+ __decorate([
36778
+ Field({ description: `Status of the conversation message. Complete indicates finished processing, In-Progress indicates active agent work, Error indicates processing failed.` }),
36779
+ MaxLength(40),
36780
+ __metadata("design:type", String)
36781
+ ], ConversationDetail_.prototype, "Status", void 0);
36459
36782
  __decorate([
36460
36783
  Field({ nullable: true }),
36461
36784
  MaxLength(510),
@@ -36471,14 +36794,27 @@ __decorate([
36471
36794
  MaxLength(510),
36472
36795
  __metadata("design:type", String)
36473
36796
  ], ConversationDetail_.prototype, "Artifact", void 0);
36797
+ __decorate([
36798
+ Field({ nullable: true }),
36799
+ MaxLength(510),
36800
+ __metadata("design:type", String)
36801
+ ], ConversationDetail_.prototype, "Agent", void 0);
36474
36802
  __decorate([
36475
36803
  Field(() => [Report_]),
36476
36804
  __metadata("design:type", Array)
36477
36805
  ], ConversationDetail_.prototype, "Reports_ConversationDetailIDArray", void 0);
36806
+ __decorate([
36807
+ Field(() => [ConversationDetailArtifact_]),
36808
+ __metadata("design:type", Array)
36809
+ ], ConversationDetail_.prototype, "MJ_ConversationDetailArtifacts_ConversationDetailIDArray", void 0);
36478
36810
  __decorate([
36479
36811
  Field(() => [AIAgentRun_]),
36480
36812
  __metadata("design:type", Array)
36481
36813
  ], ConversationDetail_.prototype, "MJ_AIAgentRuns_ConversationDetailIDArray", void 0);
36814
+ __decorate([
36815
+ Field(() => [ConversationDetail_]),
36816
+ __metadata("design:type", Array)
36817
+ ], ConversationDetail_.prototype, "ConversationDetails_ParentIDArray", void 0);
36482
36818
  __decorate([
36483
36819
  Field(() => [Task_]),
36484
36820
  __metadata("design:type", Array)
@@ -36504,6 +36840,9 @@ let CreateConversationDetailInput = class CreateConversationDetailInput {
36504
36840
  ArtifactVersionID;
36505
36841
  CompletionTime;
36506
36842
  IsPinned;
36843
+ ParentID;
36844
+ AgentID;
36845
+ Status;
36507
36846
  };
36508
36847
  __decorate([
36509
36848
  Field({ nullable: true }),
@@ -36569,6 +36908,18 @@ __decorate([
36569
36908
  Field(() => Boolean, { nullable: true }),
36570
36909
  __metadata("design:type", Boolean)
36571
36910
  ], CreateConversationDetailInput.prototype, "IsPinned", void 0);
36911
+ __decorate([
36912
+ Field({ nullable: true }),
36913
+ __metadata("design:type", String)
36914
+ ], CreateConversationDetailInput.prototype, "ParentID", void 0);
36915
+ __decorate([
36916
+ Field({ nullable: true }),
36917
+ __metadata("design:type", String)
36918
+ ], CreateConversationDetailInput.prototype, "AgentID", void 0);
36919
+ __decorate([
36920
+ Field({ nullable: true }),
36921
+ __metadata("design:type", String)
36922
+ ], CreateConversationDetailInput.prototype, "Status", void 0);
36572
36923
  CreateConversationDetailInput = __decorate([
36573
36924
  InputType()
36574
36925
  ], CreateConversationDetailInput);
@@ -36590,6 +36941,9 @@ let UpdateConversationDetailInput = class UpdateConversationDetailInput {
36590
36941
  ArtifactVersionID;
36591
36942
  CompletionTime;
36592
36943
  IsPinned;
36944
+ ParentID;
36945
+ AgentID;
36946
+ Status;
36593
36947
  OldValues___;
36594
36948
  };
36595
36949
  __decorate([
@@ -36656,6 +37010,18 @@ __decorate([
36656
37010
  Field(() => Boolean, { nullable: true }),
36657
37011
  __metadata("design:type", Boolean)
36658
37012
  ], UpdateConversationDetailInput.prototype, "IsPinned", void 0);
37013
+ __decorate([
37014
+ Field({ nullable: true }),
37015
+ __metadata("design:type", String)
37016
+ ], UpdateConversationDetailInput.prototype, "ParentID", void 0);
37017
+ __decorate([
37018
+ Field({ nullable: true }),
37019
+ __metadata("design:type", String)
37020
+ ], UpdateConversationDetailInput.prototype, "AgentID", void 0);
37021
+ __decorate([
37022
+ Field({ nullable: true }),
37023
+ __metadata("design:type", String)
37024
+ ], UpdateConversationDetailInput.prototype, "Status", void 0);
36659
37025
  __decorate([
36660
37026
  Field(() => [KeyValuePairInput], { nullable: true }),
36661
37027
  __metadata("design:type", Array)
@@ -36737,6 +37103,15 @@ let ConversationDetailResolver = class ConversationDetailResolver extends Resolv
36737
37103
  const result = this.ArrayMapFieldNamesToCodeNames('Reports', rows);
36738
37104
  return result;
36739
37105
  }
37106
+ async MJ_ConversationDetailArtifacts_ConversationDetailIDArray(conversationdetail_, { dataSources, userPayload, providers }, pubSub) {
37107
+ this.CheckUserReadPermissions('MJ: Conversation Detail Artifacts', userPayload);
37108
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
37109
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
37110
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailArtifacts] WHERE [ConversationDetailID]='${conversationdetail_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Artifacts', userPayload, EntityPermissionType.Read, 'AND');
37111
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
37112
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Artifacts', rows);
37113
+ return result;
37114
+ }
36740
37115
  async MJ_AIAgentRuns_ConversationDetailIDArray(conversationdetail_, { dataSources, userPayload, providers }, pubSub) {
36741
37116
  this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
36742
37117
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -36746,6 +37121,15 @@ let ConversationDetailResolver = class ConversationDetailResolver extends Resolv
36746
37121
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
36747
37122
  return result;
36748
37123
  }
37124
+ async ConversationDetails_ParentIDArray(conversationdetail_, { dataSources, userPayload, providers }, pubSub) {
37125
+ this.CheckUserReadPermissions('Conversation Details', userPayload);
37126
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
37127
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
37128
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetails] WHERE [ParentID]='${conversationdetail_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
37129
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
37130
+ const result = this.ArrayMapFieldNamesToCodeNames('Conversation Details', rows);
37131
+ return result;
37132
+ }
36749
37133
  async MJ_Tasks_ConversationDetailIDArray(conversationdetail_, { dataSources, userPayload, providers }, pubSub) {
36750
37134
  this.CheckUserReadPermissions('MJ: Tasks', userPayload);
36751
37135
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
@@ -36814,6 +37198,15 @@ __decorate([
36814
37198
  __metadata("design:paramtypes", [ConversationDetail_, Object, PubSubEngine]),
36815
37199
  __metadata("design:returntype", Promise)
36816
37200
  ], ConversationDetailResolver.prototype, "Reports_ConversationDetailIDArray", null);
37201
+ __decorate([
37202
+ FieldResolver(() => [ConversationDetailArtifact_]),
37203
+ __param(0, Root()),
37204
+ __param(1, Ctx()),
37205
+ __param(2, PubSub()),
37206
+ __metadata("design:type", Function),
37207
+ __metadata("design:paramtypes", [ConversationDetail_, Object, PubSubEngine]),
37208
+ __metadata("design:returntype", Promise)
37209
+ ], ConversationDetailResolver.prototype, "MJ_ConversationDetailArtifacts_ConversationDetailIDArray", null);
36817
37210
  __decorate([
36818
37211
  FieldResolver(() => [AIAgentRun_]),
36819
37212
  __param(0, Root()),
@@ -36823,6 +37216,15 @@ __decorate([
36823
37216
  __metadata("design:paramtypes", [ConversationDetail_, Object, PubSubEngine]),
36824
37217
  __metadata("design:returntype", Promise)
36825
37218
  ], ConversationDetailResolver.prototype, "MJ_AIAgentRuns_ConversationDetailIDArray", null);
37219
+ __decorate([
37220
+ FieldResolver(() => [ConversationDetail_]),
37221
+ __param(0, Root()),
37222
+ __param(1, Ctx()),
37223
+ __param(2, PubSub()),
37224
+ __metadata("design:type", Function),
37225
+ __metadata("design:paramtypes", [ConversationDetail_, Object, PubSubEngine]),
37226
+ __metadata("design:returntype", Promise)
37227
+ ], ConversationDetailResolver.prototype, "ConversationDetails_ParentIDArray", null);
36826
37228
  __decorate([
36827
37229
  FieldResolver(() => [Task_]),
36828
37230
  __param(0, Root()),
@@ -63564,6 +63966,7 @@ let Artifact_ = class Artifact_ {
63564
63966
  Type;
63565
63967
  User;
63566
63968
  MJ_ArtifactVersions_ArtifactIDArray;
63969
+ MJ_CollectionArtifacts_ArtifactIDArray;
63567
63970
  };
63568
63971
  __decorate([
63569
63972
  Field(),
@@ -63627,6 +64030,10 @@ __decorate([
63627
64030
  Field(() => [ArtifactVersion_]),
63628
64031
  __metadata("design:type", Array)
63629
64032
  ], Artifact_.prototype, "MJ_ArtifactVersions_ArtifactIDArray", void 0);
64033
+ __decorate([
64034
+ Field(() => [CollectionArtifact_]),
64035
+ __metadata("design:type", Array)
64036
+ ], Artifact_.prototype, "MJ_CollectionArtifacts_ArtifactIDArray", void 0);
63630
64037
  Artifact_ = __decorate([
63631
64038
  ObjectType({ description: `Independent content items (code, documents, charts) that can be linked to multiple conversations and collections. Supports versioning and sharing.` })
63632
64039
  ], Artifact_);
@@ -63791,6 +64198,15 @@ let ArtifactResolver = class ArtifactResolver extends ResolverBase {
63791
64198
  const result = this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Versions', rows);
63792
64199
  return result;
63793
64200
  }
64201
+ async MJ_CollectionArtifacts_ArtifactIDArray(artifact_, { dataSources, userPayload, providers }, pubSub) {
64202
+ this.CheckUserReadPermissions('MJ: Collection Artifacts', userPayload);
64203
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
64204
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
64205
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionArtifacts] WHERE [ArtifactID]='${artifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Artifacts', userPayload, EntityPermissionType.Read, 'AND');
64206
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
64207
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Artifacts', rows);
64208
+ return result;
64209
+ }
63794
64210
  async CreateArtifact(input, { providers, userPayload }, pubSub) {
63795
64211
  const provider = GetReadWriteProvider(providers);
63796
64212
  return this.CreateRecord('MJ: Artifacts', input, provider, userPayload, pubSub);
@@ -63850,6 +64266,15 @@ __decorate([
63850
64266
  __metadata("design:paramtypes", [Artifact_, Object, PubSubEngine]),
63851
64267
  __metadata("design:returntype", Promise)
63852
64268
  ], ArtifactResolver.prototype, "MJ_ArtifactVersions_ArtifactIDArray", null);
64269
+ __decorate([
64270
+ FieldResolver(() => [CollectionArtifact_]),
64271
+ __param(0, Root()),
64272
+ __param(1, Ctx()),
64273
+ __param(2, PubSub()),
64274
+ __metadata("design:type", Function),
64275
+ __metadata("design:paramtypes", [Artifact_, Object, PubSubEngine]),
64276
+ __metadata("design:returntype", Promise)
64277
+ ], ArtifactResolver.prototype, "MJ_CollectionArtifacts_ArtifactIDArray", null);
63853
64278
  __decorate([
63854
64279
  Mutation(() => Artifact_),
63855
64280
  __param(0, Arg('input', () => CreateArtifactInput)),
@@ -63894,8 +64319,8 @@ let ConversationArtifact_ = class ConversationArtifact_ {
63894
64319
  _mj__UpdatedAt;
63895
64320
  Conversation;
63896
64321
  ArtifactType;
63897
- MJ_ConversationArtifactPermissions_ConversationArtifactIDArray;
63898
64322
  MJ_ConversationArtifactVersions_ConversationArtifactIDArray;
64323
+ MJ_ConversationArtifactPermissions_ConversationArtifactIDArray;
63899
64324
  ConversationDetails_ArtifactIDArray;
63900
64325
  };
63901
64326
  __decorate([
@@ -63951,14 +64376,14 @@ __decorate([
63951
64376
  MaxLength(200),
63952
64377
  __metadata("design:type", String)
63953
64378
  ], ConversationArtifact_.prototype, "ArtifactType", void 0);
63954
- __decorate([
63955
- Field(() => [ConversationArtifactPermission_]),
63956
- __metadata("design:type", Array)
63957
- ], ConversationArtifact_.prototype, "MJ_ConversationArtifactPermissions_ConversationArtifactIDArray", void 0);
63958
64379
  __decorate([
63959
64380
  Field(() => [ConversationArtifactVersion_]),
63960
64381
  __metadata("design:type", Array)
63961
64382
  ], ConversationArtifact_.prototype, "MJ_ConversationArtifactVersions_ConversationArtifactIDArray", void 0);
64383
+ __decorate([
64384
+ Field(() => [ConversationArtifactPermission_]),
64385
+ __metadata("design:type", Array)
64386
+ ], ConversationArtifact_.prototype, "MJ_ConversationArtifactPermissions_ConversationArtifactIDArray", void 0);
63962
64387
  __decorate([
63963
64388
  Field(() => [ConversationDetail_]),
63964
64389
  __metadata("design:type", Array)
@@ -64118,22 +64543,22 @@ let ConversationArtifactResolver = class ConversationArtifactResolver extends Re
64118
64543
  const result = this.MapFieldNamesToCodeNames('MJ: Conversation Artifacts', rows && rows.length > 0 ? rows[0] : {});
64119
64544
  return result;
64120
64545
  }
64121
- async MJ_ConversationArtifactPermissions_ConversationArtifactIDArray(conversationartifact_, { dataSources, userPayload, providers }, pubSub) {
64122
- this.CheckUserReadPermissions('MJ: Conversation Artifact Permissions', userPayload);
64546
+ async MJ_ConversationArtifactVersions_ConversationArtifactIDArray(conversationartifact_, { dataSources, userPayload, providers }, pubSub) {
64547
+ this.CheckUserReadPermissions('MJ: Conversation Artifact Versions', userPayload);
64123
64548
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
64124
64549
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
64125
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactPermissions] WHERE [ConversationArtifactID]='${conversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
64550
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactVersions] WHERE [ConversationArtifactID]='${conversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
64126
64551
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
64127
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Permissions', rows);
64552
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Versions', rows);
64128
64553
  return result;
64129
64554
  }
64130
- async MJ_ConversationArtifactVersions_ConversationArtifactIDArray(conversationartifact_, { dataSources, userPayload, providers }, pubSub) {
64131
- this.CheckUserReadPermissions('MJ: Conversation Artifact Versions', userPayload);
64555
+ async MJ_ConversationArtifactPermissions_ConversationArtifactIDArray(conversationartifact_, { dataSources, userPayload, providers }, pubSub) {
64556
+ this.CheckUserReadPermissions('MJ: Conversation Artifact Permissions', userPayload);
64132
64557
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
64133
64558
  const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
64134
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactVersions] WHERE [ConversationArtifactID]='${conversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
64559
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactPermissions] WHERE [ConversationArtifactID]='${conversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
64135
64560
  const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
64136
- const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Versions', rows);
64561
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Permissions', rows);
64137
64562
  return result;
64138
64563
  }
64139
64564
  async ConversationDetails_ArtifactIDArray(conversationartifact_, { dataSources, userPayload, providers }, pubSub) {
@@ -64196,23 +64621,23 @@ __decorate([
64196
64621
  __metadata("design:returntype", Promise)
64197
64622
  ], ConversationArtifactResolver.prototype, "ConversationArtifact", null);
64198
64623
  __decorate([
64199
- FieldResolver(() => [ConversationArtifactPermission_]),
64624
+ FieldResolver(() => [ConversationArtifactVersion_]),
64200
64625
  __param(0, Root()),
64201
64626
  __param(1, Ctx()),
64202
64627
  __param(2, PubSub()),
64203
64628
  __metadata("design:type", Function),
64204
64629
  __metadata("design:paramtypes", [ConversationArtifact_, Object, PubSubEngine]),
64205
64630
  __metadata("design:returntype", Promise)
64206
- ], ConversationArtifactResolver.prototype, "MJ_ConversationArtifactPermissions_ConversationArtifactIDArray", null);
64631
+ ], ConversationArtifactResolver.prototype, "MJ_ConversationArtifactVersions_ConversationArtifactIDArray", null);
64207
64632
  __decorate([
64208
- FieldResolver(() => [ConversationArtifactVersion_]),
64633
+ FieldResolver(() => [ConversationArtifactPermission_]),
64209
64634
  __param(0, Root()),
64210
64635
  __param(1, Ctx()),
64211
64636
  __param(2, PubSub()),
64212
64637
  __metadata("design:type", Function),
64213
64638
  __metadata("design:paramtypes", [ConversationArtifact_, Object, PubSubEngine]),
64214
64639
  __metadata("design:returntype", Promise)
64215
- ], ConversationArtifactResolver.prototype, "MJ_ConversationArtifactVersions_ConversationArtifactIDArray", null);
64640
+ ], ConversationArtifactResolver.prototype, "MJ_ConversationArtifactPermissions_ConversationArtifactIDArray", null);
64216
64641
  __decorate([
64217
64642
  FieldResolver(() => [ConversationDetail_]),
64218
64643
  __param(0, Root()),
@@ -71790,6 +72215,251 @@ AIAgentRunStepResolver = __decorate([
71790
72215
  Resolver(AIAgentRunStep_)
71791
72216
  ], AIAgentRunStepResolver);
71792
72217
  export { AIAgentRunStepResolver };
72218
+ let ConversationDetailArtifact_ = class ConversationDetailArtifact_ {
72219
+ ID;
72220
+ ConversationDetailID;
72221
+ ArtifactVersionID;
72222
+ Direction;
72223
+ _mj__CreatedAt;
72224
+ _mj__UpdatedAt;
72225
+ };
72226
+ __decorate([
72227
+ Field(),
72228
+ MaxLength(16),
72229
+ __metadata("design:type", String)
72230
+ ], ConversationDetailArtifact_.prototype, "ID", void 0);
72231
+ __decorate([
72232
+ Field({ description: `Foreign key to ConversationDetail - the conversation message associated with this artifact` }),
72233
+ MaxLength(16),
72234
+ __metadata("design:type", String)
72235
+ ], ConversationDetailArtifact_.prototype, "ConversationDetailID", void 0);
72236
+ __decorate([
72237
+ Field({ description: `Foreign key to ArtifactVersion - the specific artifact version linked to this conversation message` }),
72238
+ MaxLength(16),
72239
+ __metadata("design:type", String)
72240
+ ], ConversationDetailArtifact_.prototype, "ArtifactVersionID", void 0);
72241
+ __decorate([
72242
+ Field({ description: `Direction of artifact flow: Input (fed to agent) or Output (produced by agent)` }),
72243
+ MaxLength(40),
72244
+ __metadata("design:type", String)
72245
+ ], ConversationDetailArtifact_.prototype, "Direction", void 0);
72246
+ __decorate([
72247
+ Field(),
72248
+ MaxLength(10),
72249
+ __metadata("design:type", Date)
72250
+ ], ConversationDetailArtifact_.prototype, "_mj__CreatedAt", void 0);
72251
+ __decorate([
72252
+ Field(),
72253
+ MaxLength(10),
72254
+ __metadata("design:type", Date)
72255
+ ], ConversationDetailArtifact_.prototype, "_mj__UpdatedAt", void 0);
72256
+ ConversationDetailArtifact_ = __decorate([
72257
+ ObjectType({ description: `Junction table tracking many-to-many relationship between conversation messages and artifact versions, with directionality tracking` })
72258
+ ], ConversationDetailArtifact_);
72259
+ export { ConversationDetailArtifact_ };
72260
+ let CreateConversationDetailArtifactInput = class CreateConversationDetailArtifactInput {
72261
+ ID;
72262
+ ConversationDetailID;
72263
+ ArtifactVersionID;
72264
+ Direction;
72265
+ };
72266
+ __decorate([
72267
+ Field({ nullable: true }),
72268
+ __metadata("design:type", String)
72269
+ ], CreateConversationDetailArtifactInput.prototype, "ID", void 0);
72270
+ __decorate([
72271
+ Field({ nullable: true }),
72272
+ __metadata("design:type", String)
72273
+ ], CreateConversationDetailArtifactInput.prototype, "ConversationDetailID", void 0);
72274
+ __decorate([
72275
+ Field({ nullable: true }),
72276
+ __metadata("design:type", String)
72277
+ ], CreateConversationDetailArtifactInput.prototype, "ArtifactVersionID", void 0);
72278
+ __decorate([
72279
+ Field({ nullable: true }),
72280
+ __metadata("design:type", String)
72281
+ ], CreateConversationDetailArtifactInput.prototype, "Direction", void 0);
72282
+ CreateConversationDetailArtifactInput = __decorate([
72283
+ InputType()
72284
+ ], CreateConversationDetailArtifactInput);
72285
+ export { CreateConversationDetailArtifactInput };
72286
+ let UpdateConversationDetailArtifactInput = class UpdateConversationDetailArtifactInput {
72287
+ ID;
72288
+ ConversationDetailID;
72289
+ ArtifactVersionID;
72290
+ Direction;
72291
+ OldValues___;
72292
+ };
72293
+ __decorate([
72294
+ Field(),
72295
+ __metadata("design:type", String)
72296
+ ], UpdateConversationDetailArtifactInput.prototype, "ID", void 0);
72297
+ __decorate([
72298
+ Field({ nullable: true }),
72299
+ __metadata("design:type", String)
72300
+ ], UpdateConversationDetailArtifactInput.prototype, "ConversationDetailID", void 0);
72301
+ __decorate([
72302
+ Field({ nullable: true }),
72303
+ __metadata("design:type", String)
72304
+ ], UpdateConversationDetailArtifactInput.prototype, "ArtifactVersionID", void 0);
72305
+ __decorate([
72306
+ Field({ nullable: true }),
72307
+ __metadata("design:type", String)
72308
+ ], UpdateConversationDetailArtifactInput.prototype, "Direction", void 0);
72309
+ __decorate([
72310
+ Field(() => [KeyValuePairInput], { nullable: true }),
72311
+ __metadata("design:type", Array)
72312
+ ], UpdateConversationDetailArtifactInput.prototype, "OldValues___", void 0);
72313
+ UpdateConversationDetailArtifactInput = __decorate([
72314
+ InputType()
72315
+ ], UpdateConversationDetailArtifactInput);
72316
+ export { UpdateConversationDetailArtifactInput };
72317
+ let RunConversationDetailArtifactViewResult = class RunConversationDetailArtifactViewResult {
72318
+ Results;
72319
+ UserViewRunID;
72320
+ RowCount;
72321
+ TotalRowCount;
72322
+ ExecutionTime;
72323
+ ErrorMessage;
72324
+ Success;
72325
+ };
72326
+ __decorate([
72327
+ Field(() => [ConversationDetailArtifact_]),
72328
+ __metadata("design:type", Array)
72329
+ ], RunConversationDetailArtifactViewResult.prototype, "Results", void 0);
72330
+ __decorate([
72331
+ Field(() => String, { nullable: true }),
72332
+ __metadata("design:type", String)
72333
+ ], RunConversationDetailArtifactViewResult.prototype, "UserViewRunID", void 0);
72334
+ __decorate([
72335
+ Field(() => Int, { nullable: true }),
72336
+ __metadata("design:type", Number)
72337
+ ], RunConversationDetailArtifactViewResult.prototype, "RowCount", void 0);
72338
+ __decorate([
72339
+ Field(() => Int, { nullable: true }),
72340
+ __metadata("design:type", Number)
72341
+ ], RunConversationDetailArtifactViewResult.prototype, "TotalRowCount", void 0);
72342
+ __decorate([
72343
+ Field(() => Int, { nullable: true }),
72344
+ __metadata("design:type", Number)
72345
+ ], RunConversationDetailArtifactViewResult.prototype, "ExecutionTime", void 0);
72346
+ __decorate([
72347
+ Field({ nullable: true }),
72348
+ __metadata("design:type", String)
72349
+ ], RunConversationDetailArtifactViewResult.prototype, "ErrorMessage", void 0);
72350
+ __decorate([
72351
+ Field(() => Boolean, { nullable: false }),
72352
+ __metadata("design:type", Boolean)
72353
+ ], RunConversationDetailArtifactViewResult.prototype, "Success", void 0);
72354
+ RunConversationDetailArtifactViewResult = __decorate([
72355
+ ObjectType()
72356
+ ], RunConversationDetailArtifactViewResult);
72357
+ export { RunConversationDetailArtifactViewResult };
72358
+ let ConversationDetailArtifactResolver = class ConversationDetailArtifactResolver extends ResolverBase {
72359
+ async RunConversationDetailArtifactViewByID(input, { providers, userPayload }, pubSub) {
72360
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
72361
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
72362
+ }
72363
+ async RunConversationDetailArtifactViewByName(input, { providers, userPayload }, pubSub) {
72364
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
72365
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
72366
+ }
72367
+ async RunConversationDetailArtifactDynamicView(input, { providers, userPayload }, pubSub) {
72368
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
72369
+ input.EntityName = 'MJ: Conversation Detail Artifacts';
72370
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
72371
+ }
72372
+ async ConversationDetailArtifact(ID, { dataSources, userPayload, providers }, pubSub) {
72373
+ this.CheckUserReadPermissions('MJ: Conversation Detail Artifacts', userPayload);
72374
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
72375
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
72376
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailArtifacts] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Artifacts', userPayload, EntityPermissionType.Read, 'AND');
72377
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
72378
+ const result = this.MapFieldNamesToCodeNames('MJ: Conversation Detail Artifacts', rows && rows.length > 0 ? rows[0] : {});
72379
+ return result;
72380
+ }
72381
+ async CreateConversationDetailArtifact(input, { providers, userPayload }, pubSub) {
72382
+ const provider = GetReadWriteProvider(providers);
72383
+ return this.CreateRecord('MJ: Conversation Detail Artifacts', input, provider, userPayload, pubSub);
72384
+ }
72385
+ async UpdateConversationDetailArtifact(input, { providers, userPayload }, pubSub) {
72386
+ const provider = GetReadWriteProvider(providers);
72387
+ return this.UpdateRecord('MJ: Conversation Detail Artifacts', input, provider, userPayload, pubSub);
72388
+ }
72389
+ async DeleteConversationDetailArtifact(ID, options, { providers, userPayload }, pubSub) {
72390
+ const provider = GetReadWriteProvider(providers);
72391
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
72392
+ return this.DeleteRecord('MJ: Conversation Detail Artifacts', key, options, provider, userPayload, pubSub);
72393
+ }
72394
+ };
72395
+ __decorate([
72396
+ Query(() => RunConversationDetailArtifactViewResult),
72397
+ __param(0, Arg('input', () => RunViewByIDInput)),
72398
+ __param(1, Ctx()),
72399
+ __param(2, PubSub()),
72400
+ __metadata("design:type", Function),
72401
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
72402
+ __metadata("design:returntype", Promise)
72403
+ ], ConversationDetailArtifactResolver.prototype, "RunConversationDetailArtifactViewByID", null);
72404
+ __decorate([
72405
+ Query(() => RunConversationDetailArtifactViewResult),
72406
+ __param(0, Arg('input', () => RunViewByNameInput)),
72407
+ __param(1, Ctx()),
72408
+ __param(2, PubSub()),
72409
+ __metadata("design:type", Function),
72410
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
72411
+ __metadata("design:returntype", Promise)
72412
+ ], ConversationDetailArtifactResolver.prototype, "RunConversationDetailArtifactViewByName", null);
72413
+ __decorate([
72414
+ Query(() => RunConversationDetailArtifactViewResult),
72415
+ __param(0, Arg('input', () => RunDynamicViewInput)),
72416
+ __param(1, Ctx()),
72417
+ __param(2, PubSub()),
72418
+ __metadata("design:type", Function),
72419
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
72420
+ __metadata("design:returntype", Promise)
72421
+ ], ConversationDetailArtifactResolver.prototype, "RunConversationDetailArtifactDynamicView", null);
72422
+ __decorate([
72423
+ Query(() => ConversationDetailArtifact_, { nullable: true }),
72424
+ __param(0, Arg('ID', () => String)),
72425
+ __param(1, Ctx()),
72426
+ __param(2, PubSub()),
72427
+ __metadata("design:type", Function),
72428
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
72429
+ __metadata("design:returntype", Promise)
72430
+ ], ConversationDetailArtifactResolver.prototype, "ConversationDetailArtifact", null);
72431
+ __decorate([
72432
+ Mutation(() => ConversationDetailArtifact_),
72433
+ __param(0, Arg('input', () => CreateConversationDetailArtifactInput)),
72434
+ __param(1, Ctx()),
72435
+ __param(2, PubSub()),
72436
+ __metadata("design:type", Function),
72437
+ __metadata("design:paramtypes", [CreateConversationDetailArtifactInput, Object, PubSubEngine]),
72438
+ __metadata("design:returntype", Promise)
72439
+ ], ConversationDetailArtifactResolver.prototype, "CreateConversationDetailArtifact", null);
72440
+ __decorate([
72441
+ Mutation(() => ConversationDetailArtifact_),
72442
+ __param(0, Arg('input', () => UpdateConversationDetailArtifactInput)),
72443
+ __param(1, Ctx()),
72444
+ __param(2, PubSub()),
72445
+ __metadata("design:type", Function),
72446
+ __metadata("design:paramtypes", [UpdateConversationDetailArtifactInput, Object, PubSubEngine]),
72447
+ __metadata("design:returntype", Promise)
72448
+ ], ConversationDetailArtifactResolver.prototype, "UpdateConversationDetailArtifact", null);
72449
+ __decorate([
72450
+ Mutation(() => ConversationDetailArtifact_),
72451
+ __param(0, Arg('ID', () => String)),
72452
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
72453
+ __param(2, Ctx()),
72454
+ __param(3, PubSub()),
72455
+ __metadata("design:type", Function),
72456
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
72457
+ __metadata("design:returntype", Promise)
72458
+ ], ConversationDetailArtifactResolver.prototype, "DeleteConversationDetailArtifact", null);
72459
+ ConversationDetailArtifactResolver = __decorate([
72460
+ Resolver(ConversationDetailArtifact_)
72461
+ ], ConversationDetailArtifactResolver);
72462
+ export { ConversationDetailArtifactResolver };
71793
72463
  let Task_ = class Task_ {
71794
72464
  ID;
71795
72465
  ParentID;
@@ -73230,8 +73900,10 @@ let ArtifactVersion_ = class ArtifactVersion_ {
73230
73900
  UserID;
73231
73901
  _mj__CreatedAt;
73232
73902
  _mj__UpdatedAt;
73903
+ ContentHash;
73233
73904
  Artifact;
73234
73905
  User;
73906
+ MJ_ConversationDetailArtifacts_ArtifactVersionIDArray;
73235
73907
  };
73236
73908
  __decorate([
73237
73909
  Field(),
@@ -73274,6 +73946,11 @@ __decorate([
73274
73946
  MaxLength(10),
73275
73947
  __metadata("design:type", Date)
73276
73948
  ], ArtifactVersion_.prototype, "_mj__UpdatedAt", void 0);
73949
+ __decorate([
73950
+ Field({ nullable: true, description: `SHA-256 hash of the Content field for duplicate detection and version comparison` }),
73951
+ MaxLength(1000),
73952
+ __metadata("design:type", String)
73953
+ ], ArtifactVersion_.prototype, "ContentHash", void 0);
73277
73954
  __decorate([
73278
73955
  Field(),
73279
73956
  MaxLength(510),
@@ -73284,6 +73961,10 @@ __decorate([
73284
73961
  MaxLength(200),
73285
73962
  __metadata("design:type", String)
73286
73963
  ], ArtifactVersion_.prototype, "User", void 0);
73964
+ __decorate([
73965
+ Field(() => [ConversationDetailArtifact_]),
73966
+ __metadata("design:type", Array)
73967
+ ], ArtifactVersion_.prototype, "MJ_ConversationDetailArtifacts_ArtifactVersionIDArray", void 0);
73287
73968
  ArtifactVersion_ = __decorate([
73288
73969
  ObjectType({ description: `Version history for artifacts, tracking all changes over time` })
73289
73970
  ], ArtifactVersion_);
@@ -73296,6 +73977,7 @@ let CreateArtifactVersionInput = class CreateArtifactVersionInput {
73296
73977
  Configuration;
73297
73978
  Comments;
73298
73979
  UserID;
73980
+ ContentHash;
73299
73981
  };
73300
73982
  __decorate([
73301
73983
  Field({ nullable: true }),
@@ -73325,6 +74007,10 @@ __decorate([
73325
74007
  Field({ nullable: true }),
73326
74008
  __metadata("design:type", String)
73327
74009
  ], CreateArtifactVersionInput.prototype, "UserID", void 0);
74010
+ __decorate([
74011
+ Field({ nullable: true }),
74012
+ __metadata("design:type", String)
74013
+ ], CreateArtifactVersionInput.prototype, "ContentHash", void 0);
73328
74014
  CreateArtifactVersionInput = __decorate([
73329
74015
  InputType()
73330
74016
  ], CreateArtifactVersionInput);
@@ -73337,6 +74023,7 @@ let UpdateArtifactVersionInput = class UpdateArtifactVersionInput {
73337
74023
  Configuration;
73338
74024
  Comments;
73339
74025
  UserID;
74026
+ ContentHash;
73340
74027
  OldValues___;
73341
74028
  };
73342
74029
  __decorate([
@@ -73367,6 +74054,10 @@ __decorate([
73367
74054
  Field({ nullable: true }),
73368
74055
  __metadata("design:type", String)
73369
74056
  ], UpdateArtifactVersionInput.prototype, "UserID", void 0);
74057
+ __decorate([
74058
+ Field({ nullable: true }),
74059
+ __metadata("design:type", String)
74060
+ ], UpdateArtifactVersionInput.prototype, "ContentHash", void 0);
73370
74061
  __decorate([
73371
74062
  Field(() => [KeyValuePairInput], { nullable: true }),
73372
74063
  __metadata("design:type", Array)
@@ -73439,6 +74130,15 @@ let ArtifactVersionResolver = class ArtifactVersionResolver extends ResolverBase
73439
74130
  const result = this.MapFieldNamesToCodeNames('MJ: Artifact Versions', rows && rows.length > 0 ? rows[0] : {});
73440
74131
  return result;
73441
74132
  }
74133
+ async MJ_ConversationDetailArtifacts_ArtifactVersionIDArray(artifactversion_, { dataSources, userPayload, providers }, pubSub) {
74134
+ this.CheckUserReadPermissions('MJ: Conversation Detail Artifacts', userPayload);
74135
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
74136
+ const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
74137
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailArtifacts] WHERE [ArtifactVersionID]='${artifactversion_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Artifacts', userPayload, EntityPermissionType.Read, 'AND');
74138
+ const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
74139
+ const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Artifacts', rows);
74140
+ return result;
74141
+ }
73442
74142
  async CreateArtifactVersion(input, { providers, userPayload }, pubSub) {
73443
74143
  const provider = GetReadWriteProvider(providers);
73444
74144
  return this.CreateRecord('MJ: Artifact Versions', input, provider, userPayload, pubSub);
@@ -73489,6 +74189,15 @@ __decorate([
73489
74189
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
73490
74190
  __metadata("design:returntype", Promise)
73491
74191
  ], ArtifactVersionResolver.prototype, "ArtifactVersion", null);
74192
+ __decorate([
74193
+ FieldResolver(() => [ConversationDetailArtifact_]),
74194
+ __param(0, Root()),
74195
+ __param(1, Ctx()),
74196
+ __param(2, PubSub()),
74197
+ __metadata("design:type", Function),
74198
+ __metadata("design:paramtypes", [ArtifactVersion_, Object, PubSubEngine]),
74199
+ __metadata("design:returntype", Promise)
74200
+ ], ArtifactVersionResolver.prototype, "MJ_ConversationDetailArtifacts_ArtifactVersionIDArray", null);
73492
74201
  __decorate([
73493
74202
  Mutation(() => ArtifactVersion_),
73494
74203
  __param(0, Arg('input', () => CreateArtifactVersionInput)),