@memberjunction/server 5.21.0 → 5.23.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/README.md +44 -0
- package/dist/agents/skip-sdk.d.ts.map +1 -1
- package/dist/agents/skip-sdk.js +32 -2
- package/dist/agents/skip-sdk.js.map +1 -1
- package/dist/generated/generated.d.ts +172 -4
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +931 -2
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/resolvers/AutotagPipelineResolver.d.ts +21 -0
- package/dist/resolvers/AutotagPipelineResolver.d.ts.map +1 -0
- package/dist/resolvers/AutotagPipelineResolver.js +147 -0
- package/dist/resolvers/AutotagPipelineResolver.js.map +1 -0
- package/dist/resolvers/ClientToolRequestResolver.d.ts +43 -0
- package/dist/resolvers/ClientToolRequestResolver.d.ts.map +1 -0
- package/dist/resolvers/ClientToolRequestResolver.js +161 -0
- package/dist/resolvers/ClientToolRequestResolver.js.map +1 -0
- package/dist/resolvers/FetchEntityVectorsResolver.d.ts +29 -0
- package/dist/resolvers/FetchEntityVectorsResolver.d.ts.map +1 -0
- package/dist/resolvers/FetchEntityVectorsResolver.js +218 -0
- package/dist/resolvers/FetchEntityVectorsResolver.js.map +1 -0
- package/dist/resolvers/PipelineProgressResolver.d.ts +33 -0
- package/dist/resolvers/PipelineProgressResolver.d.ts.map +1 -0
- package/dist/resolvers/PipelineProgressResolver.js +138 -0
- package/dist/resolvers/PipelineProgressResolver.js.map +1 -0
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +7 -5
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.d.ts +85 -0
- package/dist/resolvers/SearchKnowledgeResolver.d.ts.map +1 -0
- package/dist/resolvers/SearchKnowledgeResolver.js +587 -0
- package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -0
- package/dist/resolvers/VectorizeEntityResolver.d.ts +21 -0
- package/dist/resolvers/VectorizeEntityResolver.d.ts.map +1 -0
- package/dist/resolvers/VectorizeEntityResolver.js +134 -0
- package/dist/resolvers/VectorizeEntityResolver.js.map +1 -0
- package/package.json +63 -62
- package/src/agents/skip-sdk.ts +31 -2
- package/src/generated/generated.ts +650 -7
- package/src/index.ts +13 -0
- package/src/resolvers/AutotagPipelineResolver.ts +146 -0
- package/src/resolvers/ClientToolRequestResolver.ts +128 -0
- package/src/resolvers/FetchEntityVectorsResolver.ts +234 -0
- package/src/resolvers/PipelineProgressResolver.ts +107 -0
- package/src/resolvers/RunAIAgentResolver.ts +7 -5
- package/src/resolvers/SearchKnowledgeResolver.ts +614 -0
- package/src/resolvers/VectorizeEntityResolver.ts +123 -0
|
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSkillEntity, MJSQLDialectEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
21
|
+
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentClientToolEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSkillEntity, MJSQLDialectEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -3217,6 +3217,177 @@ export class MJAIAgentCategoryResolver extends ResolverBase {
|
|
|
3217
3217
|
|
|
3218
3218
|
}
|
|
3219
3219
|
|
|
3220
|
+
//****************************************************************************
|
|
3221
|
+
// ENTITY CLASS for MJ: AI Agent Client Tools
|
|
3222
|
+
//****************************************************************************
|
|
3223
|
+
@ObjectType()
|
|
3224
|
+
export class MJAIAgentClientTool_ {
|
|
3225
|
+
@Field()
|
|
3226
|
+
@MaxLength(36)
|
|
3227
|
+
ID: string;
|
|
3228
|
+
|
|
3229
|
+
@Field()
|
|
3230
|
+
@MaxLength(36)
|
|
3231
|
+
AgentID: string;
|
|
3232
|
+
|
|
3233
|
+
@Field()
|
|
3234
|
+
@MaxLength(36)
|
|
3235
|
+
ClientToolDefinitionID: string;
|
|
3236
|
+
|
|
3237
|
+
@Field(() => Boolean, {description: `When true, the agent expects this tool to always be available on the client. If the client has not registered a handler, agent execution may warn or fail depending on configuration.`})
|
|
3238
|
+
IsRequired: boolean;
|
|
3239
|
+
|
|
3240
|
+
@Field(() => Int, {description: `Sort order for tool listing in prompts. Lower numbers appear first. Tools with the same priority are listed alphabetically.`})
|
|
3241
|
+
Priority: number;
|
|
3242
|
+
|
|
3243
|
+
@Field()
|
|
3244
|
+
_mj__CreatedAt: Date;
|
|
3245
|
+
|
|
3246
|
+
@Field()
|
|
3247
|
+
_mj__UpdatedAt: Date;
|
|
3248
|
+
|
|
3249
|
+
@Field({nullable: true})
|
|
3250
|
+
@MaxLength(255)
|
|
3251
|
+
Agent?: string;
|
|
3252
|
+
|
|
3253
|
+
@Field()
|
|
3254
|
+
@MaxLength(200)
|
|
3255
|
+
ClientToolDefinition: string;
|
|
3256
|
+
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
//****************************************************************************
|
|
3260
|
+
// INPUT TYPE for MJ: AI Agent Client Tools
|
|
3261
|
+
//****************************************************************************
|
|
3262
|
+
@InputType()
|
|
3263
|
+
export class CreateMJAIAgentClientToolInput {
|
|
3264
|
+
@Field({ nullable: true })
|
|
3265
|
+
ID?: string;
|
|
3266
|
+
|
|
3267
|
+
@Field({ nullable: true })
|
|
3268
|
+
AgentID?: string;
|
|
3269
|
+
|
|
3270
|
+
@Field({ nullable: true })
|
|
3271
|
+
ClientToolDefinitionID?: string;
|
|
3272
|
+
|
|
3273
|
+
@Field(() => Boolean, { nullable: true })
|
|
3274
|
+
IsRequired?: boolean;
|
|
3275
|
+
|
|
3276
|
+
@Field(() => Int, { nullable: true })
|
|
3277
|
+
Priority?: number;
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
|
|
3281
|
+
//****************************************************************************
|
|
3282
|
+
// INPUT TYPE for MJ: AI Agent Client Tools
|
|
3283
|
+
//****************************************************************************
|
|
3284
|
+
@InputType()
|
|
3285
|
+
export class UpdateMJAIAgentClientToolInput {
|
|
3286
|
+
@Field()
|
|
3287
|
+
ID: string;
|
|
3288
|
+
|
|
3289
|
+
@Field({ nullable: true })
|
|
3290
|
+
AgentID?: string;
|
|
3291
|
+
|
|
3292
|
+
@Field({ nullable: true })
|
|
3293
|
+
ClientToolDefinitionID?: string;
|
|
3294
|
+
|
|
3295
|
+
@Field(() => Boolean, { nullable: true })
|
|
3296
|
+
IsRequired?: boolean;
|
|
3297
|
+
|
|
3298
|
+
@Field(() => Int, { nullable: true })
|
|
3299
|
+
Priority?: number;
|
|
3300
|
+
|
|
3301
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
3302
|
+
OldValues___?: KeyValuePairInput[];
|
|
3303
|
+
}
|
|
3304
|
+
|
|
3305
|
+
//****************************************************************************
|
|
3306
|
+
// RESOLVER for MJ: AI Agent Client Tools
|
|
3307
|
+
//****************************************************************************
|
|
3308
|
+
@ObjectType()
|
|
3309
|
+
export class RunMJAIAgentClientToolViewResult {
|
|
3310
|
+
@Field(() => [MJAIAgentClientTool_])
|
|
3311
|
+
Results: MJAIAgentClientTool_[];
|
|
3312
|
+
|
|
3313
|
+
@Field(() => String, {nullable: true})
|
|
3314
|
+
UserViewRunID?: string;
|
|
3315
|
+
|
|
3316
|
+
@Field(() => Int, {nullable: true})
|
|
3317
|
+
RowCount: number;
|
|
3318
|
+
|
|
3319
|
+
@Field(() => Int, {nullable: true})
|
|
3320
|
+
TotalRowCount: number;
|
|
3321
|
+
|
|
3322
|
+
@Field(() => Int, {nullable: true})
|
|
3323
|
+
ExecutionTime: number;
|
|
3324
|
+
|
|
3325
|
+
@Field({nullable: true})
|
|
3326
|
+
ErrorMessage?: string;
|
|
3327
|
+
|
|
3328
|
+
@Field(() => Boolean, {nullable: false})
|
|
3329
|
+
Success: boolean;
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
@Resolver(MJAIAgentClientTool_)
|
|
3333
|
+
export class MJAIAgentClientToolResolver extends ResolverBase {
|
|
3334
|
+
@Query(() => RunMJAIAgentClientToolViewResult)
|
|
3335
|
+
async RunMJAIAgentClientToolViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3336
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3337
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
@Query(() => RunMJAIAgentClientToolViewResult)
|
|
3341
|
+
async RunMJAIAgentClientToolViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3342
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3343
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
@Query(() => RunMJAIAgentClientToolViewResult)
|
|
3347
|
+
async RunMJAIAgentClientToolDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3348
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3349
|
+
input.EntityName = 'MJ: AI Agent Client Tools';
|
|
3350
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
3351
|
+
}
|
|
3352
|
+
@Query(() => MJAIAgentClientTool_, { nullable: true })
|
|
3353
|
+
async MJAIAgentClientTool(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentClientTool_ | null> {
|
|
3354
|
+
this.CheckUserReadPermissions('MJ: AI Agent Client Tools', userPayload);
|
|
3355
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3356
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentClientTools')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Client Tools', userPayload, EntityPermissionType.Read, 'AND');
|
|
3357
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
3358
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Client Tools', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
3359
|
+
return result;
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
@Mutation(() => MJAIAgentClientTool_)
|
|
3363
|
+
async CreateMJAIAgentClientTool(
|
|
3364
|
+
@Arg('input', () => CreateMJAIAgentClientToolInput) input: CreateMJAIAgentClientToolInput,
|
|
3365
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
3366
|
+
@PubSub() pubSub: PubSubEngine
|
|
3367
|
+
) {
|
|
3368
|
+
const provider = GetReadWriteProvider(providers);
|
|
3369
|
+
return this.CreateRecord('MJ: AI Agent Client Tools', input, provider, userPayload, pubSub)
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
@Mutation(() => MJAIAgentClientTool_)
|
|
3373
|
+
async UpdateMJAIAgentClientTool(
|
|
3374
|
+
@Arg('input', () => UpdateMJAIAgentClientToolInput) input: UpdateMJAIAgentClientToolInput,
|
|
3375
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
3376
|
+
@PubSub() pubSub: PubSubEngine
|
|
3377
|
+
) {
|
|
3378
|
+
const provider = GetReadWriteProvider(providers);
|
|
3379
|
+
return this.UpdateRecord('MJ: AI Agent Client Tools', input, provider, userPayload, pubSub);
|
|
3380
|
+
}
|
|
3381
|
+
|
|
3382
|
+
@Mutation(() => MJAIAgentClientTool_)
|
|
3383
|
+
async DeleteMJAIAgentClientTool(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3384
|
+
const provider = GetReadWriteProvider(providers);
|
|
3385
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
3386
|
+
return this.DeleteRecord('MJ: AI Agent Client Tools', key, options, provider, userPayload, pubSub);
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3220
3391
|
//****************************************************************************
|
|
3221
3392
|
// ENTITY CLASS for MJ: AI Agent Configurations
|
|
3222
3393
|
//****************************************************************************
|
|
@@ -8668,6 +8839,9 @@ if this limit is exceeded.`})
|
|
|
8668
8839
|
@MaxLength(36)
|
|
8669
8840
|
CategoryID?: string;
|
|
8670
8841
|
|
|
8842
|
+
@Field(() => Boolean, {description: `When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance.`})
|
|
8843
|
+
AllowEphemeralClientTools: boolean;
|
|
8844
|
+
|
|
8671
8845
|
@Field({nullable: true})
|
|
8672
8846
|
@MaxLength(255)
|
|
8673
8847
|
Parent?: string;
|
|
@@ -8730,6 +8904,9 @@ if this limit is exceeded.`})
|
|
|
8730
8904
|
@Field(() => [MJAIAgentModality_])
|
|
8731
8905
|
MJAIAgentModalities_AgentIDArray: MJAIAgentModality_[]; // Link to MJAIAgentModalities
|
|
8732
8906
|
|
|
8907
|
+
@Field(() => [MJAIAgentClientTool_])
|
|
8908
|
+
MJAIAgentClientTools_AgentIDArray: MJAIAgentClientTool_[]; // Link to MJAIAgentClientTools
|
|
8909
|
+
|
|
8733
8910
|
@Field(() => [MJAIAgentNote_])
|
|
8734
8911
|
MJAIAgentNotes_AgentIDArray: MJAIAgentNote_[]; // Link to MJAIAgentNotes
|
|
8735
8912
|
|
|
@@ -8952,6 +9129,9 @@ export class CreateMJAIAgentInput {
|
|
|
8952
9129
|
|
|
8953
9130
|
@Field({ nullable: true })
|
|
8954
9131
|
CategoryID: string | null;
|
|
9132
|
+
|
|
9133
|
+
@Field(() => Boolean, { nullable: true })
|
|
9134
|
+
AllowEphemeralClientTools?: boolean;
|
|
8955
9135
|
}
|
|
8956
9136
|
|
|
8957
9137
|
|
|
@@ -9140,6 +9320,9 @@ export class UpdateMJAIAgentInput {
|
|
|
9140
9320
|
@Field({ nullable: true })
|
|
9141
9321
|
CategoryID?: string | null;
|
|
9142
9322
|
|
|
9323
|
+
@Field(() => Boolean, { nullable: true })
|
|
9324
|
+
AllowEphemeralClientTools?: boolean;
|
|
9325
|
+
|
|
9143
9326
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
9144
9327
|
OldValues___?: KeyValuePairInput[];
|
|
9145
9328
|
}
|
|
@@ -9301,6 +9484,16 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
9301
9484
|
return result;
|
|
9302
9485
|
}
|
|
9303
9486
|
|
|
9487
|
+
@FieldResolver(() => [MJAIAgentClientTool_])
|
|
9488
|
+
async MJAIAgentClientTools_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9489
|
+
this.CheckUserReadPermissions('MJ: AI Agent Client Tools', userPayload);
|
|
9490
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9491
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentClientTools')} WHERE ${provider.QuoteIdentifier('AgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Client Tools', userPayload, EntityPermissionType.Read, 'AND');
|
|
9492
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
9493
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Client Tools', rows, this.GetUserFromPayload(userPayload));
|
|
9494
|
+
return result;
|
|
9495
|
+
}
|
|
9496
|
+
|
|
9304
9497
|
@FieldResolver(() => [MJAIAgentNote_])
|
|
9305
9498
|
async MJAIAgentNotes_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9306
9499
|
this.CheckUserReadPermissions('MJ: AI Agent Notes', userPayload);
|
|
@@ -9677,6 +9870,210 @@ export class MJAIArchitectureResolver extends ResolverBase {
|
|
|
9677
9870
|
|
|
9678
9871
|
}
|
|
9679
9872
|
|
|
9873
|
+
//****************************************************************************
|
|
9874
|
+
// ENTITY CLASS for MJ: AI Client Tool Definitions
|
|
9875
|
+
//****************************************************************************
|
|
9876
|
+
@ObjectType()
|
|
9877
|
+
export class MJAIClientToolDefinition_ {
|
|
9878
|
+
@Field()
|
|
9879
|
+
@MaxLength(36)
|
|
9880
|
+
ID: string;
|
|
9881
|
+
|
|
9882
|
+
@Field({description: `Unique identifier for the client tool (e.g., NavigateToApp, NavigateToRecord). Used to match tool invocations from the LLM to registered handlers on the client.`})
|
|
9883
|
+
@MaxLength(200)
|
|
9884
|
+
Name: string;
|
|
9885
|
+
|
|
9886
|
+
@Field({description: `Human-readable description of what the tool does. This text is injected into the LLM system prompt so it knows when and how to use the tool.`})
|
|
9887
|
+
Description: string;
|
|
9888
|
+
|
|
9889
|
+
@Field({nullable: true, description: `Tool category for grouping and filtering (e.g., navigation, form, display, data).`})
|
|
9890
|
+
@MaxLength(50)
|
|
9891
|
+
Category?: string;
|
|
9892
|
+
|
|
9893
|
+
@Field({nullable: true, description: `JSON Schema defining the input parameters the tool accepts. Included in the LLM prompt so it generates valid parameter objects.`})
|
|
9894
|
+
InputSchemaJSON?: string;
|
|
9895
|
+
|
|
9896
|
+
@Field({nullable: true, description: `JSON Schema describing the return value from the tool. Optional — used for documentation and LLM context.`})
|
|
9897
|
+
OutputSchemaJSON?: string;
|
|
9898
|
+
|
|
9899
|
+
@Field(() => Int, {nullable: true, description: `Default timeout in milliseconds for this tool. Can be overridden per-invocation by the LLM or per-run by execution params. Default is 30000ms (30 seconds).`})
|
|
9900
|
+
DefaultTimeoutMs?: number;
|
|
9901
|
+
|
|
9902
|
+
@Field({nullable: true, description: `When set, the client only sends this tool to the server when the user is in the specified context (e.g., entity-form, dashboard, search). Null means the tool is always available.`})
|
|
9903
|
+
@MaxLength(100)
|
|
9904
|
+
RequiresContextType?: string;
|
|
9905
|
+
|
|
9906
|
+
@Field()
|
|
9907
|
+
_mj__CreatedAt: Date;
|
|
9908
|
+
|
|
9909
|
+
@Field()
|
|
9910
|
+
_mj__UpdatedAt: Date;
|
|
9911
|
+
|
|
9912
|
+
@Field(() => [MJAIAgentClientTool_])
|
|
9913
|
+
MJAIAgentClientTools_ClientToolDefinitionIDArray: MJAIAgentClientTool_[]; // Link to MJAIAgentClientTools
|
|
9914
|
+
|
|
9915
|
+
}
|
|
9916
|
+
|
|
9917
|
+
//****************************************************************************
|
|
9918
|
+
// INPUT TYPE for MJ: AI Client Tool Definitions
|
|
9919
|
+
//****************************************************************************
|
|
9920
|
+
@InputType()
|
|
9921
|
+
export class CreateMJAIClientToolDefinitionInput {
|
|
9922
|
+
@Field({ nullable: true })
|
|
9923
|
+
ID?: string;
|
|
9924
|
+
|
|
9925
|
+
@Field({ nullable: true })
|
|
9926
|
+
Name?: string;
|
|
9927
|
+
|
|
9928
|
+
@Field({ nullable: true })
|
|
9929
|
+
Description?: string;
|
|
9930
|
+
|
|
9931
|
+
@Field({ nullable: true })
|
|
9932
|
+
Category: string | null;
|
|
9933
|
+
|
|
9934
|
+
@Field({ nullable: true })
|
|
9935
|
+
InputSchemaJSON: string | null;
|
|
9936
|
+
|
|
9937
|
+
@Field({ nullable: true })
|
|
9938
|
+
OutputSchemaJSON: string | null;
|
|
9939
|
+
|
|
9940
|
+
@Field(() => Int, { nullable: true })
|
|
9941
|
+
DefaultTimeoutMs?: number | null;
|
|
9942
|
+
|
|
9943
|
+
@Field({ nullable: true })
|
|
9944
|
+
RequiresContextType: string | null;
|
|
9945
|
+
}
|
|
9946
|
+
|
|
9947
|
+
|
|
9948
|
+
//****************************************************************************
|
|
9949
|
+
// INPUT TYPE for MJ: AI Client Tool Definitions
|
|
9950
|
+
//****************************************************************************
|
|
9951
|
+
@InputType()
|
|
9952
|
+
export class UpdateMJAIClientToolDefinitionInput {
|
|
9953
|
+
@Field()
|
|
9954
|
+
ID: string;
|
|
9955
|
+
|
|
9956
|
+
@Field({ nullable: true })
|
|
9957
|
+
Name?: string;
|
|
9958
|
+
|
|
9959
|
+
@Field({ nullable: true })
|
|
9960
|
+
Description?: string;
|
|
9961
|
+
|
|
9962
|
+
@Field({ nullable: true })
|
|
9963
|
+
Category?: string | null;
|
|
9964
|
+
|
|
9965
|
+
@Field({ nullable: true })
|
|
9966
|
+
InputSchemaJSON?: string | null;
|
|
9967
|
+
|
|
9968
|
+
@Field({ nullable: true })
|
|
9969
|
+
OutputSchemaJSON?: string | null;
|
|
9970
|
+
|
|
9971
|
+
@Field(() => Int, { nullable: true })
|
|
9972
|
+
DefaultTimeoutMs?: number | null;
|
|
9973
|
+
|
|
9974
|
+
@Field({ nullable: true })
|
|
9975
|
+
RequiresContextType?: string | null;
|
|
9976
|
+
|
|
9977
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
9978
|
+
OldValues___?: KeyValuePairInput[];
|
|
9979
|
+
}
|
|
9980
|
+
|
|
9981
|
+
//****************************************************************************
|
|
9982
|
+
// RESOLVER for MJ: AI Client Tool Definitions
|
|
9983
|
+
//****************************************************************************
|
|
9984
|
+
@ObjectType()
|
|
9985
|
+
export class RunMJAIClientToolDefinitionViewResult {
|
|
9986
|
+
@Field(() => [MJAIClientToolDefinition_])
|
|
9987
|
+
Results: MJAIClientToolDefinition_[];
|
|
9988
|
+
|
|
9989
|
+
@Field(() => String, {nullable: true})
|
|
9990
|
+
UserViewRunID?: string;
|
|
9991
|
+
|
|
9992
|
+
@Field(() => Int, {nullable: true})
|
|
9993
|
+
RowCount: number;
|
|
9994
|
+
|
|
9995
|
+
@Field(() => Int, {nullable: true})
|
|
9996
|
+
TotalRowCount: number;
|
|
9997
|
+
|
|
9998
|
+
@Field(() => Int, {nullable: true})
|
|
9999
|
+
ExecutionTime: number;
|
|
10000
|
+
|
|
10001
|
+
@Field({nullable: true})
|
|
10002
|
+
ErrorMessage?: string;
|
|
10003
|
+
|
|
10004
|
+
@Field(() => Boolean, {nullable: false})
|
|
10005
|
+
Success: boolean;
|
|
10006
|
+
}
|
|
10007
|
+
|
|
10008
|
+
@Resolver(MJAIClientToolDefinition_)
|
|
10009
|
+
export class MJAIClientToolDefinitionResolver extends ResolverBase {
|
|
10010
|
+
@Query(() => RunMJAIClientToolDefinitionViewResult)
|
|
10011
|
+
async RunMJAIClientToolDefinitionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10012
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10013
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
10014
|
+
}
|
|
10015
|
+
|
|
10016
|
+
@Query(() => RunMJAIClientToolDefinitionViewResult)
|
|
10017
|
+
async RunMJAIClientToolDefinitionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10018
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10019
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
10020
|
+
}
|
|
10021
|
+
|
|
10022
|
+
@Query(() => RunMJAIClientToolDefinitionViewResult)
|
|
10023
|
+
async RunMJAIClientToolDefinitionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10024
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10025
|
+
input.EntityName = 'MJ: AI Client Tool Definitions';
|
|
10026
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
10027
|
+
}
|
|
10028
|
+
@Query(() => MJAIClientToolDefinition_, { nullable: true })
|
|
10029
|
+
async MJAIClientToolDefinition(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIClientToolDefinition_ | null> {
|
|
10030
|
+
this.CheckUserReadPermissions('MJ: AI Client Tool Definitions', userPayload);
|
|
10031
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10032
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIClientToolDefinitions')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Client Tool Definitions', userPayload, EntityPermissionType.Read, 'AND');
|
|
10033
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
10034
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Client Tool Definitions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
10035
|
+
return result;
|
|
10036
|
+
}
|
|
10037
|
+
|
|
10038
|
+
@FieldResolver(() => [MJAIAgentClientTool_])
|
|
10039
|
+
async MJAIAgentClientTools_ClientToolDefinitionIDArray(@Root() mjaiclienttooldefinition_: MJAIClientToolDefinition_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10040
|
+
this.CheckUserReadPermissions('MJ: AI Agent Client Tools', userPayload);
|
|
10041
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10042
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentClientTools')} WHERE ${provider.QuoteIdentifier('ClientToolDefinitionID')}='${mjaiclienttooldefinition_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Client Tools', userPayload, EntityPermissionType.Read, 'AND');
|
|
10043
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
10044
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Client Tools', rows, this.GetUserFromPayload(userPayload));
|
|
10045
|
+
return result;
|
|
10046
|
+
}
|
|
10047
|
+
|
|
10048
|
+
@Mutation(() => MJAIClientToolDefinition_)
|
|
10049
|
+
async CreateMJAIClientToolDefinition(
|
|
10050
|
+
@Arg('input', () => CreateMJAIClientToolDefinitionInput) input: CreateMJAIClientToolDefinitionInput,
|
|
10051
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
10052
|
+
@PubSub() pubSub: PubSubEngine
|
|
10053
|
+
) {
|
|
10054
|
+
const provider = GetReadWriteProvider(providers);
|
|
10055
|
+
return this.CreateRecord('MJ: AI Client Tool Definitions', input, provider, userPayload, pubSub)
|
|
10056
|
+
}
|
|
10057
|
+
|
|
10058
|
+
@Mutation(() => MJAIClientToolDefinition_)
|
|
10059
|
+
async UpdateMJAIClientToolDefinition(
|
|
10060
|
+
@Arg('input', () => UpdateMJAIClientToolDefinitionInput) input: UpdateMJAIClientToolDefinitionInput,
|
|
10061
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
10062
|
+
@PubSub() pubSub: PubSubEngine
|
|
10063
|
+
) {
|
|
10064
|
+
const provider = GetReadWriteProvider(providers);
|
|
10065
|
+
return this.UpdateRecord('MJ: AI Client Tool Definitions', input, provider, userPayload, pubSub);
|
|
10066
|
+
}
|
|
10067
|
+
|
|
10068
|
+
@Mutation(() => MJAIClientToolDefinition_)
|
|
10069
|
+
async DeleteMJAIClientToolDefinition(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10070
|
+
const provider = GetReadWriteProvider(providers);
|
|
10071
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
10072
|
+
return this.DeleteRecord('MJ: AI Client Tool Definitions', key, options, provider, userPayload, pubSub);
|
|
10073
|
+
}
|
|
10074
|
+
|
|
10075
|
+
}
|
|
10076
|
+
|
|
9680
10077
|
//****************************************************************************
|
|
9681
10078
|
// ENTITY CLASS for MJ: AI Configuration Params
|
|
9682
10079
|
//****************************************************************************
|
|
@@ -12501,9 +12898,15 @@ export class MJAIModel_ {
|
|
|
12501
12898
|
@Field(() => [MJAIModelCost_])
|
|
12502
12899
|
MJAIModelCosts_ModelIDArray: MJAIModelCost_[]; // Link to MJAIModelCosts
|
|
12503
12900
|
|
|
12901
|
+
@Field(() => [MJContentType_])
|
|
12902
|
+
MJContentTypes_EmbeddingModelIDArray: MJContentType_[]; // Link to MJContentTypes
|
|
12903
|
+
|
|
12504
12904
|
@Field(() => [MJAIPromptModel_])
|
|
12505
12905
|
MJAIPromptModels_ModelIDArray: MJAIPromptModel_[]; // Link to MJAIPromptModels
|
|
12506
12906
|
|
|
12907
|
+
@Field(() => [MJContentSource_])
|
|
12908
|
+
MJContentSources_EmbeddingModelIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
12909
|
+
|
|
12507
12910
|
@Field(() => [MJAIPromptRun_])
|
|
12508
12911
|
MJAIPromptRuns_OriginalModelIDArray: MJAIPromptRun_[]; // Link to MJAIPromptRuns
|
|
12509
12912
|
|
|
@@ -12874,6 +13277,16 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
12874
13277
|
return result;
|
|
12875
13278
|
}
|
|
12876
13279
|
|
|
13280
|
+
@FieldResolver(() => [MJContentType_])
|
|
13281
|
+
async MJContentTypes_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13282
|
+
this.CheckUserReadPermissions('MJ: Content Types', userPayload);
|
|
13283
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13284
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentTypes')} WHERE ${provider.QuoteIdentifier('EmbeddingModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
13285
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
13286
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Types', rows, this.GetUserFromPayload(userPayload));
|
|
13287
|
+
return result;
|
|
13288
|
+
}
|
|
13289
|
+
|
|
12877
13290
|
@FieldResolver(() => [MJAIPromptModel_])
|
|
12878
13291
|
async MJAIPromptModels_ModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12879
13292
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
@@ -12884,6 +13297,16 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
12884
13297
|
return result;
|
|
12885
13298
|
}
|
|
12886
13299
|
|
|
13300
|
+
@FieldResolver(() => [MJContentSource_])
|
|
13301
|
+
async MJContentSources_EmbeddingModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13302
|
+
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
13303
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13304
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('EmbeddingModelID')}='${mjaimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
13305
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
13306
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
13307
|
+
return result;
|
|
13308
|
+
}
|
|
13309
|
+
|
|
12887
13310
|
@FieldResolver(() => [MJAIPromptRun_])
|
|
12888
13311
|
async MJAIPromptRuns_OriginalModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12889
13312
|
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
@@ -26369,6 +26792,9 @@ export class MJContentItemTag_ {
|
|
|
26369
26792
|
@Field()
|
|
26370
26793
|
_mj__UpdatedAt: Date;
|
|
26371
26794
|
|
|
26795
|
+
@Field(() => Float, {description: `Relevance weight for this tag (0.0-1.0). 1.0 = highly relevant central topic, 0.5 = moderately relevant, 0.1 = tangentially related. Assigned by the LLM during autotagging.`})
|
|
26796
|
+
Weight: number;
|
|
26797
|
+
|
|
26372
26798
|
@Field({nullable: true})
|
|
26373
26799
|
@MaxLength(250)
|
|
26374
26800
|
Item?: string;
|
|
@@ -26388,6 +26814,9 @@ export class CreateMJContentItemTagInput {
|
|
|
26388
26814
|
|
|
26389
26815
|
@Field({ nullable: true })
|
|
26390
26816
|
Tag?: string;
|
|
26817
|
+
|
|
26818
|
+
@Field(() => Float, { nullable: true })
|
|
26819
|
+
Weight?: number;
|
|
26391
26820
|
}
|
|
26392
26821
|
|
|
26393
26822
|
|
|
@@ -26405,6 +26834,9 @@ export class UpdateMJContentItemTagInput {
|
|
|
26405
26834
|
@Field({ nullable: true })
|
|
26406
26835
|
Tag?: string;
|
|
26407
26836
|
|
|
26837
|
+
@Field(() => Float, { nullable: true })
|
|
26838
|
+
Weight?: number;
|
|
26839
|
+
|
|
26408
26840
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
26409
26841
|
OldValues___?: KeyValuePairInput[];
|
|
26410
26842
|
}
|
|
@@ -27462,6 +27894,14 @@ export class MJContentSource_ {
|
|
|
27462
27894
|
@Field()
|
|
27463
27895
|
_mj__UpdatedAt: Date;
|
|
27464
27896
|
|
|
27897
|
+
@Field({nullable: true, description: `Per-source override for the AI embedding model. When NULL, falls back to the ContentType default.`})
|
|
27898
|
+
@MaxLength(36)
|
|
27899
|
+
EmbeddingModelID?: string;
|
|
27900
|
+
|
|
27901
|
+
@Field({nullable: true, description: `Per-source override for the vector index. When NULL, falls back to the ContentType default.`})
|
|
27902
|
+
@MaxLength(36)
|
|
27903
|
+
VectorIndexID?: string;
|
|
27904
|
+
|
|
27465
27905
|
@Field()
|
|
27466
27906
|
@MaxLength(255)
|
|
27467
27907
|
ContentType: string;
|
|
@@ -27474,6 +27914,14 @@ export class MJContentSource_ {
|
|
|
27474
27914
|
@MaxLength(255)
|
|
27475
27915
|
ContentFileType: string;
|
|
27476
27916
|
|
|
27917
|
+
@Field({nullable: true})
|
|
27918
|
+
@MaxLength(50)
|
|
27919
|
+
EmbeddingModel?: string;
|
|
27920
|
+
|
|
27921
|
+
@Field({nullable: true})
|
|
27922
|
+
@MaxLength(255)
|
|
27923
|
+
VectorIndex?: string;
|
|
27924
|
+
|
|
27477
27925
|
@Field(() => [MJContentItem_])
|
|
27478
27926
|
MJContentItems_ContentSourceIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
27479
27927
|
|
|
@@ -27507,6 +27955,12 @@ export class CreateMJContentSourceInput {
|
|
|
27507
27955
|
|
|
27508
27956
|
@Field({ nullable: true })
|
|
27509
27957
|
URL?: string;
|
|
27958
|
+
|
|
27959
|
+
@Field({ nullable: true })
|
|
27960
|
+
EmbeddingModelID: string | null;
|
|
27961
|
+
|
|
27962
|
+
@Field({ nullable: true })
|
|
27963
|
+
VectorIndexID: string | null;
|
|
27510
27964
|
}
|
|
27511
27965
|
|
|
27512
27966
|
|
|
@@ -27533,6 +27987,12 @@ export class UpdateMJContentSourceInput {
|
|
|
27533
27987
|
@Field({ nullable: true })
|
|
27534
27988
|
URL?: string;
|
|
27535
27989
|
|
|
27990
|
+
@Field({ nullable: true })
|
|
27991
|
+
EmbeddingModelID?: string | null;
|
|
27992
|
+
|
|
27993
|
+
@Field({ nullable: true })
|
|
27994
|
+
VectorIndexID?: string | null;
|
|
27995
|
+
|
|
27536
27996
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
27537
27997
|
OldValues___?: KeyValuePairInput[];
|
|
27538
27998
|
}
|
|
@@ -27848,10 +28308,26 @@ export class MJContentType_ {
|
|
|
27848
28308
|
@Field()
|
|
27849
28309
|
_mj__UpdatedAt: Date;
|
|
27850
28310
|
|
|
28311
|
+
@Field({nullable: true, description: `Default AI embedding model for vectorizing content items of this type. Sources can override per-source. If NULL, uses the first available embedding model.`})
|
|
28312
|
+
@MaxLength(36)
|
|
28313
|
+
EmbeddingModelID?: string;
|
|
28314
|
+
|
|
28315
|
+
@Field({nullable: true, description: `Default vector index for storing embeddings of this content type. Sources can override per-source. If NULL, uses the first available vector index.`})
|
|
28316
|
+
@MaxLength(36)
|
|
28317
|
+
VectorIndexID?: string;
|
|
28318
|
+
|
|
27851
28319
|
@Field()
|
|
27852
28320
|
@MaxLength(50)
|
|
27853
28321
|
AIModel: string;
|
|
27854
28322
|
|
|
28323
|
+
@Field({nullable: true})
|
|
28324
|
+
@MaxLength(50)
|
|
28325
|
+
EmbeddingModel?: string;
|
|
28326
|
+
|
|
28327
|
+
@Field({nullable: true})
|
|
28328
|
+
@MaxLength(255)
|
|
28329
|
+
VectorIndex?: string;
|
|
28330
|
+
|
|
27855
28331
|
@Field(() => [MJContentSource_])
|
|
27856
28332
|
MJContentSources_ContentTypeIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
27857
28333
|
|
|
@@ -27882,6 +28358,12 @@ export class CreateMJContentTypeInput {
|
|
|
27882
28358
|
|
|
27883
28359
|
@Field(() => Int, { nullable: true })
|
|
27884
28360
|
MaxTags?: number;
|
|
28361
|
+
|
|
28362
|
+
@Field({ nullable: true })
|
|
28363
|
+
EmbeddingModelID: string | null;
|
|
28364
|
+
|
|
28365
|
+
@Field({ nullable: true })
|
|
28366
|
+
VectorIndexID: string | null;
|
|
27885
28367
|
}
|
|
27886
28368
|
|
|
27887
28369
|
|
|
@@ -27908,6 +28390,12 @@ export class UpdateMJContentTypeInput {
|
|
|
27908
28390
|
@Field(() => Int, { nullable: true })
|
|
27909
28391
|
MaxTags?: number;
|
|
27910
28392
|
|
|
28393
|
+
@Field({ nullable: true })
|
|
28394
|
+
EmbeddingModelID?: string | null;
|
|
28395
|
+
|
|
28396
|
+
@Field({ nullable: true })
|
|
28397
|
+
VectorIndexID?: string | null;
|
|
28398
|
+
|
|
27911
28399
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
27912
28400
|
OldValues___?: KeyValuePairInput[];
|
|
27913
28401
|
}
|
|
@@ -33332,6 +33820,9 @@ export class MJDuplicateRunDetailMatch_ {
|
|
|
33332
33820
|
@Field()
|
|
33333
33821
|
_mj__UpdatedAt: Date;
|
|
33334
33822
|
|
|
33823
|
+
@Field({nullable: true, description: `JSON metadata snapshot of the matched record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.`})
|
|
33824
|
+
RecordMetadata?: string;
|
|
33825
|
+
|
|
33335
33826
|
@Field()
|
|
33336
33827
|
@MaxLength(500)
|
|
33337
33828
|
DuplicateRunDetail: string;
|
|
@@ -33379,6 +33870,9 @@ export class CreateMJDuplicateRunDetailMatchInput {
|
|
|
33379
33870
|
|
|
33380
33871
|
@Field({ nullable: true })
|
|
33381
33872
|
MergedAt?: Date;
|
|
33873
|
+
|
|
33874
|
+
@Field({ nullable: true })
|
|
33875
|
+
RecordMetadata: string | null;
|
|
33382
33876
|
}
|
|
33383
33877
|
|
|
33384
33878
|
|
|
@@ -33420,6 +33914,9 @@ export class UpdateMJDuplicateRunDetailMatchInput {
|
|
|
33420
33914
|
@Field({ nullable: true })
|
|
33421
33915
|
MergedAt?: Date;
|
|
33422
33916
|
|
|
33917
|
+
@Field({ nullable: true })
|
|
33918
|
+
RecordMetadata?: string | null;
|
|
33919
|
+
|
|
33423
33920
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
33424
33921
|
OldValues___?: KeyValuePairInput[];
|
|
33425
33922
|
}
|
|
@@ -33550,6 +34047,9 @@ export class MJDuplicateRunDetail_ {
|
|
|
33550
34047
|
@Field()
|
|
33551
34048
|
_mj__UpdatedAt: Date;
|
|
33552
34049
|
|
|
34050
|
+
@Field({nullable: true, description: `JSON metadata snapshot of the source record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.`})
|
|
34051
|
+
RecordMetadata?: string;
|
|
34052
|
+
|
|
33553
34053
|
@Field()
|
|
33554
34054
|
@MaxLength(255)
|
|
33555
34055
|
DuplicateRun: string;
|
|
@@ -33587,6 +34087,9 @@ export class CreateMJDuplicateRunDetailInput {
|
|
|
33587
34087
|
|
|
33588
34088
|
@Field({ nullable: true })
|
|
33589
34089
|
MergeErrorMessage: string | null;
|
|
34090
|
+
|
|
34091
|
+
@Field({ nullable: true })
|
|
34092
|
+
RecordMetadata: string | null;
|
|
33590
34093
|
}
|
|
33591
34094
|
|
|
33592
34095
|
|
|
@@ -33619,6 +34122,9 @@ export class UpdateMJDuplicateRunDetailInput {
|
|
|
33619
34122
|
@Field({ nullable: true })
|
|
33620
34123
|
MergeErrorMessage?: string | null;
|
|
33621
34124
|
|
|
34125
|
+
@Field({ nullable: true })
|
|
34126
|
+
RecordMetadata?: string | null;
|
|
34127
|
+
|
|
33622
34128
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
33623
34129
|
OldValues___?: KeyValuePairInput[];
|
|
33624
34130
|
}
|
|
@@ -33736,9 +34242,9 @@ export class MJDuplicateRun_ {
|
|
|
33736
34242
|
@MaxLength(36)
|
|
33737
34243
|
StartedByUserID: string;
|
|
33738
34244
|
|
|
33739
|
-
@Field()
|
|
34245
|
+
@Field({nullable: true, description: `Optional List ID to narrow the scope of duplicate detection. When NULL, all records in the entity are scanned. When set, only records in the specified list are checked for duplicates.`})
|
|
33740
34246
|
@MaxLength(36)
|
|
33741
|
-
SourceListID
|
|
34247
|
+
SourceListID?: string;
|
|
33742
34248
|
|
|
33743
34249
|
@Field()
|
|
33744
34250
|
StartedAt: Date;
|
|
@@ -33778,9 +34284,9 @@ export class MJDuplicateRun_ {
|
|
|
33778
34284
|
@MaxLength(100)
|
|
33779
34285
|
StartedByUser: string;
|
|
33780
34286
|
|
|
33781
|
-
@Field()
|
|
34287
|
+
@Field({nullable: true})
|
|
33782
34288
|
@MaxLength(100)
|
|
33783
|
-
SourceList
|
|
34289
|
+
SourceList?: string;
|
|
33784
34290
|
|
|
33785
34291
|
@Field({nullable: true})
|
|
33786
34292
|
@MaxLength(100)
|
|
@@ -33806,7 +34312,7 @@ export class CreateMJDuplicateRunInput {
|
|
|
33806
34312
|
StartedByUserID?: string;
|
|
33807
34313
|
|
|
33808
34314
|
@Field({ nullable: true })
|
|
33809
|
-
SourceListID
|
|
34315
|
+
SourceListID: string | null;
|
|
33810
34316
|
|
|
33811
34317
|
@Field({ nullable: true })
|
|
33812
34318
|
StartedAt?: Date;
|
|
@@ -33846,7 +34352,7 @@ export class UpdateMJDuplicateRunInput {
|
|
|
33846
34352
|
StartedByUserID?: string;
|
|
33847
34353
|
|
|
33848
34354
|
@Field({ nullable: true })
|
|
33849
|
-
SourceListID?: string;
|
|
34355
|
+
SourceListID?: string | null;
|
|
33850
34356
|
|
|
33851
34357
|
@Field({ nullable: true })
|
|
33852
34358
|
StartedAt?: Date;
|
|
@@ -38785,6 +39291,13 @@ export class MJEntityDocument_ {
|
|
|
38785
39291
|
@Field()
|
|
38786
39292
|
_mj__UpdatedAt: Date;
|
|
38787
39293
|
|
|
39294
|
+
@Field({nullable: true, description: `Optional foreign key to the specific Vector Index where this entity document's embeddings should be stored. When specified, the vectorization pipeline will upsert vectors directly to this index rather than auto-creating or looking up an index based on VectorDatabaseID + AIModelID. This enables explicit control over which Pinecone/Weaviate/etc. index is used per entity document, supporting multi-index architectures and shared indexes across entity types.`})
|
|
39295
|
+
@MaxLength(36)
|
|
39296
|
+
VectorIndexID?: string;
|
|
39297
|
+
|
|
39298
|
+
@Field({nullable: true, description: `JSON configuration settings for this entity document. Controls vector metadata field inclusion (which fields get stored in the vector index for search result display), large field truncation limits, and future settings like sync scheduling and threshold overrides. NULL means use system defaults.`})
|
|
39299
|
+
Configuration?: string;
|
|
39300
|
+
|
|
38788
39301
|
@Field()
|
|
38789
39302
|
@MaxLength(100)
|
|
38790
39303
|
Type: string;
|
|
@@ -38805,6 +39318,10 @@ export class MJEntityDocument_ {
|
|
|
38805
39318
|
@MaxLength(50)
|
|
38806
39319
|
AIModel: string;
|
|
38807
39320
|
|
|
39321
|
+
@Field({nullable: true})
|
|
39322
|
+
@MaxLength(255)
|
|
39323
|
+
VectorIndex?: string;
|
|
39324
|
+
|
|
38808
39325
|
@Field(() => [MJEntityDocumentRun_])
|
|
38809
39326
|
MJEntityDocumentRuns_EntityDocumentIDArray: MJEntityDocumentRun_[]; // Link to MJEntityDocumentRuns
|
|
38810
39327
|
|
|
@@ -38850,6 +39367,12 @@ export class CreateMJEntityDocumentInput {
|
|
|
38850
39367
|
|
|
38851
39368
|
@Field(() => Float, { nullable: true })
|
|
38852
39369
|
AbsoluteMatchThreshold?: number;
|
|
39370
|
+
|
|
39371
|
+
@Field({ nullable: true })
|
|
39372
|
+
VectorIndexID: string | null;
|
|
39373
|
+
|
|
39374
|
+
@Field({ nullable: true })
|
|
39375
|
+
Configuration: string | null;
|
|
38853
39376
|
}
|
|
38854
39377
|
|
|
38855
39378
|
|
|
@@ -38888,6 +39411,12 @@ export class UpdateMJEntityDocumentInput {
|
|
|
38888
39411
|
@Field(() => Float, { nullable: true })
|
|
38889
39412
|
AbsoluteMatchThreshold?: number;
|
|
38890
39413
|
|
|
39414
|
+
@Field({ nullable: true })
|
|
39415
|
+
VectorIndexID?: string | null;
|
|
39416
|
+
|
|
39417
|
+
@Field({ nullable: true })
|
|
39418
|
+
Configuration?: string | null;
|
|
39419
|
+
|
|
38891
39420
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
38892
39421
|
OldValues___?: KeyValuePairInput[];
|
|
38893
39422
|
}
|
|
@@ -39397,6 +39926,16 @@ export class MJEntityField_ {
|
|
|
39397
39926
|
@Field({nullable: true, description: `JSON configuration for additional fields to join from the related entity into this entity's base view. Supports modes: extend (add to NameField), override (replace NameField), disable (no joins). Schema: { mode?: string, fields?: [{ field: string, alias?: string }] }`})
|
|
39398
39927
|
RelatedEntityJoinFields?: string;
|
|
39399
39928
|
|
|
39929
|
+
@Field({nullable: true, description: `The name of the TypeScript interface/type for this JSON field. When set, CodeGen emits a strongly-typed Object-suffixed accessor using this type instead of only the default string getter/setter.`})
|
|
39930
|
+
@MaxLength(255)
|
|
39931
|
+
JSONType?: string;
|
|
39932
|
+
|
|
39933
|
+
@Field(() => Boolean, {description: `If true, the field holds a JSON array of JSONType items. The Object accessor returns Array<JSONType> | null and the setter accepts Array<JSONType> | null.`})
|
|
39934
|
+
JSONTypeIsArray: boolean;
|
|
39935
|
+
|
|
39936
|
+
@Field({nullable: true, description: `Raw TypeScript code emitted by CodeGen above the entity class definition. Typically contains the interface/type definition referenced by JSONType. Can include imports, multiple types, or any valid TypeScript.`})
|
|
39937
|
+
JSONTypeDefinition?: string;
|
|
39938
|
+
|
|
39400
39939
|
@Field({nullable: true})
|
|
39401
39940
|
FieldCodeName?: string;
|
|
39402
39941
|
|
|
@@ -39582,6 +40121,15 @@ export class CreateMJEntityFieldInput {
|
|
|
39582
40121
|
|
|
39583
40122
|
@Field({ nullable: true })
|
|
39584
40123
|
RelatedEntityJoinFields: string | null;
|
|
40124
|
+
|
|
40125
|
+
@Field({ nullable: true })
|
|
40126
|
+
JSONType: string | null;
|
|
40127
|
+
|
|
40128
|
+
@Field(() => Boolean, { nullable: true })
|
|
40129
|
+
JSONTypeIsArray?: boolean;
|
|
40130
|
+
|
|
40131
|
+
@Field({ nullable: true })
|
|
40132
|
+
JSONTypeDefinition: string | null;
|
|
39585
40133
|
}
|
|
39586
40134
|
|
|
39587
40135
|
|
|
@@ -39719,6 +40267,15 @@ export class UpdateMJEntityFieldInput {
|
|
|
39719
40267
|
@Field({ nullable: true })
|
|
39720
40268
|
RelatedEntityJoinFields?: string | null;
|
|
39721
40269
|
|
|
40270
|
+
@Field({ nullable: true })
|
|
40271
|
+
JSONType?: string | null;
|
|
40272
|
+
|
|
40273
|
+
@Field(() => Boolean, { nullable: true })
|
|
40274
|
+
JSONTypeIsArray?: boolean;
|
|
40275
|
+
|
|
40276
|
+
@Field({ nullable: true })
|
|
40277
|
+
JSONTypeDefinition?: string | null;
|
|
40278
|
+
|
|
39722
40279
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
39723
40280
|
OldValues___?: KeyValuePairInput[];
|
|
39724
40281
|
}
|
|
@@ -67939,6 +68496,9 @@ export class MJVectorDatabase_ {
|
|
|
67939
68496
|
@Field()
|
|
67940
68497
|
_mj__UpdatedAt: Date;
|
|
67941
68498
|
|
|
68499
|
+
@Field({nullable: true, description: `JSON configuration settings for this vector database provider. Stores provider-specific connection settings like custom host URLs, authentication configuration, timeouts, retry policies, and batch size limits. NULL means use defaults from environment variables or provider defaults.`})
|
|
68500
|
+
Configuration?: string;
|
|
68501
|
+
|
|
67942
68502
|
@Field(() => [MJVectorIndex_])
|
|
67943
68503
|
MJVectorIndexes_VectorDatabaseIDArray: MJVectorIndex_[]; // Link to MJVectorIndexes
|
|
67944
68504
|
|
|
@@ -67966,6 +68526,9 @@ export class CreateMJVectorDatabaseInput {
|
|
|
67966
68526
|
|
|
67967
68527
|
@Field({ nullable: true })
|
|
67968
68528
|
ClassKey: string | null;
|
|
68529
|
+
|
|
68530
|
+
@Field({ nullable: true })
|
|
68531
|
+
Configuration: string | null;
|
|
67969
68532
|
}
|
|
67970
68533
|
|
|
67971
68534
|
|
|
@@ -67989,6 +68552,9 @@ export class UpdateMJVectorDatabaseInput {
|
|
|
67989
68552
|
@Field({ nullable: true })
|
|
67990
68553
|
ClassKey?: string | null;
|
|
67991
68554
|
|
|
68555
|
+
@Field({ nullable: true })
|
|
68556
|
+
Configuration?: string | null;
|
|
68557
|
+
|
|
67992
68558
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
67993
68559
|
OldValues___?: KeyValuePairInput[];
|
|
67994
68560
|
}
|
|
@@ -68129,6 +68695,20 @@ export class MJVectorIndex_ {
|
|
|
68129
68695
|
@Field()
|
|
68130
68696
|
_mj__UpdatedAt: Date;
|
|
68131
68697
|
|
|
68698
|
+
@Field({nullable: true, description: `The provider's native identifier for this index. For Pinecone this is the index name; for other providers it may be a separate UUID or identifier. Used for syncing operations between MJ metadata and the remote vector database.`})
|
|
68699
|
+
@MaxLength(500)
|
|
68700
|
+
ExternalID?: string;
|
|
68701
|
+
|
|
68702
|
+
@Field(() => Int, {nullable: true, description: `The number of dimensions for vectors stored in this index. Determined by the embedding model (e.g., 1536 for text-embedding-3-small, 768 for all-mpnet-base-v2). Set automatically when the index is created via the vector database provider.`})
|
|
68703
|
+
Dimensions?: number;
|
|
68704
|
+
|
|
68705
|
+
@Field({nullable: true, description: `The distance metric used for similarity calculations in this index. Common values: cosine (default, measures angular similarity), euclidean (L2 distance), dotproduct (inner product). Must match what the vector database provider was configured with.`})
|
|
68706
|
+
@MaxLength(50)
|
|
68707
|
+
Metric?: string;
|
|
68708
|
+
|
|
68709
|
+
@Field({nullable: true, description: `JSON object containing provider-specific configuration for this index. For Pinecone serverless: {"cloud":"aws","region":"us-east-1"}. For pod-based: {"environment":"us-east1-gcp","podType":"p1.x1","replicas":1}. Stored as a flexible JSON bag to support any provider without schema changes.`})
|
|
68710
|
+
ProviderConfig?: string;
|
|
68711
|
+
|
|
68132
68712
|
@Field()
|
|
68133
68713
|
@MaxLength(100)
|
|
68134
68714
|
VectorDatabase: string;
|
|
@@ -68140,6 +68720,15 @@ export class MJVectorIndex_ {
|
|
|
68140
68720
|
@Field(() => [MJEntityRecordDocument_])
|
|
68141
68721
|
MJEntityRecordDocuments_VectorIndexIDArray: MJEntityRecordDocument_[]; // Link to MJEntityRecordDocuments
|
|
68142
68722
|
|
|
68723
|
+
@Field(() => [MJEntityDocument_])
|
|
68724
|
+
MJEntityDocuments_VectorIndexIDArray: MJEntityDocument_[]; // Link to MJEntityDocuments
|
|
68725
|
+
|
|
68726
|
+
@Field(() => [MJContentType_])
|
|
68727
|
+
MJContentTypes_VectorIndexIDArray: MJContentType_[]; // Link to MJContentTypes
|
|
68728
|
+
|
|
68729
|
+
@Field(() => [MJContentSource_])
|
|
68730
|
+
MJContentSources_VectorIndexIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
68731
|
+
|
|
68143
68732
|
}
|
|
68144
68733
|
|
|
68145
68734
|
//****************************************************************************
|
|
@@ -68161,6 +68750,18 @@ export class CreateMJVectorIndexInput {
|
|
|
68161
68750
|
|
|
68162
68751
|
@Field({ nullable: true })
|
|
68163
68752
|
EmbeddingModelID?: string;
|
|
68753
|
+
|
|
68754
|
+
@Field({ nullable: true })
|
|
68755
|
+
ExternalID: string | null;
|
|
68756
|
+
|
|
68757
|
+
@Field(() => Int, { nullable: true })
|
|
68758
|
+
Dimensions: number | null;
|
|
68759
|
+
|
|
68760
|
+
@Field({ nullable: true })
|
|
68761
|
+
Metric: string | null;
|
|
68762
|
+
|
|
68763
|
+
@Field({ nullable: true })
|
|
68764
|
+
ProviderConfig: string | null;
|
|
68164
68765
|
}
|
|
68165
68766
|
|
|
68166
68767
|
|
|
@@ -68184,6 +68785,18 @@ export class UpdateMJVectorIndexInput {
|
|
|
68184
68785
|
@Field({ nullable: true })
|
|
68185
68786
|
EmbeddingModelID?: string;
|
|
68186
68787
|
|
|
68788
|
+
@Field({ nullable: true })
|
|
68789
|
+
ExternalID?: string | null;
|
|
68790
|
+
|
|
68791
|
+
@Field(() => Int, { nullable: true })
|
|
68792
|
+
Dimensions?: number | null;
|
|
68793
|
+
|
|
68794
|
+
@Field({ nullable: true })
|
|
68795
|
+
Metric?: string | null;
|
|
68796
|
+
|
|
68797
|
+
@Field({ nullable: true })
|
|
68798
|
+
ProviderConfig?: string | null;
|
|
68799
|
+
|
|
68187
68800
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
68188
68801
|
OldValues___?: KeyValuePairInput[];
|
|
68189
68802
|
}
|
|
@@ -68255,6 +68868,36 @@ export class MJVectorIndexResolver extends ResolverBase {
|
|
|
68255
68868
|
return result;
|
|
68256
68869
|
}
|
|
68257
68870
|
|
|
68871
|
+
@FieldResolver(() => [MJEntityDocument_])
|
|
68872
|
+
async MJEntityDocuments_VectorIndexIDArray(@Root() mjvectorindex_: MJVectorIndex_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68873
|
+
this.CheckUserReadPermissions('MJ: Entity Documents', userPayload);
|
|
68874
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68875
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityDocuments')} WHERE ${provider.QuoteIdentifier('VectorIndexID')}='${mjvectorindex_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
68876
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
68877
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Documents', rows, this.GetUserFromPayload(userPayload));
|
|
68878
|
+
return result;
|
|
68879
|
+
}
|
|
68880
|
+
|
|
68881
|
+
@FieldResolver(() => [MJContentType_])
|
|
68882
|
+
async MJContentTypes_VectorIndexIDArray(@Root() mjvectorindex_: MJVectorIndex_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68883
|
+
this.CheckUserReadPermissions('MJ: Content Types', userPayload);
|
|
68884
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68885
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentTypes')} WHERE ${provider.QuoteIdentifier('VectorIndexID')}='${mjvectorindex_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
68886
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
68887
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Types', rows, this.GetUserFromPayload(userPayload));
|
|
68888
|
+
return result;
|
|
68889
|
+
}
|
|
68890
|
+
|
|
68891
|
+
@FieldResolver(() => [MJContentSource_])
|
|
68892
|
+
async MJContentSources_VectorIndexIDArray(@Root() mjvectorindex_: MJVectorIndex_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68893
|
+
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
68894
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68895
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('VectorIndexID')}='${mjvectorindex_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
68896
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
68897
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
68898
|
+
return result;
|
|
68899
|
+
}
|
|
68900
|
+
|
|
68258
68901
|
@Mutation(() => MJVectorIndex_)
|
|
68259
68902
|
async CreateMJVectorIndex(
|
|
68260
68903
|
@Arg('input', () => CreateMJVectorIndexInput) input: CreateMJVectorIndexInput,
|