@memberjunction/server 2.10.0 → 2.12.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.
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../config.js';
18
18
 
19
19
 
20
20
 
21
- import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, flyway_schema_historyEntity, 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, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity } from '@memberjunction/core-entities';
21
+ import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, 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, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, flyway_schema_historyEntity } from '@memberjunction/core-entities';
22
22
 
23
23
 
24
24
  //****************************************************************************
@@ -655,211 +655,6 @@ export class ExplorerNavigationItemResolver extends ResolverBase {
655
655
 
656
656
  }
657
657
 
658
- //****************************************************************************
659
- // ENTITY CLASS for flyway _schema _histories
660
- //****************************************************************************
661
- @ObjectType()
662
- export class flyway_schema_history_ {
663
- @Field(() => Int)
664
- installed_rank: number;
665
-
666
- @Field({nullable: true})
667
- @MaxLength(100)
668
- version?: string;
669
-
670
- @Field({nullable: true})
671
- @MaxLength(400)
672
- description?: string;
673
-
674
- @Field()
675
- @MaxLength(40)
676
- type: string;
677
-
678
- @Field()
679
- @MaxLength(2000)
680
- script: string;
681
-
682
- @Field(() => Int, {nullable: true})
683
- checksum?: number;
684
-
685
- @Field()
686
- @MaxLength(200)
687
- installed_by: string;
688
-
689
- @Field()
690
- @MaxLength(8)
691
- installed_on: Date;
692
-
693
- @Field(() => Int)
694
- execution_time: number;
695
-
696
- @Field(() => Boolean)
697
- success: boolean;
698
-
699
- @Field()
700
- @MaxLength(10)
701
- _mj__CreatedAt: Date;
702
-
703
- @Field()
704
- @MaxLength(10)
705
- _mj__UpdatedAt: Date;
706
-
707
- }
708
-
709
- //****************************************************************************
710
- // INPUT TYPE for flyway _schema _histories
711
- //****************************************************************************
712
- @InputType()
713
- export class Createflyway_schema_historyInput {
714
- @Field(() => Int)
715
- installed_rank: number;
716
-
717
- @Field({ nullable: true })
718
- version?: string;
719
-
720
- @Field({ nullable: true })
721
- description?: string;
722
-
723
- @Field()
724
- type: string;
725
-
726
- @Field()
727
- script: string;
728
-
729
- @Field(() => Int, { nullable: true })
730
- checksum?: number;
731
-
732
- @Field()
733
- installed_by: string;
734
-
735
- @Field()
736
- installed_on: Date;
737
-
738
- @Field(() => Int)
739
- execution_time: number;
740
-
741
- @Field(() => Boolean)
742
- success: boolean;
743
- }
744
-
745
-
746
- //****************************************************************************
747
- // INPUT TYPE for flyway _schema _histories
748
- //****************************************************************************
749
- @InputType()
750
- export class Updateflyway_schema_historyInput {
751
- @Field(() => Int)
752
- installed_rank: number;
753
-
754
- @Field({ nullable: true })
755
- version?: string;
756
-
757
- @Field({ nullable: true })
758
- description?: string;
759
-
760
- @Field()
761
- type: string;
762
-
763
- @Field()
764
- script: string;
765
-
766
- @Field(() => Int, { nullable: true })
767
- checksum?: number;
768
-
769
- @Field()
770
- installed_by: string;
771
-
772
- @Field()
773
- installed_on: Date;
774
-
775
- @Field(() => Int)
776
- execution_time: number;
777
-
778
- @Field(() => Boolean)
779
- success: boolean;
780
-
781
- @Field(() => [KeyValuePairInput], { nullable: true })
782
- OldValues___?: KeyValuePairInput[];
783
- }
784
-
785
- //****************************************************************************
786
- // RESOLVER for flyway _schema _histories
787
- //****************************************************************************
788
- @ObjectType()
789
- export class Runflyway_schema_historyViewResult {
790
- @Field(() => [flyway_schema_history_])
791
- Results: flyway_schema_history_[];
792
-
793
- @Field(() => String, {nullable: true})
794
- UserViewRunID?: string;
795
-
796
- @Field(() => Int, {nullable: true})
797
- RowCount: number;
798
-
799
- @Field(() => Int, {nullable: true})
800
- TotalRowCount: number;
801
-
802
- @Field(() => Int, {nullable: true})
803
- ExecutionTime: number;
804
-
805
- @Field({nullable: true})
806
- ErrorMessage?: string;
807
-
808
- @Field(() => Boolean, {nullable: false})
809
- Success: boolean;
810
- }
811
-
812
- @Resolver(flyway_schema_history_)
813
- export class flyway_schema_historyResolver extends ResolverBase {
814
- @Query(() => Runflyway_schema_historyViewResult)
815
- async Runflyway_schema_historyViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
816
- return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
817
- }
818
-
819
- @Query(() => Runflyway_schema_historyViewResult)
820
- async Runflyway_schema_historyViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
821
- return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
822
- }
823
-
824
- @Query(() => Runflyway_schema_historyViewResult)
825
- async Runflyway_schema_historyDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
826
- input.EntityName = 'flyway _schema _histories';
827
- return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
828
- }
829
- @Query(() => flyway_schema_history_, { nullable: true })
830
- async flyway_schema_history(@Arg('installed_rank', () => Int) installed_rank: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<flyway_schema_history_ | null> {
831
- this.CheckUserReadPermissions('flyway _schema _histories', userPayload);
832
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwflyway_schema_histories] WHERE [installed_rank]=${installed_rank} ` + this.getRowLevelSecurityWhereClause('flyway _schema _histories', userPayload, EntityPermissionType.Read, 'AND');
833
- const result = this.MapFieldNamesToCodeNames('flyway _schema _histories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
834
- return result;
835
- }
836
-
837
- @Mutation(() => flyway_schema_history_)
838
- async Createflyway_schema_history(
839
- @Arg('input', () => Createflyway_schema_historyInput) input: Createflyway_schema_historyInput,
840
- @Ctx() { dataSource, userPayload }: AppContext,
841
- @PubSub() pubSub: PubSubEngine
842
- ) {
843
- return this.CreateRecord('flyway _schema _histories', input, dataSource, userPayload, pubSub)
844
- }
845
-
846
- @Mutation(() => flyway_schema_history_)
847
- async Updateflyway_schema_history(
848
- @Arg('input', () => Updateflyway_schema_historyInput) input: Updateflyway_schema_historyInput,
849
- @Ctx() { dataSource, userPayload }: AppContext,
850
- @PubSub() pubSub: PubSubEngine
851
- ) {
852
- return this.UpdateRecord('flyway _schema _histories', input, dataSource, userPayload, pubSub);
853
- }
854
-
855
- @Mutation(() => flyway_schema_history_)
856
- async Deleteflyway_schema_history(@Arg('installed_rank', () => Int) installed_rank: number, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
857
- const key = new CompositeKey([{FieldName: 'installed_rank', Value: installed_rank}]);
858
- return this.DeleteRecord('flyway _schema _histories', key, options, dataSource, userPayload, pubSub);
859
- }
860
-
861
- }
862
-
863
658
  //****************************************************************************
864
659
  // ENTITY CLASS for AI Prompts
865
660
  //****************************************************************************
@@ -1300,12 +1095,12 @@ export class AIPromptCategory_ {
1300
1095
  @MaxLength(510)
1301
1096
  Parent?: string;
1302
1097
 
1303
- @Field(() => [AIPromptCategory_])
1304
- AIPromptCategories_ParentIDArray: AIPromptCategory_[]; // Link to AIPromptCategories
1305
-
1306
1098
  @Field(() => [AIPrompt_])
1307
1099
  AIPrompts_CategoryIDArray: AIPrompt_[]; // Link to AIPrompts
1308
1100
 
1101
+ @Field(() => [AIPromptCategory_])
1102
+ AIPromptCategories_ParentIDArray: AIPromptCategory_[]; // Link to AIPromptCategories
1103
+
1309
1104
  }
1310
1105
 
1311
1106
  //****************************************************************************
@@ -1397,14 +1192,6 @@ export class AIPromptCategoryResolver extends ResolverBase {
1397
1192
  return result;
1398
1193
  }
1399
1194
 
1400
- @FieldResolver(() => [AIPromptCategory_])
1401
- async AIPromptCategories_ParentIDArray(@Root() aipromptcategory_: AIPromptCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
1402
- this.CheckUserReadPermissions('AI Prompt Categories', userPayload);
1403
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptCategories] WHERE [ParentID]='${aipromptcategory_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Prompt Categories', userPayload, EntityPermissionType.Read, 'AND');
1404
- const result = this.ArrayMapFieldNamesToCodeNames('AI Prompt Categories', await dataSource.query(sSQL));
1405
- return result;
1406
- }
1407
-
1408
1195
  @FieldResolver(() => [AIPrompt_])
1409
1196
  async AIPrompts_CategoryIDArray(@Root() aipromptcategory_: AIPromptCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
1410
1197
  this.CheckUserReadPermissions('AI Prompts', userPayload);
@@ -1413,6 +1200,14 @@ export class AIPromptCategoryResolver extends ResolverBase {
1413
1200
  return result;
1414
1201
  }
1415
1202
 
1203
+ @FieldResolver(() => [AIPromptCategory_])
1204
+ async AIPromptCategories_ParentIDArray(@Root() aipromptcategory_: AIPromptCategory_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
1205
+ this.CheckUserReadPermissions('AI Prompt Categories', userPayload);
1206
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptCategories] WHERE [ParentID]='${aipromptcategory_.ID}' ` + this.getRowLevelSecurityWhereClause('AI Prompt Categories', userPayload, EntityPermissionType.Read, 'AND');
1207
+ const result = this.ArrayMapFieldNamesToCodeNames('AI Prompt Categories', await dataSource.query(sSQL));
1208
+ return result;
1209
+ }
1210
+
1416
1211
  @Mutation(() => AIPromptCategory_)
