@memberjunction/server 2.16.0 → 2.17.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 +298 -43
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1896 -302
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +1 -1
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts +5 -2
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +31 -8
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/package.json +22 -22
- package/src/generated/generated.ts +1151 -156
- package/src/generic/ResolverBase.ts +5 -2
- package/src/resolvers/AskSkipResolver.ts +37 -9
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
**********************************************************************************/
|
|
10
10
|
import { Arg, Ctx, Int, Query, Resolver, Field, Float, ObjectType, FieldResolver, Root, InputType, Mutation,
|
|
11
11
|
PubSub, PubSubEngine, ResolverBase, RunViewByIDInput, RunViewByNameInput, RunDynamicViewInput,
|
|
12
|
-
AppContext, KeyValuePairInput, DeleteOptionsInput } from '@memberjunction/server';
|
|
12
|
+
AppContext, KeyValuePairInput, DeleteOptionsInput, GraphQLTimestamp as Timestamp } from '@memberjunction/server';
|
|
13
13
|
import { Metadata, EntityPermissionType, CompositeKey } from '@memberjunction/core'
|
|
14
14
|
|
|
15
15
|
import { MaxLength } from 'class-validator';
|
|
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
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, QueryEntityEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity,
|
|
21
|
+
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, 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, flyway_schema_historyEntity, QueryEntityEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, AIAgentLearningCycleEntity } from '@memberjunction/core-entities';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -655,6 +655,810 @@ export class ExplorerNavigationItemResolver extends ResolverBase {
|
|
|
655
655
|
|
|
656
656
|
}
|
|
657
657
|
|
|
658
|
+
//****************************************************************************
|
|
659
|
+
// ENTITY CLASS for AIAgent Models
|
|
660
|
+
//****************************************************************************
|
|
661
|
+
@ObjectType({ description: 'Table to store the relationship between AI agents and AI models.' })
|
|
662
|
+
export class AIAgentModel_ {
|
|
663
|
+
@Field({description: 'The unique identifier for each AI agent-model mapping. Serves as the primary key.'})
|
|
664
|
+
@MaxLength(16)
|
|
665
|
+
ID: string;
|
|
666
|
+
|
|
667
|
+
@Field({nullable: true, description: 'References the unique identifier of the associated AI agent from AIAgent table.'})
|
|
668
|
+
@MaxLength(16)
|
|
669
|
+
AgentID?: string;
|
|
670
|
+
|
|
671
|
+
@Field({nullable: true, description: 'The unique identifier of the associated AI model.'})
|
|
672
|
+
@MaxLength(16)
|
|
673
|
+
ModelID?: string;
|
|
674
|
+
|
|
675
|
+
@Field(() => Boolean, {nullable: true})
|
|
676
|
+
Active?: boolean;
|
|
677
|
+
|
|
678
|
+
@Field(() => Int, {nullable: true, description: 'The priority level of the AI model for the agent, where higher values indicate higher priority.'})
|
|
679
|
+
Priority?: number;
|
|
680
|
+
|
|
681
|
+
@Field()
|
|
682
|
+
@MaxLength(10)
|
|
683
|
+
_mj__CreatedAt: Date;
|
|
684
|
+
|
|
685
|
+
@Field()
|
|
686
|
+
@MaxLength(10)
|
|
687
|
+
_mj__UpdatedAt: Date;
|
|
688
|
+
|
|
689
|
+
@Field({nullable: true})
|
|
690
|
+
@MaxLength(510)
|
|
691
|
+
Agent?: string;
|
|
692
|
+
|
|
693
|
+
@Field({nullable: true})
|
|
694
|
+
@MaxLength(100)
|
|
695
|
+
Model?: string;
|
|
696
|
+
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
//****************************************************************************
|
|
700
|
+
// INPUT TYPE for AIAgent Models
|
|
701
|
+
//****************************************************************************
|
|
702
|
+
@InputType()
|
|
703
|
+
export class CreateAIAgentModelInput {
|
|
704
|
+
@Field({ nullable: true })
|
|
705
|
+
AgentID?: string;
|
|
706
|
+
|
|
707
|
+
@Field({ nullable: true })
|
|
708
|
+
ModelID?: string;
|
|
709
|
+
|
|
710
|
+
@Field(() => Boolean, { nullable: true })
|
|
711
|
+
Active?: boolean;
|
|
712
|
+
|
|
713
|
+
@Field(() => Int, { nullable: true })
|
|
714
|
+
Priority?: number;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
//****************************************************************************
|
|
719
|
+
// INPUT TYPE for AIAgent Models
|
|
720
|
+
//****************************************************************************
|
|
721
|
+
@InputType()
|
|
722
|
+
export class UpdateAIAgentModelInput {
|
|
723
|
+
@Field()
|
|
724
|
+
ID: string;
|
|
725
|
+
|
|
726
|
+
@Field({ nullable: true })
|
|
727
|
+
AgentID?: string;
|
|
728
|
+
|
|
729
|
+
@Field({ nullable: true })
|
|
730
|
+
ModelID?: string;
|
|
731
|
+
|
|
732
|
+
@Field(() => Boolean, { nullable: true })
|
|
733
|
+
Active?: boolean;
|
|
734
|
+
|
|
735
|
+
@Field(() => Int, { nullable: true })
|
|
736
|
+
Priority?: number;
|
|
737
|
+
|
|
738
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
739
|
+
OldValues___?: KeyValuePairInput[];
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
//****************************************************************************
|
|
743
|
+
// RESOLVER for AIAgent Models
|
|
744
|
+
//****************************************************************************
|
|
745
|
+
@ObjectType()
|
|
746
|
+
export class RunAIAgentModelViewResult {
|
|
747
|
+
@Field(() => [AIAgentModel_])
|
|
748
|
+
Results: AIAgentModel_[];
|
|
749
|
+
|
|
750
|
+
@Field(() => String, {nullable: true})
|
|
751
|
+
UserViewRunID?: string;
|
|
752
|
+
|
|
753
|
+
@Field(() => Int, {nullable: true})
|
|
754
|
+
RowCount: number;
|
|
755
|
+
|
|
756
|
+
@Field(() => Int, {nullable: true})
|
|
757
|
+
TotalRowCount: number;
|
|
758
|
+
|
|
759
|
+
@Field(() => Int, {nullable: true})
|
|
760
|
+
ExecutionTime: number;
|
|
761
|
+
|
|
762
|
+
@Field({nullable: true})
|
|
763
|
+
ErrorMessage?: string;
|
|
764
|
+
|
|
765
|
+
@Field(() => Boolean, {nullable: false})
|
|
766
|
+
Success: boolean;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
@Resolver(AIAgentModel_)
|
|
770
|
+
export class AIAgentModelResolver extends ResolverBase {
|
|
771
|
+
@Query(() => RunAIAgentModelViewResult)
|
|
772
|
+
async RunAIAgentModelViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
773
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
@Query(() => RunAIAgentModelViewResult)
|
|
777
|
+
async RunAIAgentModelViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
778
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
@Query(() => RunAIAgentModelViewResult)
|
|
782
|
+
async RunAIAgentModelDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
783
|
+
input.EntityName = 'AIAgent Models';
|
|
784
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
785
|
+
}
|
|
786
|
+
@Query(() => AIAgentModel_, { nullable: true })
|
|
787
|
+
async AIAgentModel(@Arg('ID', () => String) ID: string, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIAgentModel_ | null> {
|
|
788
|
+
this.CheckUserReadPermissions('AIAgent Models', userPayload);
|
|
789
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
790
|
+
const result = this.MapFieldNamesToCodeNames('AIAgent Models', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
791
|
+
return result;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
@Mutation(() => AIAgentModel_)
|
|
795
|
+
async CreateAIAgentModel(
|
|
796
|
+
@Arg('input', () => CreateAIAgentModelInput) input: CreateAIAgentModelInput,
|
|
797
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
798
|
+
@PubSub() pubSub: PubSubEngine
|
|
799
|
+
) {
|
|
800
|
+
return this.CreateRecord('AIAgent Models', input, dataSource, userPayload, pubSub)
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
@Mutation(() => AIAgentModel_)
|
|
804
|
+
async UpdateAIAgentModel(
|
|
805
|
+
@Arg('input', () => UpdateAIAgentModelInput) input: UpdateAIAgentModelInput,
|
|
806
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
807
|
+
@PubSub() pubSub: PubSubEngine
|
|
808
|
+
) {
|
|
809
|
+
return this.UpdateRecord('AIAgent Models', input, dataSource, userPayload, pubSub);
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
@Mutation(() => AIAgentModel_)
|
|
813
|
+
async DeleteAIAgentModel(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
814
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
815
|
+
return this.DeleteRecord('AIAgent Models', key, options, dataSource, userPayload, pubSub);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
//****************************************************************************
|
|
821
|
+
// ENTITY CLASS for AIAgent Note Types
|
|
822
|
+
//****************************************************************************
|
|
823
|
+
@ObjectType()
|
|
824
|
+
export class AIAgentNoteType_ {
|
|
825
|
+
@Field()
|
|
826
|
+
@MaxLength(16)
|
|
827
|
+
ID: string;
|
|
828
|
+
|
|
829
|
+
@Field({nullable: true})
|
|
830
|
+
@MaxLength(510)
|
|
831
|
+
Name?: string;
|
|
832
|
+
|
|
833
|
+
@Field({nullable: true})
|
|
834
|
+
Description?: string;
|
|
835
|
+
|
|
836
|
+
@Field()
|
|
837
|
+
@MaxLength(10)
|
|
838
|
+
_mj__CreatedAt: Date;
|
|
839
|
+
|
|
840
|
+
@Field()
|
|
841
|
+
@MaxLength(10)
|
|
842
|
+
_mj__UpdatedAt: Date;
|
|
843
|
+
|
|
844
|
+
@Field(() => [AIAgentNote_])
|
|
845
|
+
AIAgentNotes_AgentNoteTypeIDArray: AIAgentNote_[]; // Link to AIAgentNotes
|
|
846
|
+
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
//****************************************************************************
|
|
850
|
+
// INPUT TYPE for AIAgent Note Types
|
|
851
|
+
//****************************************************************************
|
|
852
|
+
@InputType()
|
|
853
|
+
export class CreateAIAgentNoteTypeInput {
|
|
854
|
+
@Field({ nullable: true })
|
|
855
|
+
Name?: string;
|
|
856
|
+
|
|
857
|
+
@Field({ nullable: true })
|
|
858
|
+
Description?: string;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
//****************************************************************************
|
|
863
|
+
// INPUT TYPE for AIAgent Note Types
|
|
864
|
+
//****************************************************************************
|
|
865
|
+
@InputType()
|
|
866
|
+
export class UpdateAIAgentNoteTypeInput {
|
|
867
|
+
@Field()
|
|
868
|
+
ID: string;
|
|
869
|
+
|
|
870
|
+
@Field({ nullable: true })
|
|
871
|
+
Name?: string;
|
|
872
|
+
|
|
873
|
+
@Field({ nullable: true })
|
|
874
|
+
Description?: string;
|
|
875
|
+
|
|
876
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
877
|
+
OldValues___?: KeyValuePairInput[];
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
//****************************************************************************
|
|
881
|
+
// RESOLVER for AIAgent Note Types
|
|
882
|
+
//****************************************************************************
|
|
883
|
+
@ObjectType()
|
|
884
|
+
export class RunAIAgentNoteTypeViewResult {
|
|
885
|
+
@Field(() => [AIAgentNoteType_])
|
|
886
|
+
Results: AIAgentNoteType_[];
|
|
887
|
+
|
|
888
|
+
@Field(() => String, {nullable: true})
|
|
889
|
+
UserViewRunID?: string;
|
|
890
|
+
|
|
891
|
+
@Field(() => Int, {nullable: true})
|
|
892
|
+
RowCount: number;
|
|
893
|
+
|
|
894
|
+
@Field(() => Int, {nullable: true})
|
|
895
|
+
TotalRowCount: number;
|
|
896
|
+
|
|
897
|
+
@Field(() => Int, {nullable: true})
|
|
898
|
+
ExecutionTime: number;
|
|
899
|
+
|
|
900
|
+
@Field({nullable: true})
|
|
901
|
+
ErrorMessage?: string;
|
|
902
|
+
|
|
903
|
+
@Field(() => Boolean, {nullable: false})
|
|
904
|
+
Success: boolean;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
@Resolver(AIAgentNoteType_)
|
|
908
|
+
export class AIAgentNoteTypeResolver extends ResolverBase {
|
|
909
|
+
@Query(() => RunAIAgentNoteTypeViewResult)
|
|
910
|
+
async RunAIAgentNoteTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
911
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
@Query(() => RunAIAgentNoteTypeViewResult)
|
|
915
|
+
async RunAIAgentNoteTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
916
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
@Query(() => RunAIAgentNoteTypeViewResult)
|
|
920
|
+
async RunAIAgentNoteTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
921
|
+
input.EntityName = 'AIAgent Note Types';
|
|
922
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
923
|
+
}
|
|
924
|
+
@Query(() => AIAgentNoteType_, { nullable: true })
|
|
925
|
+
async AIAgentNoteType(@Arg('ID', () => String) ID: string, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIAgentNoteType_ | null> {
|
|
926
|
+
this.CheckUserReadPermissions('AIAgent Note Types', userPayload);
|
|
927
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNoteTypes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Note Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
928
|
+
const result = this.MapFieldNamesToCodeNames('AIAgent Note Types', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
929
|
+
return result;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
@FieldResolver(() => [AIAgentNote_])
|
|
933
|
+
async AIAgentNotes_AgentNoteTypeIDArray(@Root() aiagentnotetype_: AIAgentNoteType_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
934
|
+
this.CheckUserReadPermissions('AIAgent Notes', userPayload);
|
|
935
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [AgentNoteTypeID]='${aiagentnotetype_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
936
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Notes', await dataSource.query(sSQL));
|
|
937
|
+
return result;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
@Mutation(() => AIAgentNoteType_)
|
|
941
|
+
async CreateAIAgentNoteType(
|
|
942
|
+
@Arg('input', () => CreateAIAgentNoteTypeInput) input: CreateAIAgentNoteTypeInput,
|
|
943
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
944
|
+
@PubSub() pubSub: PubSubEngine
|
|
945
|
+
) {
|
|
946
|
+
return this.CreateRecord('AIAgent Note Types', input, dataSource, userPayload, pubSub)
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
@Mutation(() => AIAgentNoteType_)
|
|
950
|
+
async UpdateAIAgentNoteType(
|
|
951
|
+
@Arg('input', () => UpdateAIAgentNoteTypeInput) input: UpdateAIAgentNoteTypeInput,
|
|
952
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
953
|
+
@PubSub() pubSub: PubSubEngine
|
|
954
|
+
) {
|
|
955
|
+
return this.UpdateRecord('AIAgent Note Types', input, dataSource, userPayload, pubSub);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
@Mutation(() => AIAgentNoteType_)
|
|
959
|
+
async DeleteAIAgentNoteType(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
960
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
961
|
+
return this.DeleteRecord('AIAgent Note Types', key, options, dataSource, userPayload, pubSub);
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
//****************************************************************************
|
|
967
|
+
// ENTITY CLASS for AIAgents
|
|
968
|
+
//****************************************************************************
|
|
969
|
+
@ObjectType({ description: 'Table to store information about AI agents.' })
|
|
970
|
+
export class AIAgent_ {
|
|
971
|
+
@Field({description: 'The unique identifier for each AI agent. Serves as the primary key.'})
|
|
972
|
+
@MaxLength(16)
|
|
973
|
+
ID: string;
|
|
974
|
+
|
|
975
|
+
@Field({nullable: true, description: 'The name of the AI agent.'})
|
|
976
|
+
@MaxLength(510)
|
|
977
|
+
Name?: string;
|
|
978
|
+
|
|
979
|
+
@Field({nullable: true, description: 'A detailed description of the AI agent.'})
|
|
980
|
+
Description?: string;
|
|
981
|
+
|
|
982
|
+
@Field({nullable: true})
|
|
983
|
+
@MaxLength(510)
|
|
984
|
+
LogoURL?: string;
|
|
985
|
+
|
|
986
|
+
@Field()
|
|
987
|
+
@MaxLength(10)
|
|
988
|
+
_mj__CreatedAt: Date;
|
|
989
|
+
|
|
990
|
+
@Field()
|
|
991
|
+
@MaxLength(10)
|
|
992
|
+
_mj__UpdatedAt: Date;
|
|
993
|
+
|
|
994
|
+
@Field(() => [AIAgentLearningCycle_])
|
|
995
|
+
AIAgentLearningCycles_AgentIDArray: AIAgentLearningCycle_[]; // Link to AIAgentLearningCycles
|
|
996
|
+
|
|
997
|
+
@Field(() => [AIAgentModel_])
|
|
998
|
+
AIAgentModels_AgentIDArray: AIAgentModel_[]; // Link to AIAgentModels
|
|
999
|
+
|
|
1000
|
+
@Field(() => [AIAgentAction_])
|
|
1001
|
+
AIAgentActions_AgentIDArray: AIAgentAction_[]; // Link to AIAgentActions
|
|
1002
|
+
|
|
1003
|
+
@Field(() => [AIAgentNote_])
|
|
1004
|
+
AIAgentNotes_AgentIDArray: AIAgentNote_[]; // Link to AIAgentNotes
|
|
1005
|
+
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
//****************************************************************************
|
|
1009
|
+
// INPUT TYPE for AIAgents
|
|
1010
|
+
//****************************************************************************
|
|
1011
|
+
@InputType()
|
|
1012
|
+
export class CreateAIAgentInput {
|
|
1013
|
+
@Field({ nullable: true })
|
|
1014
|
+
Name?: string;
|
|
1015
|
+
|
|
1016
|
+
@Field({ nullable: true })
|
|
1017
|
+
Description?: string;
|
|
1018
|
+
|
|
1019
|
+
@Field({ nullable: true })
|
|
1020
|
+
LogoURL?: string;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
//****************************************************************************
|
|
1025
|
+
// INPUT TYPE for AIAgents
|
|
1026
|
+
//****************************************************************************
|
|
1027
|
+
@InputType()
|
|
1028
|
+
export class UpdateAIAgentInput {
|
|
1029
|
+
@Field()
|
|
1030
|
+
ID: string;
|
|
1031
|
+
|
|
1032
|
+
@Field({ nullable: true })
|
|
1033
|
+
Name?: string;
|
|
1034
|
+
|
|
1035
|
+
@Field({ nullable: true })
|
|
1036
|
+
Description?: string;
|
|
1037
|
+
|
|
1038
|
+
@Field({ nullable: true })
|
|
1039
|
+
LogoURL?: string;
|
|
1040
|
+
|
|
1041
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
1042
|
+
OldValues___?: KeyValuePairInput[];
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
//****************************************************************************
|
|
1046
|
+
// RESOLVER for AIAgents
|
|
1047
|
+
//****************************************************************************
|
|
1048
|
+
@ObjectType()
|
|
1049
|
+
export class RunAIAgentViewResult {
|
|
1050
|
+
@Field(() => [AIAgent_])
|
|
1051
|
+
Results: AIAgent_[];
|
|
1052
|
+
|
|
1053
|
+
@Field(() => String, {nullable: true})
|
|
1054
|
+
UserViewRunID?: string;
|
|
1055
|
+
|
|
1056
|
+
@Field(() => Int, {nullable: true})
|
|
1057
|
+
RowCount: number;
|
|
1058
|
+
|
|
1059
|
+
@Field(() => Int, {nullable: true})
|
|
1060
|
+
TotalRowCount: number;
|
|
1061
|
+
|
|
1062
|
+
@Field(() => Int, {nullable: true})
|
|
1063
|
+
ExecutionTime: number;
|
|
1064
|
+
|
|
1065
|
+
@Field({nullable: true})
|
|
1066
|
+
ErrorMessage?: string;
|
|
1067
|
+
|
|
1068
|
+
@Field(() => Boolean, {nullable: false})
|
|
1069
|
+
Success: boolean;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
@Resolver(AIAgent_)
|
|
1073
|
+
export class AIAgentResolver extends ResolverBase {
|
|
1074
|
+
@Query(() => RunAIAgentViewResult)
|
|
1075
|
+
async RunAIAgentViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1076
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
@Query(() => RunAIAgentViewResult)
|
|
1080
|
+
async RunAIAgentViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1081
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
@Query(() => RunAIAgentViewResult)
|
|
1085
|
+
async RunAIAgentDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1086
|
+
input.EntityName = 'AIAgents';
|
|
1087
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1088
|
+
}
|
|
1089
|
+
@Query(() => AIAgent_, { nullable: true })
|
|
1090
|
+
async AIAgent(@Arg('ID', () => String) ID: string, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIAgent_ | null> {
|
|
1091
|
+
this.CheckUserReadPermissions('AIAgents', userPayload);
|
|
1092
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgents] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgents', userPayload, EntityPermissionType.Read, 'AND');
|
|
1093
|
+
const result = this.MapFieldNamesToCodeNames('AIAgents', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
1094
|
+
return result;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
@FieldResolver(() => [AIAgentLearningCycle_])
|
|
1098
|
+
async AIAgentLearningCycles_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1099
|
+
this.CheckUserReadPermissions('AIAgent Learning Cycles', userPayload);
|
|
1100
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentLearningCycles] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Learning Cycles', userPayload, EntityPermissionType.Read, 'AND');
|
|
1101
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Learning Cycles', await dataSource.query(sSQL));
|
|
1102
|
+
return result;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
@FieldResolver(() => [AIAgentModel_])
|
|
1106
|
+
async AIAgentModels_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1107
|
+
this.CheckUserReadPermissions('AIAgent Models', userPayload);
|
|
1108
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
1109
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Models', await dataSource.query(sSQL));
|
|
1110
|
+
return result;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
@FieldResolver(() => [AIAgentAction_])
|
|
1114
|
+
async AIAgentActions_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1115
|
+
this.CheckUserReadPermissions('AIAgent Actions', userPayload);
|
|
1116
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
1117
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Actions', await dataSource.query(sSQL));
|
|
1118
|
+
return result;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
@FieldResolver(() => [AIAgentNote_])
|
|
1122
|
+
async AIAgentNotes_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1123
|
+
this.CheckUserReadPermissions('AIAgent Notes', userPayload);
|
|
1124
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
1125
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Notes', await dataSource.query(sSQL));
|
|
1126
|
+
return result;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
@Mutation(() => AIAgent_)
|
|
1130
|
+
async CreateAIAgent(
|
|
1131
|
+
@Arg('input', () => CreateAIAgentInput) input: CreateAIAgentInput,
|
|
1132
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
1133
|
+
@PubSub() pubSub: PubSubEngine
|
|
1134
|
+
) {
|
|
1135
|
+
return this.CreateRecord('AIAgents', input, dataSource, userPayload, pubSub)
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
@Mutation(() => AIAgent_)
|
|
1139
|
+
async UpdateAIAgent(
|
|
1140
|
+
@Arg('input', () => UpdateAIAgentInput) input: UpdateAIAgentInput,
|
|
1141
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
1142
|
+
@PubSub() pubSub: PubSubEngine
|
|
1143
|
+
) {
|
|
1144
|
+
return this.UpdateRecord('AIAgents', input, dataSource, userPayload, pubSub);
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
@Mutation(() => AIAgent_)
|
|
1148
|
+
async DeleteAIAgent(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1149
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
1150
|
+
return this.DeleteRecord('AIAgents', key, options, dataSource, userPayload, pubSub);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
//****************************************************************************
|
|
1156
|
+
// ENTITY CLASS for AIAgent Notes
|
|
1157
|
+
//****************************************************************************
|
|
1158
|
+
@ObjectType()
|
|
1159
|
+
export class AIAgentNote_ {
|
|
1160
|
+
@Field()
|
|
1161
|
+
@MaxLength(16)
|
|
1162
|
+
ID: string;
|
|
1163
|
+
|
|
1164
|
+
@Field({nullable: true})
|
|
1165
|
+
@MaxLength(16)
|
|
1166
|
+
AgentID?: string;
|
|
1167
|
+
|
|
1168
|
+
@Field({nullable: true})
|
|
1169
|
+
@MaxLength(16)
|
|
1170
|
+
AgentNoteTypeID?: string;
|
|
1171
|
+
|
|
1172
|
+
@Field({nullable: true})
|
|
1173
|
+
Note?: string;
|
|
1174
|
+
|
|
1175
|
+
@Field()
|
|
1176
|
+
@MaxLength(10)
|
|
1177
|
+
_mj__CreatedAt: Date;
|
|
1178
|
+
|
|
1179
|
+
@Field()
|
|
1180
|
+
@MaxLength(10)
|
|
1181
|
+
_mj__UpdatedAt: Date;
|
|
1182
|
+
|
|
1183
|
+
@Field({nullable: true})
|
|
1184
|
+
@MaxLength(510)
|
|
1185
|
+
Agent?: string;
|
|
1186
|
+
|
|
1187
|
+
@Field({nullable: true})
|
|
1188
|
+
@MaxLength(510)
|
|
1189
|
+
AgentNoteType?: string;
|
|
1190
|
+
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
//****************************************************************************
|
|
1194
|
+
// INPUT TYPE for AIAgent Notes
|
|
1195
|
+
//****************************************************************************
|
|
1196
|
+
@InputType()
|
|
1197
|
+
export class CreateAIAgentNoteInput {
|
|
1198
|
+
@Field({ nullable: true })
|
|
1199
|
+
AgentID?: string;
|
|
1200
|
+
|
|
1201
|
+
@Field({ nullable: true })
|
|
1202
|
+
AgentNoteTypeID?: string;
|
|
1203
|
+
|
|
1204
|
+
@Field({ nullable: true })
|
|
1205
|
+
Note?: string;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
//****************************************************************************
|
|
1210
|
+
// INPUT TYPE for AIAgent Notes
|
|
1211
|
+
//****************************************************************************
|
|
1212
|
+
@InputType()
|
|
1213
|
+
export class UpdateAIAgentNoteInput {
|
|
1214
|
+
@Field()
|
|
1215
|
+
ID: string;
|
|
1216
|
+
|
|
1217
|
+
@Field({ nullable: true })
|
|
1218
|
+
AgentID?: string;
|
|
1219
|
+
|
|
1220
|
+
@Field({ nullable: true })
|
|
1221
|
+
AgentNoteTypeID?: string;
|
|
1222
|
+
|
|
1223
|
+
@Field({ nullable: true })
|
|
1224
|
+
Note?: string;
|
|
1225
|
+
|
|
1226
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
1227
|
+
OldValues___?: KeyValuePairInput[];
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
//****************************************************************************
|
|
1231
|
+
// RESOLVER for AIAgent Notes
|
|
1232
|
+
//****************************************************************************
|
|
1233
|
+
@ObjectType()
|
|
1234
|
+
export class RunAIAgentNoteViewResult {
|
|
1235
|
+
@Field(() => [AIAgentNote_])
|
|
1236
|
+
Results: AIAgentNote_[];
|
|
1237
|
+
|
|
1238
|
+
@Field(() => String, {nullable: true})
|
|
1239
|
+
UserViewRunID?: string;
|
|
1240
|
+
|
|
1241
|
+
@Field(() => Int, {nullable: true})
|
|
1242
|
+
RowCount: number;
|
|
1243
|
+
|
|
1244
|
+
@Field(() => Int, {nullable: true})
|
|
1245
|
+
TotalRowCount: number;
|
|
1246
|
+
|
|
1247
|
+
@Field(() => Int, {nullable: true})
|
|
1248
|
+
ExecutionTime: number;
|
|
1249
|
+
|
|
1250
|
+
@Field({nullable: true})
|
|
1251
|
+
ErrorMessage?: string;
|
|
1252
|
+
|
|
1253
|
+
@Field(() => Boolean, {nullable: false})
|
|
1254
|
+
Success: boolean;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
@Resolver(AIAgentNote_)
|
|
1258
|
+
export class AIAgentNoteResolver extends ResolverBase {
|
|
1259
|
+
@Query(() => RunAIAgentNoteViewResult)
|
|
1260
|
+
async RunAIAgentNoteViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1261
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
@Query(() => RunAIAgentNoteViewResult)
|
|
1265
|
+
async RunAIAgentNoteViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1266
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
@Query(() => RunAIAgentNoteViewResult)
|
|
1270
|
+
async RunAIAgentNoteDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1271
|
+
input.EntityName = 'AIAgent Notes';
|
|
1272
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1273
|
+
}
|
|
1274
|
+
@Query(() => AIAgentNote_, { nullable: true })
|
|
1275
|
+
async AIAgentNote(@Arg('ID', () => String) ID: string, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIAgentNote_ | null> {
|
|
1276
|
+
this.CheckUserReadPermissions('AIAgent Notes', userPayload);
|
|
1277
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
1278
|
+
const result = this.MapFieldNamesToCodeNames('AIAgent Notes', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
1279
|
+
return result;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
@Mutation(() => AIAgentNote_)
|
|
1283
|
+
async CreateAIAgentNote(
|
|
1284
|
+
@Arg('input', () => CreateAIAgentNoteInput) input: CreateAIAgentNoteInput,
|
|
1285
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
1286
|
+
@PubSub() pubSub: PubSubEngine
|
|
1287
|
+
) {
|
|
1288
|
+
return this.CreateRecord('AIAgent Notes', input, dataSource, userPayload, pubSub)
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
@Mutation(() => AIAgentNote_)
|
|
1292
|
+
async UpdateAIAgentNote(
|
|
1293
|
+
@Arg('input', () => UpdateAIAgentNoteInput) input: UpdateAIAgentNoteInput,
|
|
1294
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
1295
|
+
@PubSub() pubSub: PubSubEngine
|
|
1296
|
+
) {
|
|
1297
|
+
return this.UpdateRecord('AIAgent Notes', input, dataSource, userPayload, pubSub);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
@Mutation(() => AIAgentNote_)
|
|
1301
|
+
async DeleteAIAgentNote(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1302
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
1303
|
+
return this.DeleteRecord('AIAgent Notes', key, options, dataSource, userPayload, pubSub);
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
//****************************************************************************
|
|
1309
|
+
// ENTITY CLASS for AIAgent Actions
|
|
1310
|
+
//****************************************************************************
|
|
1311
|
+
@ObjectType({ description: 'Table to store the relationship between AI agents and actions.' })
|
|
1312
|
+
export class AIAgentAction_ {
|
|
1313
|
+
@Field({description: 'The unique identifier for each AI agent-action mapping. Serves as the primary key.'})
|
|
1314
|
+
@MaxLength(16)
|
|
1315
|
+
ID: string;
|
|
1316
|
+
|
|
1317
|
+
@Field({nullable: true, description: 'References the unique identifier of the associated AI agent from the AIAgent table.'})
|
|
1318
|
+
@MaxLength(16)
|
|
1319
|
+
AgentID?: string;
|
|
1320
|
+
|
|
1321
|
+
@Field({nullable: true, description: 'References the unique identifier of the associated action from the Action table.'})
|
|
1322
|
+
@MaxLength(16)
|
|
1323
|
+
ActionID?: string;
|
|
1324
|
+
|
|
1325
|
+
@Field()
|
|
1326
|
+
@MaxLength(30)
|
|
1327
|
+
Status: string;
|
|
1328
|
+
|
|
1329
|
+
@Field()
|
|
1330
|
+
@MaxLength(10)
|
|
1331
|
+
_mj__CreatedAt: Date;
|
|
1332
|
+
|
|
1333
|
+
@Field()
|
|
1334
|
+
@MaxLength(10)
|
|
1335
|
+
_mj__UpdatedAt: Date;
|
|
1336
|
+
|
|
1337
|
+
@Field({nullable: true})
|
|
1338
|
+
@MaxLength(510)
|
|
1339
|
+
Agent?: string;
|
|
1340
|
+
|
|
1341
|
+
@Field({nullable: true})
|
|
1342
|
+
@MaxLength(850)
|
|
1343
|
+
Action?: string;
|
|
1344
|
+
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
//****************************************************************************
|
|
1348
|
+
// INPUT TYPE for AIAgent Actions
|
|
1349
|
+
//****************************************************************************
|
|
1350
|
+
@InputType()
|
|
1351
|
+
export class CreateAIAgentActionInput {
|
|
1352
|
+
@Field({ nullable: true })
|
|
1353
|
+
AgentID?: string;
|
|
1354
|
+
|
|
1355
|
+
@Field({ nullable: true })
|
|
1356
|
+
ActionID?: string;
|
|
1357
|
+
|
|
1358
|
+
@Field()
|
|
1359
|
+
Status: string;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
//****************************************************************************
|
|
1364
|
+
// INPUT TYPE for AIAgent Actions
|
|
1365
|
+
//****************************************************************************
|
|
1366
|
+
@InputType()
|
|
1367
|
+
export class UpdateAIAgentActionInput {
|
|
1368
|
+
@Field()
|
|
1369
|
+
ID: string;
|
|
1370
|
+
|
|
1371
|
+
@Field({ nullable: true })
|
|
1372
|
+
AgentID?: string;
|
|
1373
|
+
|
|
1374
|
+
@Field({ nullable: true })
|
|
1375
|
+
ActionID?: string;
|
|
1376
|
+
|
|
1377
|
+
@Field()
|
|
1378
|
+
Status: string;
|
|
1379
|
+
|
|
1380
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
1381
|
+
OldValues___?: KeyValuePairInput[];
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
//****************************************************************************
|
|
1385
|
+
// RESOLVER for AIAgent Actions
|
|
1386
|
+
//****************************************************************************
|
|
1387
|
+
@ObjectType()
|
|
1388
|
+
export class RunAIAgentActionViewResult {
|
|
1389
|
+
@Field(() => [AIAgentAction_])
|
|
1390
|
+
Results: AIAgentAction_[];
|
|
1391
|
+
|
|
1392
|
+
@Field(() => String, {nullable: true})
|
|
1393
|
+
UserViewRunID?: string;
|
|
1394
|
+
|
|
1395
|
+
@Field(() => Int, {nullable: true})
|
|
1396
|
+
RowCount: number;
|
|
1397
|
+
|
|
1398
|
+
@Field(() => Int, {nullable: true})
|
|
1399
|
+
TotalRowCount: number;
|
|
1400
|
+
|
|
1401
|
+
@Field(() => Int, {nullable: true})
|
|
1402
|
+
ExecutionTime: number;
|
|
1403
|
+
|
|
1404
|
+
@Field({nullable: true})
|
|
1405
|
+
ErrorMessage?: string;
|
|
1406
|
+
|
|
1407
|
+
@Field(() => Boolean, {nullable: false})
|
|
1408
|
+
Success: boolean;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
@Resolver(AIAgentAction_)
|
|
1412
|
+
export class AIAgentActionResolver extends ResolverBase {
|
|
1413
|
+
@Query(() => RunAIAgentActionViewResult)
|
|
1414
|
+
async RunAIAgentActionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1415
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
@Query(() => RunAIAgentActionViewResult)
|
|
1419
|
+
async RunAIAgentActionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1420
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
@Query(() => RunAIAgentActionViewResult)
|
|
1424
|
+
async RunAIAgentActionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1425
|
+
input.EntityName = 'AIAgent Actions';
|
|
1426
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1427
|
+
}
|
|
1428
|
+
@Query(() => AIAgentAction_, { nullable: true })
|
|
1429
|
+
async AIAgentAction(@Arg('ID', () => String) ID: string, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIAgentAction_ | null> {
|
|
1430
|
+
this.CheckUserReadPermissions('AIAgent Actions', userPayload);
|
|
1431
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
1432
|
+
const result = this.MapFieldNamesToCodeNames('AIAgent Actions', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
1433
|
+
return result;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
@Mutation(() => AIAgentAction_)
|
|
1437
|
+
async CreateAIAgentAction(
|
|
1438
|
+
@Arg('input', () => CreateAIAgentActionInput) input: CreateAIAgentActionInput,
|
|
1439
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
1440
|
+
@PubSub() pubSub: PubSubEngine
|
|
1441
|
+
) {
|
|
1442
|
+
return this.CreateRecord('AIAgent Actions', input, dataSource, userPayload, pubSub)
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
@Mutation(() => AIAgentAction_)
|
|
1446
|
+
async UpdateAIAgentAction(
|
|
1447
|
+
@Arg('input', () => UpdateAIAgentActionInput) input: UpdateAIAgentActionInput,
|
|
1448
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
1449
|
+
@PubSub() pubSub: PubSubEngine
|
|
1450
|
+
) {
|
|
1451
|
+
return this.UpdateRecord('AIAgent Actions', input, dataSource, userPayload, pubSub);
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
@Mutation(() => AIAgentAction_)
|
|
1455
|
+
async DeleteAIAgentAction(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1456
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
1457
|
+
return this.DeleteRecord('AIAgent Actions', key, options, dataSource, userPayload, pubSub);
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
}
|
|
1461
|
+
|
|
658
1462
|
//****************************************************************************
|
|
659
1463
|
// ENTITY CLASS for AI Prompts
|
|
660
1464
|
//****************************************************************************
|
|
@@ -10328,6 +11132,9 @@ export class AIModel_ {
|
|
|
10328
11132
|
@Field(() => [EntityAIAction_])
|
|
10329
11133
|
EntityAIActions_AIModelIDArray: EntityAIAction_[]; // Link to EntityAIActions
|
|
10330
11134
|
|
|
11135
|
+
@Field(() => [AIAgentModel_])
|
|
11136
|
+
AIAgentModels_ModelIDArray: AIAgentModel_[]; // Link to AIAgentModels
|
|
11137
|
+
|
|
10331
11138
|
}
|
|
10332
11139
|
|
|
10333
11140
|
//****************************************************************************
|
|
@@ -10543,6 +11350,14 @@ export class AIModelResolver extends ResolverBase {
|
|
|
10543
11350
|
return result;
|
|
10544
11351
|
}
|
|
10545
11352
|
|
|
11353
|
+
@FieldResolver(() => [AIAgentModel_])
|
|
11354
|
+
async AIAgentModels_ModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11355
|
+
this.CheckUserReadPermissions('AIAgent Models', userPayload);
|
|
11356
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [ModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
11357
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Models', await dataSource.query(sSQL));
|
|
11358
|
+
return result;
|
|
11359
|
+
}
|
|
11360
|
+
|
|
10546
11361
|
@Mutation(() => AIModel_)
|
|
10547
11362
|
async CreateAIModel(
|
|
10548
11363
|
@Arg('input', () => CreateAIModelInput) input: CreateAIModelInput,
|
|
@@ -20862,6 +21677,9 @@ export class Action_ {
|
|
|
20862
21677
|
@Field(() => [ActionResultCode_])
|
|
20863
21678
|
ActionResultCodes_ActionIDArray: ActionResultCode_[]; // Link to ActionResultCodes
|
|
20864
21679
|
|
|
21680
|
+
@Field(() => [AIAgentAction_])
|
|
21681
|
+
AIAgentActions_ActionIDArray: AIAgentAction_[]; // Link to AIAgentActions
|
|
21682
|
+
|
|
20865
21683
|
@Field(() => [ActionContext_])
|
|
20866
21684
|
ActionContexts_ActionIDArray: ActionContext_[]; // Link to ActionContexts
|
|
20867
21685
|
|
|
@@ -21075,6 +21893,14 @@ export class ActionResolver extends ResolverBase {
|
|
|
21075
21893
|
return result;
|
|
21076
21894
|
}
|
|
21077
21895
|
|
|
21896
|
+
@FieldResolver(() => [AIAgentAction_])
|
|
21897
|
+
async AIAgentActions_ActionIDArray(@Root() action_: Action_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
21898
|
+
this.CheckUserReadPermissions('AIAgent Actions', userPayload);
|
|
21899
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [ActionID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
21900
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AIAgent Actions', await dataSource.query(sSQL));
|
|
21901
|
+
return result;
|
|
21902
|
+
}
|
|
21903
|
+
|
|
21078
21904
|
@FieldResolver(() => [ActionContext_])
|
|
21079
21905
|
async ActionContexts_ActionIDArray(@Root() action_: Action_, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
21080
21906
|
this.CheckUserReadPermissions('Action Contexts', userPayload);
|
|
@@ -26559,52 +27385,257 @@ export class ResourceLink_ {
|
|
|
26559
27385
|
// INPUT TYPE for Resource Links
|
|
26560
27386
|
//****************************************************************************
|
|
26561
27387
|
@InputType()
|
|
26562
|
-
export class CreateResourceLinkInput {
|
|
27388
|
+
export class CreateResourceLinkInput {
|
|
27389
|
+
@Field()
|
|
27390
|
+
UserID: string;
|
|
27391
|
+
|
|
27392
|
+
@Field()
|
|
27393
|
+
ResourceTypeID: string;
|
|
27394
|
+
|
|
27395
|
+
@Field()
|
|
27396
|
+
ResourceRecordID: string;
|
|
27397
|
+
|
|
27398
|
+
@Field({ nullable: true })
|
|
27399
|
+
FolderID?: string;
|
|
27400
|
+
}
|
|
27401
|
+
|
|
27402
|
+
|
|
27403
|
+
//****************************************************************************
|
|
27404
|
+
// INPUT TYPE for Resource Links
|
|
27405
|
+
//****************************************************************************
|
|
27406
|
+
@InputType()
|
|
27407
|
+
export class UpdateResourceLinkInput {
|
|
27408
|
+
@Field()
|
|
27409
|
+
ID: string;
|
|
27410
|
+
|
|
27411
|
+
@Field()
|
|
27412
|
+
UserID: string;
|
|
27413
|
+
|
|
27414
|
+
@Field()
|
|
27415
|
+
ResourceTypeID: string;
|
|
27416
|
+
|
|
27417
|
+
@Field()
|
|
27418
|
+
ResourceRecordID: string;
|
|
27419
|
+
|
|
27420
|
+
@Field({ nullable: true })
|
|
27421
|
+
FolderID?: string;
|
|
27422
|
+
|
|
27423
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
27424
|
+
OldValues___?: KeyValuePairInput[];
|
|
27425
|
+
}
|
|
27426
|
+
|
|
27427
|
+
//****************************************************************************
|
|
27428
|
+
// RESOLVER for Resource Links
|
|
27429
|
+
//****************************************************************************
|
|
27430
|
+
@ObjectType()
|
|
27431
|
+
export class RunResourceLinkViewResult {
|
|
27432
|
+
@Field(() => [ResourceLink_])
|
|
27433
|
+
Results: ResourceLink_[];
|
|
27434
|
+
|
|
27435
|
+
@Field(() => String, {nullable: true})
|
|
27436
|
+
UserViewRunID?: string;
|
|
27437
|
+
|
|
27438
|
+
@Field(() => Int, {nullable: true})
|
|
27439
|
+
RowCount: number;
|
|
27440
|
+
|
|
27441
|
+
@Field(() => Int, {nullable: true})
|
|
27442
|
+
TotalRowCount: number;
|
|
27443
|
+
|
|
27444
|
+
@Field(() => Int, {nullable: true})
|
|
27445
|
+
ExecutionTime: number;
|
|
27446
|
+
|
|
27447
|
+
@Field({nullable: true})
|
|
27448
|
+
ErrorMessage?: string;
|
|
27449
|
+
|
|
27450
|
+
@Field(() => Boolean, {nullable: false})
|
|
27451
|
+
Success: boolean;
|
|
27452
|
+
}
|
|
27453
|
+
|
|
27454
|
+
@Resolver(ResourceLink_)
|
|
27455
|
+
export class ResourceLinkResolver extends ResolverBase {
|
|
27456
|
+
@Query(() => RunResourceLinkViewResult)
|
|
27457
|
+
async RunResourceLinkViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27458
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
27459
|
+
}
|
|
27460
|
+
|
|
27461
|
+
@Query(() => RunResourceLinkViewResult)
|
|
27462
|
+
async RunResourceLinkViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27463
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
27464
|
+
}
|
|
27465
|
+
|
|
27466
|
+
@Query(() => RunResourceLinkViewResult)
|
|
27467
|
+
async RunResourceLinkDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27468
|
+
input.EntityName = 'Resource Links';
|
|
27469
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
27470
|
+
}
|
|
27471
|
+
@Query(() => ResourceLink_, { nullable: true })
|
|
27472
|
+
async ResourceLink(@Arg('ID', () => String) ID: string, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ResourceLink_ | null> {
|
|
27473
|
+
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
27474
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
27475
|
+
const result = this.MapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
27476
|
+
return result;
|
|
27477
|
+
}
|
|
27478
|
+
|
|
27479
|
+
@Mutation(() => ResourceLink_)
|
|
27480
|
+
async CreateResourceLink(
|
|
27481
|
+
@Arg('input', () => CreateResourceLinkInput) input: CreateResourceLinkInput,
|
|
27482
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
27483
|
+
@PubSub() pubSub: PubSubEngine
|
|
27484
|
+
) {
|
|
27485
|
+
return this.CreateRecord('Resource Links', input, dataSource, userPayload, pubSub)
|
|
27486
|
+
}
|
|
27487
|
+
|
|
27488
|
+
@Mutation(() => ResourceLink_)
|
|
27489
|
+
async UpdateResourceLink(
|
|
27490
|
+
@Arg('input', () => UpdateResourceLinkInput) input: UpdateResourceLinkInput,
|
|
27491
|
+
@Ctx() { dataSource, userPayload }: AppContext,
|
|
27492
|
+
@PubSub() pubSub: PubSubEngine
|
|
27493
|
+
) {
|
|
27494
|
+
return this.UpdateRecord('Resource Links', input, dataSource, userPayload, pubSub);
|
|
27495
|
+
}
|
|
27496
|
+
|
|
27497
|
+
@Mutation(() => ResourceLink_)
|
|
27498
|
+
async DeleteResourceLink(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27499
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
27500
|
+
return this.DeleteRecord('Resource Links', key, options, dataSource, userPayload, pubSub);
|
|
27501
|
+
}
|
|
27502
|
+
|
|
27503
|
+
}
|
|
27504
|
+
|
|
27505
|
+
//****************************************************************************
|
|
27506
|
+
// ENTITY CLASS for flyway _schema _histories
|
|
27507
|
+
//****************************************************************************
|
|
27508
|
+
@ObjectType()
|
|
27509
|
+
export class flyway_schema_history_ {
|
|
27510
|
+
@Field(() => Int)
|
|
27511
|
+
installed_rank: number;
|
|
27512
|
+
|
|
27513
|
+
@Field({nullable: true})
|
|
27514
|
+
@MaxLength(100)
|
|
27515
|
+
version?: string;
|
|
27516
|
+
|
|
27517
|
+
@Field({nullable: true})
|
|
27518
|
+
@MaxLength(400)
|
|
27519
|
+
description?: string;
|
|
27520
|
+
|
|
27521
|
+
@Field()
|
|
27522
|
+
@MaxLength(40)
|
|
27523
|
+
type: string;
|
|
27524
|
+
|
|
27525
|
+
@Field()
|
|
27526
|
+
@MaxLength(2000)
|
|
27527
|
+
script: string;
|
|
27528
|
+
|
|
27529
|
+
@Field(() => Int, {nullable: true})
|
|
27530
|
+
checksum?: number;
|
|
27531
|
+
|
|
27532
|
+
@Field()
|
|
27533
|
+
@MaxLength(200)
|
|
27534
|
+
installed_by: string;
|
|
27535
|
+
|
|
27536
|
+
@Field()
|
|
27537
|
+
@MaxLength(8)
|
|
27538
|
+
installed_on: Date;
|
|
27539
|
+
|
|
27540
|
+
@Field(() => Int)
|
|
27541
|
+
execution_time: number;
|
|
27542
|
+
|
|
27543
|
+
@Field(() => Boolean)
|
|
27544
|
+
success: boolean;
|
|
27545
|
+
|
|
27546
|
+
@Field()
|
|
27547
|
+
@MaxLength(10)
|
|
27548
|
+
_mj__CreatedAt: Date;
|
|
27549
|
+
|
|
27550
|
+
@Field()
|
|
27551
|
+
@MaxLength(10)
|
|
27552
|
+
_mj__UpdatedAt: Date;
|
|
27553
|
+
|
|
27554
|
+
}
|
|
27555
|
+
|
|
27556
|
+
//****************************************************************************
|
|
27557
|
+
// INPUT TYPE for flyway _schema _histories
|
|
27558
|
+
//****************************************************************************
|
|
27559
|
+
@InputType()
|
|
27560
|
+
export class Createflyway_schema_historyInput {
|
|
27561
|
+
@Field(() => Int)
|
|
27562
|
+
installed_rank: number;
|
|
27563
|
+
|
|
27564
|
+
@Field({ nullable: true })
|
|
27565
|
+
version?: string;
|
|
27566
|
+
|
|
27567
|
+
@Field({ nullable: true })
|
|
27568
|
+
description?: string;
|
|
27569
|
+
|
|
26563
27570
|
@Field()
|
|
26564
|
-
|
|
27571
|
+
type: string;
|
|
26565
27572
|
|
|
26566
27573
|
@Field()
|
|
26567
|
-
|
|
27574
|
+
script: string;
|
|
27575
|
+
|
|
27576
|
+
@Field(() => Int, { nullable: true })
|
|
27577
|
+
checksum?: number;
|
|
26568
27578
|
|
|
26569
27579
|
@Field()
|
|
26570
|
-
|
|
27580
|
+
installed_by: string;
|
|
26571
27581
|
|
|
26572
|
-
@Field(
|
|
26573
|
-
|
|
27582
|
+
@Field()
|
|
27583
|
+
installed_on: Date;
|
|
27584
|
+
|
|
27585
|
+
@Field(() => Int)
|
|
27586
|
+
execution_time: number;
|
|
27587
|
+
|
|
27588
|
+
@Field(() => Boolean)
|
|
27589
|
+
success: boolean;
|
|
26574
27590
|
}
|
|
26575
27591
|
|
|
26576
27592
|
|
|
26577
27593
|
//****************************************************************************
|
|
26578
|
-
// INPUT TYPE for
|
|
27594
|
+
// INPUT TYPE for flyway _schema _histories
|
|
26579
27595
|
//****************************************************************************
|
|
26580
27596
|
@InputType()
|
|
26581
|
-
export class
|
|
27597
|
+
export class Updateflyway_schema_historyInput {
|
|
27598
|
+
@Field(() => Int)
|
|
27599
|
+
installed_rank: number;
|
|
27600
|
+
|
|
27601
|
+
@Field({ nullable: true })
|
|
27602
|
+
version?: string;
|
|
27603
|
+
|
|
27604
|
+
@Field({ nullable: true })
|
|
27605
|
+
description?: string;
|
|
27606
|
+
|
|
26582
27607
|
@Field()
|
|
26583
|
-
|
|
27608
|
+
type: string;
|
|
26584
27609
|
|
|
26585
27610
|
@Field()
|
|
26586
|
-
|
|
27611
|
+
script: string;
|
|
27612
|
+
|
|
27613
|
+
@Field(() => Int, { nullable: true })
|
|
27614
|
+
checksum?: number;
|
|
26587
27615
|
|
|
26588
27616
|
@Field()
|
|
26589
|
-
|
|
27617
|
+
installed_by: string;
|
|
26590
27618
|
|
|
26591
27619
|
@Field()
|
|
26592
|
-
|
|
27620
|
+
installed_on: Date;
|
|
26593
27621
|
|
|
26594
|
-
@Field(
|
|
26595
|
-
|
|
27622
|
+
@Field(() => Int)
|
|
27623
|
+
execution_time: number;
|
|
27624
|
+
|
|
27625
|
+
@Field(() => Boolean)
|
|
27626
|
+
success: boolean;
|
|
26596
27627
|
|
|
26597
27628
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
26598
27629
|
OldValues___?: KeyValuePairInput[];
|
|
26599
27630
|
}
|
|
26600
27631
|
|
|
26601
27632
|
//****************************************************************************
|
|
26602
|
-
// RESOLVER for
|
|
27633
|
+
// RESOLVER for flyway _schema _histories
|
|
26603
27634
|
//****************************************************************************
|
|
26604
27635
|
@ObjectType()
|
|
26605
|
-
export class
|
|
26606
|
-
@Field(() => [
|
|
26607
|
-
Results:
|
|
27636
|
+
export class Runflyway_schema_historyViewResult {
|
|
27637
|
+
@Field(() => [flyway_schema_history_])
|
|
27638
|
+
Results: flyway_schema_history_[];
|
|
26608
27639
|
|
|
26609
27640
|
@Field(() => String, {nullable: true})
|
|
26610
27641
|
UserViewRunID?: string;
|
|
@@ -26625,53 +27656,53 @@ export class RunResourceLinkViewResult {
|
|
|
26625
27656
|
Success: boolean;
|
|
26626
27657
|
}
|
|
26627
27658
|
|
|
26628
|
-
@Resolver(
|
|
26629
|
-
export class
|
|
26630
|
-
@Query(() =>
|
|
26631
|
-
async
|
|
27659
|
+
@Resolver(flyway_schema_history_)
|
|
27660
|
+
export class flyway_schema_historyResolver extends ResolverBase {
|
|
27661
|
+
@Query(() => Runflyway_schema_historyViewResult)
|
|
27662
|
+
async Runflyway_schema_historyViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26632
27663
|
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
26633
27664
|
}
|
|
26634
27665
|
|
|
26635
|
-
@Query(() =>
|
|
26636
|
-
async
|
|
27666
|
+
@Query(() => Runflyway_schema_historyViewResult)
|
|
27667
|
+
async Runflyway_schema_historyViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
26637
27668
|
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
26638
27669
|
}
|
|
26639
27670
|
|
|
26640
|
-
@Query(() =>
|
|
26641
|
-
async
|
|
26642
|
-
input.EntityName = '
|
|
27671
|
+
@Query(() => Runflyway_schema_historyViewResult)
|
|
27672
|
+
async Runflyway_schema_historyDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27673
|
+
input.EntityName = 'flyway _schema _histories';
|
|
26643
27674
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
26644
27675
|
}
|
|
26645
|
-
@Query(() =>
|
|
26646
|
-
async
|
|
26647
|
-
this.CheckUserReadPermissions('
|
|
26648
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
26649
|
-
const result = this.MapFieldNamesToCodeNames('
|
|
27676
|
+
@Query(() => flyway_schema_history_, { nullable: true })
|
|
27677
|
+
async flyway_schema_history(@Arg('installed_rank', () => Int) installed_rank: number, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<flyway_schema_history_ | null> {
|
|
27678
|
+
this.CheckUserReadPermissions('flyway _schema _histories', userPayload);
|
|
27679
|
+
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');
|
|
27680
|
+
const result = this.MapFieldNamesToCodeNames('flyway _schema _histories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
26650
27681
|
return result;
|
|
26651
27682
|
}
|
|
26652
27683
|
|
|
26653
|
-
@Mutation(() =>
|
|
26654
|
-
async
|
|
26655
|
-
@Arg('input', () =>
|
|
27684
|
+
@Mutation(() => flyway_schema_history_)
|
|
27685
|
+
async Createflyway_schema_history(
|
|
27686
|
+
@Arg('input', () => Createflyway_schema_historyInput) input: Createflyway_schema_historyInput,
|
|
26656
27687
|
@Ctx() { dataSource, userPayload }: AppContext,
|
|
26657
27688
|
@PubSub() pubSub: PubSubEngine
|
|
26658
27689
|
) {
|
|
26659
|
-
return this.CreateRecord('
|
|
27690
|
+
return this.CreateRecord('flyway _schema _histories', input, dataSource, userPayload, pubSub)
|
|
26660
27691
|
}
|
|
26661
27692
|
|
|
26662
|
-
@Mutation(() =>
|
|
26663
|
-
async
|
|
26664
|
-
@Arg('input', () =>
|
|
27693
|
+
@Mutation(() => flyway_schema_history_)
|
|
27694
|
+
async Updateflyway_schema_history(
|
|
27695
|
+
@Arg('input', () => Updateflyway_schema_historyInput) input: Updateflyway_schema_historyInput,
|
|
26665
27696
|
@Ctx() { dataSource, userPayload }: AppContext,
|
|
26666
27697
|
@PubSub() pubSub: PubSubEngine
|
|
26667
27698
|
) {
|
|
26668
|
-
return this.UpdateRecord('
|
|
27699
|
+
return this.UpdateRecord('flyway _schema _histories', input, dataSource, userPayload, pubSub);
|
|
26669
27700
|
}
|
|
26670
27701
|
|
|
26671
|
-
@Mutation(() =>
|
|
26672
|
-
async
|
|
26673
|
-
const key = new CompositeKey([{FieldName: '
|
|
26674
|
-
return this.DeleteRecord('
|
|
27702
|
+
@Mutation(() => flyway_schema_history_)
|
|
27703
|
+
async Deleteflyway_schema_history(@Arg('installed_rank', () => Int) installed_rank: number, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
27704
|
+
const key = new CompositeKey([{FieldName: 'installed_rank', Value: installed_rank}]);
|
|
27705
|
+
return this.DeleteRecord('flyway _schema _histories', key, options, dataSource, userPayload, pubSub);
|
|
26675
27706
|
}
|
|
26676
27707
|
|
|
26677
27708
|
}
|
|
@@ -28703,45 +29734,32 @@ export class ContentItemTagResolver extends ResolverBase {
|
|
|
28703
29734
|
}
|
|
28704
29735
|
|
|
28705
29736
|
//****************************************************************************
|
|
28706
|
-
// ENTITY CLASS for
|
|
29737
|
+
// ENTITY CLASS for AIAgent Learning Cycles
|
|
28707
29738
|
//****************************************************************************
|
|
28708
|
-
@ObjectType()
|
|
28709
|
-
export class
|
|
28710
|
-
@Field(
|
|
28711
|
-
|
|
28712
|
-
|
|
28713
|
-
@Field({nullable: true})
|
|
28714
|
-
@MaxLength(100)
|
|
28715
|
-
version?: string;
|
|
28716
|
-
|
|
28717
|
-
@Field({nullable: true})
|
|
28718
|
-
@MaxLength(400)
|
|
28719
|
-
description?: string;
|
|
28720
|
-
|
|
28721
|
-
@Field()
|
|
28722
|
-
@MaxLength(40)
|
|
28723
|
-
type: string;
|
|
28724
|
-
|
|
28725
|
-
@Field()
|
|
28726
|
-
@MaxLength(2000)
|
|
28727
|
-
script: string;
|
|
29739
|
+
@ObjectType({ description: 'Tracks the learning cycles for AI Agents where the Agent does offline reasoning, reflection, learning, and updates metadata.' })
|
|
29740
|
+
export class AIAgentLearningCycle_ {
|
|
29741
|
+
@Field({description: 'Unique identifier for the learning cycle.'})
|
|
29742
|
+
@MaxLength(16)
|
|
29743
|
+
ID: string;
|
|
28728
29744
|
|
|
28729
|
-
@Field(
|
|
28730
|
-
|
|
29745
|
+
@Field({description: 'Identifier for the AI Agent associated with this learning cycle.'})
|
|
29746
|
+
@MaxLength(16)
|
|
29747
|
+
AgentID: string;
|
|
28731
29748
|
|
|
28732
|
-
@Field()
|
|
28733
|
-
@MaxLength(
|
|
28734
|
-
|
|
29749
|
+
@Field({description: 'Timestamp indicating when the learning cycle started.'})
|
|
29750
|
+
@MaxLength(10)
|
|
29751
|
+
StartedAt: Date;
|
|
28735
29752
|
|
|
28736
|
-
@Field()
|
|
28737
|
-
@MaxLength(
|
|
28738
|
-
|
|
29753
|
+
@Field({nullable: true, description: 'Timestamp indicating when the learning cycle ended.'})
|
|
29754
|
+
@MaxLength(10)
|
|
29755
|
+
EndedAt?: Date;
|
|
28739
29756
|
|
|
28740
|
-
@Field((
|
|
28741
|
-
|
|
29757
|
+
@Field({description: 'Status of the learning cycle (In-Progress, Complete, or Failed).'})
|
|
29758
|
+
@MaxLength(40)
|
|
29759
|
+
Status: string;
|
|
28742
29760
|
|
|
28743
|
-
@Field(
|
|
28744
|
-
|
|
29761
|
+
@Field({nullable: true, description: 'Text summary provided by the agent about what it learned and any changes it requested for stored metadata.'})
|
|
29762
|
+
AgentSummary?: string;
|
|
28745
29763
|
|
|
28746
29764
|
@Field()
|
|
28747
29765
|
@MaxLength(10)
|
|
@@ -28751,91 +29769,68 @@ export class flyway_schema_history_ {
|
|
|
28751
29769
|
@MaxLength(10)
|
|
28752
29770
|
_mj__UpdatedAt: Date;
|
|
28753
29771
|
|
|
29772
|
+
@Field({nullable: true})
|
|
29773
|
+
@MaxLength(510)
|
|
29774
|
+
Agent?: string;
|
|
29775
|
+
|
|
28754
29776
|
}
|
|
28755
29777
|
|
|
28756
29778
|
//****************************************************************************
|
|
28757
|
-
// INPUT TYPE for
|
|
29779
|
+
// INPUT TYPE for AIAgent Learning Cycles
|
|
28758
29780
|
//****************************************************************************
|
|
28759
29781
|
@InputType()
|
|
28760
|
-
export class
|
|
28761
|
-
@Field(() => Int)
|
|
28762
|
-
installed_rank: number;
|
|
28763
|
-
|
|
28764
|
-
@Field({ nullable: true })
|
|
28765
|
-
version?: string;
|
|
28766
|
-
|
|
28767
|
-
@Field({ nullable: true })
|
|
28768
|
-
description?: string;
|
|
28769
|
-
|
|
29782
|
+
export class CreateAIAgentLearningCycleInput {
|
|
28770
29783
|
@Field()
|
|
28771
|
-
|
|
29784
|
+
AgentID: string;
|
|
28772
29785
|
|
|
28773
29786
|
@Field()
|
|
28774
|
-
|
|
28775
|
-
|
|
28776
|
-
@Field(() => Int, { nullable: true })
|
|
28777
|
-
checksum?: number;
|
|
29787
|
+
StartedAt: Date;
|
|
28778
29788
|
|
|
28779
|
-
@Field()
|
|
28780
|
-
|
|
29789
|
+
@Field({ nullable: true })
|
|
29790
|
+
EndedAt?: Date;
|
|
28781
29791
|
|
|
28782
29792
|
@Field()
|
|
28783
|
-
|
|
28784
|
-
|
|
28785
|
-
@Field(() => Int)
|
|
28786
|
-
execution_time: number;
|
|
29793
|
+
Status: string;
|
|
28787
29794
|
|
|
28788
|
-
@Field(
|
|
28789
|
-
|
|
29795
|
+
@Field({ nullable: true })
|
|
29796
|
+
AgentSummary?: string;
|
|
28790
29797
|
}
|
|
28791
29798
|
|
|
28792
29799
|
|
|
28793
29800
|
//****************************************************************************
|
|
28794
|
-
// INPUT TYPE for
|
|
29801
|
+
// INPUT TYPE for AIAgent Learning Cycles
|
|
28795
29802
|
//****************************************************************************
|
|
28796
29803
|
@InputType()
|
|
28797
|
-
export class
|
|
28798
|
-
@Field(() => Int)
|
|
28799
|
-
installed_rank: number;
|
|
28800
|
-
|
|
28801
|
-
@Field({ nullable: true })
|
|
28802
|
-
version?: string;
|
|
28803
|
-
|
|
28804
|
-
@Field({ nullable: true })
|
|
28805
|
-
description?: string;
|
|
28806
|
-
|
|
29804
|
+
export class UpdateAIAgentLearningCycleInput {
|
|
28807
29805
|
@Field()
|
|
28808
|
-
|
|
29806
|
+
ID: string;
|
|
28809
29807
|
|
|
28810
29808
|
@Field()
|
|
28811
|
-
|
|
28812
|
-
|
|
28813
|
-
@Field(() => Int, { nullable: true })
|
|
28814
|
-
checksum?: number;
|
|
29809
|
+
AgentID: string;
|
|
28815
29810
|
|
|
28816
29811
|
@Field()
|
|
28817
|
-
|
|
29812
|
+
StartedAt: Date;
|
|
28818
29813
|
|
|
28819
|
-
@Field()
|
|
28820
|
-
|
|
29814
|
+
@Field({ nullable: true })
|
|
29815
|
+
EndedAt?: Date;
|
|
28821
29816
|
|
|
28822
|
-
@Field(
|
|
28823
|
-
|
|
29817
|
+
@Field()
|
|
29818
|
+
Status: string;
|
|
28824
29819
|
|
|
28825
|
-
@Field(
|
|
28826
|
-
|
|
29820
|
+
@Field({ nullable: true })
|
|
29821
|
+
AgentSummary?: string;
|
|
28827
29822
|
|
|
28828
29823
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
28829
29824
|
OldValues___?: KeyValuePairInput[];
|
|
28830
29825
|
}
|
|
28831
29826
|
|
|
28832
29827
|
//****************************************************************************
|
|
28833
|
-
// RESOLVER for
|
|
29828
|
+
// RESOLVER for AIAgent Learning Cycles
|
|
28834
29829
|
//****************************************************************************
|
|
28835
29830
|
@ObjectType()
|
|
28836
|
-
export class
|
|
28837
|
-
@Field(() => [
|
|
28838
|
-
Results:
|
|
29831
|
+
export class RunAIAgentLearningCycleViewResult {
|
|
29832
|
+
@Field(() => [AIAgentLearningCycle_])
|
|
29833
|
+
Results: AIAgentLearningCycle_[];
|
|
28839
29834
|
|
|
28840
29835
|
@Field(() => String, {nullable: true})
|
|
28841
29836
|
UserViewRunID?: string;
|
|
@@ -28856,53 +29851,53 @@ export class Runflyway_schema_historyViewResult {
|
|
|
28856
29851
|
Success: boolean;
|
|
28857
29852
|
}
|
|
28858
29853
|
|
|
28859
|
-
@Resolver(
|
|
28860
|
-
export class
|
|
28861
|
-
@Query(() =>
|
|
28862
|
-
async
|
|
29854
|
+
@Resolver(AIAgentLearningCycle_)
|
|
29855
|
+
export class AIAgentLearningCycleResolver extends ResolverBase {
|
|
29856
|
+
@Query(() => RunAIAgentLearningCycleViewResult)
|
|
29857
|
+
async RunAIAgentLearningCycleViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28863
29858
|
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
28864
29859
|
}
|
|
28865
29860
|
|
|
28866
|
-
@Query(() =>
|
|
28867
|
-
async
|
|
29861
|
+
@Query(() => RunAIAgentLearningCycleViewResult)
|
|
29862
|
+
async RunAIAgentLearningCycleViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
28868
29863
|
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
28869
29864
|
}
|
|
28870
29865
|
|
|
28871
|
-
@Query(() =>
|
|
28872
|
-
async
|
|
28873
|
-
input.EntityName = '
|
|
29866
|
+
@Query(() => RunAIAgentLearningCycleViewResult)
|
|
29867
|
+
async RunAIAgentLearningCycleDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29868
|
+
input.EntityName = 'AIAgent Learning Cycles';
|
|
28874
29869
|
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
28875
29870
|
}
|
|
28876
|
-
@Query(() =>
|
|
28877
|
-
async
|
|
28878
|
-
this.CheckUserReadPermissions('
|
|
28879
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
28880
|
-
const result = this.MapFieldNamesToCodeNames('
|
|
29871
|
+
@Query(() => AIAgentLearningCycle_, { nullable: true })
|
|
29872
|
+
async AIAgentLearningCycle(@Arg('ID', () => String) ID: string, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIAgentLearningCycle_ | null> {
|
|
29873
|
+
this.CheckUserReadPermissions('AIAgent Learning Cycles', userPayload);
|
|
29874
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentLearningCycles] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('AIAgent Learning Cycles', userPayload, EntityPermissionType.Read, 'AND');
|
|
29875
|
+
const result = this.MapFieldNamesToCodeNames('AIAgent Learning Cycles', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
|
|
28881
29876
|
return result;
|
|
28882
29877
|
}
|
|
28883
29878
|
|
|
28884
|
-
@Mutation(() =>
|
|
28885
|
-
async
|
|
28886
|
-
@Arg('input', () =>
|
|
29879
|
+
@Mutation(() => AIAgentLearningCycle_)
|
|
29880
|
+
async CreateAIAgentLearningCycle(
|
|
29881
|
+
@Arg('input', () => CreateAIAgentLearningCycleInput) input: CreateAIAgentLearningCycleInput,
|
|
28887
29882
|
@Ctx() { dataSource, userPayload }: AppContext,
|
|
28888
29883
|
@PubSub() pubSub: PubSubEngine
|
|
28889
29884
|
) {
|
|
28890
|
-
return this.CreateRecord('
|
|
29885
|
+
return this.CreateRecord('AIAgent Learning Cycles', input, dataSource, userPayload, pubSub)
|
|
28891
29886
|
}
|
|
28892
29887
|
|
|
28893
|
-
@Mutation(() =>
|
|
28894
|
-
async
|
|
28895
|
-
@Arg('input', () =>
|
|
29888
|
+
@Mutation(() => AIAgentLearningCycle_)
|
|
29889
|
+
async UpdateAIAgentLearningCycle(
|
|
29890
|
+
@Arg('input', () => UpdateAIAgentLearningCycleInput) input: UpdateAIAgentLearningCycleInput,
|
|
28896
29891
|
@Ctx() { dataSource, userPayload }: AppContext,
|
|
28897
29892
|
@PubSub() pubSub: PubSubEngine
|
|
28898
29893
|
) {
|
|
28899
|
-
return this.UpdateRecord('
|
|
29894
|
+
return this.UpdateRecord('AIAgent Learning Cycles', input, dataSource, userPayload, pubSub);
|
|
28900
29895
|
}
|
|
28901
29896
|
|
|
28902
|
-
@Mutation(() =>
|
|
28903
|
-
async
|
|
28904
|
-
const key = new CompositeKey([{FieldName: '
|
|
28905
|
-
return this.DeleteRecord('
|
|
29897
|
+
@Mutation(() => AIAgentLearningCycle_)
|
|
29898
|
+
async DeleteAIAgentLearningCycle(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSource, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29899
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
29900
|
+
return this.DeleteRecord('AIAgent Learning Cycles', key, options, dataSource, userPayload, pubSub);
|
|
28906
29901
|
}
|
|
28907
29902
|
|
|
28908
29903
|
}
|