@memberjunction/server 5.37.0 → 5.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/dist/agents/skip-sdk.d.ts.map +1 -1
- package/dist/agents/skip-sdk.js +16 -12
- package/dist/agents/skip-sdk.js.map +1 -1
- package/dist/generated/generated.d.ts +97 -5
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +553 -13
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -14
- package/dist/index.js.map +1 -1
- package/dist/resolvers/QueryResolver.d.ts.map +1 -1
- package/dist/resolvers/QueryResolver.js +5 -4
- package/dist/resolvers/QueryResolver.js.map +1 -1
- package/dist/resolvers/QuerySystemUserResolver.d.ts.map +1 -1
- package/dist/resolvers/QuerySystemUserResolver.js +6 -18
- package/dist/resolvers/QuerySystemUserResolver.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +6 -59
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/package.json +70 -70
- package/src/__tests__/resolverBase.rls.test.ts +224 -0
- package/src/agents/skip-sdk.ts +16 -13
- package/src/generated/generated.ts +388 -14
- package/src/index.ts +62 -17
- package/src/resolvers/QueryResolver.ts +7 -6
- package/src/resolvers/QuerySystemUserResolver.ts +11 -25
- package/src/resolvers/RunAIAgentResolver.ts +6 -66
|
@@ -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, MJAIAgentSearchScopeEntity, 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, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, 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, MJMCPToolFavoriteEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, 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, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, 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, MJAIAgentSearchScopeEntity, 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, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, 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, MJEntityFormOverrideEntity, 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, MJMCPToolFavoriteEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, 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, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSkillEntity, MJSQLDialectEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, 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
|
//****************************************************************************
|
|
@@ -9570,6 +9570,9 @@ if this limit is exceeded.`})
|
|
|
9570
9570
|
@Field(() => [MJAction_])
|
|
9571
9571
|
MJActions_CreatedByAgentIDArray: MJAction_[]; // Link to MJActions
|
|
9572
9572
|
|
|
9573
|
+
@Field(() => [MJConversation_])
|
|
9574
|
+
MJConversations_DefaultAgentIDArray: MJConversation_[]; // Link to MJConversations
|
|
9575
|
+
|
|
9573
9576
|
}
|
|
9574
9577
|
|
|
9575
9578
|
//****************************************************************************
|
|
@@ -10295,6 +10298,16 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
10295
10298
|
return result;
|
|
10296
10299
|
}
|
|
10297
10300
|
|
|
10301
|
+
@FieldResolver(() => [MJConversation_])
|
|
10302
|
+
async MJConversations_DefaultAgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10303
|
+
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
10304
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10305
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversations')} WHERE ${provider.QuoteIdentifier('DefaultAgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
10306
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
10307
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
|
|
10308
|
+
return result;
|
|
10309
|
+
}
|
|
10310
|
+
|
|
10298
10311
|
@Mutation(() => MJAIAgent_)
|
|
10299
10312
|
async CreateMJAIAgent(
|
|
10300
10313
|
@Arg('input', () => CreateMJAIAgentInput) input: CreateMJAIAgentInput,
|
|
@@ -19982,6 +19995,9 @@ export class MJApplication_ {
|
|
|
19982
19995
|
@Field(() => [MJDashboardUserPreference_])
|
|
19983
19996
|
MJDashboardUserPreferences_ApplicationIDArray: MJDashboardUserPreference_[]; // Link to MJDashboardUserPreferences
|
|
19984
19997
|
|
|
19998
|
+
@Field(() => [MJConversation_])
|
|
19999
|
+
MJConversations_ApplicationIDArray: MJConversation_[]; // Link to MJConversations
|
|
20000
|
+
|
|
19985
20001
|
}
|
|
19986
20002
|
|
|
19987
20003
|
//****************************************************************************
|
|
@@ -20229,6 +20245,16 @@ export class MJApplicationResolver extends ResolverBase {
|
|
|
20229
20245
|
return result;
|
|
20230
20246
|
}
|
|
20231
20247
|
|
|
20248
|
+
@FieldResolver(() => [MJConversation_])
|
|
20249
|
+
async MJConversations_ApplicationIDArray(@Root() mjapplication_: MJApplication_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
20250
|
+
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
20251
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20252
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversations')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
20253
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
20254
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
|
|
20255
|
+
return result;
|
|
20256
|
+
}
|
|
20257
|
+
|
|
20232
20258
|
@Mutation(() => MJApplication_)
|
|
20233
20259
|
async CreateMJApplication(
|
|
20234
20260
|
@Arg('input', () => CreateMJApplicationInput) input: CreateMJApplicationInput,
|
|
@@ -21885,8 +21911,9 @@ export class MJArtifactUse_ {
|
|
|
21885
21911
|
@Field()
|
|
21886
21912
|
_mj__UpdatedAt: Date;
|
|
21887
21913
|
|
|
21888
|
-
@Field(
|
|
21889
|
-
|
|
21914
|
+
@Field({nullable: true})
|
|
21915
|
+
@MaxLength(255)
|
|
21916
|
+
ArtifactVersion?: string;
|
|
21890
21917
|
|
|
21891
21918
|
@Field()
|
|
21892
21919
|
@MaxLength(100)
|
|
@@ -22066,8 +22093,9 @@ export class MJArtifactVersionAttribute_ {
|
|
|
22066
22093
|
@Field()
|
|
22067
22094
|
_mj__UpdatedAt: Date;
|
|
22068
22095
|
|
|
22069
|
-
@Field(
|
|
22070
|
-
|
|
22096
|
+
@Field({nullable: true})
|
|
22097
|
+
@MaxLength(255)
|
|
22098
|
+
ArtifactVersion?: string;
|
|
22071
22099
|
|
|
22072
22100
|
}
|
|
22073
22101
|
|
|
@@ -23716,8 +23744,9 @@ export class MJCollectionArtifact_ {
|
|
|
23716
23744
|
@MaxLength(255)
|
|
23717
23745
|
Collection: string;
|
|
23718
23746
|
|
|
23719
|
-
@Field(
|
|
23720
|
-
|
|
23747
|
+
@Field({nullable: true})
|
|
23748
|
+
@MaxLength(255)
|
|
23749
|
+
ArtifactVersion?: string;
|
|
23721
23750
|
|
|
23722
23751
|
}
|
|
23723
23752
|
|
|
@@ -28638,6 +28667,9 @@ export class MJComponent_ {
|
|
|
28638
28667
|
@Field(() => [MJComponentDependency_])
|
|
28639
28668
|
MJComponentDependencies_DependencyComponentIDArray: MJComponentDependency_[]; // Link to MJComponentDependencies
|
|
28640
28669
|
|
|
28670
|
+
@Field(() => [MJEntityFormOverride_])
|
|
28671
|
+
MJEntityFormOverrides_ComponentIDArray: MJEntityFormOverride_[]; // Link to MJEntityFormOverrides
|
|
28672
|
+
|
|
28641
28673
|
}
|
|
28642
28674
|
|
|
28643
28675
|
//****************************************************************************
|
|
@@ -28911,6 +28943,16 @@ export class MJComponentResolver extends ResolverBase {
|
|
|
28911
28943
|
return result;
|
|
28912
28944
|
}
|
|
28913
28945
|
|
|
28946
|
+
@FieldResolver(() => [MJEntityFormOverride_])
|
|
28947
|
+
async MJEntityFormOverrides_ComponentIDArray(@Root() mjcomponent_: MJComponent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28948
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
28949
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
28950
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('ComponentID')}='${mjcomponent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
28951
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
28952
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
28953
|
+
return result;
|
|
28954
|
+
}
|
|
28955
|
+
|
|
28914
28956
|
@Mutation(() => MJComponent_)
|
|
28915
28957
|
async CreateMJComponent(
|
|
28916
28958
|
@Arg('input', () => CreateMJComponentInput) input: CreateMJComponentInput,
|
|
@@ -32687,8 +32729,9 @@ export class MJConversationDetailArtifact_ {
|
|
|
32687
32729
|
@Field()
|
|
32688
32730
|
ConversationDetail: string;
|
|
32689
32731
|
|
|
32690
|
-
@Field(
|
|
32691
|
-
|
|
32732
|
+
@Field({nullable: true})
|
|
32733
|
+
@MaxLength(255)
|
|
32734
|
+
ArtifactVersion?: string;
|
|
32692
32735
|
|
|
32693
32736
|
}
|
|
32694
32737
|
|
|
@@ -32827,7 +32870,7 @@ export class MJConversationDetailArtifactResolver extends ResolverBase {
|
|
|
32827
32870
|
//****************************************************************************
|
|
32828
32871
|
// ENTITY CLASS for MJ: Conversation Detail Attachments
|
|
32829
32872
|
//****************************************************************************
|
|
32830
|
-
@ObjectType({ description: `
|
|
32873
|
+
@ObjectType({ description: `DEPRECATED: file uploads now flow through ConversationArtifactVersion so they share storage, identity, versioning, permissions, and the artifact-tool dispatch path. Table, generated entity class, GraphQL types, and stored procedures all remain functional — runtime use produces a console warning per the framework\'s standard handling of Status=\'Deprecated\'. See packages/AI/Agents/docs/ARTIFACT_TOOLS_GUIDE.md for migration guidance. Originally: Stores attachments (images, videos, audio, documents) for conversation messages.` })
|
|
32831
32874
|
export class MJConversationDetailAttachment_ {
|
|
32832
32875
|
@Field()
|
|
32833
32876
|
@MaxLength(36)
|
|
@@ -32898,8 +32941,9 @@ export class MJConversationDetailAttachment_ {
|
|
|
32898
32941
|
@MaxLength(500)
|
|
32899
32942
|
File?: string;
|
|
32900
32943
|
|
|
32901
|
-
@Field(
|
|
32902
|
-
|
|
32944
|
+
@Field({nullable: true})
|
|
32945
|
+
@MaxLength(255)
|
|
32946
|
+
ArtifactVersion?: string;
|
|
32903
32947
|
|
|
32904
32948
|
}
|
|
32905
32949
|
|
|
@@ -33813,11 +33857,11 @@ export class MJConversation_ {
|
|
|
33813
33857
|
@Field(() => Boolean, {description: `Indicates if this conversation has been archived and should not appear in active lists.`})
|
|
33814
33858
|
IsArchived: boolean;
|
|
33815
33859
|
|
|
33816
|
-
@Field({nullable: true})
|
|
33860
|
+
@Field({nullable: true, description: `Generic 'what is this conversation about?' pointer. Names the Entity whose record this conversation references (e.g. MJ: Components when the conversation was started in the Form Builder cockpit about a specific form). Paired with LinkedRecordID via the CK_Conversation_LinkBinding cross-column CHECK — both NULL or both populated. Surfaces use this to filter their conversation list to entries about the currently-loaded record (e.g. 'show prior conversations about THIS form'). Reusable beyond Form Builder by any future dashboard / record-context surface that wants the same UX without further schema work.`})
|
|
33817
33861
|
@MaxLength(36)
|
|
33818
33862
|
LinkedEntityID?: string;
|
|
33819
33863
|
|
|
33820
|
-
@Field({nullable: true, description: `
|
|
33864
|
+
@Field({nullable: true, description: `The primary key of the record this conversation is about, serialized as a string so any entity type can be referenced regardless of its PK shape (UUID, int, composite). Used together with LinkedEntityID — see CK_Conversation_LinkBinding. Wide enough (NVARCHAR(500) in the baseline schema) to handle chunky composite keys. Surfaces query by (LinkedEntityID, LinkedRecordID) — or by LinkedRecordID IN (...) when a lineage of records shares conversation context (e.g. multiple Component versions of the same form lineage).`})
|
|
33821
33865
|
@MaxLength(500)
|
|
33822
33866
|
LinkedRecordID?: string;
|
|
33823
33867
|
|
|
@@ -33850,6 +33894,21 @@ export class MJConversation_ {
|
|
|
33850
33894
|
@MaxLength(36)
|
|
33851
33895
|
TestRunID?: string;
|
|
33852
33896
|
|
|
33897
|
+
@Field({description: `Controls where this conversation surfaces in the UI. Global = appears in the main Chat app (no application binding). Application = scoped to a specific Application's embedded chat surface (e.g. the Form Builder cockpit); hidden from the main chat list by default. Both = explicitly promoted to appear in BOTH the main chat list and the bound Application's embedded surface. Defaults to Global so pre-existing conversations stay visible in main chat. Paired with ApplicationID via a cross-column CHECK constraint: Global => ApplicationID IS NULL; Application or Both => ApplicationID IS NOT NULL.`})
|
|
33898
|
+
@MaxLength(20)
|
|
33899
|
+
ApplicationScope: string;
|
|
33900
|
+
|
|
33901
|
+
@Field({nullable: true, description: `Optional Application this conversation is bound to. Required when ApplicationScope is 'Application' or 'Both'; must be NULL when ApplicationScope is 'Global'. Enforced by the CK_Conversation_ScopeAppBinding cross-column CHECK. Used by embedded chat surfaces (e.g. the Form Builder cockpit) to filter their conversation list to just their own application's conversations.`})
|
|
33902
|
+
@MaxLength(36)
|
|
33903
|
+
ApplicationID?: string;
|
|
33904
|
+
|
|
33905
|
+
@Field({nullable: true, description: `Optional per-conversation default AI agent. When set, the message router targets this agent for non-mention, non-continuity messages instead of falling through to the embedder-supplied default (e.g. Form Builder) or to Sage. Lets a user pin a conversation to a specific specialist agent (e.g. Research Agent) so Sage is never invoked for that thread. Routing precedence: @mention > continuity (last responder) > Conversation.DefaultAgentID > embedder's defaultAgentId input > Sage fallback.`})
|
|
33906
|
+
@MaxLength(36)
|
|
33907
|
+
DefaultAgentID?: string;
|
|
33908
|
+
|
|
33909
|
+
@Field({nullable: true, description: `Free-form JSON extensibility column. Apps that want to attach conversation-scoped metadata (UI state, draft notes, custom analytics tags, etc.) can stuff it here without a schema change. **Namespace your keys** to avoid collisions across apps — store e.g. {"form-builder.lastPreviewRecordId":"...","my-app.fooFlag":true} rather than top-level lastPreviewRecordId. Core MJ code paths do NOT read this column; it's purely for downstream apps. NVARCHAR(MAX) so callers can store arbitrarily large blobs, but treat that as a smell — heavy data belongs in a real entity, not a JSON dump.`})
|
|
33910
|
+
AdditionalData?: string;
|
|
33911
|
+
|
|
33853
33912
|
@Field()
|
|
33854
33913
|
@MaxLength(100)
|
|
33855
33914
|
User: string;
|
|
@@ -33874,6 +33933,14 @@ export class MJConversation_ {
|
|
|
33874
33933
|
@MaxLength(255)
|
|
33875
33934
|
TestRun?: string;
|
|
33876
33935
|
|
|
33936
|
+
@Field({nullable: true})
|
|
33937
|
+
@MaxLength(100)
|
|
33938
|
+
Application?: string;
|
|
33939
|
+
|
|
33940
|
+
@Field({nullable: true})
|
|
33941
|
+
@MaxLength(255)
|
|
33942
|
+
DefaultAgent?: string;
|
|
33943
|
+
|
|
33877
33944
|
@Field(() => [MJConversationDetail_])
|
|
33878
33945
|
MJConversationDetails_ConversationIDArray: MJConversationDetail_[]; // Link to MJConversationDetails
|
|
33879
33946
|
|
|
@@ -33944,6 +34011,18 @@ export class CreateMJConversationInput {
|
|
|
33944
34011
|
@Field({ nullable: true })
|
|
33945
34012
|
TestRunID: string | null;
|
|
33946
34013
|
|
|
34014
|
+
@Field({ nullable: true })
|
|
34015
|
+
ApplicationScope?: string;
|
|
34016
|
+
|
|
34017
|
+
@Field({ nullable: true })
|
|
34018
|
+
ApplicationID: string | null;
|
|
34019
|
+
|
|
34020
|
+
@Field({ nullable: true })
|
|
34021
|
+
DefaultAgentID: string | null;
|
|
34022
|
+
|
|
34023
|
+
@Field({ nullable: true })
|
|
34024
|
+
AdditionalData: string | null;
|
|
34025
|
+
|
|
33947
34026
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
33948
34027
|
RestoreContext___?: RestoreContextInput;
|
|
33949
34028
|
}
|
|
@@ -33999,6 +34078,18 @@ export class UpdateMJConversationInput {
|
|
|
33999
34078
|
@Field({ nullable: true })
|
|
34000
34079
|
TestRunID?: string | null;
|
|
34001
34080
|
|
|
34081
|
+
@Field({ nullable: true })
|
|
34082
|
+
ApplicationScope?: string;
|
|
34083
|
+
|
|
34084
|
+
@Field({ nullable: true })
|
|
34085
|
+
ApplicationID?: string | null;
|
|
34086
|
+
|
|
34087
|
+
@Field({ nullable: true })
|
|
34088
|
+
DefaultAgentID?: string | null;
|
|
34089
|
+
|
|
34090
|
+
@Field({ nullable: true })
|
|
34091
|
+
AdditionalData?: string | null;
|
|
34092
|
+
|
|
34002
34093
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
34003
34094
|
OldValues___?: KeyValuePairInput[];
|
|
34004
34095
|
|
|
@@ -40426,6 +40517,9 @@ export class MJEntity_ {
|
|
|
40426
40517
|
@Field(() => [MJTestRun_])
|
|
40427
40518
|
MJTestRuns_TargetLogEntityIDArray: MJTestRun_[]; // Link to MJTestRuns
|
|
40428
40519
|
|
|
40520
|
+
@Field(() => [MJEntityFormOverride_])
|
|
40521
|
+
MJEntityFormOverrides_EntityIDArray: MJEntityFormOverride_[]; // Link to MJEntityFormOverrides
|
|
40522
|
+
|
|
40429
40523
|
}
|
|
40430
40524
|
|
|
40431
40525
|
//****************************************************************************
|
|
@@ -41473,6 +41567,16 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
41473
41567
|
return result;
|
|
41474
41568
|
}
|
|
41475
41569
|
|
|
41570
|
+
@FieldResolver(() => [MJEntityFormOverride_])
|
|
41571
|
+
async MJEntityFormOverrides_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41572
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
41573
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41574
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
41575
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
41576
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
41577
|
+
return result;
|
|
41578
|
+
}
|
|
41579
|
+
|
|
41476
41580
|
@Mutation(() => MJEntity_)
|
|
41477
41581
|
async CreateMJEntity(
|
|
41478
41582
|
@Arg('input', () => CreateMJEntityInput) input: CreateMJEntityInput,
|
|
@@ -44763,6 +44867,250 @@ export class MJEntityFieldResolver extends ResolverBase {
|
|
|
44763
44867
|
|
|
44764
44868
|
}
|
|
44765
44869
|
|
|
44870
|
+
//****************************************************************************
|
|
44871
|
+
// ENTITY CLASS for MJ: Entity Form Overrides
|
|
44872
|
+
//****************************************************************************
|
|
44873
|
+
@ObjectType({ description: `Points an Entity at a Component to serve as its form at runtime. Scoped to User > Role > Global with priority-based resolution. When present and Active, takes precedence over the entity\'s @RegisterClass-registered or CodeGen-generated Angular form.` })
|
|
44874
|
+
export class MJEntityFormOverride_ {
|
|
44875
|
+
@Field()
|
|
44876
|
+
@MaxLength(36)
|
|
44877
|
+
ID: string;
|
|
44878
|
+
|
|
44879
|
+
@Field({description: `Foreign key to Entity — which entity this override is for.`})
|
|
44880
|
+
@MaxLength(36)
|
|
44881
|
+
EntityID: string;
|
|
44882
|
+
|
|
44883
|
+
@Field({description: `Foreign key to Component — the component that renders the form. Must declare componentRole='form' and implement the FormHostProps contract.`})
|
|
44884
|
+
@MaxLength(36)
|
|
44885
|
+
ComponentID: string;
|
|
44886
|
+
|
|
44887
|
+
@Field({description: `Human-readable label for this override (e.g., "CSR Customer Form", "Compact Mobile Variant").`})
|
|
44888
|
+
@MaxLength(255)
|
|
44889
|
+
Name: string;
|
|
44890
|
+
|
|
44891
|
+
@Field({nullable: true, description: `Optional longer description of what this override is for and when it applies.`})
|
|
44892
|
+
Description?: string;
|
|
44893
|
+
|
|
44894
|
+
@Field({description: `Resolution tier: User (requires UserID), Role (requires RoleID), or Global. The resolver evaluates in that order — a User row beats a Role row beats a Global row.`})
|
|
44895
|
+
@MaxLength(20)
|
|
44896
|
+
Scope: string;
|
|
44897
|
+
|
|
44898
|
+
@Field({nullable: true, description: `Required when Scope='User'. The single user this override applies to.`})
|
|
44899
|
+
@MaxLength(36)
|
|
44900
|
+
UserID?: string;
|
|
44901
|
+
|
|
44902
|
+
@Field({nullable: true, description: `Required when Scope='Role'. The role whose members see this override.`})
|
|
44903
|
+
@MaxLength(36)
|
|
44904
|
+
RoleID?: string;
|
|
44905
|
+
|
|
44906
|
+
@Field(() => Int, {description: `Higher value wins within a scope tier. Ties broken by __mj_CreatedAt DESC. No IsDefault — Priority is the only mechanism.`})
|
|
44907
|
+
Priority: number;
|
|
44908
|
+
|
|
44909
|
+
@Field({description: `Active = eligible for resolution. Inactive = ignored. Pending = AI-authored, awaiting human activation (resolver treats as Inactive).`})
|
|
44910
|
+
@MaxLength(20)
|
|
44911
|
+
Status: string;
|
|
44912
|
+
|
|
44913
|
+
@Field({nullable: true, description: `Optional free-form commentary about this override — e.g. who authored it, why it exists, what should change before it goes Global, links to related discussions. Does not affect resolution.`})
|
|
44914
|
+
Notes?: string;
|
|
44915
|
+
|
|
44916
|
+
@Field()
|
|
44917
|
+
_mj__CreatedAt: Date;
|
|
44918
|
+
|
|
44919
|
+
@Field()
|
|
44920
|
+
_mj__UpdatedAt: Date;
|
|
44921
|
+
|
|
44922
|
+
@Field()
|
|
44923
|
+
@MaxLength(255)
|
|
44924
|
+
Entity: string;
|
|
44925
|
+
|
|
44926
|
+
@Field()
|
|
44927
|
+
@MaxLength(500)
|
|
44928
|
+
Component: string;
|
|
44929
|
+
|
|
44930
|
+
@Field({nullable: true})
|
|
44931
|
+
@MaxLength(100)
|
|
44932
|
+
User?: string;
|
|
44933
|
+
|
|
44934
|
+
@Field({nullable: true})
|
|
44935
|
+
@MaxLength(50)
|
|
44936
|
+
Role?: string;
|
|
44937
|
+
|
|
44938
|
+
}
|
|
44939
|
+
|
|
44940
|
+
//****************************************************************************
|
|
44941
|
+
// INPUT TYPE for MJ: Entity Form Overrides
|
|
44942
|
+
//****************************************************************************
|
|
44943
|
+
@InputType()
|
|
44944
|
+
export class CreateMJEntityFormOverrideInput {
|
|
44945
|
+
@Field({ nullable: true })
|
|
44946
|
+
ID?: string;
|
|
44947
|
+
|
|
44948
|
+
@Field({ nullable: true })
|
|
44949
|
+
EntityID?: string;
|
|
44950
|
+
|
|
44951
|
+
@Field({ nullable: true })
|
|
44952
|
+
ComponentID?: string;
|
|
44953
|
+
|
|
44954
|
+
@Field({ nullable: true })
|
|
44955
|
+
Name?: string;
|
|
44956
|
+
|
|
44957
|
+
@Field({ nullable: true })
|
|
44958
|
+
Description: string | null;
|
|
44959
|
+
|
|
44960
|
+
@Field({ nullable: true })
|
|
44961
|
+
Scope?: string;
|
|
44962
|
+
|
|
44963
|
+
@Field({ nullable: true })
|
|
44964
|
+
UserID: string | null;
|
|
44965
|
+
|
|
44966
|
+
@Field({ nullable: true })
|
|
44967
|
+
RoleID: string | null;
|
|
44968
|
+
|
|
44969
|
+
@Field(() => Int, { nullable: true })
|
|
44970
|
+
Priority?: number;
|
|
44971
|
+
|
|
44972
|
+
@Field({ nullable: true })
|
|
44973
|
+
Status?: string;
|
|
44974
|
+
|
|
44975
|
+
@Field({ nullable: true })
|
|
44976
|
+
Notes: string | null;
|
|
44977
|
+
|
|
44978
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
44979
|
+
RestoreContext___?: RestoreContextInput;
|
|
44980
|
+
}
|
|
44981
|
+
|
|
44982
|
+
|
|
44983
|
+
//****************************************************************************
|
|
44984
|
+
// INPUT TYPE for MJ: Entity Form Overrides
|
|
44985
|
+
//****************************************************************************
|
|
44986
|
+
@InputType()
|
|
44987
|
+
export class UpdateMJEntityFormOverrideInput {
|
|
44988
|
+
@Field()
|
|
44989
|
+
ID: string;
|
|
44990
|
+
|
|
44991
|
+
@Field({ nullable: true })
|
|
44992
|
+
EntityID?: string;
|
|
44993
|
+
|
|
44994
|
+
@Field({ nullable: true })
|
|
44995
|
+
ComponentID?: string;
|
|
44996
|
+
|
|
44997
|
+
@Field({ nullable: true })
|
|
44998
|
+
Name?: string;
|
|
44999
|
+
|
|
45000
|
+
@Field({ nullable: true })
|
|
45001
|
+
Description?: string | null;
|
|
45002
|
+
|
|
45003
|
+
@Field({ nullable: true })
|
|
45004
|
+
Scope?: string;
|
|
45005
|
+
|
|
45006
|
+
@Field({ nullable: true })
|
|
45007
|
+
UserID?: string | null;
|
|
45008
|
+
|
|
45009
|
+
@Field({ nullable: true })
|
|
45010
|
+
RoleID?: string | null;
|
|
45011
|
+
|
|
45012
|
+
@Field(() => Int, { nullable: true })
|
|
45013
|
+
Priority?: number;
|
|
45014
|
+
|
|
45015
|
+
@Field({ nullable: true })
|
|
45016
|
+
Status?: string;
|
|
45017
|
+
|
|
45018
|
+
@Field({ nullable: true })
|
|
45019
|
+
Notes?: string | null;
|
|
45020
|
+
|
|
45021
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
45022
|
+
OldValues___?: KeyValuePairInput[];
|
|
45023
|
+
|
|
45024
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
45025
|
+
RestoreContext___?: RestoreContextInput;
|
|
45026
|
+
}
|
|
45027
|
+
|
|
45028
|
+
//****************************************************************************
|
|
45029
|
+
// RESOLVER for MJ: Entity Form Overrides
|
|
45030
|
+
//****************************************************************************
|
|
45031
|
+
@ObjectType()
|
|
45032
|
+
export class RunMJEntityFormOverrideViewResult {
|
|
45033
|
+
@Field(() => [MJEntityFormOverride_])
|
|
45034
|
+
Results: MJEntityFormOverride_[];
|
|
45035
|
+
|
|
45036
|
+
@Field(() => String, {nullable: true})
|
|
45037
|
+
UserViewRunID?: string;
|
|
45038
|
+
|
|
45039
|
+
@Field(() => Int, {nullable: true})
|
|
45040
|
+
RowCount: number;
|
|
45041
|
+
|
|
45042
|
+
@Field(() => Int, {nullable: true})
|
|
45043
|
+
TotalRowCount: number;
|
|
45044
|
+
|
|
45045
|
+
@Field(() => Int, {nullable: true})
|
|
45046
|
+
ExecutionTime: number;
|
|
45047
|
+
|
|
45048
|
+
@Field({nullable: true})
|
|
45049
|
+
ErrorMessage?: string;
|
|
45050
|
+
|
|
45051
|
+
@Field(() => Boolean, {nullable: false})
|
|
45052
|
+
Success: boolean;
|
|
45053
|
+
}
|
|
45054
|
+
|
|
45055
|
+
@Resolver(MJEntityFormOverride_)
|
|
45056
|
+
export class MJEntityFormOverrideResolver extends ResolverBase {
|
|
45057
|
+
@Query(() => RunMJEntityFormOverrideViewResult)
|
|
45058
|
+
async RunMJEntityFormOverrideViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45059
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45060
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
45061
|
+
}
|
|
45062
|
+
|
|
45063
|
+
@Query(() => RunMJEntityFormOverrideViewResult)
|
|
45064
|
+
async RunMJEntityFormOverrideViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45065
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45066
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
45067
|
+
}
|
|
45068
|
+
|
|
45069
|
+
@Query(() => RunMJEntityFormOverrideViewResult)
|
|
45070
|
+
async RunMJEntityFormOverrideDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45071
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45072
|
+
input.EntityName = 'MJ: Entity Form Overrides';
|
|
45073
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
45074
|
+
}
|
|
45075
|
+
@Query(() => MJEntityFormOverride_, { nullable: true })
|
|
45076
|
+
async MJEntityFormOverride(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJEntityFormOverride_ | null> {
|
|
45077
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
45078
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
45079
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
45080
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
45081
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
45082
|
+
return result;
|
|
45083
|
+
}
|
|
45084
|
+
|
|
45085
|
+
@Mutation(() => MJEntityFormOverride_)
|
|
45086
|
+
async CreateMJEntityFormOverride(
|
|
45087
|
+
@Arg('input', () => CreateMJEntityFormOverrideInput) input: CreateMJEntityFormOverrideInput,
|
|
45088
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
45089
|
+
@PubSub() pubSub: PubSubEngine
|
|
45090
|
+
) {
|
|
45091
|
+
const provider = GetReadWriteProvider(providers);
|
|
45092
|
+
return this.CreateRecord('MJ: Entity Form Overrides', input, provider, userPayload, pubSub)
|
|
45093
|
+
}
|
|
45094
|
+
|
|
45095
|
+
@Mutation(() => MJEntityFormOverride_)
|
|
45096
|
+
async UpdateMJEntityFormOverride(
|
|
45097
|
+
@Arg('input', () => UpdateMJEntityFormOverrideInput) input: UpdateMJEntityFormOverrideInput,
|
|
45098
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
45099
|
+
@PubSub() pubSub: PubSubEngine
|
|
45100
|
+
) {
|
|
45101
|
+
const provider = GetReadWriteProvider(providers);
|
|
45102
|
+
return this.UpdateRecord('MJ: Entity Form Overrides', input, provider, userPayload, pubSub);
|
|
45103
|
+
}
|
|
45104
|
+
|
|
45105
|
+
@Mutation(() => MJEntityFormOverride_)
|
|
45106
|
+
async DeleteMJEntityFormOverride(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
45107
|
+
const provider = GetReadWriteProvider(providers);
|
|
45108
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
45109
|
+
return this.DeleteRecord('MJ: Entity Form Overrides', key, options, provider, userPayload, pubSub);
|
|
45110
|
+
}
|
|
45111
|
+
|
|
45112
|
+
}
|
|
45113
|
+
|
|
44766
45114
|
//****************************************************************************
|
|
44767
45115
|
// ENTITY CLASS for MJ: Entity Organic Key Related Entities
|
|
44768
45116
|
//****************************************************************************
|
|
@@ -63767,6 +64115,9 @@ export class MJRole_ {
|
|
|
63767
64115
|
@Field(() => [MJSearchScopePermission_])
|
|
63768
64116
|
MJSearchScopePermissions_RoleIDArray: MJSearchScopePermission_[]; // Link to MJSearchScopePermissions
|
|
63769
64117
|
|
|
64118
|
+
@Field(() => [MJEntityFormOverride_])
|
|
64119
|
+
MJEntityFormOverrides_RoleIDArray: MJEntityFormOverride_[]; // Link to MJEntityFormOverrides
|
|
64120
|
+
|
|
63770
64121
|
}
|
|
63771
64122
|
|
|
63772
64123
|
//****************************************************************************
|
|
@@ -63998,6 +64349,16 @@ export class MJRoleResolver extends ResolverBase {
|
|
|
63998
64349
|
return result;
|
|
63999
64350
|
}
|
|
64000
64351
|
|
|
64352
|
+
@FieldResolver(() => [MJEntityFormOverride_])
|
|
64353
|
+
async MJEntityFormOverrides_RoleIDArray(@Root() mjrole_: MJRole_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
64354
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
64355
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
64356
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('RoleID')}='${mjrole_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
64357
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
64358
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
64359
|
+
return result;
|
|
64360
|
+
}
|
|
64361
|
+
|
|
64001
64362
|
@Mutation(() => MJRole_)
|
|
64002
64363
|
async CreateMJRole(
|
|
64003
64364
|
@Arg('input', () => CreateMJRoleInput) input: CreateMJRoleInput,
|
|
@@ -77655,6 +78016,9 @@ export class MJUser_ {
|
|
|
77655
78016
|
@Field(() => [MJList_])
|
|
77656
78017
|
MJLists_LastRefreshedByUserIDArray: MJList_[]; // Link to MJLists
|
|
77657
78018
|
|
|
78019
|
+
@Field(() => [MJEntityFormOverride_])
|
|
78020
|
+
MJEntityFormOverrides_UserIDArray: MJEntityFormOverride_[]; // Link to MJEntityFormOverrides
|
|
78021
|
+
|
|
77658
78022
|
}
|
|
77659
78023
|
|
|
77660
78024
|
//****************************************************************************
|
|
@@ -78800,6 +79164,16 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
78800
79164
|
return result;
|
|
78801
79165
|
}
|
|
78802
79166
|
|
|
79167
|
+
@FieldResolver(() => [MJEntityFormOverride_])
|
|
79168
|
+
async MJEntityFormOverrides_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
79169
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
79170
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
79171
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
79172
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
79173
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
79174
|
+
return result;
|
|
79175
|
+
}
|
|
79176
|
+
|
|
78803
79177
|
@Mutation(() => MJUser_)
|
|
78804
79178
|
async CreateMJUser(
|
|
78805
79179
|
@Arg('input', () => CreateMJUserInput) input: CreateMJUserInput,
|