@memberjunction/server 6.1.3 → 6.2.0-edge.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/auth/exampleNewUserSubClass.js +2 -1
  3. package/dist/auth/exampleNewUserSubClass.js.map +1 -1
  4. package/dist/generated/graphql-schemas/__mj.d.ts +255 -4
  5. package/dist/generated/graphql-schemas/__mj.d.ts.map +1 -1
  6. package/dist/generated/graphql-schemas/__mj.js +1256 -0
  7. package/dist/generated/graphql-schemas/__mj.js.map +1 -1
  8. package/dist/generic/ResolverBase.d.ts +26 -0
  9. package/dist/generic/ResolverBase.d.ts.map +1 -1
  10. package/dist/generic/ResolverBase.js +59 -1
  11. package/dist/generic/ResolverBase.js.map +1 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +12 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/resolvers/FetchEntityVectorsResolver.js +2 -2
  16. package/dist/resolvers/FetchEntityVectorsResolver.js.map +1 -1
  17. package/dist/resolvers/QuerySystemUserResolver.d.ts.map +1 -1
  18. package/dist/resolvers/QuerySystemUserResolver.js +2 -1
  19. package/dist/resolvers/QuerySystemUserResolver.js.map +1 -1
  20. package/dist/resolvers/RealtimeClientSessionResolver.d.ts +37 -0
  21. package/dist/resolvers/RealtimeClientSessionResolver.d.ts.map +1 -1
  22. package/dist/resolvers/RealtimeClientSessionResolver.js +98 -8
  23. package/dist/resolvers/RealtimeClientSessionResolver.js.map +1 -1
  24. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  25. package/dist/resolvers/RunAIAgentResolver.js +5 -4
  26. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  27. package/dist/resolvers/SearchEntitiesResolver.d.ts.map +1 -1
  28. package/dist/resolvers/SearchEntitiesResolver.js +3 -1
  29. package/dist/resolvers/SearchEntitiesResolver.js.map +1 -1
  30. package/dist/resolvers/SearchKnowledgeResolver.d.ts +1 -0
  31. package/dist/resolvers/SearchKnowledgeResolver.d.ts.map +1 -1
  32. package/dist/resolvers/SearchKnowledgeResolver.js +5 -0
  33. package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -1
  34. package/dist/resolvers/SearchKnowledgeSystemUserResolver.d.ts.map +1 -1
  35. package/dist/resolvers/SearchKnowledgeSystemUserResolver.js +1 -0
  36. package/dist/resolvers/SearchKnowledgeSystemUserResolver.js.map +1 -1
  37. package/dist/resolvers/TransactionGroupResolver.d.ts.map +1 -1
  38. package/dist/resolvers/TransactionGroupResolver.js +53 -4
  39. package/dist/resolvers/TransactionGroupResolver.js.map +1 -1
  40. package/dist/services/MJStorageBlobStore.d.ts +41 -0
  41. package/dist/services/MJStorageBlobStore.d.ts.map +1 -0
  42. package/dist/services/MJStorageBlobStore.js +160 -0
  43. package/dist/services/MJStorageBlobStore.js.map +1 -0
  44. package/dist/util.d.ts +6 -3
  45. package/dist/util.d.ts.map +1 -1
  46. package/dist/util.js +6 -3
  47. package/dist/util.js.map +1 -1
  48. package/package.json +92 -92
  49. package/src/__tests__/RealtimeClientSessionResolver.test.ts +229 -0
  50. package/src/__tests__/ResolverBase.isaPromotionCreate.test.ts +412 -0
  51. package/src/__tests__/SearchEntitiesResolver.readOnlyFallback.test.ts +78 -0
  52. package/src/__tests__/TransactionGroupResolver.refusals.test.ts +290 -0
  53. package/src/auth/exampleNewUserSubClass.ts +2 -2
  54. package/src/generated/graphql-schemas/__mj.ts +896 -5
  55. package/src/generic/ResolverBase.ts +61 -0
  56. package/src/index.ts +14 -1
  57. package/src/resolvers/FetchEntityVectorsResolver.ts +2 -2
  58. package/src/resolvers/QuerySystemUserResolver.ts +2 -1
  59. package/src/resolvers/RealtimeClientSessionResolver.ts +123 -10
  60. package/src/resolvers/RunAIAgentResolver.ts +5 -4
  61. package/src/resolvers/SearchEntitiesResolver.ts +3 -1
  62. package/src/resolvers/SearchKnowledgeResolver.ts +4 -0
  63. package/src/resolvers/SearchKnowledgeSystemUserResolver.ts +1 -0
  64. package/src/resolvers/TransactionGroupResolver.ts +57 -4
  65. package/src/services/MJStorageBlobStore.ts +209 -0
  66. package/src/util.ts +6 -3
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../../config.js';
18
18
 
19
19
 
20
20
 
