@memberjunction/server 5.24.0 → 5.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/agents/skip-sdk.d.ts +12 -0
  2. package/dist/agents/skip-sdk.d.ts.map +1 -1
  3. package/dist/agents/skip-sdk.js +70 -1
  4. package/dist/agents/skip-sdk.js.map +1 -1
  5. package/dist/generated/generated.d.ts +492 -0
  6. package/dist/generated/generated.d.ts.map +1 -1
  7. package/dist/generated/generated.js +2731 -0
  8. package/dist/generated/generated.js.map +1 -1
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/resolvers/ArtifactFileResolver.d.ts +15 -0
  14. package/dist/resolvers/ArtifactFileResolver.d.ts.map +1 -0
  15. package/dist/resolvers/ArtifactFileResolver.js +74 -0
  16. package/dist/resolvers/ArtifactFileResolver.js.map +1 -0
  17. package/dist/resolvers/AutotagPipelineResolver.d.ts +13 -0
  18. package/dist/resolvers/AutotagPipelineResolver.d.ts.map +1 -1
  19. package/dist/resolvers/AutotagPipelineResolver.js +103 -3
  20. package/dist/resolvers/AutotagPipelineResolver.js.map +1 -1
  21. package/dist/resolvers/FileResolver.d.ts.map +1 -1
  22. package/dist/resolvers/FileResolver.js +12 -32
  23. package/dist/resolvers/FileResolver.js.map +1 -1
  24. package/dist/resolvers/GeoResolver.d.ts +58 -0
  25. package/dist/resolvers/GeoResolver.d.ts.map +1 -0
  26. package/dist/resolvers/GeoResolver.js +302 -0
  27. package/dist/resolvers/GeoResolver.js.map +1 -0
  28. package/dist/resolvers/RunAIAgentResolver.d.ts +13 -1
  29. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  30. package/dist/resolvers/RunAIAgentResolver.js +115 -20
  31. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  32. package/dist/resolvers/SearchKnowledgeResolver.d.ts +21 -80
  33. package/dist/resolvers/SearchKnowledgeResolver.d.ts.map +1 -1
  34. package/dist/resolvers/SearchKnowledgeResolver.js +129 -604
  35. package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -1
  36. package/dist/resolvers/SearchKnowledgeSystemUserResolver.d.ts +19 -0
  37. package/dist/resolvers/SearchKnowledgeSystemUserResolver.d.ts.map +1 -0
  38. package/dist/resolvers/SearchKnowledgeSystemUserResolver.js +149 -0
  39. package/dist/resolvers/SearchKnowledgeSystemUserResolver.js.map +1 -0
  40. package/package.json +63 -63
  41. package/src/__tests__/search-knowledge-tags.test.ts +177 -337
  42. package/src/__tests__/skip-sdk-organic-keys.test.ts +274 -0
  43. package/src/agents/skip-sdk.ts +83 -2
  44. package/src/generated/generated.ts +1884 -1
  45. package/src/index.ts +2 -0
  46. package/src/resolvers/ArtifactFileResolver.ts +71 -0
  47. package/src/resolvers/AutotagPipelineResolver.ts +118 -4
  48. package/src/resolvers/FileResolver.ts +12 -41
  49. package/src/resolvers/GeoResolver.ts +258 -0
  50. package/src/resolvers/RunAIAgentResolver.ts +137 -23
  51. package/src/resolvers/SearchKnowledgeResolver.ts +114 -715
  52. 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,21 @@ 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
+
37158
37714
  @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
37715
  CodeName?: string;
37160
37716
 
@@ -37314,6 +37870,9 @@ export class MJEntity_ {
37314
37870
  @Field(() => [MJEntityOrganicKey_])
37315
37871
  MJEntityOrganicKeys_EntityIDArray: MJEntityOrganicKey_[]; // Link to MJEntityOrganicKeys
37316
37872
 
37873
+ @Field(() => [MJRecordGeoCode_])
37874
+ MJRecordGeoCodes_EntityIDArray: MJRecordGeoCode_[]; // Link to MJRecordGeoCodes
37875
+
37317
37876
  @Field(() => [MJGeneratedCode_])
37318
37877
  MJGeneratedCodes_LinkedEntityIDArray: MJGeneratedCode_[]; // Link to MJGeneratedCodes
37319
37878
 
@@ -37506,6 +38065,21 @@ export class CreateMJEntityInput {
37506
38065
 
37507
38066
  @Field(() => Boolean, { nullable: true })
37508
38067
  AllowMultipleSubtypes?: boolean;
38068
+
38069
+ @Field(() => Boolean, { nullable: true })
38070
+ AutoUpdateFullTextSearch?: boolean;
38071
+
38072
+ @Field(() => Boolean, { nullable: true })
38073
+ AutoUpdateAllowUserSearchAPI?: boolean;
38074
+
38075
+ @Field(() => Boolean, { nullable: true })
38076
+ TrustServerCacheCompletely?: boolean;
38077
+
38078
+ @Field(() => Boolean, { nullable: true })
38079
+ SupportsGeoCoding?: boolean;
38080
+
38081
+ @Field(() => Boolean, { nullable: true })
38082
+ AutoUpdateSupportsGeoCoding?: boolean;
37509
38083
  }
37510
38084
 
37511
38085
 
@@ -37676,6 +38250,21 @@ export class UpdateMJEntityInput {
37676
38250
  @Field(() => Boolean, { nullable: true })
37677
38251
  AllowMultipleSubtypes?: boolean;
37678
38252
 
38253
+ @Field(() => Boolean, { nullable: true })
38254
+ AutoUpdateFullTextSearch?: boolean;
38255
+
38256
+ @Field(() => Boolean, { nullable: true })
38257
+ AutoUpdateAllowUserSearchAPI?: boolean;
38258
+
38259
+ @Field(() => Boolean, { nullable: true })
38260
+ TrustServerCacheCompletely?: boolean;
38261
+
38262
+ @Field(() => Boolean, { nullable: true })
38263
+ SupportsGeoCoding?: boolean;
38264
+
38265
+ @Field(() => Boolean, { nullable: true })
38266
+ AutoUpdateSupportsGeoCoding?: boolean;
38267
+
37679
38268
  @Field(() => [KeyValuePairInput], { nullable: true })
37680
38269
  OldValues___?: KeyValuePairInput[];
37681
38270
  }
@@ -38207,6 +38796,16 @@ export class MJEntityResolverBase extends ResolverBase {
38207
38796
  return result;
38208
38797
  }
38209
38798
 
38799
+ @FieldResolver(() => [MJRecordGeoCode_])
38800
+ async MJRecordGeoCodes_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
38801
+ this.CheckUserReadPermissions('MJ: Record Geo Codes', userPayload);
38802
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
38803
+ 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');
38804
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
38805
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Geo Codes', rows, this.GetUserFromPayload(userPayload));
38806
+ return result;
38807
+ }
38808
+
38210
38809
  @FieldResolver(() => [MJGeneratedCode_])
38211
38810
  async MJGeneratedCodes_LinkedEntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
38212
38811
  this.CheckUserReadPermissions('MJ: Generated Codes', userPayload);
