@memberjunction/server 2.103.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.
- package/dist/agents/skip-agent.d.ts +29 -0
- package/dist/agents/skip-agent.d.ts.map +1 -0
- package/dist/agents/skip-agent.js +143 -0
- package/dist/agents/skip-agent.js.map +1 -0
- package/dist/agents/skip-sdk.d.ts +47 -0
- package/dist/agents/skip-sdk.d.ts.map +1 -0
- package/dist/agents/skip-sdk.js +270 -0
- package/dist/agents/skip-sdk.js.map +1 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/generated/generated.d.ts +76 -16
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +527 -120
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +24 -9
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/dist/resolvers/ComponentRegistryResolver.d.ts +19 -0
- package/dist/resolvers/ComponentRegistryResolver.d.ts.map +1 -1
- package/dist/resolvers/ComponentRegistryResolver.js +140 -2
- package/dist/resolvers/ComponentRegistryResolver.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts +3 -3
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +16 -13
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/package.json +38 -38
- package/src/agents/skip-agent.ts +285 -0
- package/src/agents/skip-sdk.ts +543 -0
- package/src/config.ts +3 -2
- package/src/generated/generated.ts +351 -93
- package/src/resolvers/AskSkipResolver.ts +32 -10
- package/src/resolvers/ComponentRegistryResolver.ts +133 -4
- package/src/resolvers/RunAIAgentResolver.ts +16 -10
|
@@ -19,7 +19,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, ComponentRegistryEntity, AIAgentNoteTypeEntity, ComponentDependencyEntity, AIAgentRunEntity, AIVendorEntity, TaskTypeEntity, AIConfigurationEntity, AIAgentEntity, AIAgentStepEntity, AIModelCostEntity, AIPromptModelEntity, AIAgentTypeEntity, AIAgentNoteEntity, EnvironmentEntity, AIAgentActionEntity, TaskDependencyEntity, CollectionArtifactEntity, AIModelPriceTypeEntity, CollectionEntity, RecordLinkEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, DashboardUserStateEntity, ComponentEntity, AccessControlRuleEntity, PublicLinkEntity, ArtifactTypeEntity, AIVendorTypeEntity, ArtifactEntity, ConversationArtifactEntity, AIAgentPromptEntity, ComponentLibraryEntity, DashboardUserPreferenceEntity, QueryParameterEntity, AIAgentRelationshipEntity, ComponentLibraryLinkEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, AIPromptRunEntity, AIAgentRunStepEntity, TaskEntity, ProjectEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, ArtifactVersionEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity } from '@memberjunction/core-entities';
|
|
22
|
+
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, ComponentRegistryEntity, AIAgentNoteTypeEntity, ComponentDependencyEntity, AIAgentRunEntity, AIVendorEntity, TaskTypeEntity, AIConfigurationEntity, AIAgentEntity, AIAgentStepEntity, AIModelCostEntity, AIPromptModelEntity, AIAgentTypeEntity, AIAgentNoteEntity, EnvironmentEntity, AIAgentActionEntity, TaskDependencyEntity, CollectionArtifactEntity, AIModelPriceTypeEntity, CollectionEntity, RecordLinkEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, DashboardUserStateEntity, ComponentEntity, AccessControlRuleEntity, PublicLinkEntity, ArtifactTypeEntity, AIVendorTypeEntity, ArtifactEntity, ConversationArtifactEntity, AIAgentPromptEntity, ComponentLibraryEntity, DashboardUserPreferenceEntity, QueryParameterEntity, AIAgentRelationshipEntity, ComponentLibraryLinkEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, AIPromptRunEntity, AIAgentRunStepEntity, ConversationDetailArtifactEntity, TaskEntity, ProjectEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, ArtifactVersionEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity } from '@memberjunction/core-entities';
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
//****************************************************************************
|
|
@@ -1741,12 +1741,12 @@ each time the agent processes a prompt step.`})
|
|
|
1741
1741
|
@MaxLength(100)
|
|
1742
1742
|
OverrideVendor?: string;
|
|
1743
1743
|
|
|
1744
|
-
@Field(() => [AIAgentRunStep_])
|
|
1745
|
-
MJ_AIAgentRunSteps_AgentRunIDArray: AIAgentRunStep_[]; // Link to MJ_AIAgentRunSteps
|
|
1746
|
-
|
|
1747
1744
|
@Field(() => [AIAgentRun_])
|
|
1748
1745
|
MJ_AIAgentRuns_ParentRunIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
1749
1746
|
|
|
1747
|
+
@Field(() => [AIAgentRunStep_])
|
|
1748
|
+
MJ_AIAgentRunSteps_AgentRunIDArray: AIAgentRunStep_[]; // Link to MJ_AIAgentRunSteps
|
|
1749
|
+
|
|
1750
1750
|
@Field(() => [AIPromptRun_])
|
|
1751
1751
|
MJ_AIPromptRuns_AgentRunIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
1752
1752
|
|
|
@@ -2048,25 +2048,25 @@ export class AIAgentRunResolver extends ResolverBase {
|
|
|
2048
2048
|
return result;
|
|
2049
2049
|
}
|
|
2050
2050
|
|
|
2051
|
-
@FieldResolver(() => [
|
|
2052
|
-
async
|
|
2053
|
-
this.CheckUserReadPermissions('MJ: AI Agent
|
|
2051
|
+
@FieldResolver(() => [AIAgentRun_])
|
|
2052
|
+
async MJ_AIAgentRuns_ParentRunIDArray(@Root() aiagentrun_: AIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2053
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
2054
2054
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2055
2055
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2056
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2056
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [ParentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2057
2057
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2058
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent
|
|
2058
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
|
|
2059
2059
|
return result;
|
|
2060
2060
|
}
|
|
2061
2061
|
|
|
2062
|
-
@FieldResolver(() => [
|
|
2063
|
-
async
|
|
2064
|
-
this.CheckUserReadPermissions('MJ: AI Agent
|
|
2062
|
+
@FieldResolver(() => [AIAgentRunStep_])
|
|
2063
|
+
async MJ_AIAgentRunSteps_AgentRunIDArray(@Root() aiagentrun_: AIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2064
|
+
this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
|
|
2065
2065
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2066
2066
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2067
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2067
|
+
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');
|
|
2068
2068
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2069
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent
|
|
2069
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Steps', rows);
|
|
2070
2070
|
return result;
|
|
2071
2071
|
}
|
|
2072
2072
|
|
|
@@ -2140,12 +2140,12 @@ export class AIVendor_ {
|
|
|
2140
2140
|
@Field(() => [AIResultCache_])
|
|
2141
2141
|
AIResultCache_VendorIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
2142
2142
|
|
|
2143
|
-
@Field(() => [AIModelVendor_])
|
|
2144
|
-
MJ_AIModelVendors_VendorIDArray: AIModelVendor_[]; // Link to MJ_AIModelVendors
|
|
2145
|
-
|
|
2146
2143
|
@Field(() => [AIPromptRun_])
|
|
2147
2144
|
MJ_AIPromptRuns_VendorIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
2148
2145
|
|
|
2146
|
+
@Field(() => [AIModelVendor_])
|
|
2147
|
+
MJ_AIModelVendors_VendorIDArray: AIModelVendor_[]; // Link to MJ_AIModelVendors
|
|
2148
|
+
|
|
2149
2149
|
@Field(() => [AIVendorType_])
|
|
2150
2150
|
MJ_AIVendorTypes_VendorIDArray: AIVendorType_[]; // Link to MJ_AIVendorTypes
|
|
2151
2151
|
|
|
@@ -2271,25 +2271,25 @@ export class AIVendorResolver extends ResolverBase {
|
|
|
2271
2271
|
return result;
|
|
2272
2272
|
}
|
|
2273
2273
|
|
|
2274
|
-
@FieldResolver(() => [
|
|
2275
|
-
async
|
|
2276
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
2274
|
+
@FieldResolver(() => [AIPromptRun_])
|
|
2275
|
+
async MJ_AIPromptRuns_VendorIDArray(@Root() aivendor_: AIVendor_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2276
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
2277
2277
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2278
2278
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2279
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2279
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [VendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2280
2280
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2281
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
2281
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
|
|
2282
2282
|
return result;
|
|
2283
2283
|
}
|
|
2284
2284
|
|
|
2285
|
-
@FieldResolver(() => [
|
|
2286
|
-
async
|
|
2287
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
2285
|
+
@FieldResolver(() => [AIModelVendor_])
|
|
2286
|
+
async MJ_AIModelVendors_VendorIDArray(@Root() aivendor_: AIVendor_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2287
|
+
this.CheckUserReadPermissions('MJ: AI Model Vendors', userPayload);
|
|
2288
2288
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2289
2289
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2290
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2290
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelVendors] WHERE [VendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Vendors', userPayload, EntityPermissionType.Read, 'AND');
|
|
2291
2291
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2292
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
2292
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Vendors', rows);
|
|
2293
2293
|
return result;
|
|
2294
2294
|
}
|
|
2295
2295
|
|
|
@@ -2569,14 +2569,14 @@ export class AIConfiguration_ {
|
|
|
2569
2569
|
@Field(() => [AIAgentPrompt_])
|
|
2570
2570
|
MJ_AIAgentPrompts_ConfigurationIDArray: AIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
2571
2571
|
|
|
2572
|
-
@Field(() => [
|
|
2573
|
-
|
|
2572
|
+
@Field(() => [AIPromptRun_])
|
|
2573
|
+
MJ_AIPromptRuns_ConfigurationIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
2574
2574
|
|
|
2575
2575
|
@Field(() => [AIResultCache_])
|
|
2576
2576
|
AIResultCache_ConfigurationIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
2577
2577
|
|
|
2578
|
-
@Field(() => [
|
|
2579
|
-
|
|
2578
|
+
@Field(() => [AIPromptModel_])
|
|
2579
|
+
MJ_AIPromptModels_ConfigurationIDArray: AIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
2580
2580
|
|
|
2581
2581
|
@Field(() => [AIAgentRun_])
|
|
2582
2582
|
MJ_AIAgentRuns_ConfigurationIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
@@ -2721,14 +2721,14 @@ export class AIConfigurationResolver extends ResolverBase {
|
|
|
2721
2721
|
return result;
|
|
2722
2722
|
}
|
|
2723
2723
|
|
|
2724
|
-
@FieldResolver(() => [
|
|
2725
|
-
async
|
|
2726
|
-
this.CheckUserReadPermissions('MJ: AI Prompt
|
|
2724
|
+
@FieldResolver(() => [AIPromptRun_])
|
|
2725
|
+
async MJ_AIPromptRuns_ConfigurationIDArray(@Root() aiconfiguration_: AIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2726
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
2727
2727
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2728
2728
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2729
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2729
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2730
2730
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2731
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt
|
|
2731
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
|
|
2732
2732
|
return result;
|
|
2733
2733
|
}
|
|
2734
2734
|
|
|
@@ -2743,14 +2743,14 @@ export class AIConfigurationResolver extends ResolverBase {
|
|
|
2743
2743
|
return result;
|
|
2744
2744
|
}
|
|
2745
2745
|
|
|
2746
|
-
@FieldResolver(() => [
|
|
2747
|
-
async
|
|
2748
|
-
this.CheckUserReadPermissions('MJ: AI Prompt
|
|
2746
|
+
@FieldResolver(() => [AIPromptModel_])
|
|
2747
|
+
async MJ_AIPromptModels_ConfigurationIDArray(@Root() aiconfiguration_: AIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2748
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
2749
2749
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2750
2750
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2751
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2751
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
2752
2752
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2753
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt
|
|
2753
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows);
|
|
2754
2754
|
return result;
|
|
2755
2755
|
}
|
|
2756
2756
|
|
|
@@ -2945,12 +2945,12 @@ if this limit is exceeded.`})
|
|
|
2945
2945
|
@MaxLength(200)
|
|
2946
2946
|
Type?: string;
|
|
2947
2947
|
|
|
2948
|
-
@Field(() => [AIAgentAction_])
|
|
2949
|
-
AIAgentActions_AgentIDArray: AIAgentAction_[]; // Link to AIAgentActions
|
|
2950
|
-
|
|
2951
2948
|
@Field(() => [AIAgentModel_])
|
|
2952
2949
|
AIAgentModels_AgentIDArray: AIAgentModel_[]; // Link to AIAgentModels
|
|
2953
2950
|
|
|
2951
|
+
@Field(() => [AIAgentAction_])
|
|
2952
|
+
AIAgentActions_AgentIDArray: AIAgentAction_[]; // Link to AIAgentActions
|
|
2953
|
+
|
|
2954
2954
|
@Field(() => [AIAgentLearningCycle_])
|
|
2955
2955
|
AIAgentLearningCycles_AgentIDArray: AIAgentLearningCycle_[]; // Link to AIAgentLearningCycles
|
|
2956
2956
|
|
|
@@ -2987,6 +2987,9 @@ if this limit is exceeded.`})
|
|
|
2987
2987
|
@Field(() => [AIPromptRun_])
|
|
2988
2988
|
MJ_AIPromptRuns_AgentIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
2989
2989
|
|
|
2990
|
+
@Field(() => [ConversationDetail_])
|
|
2991
|
+
ConversationDetails_AgentIDArray: ConversationDetail_[]; // Link to ConversationDetails
|
|
2992
|
+
|
|
2990
2993
|
@Field(() => [AIAgent_])
|
|
2991
2994
|
AIAgents_ParentIDArray: AIAgent_[]; // Link to AIAgents
|
|
2992
2995
|
|
|
@@ -3276,25 +3279,25 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
3276
3279
|
return result;
|
|
3277
3280
|
}
|
|
3278
3281
|
|
|
3279
|
-
@FieldResolver(() => [
|
|
3280
|
-
async
|
|
3281
|
-
this.CheckUserReadPermissions('AI Agent
|
|
3282
|
+
@FieldResolver(() => [AIAgentModel_])
|
|
3283
|
+
async AIAgentModels_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3284
|
+
this.CheckUserReadPermissions('AI Agent Models', userPayload);
|
|
3282
3285
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3283
3286
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3284
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
3287
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
3285
3288
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3286
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
3289
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', rows);
|
|
3287
3290
|
return result;
|
|
3288
3291
|
}
|
|
3289
3292
|
|
|
3290
|
-
@FieldResolver(() => [
|
|
3291
|
-
async
|
|
3292
|
-
this.CheckUserReadPermissions('AI Agent
|
|
3293
|
+
@FieldResolver(() => [AIAgentAction_])
|
|
3294
|
+
async AIAgentActions_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3295
|
+
this.CheckUserReadPermissions('AI Agent Actions', userPayload);
|
|
3293
3296
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3294
3297
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3295
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
3298
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
3296
3299
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3297
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
3300
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Actions', rows);
|
|
3298
3301
|
return result;
|
|
3299
3302
|
}
|
|
3300
3303
|
|
|
@@ -3430,6 +3433,17 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
3430
3433
|
return result;
|
|
3431
3434
|
}
|
|
3432
3435
|
|
|
3436
|
+
@FieldResolver(() => [ConversationDetail_])
|
|
3437
|
+
async ConversationDetails_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3438
|
+
this.CheckUserReadPermissions('Conversation Details', userPayload);
|
|
3439
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3440
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3441
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetails] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
3442
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3443
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Conversation Details', rows);
|
|
3444
|
+
return result;
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3433
3447
|
@FieldResolver(() => [AIAgent_])
|
|
3434
3448
|
async AIAgents_ParentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3435
3449
|
this.CheckUserReadPermissions('AI Agents', userPayload);
|
|
@@ -6338,12 +6352,12 @@ export class AIPrompt_ {
|
|
|
6338
6352
|
@Field(() => [AIPrompt_])
|
|
6339
6353
|
AIPrompts_ResultSelectorPromptIDArray: AIPrompt_[]; // Link to AIPrompts
|
|
6340
6354
|
|
|
6341
|
-
@Field(() => [AIPromptModel_])
|
|
6342
|
-
MJ_AIPromptModels_PromptIDArray: AIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
6343
|
-
|
|
6344
6355
|
@Field(() => [AIAgentPrompt_])
|
|
6345
6356
|
MJ_AIAgentPrompts_PromptIDArray: AIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
6346
6357
|
|
|
6358
|
+
@Field(() => [AIPromptModel_])
|
|
6359
|
+
MJ_AIPromptModels_PromptIDArray: AIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
6360
|
+
|
|
6347
6361
|
@Field(() => [AIAgentStep_])
|
|
6348
6362
|
MJ_AIAgentSteps_PromptIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
6349
6363
|
|
|
@@ -6778,25 +6792,25 @@ export class AIPromptResolver extends ResolverBase {
|
|
|
6778
6792
|
return result;
|
|
6779
6793
|
}
|
|
6780
6794
|
|
|
6781
|
-
@FieldResolver(() => [
|
|
6782
|
-
async
|
|
6783
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
6795
|
+
@FieldResolver(() => [AIAgentPrompt_])
|
|
6796
|
+
async MJ_AIAgentPrompts_PromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6797
|
+
this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
|
|
6784
6798
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6785
6799
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6786
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6800
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
|
|
6787
6801
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6788
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
6802
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
|
|
6789
6803
|
return result;
|
|
6790
6804
|
}
|
|
6791
6805
|
|
|
6792
|
-
@FieldResolver(() => [
|
|
6793
|
-
async
|
|
6794
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
6806
|
+
@FieldResolver(() => [AIPromptModel_])
|
|
6807
|
+
async MJ_AIPromptModels_PromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6808
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
6795
6809
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6796
6810
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6797
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6811
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptModels] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
6798
6812
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6799
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
6813
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Models', rows);
|
|
6800
6814
|
return result;
|
|
6801
6815
|
}
|
|
6802
6816
|
|
|
@@ -10752,12 +10766,12 @@ export class Entity_ {
|
|
|
10752
10766
|
@Field(() => [QueryEntity_])
|
|
10753
10767
|
QueryEntities_EntityIDArray: QueryEntity_[]; // Link to QueryEntities
|
|
10754
10768
|
|
|
10755
|
-
@Field(() => [RecordLink_])
|
|
10756
|
-
MJ_RecordLinks_SourceEntityIDArray: RecordLink_[]; // Link to MJ_RecordLinks
|
|
10757
|
-
|
|
10758
10769
|
@Field(() => [AccessControlRule_])
|
|
10759
10770
|
MJ_AccessControlRules_EntityIDArray: AccessControlRule_[]; // Link to MJ_AccessControlRules
|
|
10760
10771
|
|
|
10772
|
+
@Field(() => [RecordLink_])
|
|
10773
|
+
MJ_RecordLinks_SourceEntityIDArray: RecordLink_[]; // Link to MJ_RecordLinks
|
|
10774
|
+
|
|
10761
10775
|
@Field(() => [GeneratedCode_])
|
|
10762
10776
|
GeneratedCodes_LinkedEntityIDArray: GeneratedCode_[]; // Link to GeneratedCodes
|
|
10763
10777
|
|
|
@@ -11565,25 +11579,25 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
11565
11579
|
return result;
|
|
11566
11580
|
}
|
|
11567
11581
|
|
|
11568
|
-
@FieldResolver(() => [
|
|
11569
|
-
async
|
|
11570
|
-
this.CheckUserReadPermissions('MJ:
|
|
11582
|
+
@FieldResolver(() => [AccessControlRule_])
|
|
11583
|
+
async MJ_AccessControlRules_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11584
|
+
this.CheckUserReadPermissions('MJ: Access Control Rules', userPayload);
|
|
11571
11585
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11572
11586
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11573
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
11587
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAccessControlRules] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Access Control Rules', userPayload, EntityPermissionType.Read, 'AND');
|
|
11574
11588
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11575
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
11589
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Access Control Rules', rows);
|
|
11576
11590
|
return result;
|
|
11577
11591
|
}
|
|
11578
11592
|
|
|
11579
|
-
@FieldResolver(() => [
|
|
11580
|
-
async
|
|
11581
|
-
this.CheckUserReadPermissions('MJ:
|
|
11593
|
+
@FieldResolver(() => [RecordLink_])
|
|
11594
|
+
async MJ_RecordLinks_SourceEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11595
|
+
this.CheckUserReadPermissions('MJ: Record Links', userPayload);
|
|
11582
11596
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11583
11597
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11584
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
11598
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordLinks] WHERE [SourceEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
11585
11599
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11586
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
11600
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Record Links', rows);
|
|
11587
11601
|
return result;
|
|
11588
11602
|
}
|
|
11589
11603
|
|
|
@@ -23281,6 +23295,18 @@ export class ConversationDetail_ {
|
|
|
23281
23295
|
@Field(() => Boolean, {description: `Indicates if this message is pinned within the conversation for easy reference`})
|
|
23282
23296
|
IsPinned: boolean;
|
|
23283
23297
|
|
|
23298
|
+
@Field({nullable: true, description: `Optional reference to parent message for threaded conversations. NULL for top-level messages.`})
|
|
23299
|
+
@MaxLength(16)
|
|
23300
|
+
ParentID?: string;
|
|
23301
|
+
|
|
23302
|
+
@Field({nullable: true, description: `Denormalized agent ID for quick lookup of agent name and icon without joining through AgentRun`})
|
|
23303
|
+
@MaxLength(16)
|
|
23304
|
+
AgentID?: string;
|
|
23305
|
+
|
|
23306
|
+
@Field({description: `Status of the conversation message. Complete indicates finished processing, In-Progress indicates active agent work, Error indicates processing failed.`})
|
|
23307
|
+
@MaxLength(40)
|
|
23308
|
+
Status: string;
|
|
23309
|
+
|
|
23284
23310
|
@Field({nullable: true})
|
|
23285
23311
|
@MaxLength(510)
|
|
23286
23312
|
Conversation?: string;
|
|
@@ -23293,12 +23319,22 @@ export class ConversationDetail_ {
|
|
|
23293
23319
|
@MaxLength(510)
|
|
23294
23320
|
Artifact?: string;
|
|
23295
23321
|
|
|
23322
|
+
@Field({nullable: true})
|
|
23323
|
+
@MaxLength(510)
|
|
23324
|
+
Agent?: string;
|
|
23325
|
+
|
|
23296
23326
|
@Field(() => [Report_])
|
|
23297
23327
|
Reports_ConversationDetailIDArray: Report_[]; // Link to Reports
|
|
23298
23328
|
|
|
23329
|
+
@Field(() => [ConversationDetailArtifact_])
|
|
23330
|
+
MJ_ConversationDetailArtifacts_ConversationDetailIDArray: ConversationDetailArtifact_[]; // Link to MJ_ConversationDetailArtifacts
|
|
23331
|
+
|
|
23299
23332
|
@Field(() => [AIAgentRun_])
|
|
23300
23333
|
MJ_AIAgentRuns_ConversationDetailIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
23301
23334
|
|
|
23335
|
+
@Field(() => [ConversationDetail_])
|
|
23336
|
+
ConversationDetails_ParentIDArray: ConversationDetail_[]; // Link to ConversationDetails
|
|
23337
|
+
|
|
23302
23338
|
@Field(() => [Task_])
|
|
23303
23339
|
MJ_Tasks_ConversationDetailIDArray: Task_[]; // Link to MJ_Tasks
|
|
23304
23340
|
|
|
@@ -23356,6 +23392,15 @@ export class CreateConversationDetailInput {
|
|
|
23356
23392
|
|
|
23357
23393
|
@Field(() => Boolean, { nullable: true })
|
|
23358
23394
|
IsPinned?: boolean;
|
|
23395
|
+
|
|
23396
|
+
@Field({ nullable: true })
|
|
23397
|
+
ParentID: string | null;
|
|
23398
|
+
|
|
23399
|
+
@Field({ nullable: true })
|
|
23400
|
+
AgentID: string | null;
|
|
23401
|
+
|
|
23402
|
+
@Field({ nullable: true })
|
|
23403
|
+
Status?: string;
|
|
23359
23404
|
}
|
|
23360
23405
|
|
|
23361
23406
|
|
|
@@ -23412,6 +23457,15 @@ export class UpdateConversationDetailInput {
|
|
|
23412
23457
|
@Field(() => Boolean, { nullable: true })
|
|
23413
23458
|
IsPinned?: boolean;
|
|
23414
23459
|
|
|
23460
|
+
@Field({ nullable: true })
|
|
23461
|
+
ParentID?: string | null;
|
|
23462
|
+
|
|
23463
|
+
@Field({ nullable: true })
|
|
23464
|
+
AgentID?: string | null;
|
|
23465
|
+
|
|
23466
|
+
@Field({ nullable: true })
|
|
23467
|
+
Status?: string;
|
|
23468
|
+
|
|
23415
23469
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
23416
23470
|
OldValues___?: KeyValuePairInput[];
|
|
23417
23471
|
}
|
|
@@ -23485,6 +23539,17 @@ export class ConversationDetailResolver extends ResolverBase {
|
|
|
23485
23539
|
return result;
|
|
23486
23540
|
}
|
|
23487
23541
|
|
|
23542
|
+
@FieldResolver(() => [ConversationDetailArtifact_])
|
|
23543
|
+
async MJ_ConversationDetailArtifacts_ConversationDetailIDArray(@Root() conversationdetail_: ConversationDetail_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23544
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Artifacts', userPayload);
|
|
23545
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23546
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
23547
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailArtifacts] WHERE [ConversationDetailID]='${conversationdetail_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Artifacts', userPayload, EntityPermissionType.Read, 'AND');
|
|
23548
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
23549
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Artifacts', rows);
|
|
23550
|
+
return result;
|
|
23551
|
+
}
|
|
23552
|
+
|
|
23488
23553
|
@FieldResolver(() => [AIAgentRun_])
|
|
23489
23554
|
async MJ_AIAgentRuns_ConversationDetailIDArray(@Root() conversationdetail_: ConversationDetail_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23490
23555
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -23496,6 +23561,17 @@ export class ConversationDetailResolver extends ResolverBase {
|
|
|
23496
23561
|
return result;
|
|
23497
23562
|
}
|
|
23498
23563
|
|
|
23564
|
+
@FieldResolver(() => [ConversationDetail_])
|
|
23565
|
+
async ConversationDetails_ParentIDArray(@Root() conversationdetail_: ConversationDetail_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23566
|
+
this.CheckUserReadPermissions('Conversation Details', userPayload);
|
|
23567
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23568
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
23569
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetails] WHERE [ParentID]='${conversationdetail_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Conversation Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
23570
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
23571
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Conversation Details', rows);
|
|
23572
|
+
return result;
|
|
23573
|
+
}
|
|
23574
|
+
|
|
23499
23575
|
@FieldResolver(() => [Task_])
|
|
23500
23576
|
async MJ_Tasks_ConversationDetailIDArray(@Root() conversationdetail_: ConversationDetail_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23501
23577
|
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
@@ -40815,12 +40891,12 @@ export class ConversationArtifact_ {
|
|
|
40815
40891
|
@MaxLength(200)
|
|
40816
40892
|
ArtifactType: string;
|
|
40817
40893
|
|
|
40818
|
-
@Field(() => [ConversationArtifactPermission_])
|
|
40819
|
-
MJ_ConversationArtifactPermissions_ConversationArtifactIDArray: ConversationArtifactPermission_[]; // Link to MJ_ConversationArtifactPermissions
|
|
40820
|
-
|
|
40821
40894
|
@Field(() => [ConversationArtifactVersion_])
|
|
40822
40895
|
MJ_ConversationArtifactVersions_ConversationArtifactIDArray: ConversationArtifactVersion_[]; // Link to MJ_ConversationArtifactVersions
|
|
40823
40896
|
|
|
40897
|
+
@Field(() => [ConversationArtifactPermission_])
|
|
40898
|
+
MJ_ConversationArtifactPermissions_ConversationArtifactIDArray: ConversationArtifactPermission_[]; // Link to MJ_ConversationArtifactPermissions
|
|
40899
|
+
|
|
40824
40900
|
@Field(() => [ConversationDetail_])
|
|
40825
40901
|
ConversationDetails_ArtifactIDArray: ConversationDetail_[]; // Link to ConversationDetails
|
|
40826
40902
|
|
|
@@ -40942,25 +41018,25 @@ export class ConversationArtifactResolver extends ResolverBase {
|
|
|
40942
41018
|
return result;
|
|
40943
41019
|
}
|
|
40944
41020
|
|
|
40945
|
-
@FieldResolver(() => [
|
|
40946
|
-
async
|
|
40947
|
-
this.CheckUserReadPermissions('MJ: Conversation Artifact
|
|
41021
|
+
@FieldResolver(() => [ConversationArtifactVersion_])
|
|
41022
|
+
async MJ_ConversationArtifactVersions_ConversationArtifactIDArray(@Root() conversationartifact_: ConversationArtifact_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41023
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifact Versions', userPayload);
|
|
40948
41024
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40949
41025
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
40950
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
41026
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactVersions] WHERE [ConversationArtifactID]='${conversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
40951
41027
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
40952
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact
|
|
41028
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Versions', rows);
|
|
40953
41029
|
return result;
|
|
40954
41030
|
}
|
|
40955
41031
|
|
|
40956
|
-
@FieldResolver(() => [
|
|
40957
|
-
async
|
|
40958
|
-
this.CheckUserReadPermissions('MJ: Conversation Artifact
|
|
41032
|
+
@FieldResolver(() => [ConversationArtifactPermission_])
|
|
41033
|
+
async MJ_ConversationArtifactPermissions_ConversationArtifactIDArray(@Root() conversationartifact_: ConversationArtifact_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41034
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifact Permissions', userPayload);
|
|
40959
41035
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40960
41036
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
40961
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
41037
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactPermissions] WHERE [ConversationArtifactID]='${conversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
40962
41038
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
40963
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact
|
|
41039
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Permissions', rows);
|
|
40964
41040
|
return result;
|
|
40965
41041
|
}
|
|
40966
41042
|
|
|
@@ -45781,6 +45857,164 @@ export class AIAgentRunStepResolver extends ResolverBase {
|
|
|
45781
45857
|
|
|
45782
45858
|
}
|
|
45783
45859
|
|
|
45860
|
+
//****************************************************************************
|
|
45861
|
+
// ENTITY CLASS for MJ: Conversation Detail Artifacts
|
|
45862
|
+
//****************************************************************************
|
|
45863
|
+
@ObjectType({ description: `Junction table tracking many-to-many relationship between conversation messages and artifact versions, with directionality tracking` })
|
|
45864
|
+
export class ConversationDetailArtifact_ {
|
|
45865
|
+
@Field()
|
|
45866
|
+
@MaxLength(16)
|
|
45867
|
+
ID: string;
|
|
45868
|
+
|
|
45869
|
+
@Field({description: `Foreign key to ConversationDetail - the conversation message associated with this artifact`})
|
|
45870
|
+
@MaxLength(16)
|
|
45871
|
+
ConversationDetailID: string;
|
|
45872
|
+
|
|
45873
|
+
@Field({description: `Foreign key to ArtifactVersion - the specific artifact version linked to this conversation message`})
|
|
45874
|
+
@MaxLength(16)
|
|
45875
|
+
ArtifactVersionID: string;
|
|
45876
|
+
|
|
45877
|
+
@Field({description: `Direction of artifact flow: Input (fed to agent) or Output (produced by agent)`})
|
|
45878
|
+
@MaxLength(40)
|
|
45879
|
+
Direction: string;
|
|
45880
|
+
|
|
45881
|
+
@Field()
|
|
45882
|
+
@MaxLength(10)
|
|
45883
|
+
_mj__CreatedAt: Date;
|
|
45884
|
+
|
|
45885
|
+
@Field()
|
|
45886
|
+
@MaxLength(10)
|
|
45887
|
+
_mj__UpdatedAt: Date;
|
|
45888
|
+
|
|
45889
|
+
}
|
|
45890
|
+
|
|
45891
|
+
//****************************************************************************
|
|
45892
|
+
// INPUT TYPE for MJ: Conversation Detail Artifacts
|
|
45893
|
+
//****************************************************************************
|
|
45894
|
+
@InputType()
|
|
45895
|
+
export class CreateConversationDetailArtifactInput {
|
|
45896
|
+
@Field({ nullable: true })
|
|
45897
|
+
ID?: string;
|
|
45898
|
+
|
|
45899
|
+
@Field({ nullable: true })
|
|
45900
|
+
ConversationDetailID?: string;
|
|
45901
|
+
|
|
45902
|
+
@Field({ nullable: true })
|
|
45903
|
+
ArtifactVersionID?: string;
|
|
45904
|
+
|
|
45905
|
+
@Field({ nullable: true })
|
|
45906
|
+
Direction?: string;
|
|
45907
|
+
}
|
|
45908
|
+
|
|
45909
|
+
|
|
45910
|
+
//****************************************************************************
|
|
45911
|
+
// INPUT TYPE for MJ: Conversation Detail Artifacts
|
|
45912
|
+
//****************************************************************************
|
|
45913
|
+
@InputType()
|
|
45914
|
+
export class UpdateConversationDetailArtifactInput {
|
|
45915
|
+
@Field()
|
|
45916
|
+
ID: string;
|
|
45917
|
+
|
|
45918
|
+
@Field({ nullable: true })
|
|
45919
|
+
ConversationDetailID?: string;
|
|
45920
|
+
|
|
45921
|
+
@Field({ nullable: true })
|
|
45922
|
+
ArtifactVersionID?: string;
|
|
45923
|
+
|
|
45924
|
+
@Field({ nullable: true })
|
|
45925
|
+
Direction?: string;
|
|
45926
|
+
|
|
45927
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
45928
|
+
OldValues___?: KeyValuePairInput[];
|
|
45929
|
+
}
|
|
45930
|
+
|
|
45931
|
+
//****************************************************************************
|
|
45932
|
+
// RESOLVER for MJ: Conversation Detail Artifacts
|
|
45933
|
+
//****************************************************************************
|
|
45934
|
+
@ObjectType()
|
|
45935
|
+
export class RunConversationDetailArtifactViewResult {
|
|
45936
|
+
@Field(() => [ConversationDetailArtifact_])
|
|
45937
|
+
Results: ConversationDetailArtifact_[];
|
|
45938
|
+
|
|
45939
|
+
@Field(() => String, {nullable: true})
|
|
45940
|
+
UserViewRunID?: string;
|
|
45941
|
+
|
|
45942
|
+
@Field(() => Int, {nullable: true})
|
|
45943
|
+
RowCount: number;
|
|
45944
|
+
|
|
45945
|
+
@Field(() => Int, {nullable: true})
|
|
45946
|
+
TotalRowCount: number;
|
|
45947
|
+
|
|
45948
|
+
@Field(() => Int, {nullable: true})
|
|
45949
|
+
ExecutionTime: number;
|
|
45950
|
+
|
|
45951
|
+
@Field({nullable: true})
|
|
45952
|
+
ErrorMessage?: string;
|
|
45953
|
+
|
|
45954
|
+
@Field(() => Boolean, {nullable: false})
|
|
45955
|
+
Success: boolean;
|
|
45956
|
+
}
|
|
45957
|
+
|
|
45958
|
+
@Resolver(ConversationDetailArtifact_)
|
|
45959
|
+
export class ConversationDetailArtifactResolver extends ResolverBase {
|
|
45960
|
+
@Query(() => RunConversationDetailArtifactViewResult)
|
|
45961
|
+
async RunConversationDetailArtifactViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45962
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45963
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
45964
|
+
}
|
|
45965
|
+
|
|
45966
|
+
@Query(() => RunConversationDetailArtifactViewResult)
|
|
45967
|
+
async RunConversationDetailArtifactViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45968
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45969
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
45970
|
+
}
|
|
45971
|
+
|
|
45972
|
+
@Query(() => RunConversationDetailArtifactViewResult)
|
|
45973
|
+
async RunConversationDetailArtifactDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45974
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45975
|
+
input.EntityName = 'MJ: Conversation Detail Artifacts';
|
|
45976
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
45977
|
+
}
|
|
45978
|
+
@Query(() => ConversationDetailArtifact_, { nullable: true })
|
|
45979
|
+
async ConversationDetailArtifact(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ConversationDetailArtifact_ | null> {
|
|
45980
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Artifacts', userPayload);
|
|
45981
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45982
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
45983
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailArtifacts] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Artifacts', userPayload, EntityPermissionType.Read, 'AND');
|
|
45984
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
45985
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Conversation Detail Artifacts', rows && rows.length > 0 ? rows[0] : {})
|
|
45986
|
+
return result;
|
|
45987
|
+
}
|
|
45988
|
+
|
|
45989
|
+
@Mutation(() => ConversationDetailArtifact_)
|
|
45990
|
+
async CreateConversationDetailArtifact(
|
|
45991
|
+
@Arg('input', () => CreateConversationDetailArtifactInput) input: CreateConversationDetailArtifactInput,
|
|
45992
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
45993
|
+
@PubSub() pubSub: PubSubEngine
|
|
45994
|
+
) {
|
|
45995
|
+
const provider = GetReadWriteProvider(providers);
|
|
45996
|
+
return this.CreateRecord('MJ: Conversation Detail Artifacts', input, provider, userPayload, pubSub)
|
|
45997
|
+
}
|
|
45998
|
+
|
|
45999
|
+
@Mutation(() => ConversationDetailArtifact_)
|
|
46000
|
+
async UpdateConversationDetailArtifact(
|
|
46001
|
+
@Arg('input', () => UpdateConversationDetailArtifactInput) input: UpdateConversationDetailArtifactInput,
|
|
46002
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
46003
|
+
@PubSub() pubSub: PubSubEngine
|
|
46004
|
+
) {
|
|
46005
|
+
const provider = GetReadWriteProvider(providers);
|
|
46006
|
+
return this.UpdateRecord('MJ: Conversation Detail Artifacts', input, provider, userPayload, pubSub);
|
|
46007
|
+
}
|
|
46008
|
+
|
|
46009
|
+
@Mutation(() => ConversationDetailArtifact_)
|
|
46010
|
+
async DeleteConversationDetailArtifact(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46011
|
+
const provider = GetReadWriteProvider(providers);
|
|
46012
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
46013
|
+
return this.DeleteRecord('MJ: Conversation Detail Artifacts', key, options, provider, userPayload, pubSub);
|
|
46014
|
+
}
|
|
46015
|
+
|
|
46016
|
+
}
|
|
46017
|
+
|
|
45784
46018
|
//****************************************************************************
|
|
45785
46019
|
// ENTITY CLASS for MJ: Tasks
|
|
45786
46020
|
//****************************************************************************
|
|
@@ -46729,6 +46963,10 @@ export class ArtifactVersion_ {
|
|
|
46729
46963
|
@MaxLength(10)
|
|
46730
46964
|
_mj__UpdatedAt: Date;
|
|
46731
46965
|
|
|
46966
|
+
@Field({nullable: true, description: `SHA-256 hash of the Content field for duplicate detection and version comparison`})
|
|
46967
|
+
@MaxLength(1000)
|
|
46968
|
+
ContentHash?: string;
|
|
46969
|
+
|
|
46732
46970
|
@Field()
|
|
46733
46971
|
@MaxLength(510)
|
|
46734
46972
|
Artifact: string;
|
|
@@ -46737,6 +46975,9 @@ export class ArtifactVersion_ {
|
|
|
46737
46975
|
@MaxLength(200)
|
|
46738
46976
|
User: string;
|
|
46739
46977
|
|
|
46978
|
+
@Field(() => [ConversationDetailArtifact_])
|
|
46979
|
+
MJ_ConversationDetailArtifacts_ArtifactVersionIDArray: ConversationDetailArtifact_[]; // Link to MJ_ConversationDetailArtifacts
|
|
46980
|
+
|
|
46740
46981
|
}
|
|
46741
46982
|
|
|
46742
46983
|
//****************************************************************************
|
|
@@ -46764,6 +47005,9 @@ export class CreateArtifactVersionInput {
|
|
|
46764
47005
|
|
|
46765
47006
|
@Field({ nullable: true })
|
|
46766
47007
|
UserID?: string;
|
|
47008
|
+
|
|
47009
|
+
@Field({ nullable: true })
|
|
47010
|
+
ContentHash: string | null;
|
|
46767
47011
|
}
|
|
46768
47012
|
|
|
46769
47013
|
|
|
@@ -46793,6 +47037,9 @@ export class UpdateArtifactVersionInput {
|
|
|
46793
47037
|
@Field({ nullable: true })
|
|
46794
47038
|
UserID?: string;
|
|
46795
47039
|
|
|
47040
|
+
@Field({ nullable: true })
|
|
47041
|
+
ContentHash?: string | null;
|
|
47042
|
+
|
|
46796
47043
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
46797
47044
|
OldValues___?: KeyValuePairInput[];
|
|
46798
47045
|
}
|
|
@@ -46855,6 +47102,17 @@ export class ArtifactVersionResolver extends ResolverBase {
|
|
|
46855
47102
|
return result;
|
|
46856
47103
|
}
|
|
46857
47104
|
|
|
47105
|
+
@FieldResolver(() => [ConversationDetailArtifact_])
|
|
47106
|
+
async MJ_ConversationDetailArtifacts_ArtifactVersionIDArray(@Root() artifactversion_: ArtifactVersion_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
47107
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Artifacts', userPayload);
|
|
47108
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
47109
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
47110
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailArtifacts] WHERE [ArtifactVersionID]='${artifactversion_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Artifacts', userPayload, EntityPermissionType.Read, 'AND');
|
|
47111
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
47112
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Artifacts', rows);
|
|
47113
|
+
return result;
|
|
47114
|
+
}
|
|
47115
|
+
|
|
46858
47116
|
@Mutation(() => ArtifactVersion_)
|
|
46859
47117
|
async CreateArtifactVersion(
|
|
46860
47118
|
@Arg('input', () => CreateArtifactVersionInput) input: CreateArtifactVersionInput,
|