21
- import { MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentCredentialEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentHarnessEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPersonaEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentSkillEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPersonaEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPersonaVendorEntity, MJAIPersonaEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSearchScopeEntity, MJAISkillSubAgentEntity, MJAISkillEntity, MJAIUsageTypeEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthenticationProviderEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJClusterAnalysisEntity, MJClusterAnalysisClusterEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemChunkEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationCompactionRunEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationSkillEntity, MJConversationWidgetInstanceEntity, MJConversationEntity, MJCountryEntity, 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, MJEntityAIActionEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldPermissionEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJFormChromeRuleEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIdentityClaimTypeEntity, MJIdentityClaimEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMaterializedResultQueryEntity, MJMaterializedResultEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRSUPendingWorkEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJSQLDialectEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJScopedPromptConfigEntity, MJScopedPromptPartEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, MJSkillEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJThemeEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserRoutineRecipientEntity, MJUserRoutineRunEntity, MJUserRoutineEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
21
+ import { MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentCredentialEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentHarnessEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPersonaEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentSkillEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPersonaEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPersonaVendorEntity, MJAIPersonaEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSearchScopeEntity, MJAISkillSubAgentEntity, MJAISkillEntity, MJAIUsageTypeEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthenticationProviderEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJClusterAnalysisEntity, MJClusterAnalysisClusterEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemChunkEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationCompactionRunEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationSkillEntity, MJConversationWidgetInstanceEntity, MJConversationEntity, MJCountryEntity, 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, MJEntityAIActionEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldPermissionEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, MJFeatureValueCacheEntity, MJFeatureValueEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJFormChromeRuleEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIdentityClaimTypeEntity, MJIdentityClaimEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMaterializedResultQueryEntity, MJMaterializedResultEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRSUPendingWorkEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJSQLDialectEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJScopedPromptConfigEntity, MJScopedPromptPartEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, MJSkillEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJThemeEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserRoutineRecipientEntity, MJUserRoutineRunEntity, MJUserRoutineEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWebSearchProviderEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
22
22
 
23
23
 
24
24
  //****************************************************************************
@@ -47652,7 +47652,7 @@ export class CreateMJEntityDocumentInput {
47652
47652
  EntityID?: string;
47653
47653
 
47654
47654
  @Field({ nullable: true })
47655
- VectorDatabaseID?: string;
47655
+ VectorDatabaseID: string | null;
47656
47656
 
47657
47657
  @Field({ nullable: true })
47658
47658
  Status?: string;
@@ -47661,7 +47661,7 @@ export class CreateMJEntityDocumentInput {
47661
47661
  TemplateID?: string;
47662
47662
 
47663
47663
  @Field({ nullable: true })
47664
- AIModelID?: string;
47664
+ AIModelID: string | null;
47665
47665
 
47666
47666
  @Field(() => Float, { nullable: true })
47667
47667
  PotentialMatchThreshold?: number;
@@ -47716,7 +47716,7 @@ export class UpdateMJEntityDocumentInput {
47716
47716
  EntityID?: string;
47717
47717
 
47718
47718
  @Field({ nullable: true })
47719
- VectorDatabaseID?: string;
47719
+ VectorDatabaseID?: string | null;
47720
47720
 
47721
47721
  @Field({ nullable: true })
47722
47722
  Status?: string;
@@ -47725,7 +47725,7 @@ export class UpdateMJEntityDocumentInput {
47725
47725
  TemplateID?: string;
47726
47726
 
47727
47727
  @Field({ nullable: true })
47728
- AIModelID?: string;
47728
+ AIModelID?: string | null;
47729
47729
 
47730
47730
  @Field(() => Float, { nullable: true })
47731
47731
  PotentialMatchThreshold?: number;
@@ -48472,6 +48472,13 @@ export class MJEntityField_ {
48472
48472
  @Field({nullable: true, description: `Optional JSON configuration bag defining field-level policies and capabilities (shape = IEntityFieldConfiguration). Includes Hierarchy options (IsHierarchy, MaxDepth) to explicitly declare recursive tree hierarchies.`})
48473
48473
  Configuration?: string;
48474
48474
 
48475
+ @Field({nullable: true, description: `Optional SQL WHERE fragment applied to every lookup on this foreign key (e.g. Status = 'Active'), AND-ed with whatever the user types, on both the browse list and the search path. Lets a picker be scoped from metadata rather than from every form template that renders the field. Authored by hand — CodeGen never derives or overwrites it. NULL means no filter, which is the pre-feature behaviour.`})
48476
+ RelatedEntityFilter?: string;
48477
+
48478
+ @Field({nullable: true, description: `Optional ORDER BY fragment for the empty-query browse list on this foreign key, e.g. [Name] or [LastActivityDate] DESC. Does not affect the typed-query path, which is ordered by search relevance. Authored by hand — CodeGen never derives or overwrites it. NULL means order by the related entity's name field.`})
48479
+ @MaxLength(500)
48480
+ RelatedEntityOrderBy?: string;
48481
+
48475
48482
  @Field({nullable: true})
48476
48483
  FieldCodeName?: string;
48477
48484
 
@@ -48688,6 +48695,12 @@ export class CreateMJEntityFieldInput {
48688
48695
  @Field({ nullable: true })
48689
48696
  Configuration: string | null;
48690
48697
 
48698
+ @Field({ nullable: true })
48699
+ RelatedEntityFilter: string | null;
48700
+
48701
+ @Field({ nullable: true })
48702
+ RelatedEntityOrderBy: string | null;
48703
+
48691
48704
  @Field(() => RestoreContextInput, { nullable: true })
48692
48705
  RestoreContext___?: RestoreContextInput;
48693
48706
  }
@@ -48857,6 +48870,12 @@ export class UpdateMJEntityFieldInput {
48857
48870
  @Field({ nullable: true })
48858
48871
  Configuration?: string | null;
48859
48872
 
48873
+ @Field({ nullable: true })
48874
+ RelatedEntityFilter?: string | null;
48875
+
48876
+ @Field({ nullable: true })
48877
+ RelatedEntityOrderBy?: string | null;
48878
+
48860
48879
  @Field(() => [KeyValuePairInput], { nullable: true })
48861
48880
  OldValues___?: KeyValuePairInput[];
48862
48881
 
@@ -52682,6 +52701,617 @@ export class MJExternalDataSourceResolver extends ResolverBase {
52682
52701
 
52683
52702
  }
52684
52703
 
52704
+ //****************************************************************************
52705
+ // ENTITY CLASS for MJ: Feature Value Caches
52706
+ //****************************************************************************
52707
+ @ObjectType({ description: `Dedup dictionary table for Feature Pipelines. Caches computed outputs by canonical input key hash, prompt version, and constraint hash. Distinct input strings (e.g. unique job titles) are computed once and reused across all matching records.` })
52708
+ export class MJFeatureValueCache_ {
52709
+ @Field({description: `Unique identifier for this feature value cache entry.`})
52710
+ @MaxLength(36)
52711
+ ID: string;
52712
+
52713
+ @Field({nullable: true, description: `Optional reference to the RecordProcess that produced this cache entry. When NULL, the cached result is scoped by PromptID only and shared across pipelines using the same prompt.`})
52714
+ @MaxLength(36)
52715
+ RecordProcessID?: string;
52716
+
52717
+ @Field({nullable: true, description: `Reference to the AI Prompt used to compute this cached entry.`})
52718
+ @MaxLength(36)
52719
+ PromptID?: string;
52720
+
52721
+ @Field({nullable: true, description: `SHA-256 content hash of the rendered prompt template, output schema, and constraint instructions at execution time.`})
52722
+ @MaxLength(64)
52723
+ PromptVersionHash?: string;
52724
+
52725
+ @Field({nullable: true, description: `SHA-256 hash of the output value constraint definitions. Changes to allowed enum values or ranges invalidate cached results.`})
52726
+ @MaxLength(64)
52727
+ ConstraintHash?: string;
52728
+
52729
+ @Field({nullable: true, description: `SHA-256 hash over the canonicalized JSON key field values. The primary lookup key.`})
52730
+ @MaxLength(64)
52731
+ KeyHash?: string;
52732
+
52733
+ @Field({nullable: true, description: `Human-readable plain text display of the key (e.g. "Senior Director, Field Marketing"). Makes this table legible as reference data.`})
52734
+ @MaxLength(500)
52735
+ KeyDisplay?: string;
52736
+
52737
+ @Field({nullable: true, description: `Full JSON representation of the input key fields and their values.`})
52738
+ KeyJSON?: string;
52739
+
52740
+ @Field({nullable: true, description: `Cached computed outputs JSON fragment. Stored directly so archival of AI Prompt Runs does not lose cached values.`})
52741
+ OutputsJSON?: string;
52742
+
52743
+ @Field({nullable: true, description: `Optional model reasoning or rationale captured from the prompt execution.`})
52744
+ Reasoning?: string;
52745
+
52746
+ @Field({nullable: true, description: `Soft reference to the AI Prompt Run that first computed and populated this cached result.`})
52747
+ @MaxLength(36)
52748
+ AIPromptRunID?: string;
52749
+
52750
+ @Field(() => Int, {nullable: true, description: `Total number of times this cached result has been served to skip an LLM invocation.`})
52751
+ HitCount?: number;
52752
+
52753
+ @Field({nullable: true, description: `Timestamp when this cached entry was last read and served.`})
52754
+ LastHitAt?: Date;
52755
+
52756
+ @Field({nullable: true, description: `Timestamp when this cached entry was originally computed.`})
52757
+ ComputedAt?: Date;
52758
+
52759
+ @Field({nullable: true, description: `Optional expiration timestamp for time-to-live invalidation. NULL means no expiration.`})
52760
+ ExpiresAt?: Date;
52761
+
52762
+ @Field({description: `Timestamp when this record was created.`})
52763
+ _mj__CreatedAt: Date;
52764
+
52765
+ @Field({description: `Timestamp when this record was last updated.`})
52766
+ _mj__UpdatedAt: Date;
52767
+
52768
+ @Field({nullable: true})
52769
+ @MaxLength(255)
52770
+ RecordProcess?: string;
52771
+
52772
+ @Field({nullable: true})
52773
+ @MaxLength(255)
52774
+ Prompt?: string;
52775
+
52776
+ @Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
52777
+ ReadableFields___?: string[];
52778
+
52779
+ }
52780
+
52781
+ //****************************************************************************
52782
+ // INPUT TYPE for MJ: Feature Value Caches
52783
+ //****************************************************************************
52784
+ @InputType()
52785
+ export class CreateMJFeatureValueCacheInput {
52786
+ @Field({ nullable: true })
52787
+ ID?: string;
52788
+
52789
+ @Field({ nullable: true })
52790
+ RecordProcessID: string | null;
52791
+
52792
+ @Field({ nullable: true })
52793
+ PromptID?: string;
52794
+
52795
+ @Field({ nullable: true })
52796
+ PromptVersionHash?: string;
52797
+
52798
+ @Field({ nullable: true })
52799
+ ConstraintHash?: string;
52800
+
52801
+ @Field({ nullable: true })
52802
+ KeyHash?: string;
52803
+
52804
+ @Field({ nullable: true })
52805
+ KeyDisplay: string | null;
52806
+
52807
+ @Field({ nullable: true })
52808
+ KeyJSON?: string;
52809
+
52810
+ @Field({ nullable: true })
52811
+ OutputsJSON?: string;
52812
+
52813
+ @Field({ nullable: true })
52814
+ Reasoning: string | null;
52815
+
52816
+ @Field({ nullable: true })
52817
+ AIPromptRunID: string | null;
52818
+
52819
+ @Field(() => Int, { nullable: true })
52820
+ HitCount?: number;
52821
+
52822
+ @Field({ nullable: true })
52823
+ LastHitAt: Date | null;
52824
+
52825
+ @Field({ nullable: true })
52826
+ ComputedAt?: Date;
52827
+
52828
+ @Field({ nullable: true })
52829
+ ExpiresAt: Date | null;
52830
+
52831
+ @Field(() => RestoreContextInput, { nullable: true })
52832
+ RestoreContext___?: RestoreContextInput;
52833
+ }
52834
+
52835
+
52836
+ //****************************************************************************
52837
+ // INPUT TYPE for MJ: Feature Value Caches
52838
+ //****************************************************************************
52839
+ @InputType()
52840
+ export class UpdateMJFeatureValueCacheInput {
52841
+ @Field()
52842
+ ID: string;
52843
+
52844
+ @Field({ nullable: true })
52845
+ RecordProcessID?: string | null;
52846
+
52847
+ @Field({ nullable: true })
52848
+ PromptID?: string;
52849
+
52850
+ @Field({ nullable: true })
52851
+ PromptVersionHash?: string;
52852
+
52853
+ @Field({ nullable: true })
52854
+ ConstraintHash?: string;
52855
+
52856
+ @Field({ nullable: true })
52857
+ KeyHash?: string;
52858
+
52859
+ @Field({ nullable: true })
52860
+ KeyDisplay?: string | null;
52861
+
52862
+ @Field({ nullable: true })
52863
+ KeyJSON?: string;
52864
+
52865
+ @Field({ nullable: true })
52866
+ OutputsJSON?: string;
52867
+
52868
+ @Field({ nullable: true })
52869
+ Reasoning?: string | null;
52870
+
52871
+ @Field({ nullable: true })
52872
+ AIPromptRunID?: string | null;
52873
+
52874
+ @Field(() => Int, { nullable: true })
52875
+ HitCount?: number;
52876
+
52877
+ @Field({ nullable: true })
52878
+ LastHitAt?: Date | null;
52879
+
52880
+ @Field({ nullable: true })
52881
+ ComputedAt?: Date;
52882
+
52883
+ @Field({ nullable: true })
52884
+ ExpiresAt?: Date | null;
52885
+
52886
+ @Field(() => [KeyValuePairInput], { nullable: true })
52887
+ OldValues___?: KeyValuePairInput[];
52888
+
52889
+ @Field(() => RestoreContextInput, { nullable: true })
52890
+ RestoreContext___?: RestoreContextInput;
52891
+ }
52892
+
52893
+ //****************************************************************************
52894
+ // RESOLVER for MJ: Feature Value Caches
52895
+ //****************************************************************************
52896
+ @ObjectType()
52897
+ export class RunMJFeatureValueCacheViewResult {
52898
+ @Field(() => [MJFeatureValueCache_])
52899
+ Results: MJFeatureValueCache_[];
52900
+
52901
+ @Field(() => String, {nullable: true})
52902
+ UserViewRunID?: string;
52903
+
52904
+ @Field(() => Int, {nullable: true})
52905
+ RowCount: number;
52906
+
52907
+ @Field(() => Int, {nullable: true})
52908
+ TotalRowCount: number;
52909
+
52910
+ @Field(() => Int, {nullable: true})
52911
+ ExecutionTime: number;
52912
+
52913
+ @Field({nullable: true})
52914
+ ErrorMessage?: string;
52915
+
52916
+ @Field(() => Boolean, {nullable: false})
52917
+ Success: boolean;
52918
+ }
52919
+
52920
+ @Resolver(MJFeatureValueCache_)
52921
+ export class MJFeatureValueCacheResolver extends ResolverBase {
52922
+ @Query(() => RunMJFeatureValueCacheViewResult)
52923
+ async RunMJFeatureValueCacheViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
52924
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
52925
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
52926
+ }
52927
+
52928
+ @Query(() => RunMJFeatureValueCacheViewResult)
52929
+ async RunMJFeatureValueCacheViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
52930
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
52931
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
52932
+ }
52933
+
52934
+ @Query(() => RunMJFeatureValueCacheViewResult)
52935
+ async RunMJFeatureValueCacheDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
52936
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
52937
+ input.EntityName = 'MJ: Feature Value Caches';
52938
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
52939
+ }
52940
+ @Query(() => MJFeatureValueCache_, { nullable: true })
52941
+ async MJFeatureValueCache(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJFeatureValueCache_ | null> {
52942
+ this.CheckUserReadPermissions('MJ: Feature Value Caches', userPayload);
52943
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
52944
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwFeatureValueCaches')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Feature Value Caches', userPayload, EntityPermissionType.Read, 'AND');
52945
+ const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
52946
+ const result = await this.MapFieldNamesToCodeNames('MJ: Feature Value Caches', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
52947
+ return result;
52948
+ }
52949
+
52950
+ @Mutation(() => MJFeatureValueCache_)
52951
+ async CreateMJFeatureValueCache(
52952
+ @Arg('input', () => CreateMJFeatureValueCacheInput) input: CreateMJFeatureValueCacheInput,
52953
+ @Ctx() { providers, userPayload }: AppContext,
52954
+ @PubSub() pubSub: PubSubEngine
52955
+ ) {
52956
+ const provider = GetReadWriteProvider(providers);
52957
+ return this.CreateRecord('MJ: Feature Value Caches', input, provider, userPayload, pubSub)
52958
+ }
52959
+
52960
+ @Mutation(() => MJFeatureValueCache_)
52961
+ async UpdateMJFeatureValueCache(
52962
+ @Arg('input', () => UpdateMJFeatureValueCacheInput) input: UpdateMJFeatureValueCacheInput,
52963
+ @Ctx() { providers, userPayload }: AppContext,
52964
+ @PubSub() pubSub: PubSubEngine
52965
+ ) {
52966
+ const provider = GetReadWriteProvider(providers);
52967
+ return this.UpdateRecord('MJ: Feature Value Caches', input, provider, userPayload, pubSub);
52968
+ }
52969
+
52970
+ @Mutation(() => MJFeatureValueCache_)
52971
+ async DeleteMJFeatureValueCache(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
52972
+ const provider = GetReadWriteProvider(providers);
52973
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
52974
+ return this.DeleteRecord('MJ: Feature Value Caches', key, options, provider, userPayload, pubSub);
52975
+ }
52976
+
52977
+ }
52978
+
52979
+ //****************************************************************************
52980
+ // ENTITY CLASS for MJ: Feature Values
52981
+ //****************************************************************************
52982
+ @ObjectType({ description: `Complete historical audit table for Feature Pipelines. Records every feature value ever computed per entity record, with full provenance, model reasoning, and run back-links.` })
52983
+ export class MJFeatureValue_ {
52984
+ @Field({description: `Unique identifier for this feature value history record.`})
52985
+ @MaxLength(36)
52986
+ ID: string;
52987
+
52988
+ @Field({nullable: true, description: `The Record Process (Feature Pipeline) that computed this feature value.`})
52989
+ @MaxLength(36)
52990
+ RecordProcessID?: string;
52991
+
52992
+ @Field({nullable: true, description: `The entity of the record this feature was computed for.`})
52993
+ @MaxLength(36)
52994
+ EntityID?: string;
52995
+
52996
+ @Field({nullable: true, description: `Serialized primary key of the record this feature was computed for. Matches ProcessRunDetail.RecordID.`})
52997
+ @MaxLength(900)
52998
+ RecordID?: string;
52999
+
53000
+ @Field({nullable: true, description: `Name of the feature, matching DataFeatureOutput.Name.`})
53001
+ @MaxLength(255)
53002
+ FeatureName?: string;
53003
+
53004
+ @Field({nullable: true, description: `Computed value as text, for text and categorical features.`})
53005
+ ValueText?: string;
53006
+
53007
+ @Field(() => Float, {nullable: true, description: `Computed value as floating-point numeric, for numeric and score features.`})
53008
+ ValueNumeric?: number;
53009
+
53010
+ @Field({nullable: true, description: `Computed value as datetimeoffset, for date and timestamp features.`})
53011
+ ValueDate?: Date;
53012
+
53013
+ @Field(() => Boolean, {nullable: true, description: `Computed value as boolean bit flag.`})
53014
+ ValueBoolean?: boolean;
53015
+
53016
+ @Field({nullable: true, description: `Computed value as raw JSON string, for array or complex object features.`})
53017
+ ValueJSON?: string;
53018
+
53019
+ @Field({nullable: true, description: `Optional model reasoning or rationale captured from the prompt execution.`})
53020
+ Reasoning?: string;
53021
+
53022
+ @Field(() => Float, {nullable: true, description: `Optional confidence score associated with this computed value.`})
53023
+ Confidence?: number;
53024
+
53025
+ @Field({nullable: true, description: `Reference to the AI Prompt used to compute this feature value.`})
53026
+ @MaxLength(36)
53027
+ PromptID?: string;
53028
+
53029
+ @Field({nullable: true, description: `SHA-256 content hash of the rendered prompt template and instructions at execution time.`})
53030
+ @MaxLength(64)
53031
+ PromptVersionHash?: string;
53032
+
53033
+ @Field({nullable: true, description: `SHA-256 hash of the value constraint definitions in effect when this feature was computed.`})
53034
+ @MaxLength(64)
53035
+ ConstraintHash?: string;
53036
+
53037
+ @Field({nullable: true, description: `Reference to the Process Run during which this feature was computed.`})
53038
+ @MaxLength(36)
53039
+ ProcessRunID?: string;
53040
+
53041
+ @Field({nullable: true, description: `Reference to the specific Process Run Detail row for this record execution.`})
53042
+ @MaxLength(36)
53043
+ ProcessRunDetailID?: string;
53044
+
53045
+ @Field({nullable: true, description: `Soft reference to the AI Prompt Run that computed this value.`})
53046
+ @MaxLength(36)
53047
+ AIPromptRunID?: string;
53048
+
53049
+ @Field({nullable: true, description: `Optional reference to the FeatureValueCache entry if this value was served from cache.`})
53050
+ @MaxLength(36)
53051
+ FeatureValueCacheID?: string;
53052
+
53053
+ @Field({nullable: true, description: `Timestamp when this feature value was computed.`})
53054
+ ComputedAt?: Date;
53055
+
53056
+ @Field({description: `Timestamp when this record was created.`})
53057
+ _mj__CreatedAt: Date;
53058
+
53059
+ @Field({description: `Timestamp when this record was last updated.`})
53060
+ _mj__UpdatedAt: Date;
53061
+
53062
+ @Field({nullable: true})
53063
+ @MaxLength(255)
53064
+ RecordProcess?: string;
53065
+
53066
+ @Field({nullable: true})
53067
+ @MaxLength(255)
53068
+ Entity?: string;
53069
+
53070
+ @Field({nullable: true})
53071
+ @MaxLength(255)
53072
+ Prompt?: string;
53073
+
53074
+ @Field({nullable: true})
53075
+ @MaxLength(450)
53076
+ ProcessRunDetail?: string;
53077
+
53078
+ @Field({nullable: true})
53079
+ @MaxLength(500)
53080
+ FeatureValueCache?: string;
53081
+
53082
+ @Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
53083
+ ReadableFields___?: string[];
53084
+
53085
+ }
53086
+
53087
+ //****************************************************************************
53088
+ // INPUT TYPE for MJ: Feature Values
53089
+ //****************************************************************************
53090
+ @InputType()
53091
+ export class CreateMJFeatureValueInput {
53092
+ @Field({ nullable: true })
53093
+ ID?: string;
53094
+
53095
+ @Field({ nullable: true })
53096
+ RecordProcessID?: string;
53097
+
53098
+ @Field({ nullable: true })
53099
+ EntityID?: string;
53100
+
53101
+ @Field({ nullable: true })
53102
+ RecordID?: string;
53103
+
53104
+ @Field({ nullable: true })
53105
+ FeatureName?: string;
53106
+
53107
+ @Field({ nullable: true })
53108
+ ValueText: string | null;
53109
+
53110
+ @Field(() => Float, { nullable: true })
53111
+ ValueNumeric: number | null;
53112
+
53113
+ @Field({ nullable: true })
53114
+ ValueDate: Date | null;
53115
+
53116
+ @Field(() => Boolean, { nullable: true })
53117
+ ValueBoolean: boolean | null;
53118
+
53119
+ @Field({ nullable: true })
53120
+ ValueJSON: string | null;
53121
+
53122
+ @Field({ nullable: true })
53123
+ Reasoning: string | null;
53124
+
53125
+ @Field(() => Float, { nullable: true })
53126
+ Confidence: number | null;
53127
+
53128
+ @Field({ nullable: true })
53129
+ PromptID: string | null;
53130
+
53131
+ @Field({ nullable: true })
53132
+ PromptVersionHash: string | null;
53133
+
53134
+ @Field({ nullable: true })
53135
+ ConstraintHash: string | null;
53136
+
53137
+ @Field({ nullable: true })
53138
+ ProcessRunID: string | null;
53139
+
53140
+ @Field({ nullable: true })
53141
+ ProcessRunDetailID: string | null;
53142
+
53143
+ @Field({ nullable: true })
53144
+ AIPromptRunID: string | null;
53145
+
53146
+ @Field({ nullable: true })
53147
+ FeatureValueCacheID: string | null;
53148
+
53149
+ @Field({ nullable: true })
53150
+ ComputedAt?: Date;
53151
+
53152
+ @Field(() => RestoreContextInput, { nullable: true })
53153
+ RestoreContext___?: RestoreContextInput;
53154
+ }
53155
+
53156
+
53157
+ //****************************************************************************
53158
+ // INPUT TYPE for MJ: Feature Values
53159
+ //****************************************************************************
53160
+ @InputType()
53161
+ export class UpdateMJFeatureValueInput {
53162
+ @Field()
53163
+ ID: string;
53164
+
53165
+ @Field({ nullable: true })
53166
+ RecordProcessID?: string;
53167
+
53168
+ @Field({ nullable: true })
53169
+ EntityID?: string;
53170
+
53171
+ @Field({ nullable: true })
53172
+ RecordID?: string;
53173
+
53174
+ @Field({ nullable: true })
53175
+ FeatureName?: string;
53176
+
53177
+ @Field({ nullable: true })
53178
+ ValueText?: string | null;
53179
+
53180
+ @Field(() => Float, { nullable: true })
53181
+ ValueNumeric?: number | null;
53182
+
53183
+ @Field({ nullable: true })
53184
+ ValueDate?: Date | null;
53185
+
53186
+ @Field(() => Boolean, { nullable: true })
53187
+ ValueBoolean?: boolean | null;
53188
+
53189
+ @Field({ nullable: true })
53190
+ ValueJSON?: string | null;
53191
+
53192
+ @Field({ nullable: true })
53193
+ Reasoning?: string | null;
53194
+
53195
+ @Field(() => Float, { nullable: true })
53196
+ Confidence?: number | null;
53197
+
53198
+ @Field({ nullable: true })
53199
+ PromptID?: string | null;
53200
+
53201
+ @Field({ nullable: true })
53202
+ PromptVersionHash?: string | null;
53203
+
53204
+ @Field({ nullable: true })
53205
+ ConstraintHash?: string | null;
53206
+
53207
+ @Field({ nullable: true })
53208
+ ProcessRunID?: string | null;
53209
+
53210
+ @Field({ nullable: true })
53211
+ ProcessRunDetailID?: string | null;
53212
+
53213
+ @Field({ nullable: true })
53214
+ AIPromptRunID?: string | null;
53215
+
53216
+ @Field({ nullable: true })
53217
+ FeatureValueCacheID?: string | null;
53218
+
53219
+ @Field({ nullable: true })
53220
+ ComputedAt?: Date;
53221
+
53222
+ @Field(() => [KeyValuePairInput], { nullable: true })
53223
+ OldValues___?: KeyValuePairInput[];
53224
+
53225
+ @Field(() => RestoreContextInput, { nullable: true })
53226
+ RestoreContext___?: RestoreContextInput;
53227
+ }
53228
+
53229
+ //****************************************************************************
53230
+ // RESOLVER for MJ: Feature Values
53231
+ //****************************************************************************
53232
+ @ObjectType()
53233
+ export class RunMJFeatureValueViewResult {
53234
+ @Field(() => [MJFeatureValue_])
53235
+ Results: MJFeatureValue_[];
53236
+
53237
+ @Field(() => String, {nullable: true})
53238
+ UserViewRunID?: string;
53239
+
53240
+ @Field(() => Int, {nullable: true})
53241
+ RowCount: number;
53242
+
53243
+ @Field(() => Int, {nullable: true})
53244
+ TotalRowCount: number;
53245
+
53246
+ @Field(() => Int, {nullable: true})
53247
+ ExecutionTime: number;
53248
+
53249
+ @Field({nullable: true})
53250
+ ErrorMessage?: string;
53251
+
53252
+ @Field(() => Boolean, {nullable: false})
53253
+ Success: boolean;
53254
+ }
53255
+
53256
+ @Resolver(MJFeatureValue_)
53257
+ export class MJFeatureValueResolver extends ResolverBase {
53258
+ @Query(() => RunMJFeatureValueViewResult)
53259
+ async RunMJFeatureValueViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
53260
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
53261
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
53262
+ }
53263
+
53264
+ @Query(() => RunMJFeatureValueViewResult)
53265
+ async RunMJFeatureValueViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
53266
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
53267
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
53268
+ }
53269
+
53270
+ @Query(() => RunMJFeatureValueViewResult)
53271
+ async RunMJFeatureValueDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
53272
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
53273
+ input.EntityName = 'MJ: Feature Values';
53274
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
53275
+ }
53276
+ @Query(() => MJFeatureValue_, { nullable: true })
53277
+ async MJFeatureValue(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJFeatureValue_ | null> {
53278
+ this.CheckUserReadPermissions('MJ: Feature Values', userPayload);
53279
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
53280
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwFeatureValues')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Feature Values', userPayload, EntityPermissionType.Read, 'AND');
53281
+ const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
53282
+ const result = await this.MapFieldNamesToCodeNames('MJ: Feature Values', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
53283
+ return result;
53284
+ }
53285
+
53286
+ @Mutation(() => MJFeatureValue_)
53287
+ async CreateMJFeatureValue(
53288
+ @Arg('input', () => CreateMJFeatureValueInput) input: CreateMJFeatureValueInput,
53289
+ @Ctx() { providers, userPayload }: AppContext,
53290
+ @PubSub() pubSub: PubSubEngine
53291
+ ) {
53292
+ const provider = GetReadWriteProvider(providers);
53293
+ return this.CreateRecord('MJ: Feature Values', input, provider, userPayload, pubSub)
53294
+ }
53295
+
53296
+ @Mutation(() => MJFeatureValue_)
53297
+ async UpdateMJFeatureValue(
53298
+ @Arg('input', () => UpdateMJFeatureValueInput) input: UpdateMJFeatureValueInput,
53299
+ @Ctx() { providers, userPayload }: AppContext,
53300
+ @PubSub() pubSub: PubSubEngine
53301
+ ) {
53302
+ const provider = GetReadWriteProvider(providers);
53303
+ return this.UpdateRecord('MJ: Feature Values', input, provider, userPayload, pubSub);
53304
+ }
53305
+
53306
+ @Mutation(() => MJFeatureValue_)
53307
+ async DeleteMJFeatureValue(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
53308
+ const provider = GetReadWriteProvider(providers);
53309
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
53310
+ return this.DeleteRecord('MJ: Feature Values', key, options, provider, userPayload, pubSub);
53311
+ }
53312
+
53313
+ }
53314
+
52685
53315
  //****************************************************************************
52686
53316
  // ENTITY CLASS for MJ: File Categories
52687
53317
  //****************************************************************************
@@ -66821,6 +67451,9 @@ export class MJQuery_ {
66821
67451
  @Field(() => Boolean, {nullable: true, description: `Author's declared intent that this Query should be materialized. CodeGen scans for IsMaterialized = 1 and, if the query qualifies (§9/§10), materializes it. The authoritative state lives on the linked MJ: Materialized Results row (found via the MaterializedResultQuery join table).`})
66822
67452
  IsMaterialized?: boolean;
66823
67453
 
67454
+ @Field({nullable: true, description: `Optional JSON configuration bag defining query-level policies and semantic capabilities (shape = IQueryConfiguration). Includes Priority (1-100) for ground-truth ranking in the semantic layer, LogExecution to control query execution logging, AlternativeQuestions for multi-phrasing vector recall, UsageGuidance and WhenNotToUse bounds for AI agents, and DomainScope.`})
67455
+ Configuration?: string;
67456
+
66824
67457
  @Field({nullable: true})
66825
67458
  @MaxLength(50)
66826
67459
  Category?: string;
@@ -66919,6 +67552,9 @@ export class CreateMJQueryInput {
66919
67552
  @Field(() => Boolean, { nullable: true })
66920
67553
  IsMaterialized?: boolean;
66921
67554
 
67555
+ @Field({ nullable: true })
67556
+ Configuration: string | null;
67557
+
66922
67558
  @Field(() => RestoreContextInput, { nullable: true })
66923
67559
  RestoreContext___?: RestoreContextInput;
66924
67560
  }
@@ -67001,6 +67637,9 @@ export class UpdateMJQueryInput {
67001
67637
  @Field(() => Boolean, { nullable: true })
67002
67638
  IsMaterialized?: boolean;
67003
67639
 
67640
+ @Field({ nullable: true })
67641
+ Configuration?: string | null;
67642
+
67004
67643
  @Field(() => [KeyValuePairInput], { nullable: true })
67005
67644
  OldValues___?: KeyValuePairInput[];
67006
67645
 
@@ -90803,6 +91442,258 @@ export class MJViewTypeResolver extends ResolverBase {
90803
91442
 
90804
91443
  }
90805
91444
 
91445
+ //****************************************************************************
91446
+ // ENTITY CLASS for MJ: Web Search Providers
91447
+ //****************************************************************************
91448
+ @ObjectType({ description: `Registry of external web search vendors available to @memberjunction/web-search-engine. Each row configures one driver: whether it is active, its position in the failover order, and where its credential lives. Provider capabilities (answer synthesis, domain filtering, freshness) are declared by the driver class, not stored here.` })
91449
+ export class MJWebSearchProvider_ {
91450
+ @Field()
91451
+ @MaxLength(36)
91452
+ ID: string;
91453
+
91454
+ @Field({nullable: true, description: `Administrator-facing name for this provider, e.g. "Brave" or "Tavily". Unique, and usable as the Provider value when a caller pins a search to one vendor.`})
91455
+ @MaxLength(200)
91456
+ Name?: string;
91457
+
91458
+ @Field({nullable: true, description: `What this provider searches, what it costs, and when it is the right choice.`})
91459
+ Description?: string;
91460
+
91461
+ @Field({nullable: true, description: `ClassFactory key used with @RegisterClass(BaseWebSearchProvider, DriverClass) to instantiate the driver at runtime, e.g. "BraveWebSearchProvider". A value with no matching registration leaves the provider unavailable and is logged at engine startup.`})
91462
+ @MaxLength(500)
91463
+ DriverClass?: string;
91464
+
91465
+ @Field({nullable: true, description: `Provider lifecycle status: Pending (configured but not yet in use), Active (participates in searches), Terminated (disabled). Only Active providers are loaded. Matches the vocabulary used by SearchProvider.`})
91466
+ @MaxLength(20)
91467
+ Status?: string;
91468
+
91469
+ @Field(() => Int, {nullable: true, description: `Failover order: LOWER values are tried FIRST. The engine serves a search from the first available provider in this order, moving on only when one fails transiently. Must be >= 0.`})
91470
+ Priority?: number;
91471
+
91472
+ @Field({nullable: true, description: `Optional FK to the Credential record holding this provider's API key. When NULL the driver falls back to its documented environment variable, so a host that has not yet migrated its secrets into the Credential store keeps working.`})
91473
+ @MaxLength(36)
91474
+ CredentialID?: string;
91475
+
91476
+ @Field({nullable: true, description: `Optional JSON blob of non-secret, driver-specific settings (endpoint overrides, tier flags, answer model). Schema is defined by each driver; invalid JSON is logged and ignored rather than disabling the provider.`})
91477
+ ProviderConfig?: string;
91478
+
91479
+ @Field(() => Int, {nullable: true, description: `Optional per-provider cap on results per request, for pay-per-query vendors. The effective cap is the smallest of the caller's request, this value, and the vendor's own hard limit. NULL means the driver's own limit applies.`})
91480
+ MaxResultsOverride?: number;
91481
+
91482
+ @Field(() => Boolean, {nullable: true, description: `Whether this vendor's terms permit storing returned results. Defaults to 0 (deny), because caching rights differ sharply between vendors and violating them is silent: some sell storage rights as a plan tier, others forbid persistent caching outright. Nothing in the engine caches today; this column exists so the first caching layer reads a per-provider gate instead of inventing one.`})
91483
+ AllowResultCaching?: boolean;
91484
+
91485
+ @Field({nullable: true, description: `UI display name shown in admin surfaces and result attribution. When NULL, falls back to the Name column.`})
91486
+ @MaxLength(200)
91487
+ DisplayName?: string;
91488
+
91489
+ @Field({nullable: true, description: `CSS icon class for UI display, e.g. "fa-brands fa-brave". Supports any CSS-based icon library. When NULL a default icon is used.`})
91490
+ @MaxLength(200)
91491
+ Icon?: string;
91492
+
91493
+ @Field({nullable: true, description: `Free-form administrator notes, e.g. contract terms, billing owner, or why this provider sits at its priority.`})
91494
+ Comments?: string;
91495
+
91496
+ @Field()
91497
+ _mj__CreatedAt: Date;
91498
+
91499
+ @Field()
91500
+ _mj__UpdatedAt: Date;
91501
+
91502
+ @Field({nullable: true})
91503
+ @MaxLength(200)
91504
+ Credential?: string;
91505
+
91506
+ @Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
91507
+ ReadableFields___?: string[];
91508
+
91509
+ }
91510
+
91511
+ //****************************************************************************
91512
+ // INPUT TYPE for MJ: Web Search Providers
91513
+ //****************************************************************************
91514
+ @InputType()
91515
+ export class CreateMJWebSearchProviderInput {
91516
+ @Field({ nullable: true })
91517
+ ID?: string;
91518
+
91519
+ @Field({ nullable: true })
91520
+ Name?: string;
91521
+
91522
+ @Field({ nullable: true })
91523
+ Description: string | null;
91524
+
91525
+ @Field({ nullable: true })
91526
+ DriverClass?: string;
91527
+
91528
+ @Field({ nullable: true })
91529
+ Status?: string;
91530
+
91531
+ @Field(() => Int, { nullable: true })
91532
+ Priority?: number;
91533
+
91534
+ @Field({ nullable: true })
91535
+ CredentialID: string | null;
91536
+
91537
+ @Field({ nullable: true })
91538
+ ProviderConfig: string | null;
91539
+
91540
+ @Field(() => Int, { nullable: true })
91541
+ MaxResultsOverride: number | null;
91542
+
91543
+ @Field(() => Boolean, { nullable: true })
91544
+ AllowResultCaching?: boolean;
91545
+
91546
+ @Field({ nullable: true })
91547
+ DisplayName: string | null;
91548
+
91549
+ @Field({ nullable: true })
91550
+ Icon: string | null;
91551
+
91552
+ @Field({ nullable: true })
91553
+ Comments: string | null;
91554
+
91555
+ @Field(() => RestoreContextInput, { nullable: true })
91556
+ RestoreContext___?: RestoreContextInput;
91557
+ }
91558
+
91559
+
91560
+ //****************************************************************************
91561
+ // INPUT TYPE for MJ: Web Search Providers
91562
+ //****************************************************************************
91563
+ @InputType()
91564
+ export class UpdateMJWebSearchProviderInput {
91565
+ @Field()
91566
+ ID: string;
91567
+
91568
+ @Field({ nullable: true })
91569
+ Name?: string;
91570
+
91571
+ @Field({ nullable: true })
91572
+ Description?: string | null;
91573
+
91574
+ @Field({ nullable: true })
91575
+ DriverClass?: string;
91576
+
91577
+ @Field({ nullable: true })
91578
+ Status?: string;
91579
+
91580
+ @Field(() => Int, { nullable: true })
91581
+ Priority?: number;
91582
+
91583
+ @Field({ nullable: true })
91584
+ CredentialID?: string | null;
91585
+
91586
+ @Field({ nullable: true })
91587
+ ProviderConfig?: string | null;
91588
+
91589
+ @Field(() => Int, { nullable: true })
91590
+ MaxResultsOverride?: number | null;
91591
+
91592
+ @Field(() => Boolean, { nullable: true })
91593
+ AllowResultCaching?: boolean;
91594
+
91595
+ @Field({ nullable: true })
91596
+ DisplayName?: string | null;
91597
+
91598
+ @Field({ nullable: true })
91599
+ Icon?: string | null;
91600
+
91601
+ @Field({ nullable: true })
91602
+ Comments?: string | null;
91603
+
91604
+ @Field(() => [KeyValuePairInput], { nullable: true })
91605
+ OldValues___?: KeyValuePairInput[];
91606
+
91607
+ @Field(() => RestoreContextInput, { nullable: true })
91608
+ RestoreContext___?: RestoreContextInput;
91609
+ }
91610
+
91611
+ //****************************************************************************
91612
+ // RESOLVER for MJ: Web Search Providers
91613
+ //****************************************************************************
91614
+ @ObjectType()
91615
+ export class RunMJWebSearchProviderViewResult {
91616
+ @Field(() => [MJWebSearchProvider_])
91617
+ Results: MJWebSearchProvider_[];
91618
+
91619
+ @Field(() => String, {nullable: true})
91620
+ UserViewRunID?: string;
91621
+
91622
+ @Field(() => Int, {nullable: true})
91623
+ RowCount: number;
91624
+
91625
+ @Field(() => Int, {nullable: true})
91626
+ TotalRowCount: number;
91627
+
91628
+ @Field(() => Int, {nullable: true})
91629
+ ExecutionTime: number;
91630
+
91631
+ @Field({nullable: true})
91632
+ ErrorMessage?: string;
91633
+
91634
+ @Field(() => Boolean, {nullable: false})
91635
+ Success: boolean;
91636
+ }
91637
+
91638
+ @Resolver(MJWebSearchProvider_)
91639
+ export class MJWebSearchProviderResolver extends ResolverBase {
91640
+ @Query(() => RunMJWebSearchProviderViewResult)
91641
+ async RunMJWebSearchProviderViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
91642
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
91643
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
91644
+ }
91645
+
91646
+ @Query(() => RunMJWebSearchProviderViewResult)
91647
+ async RunMJWebSearchProviderViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
91648
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
91649
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
91650
+ }
91651
+
91652
+ @Query(() => RunMJWebSearchProviderViewResult)
91653
+ async RunMJWebSearchProviderDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
91654
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
91655
+ input.EntityName = 'MJ: Web Search Providers';
91656
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
91657
+ }
91658
+ @Query(() => MJWebSearchProvider_, { nullable: true })
91659
+ async MJWebSearchProvider(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJWebSearchProvider_ | null> {
91660
+ this.CheckUserReadPermissions('MJ: Web Search Providers', userPayload);
91661
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
91662
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWebSearchProviders')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Web Search Providers', userPayload, EntityPermissionType.Read, 'AND');
91663
+ const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
91664
+ const result = await this.MapFieldNamesToCodeNames('MJ: Web Search Providers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
91665
+ return result;
91666
+ }
91667
+
91668
+ @Mutation(() => MJWebSearchProvider_)
91669
+ async CreateMJWebSearchProvider(
91670
+ @Arg('input', () => CreateMJWebSearchProviderInput) input: CreateMJWebSearchProviderInput,
91671
+ @Ctx() { providers, userPayload }: AppContext,
91672
+ @PubSub() pubSub: PubSubEngine
91673
+ ) {
91674
+ const provider = GetReadWriteProvider(providers);
91675
+ return this.CreateRecord('MJ: Web Search Providers', input, provider, userPayload, pubSub)
91676
+ }
91677
+
91678
+ @Mutation(() => MJWebSearchProvider_)
91679
+ async UpdateMJWebSearchProvider(
91680
+ @Arg('input', () => UpdateMJWebSearchProviderInput) input: UpdateMJWebSearchProviderInput,
91681
+ @Ctx() { providers, userPayload }: AppContext,
91682
+ @PubSub() pubSub: PubSubEngine
91683
+ ) {
91684
+ const provider = GetReadWriteProvider(providers);
91685
+ return this.UpdateRecord('MJ: Web Search Providers', input, provider, userPayload, pubSub);
91686
+ }
91687
+
91688
+ @Mutation(() => MJWebSearchProvider_)
91689
+ async DeleteMJWebSearchProvider(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
91690
+ const provider = GetReadWriteProvider(providers);
91691
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
91692
+ return this.DeleteRecord('MJ: Web Search Providers', key, options, provider, userPayload, pubSub);
91693
+ }
91694
+
91695
+ }
91696
+
90806
91697
  //****************************************************************************
90807
91698
  // ENTITY CLASS for MJ: Workspace Items
90808
91699
  //****************************************************************************