@@ -40997,6 +41596,19 @@ export class MJEntityField_ {
40997
41596
  @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
41597
  JSONTypeDefinition?: string;
40999
41598
 
41599
+ @Field({description: `Search predicate controlling how user search queries match against this field. Valid values: BeginsWith, Contains, EndsWith, Exact.`})
41600
+ @MaxLength(20)
41601
+ UserSearchPredicateAPI: string;
41602
+
41603
+ @Field(() => Boolean, {description: `When true, CodeGen LLM can auto-set the UserSearchPredicateAPI value during code generation runs.`})
41604
+ AutoUpdateUserSearchPredicate: boolean;
41605
+
41606
+ @Field(() => Boolean, {description: `When true, CodeGen LLM can auto-set the FullTextSearchEnabled value during code generation runs.`})
41607
+ AutoUpdateFullTextSearch: boolean;
41608
+
41609
+ @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.`})
41610
+ AutoUpdateExtendedType: boolean;
41611
+
41000
41612
  @Field({nullable: true})
41001
41613
  FieldCodeName?: string;
41002
41614
 
@@ -41191,6 +41803,18 @@ export class CreateMJEntityFieldInput {
41191
41803
 
41192
41804
  @Field({ nullable: true })
41193
41805
  JSONTypeDefinition: string | null;
41806
+
41807
+ @Field({ nullable: true })
41808
+ UserSearchPredicateAPI?: string;
41809
+
41810
+ @Field(() => Boolean, { nullable: true })
41811
+ AutoUpdateUserSearchPredicate?: boolean;
41812
+
41813
+ @Field(() => Boolean, { nullable: true })
41814
+ AutoUpdateFullTextSearch?: boolean;
41815
+
41816
+ @Field(() => Boolean, { nullable: true })
41817
+ AutoUpdateExtendedType?: boolean;
41194
41818
  }
41195
41819
 
41196
41820
 
@@ -41337,6 +41961,18 @@ export class UpdateMJEntityFieldInput {
41337
41961
  @Field({ nullable: true })
41338
41962
  JSONTypeDefinition?: string | null;
41339
41963
 
41964
+ @Field({ nullable: true })
41965
+ UserSearchPredicateAPI?: string;
41966
+
41967
+ @Field(() => Boolean, { nullable: true })
41968
+ AutoUpdateUserSearchPredicate?: boolean;
41969
+
41970
+ @Field(() => Boolean, { nullable: true })
41971
+ AutoUpdateFullTextSearch?: boolean;
41972
+
41973
+ @Field(() => Boolean, { nullable: true })
41974
+ AutoUpdateExtendedType?: boolean;
41975
+
41340
41976
  @Field(() => [KeyValuePairInput], { nullable: true })
41341
41977
  OldValues___?: KeyValuePairInput[];
41342
41978
  }
@@ -44148,6 +44784,201 @@ export class MJFileEntityRecordLinkResolver extends ResolverBase {
44148
44784
 
44149
44785
  }
44150
44786
 
44787
+ //****************************************************************************
44788
+ // ENTITY CLASS for MJ: File Storage Account Permissions
44789
+ //****************************************************************************
44790
+ @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).` })
44791
+ export class MJFileStorageAccountPermission_ {
44792
+ @Field()
44793
+ @MaxLength(36)
44794
+ ID: string;
44795
+
44796
+ @Field({description: `The storage account this permission applies to.`})
44797
+ @MaxLength(36)
44798
+ FileStorageAccountID: string;
44799
+
44800
+ @Field({description: `Permission type: User (requires UserID), Role (requires RoleID), or Everyone (both NULL).`})
44801
+ @MaxLength(20)
44802
+ Type: string;
44803
+
44804
+ @Field({nullable: true, description: `Required when Type is User. The specific user granted access to this storage account.`})
44805
+ @MaxLength(36)
44806
+ UserID?: string;
44807
+
44808
+ @Field({nullable: true, description: `Required when Type is Role. The role granted access to this storage account.`})
44809
+ @MaxLength(36)
44810
+ RoleID?: string;
44811
+
44812
+ @Field(() => Boolean, {description: `Whether the grantee can read/search files in this storage account.`})
44813
+ CanRead: boolean;
44814
+
44815
+ @Field(() => Boolean, {description: `Whether the grantee can upload/modify files in this storage account.`})
44816
+ CanWrite: boolean;
44817
+
44818
+ @Field()
44819
+ _mj__CreatedAt: Date;
44820
+
44821
+ @Field()
44822
+ _mj__UpdatedAt: Date;
44823
+
44824
+ @Field()
44825
+ @MaxLength(200)
44826
+ FileStorageAccount: string;
44827
+
44828
+ @Field({nullable: true})
44829
+ @MaxLength(100)
44830
+ User?: string;
44831
+
44832
+ @Field({nullable: true})
44833
+ @MaxLength(50)
44834
+ Role?: string;
44835
+
44836
+ }
44837
+
44838
+ //****************************************************************************
44839
+ // INPUT TYPE for MJ: File Storage Account Permissions
44840
+ //****************************************************************************
44841
+ @InputType()
44842
+ export class CreateMJFileStorageAccountPermissionInput {
44843
+ @Field({ nullable: true })
44844
+ ID?: string;
44845
+
44846
+ @Field({ nullable: true })
44847
+ FileStorageAccountID?: string;
44848
+
44849
+ @Field({ nullable: true })
44850
+ Type?: string;
44851
+
44852
+ @Field({ nullable: true })
44853
+ UserID: string | null;
44854
+
44855
+ @Field({ nullable: true })
44856
+ RoleID: string | null;
44857
+
44858
+ @Field(() => Boolean, { nullable: true })
44859
+ CanRead?: boolean;
44860
+
44861
+ @Field(() => Boolean, { nullable: true })
44862
+ CanWrite?: boolean;
44863
+ }
44864
+
44865
+
44866
+ //****************************************************************************
44867
+ // INPUT TYPE for MJ: File Storage Account Permissions
44868
+ //****************************************************************************
44869
+ @InputType()
44870
+ export class UpdateMJFileStorageAccountPermissionInput {
44871
+ @Field()
44872
+ ID: string;
44873
+
44874
+ @Field({ nullable: true })
44875
+ FileStorageAccountID?: string;
44876
+
44877
+ @Field({ nullable: true })
44878
+ Type?: string;
44879
+
44880
+ @Field({ nullable: true })
44881
+ UserID?: string | null;
44882
+
44883
+ @Field({ nullable: true })
44884
+ RoleID?: string | null;
44885
+
44886
+ @Field(() => Boolean, { nullable: true })
44887
+ CanRead?: boolean;
44888
+
44889
+ @Field(() => Boolean, { nullable: true })
44890
+ CanWrite?: boolean;
44891
+
44892
+ @Field(() => [KeyValuePairInput], { nullable: true })
44893
+ OldValues___?: KeyValuePairInput[];
44894
+ }
44895
+
44896
+ //****************************************************************************
44897
+ // RESOLVER for MJ: File Storage Account Permissions
44898
+ //****************************************************************************
44899
+ @ObjectType()
44900
+ export class RunMJFileStorageAccountPermissionViewResult {
44901
+ @Field(() => [MJFileStorageAccountPermission_])
44902
+ Results: MJFileStorageAccountPermission_[];
44903
+
44904
+ @Field(() => String, {nullable: true})
44905
+ UserViewRunID?: string;
44906
+
44907
+ @Field(() => Int, {nullable: true})
44908
+ RowCount: number;
44909
+
44910
+ @Field(() => Int, {nullable: true})
44911
+ TotalRowCount: number;
44912
+
44913
+ @Field(() => Int, {nullable: true})
44914
+ ExecutionTime: number;
44915
+
44916
+ @Field({nullable: true})
44917
+ ErrorMessage?: string;
44918
+
44919
+ @Field(() => Boolean, {nullable: false})
44920
+ Success: boolean;
44921
+ }
44922
+
44923
+ @Resolver(MJFileStorageAccountPermission_)
44924
+ export class MJFileStorageAccountPermissionResolver extends ResolverBase {
44925
+ @Query(() => RunMJFileStorageAccountPermissionViewResult)
44926
+ async RunMJFileStorageAccountPermissionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
44927
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
44928
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
44929
+ }
44930
+
44931
+ @Query(() => RunMJFileStorageAccountPermissionViewResult)
44932
+ async RunMJFileStorageAccountPermissionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
44933
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
44934
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
44935
+ }
44936
+
44937
+ @Query(() => RunMJFileStorageAccountPermissionViewResult)
44938
+ async RunMJFileStorageAccountPermissionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
44939
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
44940
+ input.EntityName = 'MJ: File Storage Account Permissions';
44941
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
44942
+ }
44943
+ @Query(() => MJFileStorageAccountPermission_, { nullable: true })
44944
+ async MJFileStorageAccountPermission(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJFileStorageAccountPermission_ | null> {
44945
+ this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
44946
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
44947
+ 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');
44948
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
44949
+ const result = await this.MapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
44950
+ return result;
44951
+ }
44952
+
44953
+ @Mutation(() => MJFileStorageAccountPermission_)
44954
+ async CreateMJFileStorageAccountPermission(
44955
+ @Arg('input', () => CreateMJFileStorageAccountPermissionInput) input: CreateMJFileStorageAccountPermissionInput,
44956
+ @Ctx() { providers, userPayload }: AppContext,
44957
+ @PubSub() pubSub: PubSubEngine
44958
+ ) {
44959
+ const provider = GetReadWriteProvider(providers);
44960
+ return this.CreateRecord('MJ: File Storage Account Permissions', input, provider, userPayload, pubSub)
44961
+ }
44962
+
44963
+ @Mutation(() => MJFileStorageAccountPermission_)
44964
+ async UpdateMJFileStorageAccountPermission(
44965
+ @Arg('input', () => UpdateMJFileStorageAccountPermissionInput) input: UpdateMJFileStorageAccountPermissionInput,
44966
+ @Ctx() { providers, userPayload }: AppContext,
44967
+ @PubSub() pubSub: PubSubEngine
44968
+ ) {
44969
+ const provider = GetReadWriteProvider(providers);
44970
+ return this.UpdateRecord('MJ: File Storage Account Permissions', input, provider, userPayload, pubSub);
44971
+ }
44972
+
44973
+ @Mutation(() => MJFileStorageAccountPermission_)
44974
+ async DeleteMJFileStorageAccountPermission(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
44975
+ const provider = GetReadWriteProvider(providers);
44976
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
44977
+ return this.DeleteRecord('MJ: File Storage Account Permissions', key, options, provider, userPayload, pubSub);
44978
+ }
44979
+
44980
+ }
44981
+
44151
44982
  //****************************************************************************
