@memberjunction/server 5.24.0 → 5.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/skip-sdk.d.ts +12 -0
- package/dist/agents/skip-sdk.d.ts.map +1 -1
- package/dist/agents/skip-sdk.js +70 -1
- package/dist/agents/skip-sdk.js.map +1 -1
- package/dist/config.d.ts +70 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +21 -0
- package/dist/config.js.map +1 -1
- package/dist/generated/generated.d.ts +498 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +2755 -0
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/resolvers/ArtifactFileResolver.d.ts +15 -0
- package/dist/resolvers/ArtifactFileResolver.d.ts.map +1 -0
- package/dist/resolvers/ArtifactFileResolver.js +74 -0
- package/dist/resolvers/ArtifactFileResolver.js.map +1 -0
- package/dist/resolvers/AutotagPipelineResolver.d.ts +13 -0
- package/dist/resolvers/AutotagPipelineResolver.d.ts.map +1 -1
- package/dist/resolvers/AutotagPipelineResolver.js +103 -3
- package/dist/resolvers/AutotagPipelineResolver.js.map +1 -1
- package/dist/resolvers/CacheStatsResolver.d.ts +31 -0
- package/dist/resolvers/CacheStatsResolver.d.ts.map +1 -0
- package/dist/resolvers/CacheStatsResolver.js +181 -0
- package/dist/resolvers/CacheStatsResolver.js.map +1 -0
- package/dist/resolvers/FileResolver.d.ts.map +1 -1
- package/dist/resolvers/FileResolver.js +12 -32
- package/dist/resolvers/FileResolver.js.map +1 -1
- package/dist/resolvers/GeoResolver.d.ts +58 -0
- package/dist/resolvers/GeoResolver.d.ts.map +1 -0
- package/dist/resolvers/GeoResolver.js +302 -0
- package/dist/resolvers/GeoResolver.js.map +1 -0
- package/dist/resolvers/RunAIAgentResolver.d.ts +13 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +115 -20
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.d.ts +21 -80
- package/dist/resolvers/SearchKnowledgeResolver.d.ts.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.js +129 -604
- package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -1
- package/dist/resolvers/SearchKnowledgeSystemUserResolver.d.ts +19 -0
- package/dist/resolvers/SearchKnowledgeSystemUserResolver.d.ts.map +1 -0
- package/dist/resolvers/SearchKnowledgeSystemUserResolver.js +149 -0
- package/dist/resolvers/SearchKnowledgeSystemUserResolver.js.map +1 -0
- package/package.json +66 -63
- package/src/__tests__/search-knowledge-tags.test.ts +177 -337
- package/src/__tests__/skip-sdk-organic-keys.test.ts +274 -0
- package/src/agents/skip-sdk.ts +83 -2
- package/src/config.ts +24 -0
- package/src/generated/generated.ts +1902 -1
- package/src/index.ts +18 -2
- package/src/resolvers/ArtifactFileResolver.ts +71 -0
- package/src/resolvers/AutotagPipelineResolver.ts +118 -4
- package/src/resolvers/CacheStatsResolver.ts +142 -0
- package/src/resolvers/FileResolver.ts +12 -41
- package/src/resolvers/GeoResolver.ts +258 -0
- package/src/resolvers/RunAIAgentResolver.ts +137 -23
- package/src/resolvers/SearchKnowledgeResolver.ts +114 -715
- package/src/resolvers/SearchKnowledgeSystemUserResolver.ts +138 -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, 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, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, 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, MJKnowledgeHubSavedSearchEntity, 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, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, 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, MJApplicationRoleEntity, 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, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, 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, 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, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, 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, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSearchProviderEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, 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
|
//****************************************************************************
|
|
@@ -3043,10 +3043,18 @@ export class MJAIAgentCategory_ {
|
|
|
3043
3043
|
@Field()
|
|
3044
3044
|
_mj__UpdatedAt: Date;
|
|
3045
3045
|
|
|
3046
|
+
@Field({nullable: true, description: `Default file storage account for agents in this category. Inherited by child categories that do not define their own value — resolution walks up the ParentID tree until a non-null value is found. Overrides the Type-level default. FK to FileStorageAccount.`})
|
|
3047
|
+
@MaxLength(36)
|
|
3048
|
+
DefaultStorageAccountID?: string;
|
|
3049
|
+
|
|
3046
3050
|
@Field({nullable: true})
|
|
3047
3051
|
@MaxLength(200)
|
|
3048
3052
|
Parent?: string;
|
|
3049
3053
|
|
|
3054
|
+
@Field({nullable: true})
|
|
3055
|
+
@MaxLength(200)
|
|
3056
|
+
DefaultStorageAccount?: string;
|
|
3057
|
+
|
|
3050
3058
|
@Field({nullable: true})
|
|
3051
3059
|
@MaxLength(36)
|
|
3052
3060
|
RootParentID?: string;
|
|
@@ -3081,6 +3089,9 @@ export class CreateMJAIAgentCategoryInput {
|
|
|
3081
3089
|
|
|
3082
3090
|
@Field({ nullable: true })
|
|
3083
3091
|
Status?: string;
|
|
3092
|
+
|
|
3093
|
+
@Field({ nullable: true })
|
|
3094
|
+
DefaultStorageAccountID: string | null;
|
|
3084
3095
|
}
|
|
3085
3096
|
|
|
3086
3097
|
|
|
@@ -3107,6 +3118,9 @@ export class UpdateMJAIAgentCategoryInput {
|
|
|
3107
3118
|
@Field({ nullable: true })
|
|
3108
3119
|
Status?: string;
|
|
3109
3120
|
|
|
3121
|
+
@Field({ nullable: true })
|
|
3122
|
+
DefaultStorageAccountID?: string | null;
|
|
3123
|
+
|
|
3110
3124
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
3111
3125
|
OldValues___?: KeyValuePairInput[];
|
|
3112
3126
|
}
|
|
@@ -8424,10 +8438,18 @@ export class MJAIAgentType_ {
|
|
|
8424
8438
|
@Field({nullable: true, description: `JSON-serialized AgentRequestAssignmentStrategy defining the default assignment strategy for all agents of this type. Overridden by per-invocation or category-level strategies in the resolution chain.`})
|
|
8425
8439
|
AssignmentStrategy?: string;
|
|
8426
8440
|
|
|
8441
|
+
@Field({nullable: true, description: `Default file storage account for agents of this type. Lowest priority in the resolution chain (Type → Category tree → Agent → Runtime override). When set, all agents of this type use this storage account unless overridden at a more specific level. FK to FileStorageAccount.`})
|
|
8442
|
+
@MaxLength(36)
|
|
8443
|
+
DefaultStorageAccountID?: string;
|
|
8444
|
+
|
|
8427
8445
|
@Field({nullable: true})
|
|
8428
8446
|
@MaxLength(255)
|
|
8429
8447
|
SystemPrompt?: string;
|
|
8430
8448
|
|
|
8449
|
+
@Field({nullable: true})
|
|
8450
|
+
@MaxLength(200)
|
|
8451
|
+
DefaultStorageAccount?: string;
|
|
8452
|
+
|
|
8431
8453
|
@Field(() => [MJAIAgent_])
|
|
8432
8454
|
MJAIAgents_TypeIDArray: MJAIAgent_[]; // Link to MJAIAgents
|
|
8433
8455
|
|
|
@@ -8473,6 +8495,9 @@ export class CreateMJAIAgentTypeInput {
|
|
|
8473
8495
|
|
|
8474
8496
|
@Field({ nullable: true })
|
|
8475
8497
|
AssignmentStrategy: string | null;
|
|
8498
|
+
|
|
8499
|
+
@Field({ nullable: true })
|
|
8500
|
+
DefaultStorageAccountID: string | null;
|
|
8476
8501
|
}
|
|
8477
8502
|
|
|
8478
8503
|
|
|
@@ -8517,6 +8542,9 @@ export class UpdateMJAIAgentTypeInput {
|
|
|
8517
8542
|
@Field({ nullable: true })
|
|
8518
8543
|
AssignmentStrategy?: string | null;
|
|
8519
8544
|
|
|
8545
|
+
@Field({ nullable: true })
|
|
8546
|
+
DefaultStorageAccountID?: string | null;
|
|
8547
|
+
|
|
8520
8548
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
8521
8549
|
OldValues___?: KeyValuePairInput[];
|
|
8522
8550
|
}
|
|
@@ -8842,6 +8870,10 @@ if this limit is exceeded.`})
|
|
|
8842
8870
|
@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
8871
|
AllowEphemeralClientTools: boolean;
|
|
8844
8872
|
|
|
8873
|
+
@Field({nullable: true, description: `Default file storage account for this specific agent. Overrides both Type-level and Category-level defaults. Can be further overridden at runtime via ExecuteAgentParams.override.storageAccountId. FK to FileStorageAccount.`})
|
|
8874
|
+
@MaxLength(36)
|
|
8875
|
+
DefaultStorageAccountID?: string;
|
|
8876
|
+
|
|
8845
8877
|
@Field({nullable: true})
|
|
8846
8878
|
@MaxLength(255)
|
|
8847
8879
|
Parent?: string;
|
|
@@ -8870,6 +8902,10 @@ if this limit is exceeded.`})
|
|
|
8870
8902
|
@MaxLength(200)
|
|
8871
8903
|
Category?: string;
|
|
8872
8904
|
|
|
8905
|
+
@Field({nullable: true})
|
|
8906
|
+
@MaxLength(200)
|
|
8907
|
+
DefaultStorageAccount?: string;
|
|
8908
|
+
|
|
8873
8909
|
@Field({nullable: true})
|
|
8874
8910
|
@MaxLength(36)
|
|
8875
8911
|
RootParentID?: string;
|
|
@@ -9132,6 +9168,9 @@ export class CreateMJAIAgentInput {
|
|
|
9132
9168
|
|
|
9133
9169
|
@Field(() => Boolean, { nullable: true })
|
|
9134
9170
|
AllowEphemeralClientTools?: boolean;
|
|
9171
|
+
|
|
9172
|
+
@Field({ nullable: true })
|
|
9173
|
+
DefaultStorageAccountID: string | null;
|
|
9135
9174
|
}
|
|
9136
9175
|
|
|
9137
9176
|
|
|
@@ -9323,6 +9362,9 @@ export class UpdateMJAIAgentInput {
|
|
|
9323
9362
|
@Field(() => Boolean, { nullable: true })
|
|
9324
9363
|
AllowEphemeralClientTools?: boolean;
|
|
9325
9364
|
|
|
9365
|
+
@Field({ nullable: true })
|
|
9366
|
+
DefaultStorageAccountID?: string | null;
|
|
9367
|
+
|
|
9326
9368
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
9327
9369
|
OldValues___?: KeyValuePairInput[];
|
|
9328
9370
|
}
|
|
@@ -18654,6 +18696,177 @@ export class MJApplicationEntityResolver extends ResolverBase {
|
|
|
18654
18696
|
|
|
18655
18697
|
}
|
|
18656
18698
|
|
|
18699
|
+
//****************************************************************************
|
|
18700
|
+
// ENTITY CLASS for MJ: Application Roles
|
|
18701
|
+
//****************************************************************************
|
|
18702
|
+
@ObjectType({ description: `Controls which roles can access and administer specific applications. When no ApplicationRole records exist for an application, all roles can access it (open access). When at least one record exists, only roles with CanAccess=1 are permitted.` })
|
|
18703
|
+
export class MJApplicationRole_ {
|
|
18704
|
+
@Field()
|
|
18705
|
+
@MaxLength(36)
|
|
18706
|
+
ID: string;
|
|
18707
|
+
|
|
18708
|
+
@Field({description: `Foreign key to the Application this role grant applies to`})
|
|
18709
|
+
@MaxLength(36)
|
|
18710
|
+
ApplicationID: string;
|
|
18711
|
+
|
|
18712
|
+
@Field({description: `Foreign key to the Role being granted or denied access`})
|
|
18713
|
+
@MaxLength(36)
|
|
18714
|
+
RoleID: string;
|
|
18715
|
+
|
|
18716
|
+
@Field(() => Boolean, {description: `When true, users in this role can access the application. When false, this record acts as an explicit deny for the role.`})
|
|
18717
|
+
CanAccess: boolean;
|
|
18718
|
+
|
|
18719
|
+
@Field(() => Boolean, {description: `When true, users in this role can modify application settings, manage nav items, and configure the application.`})
|
|
18720
|
+
CanAdmin: boolean;
|
|
18721
|
+
|
|
18722
|
+
@Field()
|
|
18723
|
+
_mj__CreatedAt: Date;
|
|
18724
|
+
|
|
18725
|
+
@Field()
|
|
18726
|
+
_mj__UpdatedAt: Date;
|
|
18727
|
+
|
|
18728
|
+
@Field()
|
|
18729
|
+
@MaxLength(100)
|
|
18730
|
+
Application: string;
|
|
18731
|
+
|
|
18732
|
+
@Field()
|
|
18733
|
+
@MaxLength(50)
|
|
18734
|
+
Role: string;
|
|
18735
|
+
|
|
18736
|
+
}
|
|
18737
|
+
|
|
18738
|
+
//****************************************************************************
|
|
18739
|
+
// INPUT TYPE for MJ: Application Roles
|
|
18740
|
+
//****************************************************************************
|
|
18741
|
+
@InputType()
|
|
18742
|
+
export class CreateMJApplicationRoleInput {
|
|
18743
|
+
@Field({ nullable: true })
|
|
18744
|
+
ID?: string;
|
|
18745
|
+
|
|
18746
|
+
@Field({ nullable: true })
|
|
18747
|
+
ApplicationID?: string;
|
|
18748
|
+
|
|
18749
|
+
@Field({ nullable: true })
|
|
18750
|
+
RoleID?: string;
|
|
18751
|
+
|
|
18752
|
+
@Field(() => Boolean, { nullable: true })
|
|
18753
|
+
CanAccess?: boolean;
|
|
18754
|
+
|
|
18755
|
+
@Field(() => Boolean, { nullable: true })
|
|
18756
|
+
CanAdmin?: boolean;
|
|
18757
|
+
}
|
|
18758
|
+
|
|
18759
|
+
|
|
18760
|
+
//****************************************************************************
|
|
18761
|
+
// INPUT TYPE for MJ: Application Roles
|
|
18762
|
+
//****************************************************************************
|
|
18763
|
+
@InputType()
|
|
18764
|
+
export class UpdateMJApplicationRoleInput {
|
|
18765
|
+
@Field()
|
|
18766
|
+
ID: string;
|
|
18767
|
+
|
|
18768
|
+
@Field({ nullable: true })
|
|
18769
|
+
ApplicationID?: string;
|
|
18770
|
+
|
|
18771
|
+
@Field({ nullable: true })
|
|
18772
|
+
RoleID?: string;
|
|
18773
|
+
|
|
18774
|
+
@Field(() => Boolean, { nullable: true })
|
|
18775
|
+
CanAccess?: boolean;
|
|
18776
|
+
|
|
18777
|
+
@Field(() => Boolean, { nullable: true })
|
|
18778
|
+
CanAdmin?: boolean;
|
|
18779
|
+
|
|
18780
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
18781
|
+
OldValues___?: KeyValuePairInput[];
|
|
18782
|
+
}
|
|
18783
|
+
|
|
18784
|
+
//****************************************************************************
|
|
18785
|
+
// RESOLVER for MJ: Application Roles
|
|
18786
|
+
//****************************************************************************
|
|
18787
|
+
@ObjectType()
|
|
18788
|
+
export class RunMJApplicationRoleViewResult {
|
|
18789
|
+
@Field(() => [MJApplicationRole_])
|
|
18790
|
+
Results: MJApplicationRole_[];
|
|
18791
|
+
|
|
18792
|
+
@Field(() => String, {nullable: true})
|
|
18793
|
+
UserViewRunID?: string;
|
|
18794
|
+
|
|
18795
|
+
@Field(() => Int, {nullable: true})
|
|
18796
|
+
RowCount: number;
|
|
18797
|
+
|
|
18798
|
+
@Field(() => Int, {nullable: true})
|
|
18799
|
+
TotalRowCount: number;
|
|
18800
|
+
|
|
18801
|
+
@Field(() => Int, {nullable: true})
|
|
18802
|
+
ExecutionTime: number;
|
|
18803
|
+
|
|
18804
|
+
@Field({nullable: true})
|
|
18805
|
+
ErrorMessage?: string;
|
|
18806
|
+
|
|
18807
|
+
@Field(() => Boolean, {nullable: false})
|
|
18808
|
+
Success: boolean;
|
|
18809
|
+
}
|
|
18810
|
+
|
|
18811
|
+
@Resolver(MJApplicationRole_)
|
|
18812
|
+
export class MJApplicationRoleResolver extends ResolverBase {
|
|
18813
|
+
@Query(() => RunMJApplicationRoleViewResult)
|
|
18814
|
+
async RunMJApplicationRoleViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
18815
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18816
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
18817
|
+
}
|
|
18818
|
+
|
|
18819
|
+
@Query(() => RunMJApplicationRoleViewResult)
|
|
18820
|
+
async RunMJApplicationRoleViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
18821
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18822
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
18823
|
+
}
|
|
18824
|
+
|
|
18825
|
+
@Query(() => RunMJApplicationRoleViewResult)
|
|
18826
|
+
async RunMJApplicationRoleDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
18827
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18828
|
+
input.EntityName = 'MJ: Application Roles';
|
|
18829
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
18830
|
+
}
|
|
18831
|
+
@Query(() => MJApplicationRole_, { nullable: true })
|
|
18832
|
+
async MJApplicationRole(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJApplicationRole_ | null> {
|
|
18833
|
+
this.CheckUserReadPermissions('MJ: Application Roles', userPayload);
|
|
18834
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18835
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplicationRoles')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Application Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
18836
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
18837
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Application Roles', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
18838
|
+
return result;
|
|
18839
|
+
}
|
|
18840
|
+
|
|
18841
|
+
@Mutation(() => MJApplicationRole_)
|
|
18842
|
+
async CreateMJApplicationRole(
|
|
18843
|
+
@Arg('input', () => CreateMJApplicationRoleInput) input: CreateMJApplicationRoleInput,
|
|
18844
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
18845
|
+
@PubSub() pubSub: PubSubEngine
|
|
18846
|
+
) {
|
|
18847
|
+
const provider = GetReadWriteProvider(providers);
|
|
18848
|
+
return this.CreateRecord('MJ: Application Roles', input, provider, userPayload, pubSub)
|
|
18849
|
+
}
|
|
18850
|
+
|
|
18851
|
+
@Mutation(() => MJApplicationRole_)
|
|
18852
|
+
async UpdateMJApplicationRole(
|
|
18853
|
+
@Arg('input', () => UpdateMJApplicationRoleInput) input: UpdateMJApplicationRoleInput,
|
|
18854
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
18855
|
+
@PubSub() pubSub: PubSubEngine
|
|
18856
|
+
) {
|
|
18857
|
+
const provider = GetReadWriteProvider(providers);
|
|
18858
|
+
return this.UpdateRecord('MJ: Application Roles', input, provider, userPayload, pubSub);
|
|
18859
|
+
}
|
|
18860
|
+
|
|
18861
|
+
@Mutation(() => MJApplicationRole_)
|
|
18862
|
+
async DeleteMJApplicationRole(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
18863
|
+
const provider = GetReadWriteProvider(providers);
|
|
18864
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
18865
|
+
return this.DeleteRecord('MJ: Application Roles', key, options, provider, userPayload, pubSub);
|
|
18866
|
+
}
|
|
18867
|
+
|
|
18868
|
+
}
|
|
18869
|
+
|
|
18657
18870
|
//****************************************************************************
|
|
18658
18871
|
// ENTITY CLASS for MJ: Application Settings
|
|
18659
18872
|
//****************************************************************************
|
|
@@ -18904,6 +19117,9 @@ export class MJApplication_ {
|
|
|
18904
19117
|
@Field(() => [MJDashboardUserPreference_])
|
|
18905
19118
|
MJDashboardUserPreferences_ApplicationIDArray: MJDashboardUserPreference_[]; // Link to MJDashboardUserPreferences
|
|
18906
19119
|
|
|
19120
|
+
@Field(() => [MJApplicationRole_])
|
|
19121
|
+
MJApplicationRoles_ApplicationIDArray: MJApplicationRole_[]; // Link to MJApplicationRoles
|
|
19122
|
+
|
|
18907
19123
|
}
|
|
18908
19124
|
|
|
18909
19125
|
//****************************************************************************
|
|
@@ -19135,6 +19351,16 @@ export class MJApplicationResolver extends ResolverBase {
|
|
|
19135
19351
|
return result;
|
|
19136
19352
|
}
|
|
19137
19353
|
|
|
19354
|
+
@FieldResolver(() => [MJApplicationRole_])
|
|
19355
|
+
async MJApplicationRoles_ApplicationIDArray(@Root() mjapplication_: MJApplication_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
19356
|
+
this.CheckUserReadPermissions('MJ: Application Roles', userPayload);
|
|
19357
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19358
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplicationRoles')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Application Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
19359
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
19360
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Application Roles', rows, this.GetUserFromPayload(userPayload));
|
|
19361
|
+
return result;
|
|
19362
|
+
}
|
|
19363
|
+
|
|
19138
19364
|
@Mutation(() => MJApplication_)
|
|
19139
19365
|
async CreateMJApplication(
|
|
19140
19366
|
@Arg('input', () => CreateMJApplicationInput) input: CreateMJApplicationInput,
|
|
@@ -19411,6 +19637,10 @@ export class MJArtifactType_ {
|
|
|
19411
19637
|
@MaxLength(255)
|
|
19412
19638
|
Icon?: string;
|
|
19413
19639
|
|
|
19640
|
+
@Field({description: `Classifies whether this artifact type stores text content ('Text', the default for all existing types) or a binary file in MJStorage ('File'). Used by AgentRunner and viewer components to route file-based artifacts correctly.`})
|
|
19641
|
+
@MaxLength(10)
|
|
19642
|
+
ContentCategory: string;
|
|
19643
|
+
|
|
19414
19644
|
@Field({nullable: true})
|
|
19415
19645
|
@MaxLength(100)
|
|
19416
19646
|
Parent?: string;
|
|
@@ -19467,6 +19697,9 @@ export class CreateMJArtifactTypeInput {
|
|
|
19467
19697
|
|
|
19468
19698
|
@Field({ nullable: true })
|
|
19469
19699
|
Icon: string | null;
|
|
19700
|
+
|
|
19701
|
+
@Field({ nullable: true })
|
|
19702
|
+
ContentCategory?: string;
|
|
19470
19703
|
}
|
|
19471
19704
|
|
|
19472
19705
|
|
|
@@ -19502,6 +19735,9 @@ export class UpdateMJArtifactTypeInput {
|
|
|
19502
19735
|
@Field({ nullable: true })
|
|
19503
19736
|
Icon?: string | null;
|
|
19504
19737
|
|
|
19738
|
+
@Field({ nullable: true })
|
|
19739
|
+
ContentCategory?: string;
|
|
19740
|
+
|
|
19505
19741
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
19506
19742
|
OldValues___?: KeyValuePairInput[];
|
|
19507
19743
|
}
|
|
@@ -20038,6 +20274,25 @@ export class MJArtifactVersion_ {
|
|
|
20038
20274
|
@Field({nullable: true, description: `Description of this artifact version. Can differ from Artifact.Description as it may evolve with versions.`})
|
|
20039
20275
|
Description?: string;
|
|
20040
20276
|
|
|
20277
|
+
@Field({nullable: true, description: `Foreign key to the MJ: Files entity. When ContentMode is 'File', this references the binary file stored in MJStorage. NULL when ContentMode is 'Text'.`})
|
|
20278
|
+
@MaxLength(36)
|
|
20279
|
+
FileID?: string;
|
|
20280
|
+
|
|
20281
|
+
@Field({description: `Determines how artifact content is stored. 'Text' (default) means the Content column holds the data. 'File' means FileID references a binary file in MJStorage and Content is unused.`})
|
|
20282
|
+
@MaxLength(10)
|
|
20283
|
+
ContentMode: string;
|
|
20284
|
+
|
|
20285
|
+
@Field({nullable: true, description: `MIME type of the stored file (e.g. application/pdf). Denormalized from the File entity for display without joins. Only populated when ContentMode is 'File'.`})
|
|
20286
|
+
@MaxLength(200)
|
|
20287
|
+
MimeType?: string;
|
|
20288
|
+
|
|
20289
|
+
@Field({nullable: true, description: `Original filename of the stored file (e.g. report.pdf). Denormalized from the File entity for display without joins. Only populated when ContentMode is 'File'.`})
|
|
20290
|
+
@MaxLength(500)
|
|
20291
|
+
FileName?: string;
|
|
20292
|
+
|
|
20293
|
+
@Field(() => Int, {nullable: true, description: `Size of the stored file in bytes. Denormalized for display without loading the file. Only populated when ContentMode is 'File'.`})
|
|
20294
|
+
ContentSizeBytes?: number;
|
|
20295
|
+
|
|
20041
20296
|
@Field()
|
|
20042
20297
|
@MaxLength(255)
|
|
20043
20298
|
Artifact: string;
|
|
@@ -20046,6 +20301,10 @@ export class MJArtifactVersion_ {
|
|
|
20046
20301
|
@MaxLength(100)
|
|
20047
20302
|
User: string;
|
|
20048
20303
|
|
|
20304
|
+
@Field({nullable: true})
|
|
20305
|
+
@MaxLength(500)
|
|
20306
|
+
File?: string;
|
|
20307
|
+
|
|
20049
20308
|
@Field(() => [MJArtifactVersionAttribute_])
|
|
20050
20309
|
MJArtifactVersionAttributes_ArtifactVersionIDArray: MJArtifactVersionAttribute_[]; // Link to MJArtifactVersionAttributes
|
|
20051
20310
|
|
|
@@ -20094,6 +20353,21 @@ export class CreateMJArtifactVersionInput {
|
|
|
20094
20353
|
|
|
20095
20354
|
@Field({ nullable: true })
|
|
20096
20355
|
Description: string | null;
|
|
20356
|
+
|
|
20357
|
+
@Field({ nullable: true })
|
|
20358
|
+
FileID: string | null;
|
|
20359
|
+
|
|
20360
|
+
@Field({ nullable: true })
|
|
20361
|
+
ContentMode?: string;
|
|
20362
|
+
|
|
20363
|
+
@Field({ nullable: true })
|
|
20364
|
+
MimeType: string | null;
|
|
20365
|
+
|
|
20366
|
+
@Field({ nullable: true })
|
|
20367
|
+
FileName: string | null;
|
|
20368
|
+
|
|
20369
|
+
@Field(() => Int, { nullable: true })
|
|
20370
|
+
ContentSizeBytes: number | null;
|
|
20097
20371
|
}
|
|
20098
20372
|
|
|
20099
20373
|
|
|
@@ -20132,6 +20406,21 @@ export class UpdateMJArtifactVersionInput {
|
|
|
20132
20406
|
@Field({ nullable: true })
|
|
20133
20407
|
Description?: string | null;
|
|
20134
20408
|
|
|
20409
|
+
@Field({ nullable: true })
|
|
20410
|
+
FileID?: string | null;
|
|
20411
|
+
|
|
20412
|
+
@Field({ nullable: true })
|
|
20413
|
+
ContentMode?: string;
|
|
20414
|
+
|
|
20415
|
+
@Field({ nullable: true })
|
|
20416
|
+
MimeType?: string | null;
|
|
20417
|
+
|
|
20418
|
+
@Field({ nullable: true })
|
|
20419
|
+
FileName?: string | null;
|
|
20420
|
+
|
|
20421
|
+
@Field(() => Int, { nullable: true })
|
|
20422
|
+
ContentSizeBytes?: number | null;
|
|
20423
|
+
|
|
20135
20424
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
20136
20425
|
OldValues___?: KeyValuePairInput[];
|
|
20137
20426
|
}
|
|
@@ -31508,6 +31797,232 @@ export class MJConversationResolver extends ResolverBase {
|
|
|
31508
31797
|
|
|
31509
31798
|
}
|
|
31510
31799
|
|
|
31800
|
+
//****************************************************************************
|
|
31801
|
+
// ENTITY CLASS for MJ: Countries
|
|
31802
|
+
//****************************************************************************
|
|
31803
|
+
@ObjectType({ description: `Reference table for countries with ISO 3166-1 codes, geographic centroids, and optional medium-resolution boundary GeoJSON for choropleth rendering. Seeded with ~250 countries.` })
|
|
31804
|
+
export class MJCountry_ {
|
|
31805
|
+
@Field()
|
|
31806
|
+
@MaxLength(36)
|
|
31807
|
+
ID: string;
|
|
31808
|
+
|
|
31809
|
+
@Field({description: `Full country name (e.g., "United States", "Canada").`})
|
|
31810
|
+
@MaxLength(200)
|
|
31811
|
+
Name: string;
|
|
31812
|
+
|
|
31813
|
+
@Field({description: `ISO 3166-1 alpha-2 code (e.g., "US", "CA"). Unique business key for lookups.`})
|
|
31814
|
+
@MaxLength(2)
|
|
31815
|
+
ISO2: string;
|
|
31816
|
+
|
|
31817
|
+
@Field({description: `ISO 3166-1 alpha-3 code (e.g., "USA", "CAN"). Unique business key for lookups.`})
|
|
31818
|
+
@MaxLength(3)
|
|
31819
|
+
ISO3: string;
|
|
31820
|
+
|
|
31821
|
+
@Field(() => Int, {nullable: true, description: `ISO 3166-1 numeric code (e.g., 840 for US, 124 for Canada).`})
|
|
31822
|
+
NumericCode?: number;
|
|
31823
|
+
|
|
31824
|
+
@Field(() => Float, {nullable: true, description: `Geographic centroid latitude. Used as fallback point for country-level geocoding.`})
|
|
31825
|
+
Latitude?: number;
|
|
31826
|
+
|
|
31827
|
+
@Field(() => Float, {nullable: true, description: `Geographic centroid longitude. Used as fallback point for country-level geocoding.`})
|
|
31828
|
+
Longitude?: number;
|
|
31829
|
+
|
|
31830
|
+
@Field({nullable: true, description: `Medium-resolution (~50m) GeoJSON boundary polygon for choropleth map rendering. Nullable — point map falls back to centroid if absent. Total ~3MB for all countries.`})
|
|
31831
|
+
BoundaryGeoJSON?: string;
|
|
31832
|
+
|
|
31833
|
+
@Field({nullable: true, description: `JSON array of common aliases and alternate names (e.g., ["United States","USA","U.S.","America"]). Used by GeoResolver for fuzzy text-to-country matching.`})
|
|
31834
|
+
CommonAliases?: string;
|
|
31835
|
+
|
|
31836
|
+
@Field()
|
|
31837
|
+
_mj__CreatedAt: Date;
|
|
31838
|
+
|
|
31839
|
+
@Field()
|
|
31840
|
+
_mj__UpdatedAt: Date;
|
|
31841
|
+
|
|
31842
|
+
@Field(() => [MJStateProvince_])
|
|
31843
|
+
MJStateProvinces_CountryIDArray: MJStateProvince_[]; // Link to MJStateProvinces
|
|
31844
|
+
|
|
31845
|
+
@Field(() => [MJRecordGeoCode_])
|
|
31846
|
+
MJRecordGeoCodes_CountryIDArray: MJRecordGeoCode_[]; // Link to MJRecordGeoCodes
|
|
31847
|
+
|
|
31848
|
+
}
|
|
31849
|
+
|
|
31850
|
+
//****************************************************************************
|
|
31851
|
+
// INPUT TYPE for MJ: Countries
|
|
31852
|
+
//****************************************************************************
|
|
31853
|
+
@InputType()
|
|
31854
|
+
export class CreateMJCountryInput {
|
|
31855
|
+
@Field({ nullable: true })
|
|
31856
|
+
ID?: string;
|
|
31857
|
+
|
|
31858
|
+
@Field({ nullable: true })
|
|
31859
|
+
Name?: string;
|
|
31860
|
+
|
|
31861
|
+
@Field({ nullable: true })
|
|
31862
|
+
ISO2?: string;
|
|
31863
|
+
|
|
31864
|
+
@Field({ nullable: true })
|
|
31865
|
+
ISO3?: string;
|
|
31866
|
+
|
|
31867
|
+
@Field(() => Int, { nullable: true })
|
|
31868
|
+
NumericCode: number | null;
|
|
31869
|
+
|
|
31870
|
+
@Field(() => Float, { nullable: true })
|
|
31871
|
+
Latitude: number | null;
|
|
31872
|
+
|
|
31873
|
+
@Field(() => Float, { nullable: true })
|
|
31874
|
+
Longitude: number | null;
|
|
31875
|
+
|
|
31876
|
+
@Field({ nullable: true })
|
|
31877
|
+
BoundaryGeoJSON: string | null;
|
|
31878
|
+
|
|
31879
|
+
@Field({ nullable: true })
|
|
31880
|
+
CommonAliases: string | null;
|
|
31881
|
+
}
|
|
31882
|
+
|
|
31883
|
+
|
|
31884
|
+
//****************************************************************************
|
|
31885
|
+
// INPUT TYPE for MJ: Countries
|
|
31886
|
+
//****************************************************************************
|
|
31887
|
+
@InputType()
|
|
31888
|
+
export class UpdateMJCountryInput {
|
|
31889
|
+
@Field()
|
|
31890
|
+
ID: string;
|
|
31891
|
+
|
|
31892
|
+
@Field({ nullable: true })
|
|
31893
|
+
Name?: string;
|
|
31894
|
+
|
|
31895
|
+
@Field({ nullable: true })
|
|
31896
|
+
ISO2?: string;
|
|
31897
|
+
|
|
31898
|
+
@Field({ nullable: true })
|
|
31899
|
+
ISO3?: string;
|
|
31900
|
+
|
|
31901
|
+
@Field(() => Int, { nullable: true })
|
|
31902
|
+
NumericCode?: number | null;
|
|
31903
|
+
|
|
31904
|
+
@Field(() => Float, { nullable: true })
|
|
31905
|
+
Latitude?: number | null;
|
|
31906
|
+
|
|
31907
|
+
@Field(() => Float, { nullable: true })
|
|
31908
|
+
Longitude?: number | null;
|
|
31909
|
+
|
|
31910
|
+
@Field({ nullable: true })
|
|
31911
|
+
BoundaryGeoJSON?: string | null;
|
|
31912
|
+
|
|
31913
|
+
@Field({ nullable: true })
|
|
31914
|
+
CommonAliases?: string | null;
|
|
31915
|
+
|
|
31916
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
31917
|
+
OldValues___?: KeyValuePairInput[];
|
|
31918
|
+
}
|
|
31919
|
+
|
|
31920
|
+
//****************************************************************************
|
|
31921
|
+
// RESOLVER for MJ: Countries
|
|
31922
|
+
//****************************************************************************
|
|
31923
|
+
@ObjectType()
|
|
31924
|
+
export class RunMJCountryViewResult {
|
|
31925
|
+
@Field(() => [MJCountry_])
|
|
31926
|
+
Results: MJCountry_[];
|
|
31927
|
+
|
|
31928
|
+
@Field(() => String, {nullable: true})
|
|
31929
|
+
UserViewRunID?: string;
|
|
31930
|
+
|
|
31931
|
+
@Field(() => Int, {nullable: true})
|
|
31932
|
+
RowCount: number;
|
|
31933
|
+
|
|
31934
|
+
@Field(() => Int, {nullable: true})
|
|
31935
|
+
TotalRowCount: number;
|
|
31936
|
+
|
|
31937
|
+
@Field(() => Int, {nullable: true})
|
|
31938
|
+
ExecutionTime: number;
|
|
31939
|
+
|
|
31940
|
+
@Field({nullable: true})
|
|
31941
|
+
ErrorMessage?: string;
|
|
31942
|
+
|
|
31943
|
+
@Field(() => Boolean, {nullable: false})
|
|
31944
|
+
Success: boolean;
|
|
31945
|
+
}
|
|
31946
|
+
|
|
31947
|
+
@Resolver(MJCountry_)
|
|
31948
|
+
export class MJCountryResolver extends ResolverBase {
|
|
31949
|
+
@Query(() => RunMJCountryViewResult)
|
|
31950
|
+
async RunMJCountryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31951
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31952
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
31953
|
+
}
|
|
31954
|
+
|
|
31955
|
+
@Query(() => RunMJCountryViewResult)
|
|
31956
|
+
async RunMJCountryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31957
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31958
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
31959
|
+
}
|
|
31960
|
+
|
|
31961
|
+
@Query(() => RunMJCountryViewResult)
|
|
31962
|
+
async RunMJCountryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31963
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31964
|
+
input.EntityName = 'MJ: Countries';
|
|
31965
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
31966
|
+
}
|
|
31967
|
+
@Query(() => MJCountry_, { nullable: true })
|
|
31968
|
+
async MJCountry(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJCountry_ | null> {
|
|
31969
|
+
this.CheckUserReadPermissions('MJ: Countries', userPayload);
|
|
31970
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31971
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwCountries')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Countries', userPayload, EntityPermissionType.Read, 'AND');
|
|
31972
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
31973
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Countries', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
31974
|
+
return result;
|
|
31975
|
+
}
|
|
31976
|
+
|
|
31977
|
+
@FieldResolver(() => [MJStateProvince_])
|
|
31978
|
+
async MJStateProvinces_CountryIDArray(@Root() mjcountry_: MJCountry_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31979
|
+
this.CheckUserReadPermissions('MJ: State Provinces', userPayload);
|
|
31980
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31981
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwStateProvinces')} WHERE ${provider.QuoteIdentifier('CountryID')}='${mjcountry_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: State Provinces', userPayload, EntityPermissionType.Read, 'AND');
|
|
31982
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
31983
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: State Provinces', rows, this.GetUserFromPayload(userPayload));
|
|
31984
|
+
return result;
|
|
31985
|
+
}
|
|
31986
|
+
|
|
31987
|
+
@FieldResolver(() => [MJRecordGeoCode_])
|
|
31988
|
+
async MJRecordGeoCodes_CountryIDArray(@Root() mjcountry_: MJCountry_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31989
|
+
this.CheckUserReadPermissions('MJ: Record Geo Codes', userPayload);
|
|
31990
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31991
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordGeoCodes')} WHERE ${provider.QuoteIdentifier('CountryID')}='${mjcountry_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Geo Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
31992
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
31993
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Geo Codes', rows, this.GetUserFromPayload(userPayload));
|
|
31994
|
+
return result;
|
|
31995
|
+
}
|
|
31996
|
+
|
|
31997
|
+
@Mutation(() => MJCountry_)
|
|
31998
|
+
async CreateMJCountry(
|
|
31999
|
+
@Arg('input', () => CreateMJCountryInput) input: CreateMJCountryInput,
|
|
32000
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
32001
|
+
@PubSub() pubSub: PubSubEngine
|
|
32002
|
+
) {
|
|
32003
|
+
const provider = GetReadWriteProvider(providers);
|
|
32004
|
+
return this.CreateRecord('MJ: Countries', input, provider, userPayload, pubSub)
|
|
32005
|
+
}
|
|
32006
|
+
|
|
32007
|
+
@Mutation(() => MJCountry_)
|
|
32008
|
+
async UpdateMJCountry(
|
|
32009
|
+
@Arg('input', () => UpdateMJCountryInput) input: UpdateMJCountryInput,
|
|
32010
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
32011
|
+
@PubSub() pubSub: PubSubEngine
|
|
32012
|
+
) {
|
|
32013
|
+
const provider = GetReadWriteProvider(providers);
|
|
32014
|
+
return this.UpdateRecord('MJ: Countries', input, provider, userPayload, pubSub);
|
|
32015
|
+
}
|
|
32016
|
+
|
|
32017
|
+
@Mutation(() => MJCountry_)
|
|
32018
|
+
async DeleteMJCountry(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32019
|
+
const provider = GetReadWriteProvider(providers);
|
|
32020
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
32021
|
+
return this.DeleteRecord('MJ: Countries', key, options, provider, userPayload, pubSub);
|
|
32022
|
+
}
|
|
32023
|
+
|
|
32024
|
+
}
|
|
32025
|
+
|
|
31511
32026
|
//****************************************************************************
|
|
31512
32027
|
// ENTITY CLASS for MJ: Credential Categories
|
|
31513
32028
|
//****************************************************************************
|
|
@@ -32004,12 +32519,18 @@ export class MJCredential_ {
|
|
|
32004
32519
|
@Field(() => [MJOAuthToken_])
|
|
32005
32520
|
MJOAuthTokens_CredentialIDArray: MJOAuthToken_[]; // Link to MJOAuthTokens
|
|
32006
32521
|
|
|
32522
|
+
@Field(() => [MJSearchProvider_])
|
|
32523
|
+
MJSearchProviders_CredentialIDArray: MJSearchProvider_[]; // Link to MJSearchProviders
|
|
32524
|
+
|
|
32007
32525
|
@Field(() => [MJFileStorageAccount_])
|
|
32008
32526
|
MJFileStorageAccounts_CredentialIDArray: MJFileStorageAccount_[]; // Link to MJFileStorageAccounts
|
|
32009
32527
|
|
|
32010
32528
|
@Field(() => [MJMCPServerConnection_])
|
|
32011
32529
|
MJMCPServerConnections_CredentialIDArray: MJMCPServerConnection_[]; // Link to MJMCPServerConnections
|
|
32012
32530
|
|
|
32531
|
+
@Field(() => [MJVectorDatabase_])
|
|
32532
|
+
MJVectorDatabases_CredentialIDArray: MJVectorDatabase_[]; // Link to MJVectorDatabases
|
|
32533
|
+
|
|
32013
32534
|
@Field(() => [MJAICredentialBinding_])
|
|
32014
32535
|
MJAICredentialBindings_CredentialIDArray: MJAICredentialBinding_[]; // Link to MJAICredentialBindings
|
|
32015
32536
|
|
|
@@ -32173,6 +32694,16 @@ export class MJCredentialResolver extends ResolverBase {
|
|
|
32173
32694
|
return result;
|
|
32174
32695
|
}
|
|
32175
32696
|
|
|
32697
|
+
@FieldResolver(() => [MJSearchProvider_])
|
|
32698
|
+
async MJSearchProviders_CredentialIDArray(@Root() mjcredential_: MJCredential_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32699
|
+
this.CheckUserReadPermissions('MJ: Search Providers', userPayload);
|
|
32700
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
32701
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchProviders')} WHERE ${provider.QuoteIdentifier('CredentialID')}='${mjcredential_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Providers', userPayload, EntityPermissionType.Read, 'AND');
|
|
32702
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
32703
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Providers', rows, this.GetUserFromPayload(userPayload));
|
|
32704
|
+
return result;
|
|
32705
|
+
}
|
|
32706
|
+
|
|
32176
32707
|
@FieldResolver(() => [MJFileStorageAccount_])
|
|
32177
32708
|
async MJFileStorageAccounts_CredentialIDArray(@Root() mjcredential_: MJCredential_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32178
32709
|
this.CheckUserReadPermissions('MJ: File Storage Accounts', userPayload);
|
|
@@ -32193,6 +32724,16 @@ export class MJCredentialResolver extends ResolverBase {
|
|
|
32193
32724
|
return result;
|
|
32194
32725
|
}
|
|
32195
32726
|
|
|
32727
|
+
@FieldResolver(() => [MJVectorDatabase_])
|
|
32728
|
+
async MJVectorDatabases_CredentialIDArray(@Root() mjcredential_: MJCredential_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32729
|
+
this.CheckUserReadPermissions('MJ: Vector Databases', userPayload);
|
|
32730
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
32731
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwVectorDatabases')} WHERE ${provider.QuoteIdentifier('CredentialID')}='${mjcredential_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Vector Databases', userPayload, EntityPermissionType.Read, 'AND');
|
|
32732
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
32733
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Vector Databases', rows, this.GetUserFromPayload(userPayload));
|
|
32734
|
+
return result;
|
|
32735
|
+
}
|
|
32736
|
+
|
|
32196
32737
|
@FieldResolver(() => [MJAICredentialBinding_])
|
|
32197
32738
|
async MJAICredentialBindings_CredentialIDArray(@Root() mjcredential_: MJCredential_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32198
32739
|
this.CheckUserReadPermissions('MJ: AI Credential Bindings', userPayload);
|
|
@@ -37155,6 +37696,27 @@ export class MJEntity_ {
|
|
|
37155
37696
|
@Field(() => Boolean, {description: `When false (default), child types are disjoint - a record can only be one child type at a time. When true, a record can simultaneously exist as multiple child types (e.g., a Person can be both a Member and a Volunteer).`})
|
|
37156
37697
|
AllowMultipleSubtypes: boolean;
|
|
37157
37698
|
|
|
37699
|
+
@Field(() => Boolean, {description: `When true, CodeGen LLM can auto-configure full-text search settings (FullTextSearchEnabled, catalog, index, function) during code generation runs.`})
|
|
37700
|
+
AutoUpdateFullTextSearch: boolean;
|
|
37701
|
+
|
|
37702
|
+
@Field(() => Boolean, {description: `When true, CodeGen LLM can auto-set AllowUserSearchAPI during code generation runs.`})
|
|
37703
|
+
AutoUpdateAllowUserSearchAPI: boolean;
|
|
37704
|
+
|
|
37705
|
+
@Field(() => Boolean, {description: `When true (default), the server-side RunView cache will store and return cached results for this entity, trusting that all mutations flow through BaseEntity.Save() which fires cache invalidation events. Set to false for entities whose rows are created as side-effects of other operations via raw SQL (e.g., Record Changes created by spCreateRecordChange_Internal), since those inserts bypass BaseEntity and never trigger cache invalidation.`})
|
|
37706
|
+
TrustServerCacheCompletely: boolean;
|
|
37707
|
+
|
|
37708
|
+
@Field(() => Boolean, {description: `When true, CodeGen generates geo-aware subclass code, adds __mj_Latitude/__mj_Longitude virtual fields to the base view, and the UI shows a map view toggle. Auto-set by CodeGen when LLM detects geo-capable fields (address, lat/lng, etc.).`})
|
|
37709
|
+
SupportsGeoCoding: boolean;
|
|
37710
|
+
|
|
37711
|
+
@Field(() => Boolean, {description: `When true (default), CodeGen can automatically set SupportsGeoCoding based on LLM analysis of entity fields. Set to 0 to lock the value and prevent CodeGen from changing it.`})
|
|
37712
|
+
AutoUpdateSupportsGeoCoding: boolean;
|
|
37713
|
+
|
|
37714
|
+
@Field(() => Boolean, {description: `Controls whether this entity participates in server-side and client-side caching. When false, all cache operations (PreRunView checks, auto-cache storage, BaseEntity event fingerprint scans, client-side IndexedDB cache) are skipped entirely. This column is the single source of truth at runtime; schema-level defaults are applied at CodeGen time via newEntityDefaults.AllowCachingBySchema.`})
|
|
37715
|
+
AllowCaching: boolean;
|
|
37716
|
+
|
|
37717
|
+
@Field(() => Boolean, {description: `When set to 1 AND TrackRecordChanges is also 1, the external change detection system will scan this entity for changes made outside the MJ framework (direct SQL, third-party tools, etc.) and replay them through Save() to create proper RecordChange audit entries. Default is 0 (opt-out) because most entities, especially __mj schema metadata tables, are managed by migrations/CodeGen and should not be scanned.`})
|
|
37718
|
+
DetectExternalChanges: boolean;
|
|
37719
|
+
|
|
37158
37720
|
@Field({nullable: true, description: `Schema-based programmatic code name derived from the entity Name. Uses GetClassNameSchemaPrefix(SchemaName) as the prefix, then strips EntityNamePrefix from the Name and removes spaces. For "__mj" schema with entity "MJ: AI Models", this produces "MJAIModels". For entities in other schemas, the sanitized schema name is prepended. Used in GraphQL type generation and internal code references.`})
|
|
37159
37721
|
CodeName?: string;
|
|
37160
37722
|
|
|
@@ -37314,6 +37876,9 @@ export class MJEntity_ {
|
|
|
37314
37876
|
@Field(() => [MJEntityOrganicKey_])
|
|
37315
37877
|
MJEntityOrganicKeys_EntityIDArray: MJEntityOrganicKey_[]; // Link to MJEntityOrganicKeys
|
|
37316
37878
|
|
|
37879
|
+
@Field(() => [MJRecordGeoCode_])
|
|
37880
|
+
MJRecordGeoCodes_EntityIDArray: MJRecordGeoCode_[]; // Link to MJRecordGeoCodes
|
|
37881
|
+
|
|
37317
37882
|
@Field(() => [MJGeneratedCode_])
|
|
37318
37883
|
MJGeneratedCodes_LinkedEntityIDArray: MJGeneratedCode_[]; // Link to MJGeneratedCodes
|
|
37319
37884
|
|
|
@@ -37506,6 +38071,27 @@ export class CreateMJEntityInput {
|
|
|
37506
38071
|
|
|
37507
38072
|
@Field(() => Boolean, { nullable: true })
|
|
37508
38073
|
AllowMultipleSubtypes?: boolean;
|
|
38074
|
+
|
|
38075
|
+
@Field(() => Boolean, { nullable: true })
|
|
38076
|
+
AutoUpdateFullTextSearch?: boolean;
|
|
38077
|
+
|
|
38078
|
+
@Field(() => Boolean, { nullable: true })
|
|
38079
|
+
AutoUpdateAllowUserSearchAPI?: boolean;
|
|
38080
|
+
|
|
38081
|
+
@Field(() => Boolean, { nullable: true })
|
|
38082
|
+
TrustServerCacheCompletely?: boolean;
|
|
38083
|
+
|
|
38084
|
+
@Field(() => Boolean, { nullable: true })
|
|
38085
|
+
SupportsGeoCoding?: boolean;
|
|
38086
|
+
|
|
38087
|
+
@Field(() => Boolean, { nullable: true })
|
|
38088
|
+
AutoUpdateSupportsGeoCoding?: boolean;
|
|
38089
|
+
|
|
38090
|
+
@Field(() => Boolean, { nullable: true })
|
|
38091
|
+
AllowCaching?: boolean;
|
|
38092
|
+
|
|
38093
|
+
@Field(() => Boolean, { nullable: true })
|
|
38094
|
+
DetectExternalChanges?: boolean;
|
|
37509
38095
|
}
|
|
37510
38096
|
|
|
37511
38097
|
|
|
@@ -37676,6 +38262,27 @@ export class UpdateMJEntityInput {
|
|
|
37676
38262
|
@Field(() => Boolean, { nullable: true })
|
|
37677
38263
|
AllowMultipleSubtypes?: boolean;
|
|
37678
38264
|
|
|
38265
|
+
@Field(() => Boolean, { nullable: true })
|
|
38266
|
+
AutoUpdateFullTextSearch?: boolean;
|
|
38267
|
+
|
|
38268
|
+
@Field(() => Boolean, { nullable: true })
|
|
38269
|
+
AutoUpdateAllowUserSearchAPI?: boolean;
|
|
38270
|
+
|
|
38271
|
+
@Field(() => Boolean, { nullable: true })
|
|
38272
|
+
TrustServerCacheCompletely?: boolean;
|
|
38273
|
+
|
|
38274
|
+
@Field(() => Boolean, { nullable: true })
|
|
38275
|
+
SupportsGeoCoding?: boolean;
|
|
38276
|
+
|
|
38277
|
+
@Field(() => Boolean, { nullable: true })
|
|
38278
|
+
AutoUpdateSupportsGeoCoding?: boolean;
|
|
38279
|
+
|
|
38280
|
+
@Field(() => Boolean, { nullable: true })
|
|
38281
|
+
AllowCaching?: boolean;
|
|
38282
|
+
|
|
38283
|
+
@Field(() => Boolean, { nullable: true })
|
|
38284
|
+
DetectExternalChanges?: boolean;
|
|
38285
|
+
|
|
37679
38286
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
37680
38287
|
OldValues___?: KeyValuePairInput[];
|
|
37681
38288
|
}
|
|
@@ -38207,6 +38814,16 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
38207
38814
|
return result;
|
|
38208
38815
|
}
|
|
38209
38816
|
|
|
38817
|
+
@FieldResolver(() => [MJRecordGeoCode_])
|
|
38818
|
+
async MJRecordGeoCodes_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38819
|
+
this.CheckUserReadPermissions('MJ: Record Geo Codes', userPayload);
|
|
38820
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38821
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordGeoCodes')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Geo Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
38822
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
38823
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Geo Codes', rows, this.GetUserFromPayload(userPayload));
|
|
38824
|
+
return result;
|
|
38825
|
+
}
|
|
38826
|
+
|
|
38210
38827
|
@FieldResolver(() => [MJGeneratedCode_])
|
|
38211
38828
|
async MJGeneratedCodes_LinkedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38212
38829
|
this.CheckUserReadPermissions('MJ: Generated Codes', userPayload);
|
|
@@ -40997,6 +41614,19 @@ export class MJEntityField_ {
|
|
|
40997
41614
|
@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.`})
|
|
40998
41615
|
JSONTypeDefinition?: string;
|
|
40999
41616
|
|
|
41617
|
+
@Field({description: `Search predicate controlling how user search queries match against this field. Valid values: BeginsWith, Contains, EndsWith, Exact.`})
|
|
41618
|
+
@MaxLength(20)
|
|
41619
|
+
UserSearchPredicateAPI: string;
|
|
41620
|
+
|
|
41621
|
+
@Field(() => Boolean, {description: `When true, CodeGen LLM can auto-set the UserSearchPredicateAPI value during code generation runs.`})
|
|
41622
|
+
AutoUpdateUserSearchPredicate: boolean;
|
|
41623
|
+
|
|
41624
|
+
@Field(() => Boolean, {description: `When true, CodeGen LLM can auto-set the FullTextSearchEnabled value during code generation runs.`})
|
|
41625
|
+
AutoUpdateFullTextSearch: boolean;
|
|
41626
|
+
|
|
41627
|
+
@Field(() => Boolean, {description: `When true (default), CodeGen can automatically suggest and apply ExtendedType values (GeoLatitude, GeoLongitude, GeoAddress, etc.) during LLM field categorization. Set to 0 to lock admin-specified ExtendedType.`})
|
|
41628
|
+
AutoUpdateExtendedType: boolean;
|
|
41629
|
+
|
|
41000
41630
|
@Field({nullable: true})
|
|
41001
41631
|
FieldCodeName?: string;
|
|
41002
41632
|
|
|
@@ -41191,6 +41821,18 @@ export class CreateMJEntityFieldInput {
|
|
|
41191
41821
|
|
|
41192
41822
|
@Field({ nullable: true })
|
|
41193
41823
|
JSONTypeDefinition: string | null;
|
|
41824
|
+
|
|
41825
|
+
@Field({ nullable: true })
|
|
41826
|
+
UserSearchPredicateAPI?: string;
|
|
41827
|
+
|
|
41828
|
+
@Field(() => Boolean, { nullable: true })
|
|
41829
|
+
AutoUpdateUserSearchPredicate?: boolean;
|
|
41830
|
+
|
|
41831
|
+
@Field(() => Boolean, { nullable: true })
|
|
41832
|
+
AutoUpdateFullTextSearch?: boolean;
|
|
41833
|
+
|
|
41834
|
+
@Field(() => Boolean, { nullable: true })
|
|
41835
|
+
AutoUpdateExtendedType?: boolean;
|
|
41194
41836
|
}
|
|
41195
41837
|
|
|
41196
41838
|
|
|
@@ -41337,6 +41979,18 @@ export class UpdateMJEntityFieldInput {
|
|
|
41337
41979
|
@Field({ nullable: true })
|
|
41338
41980
|
JSONTypeDefinition?: string | null;
|
|
41339
41981
|
|
|
41982
|
+
@Field({ nullable: true })
|
|
41983
|
+
UserSearchPredicateAPI?: string;
|
|
41984
|
+
|
|
41985
|
+
@Field(() => Boolean, { nullable: true })
|
|
41986
|
+
AutoUpdateUserSearchPredicate?: boolean;
|
|
41987
|
+
|
|
41988
|
+
@Field(() => Boolean, { nullable: true })
|
|
41989
|
+
AutoUpdateFullTextSearch?: boolean;
|
|
41990
|
+
|
|
41991
|
+
@Field(() => Boolean, { nullable: true })
|
|
41992
|
+
AutoUpdateExtendedType?: boolean;
|
|
41993
|
+
|
|
41340
41994
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
41341
41995
|
OldValues___?: KeyValuePairInput[];
|
|
41342
41996
|
}
|
|
@@ -44148,6 +44802,201 @@ export class MJFileEntityRecordLinkResolver extends ResolverBase {
|
|
|
44148
44802
|
|
|
44149
44803
|
}
|
|
44150
44804
|
|
|
44805
|
+
//****************************************************************************
|
|
44806
|
+
// ENTITY CLASS for MJ: File Storage Account Permissions
|
|
44807
|
+
//****************************************************************************
|
|
44808
|
+
@ObjectType({ description: `Controls which users and roles can access specific file storage accounts. If no permission records exist for an account, it is accessible to everyone (backwards compatible).` })
|
|
44809
|
+
export class MJFileStorageAccountPermission_ {
|
|
44810
|
+
@Field()
|
|
44811
|
+
@MaxLength(36)
|
|
44812
|
+
ID: string;
|
|
44813
|
+
|
|
44814
|
+
@Field({description: `The storage account this permission applies to.`})
|
|
44815
|
+
@MaxLength(36)
|
|
44816
|
+
FileStorageAccountID: string;
|
|
44817
|
+
|
|
44818
|
+
@Field({description: `Permission type: User (requires UserID), Role (requires RoleID), or Everyone (both NULL).`})
|
|
44819
|
+
@MaxLength(20)
|
|
44820
|
+
Type: string;
|
|
44821
|
+
|
|
44822
|
+
@Field({nullable: true, description: `Required when Type is User. The specific user granted access to this storage account.`})
|
|
44823
|
+
@MaxLength(36)
|
|
44824
|
+
UserID?: string;
|
|
44825
|
+
|
|
44826
|
+
@Field({nullable: true, description: `Required when Type is Role. The role granted access to this storage account.`})
|
|
44827
|
+
@MaxLength(36)
|
|
44828
|
+
RoleID?: string;
|
|
44829
|
+
|
|
44830
|
+
@Field(() => Boolean, {description: `Whether the grantee can read/search files in this storage account.`})
|
|
44831
|
+
CanRead: boolean;
|
|
44832
|
+
|
|
44833
|
+
@Field(() => Boolean, {description: `Whether the grantee can upload/modify files in this storage account.`})
|
|
44834
|
+
CanWrite: boolean;
|
|
44835
|
+
|
|
44836
|
+
@Field()
|
|
44837
|
+
_mj__CreatedAt: Date;
|
|
44838
|
+
|
|
44839
|
+
@Field()
|
|
44840
|
+
_mj__UpdatedAt: Date;
|
|
44841
|
+
|
|
44842
|
+
@Field()
|
|
44843
|
+
@MaxLength(200)
|
|
44844
|
+
FileStorageAccount: string;
|
|
44845
|
+
|
|
44846
|
+
@Field({nullable: true})
|
|
44847
|
+
@MaxLength(100)
|
|
44848
|
+
User?: string;
|
|
44849
|
+
|
|
44850
|
+
@Field({nullable: true})
|
|
44851
|
+
@MaxLength(50)
|
|
44852
|
+
Role?: string;
|
|
44853
|
+
|
|
44854
|
+
}
|
|
44855
|
+
|
|
44856
|
+
//****************************************************************************
|
|
44857
|
+
// INPUT TYPE for MJ: File Storage Account Permissions
|
|
44858
|
+
//****************************************************************************
|
|
44859
|
+
@InputType()
|
|
44860
|
+
export class CreateMJFileStorageAccountPermissionInput {
|
|
44861
|
+
@Field({ nullable: true })
|
|
44862
|
+
ID?: string;
|
|
44863
|
+
|
|
44864
|
+
@Field({ nullable: true })
|
|
44865
|
+
FileStorageAccountID?: string;
|
|
44866
|
+
|
|
44867
|
+
@Field({ nullable: true })
|
|
44868
|
+
Type?: string;
|
|
44869
|
+
|
|
44870
|
+
@Field({ nullable: true })
|
|
44871
|
+
UserID: string | null;
|
|
44872
|
+
|
|
44873
|
+
@Field({ nullable: true })
|
|
44874
|
+
RoleID: string | null;
|
|
44875
|
+
|
|
44876
|
+
@Field(() => Boolean, { nullable: true })
|
|
44877
|
+
CanRead?: boolean;
|
|
44878
|
+
|
|
44879
|
+
@Field(() => Boolean, { nullable: true })
|
|
44880
|
+
CanWrite?: boolean;
|
|
44881
|
+
}
|
|
44882
|
+
|
|
44883
|
+
|
|
44884
|
+
//****************************************************************************
|
|
44885
|
+
// INPUT TYPE for MJ: File Storage Account Permissions
|
|
44886
|
+
//****************************************************************************
|
|
44887
|
+
@InputType()
|
|
44888
|
+
export class UpdateMJFileStorageAccountPermissionInput {
|
|
44889
|
+
@Field()
|
|
44890
|
+
ID: string;
|
|
44891
|
+
|
|
44892
|
+
@Field({ nullable: true })
|
|
44893
|
+
FileStorageAccountID?: string;
|
|
44894
|
+
|
|
44895
|
+
@Field({ nullable: true })
|
|
44896
|
+
Type?: string;
|
|
44897
|
+
|
|
44898
|
+
@Field({ nullable: true })
|
|
44899
|
+
UserID?: string | null;
|
|
44900
|
+
|
|
44901
|
+
@Field({ nullable: true })
|
|
44902
|
+
RoleID?: string | null;
|
|
44903
|
+
|
|
44904
|
+
@Field(() => Boolean, { nullable: true })
|
|
44905
|
+
CanRead?: boolean;
|
|
44906
|
+
|
|
44907
|
+
@Field(() => Boolean, { nullable: true })
|
|
44908
|
+
CanWrite?: boolean;
|
|
44909
|
+
|
|
44910
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
44911
|
+
OldValues___?: KeyValuePairInput[];
|
|
44912
|
+
}
|
|
44913
|
+
|
|
44914
|
+
//****************************************************************************
|
|
44915
|
+
// RESOLVER for MJ: File Storage Account Permissions
|
|
44916
|
+
//****************************************************************************
|
|
44917
|
+
@ObjectType()
|
|
44918
|
+
export class RunMJFileStorageAccountPermissionViewResult {
|
|
44919
|
+
@Field(() => [MJFileStorageAccountPermission_])
|
|
44920
|
+
Results: MJFileStorageAccountPermission_[];
|
|
44921
|
+
|
|
44922
|
+
@Field(() => String, {nullable: true})
|
|
44923
|
+
UserViewRunID?: string;
|
|
44924
|
+
|
|
44925
|
+
@Field(() => Int, {nullable: true})
|
|
44926
|
+
RowCount: number;
|
|
44927
|
+
|
|
44928
|
+
@Field(() => Int, {nullable: true})
|
|
44929
|
+
TotalRowCount: number;
|
|
44930
|
+
|
|
44931
|
+
@Field(() => Int, {nullable: true})
|
|
44932
|
+
ExecutionTime: number;
|
|
44933
|
+
|
|
44934
|
+
@Field({nullable: true})
|
|
44935
|
+
ErrorMessage?: string;
|
|
44936
|
+
|
|
44937
|
+
@Field(() => Boolean, {nullable: false})
|
|
44938
|
+
Success: boolean;
|
|
44939
|
+
}
|
|
44940
|
+
|
|
44941
|
+
@Resolver(MJFileStorageAccountPermission_)
|
|
44942
|
+
export class MJFileStorageAccountPermissionResolver extends ResolverBase {
|
|
44943
|
+
@Query(() => RunMJFileStorageAccountPermissionViewResult)
|
|
44944
|
+
async RunMJFileStorageAccountPermissionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44945
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44946
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
44947
|
+
}
|
|
44948
|
+
|
|
44949
|
+
@Query(() => RunMJFileStorageAccountPermissionViewResult)
|
|
44950
|
+
async RunMJFileStorageAccountPermissionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44951
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44952
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
44953
|
+
}
|
|
44954
|
+
|
|
44955
|
+
@Query(() => RunMJFileStorageAccountPermissionViewResult)
|
|
44956
|
+
async RunMJFileStorageAccountPermissionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44957
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44958
|
+
input.EntityName = 'MJ: File Storage Account Permissions';
|
|
44959
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
44960
|
+
}
|
|
44961
|
+
@Query(() => MJFileStorageAccountPermission_, { nullable: true })
|
|
44962
|
+
async MJFileStorageAccountPermission(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJFileStorageAccountPermission_ | null> {
|
|
44963
|
+
this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
|
|
44964
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44965
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwFileStorageAccountPermissions')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: File Storage Account Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
44966
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
44967
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
44968
|
+
return result;
|
|
44969
|
+
}
|
|
44970
|
+
|
|
44971
|
+
@Mutation(() => MJFileStorageAccountPermission_)
|
|
44972
|
+
async CreateMJFileStorageAccountPermission(
|
|
44973
|
+
@Arg('input', () => CreateMJFileStorageAccountPermissionInput) input: CreateMJFileStorageAccountPermissionInput,
|
|
44974
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
44975
|
+
@PubSub() pubSub: PubSubEngine
|
|
44976
|
+
) {
|
|
44977
|
+
const provider = GetReadWriteProvider(providers);
|
|
44978
|
+
return this.CreateRecord('MJ: File Storage Account Permissions', input, provider, userPayload, pubSub)
|
|
44979
|
+
}
|
|
44980
|
+
|
|
44981
|
+
@Mutation(() => MJFileStorageAccountPermission_)
|
|
44982
|
+
async UpdateMJFileStorageAccountPermission(
|
|
44983
|
+
@Arg('input', () => UpdateMJFileStorageAccountPermissionInput) input: UpdateMJFileStorageAccountPermissionInput,
|
|
44984
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
44985
|
+
@PubSub() pubSub: PubSubEngine
|
|
44986
|
+
) {
|
|
44987
|
+
const provider = GetReadWriteProvider(providers);
|
|
44988
|
+
return this.UpdateRecord('MJ: File Storage Account Permissions', input, provider, userPayload, pubSub);
|
|
44989
|
+
}
|
|
44990
|
+
|
|
44991
|
+
@Mutation(() => MJFileStorageAccountPermission_)
|
|
44992
|
+
async DeleteMJFileStorageAccountPermission(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44993
|
+
const provider = GetReadWriteProvider(providers);
|
|
44994
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
44995
|
+
return this.DeleteRecord('MJ: File Storage Account Permissions', key, options, provider, userPayload, pubSub);
|
|
44996
|
+
}
|
|
44997
|
+
|
|
44998
|
+
}
|
|
44999
|
+
|
|
44151
45000
|
//****************************************************************************
|
|
44152
45001
|
// ENTITY CLASS for MJ: File Storage Accounts
|
|
44153
45002
|
//****************************************************************************
|
|
@@ -44178,6 +45027,9 @@ export class MJFileStorageAccount_ {
|
|
|
44178
45027
|
@Field()
|
|
44179
45028
|
_mj__UpdatedAt: Date;
|
|
44180
45029
|
|
|
45030
|
+
@Field(() => Boolean, {description: `When true, this storage account is included in universal/global search results. Only effective if the associated provider supports search (SupportsSearch = 1).`})
|
|
45031
|
+
IncludeInGlobalSearch: boolean;
|
|
45032
|
+
|
|
44181
45033
|
@Field()
|
|
44182
45034
|
@MaxLength(50)
|
|
44183
45035
|
Provider: string;
|
|
@@ -44186,6 +45038,18 @@ export class MJFileStorageAccount_ {
|
|
|
44186
45038
|
@MaxLength(200)
|
|
44187
45039
|
Credential: string;
|
|
44188
45040
|
|
|
45041
|
+
@Field(() => [MJAIAgentType_])
|
|
45042
|
+
MJAIAgentTypes_DefaultStorageAccountIDArray: MJAIAgentType_[]; // Link to MJAIAgentTypes
|
|
45043
|
+
|
|
45044
|
+
@Field(() => [MJFileStorageAccountPermission_])
|
|
45045
|
+
MJFileStorageAccountPermissions_FileStorageAccountIDArray: MJFileStorageAccountPermission_[]; // Link to MJFileStorageAccountPermissions
|
|
45046
|
+
|
|
45047
|
+
@Field(() => [MJAIAgentCategory_])
|
|
45048
|
+
MJAIAgentCategories_DefaultStorageAccountIDArray: MJAIAgentCategory_[]; // Link to MJAIAgentCategories
|
|
45049
|
+
|
|
45050
|
+
@Field(() => [MJAIAgent_])
|
|
45051
|
+
MJAIAgents_DefaultStorageAccountIDArray: MJAIAgent_[]; // Link to MJAIAgents
|
|
45052
|
+
|
|
44189
45053
|
}
|
|
44190
45054
|
|
|
44191
45055
|
//****************************************************************************
|
|
@@ -44207,6 +45071,9 @@ export class CreateMJFileStorageAccountInput {
|
|
|
44207
45071
|
|
|
44208
45072
|
@Field({ nullable: true })
|
|
44209
45073
|
CredentialID?: string;
|
|
45074
|
+
|
|
45075
|
+
@Field(() => Boolean, { nullable: true })
|
|
45076
|
+
IncludeInGlobalSearch?: boolean;
|
|
44210
45077
|
}
|
|
44211
45078
|
|
|
44212
45079
|
|
|
@@ -44230,6 +45097,9 @@ export class UpdateMJFileStorageAccountInput {
|
|
|
44230
45097
|
@Field({ nullable: true })
|
|
44231
45098
|
CredentialID?: string;
|
|
44232
45099
|
|
|
45100
|
+
@Field(() => Boolean, { nullable: true })
|
|
45101
|
+
IncludeInGlobalSearch?: boolean;
|
|
45102
|
+
|
|
44233
45103
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
44234
45104
|
OldValues___?: KeyValuePairInput[];
|
|
44235
45105
|
}
|
|
@@ -44291,6 +45161,46 @@ export class MJFileStorageAccountResolver extends ResolverBase {
|
|
|
44291
45161
|
return result;
|
|
44292
45162
|
}
|
|
44293
45163
|
|
|
45164
|
+
@FieldResolver(() => [MJAIAgentType_])
|
|
45165
|
+
async MJAIAgentTypes_DefaultStorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45166
|
+
this.CheckUserReadPermissions('MJ: AI Agent Types', userPayload);
|
|
45167
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45168
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentTypes')} WHERE ${provider.QuoteIdentifier('DefaultStorageAccountID')}='${mjfilestorageaccount_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
45169
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
45170
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', rows, this.GetUserFromPayload(userPayload));
|
|
45171
|
+
return result;
|
|
45172
|
+
}
|
|
45173
|
+
|
|
45174
|
+
@FieldResolver(() => [MJFileStorageAccountPermission_])
|
|
45175
|
+
async MJFileStorageAccountPermissions_FileStorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45176
|
+
this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
|
|
45177
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45178
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwFileStorageAccountPermissions')} WHERE ${provider.QuoteIdentifier('FileStorageAccountID')}='${mjfilestorageaccount_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: File Storage Account Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
45179
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
45180
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
45181
|
+
return result;
|
|
45182
|
+
}
|
|
45183
|
+
|
|
45184
|
+
@FieldResolver(() => [MJAIAgentCategory_])
|
|
45185
|
+
async MJAIAgentCategories_DefaultStorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45186
|
+
this.CheckUserReadPermissions('MJ: AI Agent Categories', userPayload);
|
|
45187
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45188
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentCategories')} WHERE ${provider.QuoteIdentifier('DefaultStorageAccountID')}='${mjfilestorageaccount_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
45189
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
45190
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Categories', rows, this.GetUserFromPayload(userPayload));
|
|
45191
|
+
return result;
|
|
45192
|
+
}
|
|
45193
|
+
|
|
45194
|
+
@FieldResolver(() => [MJAIAgent_])
|
|
45195
|
+
async MJAIAgents_DefaultStorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45196
|
+
this.CheckUserReadPermissions('MJ: AI Agents', userPayload);
|
|
45197
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45198
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgents')} WHERE ${provider.QuoteIdentifier('DefaultStorageAccountID')}='${mjfilestorageaccount_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agents', userPayload, EntityPermissionType.Read, 'AND');
|
|
45199
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
45200
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agents', rows, this.GetUserFromPayload(userPayload));
|
|
45201
|
+
return result;
|
|
45202
|
+
}
|
|
45203
|
+
|
|
44294
45204
|
@Mutation(() => MJFileStorageAccount_)
|
|
44295
45205
|
async CreateMJFileStorageAccount(
|
|
44296
45206
|
@Arg('input', () => CreateMJFileStorageAccountInput) input: CreateMJFileStorageAccountInput,
|
|
@@ -44643,6 +45553,9 @@ export class MJFile_ {
|
|
|
44643
45553
|
@Field(() => [MJAIAgentRunMedia_])
|
|
44644
45554
|
MJAIAgentRunMedias_FileIDArray: MJAIAgentRunMedia_[]; // Link to MJAIAgentRunMedias
|
|
44645
45555
|
|
|
45556
|
+
@Field(() => [MJArtifactVersion_])
|
|
45557
|
+
MJArtifactVersions_FileIDArray: MJArtifactVersion_[]; // Link to MJArtifactVersions
|
|
45558
|
+
|
|
44646
45559
|
}
|
|
44647
45560
|
|
|
44648
45561
|
//****************************************************************************
|
|
@@ -44806,6 +45719,16 @@ export class MJFileResolver extends ResolverBase {
|
|
|
44806
45719
|
return result;
|
|
44807
45720
|
}
|
|
44808
45721
|
|
|
45722
|
+
@FieldResolver(() => [MJArtifactVersion_])
|
|
45723
|
+
async MJArtifactVersions_FileIDArray(@Root() mjfile_: MJFile_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45724
|
+
this.CheckUserReadPermissions('MJ: Artifact Versions', userPayload);
|
|
45725
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45726
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwArtifactVersions')} WHERE ${provider.QuoteIdentifier('FileID')}='${mjfile_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
45727
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
45728
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Versions', rows, this.GetUserFromPayload(userPayload));
|
|
45729
|
+
return result;
|
|
45730
|
+
}
|
|
45731
|
+
|
|
44809
45732
|
@Mutation(() => MJFile_)
|
|
44810
45733
|
async CreateMJFile(
|
|
44811
45734
|
@Arg('input', () => CreateMJFileInput) input: CreateMJFileInput,
|
|
@@ -45265,6 +46188,198 @@ export class MJGeneratedCodeResolver extends ResolverBase {
|
|
|
45265
46188
|
|
|
45266
46189
|
}
|
|
45267
46190
|
|
|
46191
|
+
//****************************************************************************
|
|
46192
|
+
// ENTITY CLASS for MJ: Instance Configurations
|
|
46193
|
+
//****************************************************************************
|
|
46194
|
+
@ObjectType({ description: `Instance-level feature toggles and configuration. Controls which features are enabled per MJ Explorer deployment.` })
|
|
46195
|
+
export class MJInstanceConfiguration_ {
|
|
46196
|
+
@Field()
|
|
46197
|
+
@MaxLength(36)
|
|
46198
|
+
ID: string;
|
|
46199
|
+
|
|
46200
|
+
@Field({description: `Unique dot-notation key identifying the feature, e.g. Shell.SearchBar.Enabled.`})
|
|
46201
|
+
@MaxLength(200)
|
|
46202
|
+
FeatureKey: string;
|
|
46203
|
+
|
|
46204
|
+
@Field({description: `Current value for this feature setting.`})
|
|
46205
|
+
Value: string;
|
|
46206
|
+
|
|
46207
|
+
@Field({description: `Data type of the value: boolean, string, number, or json.`})
|
|
46208
|
+
@MaxLength(20)
|
|
46209
|
+
ValueType: string;
|
|
46210
|
+
|
|
46211
|
+
@Field({description: `Grouping category for admin UI display.`})
|
|
46212
|
+
@MaxLength(100)
|
|
46213
|
+
Category: string;
|
|
46214
|
+
|
|
46215
|
+
@Field({description: `Human-readable display name for the setting.`})
|
|
46216
|
+
@MaxLength(200)
|
|
46217
|
+
DisplayName: string;
|
|
46218
|
+
|
|
46219
|
+
@Field({nullable: true, description: `Optional extended description or help text for the setting.`})
|
|
46220
|
+
Description?: string;
|
|
46221
|
+
|
|
46222
|
+
@Field({description: `Factory default value. Used when resetting to defaults.`})
|
|
46223
|
+
DefaultValue: string;
|
|
46224
|
+
|
|
46225
|
+
@Field()
|
|
46226
|
+
_mj__CreatedAt: Date;
|
|
46227
|
+
|
|
46228
|
+
@Field()
|
|
46229
|
+
_mj__UpdatedAt: Date;
|
|
46230
|
+
|
|
46231
|
+
}
|
|
46232
|
+
|
|
46233
|
+
//****************************************************************************
|
|
46234
|
+
// INPUT TYPE for MJ: Instance Configurations
|
|
46235
|
+
//****************************************************************************
|
|
46236
|
+
@InputType()
|
|
46237
|
+
export class CreateMJInstanceConfigurationInput {
|
|
46238
|
+
@Field({ nullable: true })
|
|
46239
|
+
ID?: string;
|
|
46240
|
+
|
|
46241
|
+
@Field({ nullable: true })
|
|
46242
|
+
FeatureKey?: string;
|
|
46243
|
+
|
|
46244
|
+
@Field({ nullable: true })
|
|
46245
|
+
Value?: string;
|
|
46246
|
+
|
|
46247
|
+
@Field({ nullable: true })
|
|
46248
|
+
ValueType?: string;
|
|
46249
|
+
|
|
46250
|
+
@Field({ nullable: true })
|
|
46251
|
+
Category?: string;
|
|
46252
|
+
|
|
46253
|
+
@Field({ nullable: true })
|
|
46254
|
+
DisplayName?: string;
|
|
46255
|
+
|
|
46256
|
+
@Field({ nullable: true })
|
|
46257
|
+
Description: string | null;
|
|
46258
|
+
|
|
46259
|
+
@Field({ nullable: true })
|
|
46260
|
+
DefaultValue?: string;
|
|
46261
|
+
}
|
|
46262
|
+
|
|
46263
|
+
|
|
46264
|
+
//****************************************************************************
|
|
46265
|
+
// INPUT TYPE for MJ: Instance Configurations
|
|
46266
|
+
//****************************************************************************
|
|
46267
|
+
@InputType()
|
|
46268
|
+
export class UpdateMJInstanceConfigurationInput {
|
|
46269
|
+
@Field()
|
|
46270
|
+
ID: string;
|
|
46271
|
+
|
|
46272
|
+
@Field({ nullable: true })
|
|
46273
|
+
FeatureKey?: string;
|
|
46274
|
+
|
|
46275
|
+
@Field({ nullable: true })
|
|
46276
|
+
Value?: string;
|
|
46277
|
+
|
|
46278
|
+
@Field({ nullable: true })
|
|
46279
|
+
ValueType?: string;
|
|
46280
|
+
|
|
46281
|
+
@Field({ nullable: true })
|
|
46282
|
+
Category?: string;
|
|
46283
|
+
|
|
46284
|
+
@Field({ nullable: true })
|
|
46285
|
+
DisplayName?: string;
|
|
46286
|
+
|
|
46287
|
+
@Field({ nullable: true })
|
|
46288
|
+
Description?: string | null;
|
|
46289
|
+
|
|
46290
|
+
@Field({ nullable: true })
|
|
46291
|
+
DefaultValue?: string;
|
|
46292
|
+
|
|
46293
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
46294
|
+
OldValues___?: KeyValuePairInput[];
|
|
46295
|
+
}
|
|
46296
|
+
|
|
46297
|
+
//****************************************************************************
|
|
46298
|
+
// RESOLVER for MJ: Instance Configurations
|
|
46299
|
+
//****************************************************************************
|
|
46300
|
+
@ObjectType()
|
|
46301
|
+
export class RunMJInstanceConfigurationViewResult {
|
|
46302
|
+
@Field(() => [MJInstanceConfiguration_])
|
|
46303
|
+
Results: MJInstanceConfiguration_[];
|
|
46304
|
+
|
|
46305
|
+
@Field(() => String, {nullable: true})
|
|
46306
|
+
UserViewRunID?: string;
|
|
46307
|
+
|
|
46308
|
+
@Field(() => Int, {nullable: true})
|
|
46309
|
+
RowCount: number;
|
|
46310
|
+
|
|
46311
|
+
@Field(() => Int, {nullable: true})
|
|
46312
|
+
TotalRowCount: number;
|
|
46313
|
+
|
|
46314
|
+
@Field(() => Int, {nullable: true})
|
|
46315
|
+
ExecutionTime: number;
|
|
46316
|
+
|
|
46317
|
+
@Field({nullable: true})
|
|
46318
|
+
ErrorMessage?: string;
|
|
46319
|
+
|
|
46320
|
+
@Field(() => Boolean, {nullable: false})
|
|
46321
|
+
Success: boolean;
|
|
46322
|
+
}
|
|
46323
|
+
|
|
46324
|
+
@Resolver(MJInstanceConfiguration_)
|
|
46325
|
+
export class MJInstanceConfigurationResolver extends ResolverBase {
|
|
46326
|
+
@Query(() => RunMJInstanceConfigurationViewResult)
|
|
46327
|
+
async RunMJInstanceConfigurationViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46328
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46329
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
46330
|
+
}
|
|
46331
|
+
|
|
46332
|
+
@Query(() => RunMJInstanceConfigurationViewResult)
|
|
46333
|
+
async RunMJInstanceConfigurationViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46334
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46335
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
46336
|
+
}
|
|
46337
|
+
|
|
46338
|
+
@Query(() => RunMJInstanceConfigurationViewResult)
|
|
46339
|
+
async RunMJInstanceConfigurationDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46340
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46341
|
+
input.EntityName = 'MJ: Instance Configurations';
|
|
46342
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
46343
|
+
}
|
|
46344
|
+
@Query(() => MJInstanceConfiguration_, { nullable: true })
|
|
46345
|
+
async MJInstanceConfiguration(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJInstanceConfiguration_ | null> {
|
|
46346
|
+
this.CheckUserReadPermissions('MJ: Instance Configurations', userPayload);
|
|
46347
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
46348
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwInstanceConfigurations')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Instance Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
46349
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
46350
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Instance Configurations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
46351
|
+
return result;
|
|
46352
|
+
}
|
|
46353
|
+
|
|
46354
|
+
@Mutation(() => MJInstanceConfiguration_)
|
|
46355
|
+
async CreateMJInstanceConfiguration(
|
|
46356
|
+
@Arg('input', () => CreateMJInstanceConfigurationInput) input: CreateMJInstanceConfigurationInput,
|
|
46357
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
46358
|
+
@PubSub() pubSub: PubSubEngine
|
|
46359
|
+
) {
|
|
46360
|
+
const provider = GetReadWriteProvider(providers);
|
|
46361
|
+
return this.CreateRecord('MJ: Instance Configurations', input, provider, userPayload, pubSub)
|
|
46362
|
+
}
|
|
46363
|
+
|
|
46364
|
+
@Mutation(() => MJInstanceConfiguration_)
|
|
46365
|
+
async UpdateMJInstanceConfiguration(
|
|
46366
|
+
@Arg('input', () => UpdateMJInstanceConfigurationInput) input: UpdateMJInstanceConfigurationInput,
|
|
46367
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
46368
|
+
@PubSub() pubSub: PubSubEngine
|
|
46369
|
+
) {
|
|
46370
|
+
const provider = GetReadWriteProvider(providers);
|
|
46371
|
+
return this.UpdateRecord('MJ: Instance Configurations', input, provider, userPayload, pubSub);
|
|
46372
|
+
}
|
|
46373
|
+
|
|
46374
|
+
@Mutation(() => MJInstanceConfiguration_)
|
|
46375
|
+
async DeleteMJInstanceConfiguration(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
46376
|
+
const provider = GetReadWriteProvider(providers);
|
|
46377
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
46378
|
+
return this.DeleteRecord('MJ: Instance Configurations', key, options, provider, userPayload, pubSub);
|
|
46379
|
+
}
|
|
46380
|
+
|
|
46381
|
+
}
|
|
46382
|
+
|
|
45268
46383
|
//****************************************************************************
|
|
45269
46384
|
// ENTITY CLASS for MJ: Integration Object Fields
|
|
45270
46385
|
//****************************************************************************
|
|
@@ -56240,6 +57355,278 @@ export class MJRecordChangeResolver extends ResolverBase {
|
|
|
56240
57355
|
|
|
56241
57356
|
}
|
|
56242
57357
|
|
|
57358
|
+
//****************************************************************************
|
|
57359
|
+
// ENTITY CLASS for MJ: Record Geo Codes
|
|
57360
|
+
//****************************************************************************
|
|
57361
|
+
@ObjectType({ description: `Polymorphic table storing persisted geocoding results for any MJ entity record. Each row maps an entity record + location type to a lat/lng coordinate, with optional country/state references for choropleth grouping. Supports multi-location entities via LocationType discriminator.` })
|
|
57362
|
+
export class MJRecordGeoCode_ {
|
|
57363
|
+
@Field()
|
|
57364
|
+
@MaxLength(36)
|
|
57365
|
+
ID: string;
|
|
57366
|
+
|
|
57367
|
+
@Field({description: `Foreign key to Entity. Identifies which entity this geocode belongs to.`})
|
|
57368
|
+
@MaxLength(36)
|
|
57369
|
+
EntityID: string;
|
|
57370
|
+
|
|
57371
|
+
@Field({description: `MJ composite primary key format string identifying the source record (e.g., "ID|<uuid>"). Max 450 chars for SQL Server index support.`})
|
|
57372
|
+
@MaxLength(450)
|
|
57373
|
+
RecordID: string;
|
|
57374
|
+
|
|
57375
|
+
@Field({description: `Discriminator for multi-location entities. Default "Primary" for single-address entities. Multi-address examples: "Home", "Business", "Mailing", "PO Box".`})
|
|
57376
|
+
@MaxLength(50)
|
|
57377
|
+
LocationType: string;
|
|
57378
|
+
|
|
57379
|
+
@Field(() => Float, {nullable: true, description: `Geocoded latitude coordinate. NULL when Status is "pending" or "failed".`})
|
|
57380
|
+
Latitude?: number;
|
|
57381
|
+
|
|
57382
|
+
@Field(() => Float, {nullable: true, description: `Geocoded longitude coordinate. NULL when Status is "pending" or "failed".`})
|
|
57383
|
+
Longitude?: number;
|
|
57384
|
+
|
|
57385
|
+
@Field({nullable: true, description: `Precision level of the geocoded result: exact (street address), postal_code, city, county, state_province, or country.`})
|
|
57386
|
+
@MaxLength(20)
|
|
57387
|
+
Precision?: string;
|
|
57388
|
+
|
|
57389
|
+
@Field({nullable: true, description: `Optional FK to Country reference table. Populated alongside lat/lng to enable choropleth grouping without reverse-geocoding at render time.`})
|
|
57390
|
+
@MaxLength(36)
|
|
57391
|
+
CountryID?: string;
|
|
57392
|
+
|
|
57393
|
+
@Field({nullable: true, description: `Optional FK to StateProvince reference table. Populated alongside lat/lng to enable state-level choropleth grouping.`})
|
|
57394
|
+
@MaxLength(36)
|
|
57395
|
+
StateProvinceID?: string;
|
|
57396
|
+
|
|
57397
|
+
@Field({description: `Current geocoding status: "pending" (awaiting geocode), "success" (geocoded), or "failed" (geocoding error). Used by scheduled job for retry logic.`})
|
|
57398
|
+
@MaxLength(20)
|
|
57399
|
+
Status: string;
|
|
57400
|
+
|
|
57401
|
+
@Field({nullable: true, description: `Error details when Status is "failed". Captures API error messages, rate limit info, etc. for debugging.`})
|
|
57402
|
+
ErrorMessage?: string;
|
|
57403
|
+
|
|
57404
|
+
@Field(() => Int, {description: `Number of geocoding attempts. Used for exponential backoff in the scheduled retry job. Stops retrying at configurable maxRetries (default 3).`})
|
|
57405
|
+
RetryCount: number;
|
|
57406
|
+
|
|
57407
|
+
@Field({nullable: true, description: `SHA-256 hash of the source field values that produced this geocode. When source fields change on save, the hash won't match and re-geocoding is triggered. Format: SHA-256(concat(field1, "|", field2, ...)).`})
|
|
57408
|
+
@MaxLength(64)
|
|
57409
|
+
SourceFieldHash?: string;
|
|
57410
|
+
|
|
57411
|
+
@Field({nullable: true, description: `Timestamp of when geocoding was last attempted (success or failure).`})
|
|
57412
|
+
GeocodedAt?: Date;
|
|
57413
|
+
|
|
57414
|
+
@Field({nullable: true, description: `How this geocode was produced: google (Google Geocoding API), reference_data (resolved via Country/StateProvince tables), manual (user-entered), ip_geolocation (IP lookup), native (copied from entity lat/lng fields), reverse (reverse geocode from coordinates).`})
|
|
57415
|
+
@MaxLength(30)
|
|
57416
|
+
GeocodingSource?: string;
|
|
57417
|
+
|
|
57418
|
+
@Field()
|
|
57419
|
+
_mj__CreatedAt: Date;
|
|
57420
|
+
|
|
57421
|
+
@Field()
|
|
57422
|
+
_mj__UpdatedAt: Date;
|
|
57423
|
+
|
|
57424
|
+
@Field()
|
|
57425
|
+
@MaxLength(255)
|
|
57426
|
+
Entity: string;
|
|
57427
|
+
|
|
57428
|
+
@Field({nullable: true})
|
|
57429
|
+
@MaxLength(200)
|
|
57430
|
+
Country?: string;
|
|
57431
|
+
|
|
57432
|
+
@Field({nullable: true})
|
|
57433
|
+
@MaxLength(200)
|
|
57434
|
+
StateProvince?: string;
|
|
57435
|
+
|
|
57436
|
+
}
|
|
57437
|
+
|
|
57438
|
+
//****************************************************************************
|
|
57439
|
+
// INPUT TYPE for MJ: Record Geo Codes
|
|
57440
|
+
//****************************************************************************
|
|
57441
|
+
@InputType()
|
|
57442
|
+
export class CreateMJRecordGeoCodeInput {
|
|
57443
|
+
@Field({ nullable: true })
|
|
57444
|
+
ID?: string;
|
|
57445
|
+
|
|
57446
|
+
@Field({ nullable: true })
|
|
57447
|
+
EntityID?: string;
|
|
57448
|
+
|
|
57449
|
+
@Field({ nullable: true })
|
|
57450
|
+
RecordID?: string;
|
|
57451
|
+
|
|
57452
|
+
@Field({ nullable: true })
|
|
57453
|
+
LocationType?: string;
|
|
57454
|
+
|
|
57455
|
+
@Field(() => Float, { nullable: true })
|
|
57456
|
+
Latitude: number | null;
|
|
57457
|
+
|
|
57458
|
+
@Field(() => Float, { nullable: true })
|
|
57459
|
+
Longitude: number | null;
|
|
57460
|
+
|
|
57461
|
+
@Field({ nullable: true })
|
|
57462
|
+
Precision: string | null;
|
|
57463
|
+
|
|
57464
|
+
@Field({ nullable: true })
|
|
57465
|
+
CountryID: string | null;
|
|
57466
|
+
|
|
57467
|
+
@Field({ nullable: true })
|
|
57468
|
+
StateProvinceID: string | null;
|
|
57469
|
+
|
|
57470
|
+
@Field({ nullable: true })
|
|
57471
|
+
Status?: string;
|
|
57472
|
+
|
|
57473
|
+
@Field({ nullable: true })
|
|
57474
|
+
ErrorMessage: string | null;
|
|
57475
|
+
|
|
57476
|
+
@Field(() => Int, { nullable: true })
|
|
57477
|
+
RetryCount?: number;
|
|
57478
|
+
|
|
57479
|
+
@Field({ nullable: true })
|
|
57480
|
+
SourceFieldHash: string | null;
|
|
57481
|
+
|
|
57482
|
+
@Field({ nullable: true })
|
|
57483
|
+
GeocodedAt: Date | null;
|
|
57484
|
+
|
|
57485
|
+
@Field({ nullable: true })
|
|
57486
|
+
GeocodingSource: string | null;
|
|
57487
|
+
}
|
|
57488
|
+
|
|
57489
|
+
|
|
57490
|
+
//****************************************************************************
|
|
57491
|
+
// INPUT TYPE for MJ: Record Geo Codes
|
|
57492
|
+
//****************************************************************************
|
|
57493
|
+
@InputType()
|
|
57494
|
+
export class UpdateMJRecordGeoCodeInput {
|
|
57495
|
+
@Field()
|
|
57496
|
+
ID: string;
|
|
57497
|
+
|
|
57498
|
+
@Field({ nullable: true })
|
|
57499
|
+
EntityID?: string;
|
|
57500
|
+
|
|
57501
|
+
@Field({ nullable: true })
|
|
57502
|
+
RecordID?: string;
|
|
57503
|
+
|
|
57504
|
+
@Field({ nullable: true })
|
|
57505
|
+
LocationType?: string;
|
|
57506
|
+
|
|
57507
|
+
@Field(() => Float, { nullable: true })
|
|
57508
|
+
Latitude?: number | null;
|
|
57509
|
+
|
|
57510
|
+
@Field(() => Float, { nullable: true })
|
|
57511
|
+
Longitude?: number | null;
|
|
57512
|
+
|
|
57513
|
+
@Field({ nullable: true })
|
|
57514
|
+
Precision?: string | null;
|
|
57515
|
+
|
|
57516
|
+
@Field({ nullable: true })
|
|
57517
|
+
CountryID?: string | null;
|
|
57518
|
+
|
|
57519
|
+
@Field({ nullable: true })
|
|
57520
|
+
StateProvinceID?: string | null;
|
|
57521
|
+
|
|
57522
|
+
@Field({ nullable: true })
|
|
57523
|
+
Status?: string;
|
|
57524
|
+
|
|
57525
|
+
@Field({ nullable: true })
|
|
57526
|
+
ErrorMessage?: string | null;
|
|
57527
|
+
|
|
57528
|
+
@Field(() => Int, { nullable: true })
|
|
57529
|
+
RetryCount?: number;
|
|
57530
|
+
|
|
57531
|
+
@Field({ nullable: true })
|
|
57532
|
+
SourceFieldHash?: string | null;
|
|
57533
|
+
|
|
57534
|
+
@Field({ nullable: true })
|
|
57535
|
+
GeocodedAt?: Date | null;
|
|
57536
|
+
|
|
57537
|
+
@Field({ nullable: true })
|
|
57538
|
+
GeocodingSource?: string | null;
|
|
57539
|
+
|
|
57540
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
57541
|
+
OldValues___?: KeyValuePairInput[];
|
|
57542
|
+
}
|
|
57543
|
+
|
|
57544
|
+
//****************************************************************************
|
|
57545
|
+
// RESOLVER for MJ: Record Geo Codes
|
|
57546
|
+
//****************************************************************************
|
|
57547
|
+
@ObjectType()
|
|
57548
|
+
export class RunMJRecordGeoCodeViewResult {
|
|
57549
|
+
@Field(() => [MJRecordGeoCode_])
|
|
57550
|
+
Results: MJRecordGeoCode_[];
|
|
57551
|
+
|
|
57552
|
+
@Field(() => String, {nullable: true})
|
|
57553
|
+
UserViewRunID?: string;
|
|
57554
|
+
|
|
57555
|
+
@Field(() => Int, {nullable: true})
|
|
57556
|
+
RowCount: number;
|
|
57557
|
+
|
|
57558
|
+
@Field(() => Int, {nullable: true})
|
|
57559
|
+
TotalRowCount: number;
|
|
57560
|
+
|
|
57561
|
+
@Field(() => Int, {nullable: true})
|
|
57562
|
+
ExecutionTime: number;
|
|
57563
|
+
|
|
57564
|
+
@Field({nullable: true})
|
|
57565
|
+
ErrorMessage?: string;
|
|
57566
|
+
|
|
57567
|
+
@Field(() => Boolean, {nullable: false})
|
|
57568
|
+
Success: boolean;
|
|
57569
|
+
}
|
|
57570
|
+
|
|
57571
|
+
@Resolver(MJRecordGeoCode_)
|
|
57572
|
+
export class MJRecordGeoCodeResolver extends ResolverBase {
|
|
57573
|
+
@Query(() => RunMJRecordGeoCodeViewResult)
|
|
57574
|
+
async RunMJRecordGeoCodeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
57575
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57576
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
57577
|
+
}
|
|
57578
|
+
|
|
57579
|
+
@Query(() => RunMJRecordGeoCodeViewResult)
|
|
57580
|
+
async RunMJRecordGeoCodeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
57581
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57582
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
57583
|
+
}
|
|
57584
|
+
|
|
57585
|
+
@Query(() => RunMJRecordGeoCodeViewResult)
|
|
57586
|
+
async RunMJRecordGeoCodeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
57587
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57588
|
+
input.EntityName = 'MJ: Record Geo Codes';
|
|
57589
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
57590
|
+
}
|
|
57591
|
+
@Query(() => MJRecordGeoCode_, { nullable: true })
|
|
57592
|
+
async MJRecordGeoCode(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordGeoCode_ | null> {
|
|
57593
|
+
this.CheckUserReadPermissions('MJ: Record Geo Codes', userPayload);
|
|
57594
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57595
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordGeoCodes')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Geo Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
57596
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
57597
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Record Geo Codes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
57598
|
+
return result;
|
|
57599
|
+
}
|
|
57600
|
+
|
|
57601
|
+
@Mutation(() => MJRecordGeoCode_)
|
|
57602
|
+
async CreateMJRecordGeoCode(
|
|
57603
|
+
@Arg('input', () => CreateMJRecordGeoCodeInput) input: CreateMJRecordGeoCodeInput,
|
|
57604
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
57605
|
+
@PubSub() pubSub: PubSubEngine
|
|
57606
|
+
) {
|
|
57607
|
+
const provider = GetReadWriteProvider(providers);
|
|
57608
|
+
return this.CreateRecord('MJ: Record Geo Codes', input, provider, userPayload, pubSub)
|
|
57609
|
+
}
|
|
57610
|
+
|
|
57611
|
+
@Mutation(() => MJRecordGeoCode_)
|
|
57612
|
+
async UpdateMJRecordGeoCode(
|
|
57613
|
+
@Arg('input', () => UpdateMJRecordGeoCodeInput) input: UpdateMJRecordGeoCodeInput,
|
|
57614
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
57615
|
+
@PubSub() pubSub: PubSubEngine
|
|
57616
|
+
) {
|
|
57617
|
+
const provider = GetReadWriteProvider(providers);
|
|
57618
|
+
return this.UpdateRecord('MJ: Record Geo Codes', input, provider, userPayload, pubSub);
|
|
57619
|
+
}
|
|
57620
|
+
|
|
57621
|
+
@Mutation(() => MJRecordGeoCode_)
|
|
57622
|
+
async DeleteMJRecordGeoCode(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
57623
|
+
const provider = GetReadWriteProvider(providers);
|
|
57624
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
57625
|
+
return this.DeleteRecord('MJ: Record Geo Codes', key, options, provider, userPayload, pubSub);
|
|
57626
|
+
}
|
|
57627
|
+
|
|
57628
|
+
}
|
|
57629
|
+
|
|
56243
57630
|
//****************************************************************************
|
|
56244
57631
|
// ENTITY CLASS for MJ: Record Links
|
|
56245
57632
|
//****************************************************************************
|
|
@@ -58652,6 +60039,12 @@ export class MJRole_ {
|
|
|
58652
60039
|
@Field(() => [MJMCPServerConnectionPermission_])
|
|
58653
60040
|
MJMCPServerConnectionPermissions_RoleIDArray: MJMCPServerConnectionPermission_[]; // Link to MJMCPServerConnectionPermissions
|
|
58654
60041
|
|
|
60042
|
+
@Field(() => [MJFileStorageAccountPermission_])
|
|
60043
|
+
MJFileStorageAccountPermissions_RoleIDArray: MJFileStorageAccountPermission_[]; // Link to MJFileStorageAccountPermissions
|
|
60044
|
+
|
|
60045
|
+
@Field(() => [MJApplicationRole_])
|
|
60046
|
+
MJApplicationRoles_RoleIDArray: MJApplicationRole_[]; // Link to MJApplicationRoles
|
|
60047
|
+
|
|
58655
60048
|
@Field(() => [MJAIAgentPermission_])
|
|
58656
60049
|
MJAIAgentPermissions_RoleIDArray: MJAIAgentPermission_[]; // Link to MJAIAgentPermissions
|
|
58657
60050
|
|
|
@@ -58840,6 +60233,26 @@ export class MJRoleResolver extends ResolverBase {
|
|
|
58840
60233
|
return result;
|
|
58841
60234
|
}
|
|
58842
60235
|
|
|
60236
|
+
@FieldResolver(() => [MJFileStorageAccountPermission_])
|
|
60237
|
+
async MJFileStorageAccountPermissions_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
60238
|
+
this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
|
|
60239
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
60240
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwFileStorageAccountPermissions')} WHERE ${provider.QuoteIdentifier('RoleID')}='${mjrole_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: File Storage Account Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
60241
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
60242
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
60243
|
+
return result;
|
|
60244
|
+
}
|
|
60245
|
+
|
|
60246
|
+
@FieldResolver(() => [MJApplicationRole_])
|
|
60247
|
+
async MJApplicationRoles_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
60248
|
+
this.CheckUserReadPermissions('MJ: Application Roles', userPayload);
|
|
60249
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
60250
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwApplicationRoles')} WHERE ${provider.QuoteIdentifier('RoleID')}='${mjrole_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Application Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
60251
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
60252
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Application Roles', rows, this.GetUserFromPayload(userPayload));
|
|
60253
|
+
return result;
|
|
60254
|
+
}
|
|
60255
|
+
|
|
58843
60256
|
@FieldResolver(() => [MJAIAgentPermission_])
|
|
58844
60257
|
async MJAIAgentPermissions_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
58845
60258
|
this.CheckUserReadPermissions('MJ: AI Agent Permissions', userPayload);
|
|
@@ -60589,6 +62002,249 @@ export class MJSchemaInfoResolver extends ResolverBase {
|
|
|
60589
62002
|
|
|
60590
62003
|
}
|
|
60591
62004
|
|
|
62005
|
+
//****************************************************************************
|
|
62006
|
+
// ENTITY CLASS for MJ: Search Providers
|
|
62007
|
+
//****************************************************************************
|
|
62008
|
+
@ObjectType()
|
|
62009
|
+
export class MJSearchProvider_ {
|
|
62010
|
+
@Field()
|
|
62011
|
+
@MaxLength(36)
|
|
62012
|
+
ID: string;
|
|
62013
|
+
|
|
62014
|
+
@Field({description: `Display name for this search provider (e.g., "Vector Search", "Algolia")`})
|
|
62015
|
+
@MaxLength(200)
|
|
62016
|
+
Name: string;
|
|
62017
|
+
|
|
62018
|
+
@Field({nullable: true, description: `Human-readable description of what this provider searches and how it works`})
|
|
62019
|
+
Description?: string;
|
|
62020
|
+
|
|
62021
|
+
@Field({description: `ClassFactory key used with @RegisterClass(ISearchProvider, DriverClass) to instantiate the provider at runtime`})
|
|
62022
|
+
@MaxLength(500)
|
|
62023
|
+
DriverClass: string;
|
|
62024
|
+
|
|
62025
|
+
@Field({description: `Provider lifecycle status: Pending (not yet activated), Active (in use), Terminated (disabled)`})
|
|
62026
|
+
@MaxLength(20)
|
|
62027
|
+
Status: string;
|
|
62028
|
+
|
|
62029
|
+
@Field(() => Int, {description: `Execution priority (lower = higher priority). Controls provider ordering and can influence RRF weighting. Must be >= 0.`})
|
|
62030
|
+
Priority: number;
|
|
62031
|
+
|
|
62032
|
+
@Field(() => Boolean, {description: `Whether this provider should run during fast preview/autocomplete searches. Expensive providers (external APIs) may set this to 0.`})
|
|
62033
|
+
SupportsPreview: boolean;
|
|
62034
|
+
|
|
62035
|
+
@Field(() => Int, {nullable: true, description: `Optional per-provider cap on the number of results to return. Useful for rate-limited or pay-per-query external APIs. When NULL, uses the SearchEngine default.`})
|
|
62036
|
+
MaxResultsOverride?: number;
|
|
62037
|
+
|
|
62038
|
+
@Field({nullable: true, description: `Optional JSON configuration blob for provider-specific settings (e.g., API endpoints, index names, tuning parameters). Schema is provider-defined.`})
|
|
62039
|
+
ProviderConfig?: string;
|
|
62040
|
+
|
|
62041
|
+
@Field({nullable: true, description: `Optional FK to the Credential entity for providers that require authentication (e.g., Algolia API key, external service credentials)`})
|
|
62042
|
+
@MaxLength(36)
|
|
62043
|
+
CredentialID?: string;
|
|
62044
|
+
|
|
62045
|
+
@Field({nullable: true, description: `UI display name for this provider shown in filter facets and result grouping (e.g., "Database", "Semantic Search"). When NULL, falls back to the Name column.`})
|
|
62046
|
+
@MaxLength(200)
|
|
62047
|
+
DisplayName?: string;
|
|
62048
|
+
|
|
62049
|
+
@Field({nullable: true, description: `CSS icon class for UI display in filter facets and result badges (e.g., "fa-solid fa-database", "fa-solid fa-brain"). Supports any CSS-based icon library. When NULL, a default icon is used.`})
|
|
62050
|
+
@MaxLength(200)
|
|
62051
|
+
Icon?: string;
|
|
62052
|
+
|
|
62053
|
+
@Field({nullable: true, description: `Free-form notes about this provider configuration`})
|
|
62054
|
+
Comments?: string;
|
|
62055
|
+
|
|
62056
|
+
@Field()
|
|
62057
|
+
_mj__CreatedAt: Date;
|
|
62058
|
+
|
|
62059
|
+
@Field()
|
|
62060
|
+
_mj__UpdatedAt: Date;
|
|
62061
|
+
|
|
62062
|
+
@Field({nullable: true})
|
|
62063
|
+
@MaxLength(200)
|
|
62064
|
+
Credential?: string;
|
|
62065
|
+
|
|
62066
|
+
}
|
|
62067
|
+
|
|
62068
|
+
//****************************************************************************
|
|
62069
|
+
// INPUT TYPE for MJ: Search Providers
|
|
62070
|
+
//****************************************************************************
|
|
62071
|
+
@InputType()
|
|
62072
|
+
export class CreateMJSearchProviderInput {
|
|
62073
|
+
@Field({ nullable: true })
|
|
62074
|
+
ID?: string;
|
|
62075
|
+
|
|
62076
|
+
@Field({ nullable: true })
|
|
62077
|
+
Name?: string;
|
|
62078
|
+
|
|
62079
|
+
@Field({ nullable: true })
|
|
62080
|
+
Description: string | null;
|
|
62081
|
+
|
|
62082
|
+
@Field({ nullable: true })
|
|
62083
|
+
DriverClass?: string;
|
|
62084
|
+
|
|
62085
|
+
@Field({ nullable: true })
|
|
62086
|
+
Status?: string;
|
|
62087
|
+
|
|
62088
|
+
@Field(() => Int, { nullable: true })
|
|
62089
|
+
Priority?: number;
|
|
62090
|
+
|
|
62091
|
+
@Field(() => Boolean, { nullable: true })
|
|
62092
|
+
SupportsPreview?: boolean;
|
|
62093
|
+
|
|
62094
|
+
@Field(() => Int, { nullable: true })
|
|
62095
|
+
MaxResultsOverride: number | null;
|
|
62096
|
+
|
|
62097
|
+
@Field({ nullable: true })
|
|
62098
|
+
ProviderConfig: string | null;
|
|
62099
|
+
|
|
62100
|
+
@Field({ nullable: true })
|
|
62101
|
+
CredentialID: string | null;
|
|
62102
|
+
|
|
62103
|
+
@Field({ nullable: true })
|
|
62104
|
+
DisplayName: string | null;
|
|
62105
|
+
|
|
62106
|
+
@Field({ nullable: true })
|
|
62107
|
+
Icon: string | null;
|
|
62108
|
+
|
|
62109
|
+
@Field({ nullable: true })
|
|
62110
|
+
Comments: string | null;
|
|
62111
|
+
}
|
|
62112
|
+
|
|
62113
|
+
|
|
62114
|
+
//****************************************************************************
|
|
62115
|
+
// INPUT TYPE for MJ: Search Providers
|
|
62116
|
+
//****************************************************************************
|
|
62117
|
+
@InputType()
|
|
62118
|
+
export class UpdateMJSearchProviderInput {
|
|
62119
|
+
@Field()
|
|
62120
|
+
ID: string;
|
|
62121
|
+
|
|
62122
|
+
@Field({ nullable: true })
|
|
62123
|
+
Name?: string;
|
|
62124
|
+
|
|
62125
|
+
@Field({ nullable: true })
|
|
62126
|
+
Description?: string | null;
|
|
62127
|
+
|
|
62128
|
+
@Field({ nullable: true })
|
|
62129
|
+
DriverClass?: string;
|
|
62130
|
+
|
|
62131
|
+
@Field({ nullable: true })
|
|
62132
|
+
Status?: string;
|
|
62133
|
+
|
|
62134
|
+
@Field(() => Int, { nullable: true })
|
|
62135
|
+
Priority?: number;
|
|
62136
|
+
|
|
62137
|
+
@Field(() => Boolean, { nullable: true })
|
|
62138
|
+
SupportsPreview?: boolean;
|
|
62139
|
+
|
|
62140
|
+
@Field(() => Int, { nullable: true })
|
|
62141
|
+
MaxResultsOverride?: number | null;
|
|
62142
|
+
|
|
62143
|
+
@Field({ nullable: true })
|
|
62144
|
+
ProviderConfig?: string | null;
|
|
62145
|
+
|
|
62146
|
+
@Field({ nullable: true })
|
|
62147
|
+
CredentialID?: string | null;
|
|
62148
|
+
|
|
62149
|
+
@Field({ nullable: true })
|
|
62150
|
+
DisplayName?: string | null;
|
|
62151
|
+
|
|
62152
|
+
@Field({ nullable: true })
|
|
62153
|
+
Icon?: string | null;
|
|
62154
|
+
|
|
62155
|
+
@Field({ nullable: true })
|
|
62156
|
+
Comments?: string | null;
|
|
62157
|
+
|
|
62158
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
62159
|
+
OldValues___?: KeyValuePairInput[];
|
|
62160
|
+
}
|
|
62161
|
+
|
|
62162
|
+
//****************************************************************************
|
|
62163
|
+
// RESOLVER for MJ: Search Providers
|
|
62164
|
+
//****************************************************************************
|
|
62165
|
+
@ObjectType()
|
|
62166
|
+
export class RunMJSearchProviderViewResult {
|
|
62167
|
+
@Field(() => [MJSearchProvider_])
|
|
62168
|
+
Results: MJSearchProvider_[];
|
|
62169
|
+
|
|
62170
|
+
@Field(() => String, {nullable: true})
|
|
62171
|
+
UserViewRunID?: string;
|
|
62172
|
+
|
|
62173
|
+
@Field(() => Int, {nullable: true})
|
|
62174
|
+
RowCount: number;
|
|
62175
|
+
|
|
62176
|
+
@Field(() => Int, {nullable: true})
|
|
62177
|
+
TotalRowCount: number;
|
|
62178
|
+
|
|
62179
|
+
@Field(() => Int, {nullable: true})
|
|
62180
|
+
ExecutionTime: number;
|
|
62181
|
+
|
|
62182
|
+
@Field({nullable: true})
|
|
62183
|
+
ErrorMessage?: string;
|
|
62184
|
+
|
|
62185
|
+
@Field(() => Boolean, {nullable: false})
|
|
62186
|
+
Success: boolean;
|
|
62187
|
+
}
|
|
62188
|
+
|
|
62189
|
+
@Resolver(MJSearchProvider_)
|
|
62190
|
+
export class MJSearchProviderResolver extends ResolverBase {
|
|
62191
|
+
@Query(() => RunMJSearchProviderViewResult)
|
|
62192
|
+
async RunMJSearchProviderViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62193
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62194
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
62195
|
+
}
|
|
62196
|
+
|
|
62197
|
+
@Query(() => RunMJSearchProviderViewResult)
|
|
62198
|
+
async RunMJSearchProviderViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62199
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62200
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
62201
|
+
}
|
|
62202
|
+
|
|
62203
|
+
@Query(() => RunMJSearchProviderViewResult)
|
|
62204
|
+
async RunMJSearchProviderDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62205
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62206
|
+
input.EntityName = 'MJ: Search Providers';
|
|
62207
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
62208
|
+
}
|
|
62209
|
+
@Query(() => MJSearchProvider_, { nullable: true })
|
|
62210
|
+
async MJSearchProvider(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJSearchProvider_ | null> {
|
|
62211
|
+
this.CheckUserReadPermissions('MJ: Search Providers', userPayload);
|
|
62212
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62213
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchProviders')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Providers', userPayload, EntityPermissionType.Read, 'AND');
|
|
62214
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
62215
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Providers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
62216
|
+
return result;
|
|
62217
|
+
}
|
|
62218
|
+
|
|
62219
|
+
@Mutation(() => MJSearchProvider_)
|
|
62220
|
+
async CreateMJSearchProvider(
|
|
62221
|
+
@Arg('input', () => CreateMJSearchProviderInput) input: CreateMJSearchProviderInput,
|
|
62222
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62223
|
+
@PubSub() pubSub: PubSubEngine
|
|
62224
|
+
) {
|
|
62225
|
+
const provider = GetReadWriteProvider(providers);
|
|
62226
|
+
return this.CreateRecord('MJ: Search Providers', input, provider, userPayload, pubSub)
|
|
62227
|
+
}
|
|
62228
|
+
|
|
62229
|
+
@Mutation(() => MJSearchProvider_)
|
|
62230
|
+
async UpdateMJSearchProvider(
|
|
62231
|
+
@Arg('input', () => UpdateMJSearchProviderInput) input: UpdateMJSearchProviderInput,
|
|
62232
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62233
|
+
@PubSub() pubSub: PubSubEngine
|
|
62234
|
+
) {
|
|
62235
|
+
const provider = GetReadWriteProvider(providers);
|
|
62236
|
+
return this.UpdateRecord('MJ: Search Providers', input, provider, userPayload, pubSub);
|
|
62237
|
+
}
|
|
62238
|
+
|
|
62239
|
+
@Mutation(() => MJSearchProvider_)
|
|
62240
|
+
async DeleteMJSearchProvider(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62241
|
+
const provider = GetReadWriteProvider(providers);
|
|
62242
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
62243
|
+
return this.DeleteRecord('MJ: Search Providers', key, options, provider, userPayload, pubSub);
|
|
62244
|
+
}
|
|
62245
|
+
|
|
62246
|
+
}
|
|
62247
|
+
|
|
60592
62248
|
//****************************************************************************
|
|
60593
62249
|
// ENTITY CLASS for MJ: Skills
|
|
60594
62250
|
//****************************************************************************
|
|
@@ -61008,6 +62664,224 @@ export class MJSQLDialectResolver extends ResolverBase {
|
|
|
61008
62664
|
|
|
61009
62665
|
}
|
|
61010
62666
|
|
|
62667
|
+
//****************************************************************************
|
|
62668
|
+
// ENTITY CLASS for MJ: State Provinces
|
|
62669
|
+
//****************************************************************************
|
|
62670
|
+
@ObjectType({ description: `Reference table for states, provinces, and first-level administrative divisions. Linked to Country via FK. Seeded with ~5,000 records with ISO 3166-2 codes, centroids, and optional boundary GeoJSON.` })
|
|
62671
|
+
export class MJStateProvince_ {
|
|
62672
|
+
@Field()
|
|
62673
|
+
@MaxLength(36)
|
|
62674
|
+
ID: string;
|
|
62675
|
+
|
|
62676
|
+
@Field({description: `Foreign key to Country. Establishes the parent country for this state/province.`})
|
|
62677
|
+
@MaxLength(36)
|
|
62678
|
+
CountryID: string;
|
|
62679
|
+
|
|
62680
|
+
@Field({description: `Full state/province name (e.g., "California", "Ontario").`})
|
|
62681
|
+
@MaxLength(200)
|
|
62682
|
+
Name: string;
|
|
62683
|
+
|
|
62684
|
+
@Field({description: `Short code within the country (e.g., "CA", "ON"). Unique per country via compound constraint.`})
|
|
62685
|
+
@MaxLength(10)
|
|
62686
|
+
Code: string;
|
|
62687
|
+
|
|
62688
|
+
@Field({description: `ISO 3166-2 subdivision code (e.g., "US-CA", "CA-ON"). Globally unique.`})
|
|
62689
|
+
@MaxLength(10)
|
|
62690
|
+
ISO3166_2: string;
|
|
62691
|
+
|
|
62692
|
+
@Field(() => Float, {nullable: true, description: `Geographic centroid latitude. Used as fallback point for state-level geocoding.`})
|
|
62693
|
+
Latitude?: number;
|
|
62694
|
+
|
|
62695
|
+
@Field(() => Float, {nullable: true, description: `Geographic centroid longitude. Used as fallback point for state-level geocoding.`})
|
|
62696
|
+
Longitude?: number;
|
|
62697
|
+
|
|
62698
|
+
@Field({nullable: true, description: `Medium-resolution (~50m) GeoJSON boundary polygon for choropleth map rendering. Nullable. Total ~15-20MB for all states/provinces worldwide.`})
|
|
62699
|
+
BoundaryGeoJSON?: string;
|
|
62700
|
+
|
|
62701
|
+
@Field({nullable: true, description: `JSON array of common aliases (e.g., ["Calif.","California","Cal"]). Used by GeoResolver for fuzzy text-to-state matching.`})
|
|
62702
|
+
CommonAliases?: string;
|
|
62703
|
+
|
|
62704
|
+
@Field()
|
|
62705
|
+
_mj__CreatedAt: Date;
|
|
62706
|
+
|
|
62707
|
+
@Field()
|
|
62708
|
+
_mj__UpdatedAt: Date;
|
|
62709
|
+
|
|
62710
|
+
@Field()
|
|
62711
|
+
@MaxLength(200)
|
|
62712
|
+
Country: string;
|
|
62713
|
+
|
|
62714
|
+
@Field(() => [MJRecordGeoCode_])
|
|
62715
|
+
MJRecordGeoCodes_StateProvinceIDArray: MJRecordGeoCode_[]; // Link to MJRecordGeoCodes
|
|
62716
|
+
|
|
62717
|
+
}
|
|
62718
|
+
|
|
62719
|
+
//****************************************************************************
|
|
62720
|
+
// INPUT TYPE for MJ: State Provinces
|
|
62721
|
+
//****************************************************************************
|
|
62722
|
+
@InputType()
|
|
62723
|
+
export class CreateMJStateProvinceInput {
|
|
62724
|
+
@Field({ nullable: true })
|
|
62725
|
+
ID?: string;
|
|
62726
|
+
|
|
62727
|
+
@Field({ nullable: true })
|
|
62728
|
+
CountryID?: string;
|
|
62729
|
+
|
|
62730
|
+
@Field({ nullable: true })
|
|
62731
|
+
Name?: string;
|
|
62732
|
+
|
|
62733
|
+
@Field({ nullable: true })
|
|
62734
|
+
Code?: string;
|
|
62735
|
+
|
|
62736
|
+
@Field({ nullable: true })
|
|
62737
|
+
ISO3166_2?: string;
|
|
62738
|
+
|
|
62739
|
+
@Field(() => Float, { nullable: true })
|
|
62740
|
+
Latitude: number | null;
|
|
62741
|
+
|
|
62742
|
+
@Field(() => Float, { nullable: true })
|
|
62743
|
+
Longitude: number | null;
|
|
62744
|
+
|
|
62745
|
+
@Field({ nullable: true })
|
|
62746
|
+
BoundaryGeoJSON: string | null;
|
|
62747
|
+
|
|
62748
|
+
@Field({ nullable: true })
|
|
62749
|
+
CommonAliases: string | null;
|
|
62750
|
+
}
|
|
62751
|
+
|
|
62752
|
+
|
|
62753
|
+
//****************************************************************************
|
|
62754
|
+
// INPUT TYPE for MJ: State Provinces
|
|
62755
|
+
//****************************************************************************
|
|
62756
|
+
@InputType()
|
|
62757
|
+
export class UpdateMJStateProvinceInput {
|
|
62758
|
+
@Field()
|
|
62759
|
+
ID: string;
|
|
62760
|
+
|
|
62761
|
+
@Field({ nullable: true })
|
|
62762
|
+
CountryID?: string;
|
|
62763
|
+
|
|
62764
|
+
@Field({ nullable: true })
|
|
62765
|
+
Name?: string;
|
|
62766
|
+
|
|
62767
|
+
@Field({ nullable: true })
|
|
62768
|
+
Code?: string;
|
|
62769
|
+
|
|
62770
|
+
@Field({ nullable: true })
|
|
62771
|
+
ISO3166_2?: string;
|
|
62772
|
+
|
|
62773
|
+
@Field(() => Float, { nullable: true })
|
|
62774
|
+
Latitude?: number | null;
|
|
62775
|
+
|
|
62776
|
+
@Field(() => Float, { nullable: true })
|
|
62777
|
+
Longitude?: number | null;
|
|
62778
|
+
|
|
62779
|
+
@Field({ nullable: true })
|
|
62780
|
+
BoundaryGeoJSON?: string | null;
|
|
62781
|
+
|
|
62782
|
+
@Field({ nullable: true })
|
|
62783
|
+
CommonAliases?: string | null;
|
|
62784
|
+
|
|
62785
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
62786
|
+
OldValues___?: KeyValuePairInput[];
|
|
62787
|
+
}
|
|
62788
|
+
|
|
62789
|
+
//****************************************************************************
|
|
62790
|
+
// RESOLVER for MJ: State Provinces
|
|
62791
|
+
//****************************************************************************
|
|
62792
|
+
@ObjectType()
|
|
62793
|
+
export class RunMJStateProvinceViewResult {
|
|
62794
|
+
@Field(() => [MJStateProvince_])
|
|
62795
|
+
Results: MJStateProvince_[];
|
|
62796
|
+
|
|
62797
|
+
@Field(() => String, {nullable: true})
|
|
62798
|
+
UserViewRunID?: string;
|
|
62799
|
+
|
|
62800
|
+
@Field(() => Int, {nullable: true})
|
|
62801
|
+
RowCount: number;
|
|
62802
|
+
|
|
62803
|
+
@Field(() => Int, {nullable: true})
|
|
62804
|
+
TotalRowCount: number;
|
|
62805
|
+
|
|
62806
|
+
@Field(() => Int, {nullable: true})
|
|
62807
|
+
ExecutionTime: number;
|
|
62808
|
+
|
|
62809
|
+
@Field({nullable: true})
|
|
62810
|
+
ErrorMessage?: string;
|
|
62811
|
+
|
|
62812
|
+
@Field(() => Boolean, {nullable: false})
|
|
62813
|
+
Success: boolean;
|
|
62814
|
+
}
|
|
62815
|
+
|
|
62816
|
+
@Resolver(MJStateProvince_)
|
|
62817
|
+
export class MJStateProvinceResolver extends ResolverBase {
|
|
62818
|
+
@Query(() => RunMJStateProvinceViewResult)
|
|
62819
|
+
async RunMJStateProvinceViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62820
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62821
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
62822
|
+
}
|
|
62823
|
+
|
|
62824
|
+
@Query(() => RunMJStateProvinceViewResult)
|
|
62825
|
+
async RunMJStateProvinceViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62826
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62827
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
62828
|
+
}
|
|
62829
|
+
|
|
62830
|
+
@Query(() => RunMJStateProvinceViewResult)
|
|
62831
|
+
async RunMJStateProvinceDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62832
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62833
|
+
input.EntityName = 'MJ: State Provinces';
|
|
62834
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
62835
|
+
}
|
|
62836
|
+
@Query(() => MJStateProvince_, { nullable: true })
|
|
62837
|
+
async MJStateProvince(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJStateProvince_ | null> {
|
|
62838
|
+
this.CheckUserReadPermissions('MJ: State Provinces', userPayload);
|
|
62839
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62840
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwStateProvinces')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: State Provinces', userPayload, EntityPermissionType.Read, 'AND');
|
|
62841
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
62842
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: State Provinces', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
62843
|
+
return result;
|
|
62844
|
+
}
|
|
62845
|
+
|
|
62846
|
+
@FieldResolver(() => [MJRecordGeoCode_])
|
|
62847
|
+
async MJRecordGeoCodes_StateProvinceIDArray(@Root() mjstateprovince_: MJStateProvince_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62848
|
+
this.CheckUserReadPermissions('MJ: Record Geo Codes', userPayload);
|
|
62849
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62850
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordGeoCodes')} WHERE ${provider.QuoteIdentifier('StateProvinceID')}='${mjstateprovince_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Geo Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
62851
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
62852
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Geo Codes', rows, this.GetUserFromPayload(userPayload));
|
|
62853
|
+
return result;
|
|
62854
|
+
}
|
|
62855
|
+
|
|
62856
|
+
@Mutation(() => MJStateProvince_)
|
|
62857
|
+
async CreateMJStateProvince(
|
|
62858
|
+
@Arg('input', () => CreateMJStateProvinceInput) input: CreateMJStateProvinceInput,
|
|
62859
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62860
|
+
@PubSub() pubSub: PubSubEngine
|
|
62861
|
+
) {
|
|
62862
|
+
const provider = GetReadWriteProvider(providers);
|
|
62863
|
+
return this.CreateRecord('MJ: State Provinces', input, provider, userPayload, pubSub)
|
|
62864
|
+
}
|
|
62865
|
+
|
|
62866
|
+
@Mutation(() => MJStateProvince_)
|
|
62867
|
+
async UpdateMJStateProvince(
|
|
62868
|
+
@Arg('input', () => UpdateMJStateProvinceInput) input: UpdateMJStateProvinceInput,
|
|
62869
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62870
|
+
@PubSub() pubSub: PubSubEngine
|
|
62871
|
+
) {
|
|
62872
|
+
const provider = GetReadWriteProvider(providers);
|
|
62873
|
+
return this.UpdateRecord('MJ: State Provinces', input, provider, userPayload, pubSub);
|
|
62874
|
+
}
|
|
62875
|
+
|
|
62876
|
+
@Mutation(() => MJStateProvince_)
|
|
62877
|
+
async DeleteMJStateProvince(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62878
|
+
const provider = GetReadWriteProvider(providers);
|
|
62879
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
62880
|
+
return this.DeleteRecord('MJ: State Provinces', key, options, provider, userPayload, pubSub);
|
|
62881
|
+
}
|
|
62882
|
+
|
|
62883
|
+
}
|
|
62884
|
+
|
|
61011
62885
|
//****************************************************************************
|
|
61012
62886
|
// ENTITY CLASS for MJ: Tag Audit Logs
|
|
61013
62887
|
//****************************************************************************
|
|
@@ -69180,6 +71054,9 @@ export class MJUser_ {
|
|
|
69180
71054
|
@Field(() => [MJDuplicateRun_])
|
|
69181
71055
|
MJDuplicateRuns_ApprovedByUserIDArray: MJDuplicateRun_[]; // Link to MJDuplicateRuns
|
|
69182
71056
|
|
|
71057
|
+
@Field(() => [MJFileStorageAccountPermission_])
|
|
71058
|
+
MJFileStorageAccountPermissions_UserIDArray: MJFileStorageAccountPermission_[]; // Link to MJFileStorageAccountPermissions
|
|
71059
|
+
|
|
69183
71060
|
@Field(() => [MJAIAgentRun_])
|
|
69184
71061
|
MJAIAgentRuns_UserIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
69185
71062
|
|
|
@@ -70163,6 +72040,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
70163
72040
|
return result;
|
|
70164
72041
|
}
|
|
70165
72042
|
|
|
72043
|
+
@FieldResolver(() => [MJFileStorageAccountPermission_])
|
|
72044
|
+
async MJFileStorageAccountPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
72045
|
+
this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
|
|
72046
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
72047
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwFileStorageAccountPermissions')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: File Storage Account Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
72048
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
72049
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
72050
|
+
return result;
|
|
72051
|
+
}
|
|
72052
|
+
|
|
70166
72053
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
70167
72054
|
async MJAIAgentRuns_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
70168
72055
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -70305,6 +72192,14 @@ export class MJVectorDatabase_ {
|
|
|
70305
72192
|
@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.`})
|
|
70306
72193
|
Configuration?: string;
|
|
70307
72194
|
|
|
72195
|
+
@Field({nullable: true, description: `Optional link to a stored credential containing the API key and any other authentication details for this vector database provider. When set, the Credential Engine decrypts and supplies the key at runtime. When NULL, the system falls back to the environment variable AI_VENDOR_API_KEY__<ClassKey>.`})
|
|
72196
|
+
@MaxLength(36)
|
|
72197
|
+
CredentialID?: string;
|
|
72198
|
+
|
|
72199
|
+
@Field({nullable: true})
|
|
72200
|
+
@MaxLength(200)
|
|
72201
|
+
Credential?: string;
|
|
72202
|
+
|
|
70308
72203
|
@Field(() => [MJVectorIndex_])
|
|
70309
72204
|
MJVectorIndexes_VectorDatabaseIDArray: MJVectorIndex_[]; // Link to MJVectorIndexes
|
|
70310
72205
|
|
|
@@ -70335,6 +72230,9 @@ export class CreateMJVectorDatabaseInput {
|
|
|
70335
72230
|
|
|
70336
72231
|
@Field({ nullable: true })
|
|
70337
72232
|
Configuration: string | null;
|
|
72233
|
+
|
|
72234
|
+
@Field({ nullable: true })
|
|
72235
|
+
CredentialID: string | null;
|
|
70338
72236
|
}
|
|
70339
72237
|
|
|
70340
72238
|
|
|
@@ -70361,6 +72259,9 @@ export class UpdateMJVectorDatabaseInput {
|
|
|
70361
72259
|
@Field({ nullable: true })
|
|
70362
72260
|
Configuration?: string | null;
|
|
70363
72261
|
|
|
72262
|
+
@Field({ nullable: true })
|
|
72263
|
+
CredentialID?: string | null;
|
|
72264
|
+
|
|
70364
72265
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
70365
72266
|
OldValues___?: KeyValuePairInput[];
|
|
70366
72267
|
}
|