@memberjunction/server 2.32.2 → 2.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/generated.d.ts +182 -12
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1148 -61
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +78 -66
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/resolvers/ActionResolver.d.ts +49 -0
- package/dist/resolvers/ActionResolver.d.ts.map +1 -0
- package/dist/resolvers/ActionResolver.js +359 -0
- package/dist/resolvers/ActionResolver.js.map +1 -0
- package/dist/resolvers/GetDataContextDataResolver.d.ts +1 -1
- package/dist/resolvers/GetDataContextDataResolver.d.ts.map +1 -1
- package/dist/resolvers/GetDataContextDataResolver.js +1 -1
- package/dist/resolvers/GetDataContextDataResolver.js.map +1 -1
- package/package.json +24 -22
- package/src/generated/generated.ts +813 -122
- package/src/generic/ResolverBase.ts +117 -78
- package/src/index.ts +22 -0
- package/src/resolvers/ActionResolver.ts +547 -0
- package/src/resolvers/GetDataContextDataResolver.ts +2 -2
|
@@ -19,7 +19,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, AIAgentNoteTypeEntity, AIAgentEntity, AIAgentNoteEntity, AIAgentActionEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, AIAgentRequestEntity, ReportUserStateEntity, QueryEntityEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, AIAgentLearningCycleEntity, ReportVersionEntity } from '@memberjunction/core-entities';
|
|
22
|
+
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, AIAgentNoteTypeEntity, AIAgentEntity, AIAgentNoteEntity, AIAgentActionEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, ReportUserStateEntity, QueryEntityEntity, ArtifactTypeEntity, ConversationArtifactEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, ConversationArtifactPermissionEntity, AIAgentLearningCycleEntity, ReportVersionEntity } from '@memberjunction/core-entities';
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
//****************************************************************************
|
|
@@ -4701,19 +4701,6 @@ export class EntityField_ {
|
|
|
4701
4701
|
@MaxLength(20)
|
|
4702
4702
|
ValuesToPackWithSchema: string;
|
|
4703
4703
|
|
|
4704
|
-
@Field({nullable: true, description: `Contains the name of the generated field validation function, if it exists, null otherwise`})
|
|
4705
|
-
@MaxLength(510)
|
|
4706
|
-
GeneratedValidationFunctionName?: string;
|
|
4707
|
-
|
|
4708
|
-
@Field({nullable: true, description: `Contains a description for business users of what the validation function for this field does, if it exists`})
|
|
4709
|
-
GeneratedValidationFunctionDescription?: string;
|
|
4710
|
-
|
|
4711
|
-
@Field({nullable: true, description: `Contains the generated code for the field validation function, if it exists, null otherwise.`})
|
|
4712
|
-
GeneratedValidationFunctionCode?: string;
|
|
4713
|
-
|
|
4714
|
-
@Field({nullable: true, description: `If a generated validation function was generated previously, this stores the text from the source CHECK constraint in the database. This is stored so that regeneration of the validation function will only occur when the source CHECK constraint changes.`})
|
|
4715
|
-
GeneratedValidationFunctionCheckConstraint?: string;
|
|
4716
|
-
|
|
4717
4704
|
@Field({nullable: true})
|
|
4718
4705
|
FieldCodeName?: string;
|
|
4719
4706
|
|
|
@@ -4857,18 +4844,6 @@ export class CreateEntityFieldInput {
|
|
|
4857
4844
|
|
|
4858
4845
|
@Field({ nullable: true })
|
|
4859
4846
|
ValuesToPackWithSchema?: string;
|
|
4860
|
-
|
|
4861
|
-
@Field({ nullable: true })
|
|
4862
|
-
GeneratedValidationFunctionName: string | null;
|
|
4863
|
-
|
|
4864
|
-
@Field({ nullable: true })
|
|
4865
|
-
GeneratedValidationFunctionDescription: string | null;
|
|
4866
|
-
|
|
4867
|
-
@Field({ nullable: true })
|
|
4868
|
-
GeneratedValidationFunctionCode: string | null;
|
|
4869
|
-
|
|
4870
|
-
@Field({ nullable: true })
|
|
4871
|
-
GeneratedValidationFunctionCheckConstraint: string | null;
|
|
4872
4847
|
}
|
|
4873
4848
|
|
|
4874
4849
|
|
|
@@ -4967,18 +4942,6 @@ export class UpdateEntityFieldInput {
|
|
|
4967
4942
|
@Field({ nullable: true })
|
|
4968
4943
|
ValuesToPackWithSchema?: string;
|
|
4969
4944
|
|
|
4970
|
-
@Field({ nullable: true })
|
|
4971
|
-
GeneratedValidationFunctionName?: string | null;
|
|
4972
|
-
|
|
4973
|
-
@Field({ nullable: true })
|
|
4974
|
-
GeneratedValidationFunctionDescription?: string | null;
|
|
4975
|
-
|
|
4976
|
-
@Field({ nullable: true })
|
|
4977
|
-
GeneratedValidationFunctionCode?: string | null;
|
|
4978
|
-
|
|
4979
|
-
@Field({ nullable: true })
|
|
4980
|
-
GeneratedValidationFunctionCheckConstraint?: string | null;
|
|
4981
|
-
|
|
4982
4945
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
4983
4946
|
OldValues___?: KeyValuePairInput[];
|
|
4984
4947
|
}
|
|
@@ -15998,6 +15961,9 @@ export class Conversation_ {
|
|
|
15998
15961
|
@Field(() => [Report_])
|
|
15999
15962
|
Reports_ConversationIDArray: Report_[]; // Link to Reports
|
|
16000
15963
|
|
|
15964
|
+
@Field(() => [ConversationArtifact_])
|
|
15965
|
+
MJ_ConversationArtifacts_ConversationIDArray: ConversationArtifact_[]; // Link to MJ_ConversationArtifacts
|
|
15966
|
+
|
|
16001
15967
|
}
|
|
16002
15968
|
|
|
16003
15969
|
//****************************************************************************
|
|
@@ -16147,6 +16113,15 @@ export class ConversationResolver extends ResolverBase {
|
|
|
16147
16113
|
return result;
|
|
16148
16114
|
}
|
|
16149
16115
|
|
|
16116
|
+
@FieldResolver(() => [ConversationArtifact_])
|
|
16117
|
+
async MJ_ConversationArtifacts_ConversationIDArray(@Root() conversation_: Conversation_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16118
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifacts', userPayload);
|
|
16119
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16120
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifacts] WHERE [ConversationID]='${conversation_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Conversation Artifacts', userPayload, EntityPermissionType.Read, 'AND');
|
|
16121
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifacts', await dataSource.query(sSQL));
|
|
16122
|
+
return result;
|
|
16123
|
+
}
|
|
16124
|
+
|
|
16150
16125
|
@Mutation(() => Conversation_)
|
|
16151
16126
|
async CreateConversation(
|
|
16152
16127
|
@Arg('input', () => CreateConversationInput) input: CreateConversationInput,
|
|
@@ -29378,6 +29353,179 @@ export class ResourceLinkResolver extends ResolverBase {
|
|
|
29378
29353
|
|
|
29379
29354
|
}
|
|
29380
29355
|
|
|
29356
|
+
//****************************************************************************
|
|
29357
|
+
// ENTITY CLASS for MJ: Conversation Artifact Versions
|
|
29358
|
+
//****************************************************************************
|
|
29359
|
+
@ObjectType()
|
|
29360
|
+
export class ConversationArtifactVersion_ {
|
|
29361
|
+
@Field()
|
|
29362
|
+
@MaxLength(16)
|
|
29363
|
+
ID: string;
|
|
29364
|
+
|
|
29365
|
+
@Field({description: `Reference to the parent artifact`})
|
|
29366
|
+
@MaxLength(16)
|
|
29367
|
+
ConversationArtifactID: string;
|
|
29368
|
+
|
|
29369
|
+
@Field(() => Int, {description: `Sequential version number (starting from 1) for this artifact`})
|
|
29370
|
+
Version: number;
|
|
29371
|
+
|
|
29372
|
+
@Field({description: `JSON configuration and metadata for this artifact version`})
|
|
29373
|
+
Configuration: string;
|
|
29374
|
+
|
|
29375
|
+
@Field({nullable: true, description: `Actual content of the artifact, if stored separately from configuration`})
|
|
29376
|
+
Content?: string;
|
|
29377
|
+
|
|
29378
|
+
@Field({nullable: true, description: `User comments specific to this version`})
|
|
29379
|
+
Comments?: string;
|
|
29380
|
+
|
|
29381
|
+
@Field()
|
|
29382
|
+
@MaxLength(10)
|
|
29383
|
+
_mj__CreatedAt: Date;
|
|
29384
|
+
|
|
29385
|
+
@Field()
|
|
29386
|
+
@MaxLength(10)
|
|
29387
|
+
_mj__UpdatedAt: Date;
|
|
29388
|
+
|
|
29389
|
+
@Field()
|
|
29390
|
+
@MaxLength(510)
|
|
29391
|
+
ConversationArtifact: string;
|
|
29392
|
+
|
|
29393
|
+
}
|
|
29394
|
+
|
|
29395
|
+
//****************************************************************************
|
|
29396
|
+
// INPUT TYPE for MJ: Conversation Artifact Versions
|
|
29397
|
+
//****************************************************************************
|
|
29398
|
+
@InputType()
|
|
29399
|
+
export class CreateConversationArtifactVersionInput {
|
|
29400
|
+
@Field({ nullable: true })
|
|
29401
|
+
ConversationArtifactID?: string;
|
|
29402
|
+
|
|
29403
|
+
@Field(() => Int, { nullable: true })
|
|
29404
|
+
Version?: number;
|
|
29405
|
+
|
|
29406
|
+
@Field({ nullable: true })
|
|
29407
|
+
Configuration?: string;
|
|
29408
|
+
|
|
29409
|
+
@Field({ nullable: true })
|
|
29410
|
+
Content: string | null;
|
|
29411
|
+
|
|
29412
|
+
@Field({ nullable: true })
|
|
29413
|
+
Comments: string | null;
|
|
29414
|
+
}
|
|
29415
|
+
|
|
29416
|
+
|
|
29417
|
+
//****************************************************************************
|
|
29418
|
+
// INPUT TYPE for MJ: Conversation Artifact Versions
|
|
29419
|
+
//****************************************************************************
|
|
29420
|
+
@InputType()
|
|
29421
|
+
export class UpdateConversationArtifactVersionInput {
|
|
29422
|
+
@Field()
|
|
29423
|
+
ID: string;
|
|
29424
|
+
|
|
29425
|
+
@Field({ nullable: true })
|
|
29426
|
+
ConversationArtifactID?: string;
|
|
29427
|
+
|
|
29428
|
+
@Field(() => Int, { nullable: true })
|
|
29429
|
+
Version?: number;
|
|
29430
|
+
|
|
29431
|
+
@Field({ nullable: true })
|
|
29432
|
+
Configuration?: string;
|
|
29433
|
+
|
|
29434
|
+
@Field({ nullable: true })
|
|
29435
|
+
Content?: string | null;
|
|
29436
|
+
|
|
29437
|
+
@Field({ nullable: true })
|
|
29438
|
+
Comments?: string | null;
|
|
29439
|
+
|
|
29440
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
29441
|
+
OldValues___?: KeyValuePairInput[];
|
|
29442
|
+
}
|
|
29443
|
+
|
|
29444
|
+
//****************************************************************************
|
|
29445
|
+
// RESOLVER for MJ: Conversation Artifact Versions
|
|
29446
|
+
//****************************************************************************
|
|
29447
|
+
@ObjectType()
|
|
29448
|
+
export class RunConversationArtifactVersionViewResult {
|
|
29449
|
+
@Field(() => [ConversationArtifactVersion_])
|
|
29450
|
+
Results: ConversationArtifactVersion_[];
|
|
29451
|
+
|
|
29452
|
+
@Field(() => String, {nullable: true})
|
|
29453
|
+
UserViewRunID?: string;
|
|
29454
|
+
|
|
29455
|
+
@Field(() => Int, {nullable: true})
|
|
29456
|
+
RowCount: number;
|
|
29457
|
+
|
|
29458
|
+
@Field(() => Int, {nullable: true})
|
|
29459
|
+
TotalRowCount: number;
|
|
29460
|
+
|
|
29461
|
+
@Field(() => Int, {nullable: true})
|
|
29462
|
+
ExecutionTime: number;
|
|
29463
|
+
|
|
29464
|
+
@Field({nullable: true})
|
|
29465
|
+
ErrorMessage?: string;
|
|
29466
|
+
|
|
29467
|
+
@Field(() => Boolean, {nullable: false})
|
|
29468
|
+
Success: boolean;
|
|
29469
|
+
}
|
|
29470
|
+
|
|
29471
|
+
@Resolver(ConversationArtifactVersion_)
|
|
29472
|
+
export class ConversationArtifactVersionResolver extends ResolverBase {
|
|
29473
|
+
@Query(() => RunConversationArtifactVersionViewResult)
|
|
29474
|
+
async RunConversationArtifactVersionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29475
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29476
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
29477
|
+
}
|
|
29478
|
+
|
|
29479
|
+
@Query(() => RunConversationArtifactVersionViewResult)
|
|
29480
|
+
async RunConversationArtifactVersionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29481
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29482
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
29483
|
+
}
|
|
29484
|
+
|
|
29485
|
+
@Query(() => RunConversationArtifactVersionViewResult)
|
|
29486
|
+
async RunConversationArtifactVersionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29487
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29488
|
+
input.EntityName = 'MJ: Conversation Artifact Versions';
|
|
29489
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
29490
|
+
}
|
|
29491
|
+
@Query(() => ConversationArtifactVersion_, { nullable: true })
|
|
29492
|
+
async ConversationArtifactVersion(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ConversationArtifactVersion_ | null> {
|
|
29493
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifact Versions', userPayload);
|
|
29494
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29495
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactVersions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Conversation Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
29496
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Conversation Artifact Versions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
29497
|
+
return result;
|
|
29498
|
+
}
|
|
29499
|
+
|
|
29500
|
+
@Mutation(() => ConversationArtifactVersion_)
|
|
29501
|
+
async CreateConversationArtifactVersion(
|
|
29502
|
+
@Arg('input', () => CreateConversationArtifactVersionInput) input: CreateConversationArtifactVersionInput,
|
|
29503
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
29504
|
+
@PubSub() pubSub: PubSubEngine
|
|
29505
|
+
) {
|
|
29506
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
29507
|
+
return this.CreateRecord('MJ: Conversation Artifact Versions', input, dataSource, userPayload, pubSub)
|
|
29508
|
+
}
|
|
29509
|
+
|
|
29510
|
+
@Mutation(() => ConversationArtifactVersion_)
|
|
29511
|
+
async UpdateConversationArtifactVersion(
|
|
29512
|
+
@Arg('input', () => UpdateConversationArtifactVersionInput) input: UpdateConversationArtifactVersionInput,
|
|
29513
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
29514
|
+
@PubSub() pubSub: PubSubEngine
|
|
29515
|
+
) {
|
|
29516
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
29517
|
+
return this.UpdateRecord('MJ: Conversation Artifact Versions', input, dataSource, userPayload, pubSub);
|
|
29518
|
+
}
|
|
29519
|
+
|
|
29520
|
+
@Mutation(() => ConversationArtifactVersion_)
|
|
29521
|
+
async DeleteConversationArtifactVersion(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29522
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
29523
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
29524
|
+
return this.DeleteRecord('MJ: Conversation Artifact Versions', key, options, dataSource, userPayload, pubSub);
|
|
29525
|
+
}
|
|
29526
|
+
|
|
29527
|
+
}
|
|
29528
|
+
|
|
29381
29529
|
//****************************************************************************
|
|
29382
29530
|
// ENTITY CLASS for AI Agent Requests
|
|
29383
29531
|
//****************************************************************************
|
|
@@ -29912,32 +30060,27 @@ export class QueryEntityResolver extends ResolverBase {
|
|
|
29912
30060
|
}
|
|
29913
30061
|
|
|
29914
30062
|
//****************************************************************************
|
|
29915
|
-
// ENTITY CLASS for
|
|
30063
|
+
// ENTITY CLASS for MJ: Artifact Types
|
|
29916
30064
|
//****************************************************************************
|
|
29917
30065
|
@ObjectType()
|
|
29918
|
-
export class
|
|
30066
|
+
export class ArtifactType_ {
|
|
29919
30067
|
@Field()
|
|
29920
30068
|
@MaxLength(16)
|
|
29921
30069
|
ID: string;
|
|
29922
30070
|
|
|
29923
|
-
@Field()
|
|
29924
|
-
@MaxLength(
|
|
29925
|
-
|
|
29926
|
-
|
|
29927
|
-
@Field({nullable: true})
|
|
29928
|
-
@MaxLength(8)
|
|
29929
|
-
StartTime?: Date;
|
|
30071
|
+
@Field({description: `Display name of the artifact type`})
|
|
30072
|
+
@MaxLength(200)
|
|
30073
|
+
Name: string;
|
|
29930
30074
|
|
|
29931
|
-
@Field({nullable: true})
|
|
29932
|
-
|
|
29933
|
-
EndTime?: Date;
|
|
30075
|
+
@Field({nullable: true, description: `Detailed description of the artifact type`})
|
|
30076
|
+
Description?: string;
|
|
29934
30077
|
|
|
29935
|
-
@Field({
|
|
30078
|
+
@Field({description: `MIME type or content identifier for this artifact type`})
|
|
29936
30079
|
@MaxLength(200)
|
|
29937
|
-
|
|
30080
|
+
ContentType: string;
|
|
29938
30081
|
|
|
29939
|
-
@Field(() =>
|
|
29940
|
-
|
|
30082
|
+
@Field(() => Boolean, {description: `Indicates if this artifact type is currently available for use`})
|
|
30083
|
+
IsEnabled: boolean;
|
|
29941
30084
|
|
|
29942
30085
|
@Field()
|
|
29943
30086
|
@MaxLength(10)
|
|
@@ -29947,68 +30090,61 @@ export class ContentProcessRun_ {
|
|
|
29947
30090
|
@MaxLength(10)
|
|
29948
30091
|
_mj__UpdatedAt: Date;
|
|
29949
30092
|
|
|
29950
|
-
@Field(
|
|
29951
|
-
|
|
29952
|
-
|
|
29953
|
-
|
|
30093
|
+
@Field(() => [ConversationArtifact_])
|
|
30094
|
+
MJ_ConversationArtifacts_ArtifactTypeIDArray: ConversationArtifact_[]; // Link to MJ_ConversationArtifacts
|
|
30095
|
+
|
|
29954
30096
|
}
|
|
29955
30097
|
|
|
29956
30098
|
//****************************************************************************
|
|
29957
|
-
// INPUT TYPE for
|
|
30099
|
+
// INPUT TYPE for MJ: Artifact Types
|
|
29958
30100
|
//****************************************************************************
|
|
29959
30101
|
@InputType()
|
|
29960
|
-
export class
|
|
29961
|
-
@Field({ nullable: true })
|
|
29962
|
-
SourceID?: string;
|
|
29963
|
-
|
|
30102
|
+
export class CreateArtifactTypeInput {
|
|
29964
30103
|
@Field({ nullable: true })
|
|
29965
|
-
|
|
30104
|
+
Name?: string;
|
|
29966
30105
|
|
|
29967
30106
|
@Field({ nullable: true })
|
|
29968
|
-
|
|
30107
|
+
Description: string | null;
|
|
29969
30108
|
|
|
29970
30109
|
@Field({ nullable: true })
|
|
29971
|
-
|
|
30110
|
+
ContentType?: string;
|
|
29972
30111
|
|
|
29973
|
-
@Field(() =>
|
|
29974
|
-
|
|
30112
|
+
@Field(() => Boolean, { nullable: true })
|
|
30113
|
+
IsEnabled?: boolean;
|
|
29975
30114
|
}
|
|
29976
30115
|
|
|
29977
30116
|
|
|
29978
30117
|
//****************************************************************************
|
|
29979
|
-
// INPUT TYPE for
|
|
30118
|
+
// INPUT TYPE for MJ: Artifact Types
|
|
29980
30119
|
//****************************************************************************
|
|
29981
30120
|
@InputType()
|
|
29982
|
-
export class
|
|
30121
|
+
export class UpdateArtifactTypeInput {
|
|
29983
30122
|
@Field()
|
|
29984
30123
|
ID: string;
|
|
29985
30124
|
|
|
29986
30125
|
@Field({ nullable: true })
|
|
29987
|
-
|
|
29988
|
-
|
|
29989
|
-
@Field({ nullable: true })
|
|
29990
|
-
StartTime?: Date | null;
|
|
30126
|
+
Name?: string;
|
|
29991
30127
|
|
|
29992
30128
|
@Field({ nullable: true })
|
|
29993
|
-
|
|
30129
|
+
Description?: string | null;
|
|
29994
30130
|
|
|
29995
30131
|
@Field({ nullable: true })
|
|
29996
|
-
|
|
30132
|
+
ContentType?: string;
|
|
29997
30133
|
|
|
29998
|
-
@Field(() =>
|
|
29999
|
-
|
|
30134
|
+
@Field(() => Boolean, { nullable: true })
|
|
30135
|
+
IsEnabled?: boolean;
|
|
30000
30136
|
|
|
30001
30137
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
30002
30138
|
OldValues___?: KeyValuePairInput[];
|
|
30003
30139
|
}
|
|
30004
30140
|
|
|
30005
30141
|
//****************************************************************************
|
|
30006
|
-
// RESOLVER for
|
|
30142
|
+
// RESOLVER for MJ: Artifact Types
|
|
30007
30143
|
//****************************************************************************
|
|
30008
30144
|
@ObjectType()
|
|
30009
|
-
export class
|
|
30010
|
-
@Field(() => [
|
|
30011
|
-
Results:
|
|
30145
|
+
export class RunArtifactTypeViewResult {
|
|
30146
|
+
@Field(() => [ArtifactType_])
|
|
30147
|
+
Results: ArtifactType_[];
|
|
30012
30148
|
|
|
30013
30149
|
@Field(() => String, {nullable: true})
|
|
30014
30150
|
UserViewRunID?: string;
|
|
@@ -30029,92 +30165,103 @@ export class RunContentProcessRunViewResult {
|
|
|
30029
30165
|
Success: boolean;
|
|
30030
30166
|
}
|
|
30031
30167
|
|
|
30032
|
-
@Resolver(
|
|
30033
|
-
export class
|
|
30034
|
-
@Query(() =>
|
|
30035
|
-
async
|
|
30168
|
+
@Resolver(ArtifactType_)
|
|
30169
|
+
export class ArtifactTypeResolver extends ResolverBase {
|
|
30170
|
+
@Query(() => RunArtifactTypeViewResult)
|
|
30171
|
+
async RunArtifactTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30036
30172
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30037
30173
|
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
30038
30174
|
}
|
|
30039
30175
|
|
|
30040
|
-
@Query(() =>
|
|
30041
|
-
async
|
|
30176
|
+
@Query(() => RunArtifactTypeViewResult)
|
|
30177
|
+
async RunArtifactTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30042
30178
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30043
30179
|
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
30044
30180
|
}
|
|
30045
30181
|
|
|
30046
|
-
@Query(() =>
|
|
30047
|
-
async
|
|
30182
|
+
@Query(() => RunArtifactTypeViewResult)
|
|
30183
|
+
async RunArtifactTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30048
30184
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30049
|
-
input.EntityName = '
|
|
30185
|
+
input.EntityName = 'MJ: Artifact Types';
|
|
30050
30186
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
30051
30187
|
}
|
|
30052
|
-
@Query(() =>
|
|
30053
|
-
async
|
|
30054
|
-
this.CheckUserReadPermissions('
|
|
30188
|
+
@Query(() => ArtifactType_, { nullable: true })
|
|
30189
|
+
async ArtifactType(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ArtifactType_ | null> {
|
|
30190
|
+
this.CheckUserReadPermissions('MJ: Artifact Types', userPayload);
|
|
30055
30191
|
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30056
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
30057
|
-
const result = this.MapFieldNamesToCodeNames('
|
|
30192
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactTypes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Artifact Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
30193
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Artifact Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
30058
30194
|
return result;
|
|
30059
30195
|
}
|
|
30060
30196
|
|
|
30061
|
-
@
|
|
30062
|
-
async
|
|
30063
|
-
|
|
30197
|
+
@FieldResolver(() => [ConversationArtifact_])
|
|
30198
|
+
async MJ_ConversationArtifacts_ArtifactTypeIDArray(@Root() artifacttype_: ArtifactType_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30199
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifacts', userPayload);
|
|
30200
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30201
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifacts] WHERE [ArtifactTypeID]='${artifacttype_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Conversation Artifacts', userPayload, EntityPermissionType.Read, 'AND');
|
|
30202
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifacts', await dataSource.query(sSQL));
|
|
30203
|
+
return result;
|
|
30204
|
+
}
|
|
30205
|
+
|
|
30206
|
+
@Mutation(() => ArtifactType_)
|
|
30207
|
+
async CreateArtifactType(
|
|
30208
|
+
@Arg('input', () => CreateArtifactTypeInput) input: CreateArtifactTypeInput,
|
|
30064
30209
|
@Ctx() { dataSources, userPayload }: AppContext,
|
|
30065
30210
|
@PubSub() pubSub: PubSubEngine
|
|
30066
30211
|
) {
|
|
30067
30212
|
const dataSource = GetReadWriteDataSource(dataSources);
|
|
30068
|
-
return this.CreateRecord('
|
|
30213
|
+
return this.CreateRecord('MJ: Artifact Types', input, dataSource, userPayload, pubSub)
|
|
30069
30214
|
}
|
|
30070
30215
|
|
|
30071
|
-
@Mutation(() =>
|
|
30072
|
-
async
|
|
30073
|
-
@Arg('input', () =>
|
|
30216
|
+
@Mutation(() => ArtifactType_)
|
|
30217
|
+
async UpdateArtifactType(
|
|
30218
|
+
@Arg('input', () => UpdateArtifactTypeInput) input: UpdateArtifactTypeInput,
|
|
30074
30219
|
@Ctx() { dataSources, userPayload }: AppContext,
|
|
30075
30220
|
@PubSub() pubSub: PubSubEngine
|
|
30076
30221
|
) {
|
|
30077
30222
|
const dataSource = GetReadWriteDataSource(dataSources);
|
|
30078
|
-
return this.UpdateRecord('
|
|
30223
|
+
return this.UpdateRecord('MJ: Artifact Types', input, dataSource, userPayload, pubSub);
|
|
30079
30224
|
}
|
|
30080
30225
|
|
|
30081
|
-
@Mutation(() =>
|
|
30082
|
-
async
|
|
30226
|
+
@Mutation(() => ArtifactType_)
|
|
30227
|
+
async DeleteArtifactType(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30083
30228
|
const dataSource = GetReadWriteDataSource(dataSources);
|
|
30084
30229
|
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
30085
|
-
return this.DeleteRecord('
|
|
30230
|
+
return this.DeleteRecord('MJ: Artifact Types', key, options, dataSource, userPayload, pubSub);
|
|
30086
30231
|
}
|
|
30087
30232
|
|
|
30088
30233
|
}
|
|
30089
30234
|
|
|
30090
30235
|
//****************************************************************************
|
|
30091
|
-
// ENTITY CLASS for
|
|
30236
|
+
// ENTITY CLASS for MJ: Conversation Artifacts
|
|
30092
30237
|
//****************************************************************************
|
|
30093
30238
|
@ObjectType()
|
|
30094
|
-
export class
|
|
30239
|
+
export class ConversationArtifact_ {
|
|
30095
30240
|
@Field()
|
|
30096
30241
|
@MaxLength(16)
|
|
30097
30242
|
ID: string;
|
|
30098
30243
|
|
|
30099
|
-
@Field({
|
|
30244
|
+
@Field({description: `Display name of the artifact`})
|
|
30100
30245
|
@MaxLength(510)
|
|
30101
|
-
Name
|
|
30246
|
+
Name: string;
|
|
30102
30247
|
|
|
30103
|
-
@Field()
|
|
30104
|
-
|
|
30105
|
-
ContentTypeID: string;
|
|
30248
|
+
@Field({nullable: true, description: `Extended description of the artifact`})
|
|
30249
|
+
Description?: string;
|
|
30106
30250
|
|
|
30107
|
-
@Field()
|
|
30251
|
+
@Field({description: `Reference to the conversation this artifact belongs to`})
|
|
30108
30252
|
@MaxLength(16)
|
|
30109
|
-
|
|
30253
|
+
ConversationID: string;
|
|
30110
30254
|
|
|
30111
|
-
@Field()
|
|
30255
|
+
@Field({description: `Reference to the type of artifact`})
|
|
30112
30256
|
@MaxLength(16)
|
|
30113
|
-
|
|
30257
|
+
ArtifactTypeID: string;
|
|
30114
30258
|
|
|
30115
|
-
@Field()
|
|
30116
|
-
@MaxLength(
|
|
30117
|
-
|
|
30259
|
+
@Field({description: `Controls who can view this artifact (None, SpecificUsers, Everyone, Public)`})
|
|
30260
|
+
@MaxLength(100)
|
|
30261
|
+
SharingScope: string;
|
|
30262
|
+
|
|
30263
|
+
@Field({nullable: true, description: `User comments about the artifact`})
|
|
30264
|
+
Comments?: string;
|
|
30118
30265
|
|
|
30119
30266
|
@Field()
|
|
30120
30267
|
@MaxLength(10)
|
|
@@ -30124,7 +30271,394 @@ export class ContentSource_ {
|
|
|
30124
30271
|
@MaxLength(10)
|
|
30125
30272
|
_mj__UpdatedAt: Date;
|
|
30126
30273
|
|
|
30127
|
-
@Field()
|
|
30274
|
+
@Field({nullable: true})
|
|
30275
|
+
@MaxLength(510)
|
|
30276
|
+
Conversation?: string;
|
|
30277
|
+
|
|
30278
|
+
@Field()
|
|
30279
|
+
@MaxLength(200)
|
|
30280
|
+
ArtifactType: string;
|
|
30281
|
+
|
|
30282
|
+
@Field(() => [ConversationArtifactPermission_])
|
|
30283
|
+
MJ_ConversationArtifactPermissions_ConversationArtifactIDArray: ConversationArtifactPermission_[]; // Link to MJ_ConversationArtifactPermissions
|
|
30284
|
+
|
|
30285
|
+
@Field(() => [ConversationArtifactVersion_])
|
|
30286
|
+
MJ_ConversationArtifactVersions_ConversationArtifactIDArray: ConversationArtifactVersion_[]; // Link to MJ_ConversationArtifactVersions
|
|
30287
|
+
|
|
30288
|
+
}
|
|
30289
|
+
|
|
30290
|
+
//****************************************************************************
|
|
30291
|
+
// INPUT TYPE for MJ: Conversation Artifacts
|
|
30292
|
+
//****************************************************************************
|
|
30293
|
+
@InputType()
|
|
30294
|
+
export class CreateConversationArtifactInput {
|
|
30295
|
+
@Field({ nullable: true })
|
|
30296
|
+
Name?: string;
|
|
30297
|
+
|
|
30298
|
+
@Field({ nullable: true })
|
|
30299
|
+
Description: string | null;
|
|
30300
|
+
|
|
30301
|
+
@Field({ nullable: true })
|
|
30302
|
+
ConversationID?: string;
|
|
30303
|
+
|
|
30304
|
+
@Field({ nullable: true })
|
|
30305
|
+
ArtifactTypeID?: string;
|
|
30306
|
+
|
|
30307
|
+
@Field({ nullable: true })
|
|
30308
|
+
SharingScope?: string;
|
|
30309
|
+
|
|
30310
|
+
@Field({ nullable: true })
|
|
30311
|
+
Comments: string | null;
|
|
30312
|
+
}
|
|
30313
|
+
|
|
30314
|
+
|
|
30315
|
+
//****************************************************************************
|
|
30316
|
+
// INPUT TYPE for MJ: Conversation Artifacts
|
|
30317
|
+
//****************************************************************************
|
|
30318
|
+
@InputType()
|
|
30319
|
+
export class UpdateConversationArtifactInput {
|
|
30320
|
+
@Field()
|
|
30321
|
+
ID: string;
|
|
30322
|
+
|
|
30323
|
+
@Field({ nullable: true })
|
|
30324
|
+
Name?: string;
|
|
30325
|
+
|
|
30326
|
+
@Field({ nullable: true })
|
|
30327
|
+
Description?: string | null;
|
|
30328
|
+
|
|
30329
|
+
@Field({ nullable: true })
|
|
30330
|
+
ConversationID?: string;
|
|
30331
|
+
|
|
30332
|
+
@Field({ nullable: true })
|
|
30333
|
+
ArtifactTypeID?: string;
|
|
30334
|
+
|
|
30335
|
+
@Field({ nullable: true })
|
|
30336
|
+
SharingScope?: string;
|
|
30337
|
+
|
|
30338
|
+
@Field({ nullable: true })
|
|
30339
|
+
Comments?: string | null;
|
|
30340
|
+
|
|
30341
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
30342
|
+
OldValues___?: KeyValuePairInput[];
|
|
30343
|
+
}
|
|
30344
|
+
|
|
30345
|
+
//****************************************************************************
|
|
30346
|
+
// RESOLVER for MJ: Conversation Artifacts
|
|
30347
|
+
//****************************************************************************
|
|
30348
|
+
@ObjectType()
|
|
30349
|
+
export class RunConversationArtifactViewResult {
|
|
30350
|
+
@Field(() => [ConversationArtifact_])
|
|
30351
|
+
Results: ConversationArtifact_[];
|
|
30352
|
+
|
|
30353
|
+
@Field(() => String, {nullable: true})
|
|
30354
|
+
UserViewRunID?: string;
|
|
30355
|
+
|
|
30356
|
+
@Field(() => Int, {nullable: true})
|
|
30357
|
+
RowCount: number;
|
|
30358
|
+
|
|
30359
|
+
@Field(() => Int, {nullable: true})
|
|
30360
|
+
TotalRowCount: number;
|
|
30361
|
+
|
|
30362
|
+
@Field(() => Int, {nullable: true})
|
|
30363
|
+
ExecutionTime: number;
|
|
30364
|
+
|
|
30365
|
+
@Field({nullable: true})
|
|
30366
|
+
ErrorMessage?: string;
|
|
30367
|
+
|
|
30368
|
+
@Field(() => Boolean, {nullable: false})
|
|
30369
|
+
Success: boolean;
|
|
30370
|
+
}
|
|
30371
|
+
|
|
30372
|
+
@Resolver(ConversationArtifact_)
|
|
30373
|
+
export class ConversationArtifactResolver extends ResolverBase {
|
|
30374
|
+
@Query(() => RunConversationArtifactViewResult)
|
|
30375
|
+
async RunConversationArtifactViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30376
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30377
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
30378
|
+
}
|
|
30379
|
+
|
|
30380
|
+
@Query(() => RunConversationArtifactViewResult)
|
|
30381
|
+
async RunConversationArtifactViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30382
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30383
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
30384
|
+
}
|
|
30385
|
+
|
|
30386
|
+
@Query(() => RunConversationArtifactViewResult)
|
|
30387
|
+
async RunConversationArtifactDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30388
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30389
|
+
input.EntityName = 'MJ: Conversation Artifacts';
|
|
30390
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
30391
|
+
}
|
|
30392
|
+
@Query(() => ConversationArtifact_, { nullable: true })
|
|
30393
|
+
async ConversationArtifact(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ConversationArtifact_ | null> {
|
|
30394
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifacts', userPayload);
|
|
30395
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30396
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifacts] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Conversation Artifacts', userPayload, EntityPermissionType.Read, 'AND');
|
|
30397
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Conversation Artifacts', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
30398
|
+
return result;
|
|
30399
|
+
}
|
|
30400
|
+
|
|
30401
|
+
@FieldResolver(() => [ConversationArtifactPermission_])
|
|
30402
|
+
async MJ_ConversationArtifactPermissions_ConversationArtifactIDArray(@Root() conversationartifact_: ConversationArtifact_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30403
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifact Permissions', userPayload);
|
|
30404
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30405
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactPermissions] WHERE [ConversationArtifactID]='${conversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Conversation Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
30406
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Permissions', await dataSource.query(sSQL));
|
|
30407
|
+
return result;
|
|
30408
|
+
}
|
|
30409
|
+
|
|
30410
|
+
@FieldResolver(() => [ConversationArtifactVersion_])
|
|
30411
|
+
async MJ_ConversationArtifactVersions_ConversationArtifactIDArray(@Root() conversationartifact_: ConversationArtifact_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30412
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifact Versions', userPayload);
|
|
30413
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30414
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactVersions] WHERE [ConversationArtifactID]='${conversationartifact_.ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Conversation Artifact Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
30415
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Artifact Versions', await dataSource.query(sSQL));
|
|
30416
|
+
return result;
|
|
30417
|
+
}
|
|
30418
|
+
|
|
30419
|
+
@Mutation(() => ConversationArtifact_)
|
|
30420
|
+
async CreateConversationArtifact(
|
|
30421
|
+
@Arg('input', () => CreateConversationArtifactInput) input: CreateConversationArtifactInput,
|
|
30422
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
30423
|
+
@PubSub() pubSub: PubSubEngine
|
|
30424
|
+
) {
|
|
30425
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
30426
|
+
return this.CreateRecord('MJ: Conversation Artifacts', input, dataSource, userPayload, pubSub)
|
|
30427
|
+
}
|
|
30428
|
+
|
|
30429
|
+
@Mutation(() => ConversationArtifact_)
|
|
30430
|
+
async UpdateConversationArtifact(
|
|
30431
|
+
@Arg('input', () => UpdateConversationArtifactInput) input: UpdateConversationArtifactInput,
|
|
30432
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
30433
|
+
@PubSub() pubSub: PubSubEngine
|
|
30434
|
+
) {
|
|
30435
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
30436
|
+
return this.UpdateRecord('MJ: Conversation Artifacts', input, dataSource, userPayload, pubSub);
|
|
30437
|
+
}
|
|
30438
|
+
|
|
30439
|
+
@Mutation(() => ConversationArtifact_)
|
|
30440
|
+
async DeleteConversationArtifact(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30441
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
30442
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
30443
|
+
return this.DeleteRecord('MJ: Conversation Artifacts', key, options, dataSource, userPayload, pubSub);
|
|
30444
|
+
}
|
|
30445
|
+
|
|
30446
|
+
}
|
|
30447
|
+
|
|
30448
|
+
//****************************************************************************
|
|
30449
|
+
// ENTITY CLASS for Content Process Runs
|
|
30450
|
+
//****************************************************************************
|
|
30451
|
+
@ObjectType()
|
|
30452
|
+
export class ContentProcessRun_ {
|
|
30453
|
+
@Field()
|
|
30454
|
+
@MaxLength(16)
|
|
30455
|
+
ID: string;
|
|
30456
|
+
|
|
30457
|
+
@Field()
|
|
30458
|
+
@MaxLength(16)
|
|
30459
|
+
SourceID: string;
|
|
30460
|
+
|
|
30461
|
+
@Field({nullable: true})
|
|
30462
|
+
@MaxLength(8)
|
|
30463
|
+
StartTime?: Date;
|
|
30464
|
+
|
|
30465
|
+
@Field({nullable: true})
|
|
30466
|
+
@MaxLength(8)
|
|
30467
|
+
EndTime?: Date;
|
|
30468
|
+
|
|
30469
|
+
@Field({nullable: true})
|
|
30470
|
+
@MaxLength(200)
|
|
30471
|
+
Status?: string;
|
|
30472
|
+
|
|
30473
|
+
@Field(() => Int, {nullable: true})
|
|
30474
|
+
ProcessedItems?: number;
|
|
30475
|
+
|
|
30476
|
+
@Field()
|
|
30477
|
+
@MaxLength(10)
|
|
30478
|
+
_mj__CreatedAt: Date;
|
|
30479
|
+
|
|
30480
|
+
@Field()
|
|
30481
|
+
@MaxLength(10)
|
|
30482
|
+
_mj__UpdatedAt: Date;
|
|
30483
|
+
|
|
30484
|
+
@Field({nullable: true})
|
|
30485
|
+
@MaxLength(510)
|
|
30486
|
+
Source?: string;
|
|
30487
|
+
|
|
30488
|
+
}
|
|
30489
|
+
|
|
30490
|
+
//****************************************************************************
|
|
30491
|
+
// INPUT TYPE for Content Process Runs
|
|
30492
|
+
//****************************************************************************
|
|
30493
|
+
@InputType()
|
|
30494
|
+
export class CreateContentProcessRunInput {
|
|
30495
|
+
@Field({ nullable: true })
|
|
30496
|
+
SourceID?: string;
|
|
30497
|
+
|
|
30498
|
+
@Field({ nullable: true })
|
|
30499
|
+
StartTime: Date | null;
|
|
30500
|
+
|
|
30501
|
+
@Field({ nullable: true })
|
|
30502
|
+
EndTime: Date | null;
|
|
30503
|
+
|
|
30504
|
+
@Field({ nullable: true })
|
|
30505
|
+
Status: string | null;
|
|
30506
|
+
|
|
30507
|
+
@Field(() => Int, { nullable: true })
|
|
30508
|
+
ProcessedItems: number | null;
|
|
30509
|
+
}
|
|
30510
|
+
|
|
30511
|
+
|
|
30512
|
+
//****************************************************************************
|
|
30513
|
+
// INPUT TYPE for Content Process Runs
|
|
30514
|
+
//****************************************************************************
|
|
30515
|
+
@InputType()
|
|
30516
|
+
export class UpdateContentProcessRunInput {
|
|
30517
|
+
@Field()
|
|
30518
|
+
ID: string;
|
|
30519
|
+
|
|
30520
|
+
@Field({ nullable: true })
|
|
30521
|
+
SourceID?: string;
|
|
30522
|
+
|
|
30523
|
+
@Field({ nullable: true })
|
|
30524
|
+
StartTime?: Date | null;
|
|
30525
|
+
|
|
30526
|
+
@Field({ nullable: true })
|
|
30527
|
+
EndTime?: Date | null;
|
|
30528
|
+
|
|
30529
|
+
@Field({ nullable: true })
|
|
30530
|
+
Status?: string | null;
|
|
30531
|
+
|
|
30532
|
+
@Field(() => Int, { nullable: true })
|
|
30533
|
+
ProcessedItems?: number | null;
|
|
30534
|
+
|
|
30535
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
30536
|
+
OldValues___?: KeyValuePairInput[];
|
|
30537
|
+
}
|
|
30538
|
+
|
|
30539
|
+
//****************************************************************************
|
|
30540
|
+
// RESOLVER for Content Process Runs
|
|
30541
|
+
//****************************************************************************
|
|
30542
|
+
@ObjectType()
|
|
30543
|
+
export class RunContentProcessRunViewResult {
|
|
30544
|
+
@Field(() => [ContentProcessRun_])
|
|
30545
|
+
Results: ContentProcessRun_[];
|
|
30546
|
+
|
|
30547
|
+
@Field(() => String, {nullable: true})
|
|
30548
|
+
UserViewRunID?: string;
|
|
30549
|
+
|
|
30550
|
+
@Field(() => Int, {nullable: true})
|
|
30551
|
+
RowCount: number;
|
|
30552
|
+
|
|
30553
|
+
@Field(() => Int, {nullable: true})
|
|
30554
|
+
TotalRowCount: number;
|
|
30555
|
+
|
|
30556
|
+
@Field(() => Int, {nullable: true})
|
|
30557
|
+
ExecutionTime: number;
|
|
30558
|
+
|
|
30559
|
+
@Field({nullable: true})
|
|
30560
|
+
ErrorMessage?: string;
|
|
30561
|
+
|
|
30562
|
+
@Field(() => Boolean, {nullable: false})
|
|
30563
|
+
Success: boolean;
|
|
30564
|
+
}
|
|
30565
|
+
|
|
30566
|
+
@Resolver(ContentProcessRun_)
|
|
30567
|
+
export class ContentProcessRunResolver extends ResolverBase {
|
|
30568
|
+
@Query(() => RunContentProcessRunViewResult)
|
|
30569
|
+
async RunContentProcessRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30570
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30571
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
30572
|
+
}
|
|
30573
|
+
|
|
30574
|
+
@Query(() => RunContentProcessRunViewResult)
|
|
30575
|
+
async RunContentProcessRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30576
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30577
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
30578
|
+
}
|
|
30579
|
+
|
|
30580
|
+
@Query(() => RunContentProcessRunViewResult)
|
|
30581
|
+
async RunContentProcessRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30582
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30583
|
+
input.EntityName = 'Content Process Runs';
|
|
30584
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
30585
|
+
}
|
|
30586
|
+
@Query(() => ContentProcessRun_, { nullable: true })
|
|
30587
|
+
async ContentProcessRun(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ContentProcessRun_ | null> {
|
|
30588
|
+
this.CheckUserReadPermissions('Content Process Runs', userPayload);
|
|
30589
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
30590
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwContentProcessRuns] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('Content Process Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
30591
|
+
const result = this.MapFieldNamesToCodeNames('Content Process Runs', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
30592
|
+
return result;
|
|
30593
|
+
}
|
|
30594
|
+
|
|
30595
|
+
@Mutation(() => ContentProcessRun_)
|
|
30596
|
+
async CreateContentProcessRun(
|
|
30597
|
+
@Arg('input', () => CreateContentProcessRunInput) input: CreateContentProcessRunInput,
|
|
30598
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
30599
|
+
@PubSub() pubSub: PubSubEngine
|
|
30600
|
+
) {
|
|
30601
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
30602
|
+
return this.CreateRecord('Content Process Runs', input, dataSource, userPayload, pubSub)
|
|
30603
|
+
}
|
|
30604
|
+
|
|
30605
|
+
@Mutation(() => ContentProcessRun_)
|
|
30606
|
+
async UpdateContentProcessRun(
|
|
30607
|
+
@Arg('input', () => UpdateContentProcessRunInput) input: UpdateContentProcessRunInput,
|
|
30608
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
30609
|
+
@PubSub() pubSub: PubSubEngine
|
|
30610
|
+
) {
|
|
30611
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
30612
|
+
return this.UpdateRecord('Content Process Runs', input, dataSource, userPayload, pubSub);
|
|
30613
|
+
}
|
|
30614
|
+
|
|
30615
|
+
@Mutation(() => ContentProcessRun_)
|
|
30616
|
+
async DeleteContentProcessRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
30617
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
30618
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
30619
|
+
return this.DeleteRecord('Content Process Runs', key, options, dataSource, userPayload, pubSub);
|
|
30620
|
+
}
|
|
30621
|
+
|
|
30622
|
+
}
|
|
30623
|
+
|
|
30624
|
+
//****************************************************************************
|
|
30625
|
+
// ENTITY CLASS for Content Sources
|
|
30626
|
+
//****************************************************************************
|
|
30627
|
+
@ObjectType()
|
|
30628
|
+
export class ContentSource_ {
|
|
30629
|
+
@Field()
|
|
30630
|
+
@MaxLength(16)
|
|
30631
|
+
ID: string;
|
|
30632
|
+
|
|
30633
|
+
@Field({nullable: true})
|
|
30634
|
+
@MaxLength(510)
|
|
30635
|
+
Name?: string;
|
|
30636
|
+
|
|
30637
|
+
@Field()
|
|
30638
|
+
@MaxLength(16)
|
|
30639
|
+
ContentTypeID: string;
|
|
30640
|
+
|
|
30641
|
+
@Field()
|
|
30642
|
+
@MaxLength(16)
|
|
30643
|
+
ContentSourceTypeID: string;
|
|
30644
|
+
|
|
30645
|
+
@Field()
|
|
30646
|
+
@MaxLength(16)
|
|
30647
|
+
ContentFileTypeID: string;
|
|
30648
|
+
|
|
30649
|
+
@Field()
|
|
30650
|
+
@MaxLength(4000)
|
|
30651
|
+
URL: string;
|
|
30652
|
+
|
|
30653
|
+
@Field()
|
|
30654
|
+
@MaxLength(10)
|
|
30655
|
+
_mj__CreatedAt: Date;
|
|
30656
|
+
|
|
30657
|
+
@Field()
|
|
30658
|
+
@MaxLength(10)
|
|
30659
|
+
_mj__UpdatedAt: Date;
|
|
30660
|
+
|
|
30661
|
+
@Field()
|
|
30128
30662
|
@MaxLength(510)
|
|
30129
30663
|
ContentType: string;
|
|
30130
30664
|
|
|
@@ -32122,6 +32656,163 @@ export class GeneratedCodeResolver extends ResolverBase {
|
|
|
32122
32656
|
|
|
32123
32657
|
}
|
|
32124
32658
|
|
|
32659
|
+
//****************************************************************************
|
|
32660
|
+
// ENTITY CLASS for MJ: Conversation Artifact Permissions
|
|
32661
|
+
//****************************************************************************
|
|
32662
|
+
@ObjectType()
|
|
32663
|
+
export class ConversationArtifactPermission_ {
|
|
32664
|
+
@Field()
|
|
32665
|
+
@MaxLength(16)
|
|
32666
|
+
ID: string;
|
|
32667
|
+
|
|
32668
|
+
@Field({description: `Reference to the artifact this permission applies to`})
|
|
32669
|
+
@MaxLength(16)
|
|
32670
|
+
ConversationArtifactID: string;
|
|
32671
|
+
|
|
32672
|
+
@Field({description: `User this permission applies to`})
|
|
32673
|
+
@MaxLength(16)
|
|
32674
|
+
UserID: string;
|
|
32675
|
+
|
|
32676
|
+
@Field({description: `Level of access granted (Read, Edit, Owner)`})
|
|
32677
|
+
@MaxLength(40)
|
|
32678
|
+
AccessLevel: string;
|
|
32679
|
+
|
|
32680
|
+
@Field()
|
|
32681
|
+
@MaxLength(10)
|
|
32682
|
+
_mj__CreatedAt: Date;
|
|
32683
|
+
|
|
32684
|
+
@Field()
|
|
32685
|
+
@MaxLength(10)
|
|
32686
|
+
_mj__UpdatedAt: Date;
|
|
32687
|
+
|
|
32688
|
+
@Field()
|
|
32689
|
+
@MaxLength(510)
|
|
32690
|
+
ConversationArtifact: string;
|
|
32691
|
+
|
|
32692
|
+
}
|
|
32693
|
+
|
|
32694
|
+
//****************************************************************************
|
|
32695
|
+
// INPUT TYPE for MJ: Conversation Artifact Permissions
|
|
32696
|
+
//****************************************************************************
|
|
32697
|
+
@InputType()
|
|
32698
|
+
export class CreateConversationArtifactPermissionInput {
|
|
32699
|
+
@Field({ nullable: true })
|
|
32700
|
+
ConversationArtifactID?: string;
|
|
32701
|
+
|
|
32702
|
+
@Field({ nullable: true })
|
|
32703
|
+
UserID?: string;
|
|
32704
|
+
|
|
32705
|
+
@Field({ nullable: true })
|
|
32706
|
+
AccessLevel?: string;
|
|
32707
|
+
}
|
|
32708
|
+
|
|
32709
|
+
|
|
32710
|
+
//****************************************************************************
|
|
32711
|
+
// INPUT TYPE for MJ: Conversation Artifact Permissions
|
|
32712
|
+
//****************************************************************************
|
|
32713
|
+
@InputType()
|
|
32714
|
+
export class UpdateConversationArtifactPermissionInput {
|
|
32715
|
+
@Field()
|
|
32716
|
+
ID: string;
|
|
32717
|
+
|
|
32718
|
+
@Field({ nullable: true })
|
|
32719
|
+
ConversationArtifactID?: string;
|
|
32720
|
+
|
|
32721
|
+
@Field({ nullable: true })
|
|
32722
|
+
UserID?: string;
|
|
32723
|
+
|
|
32724
|
+
@Field({ nullable: true })
|
|
32725
|
+
AccessLevel?: string;
|
|
32726
|
+
|
|
32727
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
32728
|
+
OldValues___?: KeyValuePairInput[];
|
|
32729
|
+
}
|
|
32730
|
+
|
|
32731
|
+
//****************************************************************************
|
|
32732
|
+
// RESOLVER for MJ: Conversation Artifact Permissions
|
|
32733
|
+
//****************************************************************************
|
|
32734
|
+
@ObjectType()
|
|
32735
|
+
export class RunConversationArtifactPermissionViewResult {
|
|
32736
|
+
@Field(() => [ConversationArtifactPermission_])
|
|
32737
|
+
Results: ConversationArtifactPermission_[];
|
|
32738
|
+
|
|
32739
|
+
@Field(() => String, {nullable: true})
|
|
32740
|
+
UserViewRunID?: string;
|
|
32741
|
+
|
|
32742
|
+
@Field(() => Int, {nullable: true})
|
|
32743
|
+
RowCount: number;
|
|
32744
|
+
|
|
32745
|
+
@Field(() => Int, {nullable: true})
|
|
32746
|
+
TotalRowCount: number;
|
|
32747
|
+
|
|
32748
|
+
@Field(() => Int, {nullable: true})
|
|
32749
|
+
ExecutionTime: number;
|
|
32750
|
+
|
|
32751
|
+
@Field({nullable: true})
|
|
32752
|
+
ErrorMessage?: string;
|
|
32753
|
+
|
|
32754
|
+
@Field(() => Boolean, {nullable: false})
|
|
32755
|
+
Success: boolean;
|
|
32756
|
+
}
|
|
32757
|
+
|
|
32758
|
+
@Resolver(ConversationArtifactPermission_)
|
|
32759
|
+
export class ConversationArtifactPermissionResolver extends ResolverBase {
|
|
32760
|
+
@Query(() => RunConversationArtifactPermissionViewResult)
|
|
32761
|
+
async RunConversationArtifactPermissionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32762
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
32763
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
32764
|
+
}
|
|
32765
|
+
|
|
32766
|
+
@Query(() => RunConversationArtifactPermissionViewResult)
|
|
32767
|
+
async RunConversationArtifactPermissionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32768
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
32769
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
32770
|
+
}
|
|
32771
|
+
|
|
32772
|
+
@Query(() => RunConversationArtifactPermissionViewResult)
|
|
32773
|
+
async RunConversationArtifactPermissionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32774
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
32775
|
+
input.EntityName = 'MJ: Conversation Artifact Permissions';
|
|
32776
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
32777
|
+
}
|
|
32778
|
+
@Query(() => ConversationArtifactPermission_, { nullable: true })
|
|
32779
|
+
async ConversationArtifactPermission(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ConversationArtifactPermission_ | null> {
|
|
32780
|
+
this.CheckUserReadPermissions('MJ: Conversation Artifact Permissions', userPayload);
|
|
32781
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
32782
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversationArtifactPermissions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('MJ: Conversation Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
32783
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Conversation Artifact Permissions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
32784
|
+
return result;
|
|
32785
|
+
}
|
|
32786
|
+
|
|
32787
|
+
@Mutation(() => ConversationArtifactPermission_)
|
|
32788
|
+
async CreateConversationArtifactPermission(
|
|
32789
|
+
@Arg('input', () => CreateConversationArtifactPermissionInput) input: CreateConversationArtifactPermissionInput,
|
|
32790
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
32791
|
+
@PubSub() pubSub: PubSubEngine
|
|
32792
|
+
) {
|
|
32793
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
32794
|
+
return this.CreateRecord('MJ: Conversation Artifact Permissions', input, dataSource, userPayload, pubSub)
|
|
32795
|
+
}
|
|
32796
|
+
|
|
32797
|
+
@Mutation(() => ConversationArtifactPermission_)
|
|
32798
|
+
async UpdateConversationArtifactPermission(
|
|
32799
|
+
@Arg('input', () => UpdateConversationArtifactPermissionInput) input: UpdateConversationArtifactPermissionInput,
|
|
32800
|
+
@Ctx() { dataSources, userPayload }: AppContext,
|
|
32801
|
+
@PubSub() pubSub: PubSubEngine
|
|
32802
|
+
) {
|
|
32803
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
32804
|
+
return this.UpdateRecord('MJ: Conversation Artifact Permissions', input, dataSource, userPayload, pubSub);
|
|
32805
|
+
}
|
|
32806
|
+
|
|
32807
|
+
@Mutation(() => ConversationArtifactPermission_)
|
|
32808
|
+
async DeleteConversationArtifactPermission(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32809
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
32810
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
32811
|
+
return this.DeleteRecord('MJ: Conversation Artifact Permissions', key, options, dataSource, userPayload, pubSub);
|
|
32812
|
+
}
|
|
32813
|
+
|
|
32814
|
+
}
|
|
32815
|
+
|
|
32125
32816
|
//****************************************************************************
|
|
32126
32817
|
// ENTITY CLASS for AI Agent Learning Cycles
|
|
32127
32818
|
//****************************************************************************
|