44152
44983
  // ENTITY CLASS for MJ: File Storage Accounts
44153
44984
  //****************************************************************************
@@ -44178,6 +45009,9 @@ export class MJFileStorageAccount_ {
44178
45009
  @Field()
44179
45010
  _mj__UpdatedAt: Date;
44180
45011
 
45012
+ @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).`})
45013
+ IncludeInGlobalSearch: boolean;
45014
+
44181
45015
  @Field()
44182
45016
  @MaxLength(50)
44183
45017
  Provider: string;
@@ -44186,6 +45020,18 @@ export class MJFileStorageAccount_ {
44186
45020
  @MaxLength(200)
44187
45021
  Credential: string;
44188
45022
 
45023
+ @Field(() => [MJAIAgentType_])
45024
+ MJAIAgentTypes_DefaultStorageAccountIDArray: MJAIAgentType_[]; // Link to MJAIAgentTypes
45025
+
45026
+ @Field(() => [MJFileStorageAccountPermission_])
45027
+ MJFileStorageAccountPermissions_FileStorageAccountIDArray: MJFileStorageAccountPermission_[]; // Link to MJFileStorageAccountPermissions
45028
+
45029
+ @Field(() => [MJAIAgentCategory_])
45030
+ MJAIAgentCategories_DefaultStorageAccountIDArray: MJAIAgentCategory_[]; // Link to MJAIAgentCategories
45031
+
45032
+ @Field(() => [MJAIAgent_])
45033
+ MJAIAgents_DefaultStorageAccountIDArray: MJAIAgent_[]; // Link to MJAIAgents
45034
+
44189
45035
  }
44190
45036
 
44191
45037
  //****************************************************************************
@@ -44207,6 +45053,9 @@ export class CreateMJFileStorageAccountInput {
44207
45053
 
44208
45054
  @Field({ nullable: true })
44209
45055
  CredentialID?: string;
45056
+
45057
+ @Field(() => Boolean, { nullable: true })
45058
+ IncludeInGlobalSearch?: boolean;
44210
45059
  }
44211
45060
 
44212
45061
 
@@ -44230,6 +45079,9 @@ export class UpdateMJFileStorageAccountInput {
44230
45079
  @Field({ nullable: true })
44231
45080
  CredentialID?: string;
44232
45081
 
45082
+ @Field(() => Boolean, { nullable: true })
45083
+ IncludeInGlobalSearch?: boolean;
45084
+
44233
45085
  @Field(() => [KeyValuePairInput], { nullable: true })
44234
45086
  OldValues___?: KeyValuePairInput[];
44235
45087
  }
@@ -44291,6 +45143,46 @@ export class MJFileStorageAccountResolver extends ResolverBase {
44291
45143
  return result;
44292
45144
  }
44293
45145
 
45146
+ @FieldResolver(() => [MJAIAgentType_])
45147
+ async MJAIAgentTypes_DefaultStorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
45148
+ this.CheckUserReadPermissions('MJ: AI Agent Types', userPayload);
45149
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
45150
+ 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');
45151
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
45152
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', rows, this.GetUserFromPayload(userPayload));
45153
+ return result;
45154
+ }
45155
+
45156
+ @FieldResolver(() => [MJFileStorageAccountPermission_])
45157
+ async MJFileStorageAccountPermissions_FileStorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
45158
+ this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
45159
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
45160
+ 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');
45161
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
45162
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows, this.GetUserFromPayload(userPayload));
45163
+ return result;
45164
+ }
45165
+
45166
+ @FieldResolver(() => [MJAIAgentCategory_])
45167
+ async MJAIAgentCategories_DefaultStorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
45168
+ this.CheckUserReadPermissions('MJ: AI Agent Categories', userPayload);
45169
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
45170
+ 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');
45171
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
45172
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Categories', rows, this.GetUserFromPayload(userPayload));
45173
+ return result;
45174
+ }
45175
+
45176
+ @FieldResolver(() => [MJAIAgent_])
45177
+ async MJAIAgents_DefaultStorageAccountIDArray(@Root() mjfilestorageaccount_: MJFileStorageAccount_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
45178
+ this.CheckUserReadPermissions('MJ: AI Agents', userPayload);
45179
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
45180
+ 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');
45181
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
45182
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agents', rows, this.GetUserFromPayload(userPayload));
45183
+ return result;
45184
+ }
45185
+
44294
45186
  @Mutation(() => MJFileStorageAccount_)
44295
45187
  async CreateMJFileStorageAccount(
44296
45188
  @Arg('input', () => CreateMJFileStorageAccountInput) input: CreateMJFileStorageAccountInput,
@@ -44643,6 +45535,9 @@ export class MJFile_ {
44643
45535
  @Field(() => [MJAIAgentRunMedia_])
44644
45536
  MJAIAgentRunMedias_FileIDArray: MJAIAgentRunMedia_[]; // Link to MJAIAgentRunMedias
44645
45537
 
45538
+ @Field(() => [MJArtifactVersion_])
45539
+ MJArtifactVersions_FileIDArray: MJArtifactVersion_[]; // Link to MJArtifactVersions
45540
+
44646
45541
  }
44647
45542
 
44648
45543
  //****************************************************************************
@@ -44806,6 +45701,16 @@ export class MJFileResolver extends ResolverBase {
44806
45701
  return result;
44807
45702
  }
44808
45703
 
45704
+ @FieldResolver(() => [MJArtifactVersion_])
45705
+ async MJArtifactVersions_FileIDArray(@Root() mjfile_: MJFile_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
45706
+ this.CheckUserReadPermissions('MJ: Artifact Versions', userPayload);
45707
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
45708
+ 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');
45709
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
45710
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Versions', rows, this.GetUserFromPayload(userPayload));
45711
+ return result;
45712
+ }
45713
+
44809
45714
  @Mutation(() => MJFile_)
44810
45715
  async CreateMJFile(
44811
45716
  @Arg('input', () => CreateMJFileInput) input: CreateMJFileInput,
@@ -45265,6 +46170,198 @@ export class MJGeneratedCodeResolver extends ResolverBase {
45265
46170
 
45266
46171
  }
45267
46172
 
46173
+ //****************************************************************************
46174
+ // ENTITY CLASS for MJ: Instance Configurations
46175
+ //****************************************************************************
46176
+ @ObjectType({ description: `Instance-level feature toggles and configuration. Controls which features are enabled per MJ Explorer deployment.` })
46177
+ export class MJInstanceConfiguration_ {
46178
+ @Field()
46179
+ @MaxLength(36)
46180
+ ID: string;
46181
+
46182
+ @Field({description: `Unique dot-notation key identifying the feature, e.g. Shell.SearchBar.Enabled.`})
46183
+ @MaxLength(200)
46184
+ FeatureKey: string;
46185
+
46186
+ @Field({description: `Current value for this feature setting.`})
46187
+ Value: string;
46188
+
46189
+ @Field({description: `Data type of the value: boolean, string, number, or json.`})
46190
+ @MaxLength(20)
46191
+ ValueType: string;
46192
+
46193
+ @Field({description: `Grouping category for admin UI display.`})
46194
+ @MaxLength(100)
46195
+ Category: string;
46196
+
46197
+ @Field({description: `Human-readable display name for the setting.`})
46198
+ @MaxLength(200)
46199
+ DisplayName: string;
46200
+
46201
+ @Field({nullable: true, description: `Optional extended description or help text for the setting.`})
46202
+ Description?: string;
46203
+
46204
+ @Field({description: `Factory default value. Used when resetting to defaults.`})
46205
+ DefaultValue: string;
46206
+
46207
+ @Field()
46208
+ _mj__CreatedAt: Date;
46209
+
46210
+ @Field()
46211
+ _mj__UpdatedAt: Date;
46212
+
46213
+ }
46214
+
46215
+ //****************************************************************************
46216
+ // INPUT TYPE for MJ: Instance Configurations
46217
+ //****************************************************************************
46218
+ @InputType()
46219
+ export class CreateMJInstanceConfigurationInput {
46220
+ @Field({ nullable: true })
46221
+ ID?: string;
46222
+
46223
+ @Field({ nullable: true })
46224
+ FeatureKey?: string;
46225
+
46226
+ @Field({ nullable: true })
46227
+ Value?: string;
46228
+
46229
+ @Field({ nullable: true })
46230
+ ValueType?: string;
46231
+
46232
+ @Field({ nullable: true })
46233
+ Category?: string;
46234
+
46235
+ @Field({ nullable: true })
46236
+ DisplayName?: string;
46237
+
46238
+ @Field({ nullable: true })
46239
+ Description: string | null;
46240
+
46241
+ @Field({ nullable: true })
46242
+ DefaultValue?: string;
46243
+ }
46244
+
46245
+
46246
+ //****************************************************************************
46247
+ // INPUT TYPE for MJ: Instance Configurations
46248
+ //****************************************************************************
46249
+ @InputType()
46250
+ export class UpdateMJInstanceConfigurationInput {
46251
+ @Field()
46252
+ ID: string;
46253
+
46254
+ @Field({ nullable: true })
46255
+ FeatureKey?: string;
46256
+
46257
+ @Field({ nullable: true })
46258
+ Value?: string;
46259
+
46260
+ @Field({ nullable: true })
46261
+ ValueType?: string;
46262
+
46263
+ @Field({ nullable: true })
46264
+ Category?: string;
46265
+
46266
+ @Field({ nullable: true })
46267
+ DisplayName?: string;
46268
+
46269
+ @Field({ nullable: true })
46270
+ Description?: string | null;
46271
+
46272
+ @Field({ nullable: true })
46273
+ DefaultValue?: string;
46274
+
46275
+ @Field(() => [KeyValuePairInput], { nullable: true })
46276
+ OldValues___?: KeyValuePairInput[];
46277
+ }
46278
+
46279
+ //****************************************************************************
46280
+ // RESOLVER for MJ: Instance Configurations
46281
+ //****************************************************************************
46282
+ @ObjectType()
46283
+ export class RunMJInstanceConfigurationViewResult {
46284
+ @Field(() => [MJInstanceConfiguration_])
46285
+ Results: MJInstanceConfiguration_[];
46286
+
46287
+ @Field(() => String, {nullable: true})
46288
+ UserViewRunID?: string;
46289
+
46290
+ @Field(() => Int, {nullable: true})
46291
+ RowCount: number;
46292
+
46293
+ @Field(() => Int, {nullable: true})
46294
+ TotalRowCount: number;
46295
+
46296
+ @Field(() => Int, {nullable: true})
46297
+ ExecutionTime: number;
46298
+
46299
+ @Field({nullable: true})
46300
+ ErrorMessage?: string;
46301
+
46302
+ @Field(() => Boolean, {nullable: false})
46303
+ Success: boolean;
46304
+ }
46305
+
46306
+ @Resolver(MJInstanceConfiguration_)
46307
+ export class MJInstanceConfigurationResolver extends ResolverBase {
46308
+ @Query(() => RunMJInstanceConfigurationViewResult)
46309
+ async RunMJInstanceConfigurationViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
46310
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
46311
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
46312
+ }
46313
+
46314
+ @Query(() => RunMJInstanceConfigurationViewResult)
46315
+ async RunMJInstanceConfigurationViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
46316
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
46317
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
46318
+ }
46319
+
46320
+ @Query(() => RunMJInstanceConfigurationViewResult)
46321
+ async RunMJInstanceConfigurationDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
46322
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
46323
+ input.EntityName = 'MJ: Instance Configurations';
46324
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
46325
+ }
46326
+ @Query(() => MJInstanceConfiguration_, { nullable: true })
46327
+ async MJInstanceConfiguration(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJInstanceConfiguration_ | null> {
46328
+ this.CheckUserReadPermissions('MJ: Instance Configurations', userPayload);
46329
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
46330
+ 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');
46331
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
46332
+ const result = await this.MapFieldNamesToCodeNames('MJ: Instance Configurations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
46333
+ return result;
46334
+ }
46335
+
46336
+ @Mutation(() => MJInstanceConfiguration_)
46337
+ async CreateMJInstanceConfiguration(
46338
+ @Arg('input', () => CreateMJInstanceConfigurationInput) input: CreateMJInstanceConfigurationInput,
46339
+ @Ctx() { providers, userPayload }: AppContext,
46340
+ @PubSub() pubSub: PubSubEngine
46341
+ ) {
46342
+ const provider = GetReadWriteProvider(providers);
46343
+ return this.CreateRecord('MJ: Instance Configurations', input, provider, userPayload, pubSub)
46344
+ }
46345
+
46346
+ @Mutation(() => MJInstanceConfiguration_)
46347
+ async UpdateMJInstanceConfiguration(
46348
+ @Arg('input', () => UpdateMJInstanceConfigurationInput) input: UpdateMJInstanceConfigurationInput,
46349
+ @Ctx() { providers, userPayload }: AppContext,
46350
+ @PubSub() pubSub: PubSubEngine
46351
+ ) {
46352
+ const provider = GetReadWriteProvider(providers);
46353
+ return this.UpdateRecord('MJ: Instance Configurations', input, provider, userPayload, pubSub);
46354
+ }
46355
+
46356
+ @Mutation(() => MJInstanceConfiguration_)
46357
+ async DeleteMJInstanceConfiguration(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
46358
+ const provider = GetReadWriteProvider(providers);
46359
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
46360
+ return this.DeleteRecord('MJ: Instance Configurations', key, options, provider, userPayload, pubSub);
46361
+ }
46362
+
46363
+ }
46364
+
45268
46365
  //****************************************************************************
45269
46366
  // ENTITY CLASS for MJ: Integration Object Fields
45270
46367
  //****************************************************************************
@@ -56240,6 +57337,278 @@ export class MJRecordChangeResolver extends ResolverBase {
56240
57337
 
56241
57338
  }
56242
57339
 
57340
+ //****************************************************************************
57341
+ // ENTITY CLASS for MJ: Record Geo Codes
57342
+ //****************************************************************************
57343
+ @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.` })
57344
+ export class MJRecordGeoCode_ {
57345
+ @Field()
57346
+ @MaxLength(36)
57347
+ ID: string;
57348
+
57349
+ @Field({description: `Foreign key to Entity. Identifies which entity this geocode belongs to.`})
57350
+ @MaxLength(36)
57351
+ EntityID: string;
57352
+
57353
+ @Field({description: `MJ composite primary key format string identifying the source record (e.g., "ID|<uuid>"). Max 450 chars for SQL Server index support.`})
57354
+ @MaxLength(450)
57355
+ RecordID: string;
57356
+
57357
+ @Field({description: `Discriminator for multi-location entities. Default "Primary" for single-address entities. Multi-address examples: "Home", "Business", "Mailing", "PO Box".`})
57358
+ @MaxLength(50)
57359
+ LocationType: string;
57360
+
57361
+ @Field(() => Float, {nullable: true, description: `Geocoded latitude coordinate. NULL when Status is "pending" or "failed".`})
57362
+ Latitude?: number;
57363
+
57364
+ @Field(() => Float, {nullable: true, description: `Geocoded longitude coordinate. NULL when Status is "pending" or "failed".`})
57365
+ Longitude?: number;
57366
+
57367
+ @Field({nullable: true, description: `Precision level of the geocoded result: exact (street address), postal_code, city, county, state_province, or country.`})
57368
+ @MaxLength(20)
57369
+ Precision?: string;
57370
+
57371
+ @Field({nullable: true, description: `Optional FK to Country reference table. Populated alongside lat/lng to enable choropleth grouping without reverse-geocoding at render time.`})
57372
+ @MaxLength(36)
57373
+ CountryID?: string;
57374
+
57375
+ @Field({nullable: true, description: `Optional FK to StateProvince reference table. Populated alongside lat/lng to enable state-level choropleth grouping.`})
57376
+ @MaxLength(36)
57377
+ StateProvinceID?: string;
57378
+
57379
+ @Field({description: `Current geocoding status: "pending" (awaiting geocode), "success" (geocoded), or "failed" (geocoding error). Used by scheduled job for retry logic.`})
57380
+ @MaxLength(20)
57381
+ Status: string;
57382
+
57383
+ @Field({nullable: true, description: `Error details when Status is "failed". Captures API error messages, rate limit info, etc. for debugging.`})
57384
+ ErrorMessage?: string;
57385
+
57386
+ @Field(() => Int, {description: `Number of geocoding attempts. Used for exponential backoff in the scheduled retry job. Stops retrying at configurable maxRetries (default 3).`})
57387
+ RetryCount: number;
57388
+
57389
+ @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, ...)).`})
57390
+ @MaxLength(64)
57391
+ SourceFieldHash?: string;
57392
+
57393
+ @Field({nullable: true, description: `Timestamp of when geocoding was last attempted (success or failure).`})
57394
+ GeocodedAt?: Date;
57395
+
57396
+ @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).`})
57397
+ @MaxLength(30)
57398
+ GeocodingSource?: string;
57399
+
57400
+ @Field()
57401
+ _mj__CreatedAt: Date;
57402
+
57403
+ @Field()
57404
+ _mj__UpdatedAt: Date;
57405
+
57406
+ @Field()
57407
+ @MaxLength(255)
57408
+ Entity: string;
57409
+
57410
+ @Field({nullable: true})
57411
+ @MaxLength(200)
57412
+ Country?: string;
57413
+
57414
+ @Field({nullable: true})
57415
+ @MaxLength(200)
57416
+ StateProvince?: string;
57417
+
57418
+ }
57419
+
57420
+ //****************************************************************************
57421
+ // INPUT TYPE for MJ: Record Geo Codes
57422
+ //****************************************************************************
57423
+ @InputType()
57424
+ export class CreateMJRecordGeoCodeInput {
57425
+ @Field({ nullable: true })
57426
+ ID?: string;
57427
+
57428
+ @Field({ nullable: true })
57429
+ EntityID?: string;
57430
+
57431
+ @Field({ nullable: true })
57432
+ RecordID?: string;
57433
+
57434
+ @Field({ nullable: true })
57435
+ LocationType?: string;
57436
+
57437
+ @Field(() => Float, { nullable: true })
57438
+ Latitude: number | null;
57439
+
57440
+ @Field(() => Float, { nullable: true })
57441
+ Longitude: number | null;
57442
+
57443
+ @Field({ nullable: true })
57444
+ Precision: string | null;
57445
+
57446
+ @Field({ nullable: true })
57447
+ CountryID: string | null;
57448
+
57449
+ @Field({ nullable: true })
57450
+ StateProvinceID: string | null;
57451
+
57452
+ @Field({ nullable: true })
57453
+ Status?: string;
57454
+
57455
+ @Field({ nullable: true })
57456
+ ErrorMessage: string | null;
57457
+
57458
+ @Field(() => Int, { nullable: true })
57459
+ RetryCount?: number;
57460
+
57461
+ @Field({ nullable: true })
57462
+ SourceFieldHash: string | null;
57463
+
57464
+ @Field({ nullable: true })
57465
+ GeocodedAt: Date | null;
57466
+
57467
+ @Field({ nullable: true })
57468
+ GeocodingSource: string | null;
57469
+ }
57470
+
57471
+
57472
+ //****************************************************************************
57473
+ // INPUT TYPE for MJ: Record Geo Codes
57474
+ //****************************************************************************
57475
+ @InputType()
57476
+ export class UpdateMJRecordGeoCodeInput {
57477
+ @Field()
57478
+ ID: string;
57479
+
57480
+ @Field({ nullable: true })
57481
+ EntityID?: string;
57482
+
57483
+ @Field({ nullable: true })
57484
+ RecordID?: string;
57485
+
57486
+ @Field({ nullable: true })
57487
+ LocationType?: string;
57488
+
57489
+ @Field(() => Float, { nullable: true })
57490
+ Latitude?: number | null;
57491
+
57492
+ @Field(() => Float, { nullable: true })
57493
+ Longitude?: number | null;
57494
+
57495
+ @Field({ nullable: true })
57496
+ Precision?: string | null;
57497
+
57498
+ @Field({ nullable: true })
57499
+ CountryID?: string | null;
57500
+
57501
+ @Field({ nullable: true })
57502
+ StateProvinceID?: string | null;
57503
+
57504
+ @Field({ nullable: true })
57505
+ Status?: string;
57506
+
57507
+ @Field({ nullable: true })
57508
+ ErrorMessage?: string | null;
57509
+
57510
+ @Field(() => Int, { nullable: true })
57511
+ RetryCount?: number;
57512
+
57513
+ @Field({ nullable: true })
57514
+ SourceFieldHash?: string | null;
57515
+
57516
+ @Field({ nullable: true })
57517
+ GeocodedAt?: Date | null;
57518
+
57519
+ @Field({ nullable: true })
57520
+ GeocodingSource?: string | null;
57521
+
57522
+ @Field(() => [KeyValuePairInput], { nullable: true })
57523
+ OldValues___?: KeyValuePairInput[];
57524
+ }
57525
+
57526
+ //****************************************************************************
57527
+ // RESOLVER for MJ: Record Geo Codes
57528
+ //****************************************************************************
57529
+ @ObjectType()
57530
+ export class RunMJRecordGeoCodeViewResult {
57531
+ @Field(() => [MJRecordGeoCode_])
57532
+ Results: MJRecordGeoCode_[];
57533
+
57534
+ @Field(() => String, {nullable: true})
57535
+ UserViewRunID?: string;
57536
+
57537
+ @Field(() => Int, {nullable: true})
57538
+ RowCount: number;
57539
+
57540
+ @Field(() => Int, {nullable: true})
57541
+ TotalRowCount: number;
57542
+
57543
+ @Field(() => Int, {nullable: true})
57544
+ ExecutionTime: number;
57545
+
57546
+ @Field({nullable: true})
57547
+ ErrorMessage?: string;
57548
+
57549
+ @Field(() => Boolean, {nullable: false})
57550
+ Success: boolean;
57551
+ }
57552
+
57553
+ @Resolver(MJRecordGeoCode_)
57554
+ export class MJRecordGeoCodeResolver extends ResolverBase {
57555
+ @Query(() => RunMJRecordGeoCodeViewResult)
57556
+ async RunMJRecordGeoCodeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
57557
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
57558
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
57559
+ }
57560
+
57561
+ @Query(() => RunMJRecordGeoCodeViewResult)
57562
+ async RunMJRecordGeoCodeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
57563
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
57564
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
57565
+ }
57566
+
57567
+ @Query(() => RunMJRecordGeoCodeViewResult)
57568
+ async RunMJRecordGeoCodeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
57569
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
57570
+ input.EntityName = 'MJ: Record Geo Codes';
57571
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
57572
+ }
57573
+ @Query(() => MJRecordGeoCode_, { nullable: true })
57574
+ async MJRecordGeoCode(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordGeoCode_ | null> {
57575
+ this.CheckUserReadPermissions('MJ: Record Geo Codes', userPayload);
57576
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
57577
+ 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');
57578
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
57579
+ const result = await this.MapFieldNamesToCodeNames('MJ: Record Geo Codes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
57580
+ return result;
57581
+ }
57582
+
57583
+ @Mutation(() => MJRecordGeoCode_)
57584
+ async CreateMJRecordGeoCode(
57585
+ @Arg('input', () => CreateMJRecordGeoCodeInput) input: CreateMJRecordGeoCodeInput,
57586
+ @Ctx() { providers, userPayload }: AppContext,
57587
+ @PubSub() pubSub: PubSubEngine
57588
+ ) {
57589
+ const provider = GetReadWriteProvider(providers);
57590
+ return this.CreateRecord('MJ: Record Geo Codes', input, provider, userPayload, pubSub)
57591
+ }
57592
+
57593
+ @Mutation(() => MJRecordGeoCode_)
57594
+ async UpdateMJRecordGeoCode(
57595
+ @Arg('input', () => UpdateMJRecordGeoCodeInput) input: UpdateMJRecordGeoCodeInput,
57596
+ @Ctx() { providers, userPayload }: AppContext,
57597
+ @PubSub() pubSub: PubSubEngine
57598
+ ) {
57599
+ const provider = GetReadWriteProvider(providers);
57600
+ return this.UpdateRecord('MJ: Record Geo Codes', input, provider, userPayload, pubSub);
57601
+ }
57602
+
57603
+ @Mutation(() => MJRecordGeoCode_)
57604
+ async DeleteMJRecordGeoCode(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
57605
+ const provider = GetReadWriteProvider(providers);
57606
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
57607
+ return this.DeleteRecord('MJ: Record Geo Codes', key, options, provider, userPayload, pubSub);
57608
+ }
57609
+
57610
+ }
57611
+
56243
57612
  //****************************************************************************
56244
57613
  // ENTITY CLASS for MJ: Record Links
56245
57614
  //****************************************************************************
@@ -58652,6 +60021,12 @@ export class MJRole_ {
58652
60021
  @Field(() => [MJMCPServerConnectionPermission_])
58653
60022
  MJMCPServerConnectionPermissions_RoleIDArray: MJMCPServerConnectionPermission_[]; // Link to MJMCPServerConnectionPermissions
58654
60023
 
60024
+ @Field(() => [MJFileStorageAccountPermission_])
60025
+ MJFileStorageAccountPermissions_RoleIDArray: MJFileStorageAccountPermission_[]; // Link to MJFileStorageAccountPermissions
60026
+
60027
+ @Field(() => [MJApplicationRole_])
60028
+ MJApplicationRoles_RoleIDArray: MJApplicationRole_[]; // Link to MJApplicationRoles
60029
+
58655
60030
  @Field(() => [MJAIAgentPermission_])
58656
60031
  MJAIAgentPermissions_RoleIDArray: MJAIAgentPermission_[]; // Link to MJAIAgentPermissions
58657
60032
 
@@ -58840,6 +60215,26 @@ export class MJRoleResolver extends ResolverBase {
58840
60215
  return result;
58841
60216
  }
58842
60217
 
60218
+ @FieldResolver(() => [MJFileStorageAccountPermission_])
60219
+ async MJFileStorageAccountPermissions_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
60220
+ this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
60221
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
60222
+ 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');
60223
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
60224
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows, this.GetUserFromPayload(userPayload));
60225
+ return result;
60226
+ }
60227
+
60228
+ @FieldResolver(() => [MJApplicationRole_])
60229
+ async MJApplicationRoles_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
60230
+ this.CheckUserReadPermissions('MJ: Application Roles', userPayload);
60231
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
60232
+ 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');
60233
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
60234
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Application Roles', rows, this.GetUserFromPayload(userPayload));
60235
+ return result;
60236
+ }
60237
+
58843
60238
  @FieldResolver(() => [MJAIAgentPermission_])