1417
1212
  async CreateAIPromptCategory(
1418
1213
  @Arg('input', () => CreateAIPromptCategoryInput) input: CreateAIPromptCategoryInput,
@@ -28703,4 +28498,209 @@ export class ContentItemTagResolver extends ResolverBase {
28703
28498
  return this.DeleteRecord('Content Item Tags', key, options, dataSource, userPayload, pubSub);
28704
28499
  }
28705
28500
 
28501
+ }
28502
+
28503
+ //****************************************************************************
28504
+ // ENTITY CLASS for flyway _schema _histories
28505
+ //****************************************************************************
28506
+ @ObjectType()
28507
+ export class flyway_schema_history_ {
28508
+ @Field(() => Int)
28509
+ installed_rank: number;
28510
+
28511
+ @Field({nullable: true})
28512
+ @MaxLength(100)
28513
+ version?: string;
28514
+
28515
+ @Field({nullable: true})
28516
+ @MaxLength(400)
28517
+ description?: string;
28518
+
28519
+ @Field()
28520
+ @MaxLength(40)
28521
+ type: string;
28522
+
28523
+ @Field()
28524
+ @MaxLength(2000)
28525
+ script: string;
28526
+
28527
+ @Field(() => Int, {nullable: true})
28528
+ checksum?: number;
28529
+
28530
+ @Field()
28531
+ @MaxLength(200)
28532
+ installed_by: string;
28533
+
28534
+ @Field()
28535
+ @MaxLength(8)
28536
+ installed_on: Date;
28537
+
28538
+ @Field(() => Int)
28539
+ execution_time: number;
28540
+
28541
+ @Field(() => Boolean)
28542
+ success: boolean;
28543
+
28544
+ @Field()
28545
+ @MaxLength(10)
28546
+ _mj__CreatedAt: Date;
28547
+
28548
+ @Field()
28549
+ @MaxLength(10)
28550
+ _mj__UpdatedAt: Date;
28551
+
28552
+ }
28553
+
28554
+ //****************************************************************************
28555
+ // INPUT TYPE for flyway _schema _histories
28556
+ //****************************************************************************
28557
+ @InputType()
28558
+ export class Createflyway_schema_historyInput {
28559
+ @Field(() => Int)
28560
+ installed_rank: number;
28561
+
28562
+ @Field({ nullable: true })
28563
+ version?: string;
28564
+
28565
+ @Field({ nullable: true })
28566
+ description?: string;
28567
+
28568
+ @Field()
28569
+ type: string;
28570
+
28571
+ @Field()
28572
+ script: string;
28573
+
28574
+ @Field(() => Int, { nullable: true })
28575
+ checksum?: number;
28576
+
28577
+ @Field()
28578
+ installed_by: string;
28579
+
28580
+ @Field()
28581
+ installed_on: Date;
28582
+
28583
+ @Field(() => Int)
28584
+ execution_time: number;
28585
+
28586
+ @Field(() => Boolean)
28587
+ success: boolean;
28588
+ }
28589
+
28590
+
28591
+ //****************************************************************************
28592
+ // INPUT TYPE for flyway _schema _histories
28593
+ //****************************************************************************
28594
+ @InputType()
28595
+ export class Updateflyway_schema_historyInput {
28596
+ @Field(() => Int)
28597
+ installed_rank: number;
28598
+
28599
+ @Field({ nullable: true })
28600
+ version?: string;
28601
+
28602
+ @Field({ nullable: true })
28603
+ description?: string;
28604
+
28605
+ @Field()
28606
+ type: string;
28607
+
28608
+ @Field()
28609
+ script: string;
28610
+
28611
+ @Field(() => Int, { nullable: true })
28612
+ checksum?: number;
28613
+
28614
+ @Field()
28615
+ installed_by: string;
28616
+
28617
+ @Field()
28618
+ installed_on: Date;
28619
+
28620
+ @Field(() => Int)
28621
+ execution_time: number;
28622
+
28623
+ @Field(() => Boolean)
28624
+ success: boolean;
28625
+
28626
+ @Field(() => [KeyValuePairInput], { nullable: true })
28627
+ OldValues___?: KeyValuePairInput[];
28628
+ }
28629
+
28630
+ //****************************************************************************
28631
+ // RESOLVER for flyway _schema _histories
28632
+ //****************************************************************************
28633
+ @ObjectType()
28634
+ export class Runflyway_schema_historyViewResult {
28635
+ @Field(() => [flyway_schema_history_])
28636
+ Results: flyway_schema_history_[];
28637
+
28638
+ @Field(() => String, {nullable: true})
28639
+ UserViewRunID?: string;
28640
+
28641
+ @Field(() => Int, {nullable: true})
28642
+ RowCount: number;
28643
+
28644
+ @Field(() => Int, {nullable: true})
28645
+ TotalRowCount: number;
28646
+
28647
+ @Field(() => Int, {nullable: true})
28648
+ ExecutionTime: number;
28649
+
28650
+ @Field({nullable: true})
28651
+ ErrorMessage?: string;
28652
+
28653
+ @Field(() => Boolean, {nullable: false})
28654
+ Success: boolean;
28655
+ }
28656
+
28657
+ @Resolver(flyway_schema_history_)
28658
+ export class flyway_schema_historyResolver extends ResolverBase {
28659
+ @Query(() => Runflyway_schema_historyViewResult)
28660
+ async Runflyway_schema_historyViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
28661
+ return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
28662
+ }
28663
+
28664
+ @Query(() => Runflyway_schema_historyViewResult)
28665
+ async Runflyway_schema_historyViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
28666
+ return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
28667
+ }
28668
+
28669
+ @Query(() => Runflyway_schema_historyViewResult)
28670
+ async Runflyway_schema_historyDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
28671
+ input.EntityName = 'flyway _schema _histories';
28672
+ return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
28673
+ }
28674
+ @Query(() => flyway_schema_history_, { nullable: true })
28675
+ async flyway_schema_history(@Arg('installed_rank', () => Int) installed_rank: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<flyway_schema_history_ | null> {
28676
+ this.CheckUserReadPermissions('flyway _schema _histories', userPayload);
28677
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwflyway_schema_histories] WHERE [installed_rank]=${installed_rank} ` + this.getRowLevelSecurityWhereClause('flyway _schema _histories', userPayload, EntityPermissionType.Read, 'AND');
28678
+ const result = this.MapFieldNamesToCodeNames('flyway _schema _histories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
28679
+ return result;
28680
+ }
28681
+
28682
+ @Mutation(() => flyway_schema_history_)
28683
+ async Createflyway_schema_history(
28684
+ @Arg('input', () => Createflyway_schema_historyInput) input: Createflyway_schema_historyInput,
28685
+ @Ctx() { dataSource, userPayload }: AppContext,
28686
+ @PubSub() pubSub: PubSubEngine
28687
+ ) {
28688
+ return this.CreateRecord('flyway _schema _histories', input, dataSource, userPayload, pubSub)
28689
+ }
28690
+
28691
+ @Mutation(() => flyway_schema_history_)
28692
+ async Updateflyway_schema_history(
28693
+ @Arg('input', () => Updateflyway_schema_historyInput) input: Updateflyway_schema_historyInput,
28694
+ @Ctx() { dataSource, userPayload }: AppContext,
28695
+ @PubSub() pubSub: PubSubEngine
28696
+ ) {
28697
+ return this.UpdateRecord('flyway _schema _histories', input, dataSource, userPayload, pubSub);
28698
+ }
28699
+
28700
+ @Mutation(() => flyway_schema_history_)
28701
+ async Deleteflyway_schema_history(@Arg('installed_rank', () => Int) installed_rank: number, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
28702
+ const key = new CompositeKey([{FieldName: 'installed_rank', Value: installed_rank}]);
28703
+ return this.DeleteRecord('flyway _schema _histories', key, options, dataSource, userPayload, pubSub);
28704
+ }
28705
+
28706
28706
  }
@@ -150,6 +150,7 @@ export class AskSkipResolver {
150
150
  messages.push({
151
151
  content: UserQuestion,
152
152
  role: 'user',
153
+ conversationDetailID: convoDetailEntity.ID,
153
154
  });
154
155
 
155
156
  return this.handleSimpleSkipPostRequest(input, convoEntity.ID, convoDetailEntity.ID, true, user);
@@ -380,7 +381,8 @@ export class AskSkipResolver {
380
381
  // narrower in scope than our native MJ metadata
381
382
  // don't pass the mj_core_schema entities by default, but allow flexibilty
382
383
  // to include specific entities from the MJAPI config.json
383
- const includedEntities = configInfo.askSkip.entitiesToSendSkip.includeEntitiesFromExcludedSchemas.map((e) => e.trim().toLowerCase());
384
+
385
+ const includedEntities = (configInfo.askSkip?.entitiesToSendSkip?.includeEntitiesFromExcludedSchemas ?? []).map((e) => e.trim().toLowerCase());
384
386
  const md = new Metadata();
385
387
  return md.Entities.filter((e) => e.SchemaName !== mj_core_schema || includedEntities.includes(e.Name.trim().toLowerCase())).map((e) => {
386
388
  const ret: SkipEntityInfo = {
@@ -641,6 +643,7 @@ export class AskSkipResolver {
641
643
  const m: SkipMessage = {
642
644
  content: skipRole === 'system' ? outputMessage : r.Message,
643
645
  role: skipRole,
646
+ conversationDetailID: r.ID,
644
647
  };
645
648
  return m;
646
649
  });
@@ -950,6 +953,7 @@ export class AskSkipResolver {
950
953
  content: `Skip API Requested Data as shown below
951
954
  ${JSON.stringify(apiResponse.dataRequest)}`,
952
955
  role: 'system', // user role of system because this came from Skip, we are simplifying the message for the next round if we need to send it back
956
+ conversationDetailID: convoDetailEntity.ID,
953
957
  });
954
958
 
955
959
  // check to see if apiResponse.dataRequest is an array, if not, see if it is a single item, and if not, then throw an error
@@ -1026,6 +1030,7 @@ export class AskSkipResolver {
1026
1030
  ${JSON.stringify(executionErrors)}
1027
1031
  `,
1028
1032
  role: 'user', // use user role becuase to the Skip API what we send it is "user"
1033
+ conversationDetailID: convoDetailEntity.ID,
1029
1034
  });
1030
1035
  }
1031
1036
  } else {