@memberjunction/server 2.28.0 → 2.29.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.
@@ -1,6 +1,7 @@
1
1
  import { AppContext } from '../types.js';
2
2
  export declare class RunQueryResultType {
3
3
  QueryID: string;
4
+ QueryName: string;
4
5
  Success: boolean;
5
6
  Results: string;
6
7
  RowCount: number;
@@ -9,5 +10,6 @@ export declare class RunQueryResultType {
9
10
  }
10
11
  export declare class ReportResolver {
11
12
  GetQueryData(QueryID: string, {}: AppContext): Promise<RunQueryResultType>;
13
+ GetQueryDataByName(QueryName: string, {}: AppContext): Promise<RunQueryResultType>;
12
14
  }
13
15
  //# sourceMappingURL=QueryResolver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryResolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/QueryResolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,qBACa,kBAAkB;IAE7B,OAAO,EAAE,MAAM,CAAC;IAGhB,OAAO,EAAE,OAAO,CAAC;IAGjB,OAAO,EAAE,MAAM,CAAC;IAGhB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,EAAE,MAAM,CAAC;IAGtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qBACa,cAAc;IAEnB,YAAY,CAA+B,OAAO,EAAE,MAAM,EAAS,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAYtH"}
1
+ {"version":3,"file":"QueryResolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/QueryResolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,qBACa,kBAAkB;IAE7B,OAAO,EAAE,MAAM,CAAC;IAGhB,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,EAAE,OAAO,CAAC;IAGjB,OAAO,EAAE,MAAM,CAAC;IAGhB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,EAAE,MAAM,CAAC;IAGtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,qBACa,cAAc;IAEnB,YAAY,CAA+B,OAAO,EAAE,MAAM,EAAS,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAe/G,kBAAkB,CAAiC,SAAS,EAAE,MAAM,EAAS,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAahI"}
@@ -14,6 +14,7 @@ import { RunQuery } from '@memberjunction/core';
14
14
  import { Arg, Ctx, Field, ObjectType, Query, Resolver } from 'type-graphql';
15
15
  let RunQueryResultType = class RunQueryResultType {
16
16
  QueryID;
17
+ QueryName;
17
18
  Success;
18
19
  Results;
19
20
  RowCount;
@@ -24,6 +25,10 @@ __decorate([
24
25
  Field(),
25
26
  __metadata("design:type", String)
26
27
  ], RunQueryResultType.prototype, "QueryID", void 0);
28
+ __decorate([
29
+ Field(),
30
+ __metadata("design:type", String)
31
+ ], RunQueryResultType.prototype, "QueryName", void 0);
27
32
  __decorate([
28
33
  Field(),
29
34
  __metadata("design:type", Boolean)
@@ -54,6 +59,20 @@ let ReportResolver = class ReportResolver {
54
59
  const result = await runQuery.RunQuery({ QueryID: QueryID });
55
60
  return {
56
61
  QueryID: QueryID,
62
+ QueryName: result.QueryName,
63
+ Success: result.Success,
64
+ Results: JSON.stringify(result.Results),
65
+ RowCount: result.RowCount,
66
+ ExecutionTime: result.ExecutionTime,
67
+ ErrorMessage: result.ErrorMessage,
68
+ };
69
+ }
70
+ async GetQueryDataByName(QueryName, {}) {
71
+ const runQuery = new RunQuery();
72
+ const result = await runQuery.RunQuery({ QueryName: QueryName });
73
+ return {
74
+ QueryID: result.QueryID,
75
+ QueryName: QueryName,
57
76
  Success: result.Success,
58
77
  Results: JSON.stringify(result.Results),
59
78
  RowCount: result.RowCount,
@@ -70,6 +89,14 @@ __decorate([
70
89
  __metadata("design:paramtypes", [String, Object]),
71
90
  __metadata("design:returntype", Promise)
72
91
  ], ReportResolver.prototype, "GetQueryData", null);
92
+ __decorate([
93
+ Query(() => RunQueryResultType),
94
+ __param(0, Arg('QueryName', () => String)),
95
+ __param(1, Ctx()),
96
+ __metadata("design:type", Function),
97
+ __metadata("design:paramtypes", [String, Object]),
98
+ __metadata("design:returntype", Promise)
99
+ ], ReportResolver.prototype, "GetQueryDataByName", null);
73
100
  ReportResolver = __decorate([
74
101
  Resolver(RunQueryResultType)
75
102
  ], ReportResolver);
@@ -1 +1 @@
1
- {"version":3,"file":"QueryResolver.js","sourceRoot":"","sources":["../../src/resolvers/QueryResolver.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAO,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI1E,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE7B,OAAO,CAAS;IAGhB,OAAO,CAAU;IAGjB,OAAO,CAAS;IAGhB,QAAQ,CAAS;IAGjB,aAAa,CAAS;IAGtB,YAAY,CAAS;CACtB,CAAA;AAhBC;IADC,KAAK,EAAE;;mDACQ;AAGhB;IADC,KAAK,EAAE;;mDACS;AAGjB;IADC,KAAK,EAAE;;mDACQ;AAGhB;IADC,KAAK,EAAE;;oDACS;AAGjB;IADC,KAAK,EAAE;;yDACc;AAGtB;IADC,KAAK,EAAE;;wDACa;AAjBV,kBAAkB;IAD9B,UAAU,EAAE;GACA,kBAAkB,CAkB9B;;AAGM,IAAM,cAAc,GAApB,MAAM,cAAc;IAEnB,AAAN,KAAK,CAAC,YAAY,CAA+B,OAAe,EAAS,EAAc;QACrF,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE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AAM,CAAC,CAAA;IAAmB,WAAA,GAAG,EAAE,CAAA;;;;kDAYvE;AAGK;IADL,KAAK,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC;IACN,WAAA,GAAG,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;IAAqB,WAAA,GAAG,EAAE,CAAA;;;;wDAYjF;AA7BU,cAAc;IAD1B,QAAQ,CAAC,kBAAkB,CAAC;GAChB,cAAc,CA8B1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/server",
3
- "version": "2.28.0",
3
+ "version": "2.29.0",
4
4
  "description": "MemberJunction: This project provides API access via GraphQL to the common data store.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./src/index.ts",
@@ -22,27 +22,27 @@
22
22
  "dependencies": {
23
23
  "@apollo/server": "^4.9.1",
24
24
  "@graphql-tools/utils": "^10.0.1",
25
- "@memberjunction/actions": "2.28.0",
26
- "@memberjunction/ai": "2.28.0",
27
- "@memberjunction/ai-mistral": "2.28.0",
28
- "@memberjunction/ai-openai": "2.28.0",
29
- "@memberjunction/ai-vectors-pinecone": "2.28.0",
30
- "@memberjunction/aiengine": "2.28.0",
31
- "@memberjunction/core": "2.28.0",
32
- "@memberjunction/core-actions": "2.28.0",
33
- "@memberjunction/core-entities": "2.28.0",
34
- "@memberjunction/data-context": "2.28.0",
35
- "@memberjunction/data-context-server": "2.28.0",
36
- "@memberjunction/doc-utils": "2.28.0",
37
- "@memberjunction/entity-communications-server": "2.28.0",
38
- "@memberjunction/external-change-detection": "2.28.0",
39
- "@memberjunction/global": "2.28.0",
40
- "@memberjunction/graphql-dataprovider": "2.28.0",
41
- "@memberjunction/queue": "2.28.0",
42
- "@memberjunction/skip-types": "2.28.0",
43
- "@memberjunction/sqlserver-dataprovider": "2.28.0",
44
- "@memberjunction/storage": "2.28.0",
45
- "@memberjunction/templates": "2.28.0",
25
+ "@memberjunction/actions": "2.29.0",
26
+ "@memberjunction/ai": "2.29.0",
27
+ "@memberjunction/ai-mistral": "2.29.0",
28
+ "@memberjunction/ai-openai": "2.29.0",
29
+ "@memberjunction/ai-vectors-pinecone": "2.29.0",
30
+ "@memberjunction/aiengine": "2.29.0",
31
+ "@memberjunction/core": "2.29.0",
32
+ "@memberjunction/core-actions": "2.29.0",
33
+ "@memberjunction/core-entities": "2.29.0",
34
+ "@memberjunction/data-context": "2.29.0",
35
+ "@memberjunction/data-context-server": "2.29.0",
36
+ "@memberjunction/doc-utils": "2.29.0",
37
+ "@memberjunction/entity-communications-server": "2.29.0",
38
+ "@memberjunction/external-change-detection": "2.29.0",
39
+ "@memberjunction/global": "2.29.0",
40
+ "@memberjunction/graphql-dataprovider": "2.29.0",
41
+ "@memberjunction/queue": "2.29.0",
42
+ "@memberjunction/skip-types": "2.29.0",
43
+ "@memberjunction/sqlserver-dataprovider": "2.29.0",
44
+ "@memberjunction/storage": "2.29.0",
45
+ "@memberjunction/templates": "2.29.0",
46
46
  "@types/cors": "^2.8.13",
47
47
  "@types/jsonwebtoken": "9.0.6",
48
48
  "@types/node": "20.14.2",
@@ -19,7 +19,7 @@ import { mj_core_schema } from '../config.js';
19
19
 
20
20
 
21
21
 
22
- import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, AIAgentModelEntity, AIAgentNoteTypeEntity, flyway_schema_historyEntity, AIAgentEntity, AIAgentNoteEntity, AIAgentActionEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, AIAgentRequestEntity, QueryEntityEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, AIAgentLearningCycleEntity } from '@memberjunction/core-entities';
22
+ 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, AIAgentRequestEntity, QueryEntityEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, AIAgentLearningCycleEntity } from '@memberjunction/core-entities';
23
23
 
24
24
 
25
25
  //****************************************************************************
@@ -1001,218 +1001,6 @@ export class AIAgentNoteTypeResolver extends ResolverBase {
1001
1001
 
1002
1002
  }
1003
1003
 
1004
- //****************************************************************************
1005
- // ENTITY CLASS for Flyway _schema _histories
1006
- //****************************************************************************
1007
- @ObjectType()
1008
- export class flyway_schema_history_ {
1009
- @Field(() => Int)
1010
- installed_rank: number;
1011
-
1012
- @Field({nullable: true})
1013
- @MaxLength(100)
1014
- version?: string;
1015
-
1016
- @Field({nullable: true})
1017
- @MaxLength(400)
1018
- description?: string;
1019
-
1020
- @Field()
1021
- @MaxLength(40)
1022
- type: string;
1023
-
1024
- @Field()
1025
- @MaxLength(2000)
1026
- script: string;
1027
-
1028
- @Field(() => Int, {nullable: true})
1029
- checksum?: number;
1030
-
1031
- @Field()
1032
- @MaxLength(200)
1033
- installed_by: string;
1034
-
1035
- @Field()
1036
- @MaxLength(8)
1037
- installed_on: Date;
1038
-
1039
- @Field(() => Int)
1040
- execution_time: number;
1041
-
1042
- @Field(() => Boolean)
1043
- success: boolean;
1044
-
1045
- @Field()
1046
- @MaxLength(10)
1047
- _mj__CreatedAt: Date;
1048
-
1049
- @Field()
1050
- @MaxLength(10)
1051
- _mj__UpdatedAt: Date;
1052
-
1053
- }
1054
-
1055
- //****************************************************************************
1056
- // INPUT TYPE for Flyway _schema _histories
1057
- //****************************************************************************
1058
- @InputType()
1059
- export class Createflyway_schema_historyInput {
1060
- @Field(() => Int)
1061
- installed_rank: number;
1062
-
1063
- @Field({ nullable: true })
1064
- version: string | null;
1065
-
1066
- @Field({ nullable: true })
1067
- description: string | null;
1068
-
1069
- @Field({ nullable: true })
1070
- type?: string;
1071
-
1072
- @Field({ nullable: true })
1073
- script?: string;
1074
-
1075
- @Field(() => Int, { nullable: true })
1076
- checksum: number | null;
1077
-
1078
- @Field({ nullable: true })
1079
- installed_by?: string;
1080
-
1081
- @Field({ nullable: true })
1082
- installed_on?: Date;
1083
-
1084
- @Field(() => Int, { nullable: true })
1085
- execution_time?: number;
1086
-
1087
- @Field(() => Boolean, { nullable: true })
1088
- success?: boolean;
1089
- }
1090
-
1091
-
1092
- //****************************************************************************
1093
- // INPUT TYPE for Flyway _schema _histories
1094
- //****************************************************************************
1095
- @InputType()
1096
- export class Updateflyway_schema_historyInput {
1097
- @Field(() => Int)
1098
- installed_rank: number;
1099
-
1100
- @Field({ nullable: true })
1101
- version?: string | null;
1102
-
1103
- @Field({ nullable: true })
1104
- description?: string | null;
1105
-
1106
- @Field({ nullable: true })
1107
- type?: string;
1108
-
1109
- @Field({ nullable: true })
1110
- script?: string;
1111
-
1112
- @Field(() => Int, { nullable: true })
1113
- checksum?: number | null;
1114
-
1115
- @Field({ nullable: true })
1116
- installed_by?: string;
1117
-
1118
- @Field({ nullable: true })
1119
- installed_on?: Date;
1120
-
1121
- @Field(() => Int, { nullable: true })
1122
- execution_time?: number;
1123
-
1124
- @Field(() => Boolean, { nullable: true })
1125
- success?: boolean;
1126
-
1127
- @Field(() => [KeyValuePairInput], { nullable: true })
1128
- OldValues___?: KeyValuePairInput[];
1129
- }
1130
-
1131
- //****************************************************************************
1132
- // RESOLVER for Flyway _schema _histories
1133
- //****************************************************************************
1134
- @ObjectType()
1135
- export class Runflyway_schema_historyViewResult {
1136
- @Field(() => [flyway_schema_history_])
1137
- Results: flyway_schema_history_[];
1138
-
1139
- @Field(() => String, {nullable: true})
1140
- UserViewRunID?: string;
1141
-
1142
- @Field(() => Int, {nullable: true})
1143
- RowCount: number;
1144
-
1145
- @Field(() => Int, {nullable: true})
1146
- TotalRowCount: number;
1147
-
1148
- @Field(() => Int, {nullable: true})
1149
- ExecutionTime: number;
1150
-
1151
- @Field({nullable: true})
1152
- ErrorMessage?: string;
1153
-
1154
- @Field(() => Boolean, {nullable: false})
1155
- Success: boolean;
1156
- }
1157
-
1158
- @Resolver(flyway_schema_history_)
1159
- export class flyway_schema_historyResolver extends ResolverBase {
1160
- @Query(() => Runflyway_schema_historyViewResult)
1161
- async Runflyway_schema_historyViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
1162
- const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
1163
- return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
1164
- }
1165
-
1166
- @Query(() => Runflyway_schema_historyViewResult)
1167
- async Runflyway_schema_historyViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
1168
- const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
1169
- return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
1170
- }
1171
-
1172
- @Query(() => Runflyway_schema_historyViewResult)
1173
- async Runflyway_schema_historyDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
1174
- const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
1175
- input.EntityName = 'Flyway _schema _histories';
1176
- return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
1177
- }
1178
- @Query(() => flyway_schema_history_, { nullable: true })
1179
- async flyway_schema_history(@Arg('installed_rank', () => Int) installed_rank: number, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<flyway_schema_history_ | null> {
1180
- this.CheckUserReadPermissions('Flyway _schema _histories', userPayload);
1181
- const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
1182
- 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');
1183
- const result = this.MapFieldNamesToCodeNames('Flyway _schema _histories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}))
1184
- return result;
1185
- }
1186
-
1187
- @Mutation(() => flyway_schema_history_)
1188
- async Createflyway_schema_history(
1189
- @Arg('input', () => Createflyway_schema_historyInput) input: Createflyway_schema_historyInput,
1190
- @Ctx() { dataSources, userPayload }: AppContext,
1191
- @PubSub() pubSub: PubSubEngine
1192
- ) {
1193
- const dataSource = GetReadWriteDataSource(dataSources);
1194
- return this.CreateRecord('Flyway _schema _histories', input, dataSource, userPayload, pubSub)
1195
- }
1196
-
1197
- @Mutation(() => flyway_schema_history_)
1198
- async Updateflyway_schema_history(
1199
- @Arg('input', () => Updateflyway_schema_historyInput) input: Updateflyway_schema_historyInput,
1200
- @Ctx() { dataSources, userPayload }: AppContext,
1201
- @PubSub() pubSub: PubSubEngine
1202
- ) {
1203
- const dataSource = GetReadWriteDataSource(dataSources);
1204
- return this.UpdateRecord('Flyway _schema _histories', input, dataSource, userPayload, pubSub);
1205
- }
1206
-
1207
- @Mutation(() => flyway_schema_history_)
1208
- async Deleteflyway_schema_history(@Arg('installed_rank', () => Int) installed_rank: number, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
1209
- const dataSource = GetReadWriteDataSource(dataSources);
1210
- const key = new CompositeKey([{FieldName: 'installed_rank', Value: installed_rank}]);
1211
- return this.DeleteRecord('Flyway _schema _histories', key, options, dataSource, userPayload, pubSub);
1212
- }
1213
-
1214
- }
1215
-
1216
1004
  //****************************************************************************
1217
1005
  // ENTITY CLASS for AI Agents
1218
1006
  //****************************************************************************
@@ -4733,6 +4521,22 @@ export class EntityField_ {
4733
4521
  @MaxLength(20)
4734
4522
  ValuesToPackWithSchema: string;
4735
4523
 
4524
+ @Field({nullable: true, description: `Contains the name of the generated field validation function, if it exists, null otherwise`})
4525
+ @MaxLength(510)
4526
+ GeneratedValidationFunctionName?: string;
4527
+
4528
+ @Field({nullable: true, description: `Contains a description for business users of what the validation function for this field does, if it exists`})
4529
+ GeneratedValidationFunctionDescription?: string;
4530
+
4531
+ @Field({nullable: true, description: `Contains the generated code for the field validation function, if it exists, null otherwise.`})
4532
+ GeneratedValidationFunctionCode?: string;
4533
+
4534
+ @Field({nullable: true, description: `If a generated validation function was generated previously, this stores the text from the source CHECK constraint in the database. This is stored so that regeneration of the validation function will only occur when the source CHECK constraint changes.`})
4535
+ GeneratedValidationFunctionCheckConstraint?: string;
4536
+
4537
+ @Field({nullable: true})
4538
+ FieldCodeName?: string;
4539
+
4736
4540
  @Field()
4737
4541
  @MaxLength(510)
4738
4542
  Entity: string;
@@ -4873,6 +4677,18 @@ export class CreateEntityFieldInput {
4873
4677
 
4874
4678
  @Field({ nullable: true })
4875
4679
  ValuesToPackWithSchema?: string;
4680
+
4681
+ @Field({ nullable: true })
4682
+ GeneratedValidationFunctionName: string | null;
4683
+
4684
+ @Field({ nullable: true })
4685
+ GeneratedValidationFunctionDescription: string | null;
4686
+
4687
+ @Field({ nullable: true })
4688
+ GeneratedValidationFunctionCode: string | null;
4689
+
4690
+ @Field({ nullable: true })
4691
+ GeneratedValidationFunctionCheckConstraint: string | null;
4876
4692
  }
4877
4693
 
4878
4694
 
@@ -4971,6 +4787,18 @@ export class UpdateEntityFieldInput {
4971
4787
  @Field({ nullable: true })
4972
4788
  ValuesToPackWithSchema?: string;
4973
4789
 
4790
+ @Field({ nullable: true })
4791
+ GeneratedValidationFunctionName?: string | null;
4792
+
4793
+ @Field({ nullable: true })
4794
+ GeneratedValidationFunctionDescription?: string | null;
4795
+
4796
+ @Field({ nullable: true })
4797
+ GeneratedValidationFunctionCode?: string | null;
4798
+
4799
+ @Field({ nullable: true })
4800
+ GeneratedValidationFunctionCheckConstraint?: string | null;
4801
+
4974
4802
  @Field(() => [KeyValuePairInput], { nullable: true })
4975
4803
  OldValues___?: KeyValuePairInput[];
4976
4804
  }
@@ -6288,15 +6116,15 @@ export class User_ {
6288
6116
  @Field(() => [UserFavorite_])
6289
6117
  UserFavorites_UserIDArray: UserFavorite_[]; // Link to UserFavorites
6290
6118
 
6119
+ @Field(() => [ResourceLink_])
6120
+ ResourceLinks_UserIDArray: ResourceLink_[]; // Link to ResourceLinks
6121
+
6291
6122
  @Field(() => [ListCategory_])
6292
6123
  ListCategories_UserIDArray: ListCategory_[]; // Link to ListCategories
6293
6124
 
6294
6125
  @Field(() => [ScheduledAction_])
6295
6126
  ScheduledActions_CreatedByUserIDArray: ScheduledAction_[]; // Link to ScheduledActions
6296
6127
 
6297
- @Field(() => [ResourceLink_])
6298
- ResourceLinks_UserIDArray: ResourceLink_[]; // Link to ResourceLinks
6299
-
6300
6128
  @Field(() => [AIAgentRequest_])
6301
6129
  AIAgentRequests_ResponseByUserIDArray: AIAgentRequest_[]; // Link to AIAgentRequests
6302
6130
 
@@ -6734,6 +6562,15 @@ export class UserResolverBase extends ResolverBase {
6734
6562
  return result;
6735
6563
  }
6736
6564
 
6565
+ @FieldResolver(() => [ResourceLink_])
6566
+ async ResourceLinks_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
6567
+ this.CheckUserReadPermissions('Resource Links', userPayload);
6568
+ const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
6569
+ const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
6570
+ const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL));
6571
+ return result;
6572
+ }
6573
+
6737
6574
  @FieldResolver(() => [ListCategory_])
6738
6575
  async ListCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
6739
6576
  this.CheckUserReadPermissions('List Categories', userPayload);
@@ -6752,15 +6589,6 @@ export class UserResolverBase extends ResolverBase {
6752
6589
  return result;
6753
6590
  }
6754
6591
 
6755
- @FieldResolver(() => [ResourceLink_])
6756
- async ResourceLinks_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
6757
- this.CheckUserReadPermissions('Resource Links', userPayload);
6758
- const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
6759
- const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause('Resource Links', userPayload, EntityPermissionType.Read, 'AND');
6760
- const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', await dataSource.query(sSQL));
6761
- return result;
6762
- }
6763
-
6764
6592
  @FieldResolver(() => [AIAgentRequest_])
6765
6593
  async AIAgentRequests_ResponseByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
6766
6594
  this.CheckUserReadPermissions('AI Agent Requests', userPayload);
@@ -25251,6 +25079,12 @@ export class CommunicationProvider_ {
25251
25079
  @Field(() => Boolean, {description: `Whether or not the provider supports sending messages at a specific time`})
25252
25080
  SupportsScheduledSending: boolean;
25253
25081
 
25082
+ @Field(() => Boolean, {description: `Whether or not the provider supports forwarding messages to another recipient `})
25083
+ SupportsForwarding: boolean;
25084
+
25085
+ @Field(() => Boolean, {description: `Whether or not the provider supports replying to messages`})
25086
+ SupportsReplying: boolean;
25087
+
25254
25088
  @Field(() => [CommunicationLog_])
25255
25089
  CommunicationLogs_CommunicationProviderIDArray: CommunicationLog_[]; // Link to CommunicationLogs
25256
25090
 
@@ -25281,6 +25115,12 @@ export class CreateCommunicationProviderInput {
25281
25115
 
25282
25116
  @Field(() => Boolean, { nullable: true })
25283
25117
  SupportsScheduledSending?: boolean;
25118
+
25119
+ @Field(() => Boolean, { nullable: true })
25120
+ SupportsForwarding?: boolean;
25121
+
25122
+ @Field(() => Boolean, { nullable: true })
25123
+ SupportsReplying?: boolean;
25284
25124
  }
25285
25125
 
25286
25126
 
@@ -25310,6 +25150,12 @@ export class UpdateCommunicationProviderInput {
25310
25150
  @Field(() => Boolean, { nullable: true })
25311
25151
  SupportsScheduledSending?: boolean;
25312
25152
 
25153
+ @Field(() => Boolean, { nullable: true })
25154
+ SupportsForwarding?: boolean;
25155
+
25156
+ @Field(() => Boolean, { nullable: true })
25157
+ SupportsReplying?: boolean;
25158
+
25313
25159
  @Field(() => [KeyValuePairInput], { nullable: true })
25314
25160
  OldValues___?: KeyValuePairInput[];
25315
25161
  }
@@ -8,6 +8,9 @@ export class RunQueryResultType {
8
8
  @Field()
9
9
  QueryID: string;
10
10
 
11
+ @Field()
12
+ QueryName: string;
13
+
11
14
  @Field()
12
15
  Success: boolean;
13
16
 
@@ -32,6 +35,22 @@ export class ReportResolver {
32
35
  const result = await runQuery.RunQuery({ QueryID: QueryID });
33
36
  return {
34
37
  QueryID: QueryID,
38
+ QueryName: result.QueryName,
39
+ Success: result.Success,
40
+ Results: JSON.stringify(result.Results),
41
+ RowCount: result.RowCount,
42
+ ExecutionTime: result.ExecutionTime,
43
+ ErrorMessage: result.ErrorMessage,
44
+ };
45
+ }
46
+
47
+ @Query(() => RunQueryResultType)
48
+ async GetQueryDataByName(@Arg('QueryName', () => String) QueryName: string, @Ctx() {}: AppContext): Promise<RunQueryResultType> {
49
+ const runQuery = new RunQuery();
50
+ const result = await runQuery.RunQuery({ QueryName: QueryName });
51
+ return {
52
+ QueryID: result.QueryID,
53
+ QueryName: QueryName,
35
54
  Success: result.Success,
36
55
  Results: JSON.stringify(result.Results),
37
56
  RowCount: result.RowCount,