58844
60239
  async MJAIAgentPermissions_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
58845
60240
  this.CheckUserReadPermissions('MJ: AI Agent Permissions', userPayload);
@@ -60589,6 +61984,249 @@ export class MJSchemaInfoResolver extends ResolverBase {
60589
61984
 
60590
61985
  }
60591
61986
 
61987
+ //****************************************************************************
61988
+ // ENTITY CLASS for MJ: Search Providers
61989
+ //****************************************************************************
61990
+ @ObjectType()
61991
+ export class MJSearchProvider_ {
61992
+ @Field()
61993
+ @MaxLength(36)
61994
+ ID: string;
61995
+
61996
+ @Field({description: `Display name for this search provider (e.g., "Vector Search", "Algolia")`})
61997
+ @MaxLength(200)
61998
+ Name: string;
61999
+
62000
+ @Field({nullable: true, description: `Human-readable description of what this provider searches and how it works`})
62001
+ Description?: string;
62002
+
62003
+ @Field({description: `ClassFactory key used with @RegisterClass(ISearchProvider, DriverClass) to instantiate the provider at runtime`})
62004
+ @MaxLength(500)
62005
+ DriverClass: string;
62006
+
62007
+ @Field({description: `Provider lifecycle status: Pending (not yet activated), Active (in use), Terminated (disabled)`})
62008
+ @MaxLength(20)
62009
+ Status: string;
62010
+
62011
+ @Field(() => Int, {description: `Execution priority (lower = higher priority). Controls provider ordering and can influence RRF weighting. Must be >= 0.`})
62012
+ Priority: number;
62013
+
62014
+ @Field(() => Boolean, {description: `Whether this provider should run during fast preview/autocomplete searches. Expensive providers (external APIs) may set this to 0.`})
62015
+ SupportsPreview: boolean;
62016
+
62017
+ @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.`})
62018
+ MaxResultsOverride?: number;
62019
+
62020
+ @Field({nullable: true, description: `Optional JSON configuration blob for provider-specific settings (e.g., API endpoints, index names, tuning parameters). Schema is provider-defined.`})
62021
+ ProviderConfig?: string;
62022
+
62023
+ @Field({nullable: true, description: `Optional FK to the Credential entity for providers that require authentication (e.g., Algolia API key, external service credentials)`})
62024
+ @MaxLength(36)
62025
+ CredentialID?: string;
62026
+
62027
+ @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.`})
62028
+ @MaxLength(200)
62029
+ DisplayName?: string;
62030
+
62031
+ @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.`})
62032
+ @MaxLength(200)
62033
+ Icon?: string;
62034
+
62035
+ @Field({nullable: true, description: `Free-form notes about this provider configuration`})
62036
+ Comments?: string;
62037
+
62038
+ @Field()
62039
+ _mj__CreatedAt: Date;
62040
+
62041
+ @Field()
62042
+ _mj__UpdatedAt: Date;
62043
+
62044
+ @Field({nullable: true})
62045
+ @MaxLength(200)
62046
+ Credential?: string;
62047
+
62048
+ }
62049
+
62050
+ //****************************************************************************
62051
+ // INPUT TYPE for MJ: Search Providers
62052
+ //****************************************************************************
62053
+ @InputType()
62054
+ export class CreateMJSearchProviderInput {
62055
+ @Field({ nullable: true })
62056
+ ID?: string;
62057
+
62058
+ @Field({ nullable: true })
62059
+ Name?: string;
62060
+
62061
+ @Field({ nullable: true })
62062
+ Description: string | null;
62063
+
62064
+ @Field({ nullable: true })
62065
+ DriverClass?: string;
62066
+
62067
+ @Field({ nullable: true })
62068
+ Status?: string;
62069
+
62070
+ @Field(() => Int, { nullable: true })
62071
+ Priority?: number;
62072
+
62073
+ @Field(() => Boolean, { nullable: true })
62074
+ SupportsPreview?: boolean;
62075
+
62076
+ @Field(() => Int, { nullable: true })
62077
+ MaxResultsOverride: number | null;
62078
+
62079
+ @Field({ nullable: true })
62080
+ ProviderConfig: string | null;
62081
+
62082
+ @Field({ nullable: true })
62083
+ CredentialID: string | null;
62084
+
62085
+ @Field({ nullable: true })
62086
+ DisplayName: string | null;
62087
+
62088
+ @Field({ nullable: true })
62089
+ Icon: string | null;
62090
+
62091
+ @Field({ nullable: true })
62092
+ Comments: string | null;
62093
+ }
62094
+
62095
+
62096
+ //****************************************************************************
62097
+ // INPUT TYPE for MJ: Search Providers
62098
+ //****************************************************************************
62099
+ @InputType()
62100
+ export class UpdateMJSearchProviderInput {
62101
+ @Field()
62102
+ ID: string;
62103
+
62104
+ @Field({ nullable: true })
62105
+ Name?: string;
62106
+
62107
+ @Field({ nullable: true })
62108
+ Description?: string | null;
62109
+
62110
+ @Field({ nullable: true })
62111
+ DriverClass?: string;
62112
+
62113
+ @Field({ nullable: true })
62114
+ Status?: string;
62115
+
62116
+ @Field(() => Int, { nullable: true })
62117
+ Priority?: number;
62118
+
62119
+ @Field(() => Boolean, { nullable: true })
62120
+ SupportsPreview?: boolean;
62121
+
62122
+ @Field(() => Int, { nullable: true })
62123
+ MaxResultsOverride?: number | null;
62124
+
62125
+ @Field({ nullable: true })
62126
+ ProviderConfig?: string | null;
62127
+
62128
+ @Field({ nullable: true })
62129
+ CredentialID?: string | null;
62130
+
62131
+ @Field({ nullable: true })
62132
+ DisplayName?: string | null;
62133
+
62134
+ @Field({ nullable: true })
62135
+ Icon?: string | null;
62136
+
62137
+ @Field({ nullable: true })
62138
+ Comments?: string | null;
62139
+
62140
+ @Field(() => [KeyValuePairInput], { nullable: true })
62141
+ OldValues___?: KeyValuePairInput[];
62142
+ }
62143
+
62144
+ //****************************************************************************
62145
+ // RESOLVER for MJ: Search Providers
62146
+ //****************************************************************************
62147
+ @ObjectType()
62148
+ export class RunMJSearchProviderViewResult {
62149
+ @Field(() => [MJSearchProvider_])
62150
+ Results: MJSearchProvider_[];
62151
+
62152
+ @Field(() => String, {nullable: true})
62153
+ UserViewRunID?: string;
62154
+
62155
+ @Field(() => Int, {nullable: true})
62156
+ RowCount: number;
62157
+
62158
+ @Field(() => Int, {nullable: true})
62159
+ TotalRowCount: number;
62160
+
62161
+ @Field(() => Int, {nullable: true})
62162
+ ExecutionTime: number;
62163
+
62164
+ @Field({nullable: true})
62165
+ ErrorMessage?: string;
62166
+
62167
+ @Field(() => Boolean, {nullable: false})
62168
+ Success: boolean;
62169
+ }
62170
+
62171
+ @Resolver(MJSearchProvider_)
62172
+ export class MJSearchProviderResolver extends ResolverBase {
62173
+ @Query(() => RunMJSearchProviderViewResult)
62174
+ async RunMJSearchProviderViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
62175
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
62176
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
62177
+ }
62178
+
62179
+ @Query(() => RunMJSearchProviderViewResult)
62180
+ async RunMJSearchProviderViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
62181
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
62182
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
62183
+ }
62184
+
62185
+ @Query(() => RunMJSearchProviderViewResult)
62186
+ async RunMJSearchProviderDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
62187
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
62188
+ input.EntityName = 'MJ: Search Providers';
62189
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
62190
+ }
62191
+ @Query(() => MJSearchProvider_, { nullable: true })
62192
+ async MJSearchProvider(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJSearchProvider_ | null> {
62193
+ this.CheckUserReadPermissions('MJ: Search Providers', userPayload);
62194
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
62195
+ 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');
62196
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
62197
+ const result = await this.MapFieldNamesToCodeNames('MJ: Search Providers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
62198
+ return result;
62199
+ }
62200
+
62201
+ @Mutation(() => MJSearchProvider_)
62202
+ async CreateMJSearchProvider(
62203
+ @Arg('input', () => CreateMJSearchProviderInput) input: CreateMJSearchProviderInput,
62204
+ @Ctx() { providers, userPayload }: AppContext,
62205
+ @PubSub() pubSub: PubSubEngine
62206
+ ) {
62207
+ const provider = GetReadWriteProvider(providers);
62208
+ return this.CreateRecord('MJ: Search Providers', input, provider, userPayload, pubSub)
62209
+ }
62210
+
62211
+ @Mutation(() => MJSearchProvider_)
62212
+ async UpdateMJSearchProvider(
62213
+ @Arg('input', () => UpdateMJSearchProviderInput) input: UpdateMJSearchProviderInput,
62214
+ @Ctx() { providers, userPayload }: AppContext,
62215
+ @PubSub() pubSub: PubSubEngine
62216
+ ) {
62217
+ const provider = GetReadWriteProvider(providers);
62218
+ return this.UpdateRecord('MJ: Search Providers', input, provider, userPayload, pubSub);
62219
+ }
62220
+
62221
+ @Mutation(() => MJSearchProvider_)
62222
+ async DeleteMJSearchProvider(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
62223
+ const provider = GetReadWriteProvider(providers);
62224
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
62225
+ return this.DeleteRecord('MJ: Search Providers', key, options, provider, userPayload, pubSub);
62226
+ }
62227
+
62228
+ }
62229
+
60592
62230
  //****************************************************************************
60593
62231
  // ENTITY CLASS for MJ: Skills
60594
62232
  //****************************************************************************
@@ -61008,6 +62646,224 @@ export class MJSQLDialectResolver extends ResolverBase {
61008
62646
 
61009
62647
  }
61010
62648
 
62649
+ //****************************************************************************
62650
+ // ENTITY CLASS for MJ: State Provinces
62651
+ //****************************************************************************
62652
+ @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.` })
62653
+ export class MJStateProvince_ {
62654
+ @Field()
62655
+ @MaxLength(36)
62656
+ ID: string;
62657
+
62658
+ @Field({description: `Foreign key to Country. Establishes the parent country for this state/province.`})
62659
+ @MaxLength(36)
62660
+ CountryID: string;
62661
+
62662
+ @Field({description: `Full state/province name (e.g., "California", "Ontario").`})
62663
+ @MaxLength(200)
62664
+ Name: string;
62665
+
62666
+ @Field({description: `Short code within the country (e.g., "CA", "ON"). Unique per country via compound constraint.`})
62667
+ @MaxLength(10)
62668
+ Code: string;
62669
+
62670
+ @Field({description: `ISO 3166-2 subdivision code (e.g., "US-CA", "CA-ON"). Globally unique.`})
62671
+ @MaxLength(10)
62672
+ ISO3166_2: string;
62673
+
62674
+ @Field(() => Float, {nullable: true, description: `Geographic centroid latitude. Used as fallback point for state-level geocoding.`})
62675
+ Latitude?: number;
62676
+
62677
+ @Field(() => Float, {nullable: true, description: `Geographic centroid longitude. Used as fallback point for state-level geocoding.`})
62678
+ Longitude?: number;
62679
+
62680
+ @Field({nullable: true, description: `Medium-resolution (~50m) GeoJSON boundary polygon for choropleth map rendering. Nullable. Total ~15-20MB for all states/provinces worldwide.`})
62681
+ BoundaryGeoJSON?: string;
62682
+
62683
+ @Field({nullable: true, description: `JSON array of common aliases (e.g., ["Calif.","California","Cal"]). Used by GeoResolver for fuzzy text-to-state matching.`})
62684
+ CommonAliases?: string;
62685
+
62686
+ @Field()
62687
+ _mj__CreatedAt: Date;
62688
+
62689
+ @Field()
62690
+ _mj__UpdatedAt: Date;
62691
+
62692
+ @Field()
62693
+ @MaxLength(200)
62694
+ Country: string;
62695
+
62696
+ @Field(() => [MJRecordGeoCode_])
62697
+ MJRecordGeoCodes_StateProvinceIDArray: MJRecordGeoCode_[]; // Link to MJRecordGeoCodes
62698
+
62699
+ }
62700
+
62701
+ //****************************************************************************
62702
+ // INPUT TYPE for MJ: State Provinces
62703
+ //****************************************************************************
62704
+ @InputType()
62705
+ export class CreateMJStateProvinceInput {
62706
+ @Field({ nullable: true })
62707
+ ID?: string;
62708
+
62709
+ @Field({ nullable: true })
62710
+ CountryID?: string;
62711
+
62712
+ @Field({ nullable: true })
62713
+ Name?: string;
62714
+
62715
+ @Field({ nullable: true })
62716
+ Code?: string;
62717
+
62718
+ @Field({ nullable: true })
62719
+ ISO3166_2?: string;
62720
+
62721
+ @Field(() => Float, { nullable: true })
62722
+ Latitude: number | null;
62723
+
62724
+ @Field(() => Float, { nullable: true })
62725
+ Longitude: number | null;
62726
+
62727
+ @Field({ nullable: true })
62728
+ BoundaryGeoJSON: string | null;
62729
+
62730
+ @Field({ nullable: true })
62731
+ CommonAliases: string | null;
62732
+ }
62733
+
62734
+
62735
+ //****************************************************************************
62736
+ // INPUT TYPE for MJ: State Provinces
62737
+ //****************************************************************************
62738
+ @InputType()
62739
+ export class UpdateMJStateProvinceInput {
62740
+ @Field()
62741
+ ID: string;
62742
+
62743
+ @Field({ nullable: true })
62744
+ CountryID?: string;
62745
+
62746
+ @Field({ nullable: true })
62747
+ Name?: string;
62748
+
62749
+ @Field({ nullable: true })
62750
+ Code?: string;
62751
+
62752
+ @Field({ nullable: true })
62753
+ ISO3166_2?: string;
62754
+
62755
+ @Field(() => Float, { nullable: true })
62756
+ Latitude?: number | null;
62757
+
62758
+ @Field(() => Float, { nullable: true })
62759
+ Longitude?: number | null;
62760
+
62761
+ @Field({ nullable: true })
62762
+ BoundaryGeoJSON?: string | null;
62763
+
62764
+ @Field({ nullable: true })
62765
+ CommonAliases?: string | null;
62766
+
62767
+ @Field(() => [KeyValuePairInput], { nullable: true })
62768
+ OldValues___?: KeyValuePairInput[];
62769
+ }
62770
+
62771
+ //****************************************************************************
62772
+ // RESOLVER for MJ: State Provinces
62773
+ //****************************************************************************
62774
+ @ObjectType()
62775
+ export class RunMJStateProvinceViewResult {
62776
+ @Field(() => [MJStateProvince_])
62777
+ Results: MJStateProvince_[];
62778
+
62779
+ @Field(() => String, {nullable: true})
62780
+ UserViewRunID?: string;
62781
+
62782
+ @Field(() => Int, {nullable: true})
62783
+ RowCount: number;
62784
+
62785
+ @Field(() => Int, {nullable: true})
62786
+ TotalRowCount: number;
62787
+
62788
+ @Field(() => Int, {nullable: true})
62789
+ ExecutionTime: number;
62790
+
62791
+ @Field({nullable: true})
62792
+ ErrorMessage?: string;
62793
+
62794
+ @Field(() => Boolean, {nullable: false})
62795
+ Success: boolean;
62796
+ }
62797
+
62798
+ @Resolver(MJStateProvince_)
62799
+ export class MJStateProvinceResolver extends ResolverBase {
62800
+ @Query(() => RunMJStateProvinceViewResult)
62801
+ async RunMJStateProvinceViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
62802
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
62803
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
62804
+ }
62805
+
62806
+ @Query(() => RunMJStateProvinceViewResult)
62807
+ async RunMJStateProvinceViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
62808
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
62809
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
62810
+ }
62811
+
62812
+ @Query(() => RunMJStateProvinceViewResult)
62813
+ async RunMJStateProvinceDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
62814
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
62815
+ input.EntityName = 'MJ: State Provinces';
62816
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
62817
+ }
62818
+ @Query(() => MJStateProvince_, { nullable: true })
62819
+ async MJStateProvince(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJStateProvince_ | null> {
62820
+ this.CheckUserReadPermissions('MJ: State Provinces', userPayload);
62821
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
62822
+ 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');
62823
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
62824
+ const result = await this.MapFieldNamesToCodeNames('MJ: State Provinces', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
62825
+ return result;
62826
+ }
62827
+
62828
+ @FieldResolver(() => [MJRecordGeoCode_])
62829
+ async MJRecordGeoCodes_StateProvinceIDArray(@Root() mjstateprovince_: MJStateProvince_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
62830
+ this.CheckUserReadPermissions('MJ: Record Geo Codes', userPayload);
62831
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
62832
+ 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');
62833
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
62834
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Geo Codes', rows, this.GetUserFromPayload(userPayload));
62835
+ return result;
62836
+ }
62837
+
62838
+ @Mutation(() => MJStateProvince_)
62839
+ async CreateMJStateProvince(
62840
+ @Arg('input', () => CreateMJStateProvinceInput) input: CreateMJStateProvinceInput,
62841
+ @Ctx() { providers, userPayload }: AppContext,
62842
+ @PubSub() pubSub: PubSubEngine
62843
+ ) {
62844
+ const provider = GetReadWriteProvider(providers);
62845
+ return this.CreateRecord('MJ: State Provinces', input, provider, userPayload, pubSub)
62846
+ }
62847
+
62848
+ @Mutation(() => MJStateProvince_)
62849
+ async UpdateMJStateProvince(
62850
+ @Arg('input', () => UpdateMJStateProvinceInput) input: UpdateMJStateProvinceInput,
62851
+ @Ctx() { providers, userPayload }: AppContext,
62852
+ @PubSub() pubSub: PubSubEngine
62853
+ ) {
62854
+ const provider = GetReadWriteProvider(providers);
62855
+ return this.UpdateRecord('MJ: State Provinces', input, provider, userPayload, pubSub);
62856
+ }
62857
+
62858
+ @Mutation(() => MJStateProvince_)
62859
+ async DeleteMJStateProvince(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
62860
+ const provider = GetReadWriteProvider(providers);
62861
+ const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
62862
+ return this.DeleteRecord('MJ: State Provinces', key, options, provider, userPayload, pubSub);
62863
+ }
62864
+
62865
+ }
62866
+
61011
62867
  //****************************************************************************
61012
62868
  // ENTITY CLASS for MJ: Tag Audit Logs
61013
62869
  //****************************************************************************
@@ -69180,6 +71036,9 @@ export class MJUser_ {
69180
71036
  @Field(() => [MJDuplicateRun_])
69181
71037
  MJDuplicateRuns_ApprovedByUserIDArray: MJDuplicateRun_[]; // Link to MJDuplicateRuns
69182
71038
 
71039
+ @Field(() => [MJFileStorageAccountPermission_])
71040
+ MJFileStorageAccountPermissions_UserIDArray: MJFileStorageAccountPermission_[]; // Link to MJFileStorageAccountPermissions
71041
+
69183
71042
  @Field(() => [MJAIAgentRun_])
69184
71043
  MJAIAgentRuns_UserIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
69185
71044
 
@@ -70163,6 +72022,16 @@ export class MJUserResolverBase extends ResolverBase {
70163
72022
  return result;
70164
72023
  }
70165
72024
 
72025
+ @FieldResolver(() => [MJFileStorageAccountPermission_])
72026
+ async MJFileStorageAccountPermissions_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
72027
+ this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
72028
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
72029
+ 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');
72030
+ const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
72031
+ const result = await this.ArrayMapFieldNamesToCodeNames('MJ: File Storage Account Permissions', rows, this.GetUserFromPayload(userPayload));
72032
+ return result;
72033
+ }
72034
+
70166
72035
  @FieldResolver(() => [MJAIAgentRun_])
70167
72036
  async MJAIAgentRuns_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
70168
72037
  this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
@@ -70305,6 +72174,14 @@ export class MJVectorDatabase_ {
70305
72174
  @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
72175
  Configuration?: string;
70307
72176
 
72177
+ @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>.`})
72178
+ @MaxLength(36)
72179
+ CredentialID?: string;
72180
+
72181
+ @Field({nullable: true})
72182
+ @MaxLength(200)
72183
+ Credential?: string;
72184
+
70308
72185
  @Field(() => [MJVectorIndex_])
70309
72186
  MJVectorIndexes_VectorDatabaseIDArray: MJVectorIndex_[]; // Link to MJVectorIndexes
70310
72187
 
@@ -70335,6 +72212,9 @@ export class CreateMJVectorDatabaseInput {
70335
72212
 
70336
72213
  @Field({ nullable: true })
70337
72214
  Configuration: string | null;
72215
+
72216
+ @Field({ nullable: true })
72217
+ CredentialID: string | null;
70338
72218
  }
70339
72219
 
70340
72220
 
@@ -70361,6 +72241,9 @@ export class UpdateMJVectorDatabaseInput {
70361
72241
  @Field({ nullable: true })
70362
72242
  Configuration?: string | null;
70363
72243
 
72244
+ @Field({ nullable: true })
72245
+ CredentialID?: string | null;
72246
+
70364
72247
  @Field(() => [KeyValuePairInput], { nullable: true })
70365
72248
  OldValues___?: KeyValuePairInput[];
70366
72249
  }