@memberjunction/server 2.111.1 → 2.113.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/generated/generated.d.ts +140 -10
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +923 -74
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +39 -37
- package/src/generated/generated.ts +590 -54
- package/src/index.ts +6 -0
|
@@ -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, ArtifactPermissionEntity, 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, AIAgentArtifactTypeEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, ScheduledJobRunEntity, DashboardUserStateEntity, ComponentEntity, AccessControlRuleEntity, PublicLinkEntity, ArtifactTypeEntity, AIVendorTypeEntity, ArtifactEntity, AIAgentExampleEntity, ConversationArtifactEntity, CollectionPermissionEntity, AIAgentPromptEntity, ComponentLibraryEntity, ScheduledJobTypeEntity, DashboardUserPreferenceEntity, QueryParameterEntity, AIAgentPermissionEntity, AIAgentRelationshipEntity, ComponentLibraryLinkEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, ScheduledJobEntity, AIPromptRunEntity, AIAgentRunStepEntity, ConversationDetailArtifactEntity, TaskEntity, ProjectEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, ArtifactVersionEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity, ArtifactVersionAttributeEntity, AIAgentDataSourceEntity } 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, ArtifactPermissionEntity, 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, AIAgentArtifactTypeEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, ScheduledJobRunEntity, DashboardUserStateEntity, ComponentEntity, AccessControlRuleEntity, ArtifactUseEntity, PublicLinkEntity, ArtifactTypeEntity, AIVendorTypeEntity, ArtifactEntity, AIAgentExampleEntity, ConversationArtifactEntity, CollectionPermissionEntity, AIAgentPromptEntity, ComponentLibraryEntity, ScheduledJobTypeEntity, DashboardUserPreferenceEntity, QueryParameterEntity, ConversationDetailRatingEntity, AIAgentPermissionEntity, AIAgentRelationshipEntity, ComponentLibraryLinkEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, ScheduledJobEntity, AIPromptRunEntity, AIAgentRunStepEntity, ConversationDetailArtifactEntity, TaskEntity, ProjectEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, ArtifactVersionEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity, ArtifactVersionAttributeEntity, AIAgentDataSourceEntity } from '@memberjunction/core-entities';
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
//****************************************************************************
|
|
@@ -1782,12 +1782,12 @@ each time the agent processes a prompt step.`})
|
|
|
1782
1782
|
@Field(() => [MJAIAgentRun_])
|
|
1783
1783
|
MJ_AIAgentRuns_ParentRunIDArray: MJAIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
1784
1784
|
|
|
1785
|
-
@Field(() => [MJAIAgentNote_])
|
|
1786
|
-
AIAgentNotes_SourceAIAgentRunIDArray: MJAIAgentNote_[]; // Link to AIAgentNotes
|
|
1787
|
-
|
|
1788
1785
|
@Field(() => [MJAIAgentExample_])
|
|
1789
1786
|
MJ_AIAgentExamples_SourceAIAgentRunIDArray: MJAIAgentExample_[]; // Link to MJ_AIAgentExamples
|
|
1790
1787
|
|
|
1788
|
+
@Field(() => [MJAIAgentNote_])
|
|
1789
|
+
AIAgentNotes_SourceAIAgentRunIDArray: MJAIAgentNote_[]; // Link to AIAgentNotes
|
|
1790
|
+
|
|
1791
1791
|
@Field(() => [MJAIPromptRun_])
|
|
1792
1792
|
MJ_AIPromptRuns_AgentRunIDArray: MJAIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
1793
1793
|
|
|
@@ -2117,25 +2117,25 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
2117
2117
|
return result;
|
|
2118
2118
|
}
|
|
2119
2119
|
|
|
2120
|
-
@FieldResolver(() => [
|
|
2121
|
-
async
|
|
2122
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2120
|
+
@FieldResolver(() => [MJAIAgentExample_])
|
|
2121
|
+
async MJ_AIAgentExamples_SourceAIAgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2122
|
+
this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
|
|
2123
2123
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2124
2124
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2125
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2125
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [SourceAIAgentRunID]='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
|
|
2126
2126
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2127
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2127
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows);
|
|
2128
2128
|
return result;
|
|
2129
2129
|
}
|
|
2130
2130
|
|
|
2131
|
-
@FieldResolver(() => [
|
|
2132
|
-
async
|
|
2133
|
-
this.CheckUserReadPermissions('
|
|
2131
|
+
@FieldResolver(() => [MJAIAgentNote_])
|
|
2132
|
+
async AIAgentNotes_SourceAIAgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2133
|
+
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
2134
2134
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2135
2135
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2136
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2136
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [SourceAIAgentRunID]='${mjaiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
2137
2137
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2138
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
2138
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
|
|
2139
2139
|
return result;
|
|
2140
2140
|
}
|
|
2141
2141
|
|
|
@@ -2638,15 +2638,15 @@ export class MJAIConfiguration_ {
|
|
|
2638
2638
|
@Field(() => [MJAIAgentPrompt_])
|
|
2639
2639
|
MJ_AIAgentPrompts_ConfigurationIDArray: MJAIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
2640
2640
|
|
|
2641
|
+
@Field(() => [MJAIPromptRun_])
|
|
2642
|
+
MJ_AIPromptRuns_ConfigurationIDArray: MJAIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
2643
|
+
|
|
2641
2644
|
@Field(() => [MJAIPromptModel_])
|
|
2642
2645
|
MJ_AIPromptModels_ConfigurationIDArray: MJAIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
2643
2646
|
|
|
2644
2647
|
@Field(() => [MJAIResultCache_])
|
|
2645
2648
|
AIResultCache_ConfigurationIDArray: MJAIResultCache_[]; // Link to AIResultCache
|
|
2646
2649
|
|
|
2647
|
-
@Field(() => [MJAIPromptRun_])
|
|
2648
|
-
MJ_AIPromptRuns_ConfigurationIDArray: MJAIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
2649
|
-
|
|
2650
2650
|
@Field(() => [MJAIAgentRun_])
|
|
2651
2651
|
MJ_AIAgentRuns_ConfigurationIDArray: MJAIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
2652
2652
|
|
|
@@ -2790,6 +2790,17 @@ export class MJAIConfigurationResolver extends ResolverBase {
|
|
|
2790
2790
|
return result;
|
|
2791
2791
|
}
|
|
2792
2792
|
|
|
2793
|
+
@FieldResolver(() => [MJAIPromptRun_])
|
|
2794
|
+
async MJ_AIPromptRuns_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2795
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
2796
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2797
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2798
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ConfigurationID]='${mjaiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2799
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2800
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
|
|
2801
|
+
return result;
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2793
2804
|
@FieldResolver(() => [MJAIPromptModel_])
|
|
2794
2805
|
async MJ_AIPromptModels_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2795
2806
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
@@ -2812,17 +2823,6 @@ export class MJAIConfigurationResolver extends ResolverBase {
|
|
|
2812
2823
|
return result;
|
|
2813
2824
|
}
|
|
2814
2825
|
|
|
2815
|
-
@FieldResolver(() => [MJAIPromptRun_])
|
|
2816
|
-
async MJ_AIPromptRuns_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2817
|
-
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
2818
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2819
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2820
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ConfigurationID]='${mjaiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2821
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2822
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
|
|
2823
|
-
return result;
|
|
2824
|
-
}
|
|
2825
|
-
|
|
2826
2826
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
2827
2827
|
async MJ_AIAgentRuns_ConfigurationIDArray(@Root() mjaiconfiguration_: MJAIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2828
2828
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -3044,6 +3044,16 @@ if this limit is exceeded.`})
|
|
|
3044
3044
|
@MaxLength(40)
|
|
3045
3045
|
ExampleInjectionStrategy: string;
|
|
3046
3046
|
|
|
3047
|
+
@Field(() => Boolean, {description: `When true, agent is restricted to system/scheduled use only and hidden from user selection, Agent Manager, and MCP/A2A discovery.`})
|
|
3048
|
+
IsRestricted: boolean;
|
|
3049
|
+
|
|
3050
|
+
@Field({description: `Specifies how conversation messages are passed from parent agent to this child sub-agent (when this agent is a child via ParentID). Valid values: 'None' (fresh start - only context and task message, default), 'All' (all parent conversation history), 'Latest' (most recent MaxMessages messages), 'Bookend' (first 2 messages + most recent MaxMessages-2 messages with indicator between). Stored on child agent because each child has only one parent relationship.`})
|
|
3051
|
+
@MaxLength(100)
|
|
3052
|
+
MessageMode: string;
|
|
3053
|
+
|
|
3054
|
+
@Field(() => Int, {nullable: true, description: `Maximum number of conversation messages to include when MessageMode is 'Latest' or 'Bookend'. NULL means no limit (ignored for 'None' and 'All' modes). Must be greater than 0 if specified. For 'Latest': keeps most recent N messages. For 'Bookend': keeps first 2 + most recent (N-2) messages.`})
|
|
3055
|
+
MaxMessages?: number;
|
|
3056
|
+
|
|
3047
3057
|
@Field({nullable: true})
|
|
3048
3058
|
@MaxLength(510)
|
|
3049
3059
|
Parent?: string;
|
|
@@ -3275,6 +3285,15 @@ export class CreateMJAIAgentInput {
|
|
|
3275
3285
|
|
|
3276
3286
|
@Field({ nullable: true })
|
|
3277
3287
|
ExampleInjectionStrategy?: string;
|
|
3288
|
+
|
|
3289
|
+
@Field(() => Boolean, { nullable: true })
|
|
3290
|
+
IsRestricted?: boolean;
|
|
3291
|
+
|
|
3292
|
+
@Field({ nullable: true })
|
|
3293
|
+
MessageMode?: string;
|
|
3294
|
+
|
|
3295
|
+
@Field(() => Int, { nullable: true })
|
|
3296
|
+
MaxMessages: number | null;
|
|
3278
3297
|
}
|
|
3279
3298
|
|
|
3280
3299
|
|
|
@@ -3424,6 +3443,15 @@ export class UpdateMJAIAgentInput {
|
|
|
3424
3443
|
@Field({ nullable: true })
|
|
3425
3444
|
ExampleInjectionStrategy?: string;
|
|
3426
3445
|
|
|
3446
|
+
@Field(() => Boolean, { nullable: true })
|
|
3447
|
+
IsRestricted?: boolean;
|
|
3448
|
+
|
|
3449
|
+
@Field({ nullable: true })
|
|
3450
|
+
MessageMode?: string;
|
|
3451
|
+
|
|
3452
|
+
@Field(() => Int, { nullable: true })
|
|
3453
|
+
MaxMessages?: number | null;
|
|
3454
|
+
|
|
3427
3455
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
3428
3456
|
OldValues___?: KeyValuePairInput[];
|
|
3429
3457
|
}
|
|
@@ -4902,6 +4930,13 @@ export class MJAIAgentNote_ {
|
|
|
4902
4930
|
@MaxLength(16)
|
|
4903
4931
|
CompanyID?: string;
|
|
4904
4932
|
|
|
4933
|
+
@Field({nullable: true, description: `JSON array of embedding vector for semantic search on Note field. Auto-generated when Note changes.`})
|
|
4934
|
+
EmbeddingVector?: string;
|
|
4935
|
+
|
|
4936
|
+
@Field({nullable: true, description: `Reference to the AI model used to generate the embedding vector.`})
|
|
4937
|
+
@MaxLength(16)
|
|
4938
|
+
EmbeddingModelID?: string;
|
|
4939
|
+
|
|
4905
4940
|
@Field({nullable: true})
|
|
4906
4941
|
@MaxLength(510)
|
|
4907
4942
|
Agent?: string;
|
|
@@ -4922,6 +4957,10 @@ export class MJAIAgentNote_ {
|
|
|
4922
4957
|
@MaxLength(100)
|
|
4923
4958
|
Company?: string;
|
|
4924
4959
|
|
|
4960
|
+
@Field({nullable: true})
|
|
4961
|
+
@MaxLength(100)
|
|
4962
|
+
EmbeddingModel?: string;
|
|
4963
|
+
|
|
4925
4964
|
}
|
|
4926
4965
|
|
|
4927
4966
|
//****************************************************************************
|
|
@@ -4967,6 +5006,12 @@ export class CreateMJAIAgentNoteInput {
|
|
|
4967
5006
|
|
|
4968
5007
|
@Field({ nullable: true })
|
|
4969
5008
|
CompanyID: string | null;
|
|
5009
|
+
|
|
5010
|
+
@Field({ nullable: true })
|
|
5011
|
+
EmbeddingVector: string | null;
|
|
5012
|
+
|
|
5013
|
+
@Field({ nullable: true })
|
|
5014
|
+
EmbeddingModelID: string | null;
|
|
4970
5015
|
}
|
|
4971
5016
|
|
|
4972
5017
|
|
|
@@ -5014,6 +5059,12 @@ export class UpdateMJAIAgentNoteInput {
|
|
|
5014
5059
|
@Field({ nullable: true })
|
|
5015
5060
|
CompanyID?: string | null;
|
|
5016
5061
|
|
|
5062
|
+
@Field({ nullable: true })
|
|
5063
|
+
EmbeddingVector?: string | null;
|
|
5064
|
+
|
|
5065
|
+
@Field({ nullable: true })
|
|
5066
|
+
EmbeddingModelID?: string | null;
|
|
5067
|
+
|
|
5017
5068
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
5018
5069
|
OldValues___?: KeyValuePairInput[];
|
|
5019
5070
|
}
|
|
@@ -5979,7 +6030,7 @@ export class MJTaskDependencyResolver extends ResolverBase {
|
|
|
5979
6030
|
//****************************************************************************
|
|
5980
6031
|
// ENTITY CLASS for MJ: Collection Artifacts
|
|
5981
6032
|
//****************************************************************************
|
|
5982
|
-
@ObjectType({ description: `
|
|
6033
|
+
@ObjectType({ description: `Links collections to specific artifact versions. Each collection can contain multiple versions of the same artifact.` })
|
|
5983
6034
|
export class MJCollectionArtifact_ {
|
|
5984
6035
|
@Field()
|
|
5985
6036
|
@MaxLength(16)
|
|
@@ -5989,10 +6040,6 @@ export class MJCollectionArtifact_ {
|
|
|
5989
6040
|
@MaxLength(16)
|
|
5990
6041
|
CollectionID: string;
|
|
5991
6042
|
|
|
5992
|
-
@Field()
|
|
5993
|
-
@MaxLength(16)
|
|
5994
|
-
ArtifactID: string;
|
|
5995
|
-
|
|
5996
6043
|
@Field(() => Int, {description: `Sequence number for ordering artifacts within a collection`})
|
|
5997
6044
|
Sequence: number;
|
|
5998
6045
|
|
|
@@ -6004,13 +6051,17 @@ export class MJCollectionArtifact_ {
|
|
|
6004
6051
|
@MaxLength(10)
|
|
6005
6052
|
_mj__UpdatedAt: Date;
|
|
6006
6053
|
|
|
6054
|
+
@Field({description: `Required. Specific version of the artifact saved to this collection. Collections store version-specific artifacts to enable proper version tracking and Links tab filtering.`})
|
|
6055
|
+
@MaxLength(16)
|
|
6056
|
+
ArtifactVersionID: string;
|
|
6057
|
+
|
|
6007
6058
|
@Field()
|
|
6008
6059
|
@MaxLength(510)
|
|
6009
6060
|
Collection: string;
|
|
6010
6061
|
|
|
6011
|
-
@Field()
|
|
6062
|
+
@Field({nullable: true})
|
|
6012
6063
|
@MaxLength(510)
|
|
6013
|
-
|
|
6064
|
+
ArtifactVersion?: string;
|
|
6014
6065
|
|
|
6015
6066
|
}
|
|
6016
6067
|
|
|
@@ -6025,11 +6076,11 @@ export class CreateMJCollectionArtifactInput {
|
|
|
6025
6076
|
@Field({ nullable: true })
|
|
6026
6077
|
CollectionID?: string;
|
|
6027
6078
|
|
|
6028
|
-
@Field({ nullable: true })
|
|
6029
|
-
ArtifactID?: string;
|
|
6030
|
-
|
|
6031
6079
|
@Field(() => Int, { nullable: true })
|
|
6032
6080
|
Sequence?: number;
|
|
6081
|
+
|
|
6082
|
+
@Field({ nullable: true })
|
|
6083
|
+
ArtifactVersionID?: string;
|
|
6033
6084
|
}
|
|
6034
6085
|
|
|
6035
6086
|
|
|
@@ -6044,12 +6095,12 @@ export class UpdateMJCollectionArtifactInput {
|
|
|
6044
6095
|
@Field({ nullable: true })
|
|
6045
6096
|
CollectionID?: string;
|
|
6046
6097
|
|
|
6047
|
-
@Field({ nullable: true })
|
|
6048
|
-
ArtifactID?: string;
|
|
6049
|
-
|
|
6050
6098
|
@Field(() => Int, { nullable: true })
|
|
6051
6099
|
Sequence?: number;
|
|
6052
6100
|
|
|
6101
|
+
@Field({ nullable: true })
|
|
6102
|
+
ArtifactVersionID?: string;
|
|
6103
|
+
|
|
6053
6104
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
6054
6105
|
OldValues___?: KeyValuePairInput[];
|
|
6055
6106
|
}
|
|
@@ -12590,6 +12641,12 @@ export class MJUser_ {
|
|
|
12590
12641
|
@Field(() => [MJArtifactPermission_])
|
|
12591
12642
|
MJ_ArtifactPermissions_UserIDArray: MJArtifactPermission_[]; // Link to MJ_ArtifactPermissions
|
|
12592
12643
|
|
|
12644
|
+
@Field(() => [MJArtifactUse_])
|
|
12645
|
+
MJ_ArtifactUses_UserIDArray: MJArtifactUse_[]; // Link to MJ_ArtifactUses
|
|
12646
|
+
|
|
12647
|
+
@Field(() => [MJConversationDetailRating_])
|
|
12648
|
+
MJ_ConversationDetailRatings_UserIDArray: MJConversationDetailRating_[]; // Link to MJ_ConversationDetailRatings
|
|
12649
|
+
|
|
12593
12650
|
@Field(() => [MJResourcePermission_])
|
|
12594
12651
|
ResourcePermissions_UserIDArray: MJResourcePermission_[]; // Link to ResourcePermissions
|
|
12595
12652
|
|
|
@@ -13279,6 +13336,28 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
13279
13336
|
return result;
|
|
13280
13337
|
}
|
|
13281
13338
|
|
|
13339
|
+
@FieldResolver(() => [MJArtifactUse_])
|
|
13340
|
+
async MJ_ArtifactUses_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13341
|
+
this.CheckUserReadPermissions('MJ: Artifact Uses', userPayload);
|
|
13342
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13343
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
13344
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactUses] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Uses', userPayload, EntityPermissionType.Read, 'AND');
|
|
13345
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
13346
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Uses', rows);
|
|
13347
|
+
return result;
|
|
13348
|
+
}
|
|
13349
|
+
|
|
13350
|
+
@FieldResolver(() => [MJConversationDetailRating_])
|
|
13351
|
+
async MJ_ConversationDetailRatings_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13352
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Ratings', userPayload);
|
|
13353
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13354
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
13355
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailRatings] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Ratings', userPayload, EntityPermissionType.Read, 'AND');
|
|
13356
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
13357
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Ratings', rows);
|
|
13358
|
+
return result;
|
|
13359
|
+
}
|
|
13360
|
+
|
|
13282
13361
|
@FieldResolver(() => [MJResourcePermission_])
|
|
13283
13362
|
async ResourcePermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13284
13363
|
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
@@ -19520,6 +19599,12 @@ export class MJAIModel_ {
|
|
|
19520
19599
|
@Field(() => [MJAIResultCache_])
|
|
19521
19600
|
AIResultCache_AIModelIDArray: MJAIResultCache_[]; // Link to AIResultCache
|
|
19522
19601
|
|
|
19602
|
+
@Field(() => [MJAIAgentNote_])
|
|
19603
|
+
AIAgentNotes_EmbeddingModelIDArray: MJAIAgentNote_[]; // Link to AIAgentNotes
|
|
19604
|
+
|
|
19605
|
+
@Field(() => [MJAIAgentExample_])
|
|
19606
|
+
MJ_AIAgentExamples_EmbeddingModelIDArray: MJAIAgentExample_[]; // Link to MJ_AIAgentExamples
|
|
19607
|
+
|
|
19523
19608
|
@Field(() => [MJAIAgentModel_])
|
|
19524
19609
|
AIAgentModels_ModelIDArray: MJAIAgentModel_[]; // Link to AIAgentModels
|
|
19525
19610
|
|
|
@@ -19762,6 +19847,28 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
19762
19847
|
return result;
|
|
19763
19848
|
}
|
|
19764
19849
|
|
|
19850
|
+
@FieldResolver(() => [MJAIAgentNote_])
|
|
19851
|
+
async AIAgentNotes_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
19852
|
+
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
19853
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19854
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19855
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [EmbeddingModelID]='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
19856
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
19857
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
|
|
19858
|
+
return result;
|
|
19859
|
+
}
|
|
19860
|
+
|
|
19861
|
+
@FieldResolver(() => [MJAIAgentExample_])
|
|
19862
|
+
async MJ_AIAgentExamples_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
19863
|
+
this.CheckUserReadPermissions('MJ: AI Agent Examples', userPayload);
|
|
19864
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19865
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19866
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentExamples] WHERE [EmbeddingModelID]='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Examples', userPayload, EntityPermissionType.Read, 'AND');
|
|
19867
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
19868
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Examples', rows);
|
|
19869
|
+
return result;
|
|
19870
|
+
}
|
|
19871
|
+
|
|
19765
19872
|
@FieldResolver(() => [MJAIAgentModel_])
|
|
19766
19873
|
async AIAgentModels_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
19767
19874
|
this.CheckUserReadPermissions('AI Agent Models', userPayload);
|
|
@@ -24239,6 +24346,9 @@ export class MJConversationDetail_ {
|
|
|
24239
24346
|
@Field(() => [MJConversationDetailArtifact_])
|
|
24240
24347
|
MJ_ConversationDetailArtifacts_ConversationDetailIDArray: MJConversationDetailArtifact_[]; // Link to MJ_ConversationDetailArtifacts
|
|
24241
24348
|
|
|
24349
|
+
@Field(() => [MJConversationDetailRating_])
|
|
24350
|
+
MJ_ConversationDetailRatings_ConversationDetailIDArray: MJConversationDetailRating_[]; // Link to MJ_ConversationDetailRatings
|
|
24351
|
+
|
|
24242
24352
|
@Field(() => [MJAIAgentNote_])
|
|
24243
24353
|
AIAgentNotes_SourceConversationDetailIDArray: MJAIAgentNote_[]; // Link to AIAgentNotes
|
|
24244
24354
|
|
|
@@ -24472,6 +24582,17 @@ export class MJConversationDetailResolver extends ResolverBase {
|
|
|
24472
24582
|
return result;
|
|
24473
24583
|
}
|
|
24474
24584
|
|
|
24585
|
+
@FieldResolver(() => [MJConversationDetailRating_])
|
|
24586
|
+
async MJ_ConversationDetailRatings_ConversationDetailIDArray(@Root() mjconversationdetail_: MJConversationDetail_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24587
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Ratings', userPayload);
|
|
24588
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24589
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
24590
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailRatings] WHERE [ConversationDetailID]='${mjconversationdetail_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Ratings', userPayload, EntityPermissionType.Read, 'AND');
|
|
24591
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
24592
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Detail Ratings', rows);
|
|
24593
|
+
return result;
|
|
24594
|
+
}
|
|
24595
|
+
|
|
24475
24596
|
@FieldResolver(() => [MJAIAgentNote_])
|
|
24476
24597
|
async AIAgentNotes_SourceConversationDetailIDArray(@Root() mjconversationdetail_: MJConversationDetail_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24477
24598
|
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
@@ -41472,6 +41593,181 @@ export class MJAccessControlRuleResolver extends ResolverBase {
|
|
|
41472
41593
|
|
|
41473
41594
|
}
|
|
41474
41595
|
|
|
41596
|
+
//****************************************************************************
|
|
41597
|
+
// ENTITY CLASS for MJ: Artifact Uses
|
|
41598
|
+
//****************************************************************************
|
|
41599
|
+
@ObjectType({ description: `Audit trail of artifact usage for security and analytics. Tracks each time an artifact is viewed, opened, shared, saved, or exported by users.` })
|
|
41600
|
+
export class MJArtifactUse_ {
|
|
41601
|
+
@Field()
|
|
41602
|
+
@MaxLength(16)
|
|
41603
|
+
ID: string;
|
|
41604
|
+
|
|
41605
|
+
@Field({description: `The specific version of the artifact being used.`})
|
|
41606
|
+
@MaxLength(16)
|
|
41607
|
+
ArtifactVersionID: string;
|
|
41608
|
+
|
|
41609
|
+
@Field({description: `The user performing the action.`})
|
|
41610
|
+
@MaxLength(16)
|
|
41611
|
+
UserID: string;
|
|
41612
|
+
|
|
41613
|
+
@Field({description: `Type of usage: Viewed (artifact displayed), Opened (artifact accessed), Shared (artifact shared with others), Saved (artifact bookmarked), or Exported (artifact downloaded).`})
|
|
41614
|
+
@MaxLength(40)
|
|
41615
|
+
UsageType: string;
|
|
41616
|
+
|
|
41617
|
+
@Field({nullable: true, description: `Optional JSON context with additional metadata about the usage event (e.g., source page, referrer, device info).`})
|
|
41618
|
+
UsageContext?: string;
|
|
41619
|
+
|
|
41620
|
+
@Field()
|
|
41621
|
+
@MaxLength(10)
|
|
41622
|
+
_mj__CreatedAt: Date;
|
|
41623
|
+
|
|
41624
|
+
@Field()
|
|
41625
|
+
@MaxLength(10)
|
|
41626
|
+
_mj__UpdatedAt: Date;
|
|
41627
|
+
|
|
41628
|
+
@Field({nullable: true})
|
|
41629
|
+
@MaxLength(510)
|
|
41630
|
+
ArtifactVersion?: string;
|
|
41631
|
+
|
|
41632
|
+
@Field()
|
|
41633
|
+
@MaxLength(200)
|
|
41634
|
+
User: string;
|
|
41635
|
+
|
|
41636
|
+
}
|
|
41637
|
+
|
|
41638
|
+
//****************************************************************************
|
|
41639
|
+
// INPUT TYPE for MJ: Artifact Uses
|
|
41640
|
+
//****************************************************************************
|
|
41641
|
+
@InputType()
|
|
41642
|
+
export class CreateMJArtifactUseInput {
|
|
41643
|
+
@Field({ nullable: true })
|
|
41644
|
+
ID?: string;
|
|
41645
|
+
|
|
41646
|
+
@Field({ nullable: true })
|
|
41647
|
+
ArtifactVersionID?: string;
|
|
41648
|
+
|
|
41649
|
+
@Field({ nullable: true })
|
|
41650
|
+
UserID?: string;
|
|
41651
|
+
|
|
41652
|
+
@Field({ nullable: true })
|
|
41653
|
+
UsageType?: string;
|
|
41654
|
+
|
|
41655
|
+
@Field({ nullable: true })
|
|
41656
|
+
UsageContext: string | null;
|
|
41657
|
+
}
|
|
41658
|
+
|
|
41659
|
+
|
|
41660
|
+
//****************************************************************************
|
|
41661
|
+
// INPUT TYPE for MJ: Artifact Uses
|
|
41662
|
+
//****************************************************************************
|
|
41663
|
+
@InputType()
|
|
41664
|
+
export class UpdateMJArtifactUseInput {
|
|
41665
|
+
@Field()
|
|
41666
|
+
ID: string;
|
|
41667
|
+
|
|
41668
|
+
@Field({ nullable: true })
|
|
41669
|
+
ArtifactVersionID?: string;
|
|
41670
|
+
|
|
41671
|
+
@Field({ nullable: true })
|
|
41672
|
+
UserID?: string;
|
|
41673
|
+
|
|
41674
|
+
@Field({ nullable: true })
|
|
41675
|
+
UsageType?: string;
|
|
41676
|
+
|
|
41677
|
+
@Field({ nullable: true })
|
|
41678
|
+
UsageContext?: string | null;
|
|
41679
|
+
|
|
41680
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
41681
|
+
OldValues___?: KeyValuePairInput[];
|
|
41682
|
+
}
|
|
41683
|
+
|
|
41684
|
+
//****************************************************************************
|
|
41685
|
+
// RESOLVER for MJ: Artifact Uses
|
|
41686
|
+
//****************************************************************************
|
|
41687
|
+
@ObjectType()
|
|
41688
|
+
export class RunMJArtifactUseViewResult {
|
|
41689
|
+
@Field(() => [MJArtifactUse_])
|
|
41690
|
+
Results: MJArtifactUse_[];
|
|
41691
|
+
|
|
41692
|
+
@Field(() => String, {nullable: true})
|
|
41693
|
+
UserViewRunID?: string;
|
|
41694
|
+
|
|
41695
|
+
@Field(() => Int, {nullable: true})
|
|
41696
|
+
RowCount: number;
|
|
41697
|
+
|
|
41698
|
+
@Field(() => Int, {nullable: true})
|
|
41699
|
+
TotalRowCount: number;
|
|
41700
|
+
|
|
41701
|
+
@Field(() => Int, {nullable: true})
|
|
41702
|
+
ExecutionTime: number;
|
|
41703
|
+
|
|
41704
|
+
@Field({nullable: true})
|
|
41705
|
+
ErrorMessage?: string;
|
|
41706
|
+
|
|
41707
|
+
@Field(() => Boolean, {nullable: false})
|
|
41708
|
+
Success: boolean;
|
|
41709
|
+
}
|
|
41710
|
+
|
|
41711
|
+
@Resolver(MJArtifactUse_)
|
|
41712
|
+
export class MJArtifactUseResolver extends ResolverBase {
|
|
41713
|
+
@Query(() => RunMJArtifactUseViewResult)
|
|
41714
|
+
async RunMJArtifactUseViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41715
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41716
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
41717
|
+
}
|
|
41718
|
+
|
|
41719
|
+
@Query(() => RunMJArtifactUseViewResult)
|
|
41720
|
+
async RunMJArtifactUseViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41721
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41722
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
41723
|
+
}
|
|
41724
|
+
|
|
41725
|
+
@Query(() => RunMJArtifactUseViewResult)
|
|
41726
|
+
async RunMJArtifactUseDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41727
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41728
|
+
input.EntityName = 'MJ: Artifact Uses';
|
|
41729
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
41730
|
+
}
|
|
41731
|
+
@Query(() => MJArtifactUse_, { nullable: true })
|
|
41732
|
+
async MJArtifactUse(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJArtifactUse_ | null> {
|
|
41733
|
+
this.CheckUserReadPermissions('MJ: Artifact Uses', userPayload);
|
|
41734
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41735
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
41736
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactUses] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Uses', userPayload, EntityPermissionType.Read, 'AND');
|
|
41737
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
41738
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Artifact Uses', rows && rows.length > 0 ? rows[0] : {})
|
|
41739
|
+
return result;
|
|
41740
|
+
}
|
|
41741
|
+
|
|
41742
|
+
@Mutation(() => MJArtifactUse_)
|
|
41743
|
+
async CreateMJArtifactUse(
|
|
41744
|
+
@Arg('input', () => CreateMJArtifactUseInput) input: CreateMJArtifactUseInput,
|
|
41745
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
41746
|
+
@PubSub() pubSub: PubSubEngine
|
|
41747
|
+
) {
|
|
41748
|
+
const provider = GetReadWriteProvider(providers);
|
|
41749
|
+
return this.CreateRecord('MJ: Artifact Uses', input, provider, userPayload, pubSub)
|
|
41750
|
+
}
|
|
41751
|
+
|
|
41752
|
+
@Mutation(() => MJArtifactUse_)
|
|
41753
|
+
async UpdateMJArtifactUse(
|
|
41754
|
+
@Arg('input', () => UpdateMJArtifactUseInput) input: UpdateMJArtifactUseInput,
|
|
41755
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
41756
|
+
@PubSub() pubSub: PubSubEngine
|
|
41757
|
+
) {
|
|
41758
|
+
const provider = GetReadWriteProvider(providers);
|
|
41759
|
+
return this.UpdateRecord('MJ: Artifact Uses', input, provider, userPayload, pubSub);
|
|
41760
|
+
}
|
|
41761
|
+
|
|
41762
|
+
@Mutation(() => MJArtifactUse_)
|
|
41763
|
+
async DeleteMJArtifactUse(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41764
|
+
const provider = GetReadWriteProvider(providers);
|
|
41765
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
41766
|
+
return this.DeleteRecord('MJ: Artifact Uses', key, options, provider, userPayload, pubSub);
|
|
41767
|
+
}
|
|
41768
|
+
|
|
41769
|
+
}
|
|
41770
|
+
|
|
41475
41771
|
//****************************************************************************
|
|
41476
41772
|
// ENTITY CLASS for MJ: Public Links
|
|
41477
41773
|
//****************************************************************************
|
|
@@ -42453,6 +42749,13 @@ export class MJAIAgentExample_ {
|
|
|
42453
42749
|
@MaxLength(10)
|
|
42454
42750
|
_mj__UpdatedAt: Date;
|
|
42455
42751
|
|
|
42752
|
+
@Field({nullable: true, description: `JSON array of embedding vector for semantic search on ExampleInput field. Auto-generated when ExampleInput changes.`})
|
|
42753
|
+
EmbeddingVector?: string;
|
|
42754
|
+
|
|
42755
|
+
@Field({nullable: true, description: `Reference to the AI model used to generate the embedding vector.`})
|
|
42756
|
+
@MaxLength(16)
|
|
42757
|
+
EmbeddingModelID?: string;
|
|
42758
|
+
|
|
42456
42759
|
@Field({nullable: true})
|
|
42457
42760
|
@MaxLength(510)
|
|
42458
42761
|
Agent?: string;
|
|
@@ -42469,6 +42772,10 @@ export class MJAIAgentExample_ {
|
|
|
42469
42772
|
@MaxLength(510)
|
|
42470
42773
|
SourceConversation?: string;
|
|
42471
42774
|
|
|
42775
|
+
@Field({nullable: true})
|
|
42776
|
+
@MaxLength(100)
|
|
42777
|
+
EmbeddingModel?: string;
|
|
42778
|
+
|
|
42472
42779
|
}
|
|
42473
42780
|
|
|
42474
42781
|
//****************************************************************************
|
|
@@ -42517,6 +42824,12 @@ export class CreateMJAIAgentExampleInput {
|
|
|
42517
42824
|
|
|
42518
42825
|
@Field({ nullable: true })
|
|
42519
42826
|
Status?: string;
|
|
42827
|
+
|
|
42828
|
+
@Field({ nullable: true })
|
|
42829
|
+
EmbeddingVector: string | null;
|
|
42830
|
+
|
|
42831
|
+
@Field({ nullable: true })
|
|
42832
|
+
EmbeddingModelID: string | null;
|
|
42520
42833
|
}
|
|
42521
42834
|
|
|
42522
42835
|
|
|
@@ -42567,6 +42880,12 @@ export class UpdateMJAIAgentExampleInput {
|
|
|
42567
42880
|
@Field({ nullable: true })
|
|
42568
42881
|
Status?: string;
|
|
42569
42882
|
|
|
42883
|
+
@Field({ nullable: true })
|
|
42884
|
+
EmbeddingVector?: string | null;
|
|
42885
|
+
|
|
42886
|
+
@Field({ nullable: true })
|
|
42887
|
+
EmbeddingModelID?: string | null;
|
|
42888
|
+
|
|
42570
42889
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
42571
42890
|
OldValues___?: KeyValuePairInput[];
|
|
42572
42891
|
}
|
|
@@ -42705,12 +43024,12 @@ export class MJConversationArtifact_ {
|
|
|
42705
43024
|
@MaxLength(200)
|
|
42706
43025
|
ArtifactType: string;
|
|
42707
43026
|
|
|
42708
|
-
@Field(() => [MJConversationArtifactPermission_])
|
|
42709
|
-
MJ_ConversationArtifactPermissions_ConversationArtifactIDArray: MJConversationArtifactPermission_[]; // Link to MJ_ConversationArtifactPermissions
|
|
42710
|
-
|
|
42711
43027
|
@Field(() => [MJConversationArtifactVersion_])
|
|
42712
43028
|
MJ_ConversationArtifactVersions_ConversationArtifactIDArray: MJConversationArtifactVersion_[]; // Link to MJ_ConversationArtifactVersions
|
|
42713
43029
|
|
|
43030
|
+
@Field(() => [MJConversationArtifactPermission_])
|
|
43031
|
+
MJ_ConversationArtifactPermissions_ConversationArtifactIDArray: MJConversationArtifactPermission_[]; // Link to MJ_ConversationArtifactPermissions
|
|
43032
|
+
|
|
42714
43033
|
@Field(() => [MJConversationDetail_])
|
|
42715
43034
|
ConversationDetails_ArtifactIDArray: MJConversationDetail_[]; // Link to ConversationDetails
|
|
42716
43035
|
|
|
@@ -42832,25 +43151,25 @@ export class MJConversationArtifactResolver extends ResolverBase {
|
|
|
42832
43151
|
return result;
|
|
42833
43152
|
}
|
|
42834
43153
|
|
|
42835
|
-
@FieldResolver(() => [
|
|
42836
|
-
async
|
|
42837
|
-
this.CheckUserReadPermissions('MJ: Conversation Artifact
|
|
43154
|
+
@FieldResolver(() => [MJConversationArtifactVersion_])
|
|
43155
|
+
async MJ_ConversationArtifactVersions_ConversationArtifactIDArray(@Root() mjconversationartifact_: MJConversationArtifact_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43156
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifact Versions', userPayload);
|
|
42838
43157
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42839
43158
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
42840
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
43159
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactVersions] WHERE [ConversationArtifactID]='${mjconversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
42841
43160
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
42842
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact
|
|
43161
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Versions', rows);
|
|
42843
43162
|
return result;
|
|
42844
43163
|
}
|
|
42845
43164
|
|
|
42846
|
-
@FieldResolver(() => [
|
|
42847
|
-
async
|
|
42848
|
-
this.CheckUserReadPermissions('MJ: Conversation Artifact
|
|
43165
|
+
@FieldResolver(() => [MJConversationArtifactPermission_])
|
|
43166
|
+
async MJ_ConversationArtifactPermissions_ConversationArtifactIDArray(@Root() mjconversationartifact_: MJConversationArtifact_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43167
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifact Permissions', userPayload);
|
|
42849
43168
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
42850
43169
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
42851
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
43170
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactPermissions] WHERE [ConversationArtifactID]='${mjconversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
42852
43171
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
42853
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact
|
|
43172
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Permissions', rows);
|
|
42854
43173
|
return result;
|
|
42855
43174
|
}
|
|
42856
43175
|
|
|
@@ -44191,6 +44510,176 @@ export class MJQueryParameterResolver extends ResolverBase {
|
|
|
44191
44510
|
|
|
44192
44511
|
}
|
|
44193
44512
|
|
|
44513
|
+
//****************************************************************************
|
|
44514
|
+
// ENTITY CLASS for MJ: Conversation Detail Ratings
|
|
44515
|
+
//****************************************************************************
|
|
44516
|
+
@ObjectType({ description: `Stores per-user ratings for conversation messages, supporting multi-user conversations where each user can independently rate messages.` })
|
|
44517
|
+
export class MJConversationDetailRating_ {
|
|
44518
|
+
@Field()
|
|
44519
|
+
@MaxLength(16)
|
|
44520
|
+
ID: string;
|
|
44521
|
+
|
|
44522
|
+
@Field({description: `The conversation message being rated.`})
|
|
44523
|
+
@MaxLength(16)
|
|
44524
|
+
ConversationDetailID: string;
|
|
44525
|
+
|
|
44526
|
+
@Field({description: `The user providing the rating.`})
|
|
44527
|
+
@MaxLength(16)
|
|
44528
|
+
UserID: string;
|
|
44529
|
+
|
|
44530
|
+
@Field(() => Int, {description: `Rating on a 1-10 scale where 1 is thumbs down and 10 is thumbs up.`})
|
|
44531
|
+
Rating: number;
|
|
44532
|
+
|
|
44533
|
+
@Field({nullable: true, description: `Optional textual feedback from the user about this message.`})
|
|
44534
|
+
Comments?: string;
|
|
44535
|
+
|
|
44536
|
+
@Field()
|
|
44537
|
+
@MaxLength(10)
|
|
44538
|
+
_mj__CreatedAt: Date;
|
|
44539
|
+
|
|
44540
|
+
@Field()
|
|
44541
|
+
@MaxLength(10)
|
|
44542
|
+
_mj__UpdatedAt: Date;
|
|
44543
|
+
|
|
44544
|
+
@Field()
|
|
44545
|
+
@MaxLength(200)
|
|
44546
|
+
User: string;
|
|
44547
|
+
|
|
44548
|
+
}
|
|
44549
|
+
|
|
44550
|
+
//****************************************************************************
|
|
44551
|
+
// INPUT TYPE for MJ: Conversation Detail Ratings
|
|
44552
|
+
//****************************************************************************
|
|
44553
|
+
@InputType()
|
|
44554
|
+
export class CreateMJConversationDetailRatingInput {
|
|
44555
|
+
@Field({ nullable: true })
|
|
44556
|
+
ID?: string;
|
|
44557
|
+
|
|
44558
|
+
@Field({ nullable: true })
|
|
44559
|
+
ConversationDetailID?: string;
|
|
44560
|
+
|
|
44561
|
+
@Field({ nullable: true })
|
|
44562
|
+
UserID?: string;
|
|
44563
|
+
|
|
44564
|
+
@Field(() => Int, { nullable: true })
|
|
44565
|
+
Rating?: number;
|
|
44566
|
+
|
|
44567
|
+
@Field({ nullable: true })
|
|
44568
|
+
Comments: string | null;
|
|
44569
|
+
}
|
|
44570
|
+
|
|
44571
|
+
|
|
44572
|
+
//****************************************************************************
|
|
44573
|
+
// INPUT TYPE for MJ: Conversation Detail Ratings
|
|
44574
|
+
//****************************************************************************
|
|
44575
|
+
@InputType()
|
|
44576
|
+
export class UpdateMJConversationDetailRatingInput {
|
|
44577
|
+
@Field()
|
|
44578
|
+
ID: string;
|
|
44579
|
+
|
|
44580
|
+
@Field({ nullable: true })
|
|
44581
|
+
ConversationDetailID?: string;
|
|
44582
|
+
|
|
44583
|
+
@Field({ nullable: true })
|
|
44584
|
+
UserID?: string;
|
|
44585
|
+
|
|
44586
|
+
@Field(() => Int, { nullable: true })
|
|
44587
|
+
Rating?: number;
|
|
44588
|
+
|
|
44589
|
+
@Field({ nullable: true })
|
|
44590
|
+
Comments?: string | null;
|
|
44591
|
+
|
|
44592
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
44593
|
+
OldValues___?: KeyValuePairInput[];
|
|
44594
|
+
}
|
|
44595
|
+
|
|
44596
|
+
//****************************************************************************
|
|
44597
|
+
// RESOLVER for MJ: Conversation Detail Ratings
|
|
44598
|
+
//****************************************************************************
|
|
44599
|
+
@ObjectType()
|
|
44600
|
+
export class RunMJConversationDetailRatingViewResult {
|
|
44601
|
+
@Field(() => [MJConversationDetailRating_])
|
|
44602
|
+
Results: MJConversationDetailRating_[];
|
|
44603
|
+
|
|
44604
|
+
@Field(() => String, {nullable: true})
|
|
44605
|
+
UserViewRunID?: string;
|
|
44606
|
+
|
|
44607
|
+
@Field(() => Int, {nullable: true})
|
|
44608
|
+
RowCount: number;
|
|
44609
|
+
|
|
44610
|
+
@Field(() => Int, {nullable: true})
|
|
44611
|
+
TotalRowCount: number;
|
|
44612
|
+
|
|
44613
|
+
@Field(() => Int, {nullable: true})
|
|
44614
|
+
ExecutionTime: number;
|
|
44615
|
+
|
|
44616
|
+
@Field({nullable: true})
|
|
44617
|
+
ErrorMessage?: string;
|
|
44618
|
+
|
|
44619
|
+
@Field(() => Boolean, {nullable: false})
|
|
44620
|
+
Success: boolean;
|
|
44621
|
+
}
|
|
44622
|
+
|
|
44623
|
+
@Resolver(MJConversationDetailRating_)
|
|
44624
|
+
export class MJConversationDetailRatingResolver extends ResolverBase {
|
|
44625
|
+
@Query(() => RunMJConversationDetailRatingViewResult)
|
|
44626
|
+
async RunMJConversationDetailRatingViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44627
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44628
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
44629
|
+
}
|
|
44630
|
+
|
|
44631
|
+
@Query(() => RunMJConversationDetailRatingViewResult)
|
|
44632
|
+
async RunMJConversationDetailRatingViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44633
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44634
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
44635
|
+
}
|
|
44636
|
+
|
|
44637
|
+
@Query(() => RunMJConversationDetailRatingViewResult)
|
|
44638
|
+
async RunMJConversationDetailRatingDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44639
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44640
|
+
input.EntityName = 'MJ: Conversation Detail Ratings';
|
|
44641
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
44642
|
+
}
|
|
44643
|
+
@Query(() => MJConversationDetailRating_, { nullable: true })
|
|
44644
|
+
async MJConversationDetailRating(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJConversationDetailRating_ | null> {
|
|
44645
|
+
this.CheckUserReadPermissions('MJ: Conversation Detail Ratings', userPayload);
|
|
44646
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44647
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
44648
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationDetailRatings] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Detail Ratings', userPayload, EntityPermissionType.Read, 'AND');
|
|
44649
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
44650
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Conversation Detail Ratings', rows && rows.length > 0 ? rows[0] : {})
|
|
44651
|
+
return result;
|
|
44652
|
+
}
|
|
44653
|
+
|
|
44654
|
+
@Mutation(() => MJConversationDetailRating_)
|
|
44655
|
+
async CreateMJConversationDetailRating(
|
|
44656
|
+
@Arg('input', () => CreateMJConversationDetailRatingInput) input: CreateMJConversationDetailRatingInput,
|
|
44657
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
44658
|
+
@PubSub() pubSub: PubSubEngine
|
|
44659
|
+
) {
|
|
44660
|
+
const provider = GetReadWriteProvider(providers);
|
|
44661
|
+
return this.CreateRecord('MJ: Conversation Detail Ratings', input, provider, userPayload, pubSub)
|
|
44662
|
+
}
|
|
44663
|
+
|
|
44664
|
+
@Mutation(() => MJConversationDetailRating_)
|
|
44665
|
+
async UpdateMJConversationDetailRating(
|
|
44666
|
+
@Arg('input', () => UpdateMJConversationDetailRatingInput) input: UpdateMJConversationDetailRatingInput,
|
|
44667
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
44668
|
+
@PubSub() pubSub: PubSubEngine
|
|
44669
|
+
) {
|
|
44670
|
+
const provider = GetReadWriteProvider(providers);
|
|
44671
|
+
return this.UpdateRecord('MJ: Conversation Detail Ratings', input, provider, userPayload, pubSub);
|
|
44672
|
+
}
|
|
44673
|
+
|
|
44674
|
+
@Mutation(() => MJConversationDetailRating_)
|
|
44675
|
+
async DeleteMJConversationDetailRating(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44676
|
+
const provider = GetReadWriteProvider(providers);
|
|
44677
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
44678
|
+
return this.DeleteRecord('MJ: Conversation Detail Ratings', key, options, provider, userPayload, pubSub);
|
|
44679
|
+
}
|
|
44680
|
+
|
|
44681
|
+
}
|
|
44682
|
+
|
|
44194
44683
|
//****************************************************************************
|
|
44195
44684
|
// ENTITY CLASS for MJ: AI Agent Permissions
|
|
44196
44685
|
//****************************************************************************
|
|
@@ -44444,6 +44933,13 @@ export class MJAIAgentRelationship_ {
|
|
|
44444
44933
|
@Field({nullable: true, description: `JSON array of parent payload paths to send as LLM context to related sub-agent. Sub-agent receives this data in a formatted context message before its task message. Format: ["path1", "path2.nested", "path3.*", "*"]. Use "*" to send entire parent payload. Example: ["userPreferences", "priorFindings.summary", "sources[*]"]. If null, no parent context is sent (default behavior).`})
|
|
44445
44934
|
SubAgentContextPaths?: string;
|
|
44446
44935
|
|
|
44936
|
+
@Field({description: `Specifies how conversation messages are passed from parent agent to related sub-agent. Valid values: 'None' (fresh start - only context and task message, default), 'All' (all parent conversation history), 'Latest' (most recent MaxMessages messages), 'Bookend' (first 2 messages + most recent MaxMessages-2 messages with indicator between). Stored on relationship because related sub-agents can have multiple parents with different message passing needs.`})
|
|
44937
|
+
@MaxLength(100)
|
|
44938
|
+
MessageMode: string;
|
|
44939
|
+
|
|
44940
|
+
@Field(() => Int, {nullable: true, description: `Maximum number of conversation messages to include when MessageMode is 'Latest' or 'Bookend'. NULL means no limit (ignored for 'None' and 'All' modes). Must be greater than 0 if specified. For 'Latest': keeps most recent N messages. For 'Bookend': keeps first 2 + most recent (N-2) messages.`})
|
|
44941
|
+
MaxMessages?: number;
|
|
44942
|
+
|
|
44447
44943
|
@Field({nullable: true})
|
|
44448
44944
|
@MaxLength(510)
|
|
44449
44945
|
Agent?: string;
|
|
@@ -44479,6 +44975,12 @@ export class CreateMJAIAgentRelationshipInput {
|
|
|
44479
44975
|
|
|
44480
44976
|
@Field({ nullable: true })
|
|
44481
44977
|
SubAgentContextPaths: string | null;
|
|
44978
|
+
|
|
44979
|
+
@Field({ nullable: true })
|
|
44980
|
+
MessageMode?: string;
|
|
44981
|
+
|
|
44982
|
+
@Field(() => Int, { nullable: true })
|
|
44983
|
+
MaxMessages: number | null;
|
|
44482
44984
|
}
|
|
44483
44985
|
|
|
44484
44986
|
|
|
@@ -44508,6 +45010,12 @@ export class UpdateMJAIAgentRelationshipInput {
|
|
|
44508
45010
|
@Field({ nullable: true })
|
|
44509
45011
|
SubAgentContextPaths?: string | null;
|
|
44510
45012
|
|
|
45013
|
+
@Field({ nullable: true })
|
|
45014
|
+
MessageMode?: string;
|
|
45015
|
+
|
|
45016
|
+
@Field(() => Int, { nullable: true })
|
|
45017
|
+
MaxMessages?: number | null;
|
|
45018
|
+
|
|
44511
45019
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
44512
45020
|
OldValues___?: KeyValuePairInput[];
|
|
44513
45021
|
}
|
|
@@ -49866,9 +50374,15 @@ export class MJArtifactVersion_ {
|
|
|
49866
50374
|
@Field(() => [MJArtifactVersionAttribute_])
|
|
49867
50375
|
MJ_ArtifactVersionAttributes_ArtifactVersionIDArray: MJArtifactVersionAttribute_[]; // Link to MJ_ArtifactVersionAttributes
|
|
49868
50376
|
|
|
50377
|
+
@Field(() => [MJCollectionArtifact_])
|
|
50378
|
+
MJ_CollectionArtifacts_ArtifactVersionIDArray: MJCollectionArtifact_[]; // Link to MJ_CollectionArtifacts
|
|
50379
|
+
|
|
49869
50380
|
@Field(() => [MJConversationDetailArtifact_])
|
|
49870
50381
|
MJ_ConversationDetailArtifacts_ArtifactVersionIDArray: MJConversationDetailArtifact_[]; // Link to MJ_ConversationDetailArtifacts
|
|
49871
50382
|
|
|
50383
|
+
@Field(() => [MJArtifactUse_])
|
|
50384
|
+
MJ_ArtifactUses_ArtifactVersionIDArray: MJArtifactUse_[]; // Link to MJ_ArtifactUses
|
|
50385
|
+
|
|
49872
50386
|
}
|
|
49873
50387
|
|
|
49874
50388
|
//****************************************************************************
|
|
@@ -50016,6 +50530,17 @@ export class MJArtifactVersionResolver extends ResolverBase {
|
|
|
50016
50530
|
return result;
|
|
50017
50531
|
}
|
|
50018
50532
|
|
|
50533
|
+
@FieldResolver(() => [MJCollectionArtifact_])
|
|
50534
|
+
async MJ_CollectionArtifacts_ArtifactVersionIDArray(@Root() mjartifactversion_: MJArtifactVersion_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
50535
|
+
this.CheckUserReadPermissions('MJ: Collection Artifacts', userPayload);
|
|
50536
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
50537
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
50538
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionArtifacts] WHERE [ArtifactVersionID]='${mjartifactversion_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Artifacts', userPayload, EntityPermissionType.Read, 'AND');
|
|
50539
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
50540
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Artifacts', rows);
|
|
50541
|
+
return result;
|
|
50542
|
+
}
|
|
50543
|
+
|
|
50019
50544
|
@FieldResolver(() => [MJConversationDetailArtifact_])
|
|
50020
50545
|
async MJ_ConversationDetailArtifacts_ArtifactVersionIDArray(@Root() mjartifactversion_: MJArtifactVersion_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
50021
50546
|
this.CheckUserReadPermissions('MJ: Conversation Detail Artifacts', userPayload);
|
|
@@ -50027,6 +50552,17 @@ export class MJArtifactVersionResolver extends ResolverBase {
|
|
|
50027
50552
|
return result;
|
|
50028
50553
|
}
|
|
50029
50554
|
|
|
50555
|
+
@FieldResolver(() => [MJArtifactUse_])
|
|
50556
|
+
async MJ_ArtifactUses_ArtifactVersionIDArray(@Root() mjartifactversion_: MJArtifactVersion_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
50557
|
+
this.CheckUserReadPermissions('MJ: Artifact Uses', userPayload);
|
|
50558
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
50559
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
50560
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactUses] WHERE [ArtifactVersionID]='${mjartifactversion_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Uses', userPayload, EntityPermissionType.Read, 'AND');
|
|
50561
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
50562
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Uses', rows);
|
|
50563
|
+
return result;
|
|
50564
|
+
}
|
|
50565
|
+
|
|
50030
50566
|
@Mutation(() => MJArtifactVersion_)
|
|
50031
50567
|
async CreateMJArtifactVersion(
|
|
50032
50568
|
@Arg('input', () => CreateMJArtifactVersionInput) input: CreateMJArtifactVersionInput,
|