@memberjunction/server 2.84.0 → 2.86.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 +333 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +2091 -0
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/resolvers/AskSkipResolver.d.ts.map +1 -1
- package/dist/resolvers/AskSkipResolver.js +12 -0
- package/dist/resolvers/AskSkipResolver.js.map +1 -1
- package/dist/resolvers/CreateQueryResolver.d.ts +0 -1
- package/dist/resolvers/CreateQueryResolver.d.ts.map +1 -1
- package/dist/resolvers/CreateQueryResolver.js +1 -7
- package/dist/resolvers/CreateQueryResolver.js.map +1 -1
- package/package.json +39 -35
- package/src/generated/generated.ts +1332 -1
- package/src/index.ts +8 -0
- package/src/resolvers/AskSkipResolver.ts +13 -0
- package/src/resolvers/CreateQueryResolver.ts +1 -5
|
@@ -19,7 +19,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, AIAgentNoteTypeEntity, AIAgentRunEntity, AIVendorEntity, AIConfigurationEntity, AIAgentEntity, AIAgentStepEntity, AIModelCostEntity, AIPromptModelEntity, AIAgentTypeEntity, AIAgentNoteEntity, AIAgentActionEntity, AIModelPriceTypeEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, DashboardUserStateEntity, ArtifactTypeEntity, AIVendorTypeEntity, ConversationArtifactEntity, AIAgentPromptEntity, DashboardUserPreferenceEntity, QueryParameterEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, AIPromptRunEntity, AIAgentRunStepEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity } from '@memberjunction/core-entities';
|
|
22
|
+
import { ScheduledActionEntity, ScheduledActionParamEntity, ExplorerNavigationItemEntity, GeneratedCodeCategoryEntity, AIAgentModelEntity, ComponentRegistryEntity, AIAgentNoteTypeEntity, ComponentDependencyEntity, AIAgentRunEntity, AIVendorEntity, AIConfigurationEntity, AIAgentEntity, AIAgentStepEntity, AIModelCostEntity, AIPromptModelEntity, AIAgentTypeEntity, AIAgentNoteEntity, AIAgentActionEntity, AIModelPriceTypeEntity, AIPromptEntity, AIResultCacheEntity, AIPromptCategoryEntity, AIPromptTypeEntity, CompanyEntity, EmployeeEntity, UserFavoriteEntity, EmployeeCompanyIntegrationEntity, EmployeeRoleEntity, EmployeeSkillEntity, RoleEntity, SkillEntity, IntegrationURLFormatEntity, IntegrationEntity, CompanyIntegrationEntity, EntityFieldEntity, EntityEntity, UserEntity, EntityRelationshipEntity, UserRecordLogEntity, UserViewEntity, CompanyIntegrationRunEntity, CompanyIntegrationRunDetailEntity, ErrorLogEntity, ApplicationEntity, ApplicationEntityEntity, EntityPermissionEntity, UserApplicationEntityEntity, UserApplicationEntity, CompanyIntegrationRunAPILogEntity, ListEntity, ListDetailEntity, UserViewRunEntity, UserViewRunDetailEntity, WorkflowRunEntity, WorkflowEntity, WorkflowEngineEntity, RecordChangeEntity, UserRoleEntity, RowLevelSecurityFilterEntity, AuditLogEntity, AuthorizationEntity, AuthorizationRoleEntity, AuditLogTypeEntity, EntityFieldValueEntity, AIModelEntity, AIActionEntity, AIModelActionEntity, EntityAIActionEntity, AIModelTypeEntity, QueueTypeEntity, QueueEntity, QueueTaskEntity, DashboardEntity, OutputTriggerTypeEntity, OutputFormatTypeEntity, OutputDeliveryTypeEntity, ReportEntity, ReportSnapshotEntity, ResourceTypeEntity, TagEntity, TaggedItemEntity, WorkspaceEntity, WorkspaceItemEntity, DatasetEntity, DatasetItemEntity, ConversationDetailEntity, ConversationEntity, UserNotificationEntity, SchemaInfoEntity, CompanyIntegrationRecordMapEntity, RecordMergeLogEntity, RecordMergeDeletionLogEntity, QueryFieldEntity, QueryCategoryEntity, QueryEntity, QueryPermissionEntity, VectorIndexEntity, EntityDocumentTypeEntity, EntityDocumentRunEntity, VectorDatabaseEntity, EntityRecordDocumentEntity, EntityDocumentEntity, DataContextItemEntity, DataContextEntity, UserViewCategoryEntity, DashboardCategoryEntity, ReportCategoryEntity, FileStorageProviderEntity, FileEntity, FileCategoryEntity, FileEntityRecordLinkEntity, VersionInstallationEntity, DuplicateRunDetailMatchEntity, EntityDocumentSettingEntity, EntitySettingEntity, DuplicateRunEntity, DuplicateRunDetailEntity, ApplicationSettingEntity, ActionCategoryEntity, EntityActionEntity, EntityActionInvocationEntity, ActionAuthorizationEntity, EntityActionInvocationTypeEntity, ActionEntity, EntityActionFilterEntity, ActionFilterEntity, ActionContextTypeEntity, ActionResultCodeEntity, ActionContextEntity, ActionExecutionLogEntity, ActionParamEntity, ActionLibraryEntity, LibraryEntity, ListCategoryEntity, CommunicationProviderEntity, CommunicationRunEntity, CommunicationProviderMessageTypeEntity, CommunicationLogEntity, CommunicationBaseMessageTypeEntity, TemplateEntity, TemplateCategoryEntity, TemplateContentEntity, TemplateParamEntity, TemplateContentTypeEntity, RecommendationEntity, RecommendationProviderEntity, RecommendationRunEntity, RecommendationItemEntity, EntityCommunicationMessageTypeEntity, EntityCommunicationFieldEntity, RecordChangeReplayRunEntity, LibraryItemEntity, EntityRelationshipDisplayComponentEntity, EntityActionParamEntity, ResourcePermissionEntity, ResourceLinkEntity, ConversationArtifactVersionEntity, AIAgentRequestEntity, AIModelVendorEntity, AIVendorTypeDefinitionEntity, ReportUserStateEntity, QueryEntityEntity, DashboardUserStateEntity, ComponentEntity, ArtifactTypeEntity, AIVendorTypeEntity, ConversationArtifactEntity, AIAgentPromptEntity, ComponentLibraryEntity, DashboardUserPreferenceEntity, QueryParameterEntity, AIAgentRelationshipEntity, ComponentLibraryLinkEntity, ContentProcessRunEntity, ContentSourceEntity, ContentSourceParamEntity, ContentSourceTypeEntity, ContentSourceTypeParamEntity, ContentTypeEntity, ContentTypeAttributeEntity, ContentFileTypeEntity, ContentItemEntity, ContentItemAttributeEntity, ContentItemTagEntity, GeneratedCodeEntity, AIPromptRunEntity, AIAgentRunStepEntity, ConversationArtifactPermissionEntity, AIModelPriceUnitTypeEntity, AIAgentStepPathEntity, AIAgentLearningCycleEntity, ReportVersionEntity, AIConfigurationParamEntity } from '@memberjunction/core-entities';
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
//****************************************************************************
|
|
@@ -1058,6 +1058,207 @@ export class AIAgentModelResolver extends ResolverBase {
|
|
|
1058
1058
|
|
|
1059
1059
|
}
|
|
1060
1060
|
|
|
1061
|
+
//****************************************************************************
|
|
1062
|
+
// ENTITY CLASS for MJ: Component Registries
|
|
1063
|
+
//****************************************************************************
|
|
1064
|
+
@ObjectType({ description: `Registry catalog for component sources, similar to NPM registry but supporting multiple sources` })
|
|
1065
|
+
export class ComponentRegistry_ {
|
|
1066
|
+
@Field({description: `Primary key for the component registry`})
|
|
1067
|
+
@MaxLength(16)
|
|
1068
|
+
ID: string;
|
|
1069
|
+
|
|
1070
|
+
@Field({description: `Name of the registry (e.g., MemberJunction Registry, NPM, Internal Registry)`})
|
|
1071
|
+
@MaxLength(510)
|
|
1072
|
+
Name: string;
|
|
1073
|
+
|
|
1074
|
+
@Field({nullable: true, description: `Description of the registry and its purpose`})
|
|
1075
|
+
Description?: string;
|
|
1076
|
+
|
|
1077
|
+
@Field({nullable: true, description: `Registry endpoint URI (e.g., https://registry.memberjunction.org)`})
|
|
1078
|
+
@MaxLength(1000)
|
|
1079
|
+
URI?: string;
|
|
1080
|
+
|
|
1081
|
+
@Field({nullable: true, description: `Type of registry: public, private, or internal`})
|
|
1082
|
+
@MaxLength(100)
|
|
1083
|
+
Type?: string;
|
|
1084
|
+
|
|
1085
|
+
@Field({nullable: true, description: `API version supported by the registry for compatibility`})
|
|
1086
|
+
@MaxLength(100)
|
|
1087
|
+
APIVersion?: string;
|
|
1088
|
+
|
|
1089
|
+
@Field({nullable: true, description: `Current status of the registry: active, deprecated, or offline`})
|
|
1090
|
+
@MaxLength(100)
|
|
1091
|
+
Status?: string;
|
|
1092
|
+
|
|
1093
|
+
@Field()
|
|
1094
|
+
@MaxLength(10)
|
|
1095
|
+
_mj__CreatedAt: Date;
|
|
1096
|
+
|
|
1097
|
+
@Field()
|
|
1098
|
+
@MaxLength(10)
|
|
1099
|
+
_mj__UpdatedAt: Date;
|
|
1100
|
+
|
|
1101
|
+
@Field(() => [Component_])
|
|
1102
|
+
MJ_Components_SourceRegistryIDArray: Component_[]; // Link to MJ_Components
|
|
1103
|
+
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
//****************************************************************************
|
|
1107
|
+
// INPUT TYPE for MJ: Component Registries
|
|
1108
|
+
//****************************************************************************
|
|
1109
|
+
@InputType()
|
|
1110
|
+
export class CreateComponentRegistryInput {
|
|
1111
|
+
@Field({ nullable: true })
|
|
1112
|
+
ID?: string;
|
|
1113
|
+
|
|
1114
|
+
@Field({ nullable: true })
|
|
1115
|
+
Name?: string;
|
|
1116
|
+
|
|
1117
|
+
@Field({ nullable: true })
|
|
1118
|
+
Description: string | null;
|
|
1119
|
+
|
|
1120
|
+
@Field({ nullable: true })
|
|
1121
|
+
URI: string | null;
|
|
1122
|
+
|
|
1123
|
+
@Field({ nullable: true })
|
|
1124
|
+
Type: string | null;
|
|
1125
|
+
|
|
1126
|
+
@Field({ nullable: true })
|
|
1127
|
+
APIVersion: string | null;
|
|
1128
|
+
|
|
1129
|
+
@Field({ nullable: true })
|
|
1130
|
+
Status: string | null;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
//****************************************************************************
|
|
1135
|
+
// INPUT TYPE for MJ: Component Registries
|
|
1136
|
+
//****************************************************************************
|
|
1137
|
+
@InputType()
|
|
1138
|
+
export class UpdateComponentRegistryInput {
|
|
1139
|
+
@Field()
|
|
1140
|
+
ID: string;
|
|
1141
|
+
|
|
1142
|
+
@Field({ nullable: true })
|
|
1143
|
+
Name?: string;
|
|
1144
|
+
|
|
1145
|
+
@Field({ nullable: true })
|
|
1146
|
+
Description?: string | null;
|
|
1147
|
+
|
|
1148
|
+
@Field({ nullable: true })
|
|
1149
|
+
URI?: string | null;
|
|
1150
|
+
|
|
1151
|
+
@Field({ nullable: true })
|
|
1152
|
+
Type?: string | null;
|
|
1153
|
+
|
|
1154
|
+
@Field({ nullable: true })
|
|
1155
|
+
APIVersion?: string | null;
|
|
1156
|
+
|
|
1157
|
+
@Field({ nullable: true })
|
|
1158
|
+
Status?: string | null;
|
|
1159
|
+
|
|
1160
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
1161
|
+
OldValues___?: KeyValuePairInput[];
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
//****************************************************************************
|
|
1165
|
+
// RESOLVER for MJ: Component Registries
|
|
1166
|
+
//****************************************************************************
|
|
1167
|
+
@ObjectType()
|
|
1168
|
+
export class RunComponentRegistryViewResult {
|
|
1169
|
+
@Field(() => [ComponentRegistry_])
|
|
1170
|
+
Results: ComponentRegistry_[];
|
|
1171
|
+
|
|
1172
|
+
@Field(() => String, {nullable: true})
|
|
1173
|
+
UserViewRunID?: string;
|
|
1174
|
+
|
|
1175
|
+
@Field(() => Int, {nullable: true})
|
|
1176
|
+
RowCount: number;
|
|
1177
|
+
|
|
1178
|
+
@Field(() => Int, {nullable: true})
|
|
1179
|
+
TotalRowCount: number;
|
|
1180
|
+
|
|
1181
|
+
@Field(() => Int, {nullable: true})
|
|
1182
|
+
ExecutionTime: number;
|
|
1183
|
+
|
|
1184
|
+
@Field({nullable: true})
|
|
1185
|
+
ErrorMessage?: string;
|
|
1186
|
+
|
|
1187
|
+
@Field(() => Boolean, {nullable: false})
|
|
1188
|
+
Success: boolean;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
@Resolver(ComponentRegistry_)
|
|
1192
|
+
export class ComponentRegistryResolver extends ResolverBase {
|
|
1193
|
+
@Query(() => RunComponentRegistryViewResult)
|
|
1194
|
+
async RunComponentRegistryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1195
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1196
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
@Query(() => RunComponentRegistryViewResult)
|
|
1200
|
+
async RunComponentRegistryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1201
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1202
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
@Query(() => RunComponentRegistryViewResult)
|
|
1206
|
+
async RunComponentRegistryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1207
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1208
|
+
input.EntityName = 'MJ: Component Registries';
|
|
1209
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
1210
|
+
}
|
|
1211
|
+
@Query(() => ComponentRegistry_, { nullable: true })
|
|
1212
|
+
async ComponentRegistry(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ComponentRegistry_ | null> {
|
|
1213
|
+
this.CheckUserReadPermissions('MJ: Component Registries', userPayload);
|
|
1214
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1215
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1216
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponentRegistries] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Registries', userPayload, EntityPermissionType.Read, 'AND');
|
|
1217
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
1218
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Component Registries', rows && rows.length > 0 ? rows[0] : {})
|
|
1219
|
+
return result;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
@FieldResolver(() => [Component_])
|
|
1223
|
+
async MJ_Components_SourceRegistryIDArray(@Root() componentregistry_: ComponentRegistry_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1224
|
+
this.CheckUserReadPermissions('MJ: Components', userPayload);
|
|
1225
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1226
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1227
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponents] WHERE [SourceRegistryID]='${componentregistry_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Components', userPayload, EntityPermissionType.Read, 'AND');
|
|
1228
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
1229
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Components', rows);
|
|
1230
|
+
return result;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
@Mutation(() => ComponentRegistry_)
|
|
1234
|
+
async CreateComponentRegistry(
|
|
1235
|
+
@Arg('input', () => CreateComponentRegistryInput) input: CreateComponentRegistryInput,
|
|
1236
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
1237
|
+
@PubSub() pubSub: PubSubEngine
|
|
1238
|
+
) {
|
|
1239
|
+
const provider = GetReadWriteProvider(providers);
|
|
1240
|
+
return this.CreateRecord('MJ: Component Registries', input, provider, userPayload, pubSub)
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
@Mutation(() => ComponentRegistry_)
|
|
1244
|
+
async UpdateComponentRegistry(
|
|
1245
|
+
@Arg('input', () => UpdateComponentRegistryInput) input: UpdateComponentRegistryInput,
|
|
1246
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
1247
|
+
@PubSub() pubSub: PubSubEngine
|
|
1248
|
+
) {
|
|
1249
|
+
const provider = GetReadWriteProvider(providers);
|
|
1250
|
+
return this.UpdateRecord('MJ: Component Registries', input, provider, userPayload, pubSub);
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
@Mutation(() => ComponentRegistry_)
|
|
1254
|
+
async DeleteComponentRegistry(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1255
|
+
const provider = GetReadWriteProvider(providers);
|
|
1256
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
1257
|
+
return this.DeleteRecord('MJ: Component Registries', key, options, provider, userPayload, pubSub);
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1061
1262
|
//****************************************************************************
|
|
1062
1263
|
// ENTITY CLASS for AI Agent Note Types
|
|
1063
1264
|
//****************************************************************************
|
|
@@ -1219,6 +1420,162 @@ export class AIAgentNoteTypeResolver extends ResolverBase {
|
|
|
1219
1420
|
|
|
1220
1421
|
}
|
|
1221
1422
|
|
|
1423
|
+
//****************************************************************************
|
|
1424
|
+
// ENTITY CLASS for MJ: Component Dependencies
|
|
1425
|
+
//****************************************************************************
|
|
1426
|
+
@ObjectType({ description: `Tracks component-to-component dependencies for composition` })
|
|
1427
|
+
export class ComponentDependency_ {
|
|
1428
|
+
@Field({description: `Primary key for component dependency`})
|
|
1429
|
+
@MaxLength(16)
|
|
1430
|
+
ID: string;
|
|
1431
|
+
|
|
1432
|
+
@Field({description: `Foreign key to parent Component that has the dependency`})
|
|
1433
|
+
@MaxLength(16)
|
|
1434
|
+
ComponentID: string;
|
|
1435
|
+
|
|
1436
|
+
@Field({description: `Foreign key to the Component that is depended upon`})
|
|
1437
|
+
@MaxLength(16)
|
|
1438
|
+
DependencyComponentID: string;
|
|
1439
|
+
|
|
1440
|
+
@Field()
|
|
1441
|
+
@MaxLength(10)
|
|
1442
|
+
_mj__CreatedAt: Date;
|
|
1443
|
+
|
|
1444
|
+
@Field()
|
|
1445
|
+
@MaxLength(10)
|
|
1446
|
+
_mj__UpdatedAt: Date;
|
|
1447
|
+
|
|
1448
|
+
@Field()
|
|
1449
|
+
@MaxLength(1000)
|
|
1450
|
+
Component: string;
|
|
1451
|
+
|
|
1452
|
+
@Field()
|
|
1453
|
+
@MaxLength(1000)
|
|
1454
|
+
DependencyComponent: string;
|
|
1455
|
+
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
//****************************************************************************
|
|
1459
|
+
// INPUT TYPE for MJ: Component Dependencies
|
|
1460
|
+
//****************************************************************************
|
|
1461
|
+
@InputType()
|
|
1462
|
+
export class CreateComponentDependencyInput {
|
|
1463
|
+
@Field({ nullable: true })
|
|
1464
|
+
ID?: string;
|
|
1465
|
+
|
|
1466
|
+
@Field({ nullable: true })
|
|
1467
|
+
ComponentID?: string;
|
|
1468
|
+
|
|
1469
|
+
@Field({ nullable: true })
|
|
1470
|
+
DependencyComponentID?: string;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
//****************************************************************************
|
|
1475
|
+
// INPUT TYPE for MJ: Component Dependencies
|
|
1476
|
+
//****************************************************************************
|
|
1477
|
+
@InputType()
|
|
1478
|
+
export class UpdateComponentDependencyInput {
|
|
1479
|
+
@Field()
|
|
1480
|
+
ID: string;
|
|
1481
|
+
|
|
1482
|
+
@Field({ nullable: true })
|
|
1483
|
+
ComponentID?: string;
|
|
1484
|
+
|
|
1485
|
+
@Field({ nullable: true })
|
|
1486
|
+
DependencyComponentID?: string;
|
|
1487
|
+
|
|
1488
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
1489
|
+
OldValues___?: KeyValuePairInput[];
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
//****************************************************************************
|
|
1493
|
+
// RESOLVER for MJ: Component Dependencies
|
|
1494
|
+
//****************************************************************************
|
|
1495
|
+
@ObjectType()
|
|
1496
|
+
export class RunComponentDependencyViewResult {
|
|
1497
|
+
@Field(() => [ComponentDependency_])
|
|
1498
|
+
Results: ComponentDependency_[];
|
|
1499
|
+
|
|
1500
|
+
@Field(() => String, {nullable: true})
|
|
1501
|
+
UserViewRunID?: string;
|
|
1502
|
+
|
|
1503
|
+
@Field(() => Int, {nullable: true})
|
|
1504
|
+
RowCount: number;
|
|
1505
|
+
|
|
1506
|
+
@Field(() => Int, {nullable: true})
|
|
1507
|
+
TotalRowCount: number;
|
|
1508
|
+
|
|
1509
|
+
@Field(() => Int, {nullable: true})
|
|
1510
|
+
ExecutionTime: number;
|
|
1511
|
+
|
|
1512
|
+
@Field({nullable: true})
|
|
1513
|
+
ErrorMessage?: string;
|
|
1514
|
+
|
|
1515
|
+
@Field(() => Boolean, {nullable: false})
|
|
1516
|
+
Success: boolean;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
@Resolver(ComponentDependency_)
|
|
1520
|
+
export class ComponentDependencyResolver extends ResolverBase {
|
|
1521
|
+
@Query(() => RunComponentDependencyViewResult)
|
|
1522
|
+
async RunComponentDependencyViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1523
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1524
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
@Query(() => RunComponentDependencyViewResult)
|
|
1528
|
+
async RunComponentDependencyViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1529
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1530
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
@Query(() => RunComponentDependencyViewResult)
|
|
1534
|
+
async RunComponentDependencyDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1535
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1536
|
+
input.EntityName = 'MJ: Component Dependencies';
|
|
1537
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
1538
|
+
}
|
|
1539
|
+
@Query(() => ComponentDependency_, { nullable: true })
|
|
1540
|
+
async ComponentDependency(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ComponentDependency_ | null> {
|
|
1541
|
+
this.CheckUserReadPermissions('MJ: Component Dependencies', userPayload);
|
|
1542
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1543
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1544
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponentDependencies] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Dependencies', userPayload, EntityPermissionType.Read, 'AND');
|
|
1545
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
1546
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Component Dependencies', rows && rows.length > 0 ? rows[0] : {})
|
|
1547
|
+
return result;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
@Mutation(() => ComponentDependency_)
|
|
1551
|
+
async CreateComponentDependency(
|
|
1552
|
+
@Arg('input', () => CreateComponentDependencyInput) input: CreateComponentDependencyInput,
|
|
1553
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
1554
|
+
@PubSub() pubSub: PubSubEngine
|
|
1555
|
+
) {
|
|
1556
|
+
const provider = GetReadWriteProvider(providers);
|
|
1557
|
+
return this.CreateRecord('MJ: Component Dependencies', input, provider, userPayload, pubSub)
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
@Mutation(() => ComponentDependency_)
|
|
1561
|
+
async UpdateComponentDependency(
|
|
1562
|
+
@Arg('input', () => UpdateComponentDependencyInput) input: UpdateComponentDependencyInput,
|
|
1563
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
1564
|
+
@PubSub() pubSub: PubSubEngine
|
|
1565
|
+
) {
|
|
1566
|
+
const provider = GetReadWriteProvider(providers);
|
|
1567
|
+
return this.UpdateRecord('MJ: Component Dependencies', input, provider, userPayload, pubSub);
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
@Mutation(() => ComponentDependency_)
|
|
1571
|
+
async DeleteComponentDependency(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1572
|
+
const provider = GetReadWriteProvider(providers);
|
|
1573
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
1574
|
+
return this.DeleteRecord('MJ: Component Dependencies', key, options, provider, userPayload, pubSub);
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1222
1579
|
//****************************************************************************
|
|
1223
1580
|
// ENTITY CLASS for MJ: AI Agent Runs
|
|
1224
1581
|
//****************************************************************************
|
|
@@ -2419,6 +2776,9 @@ if this limit is exceeded.`})
|
|
|
2419
2776
|
@Field(() => [AIAgentStep_])
|
|
2420
2777
|
MJ_AIAgentSteps_AgentIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
2421
2778
|
|
|
2779
|
+
@Field(() => [AIAgentRelationship_])
|
|
2780
|
+
MJ_AIAgentRelationships_AgentIDArray: AIAgentRelationship_[]; // Link to MJ_AIAgentRelationships
|
|
2781
|
+
|
|
2422
2782
|
@Field(() => [AIAgentNote_])
|
|
2423
2783
|
AIAgentNotes_AgentIDArray: AIAgentNote_[]; // Link to AIAgentNotes
|
|
2424
2784
|
|
|
@@ -2431,6 +2791,9 @@ if this limit is exceeded.`})
|
|
|
2431
2791
|
@Field(() => [AIAgentStep_])
|
|
2432
2792
|
MJ_AIAgentSteps_SubAgentIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
2433
2793
|
|
|
2794
|
+
@Field(() => [AIAgentRelationship_])
|
|
2795
|
+
MJ_AIAgentRelationships_SubAgentIDArray: AIAgentRelationship_[]; // Link to MJ_AIAgentRelationships
|
|
2796
|
+
|
|
2434
2797
|
@Field(() => [AIResultCache_])
|
|
2435
2798
|
AIResultCache_AgentIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
2436
2799
|
|
|
@@ -2775,6 +3138,17 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
2775
3138
|
return result;
|
|
2776
3139
|
}
|
|
2777
3140
|
|
|
3141
|
+
@FieldResolver(() => [AIAgentRelationship_])
|
|
3142
|
+
async MJ_AIAgentRelationships_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3143
|
+
this.CheckUserReadPermissions('MJ: AI Agent Relationships', userPayload);
|
|
3144
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3145
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3146
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRelationships] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
3147
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3148
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Relationships', rows);
|
|
3149
|
+
return result;
|
|
3150
|
+
}
|
|
3151
|
+
|
|
2778
3152
|
@FieldResolver(() => [AIAgentNote_])
|
|
2779
3153
|
async AIAgentNotes_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2780
3154
|
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
@@ -2819,6 +3193,17 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
2819
3193
|
return result;
|
|
2820
3194
|
}
|
|
2821
3195
|
|
|
3196
|
+
@FieldResolver(() => [AIAgentRelationship_])
|
|
3197
|
+
async MJ_AIAgentRelationships_SubAgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
3198
|
+
this.CheckUserReadPermissions('MJ: AI Agent Relationships', userPayload);
|
|
3199
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3200
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
3201
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRelationships] WHERE [SubAgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
3202
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
3203
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Relationships', rows);
|
|
3204
|
+
return result;
|
|
3205
|
+
}
|
|
3206
|
+
|
|
2822
3207
|
@FieldResolver(() => [AIResultCache_])
|
|
2823
3208
|
async AIResultCache_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2824
3209
|
this.CheckUserReadPermissions('AI Result Cache', userPayload);
|
|
@@ -16897,6 +17282,9 @@ export class AIModel_ {
|
|
|
16897
17282
|
@Field(() => [AIAgentRun_])
|
|
16898
17283
|
MJ_AIAgentRuns_OverrideModelIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
16899
17284
|
|
|
17285
|
+
@Field(() => [Query_])
|
|
17286
|
+
Queries_EmbeddingModelIDArray: Query_[]; // Link to Queries
|
|
17287
|
+
|
|
16900
17288
|
}
|
|
16901
17289
|
|
|
16902
17290
|
//****************************************************************************
|
|
@@ -17192,6 +17580,17 @@ export class AIModelResolver extends ResolverBase {
|
|
|
17192
17580
|
return result;
|
|
17193
17581
|
}
|
|
17194
17582
|
|
|
17583
|
+
@FieldResolver(() => [Query_])
|
|
17584
|
+
async Queries_EmbeddingModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17585
|
+
this.CheckUserReadPermissions('Queries', userPayload);
|
|
17586
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17587
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
17588
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueries] WHERE [EmbeddingModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Queries', userPayload, EntityPermissionType.Read, 'AND');
|
|
17589
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
17590
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Queries', rows);
|
|
17591
|
+
return result;
|
|
17592
|
+
}
|
|
17593
|
+
|
|
17195
17594
|
@Mutation(() => AIModel_)
|
|
17196
17595
|
async CreateAIModel(
|
|
17197
17596
|
@Arg('input', () => CreateAIModelInput) input: CreateAIModelInput,
|
|
@@ -23597,10 +23996,21 @@ export class Query_ {
|
|
|
23597
23996
|
@Field(() => Int, {nullable: true, description: `Maximum number of cached result sets for this query. NULL uses default size limit.`})
|
|
23598
23997
|
CacheMaxSize?: number;
|
|
23599
23998
|
|
|
23999
|
+
@Field({nullable: true, description: `Optional JSON-serialized embedding vector for the query, used for similarity search and query analysis`})
|
|
24000
|
+
EmbeddingVector?: string;
|
|
24001
|
+
|
|
24002
|
+
@Field({nullable: true, description: `The AI Model used to generate the embedding vector for this query. Required for vector similarity comparisons.`})
|
|
24003
|
+
@MaxLength(16)
|
|
24004
|
+
EmbeddingModelID?: string;
|
|
24005
|
+
|
|
23600
24006
|
@Field({nullable: true})
|
|
23601
24007
|
@MaxLength(100)
|
|
23602
24008
|
Category?: string;
|
|
23603
24009
|
|
|
24010
|
+
@Field({nullable: true})
|
|
24011
|
+
@MaxLength(100)
|
|
24012
|
+
EmbeddingModel?: string;
|
|
24013
|
+
|
|
23604
24014
|
@Field(() => [QueryField_])
|
|
23605
24015
|
QueryFields_QueryIDArray: QueryField_[]; // Link to QueryFields
|
|
23606
24016
|
|
|
@@ -23673,6 +24083,12 @@ export class CreateQueryInput {
|
|
|
23673
24083
|
|
|
23674
24084
|
@Field(() => Int, { nullable: true })
|
|
23675
24085
|
CacheMaxSize: number | null;
|
|
24086
|
+
|
|
24087
|
+
@Field({ nullable: true })
|
|
24088
|
+
EmbeddingVector: string | null;
|
|
24089
|
+
|
|
24090
|
+
@Field({ nullable: true })
|
|
24091
|
+
EmbeddingModelID: string | null;
|
|
23676
24092
|
}
|
|
23677
24093
|
|
|
23678
24094
|
|
|
@@ -23732,6 +24148,12 @@ export class UpdateQueryInput {
|
|
|
23732
24148
|
@Field(() => Int, { nullable: true })
|
|
23733
24149
|
CacheMaxSize?: number | null;
|
|
23734
24150
|
|
|
24151
|
+
@Field({ nullable: true })
|
|
24152
|
+
EmbeddingVector?: string | null;
|
|
24153
|
+
|
|
24154
|
+
@Field({ nullable: true })
|
|
24155
|
+
EmbeddingModelID?: string | null;
|
|
24156
|
+
|
|
23735
24157
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
23736
24158
|
OldValues___?: KeyValuePairInput[];
|
|
23737
24159
|
}
|
|
@@ -37438,6 +37860,362 @@ export class DashboardUserStateResolver extends ResolverBase {
|
|
|
37438
37860
|
|
|
37439
37861
|
}
|
|
37440
37862
|
|
|
37863
|
+
//****************************************************************************
|
|
37864
|
+
// ENTITY CLASS for MJ: Components
|
|
37865
|
+
//****************************************************************************
|
|
37866
|
+
@ObjectType({ description: `Main catalog of reusable components with versioning and registry support` })
|
|
37867
|
+
export class Component_ {
|
|
37868
|
+
@Field({description: `Immutable UUID that remains the same across all systems`})
|
|
37869
|
+
@MaxLength(16)
|
|
37870
|
+
ID: string;
|
|
37871
|
+
|
|
37872
|
+
@Field({nullable: true, description: `Hierarchical namespace path (e.g., dashboards/sales for local, @memberjunction/dashboards/financial for external)`})
|
|
37873
|
+
Namespace?: string;
|
|
37874
|
+
|
|
37875
|
+
@Field({description: `Component name within the namespace (e.g., revenue-tracker)`})
|
|
37876
|
+
@MaxLength(1000)
|
|
37877
|
+
Name: string;
|
|
37878
|
+
|
|
37879
|
+
@Field({description: `Semantic version number (e.g., 1.0.0, 1.2.3-beta)`})
|
|
37880
|
+
@MaxLength(100)
|
|
37881
|
+
Version: string;
|
|
37882
|
+
|
|
37883
|
+
@Field(() => Int, {description: `Numeric sequence for sorting versions`})
|
|
37884
|
+
VersionSequence: number;
|
|
37885
|
+
|
|
37886
|
+
@Field({nullable: true, description: `User-friendly display title for the component`})
|
|
37887
|
+
@MaxLength(2000)
|
|
37888
|
+
Title?: string;
|
|
37889
|
+
|
|
37890
|
+
@Field({nullable: true, description: `Detailed description of the component functionality`})
|
|
37891
|
+
Description?: string;
|
|
37892
|
+
|
|
37893
|
+
@Field({nullable: true, description: `Component type: report, dashboard, form, table, chart, navigation, search, widget, utility, or other`})
|
|
37894
|
+
@MaxLength(510)
|
|
37895
|
+
Type?: string;
|
|
37896
|
+
|
|
37897
|
+
@Field({nullable: true, description: `Publication status: draft, published, or deprecated`})
|
|
37898
|
+
@MaxLength(100)
|
|
37899
|
+
Status?: string;
|
|
37900
|
+
|
|
37901
|
+
@Field({nullable: true, description: `Name of the component developer or author`})
|
|
37902
|
+
@MaxLength(510)
|
|
37903
|
+
DeveloperName?: string;
|
|
37904
|
+
|
|
37905
|
+
@Field({nullable: true, description: `Contact email for the component developer`})
|
|
37906
|
+
@MaxLength(510)
|
|
37907
|
+
DeveloperEmail?: string;
|
|
37908
|
+
|
|
37909
|
+
@Field({nullable: true, description: `Organization name of the component developer`})
|
|
37910
|
+
@MaxLength(510)
|
|
37911
|
+
DeveloperOrganization?: string;
|
|
37912
|
+
|
|
37913
|
+
@Field({nullable: true, description: `Foreign key to ComponentRegistry - NULL for local components, populated for replicated ones`})
|
|
37914
|
+
@MaxLength(16)
|
|
37915
|
+
SourceRegistryID?: string;
|
|
37916
|
+
|
|
37917
|
+
@Field({nullable: true, description: `Timestamp when the component was replicated from external registry (NULL for local components)`})
|
|
37918
|
+
@MaxLength(10)
|
|
37919
|
+
ReplicatedAt?: Date;
|
|
37920
|
+
|
|
37921
|
+
@Field({nullable: true, description: `Last synchronization timestamp with the source registry`})
|
|
37922
|
+
@MaxLength(10)
|
|
37923
|
+
LastSyncedAt?: Date;
|
|
37924
|
+
|
|
37925
|
+
@Field()
|
|
37926
|
+
@MaxLength(10)
|
|
37927
|
+
_mj__CreatedAt: Date;
|
|
37928
|
+
|
|
37929
|
+
@Field()
|
|
37930
|
+
@MaxLength(10)
|
|
37931
|
+
_mj__UpdatedAt: Date;
|
|
37932
|
+
|
|
37933
|
+
@Field({description: `Complete JSON specification object for the component`})
|
|
37934
|
+
Specification: string;
|
|
37935
|
+
|
|
37936
|
+
@Field({nullable: true, description: `Functional requirements describing what the component should accomplish`})
|
|
37937
|
+
FunctionalRequirements?: string;
|
|
37938
|
+
|
|
37939
|
+
@Field({nullable: true, description: `Technical design describing how the component is implemented`})
|
|
37940
|
+
TechnicalDesign?: string;
|
|
37941
|
+
|
|
37942
|
+
@Field({nullable: true, description: `Vector embedding of the functional requirements for similarity search`})
|
|
37943
|
+
FunctionalRequirementsVector?: string;
|
|
37944
|
+
|
|
37945
|
+
@Field({nullable: true, description: `Vector embedding of the technical design for similarity search`})
|
|
37946
|
+
TechnicalDesignVector?: string;
|
|
37947
|
+
|
|
37948
|
+
@Field({nullable: true})
|
|
37949
|
+
@MaxLength(510)
|
|
37950
|
+
SourceRegistry?: string;
|
|
37951
|
+
|
|
37952
|
+
@Field(() => [ComponentDependency_])
|
|
37953
|
+
MJ_ComponentDependencies_DependencyComponentIDArray: ComponentDependency_[]; // Link to MJ_ComponentDependencies
|
|
37954
|
+
|
|
37955
|
+
@Field(() => [ComponentLibraryLink_])
|
|
37956
|
+
MJ_ComponentLibraryLinks_ComponentIDArray: ComponentLibraryLink_[]; // Link to MJ_ComponentLibraryLinks
|
|
37957
|
+
|
|
37958
|
+
@Field(() => [ComponentDependency_])
|
|
37959
|
+
MJ_ComponentDependencies_ComponentIDArray: ComponentDependency_[]; // Link to MJ_ComponentDependencies
|
|
37960
|
+
|
|
37961
|
+
}
|
|
37962
|
+
|
|
37963
|
+
//****************************************************************************
|
|
37964
|
+
// INPUT TYPE for MJ: Components
|
|
37965
|
+
//****************************************************************************
|
|
37966
|
+
@InputType()
|
|
37967
|
+
export class CreateComponentInput {
|
|
37968
|
+
@Field({ nullable: true })
|
|
37969
|
+
ID?: string;
|
|
37970
|
+
|
|
37971
|
+
@Field({ nullable: true })
|
|
37972
|
+
Namespace: string | null;
|
|
37973
|
+
|
|
37974
|
+
@Field({ nullable: true })
|
|
37975
|
+
Name?: string;
|
|
37976
|
+
|
|
37977
|
+
@Field({ nullable: true })
|
|
37978
|
+
Version?: string;
|
|
37979
|
+
|
|
37980
|
+
@Field(() => Int, { nullable: true })
|
|
37981
|
+
VersionSequence?: number;
|
|
37982
|
+
|
|
37983
|
+
@Field({ nullable: true })
|
|
37984
|
+
Title: string | null;
|
|
37985
|
+
|
|
37986
|
+
@Field({ nullable: true })
|
|
37987
|
+
Description: string | null;
|
|
37988
|
+
|
|
37989
|
+
@Field({ nullable: true })
|
|
37990
|
+
Type: string | null;
|
|
37991
|
+
|
|
37992
|
+
@Field({ nullable: true })
|
|
37993
|
+
Status: string | null;
|
|
37994
|
+
|
|
37995
|
+
@Field({ nullable: true })
|
|
37996
|
+
DeveloperName: string | null;
|
|
37997
|
+
|
|
37998
|
+
@Field({ nullable: true })
|
|
37999
|
+
DeveloperEmail: string | null;
|
|
38000
|
+
|
|
38001
|
+
@Field({ nullable: true })
|
|
38002
|
+
DeveloperOrganization: string | null;
|
|
38003
|
+
|
|
38004
|
+
@Field({ nullable: true })
|
|
38005
|
+
SourceRegistryID: string | null;
|
|
38006
|
+
|
|
38007
|
+
@Field({ nullable: true })
|
|
38008
|
+
ReplicatedAt: Date | null;
|
|
38009
|
+
|
|
38010
|
+
@Field({ nullable: true })
|
|
38011
|
+
LastSyncedAt: Date | null;
|
|
38012
|
+
|
|
38013
|
+
@Field({ nullable: true })
|
|
38014
|
+
Specification?: string;
|
|
38015
|
+
|
|
38016
|
+
@Field({ nullable: true })
|
|
38017
|
+
FunctionalRequirements: string | null;
|
|
38018
|
+
|
|
38019
|
+
@Field({ nullable: true })
|
|
38020
|
+
TechnicalDesign: string | null;
|
|
38021
|
+
|
|
38022
|
+
@Field({ nullable: true })
|
|
38023
|
+
FunctionalRequirementsVector: string | null;
|
|
38024
|
+
|
|
38025
|
+
@Field({ nullable: true })
|
|
38026
|
+
TechnicalDesignVector: string | null;
|
|
38027
|
+
}
|
|
38028
|
+
|
|
38029
|
+
|
|
38030
|
+
//****************************************************************************
|
|
38031
|
+
// INPUT TYPE for MJ: Components
|
|
38032
|
+
//****************************************************************************
|
|
38033
|
+
@InputType()
|
|
38034
|
+
export class UpdateComponentInput {
|
|
38035
|
+
@Field()
|
|
38036
|
+
ID: string;
|
|
38037
|
+
|
|
38038
|
+
@Field({ nullable: true })
|
|
38039
|
+
Namespace?: string | null;
|
|
38040
|
+
|
|
38041
|
+
@Field({ nullable: true })
|
|
38042
|
+
Name?: string;
|
|
38043
|
+
|
|
38044
|
+
@Field({ nullable: true })
|
|
38045
|
+
Version?: string;
|
|
38046
|
+
|
|
38047
|
+
@Field(() => Int, { nullable: true })
|
|
38048
|
+
VersionSequence?: number;
|
|
38049
|
+
|
|
38050
|
+
@Field({ nullable: true })
|
|
38051
|
+
Title?: string | null;
|
|
38052
|
+
|
|
38053
|
+
@Field({ nullable: true })
|
|
38054
|
+
Description?: string | null;
|
|
38055
|
+
|
|
38056
|
+
@Field({ nullable: true })
|
|
38057
|
+
Type?: string | null;
|
|
38058
|
+
|
|
38059
|
+
@Field({ nullable: true })
|
|
38060
|
+
Status?: string | null;
|
|
38061
|
+
|
|
38062
|
+
@Field({ nullable: true })
|
|
38063
|
+
DeveloperName?: string | null;
|
|
38064
|
+
|
|
38065
|
+
@Field({ nullable: true })
|
|
38066
|
+
DeveloperEmail?: string | null;
|
|
38067
|
+
|
|
38068
|
+
@Field({ nullable: true })
|
|
38069
|
+
DeveloperOrganization?: string | null;
|
|
38070
|
+
|
|
38071
|
+
@Field({ nullable: true })
|
|
38072
|
+
SourceRegistryID?: string | null;
|
|
38073
|
+
|
|
38074
|
+
@Field({ nullable: true })
|
|
38075
|
+
ReplicatedAt?: Date | null;
|
|
38076
|
+
|
|
38077
|
+
@Field({ nullable: true })
|
|
38078
|
+
LastSyncedAt?: Date | null;
|
|
38079
|
+
|
|
38080
|
+
@Field({ nullable: true })
|
|
38081
|
+
Specification?: string;
|
|
38082
|
+
|
|
38083
|
+
@Field({ nullable: true })
|
|
38084
|
+
FunctionalRequirements?: string | null;
|
|
38085
|
+
|
|
38086
|
+
@Field({ nullable: true })
|
|
38087
|
+
TechnicalDesign?: string | null;
|
|
38088
|
+
|
|
38089
|
+
@Field({ nullable: true })
|
|
38090
|
+
FunctionalRequirementsVector?: string | null;
|
|
38091
|
+
|
|
38092
|
+
@Field({ nullable: true })
|
|
38093
|
+
TechnicalDesignVector?: string | null;
|
|
38094
|
+
|
|
38095
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
38096
|
+
OldValues___?: KeyValuePairInput[];
|
|
38097
|
+
}
|
|
38098
|
+
|
|
38099
|
+
//****************************************************************************
|
|
38100
|
+
// RESOLVER for MJ: Components
|
|
38101
|
+
//****************************************************************************
|
|
38102
|
+
@ObjectType()
|
|
38103
|
+
export class RunComponentViewResult {
|
|
38104
|
+
@Field(() => [Component_])
|
|
38105
|
+
Results: Component_[];
|
|
38106
|
+
|
|
38107
|
+
@Field(() => String, {nullable: true})
|
|
38108
|
+
UserViewRunID?: string;
|
|
38109
|
+
|
|
38110
|
+
@Field(() => Int, {nullable: true})
|
|
38111
|
+
RowCount: number;
|
|
38112
|
+
|
|
38113
|
+
@Field(() => Int, {nullable: true})
|
|
38114
|
+
TotalRowCount: number;
|
|
38115
|
+
|
|
38116
|
+
@Field(() => Int, {nullable: true})
|
|
38117
|
+
ExecutionTime: number;
|
|
38118
|
+
|
|
38119
|
+
@Field({nullable: true})
|
|
38120
|
+
ErrorMessage?: string;
|
|
38121
|
+
|
|
38122
|
+
@Field(() => Boolean, {nullable: false})
|
|
38123
|
+
Success: boolean;
|
|
38124
|
+
}
|
|
38125
|
+
|
|
38126
|
+
@Resolver(Component_)
|
|
38127
|
+
export class ComponentResolver extends ResolverBase {
|
|
38128
|
+
@Query(() => RunComponentViewResult)
|
|
38129
|
+
async RunComponentViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38130
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38131
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
38132
|
+
}
|
|
38133
|
+
|
|
38134
|
+
@Query(() => RunComponentViewResult)
|
|
38135
|
+
async RunComponentViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38136
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38137
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
38138
|
+
}
|
|
38139
|
+
|
|
38140
|
+
@Query(() => RunComponentViewResult)
|
|
38141
|
+
async RunComponentDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38142
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38143
|
+
input.EntityName = 'MJ: Components';
|
|
38144
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
38145
|
+
}
|
|
38146
|
+
@Query(() => Component_, { nullable: true })
|
|
38147
|
+
async Component(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<Component_ | null> {
|
|
38148
|
+
this.CheckUserReadPermissions('MJ: Components', userPayload);
|
|
38149
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38150
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
38151
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponents] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Components', userPayload, EntityPermissionType.Read, 'AND');
|
|
38152
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
38153
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Components', rows && rows.length > 0 ? rows[0] : {})
|
|
38154
|
+
return result;
|
|
38155
|
+
}
|
|
38156
|
+
|
|
38157
|
+
@FieldResolver(() => [ComponentDependency_])
|
|
38158
|
+
async MJ_ComponentDependencies_DependencyComponentIDArray(@Root() component_: Component_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38159
|
+
this.CheckUserReadPermissions('MJ: Component Dependencies', userPayload);
|
|
38160
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38161
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
38162
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponentDependencies] WHERE [DependencyComponentID]='${component_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Dependencies', userPayload, EntityPermissionType.Read, 'AND');
|
|
38163
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
38164
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Component Dependencies', rows);
|
|
38165
|
+
return result;
|
|
38166
|
+
}
|
|
38167
|
+
|
|
38168
|
+
@FieldResolver(() => [ComponentLibraryLink_])
|
|
38169
|
+
async MJ_ComponentLibraryLinks_ComponentIDArray(@Root() component_: Component_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38170
|
+
this.CheckUserReadPermissions('MJ: Component Library Links', userPayload);
|
|
38171
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38172
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
38173
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponentLibraryLinks] WHERE [ComponentID]='${component_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Library Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
38174
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
38175
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Component Library Links', rows);
|
|
38176
|
+
return result;
|
|
38177
|
+
}
|
|
38178
|
+
|
|
38179
|
+
@FieldResolver(() => [ComponentDependency_])
|
|
38180
|
+
async MJ_ComponentDependencies_ComponentIDArray(@Root() component_: Component_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38181
|
+
this.CheckUserReadPermissions('MJ: Component Dependencies', userPayload);
|
|
38182
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
38183
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
38184
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponentDependencies] WHERE [ComponentID]='${component_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Dependencies', userPayload, EntityPermissionType.Read, 'AND');
|
|
38185
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
38186
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Component Dependencies', rows);
|
|
38187
|
+
return result;
|
|
38188
|
+
}
|
|
38189
|
+
|
|
38190
|
+
@Mutation(() => Component_)
|
|
38191
|
+
async CreateComponent(
|
|
38192
|
+
@Arg('input', () => CreateComponentInput) input: CreateComponentInput,
|
|
38193
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
38194
|
+
@PubSub() pubSub: PubSubEngine
|
|
38195
|
+
) {
|
|
38196
|
+
const provider = GetReadWriteProvider(providers);
|
|
38197
|
+
return this.CreateRecord('MJ: Components', input, provider, userPayload, pubSub)
|
|
38198
|
+
}
|
|
38199
|
+
|
|
38200
|
+
@Mutation(() => Component_)
|
|
38201
|
+
async UpdateComponent(
|
|
38202
|
+
@Arg('input', () => UpdateComponentInput) input: UpdateComponentInput,
|
|
38203
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
38204
|
+
@PubSub() pubSub: PubSubEngine
|
|
38205
|
+
) {
|
|
38206
|
+
const provider = GetReadWriteProvider(providers);
|
|
38207
|
+
return this.UpdateRecord('MJ: Components', input, provider, userPayload, pubSub);
|
|
38208
|
+
}
|
|
38209
|
+
|
|
38210
|
+
@Mutation(() => Component_)
|
|
38211
|
+
async DeleteComponent(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
38212
|
+
const provider = GetReadWriteProvider(providers);
|
|
38213
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
38214
|
+
return this.DeleteRecord('MJ: Components', key, options, provider, userPayload, pubSub);
|
|
38215
|
+
}
|
|
38216
|
+
|
|
38217
|
+
}
|
|
38218
|
+
|
|
37441
38219
|
//****************************************************************************
|
|
37442
38220
|
// ENTITY CLASS for MJ: Artifact Types
|
|
37443
38221
|
//****************************************************************************
|
|
@@ -38246,6 +39024,227 @@ export class AIAgentPromptResolver extends ResolverBase {
|
|
|
38246
39024
|
|
|
38247
39025
|
}
|
|
38248
39026
|
|
|
39027
|
+
//****************************************************************************
|
|
39028
|
+
// ENTITY CLASS for MJ: Component Libraries
|
|
39029
|
+
//****************************************************************************
|
|
39030
|
+
@ObjectType({ description: `Catalog of third-party JavaScript libraries that components can depend on` })
|
|
39031
|
+
export class ComponentLibrary_ {
|
|
39032
|
+
@Field({description: `Primary key for the component library`})
|
|
39033
|
+
@MaxLength(16)
|
|
39034
|
+
ID: string;
|
|
39035
|
+
|
|
39036
|
+
@Field({description: `NPM-style package name (e.g., recharts, lodash, @memberjunction/lib-name)`})
|
|
39037
|
+
@MaxLength(1000)
|
|
39038
|
+
Name: string;
|
|
39039
|
+
|
|
39040
|
+
@Field({nullable: true, description: `User-friendly display name for the library`})
|
|
39041
|
+
@MaxLength(1000)
|
|
39042
|
+
DisplayName?: string;
|
|
39043
|
+
|
|
39044
|
+
@Field({nullable: true, description: `Library version number`})
|
|
39045
|
+
@MaxLength(200)
|
|
39046
|
+
Version?: string;
|
|
39047
|
+
|
|
39048
|
+
@Field({nullable: true, description: `Global variable name when loaded (e.g., _ for lodash, React for react)`})
|
|
39049
|
+
@MaxLength(510)
|
|
39050
|
+
GlobalVariable?: string;
|
|
39051
|
+
|
|
39052
|
+
@Field({nullable: true, description: `Library category: Core, Runtime, UI, Charting, Utility, or Other`})
|
|
39053
|
+
@MaxLength(200)
|
|
39054
|
+
Category?: string;
|
|
39055
|
+
|
|
39056
|
+
@Field({nullable: true, description: `CDN URL for loading the library JavaScript`})
|
|
39057
|
+
@MaxLength(2000)
|
|
39058
|
+
CDNUrl?: string;
|
|
39059
|
+
|
|
39060
|
+
@Field({nullable: true, description: `Optional CDN URL for loading library CSS`})
|
|
39061
|
+
@MaxLength(2000)
|
|
39062
|
+
CDNCssUrl?: string;
|
|
39063
|
+
|
|
39064
|
+
@Field({nullable: true, description: `Description of the library and its capabilities`})
|
|
39065
|
+
Description?: string;
|
|
39066
|
+
|
|
39067
|
+
@Field()
|
|
39068
|
+
@MaxLength(10)
|
|
39069
|
+
_mj__CreatedAt: Date;
|
|
39070
|
+
|
|
39071
|
+
@Field()
|
|
39072
|
+
@MaxLength(10)
|
|
39073
|
+
_mj__UpdatedAt: Date;
|
|
39074
|
+
|
|
39075
|
+
@Field(() => [ComponentLibraryLink_])
|
|
39076
|
+
MJ_ComponentLibraryLinks_LibraryIDArray: ComponentLibraryLink_[]; // Link to MJ_ComponentLibraryLinks
|
|
39077
|
+
|
|
39078
|
+
}
|
|
39079
|
+
|
|
39080
|
+
//****************************************************************************
|
|
39081
|
+
// INPUT TYPE for MJ: Component Libraries
|
|
39082
|
+
//****************************************************************************
|
|
39083
|
+
@InputType()
|
|
39084
|
+
export class CreateComponentLibraryInput {
|
|
39085
|
+
@Field({ nullable: true })
|
|
39086
|
+
ID?: string;
|
|
39087
|
+
|
|
39088
|
+
@Field({ nullable: true })
|
|
39089
|
+
Name?: string;
|
|
39090
|
+
|
|
39091
|
+
@Field({ nullable: true })
|
|
39092
|
+
DisplayName: string | null;
|
|
39093
|
+
|
|
39094
|
+
@Field({ nullable: true })
|
|
39095
|
+
Version: string | null;
|
|
39096
|
+
|
|
39097
|
+
@Field({ nullable: true })
|
|
39098
|
+
GlobalVariable: string | null;
|
|
39099
|
+
|
|
39100
|
+
@Field({ nullable: true })
|
|
39101
|
+
Category: string | null;
|
|
39102
|
+
|
|
39103
|
+
@Field({ nullable: true })
|
|
39104
|
+
CDNUrl: string | null;
|
|
39105
|
+
|
|
39106
|
+
@Field({ nullable: true })
|
|
39107
|
+
CDNCssUrl: string | null;
|
|
39108
|
+
|
|
39109
|
+
@Field({ nullable: true })
|
|
39110
|
+
Description: string | null;
|
|
39111
|
+
}
|
|
39112
|
+
|
|
39113
|
+
|
|
39114
|
+
//****************************************************************************
|
|
39115
|
+
// INPUT TYPE for MJ: Component Libraries
|
|
39116
|
+
//****************************************************************************
|
|
39117
|
+
@InputType()
|
|
39118
|
+
export class UpdateComponentLibraryInput {
|
|
39119
|
+
@Field()
|
|
39120
|
+
ID: string;
|
|
39121
|
+
|
|
39122
|
+
@Field({ nullable: true })
|
|
39123
|
+
Name?: string;
|
|
39124
|
+
|
|
39125
|
+
@Field({ nullable: true })
|
|
39126
|
+
DisplayName?: string | null;
|
|
39127
|
+
|
|
39128
|
+
@Field({ nullable: true })
|
|
39129
|
+
Version?: string | null;
|
|
39130
|
+
|
|
39131
|
+
@Field({ nullable: true })
|
|
39132
|
+
GlobalVariable?: string | null;
|
|
39133
|
+
|
|
39134
|
+
@Field({ nullable: true })
|
|
39135
|
+
Category?: string | null;
|
|
39136
|
+
|
|
39137
|
+
@Field({ nullable: true })
|
|
39138
|
+
CDNUrl?: string | null;
|
|
39139
|
+
|
|
39140
|
+
@Field({ nullable: true })
|
|
39141
|
+
CDNCssUrl?: string | null;
|
|
39142
|
+
|
|
39143
|
+
@Field({ nullable: true })
|
|
39144
|
+
Description?: string | null;
|
|
39145
|
+
|
|
39146
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
39147
|
+
OldValues___?: KeyValuePairInput[];
|
|
39148
|
+
}
|
|
39149
|
+
|
|
39150
|
+
//****************************************************************************
|
|
39151
|
+
// RESOLVER for MJ: Component Libraries
|
|
39152
|
+
//****************************************************************************
|
|
39153
|
+
@ObjectType()
|
|
39154
|
+
export class RunComponentLibraryViewResult {
|
|
39155
|
+
@Field(() => [ComponentLibrary_])
|
|
39156
|
+
Results: ComponentLibrary_[];
|
|
39157
|
+
|
|
39158
|
+
@Field(() => String, {nullable: true})
|
|
39159
|
+
UserViewRunID?: string;
|
|
39160
|
+
|
|
39161
|
+
@Field(() => Int, {nullable: true})
|
|
39162
|
+
RowCount: number;
|
|
39163
|
+
|
|
39164
|
+
@Field(() => Int, {nullable: true})
|
|
39165
|
+
TotalRowCount: number;
|
|
39166
|
+
|
|
39167
|
+
@Field(() => Int, {nullable: true})
|
|
39168
|
+
ExecutionTime: number;
|
|
39169
|
+
|
|
39170
|
+
@Field({nullable: true})
|
|
39171
|
+
ErrorMessage?: string;
|
|
39172
|
+
|
|
39173
|
+
@Field(() => Boolean, {nullable: false})
|
|
39174
|
+
Success: boolean;
|
|
39175
|
+
}
|
|
39176
|
+
|
|
39177
|
+
@Resolver(ComponentLibrary_)
|
|
39178
|
+
export class ComponentLibraryResolver extends ResolverBase {
|
|
39179
|
+
@Query(() => RunComponentLibraryViewResult)
|
|
39180
|
+
async RunComponentLibraryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39181
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39182
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
39183
|
+
}
|
|
39184
|
+
|
|
39185
|
+
@Query(() => RunComponentLibraryViewResult)
|
|
39186
|
+
async RunComponentLibraryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39187
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39188
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
39189
|
+
}
|
|
39190
|
+
|
|
39191
|
+
@Query(() => RunComponentLibraryViewResult)
|
|
39192
|
+
async RunComponentLibraryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39193
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39194
|
+
input.EntityName = 'MJ: Component Libraries';
|
|
39195
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
39196
|
+
}
|
|
39197
|
+
@Query(() => ComponentLibrary_, { nullable: true })
|
|
39198
|
+
async ComponentLibrary(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ComponentLibrary_ | null> {
|
|
39199
|
+
this.CheckUserReadPermissions('MJ: Component Libraries', userPayload);
|
|
39200
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39201
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
39202
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponentLibraries] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Libraries', userPayload, EntityPermissionType.Read, 'AND');
|
|
39203
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
39204
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Component Libraries', rows && rows.length > 0 ? rows[0] : {})
|
|
39205
|
+
return result;
|
|
39206
|
+
}
|
|
39207
|
+
|
|
39208
|
+
@FieldResolver(() => [ComponentLibraryLink_])
|
|
39209
|
+
async MJ_ComponentLibraryLinks_LibraryIDArray(@Root() componentlibrary_: ComponentLibrary_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39210
|
+
this.CheckUserReadPermissions('MJ: Component Library Links', userPayload);
|
|
39211
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39212
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
39213
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponentLibraryLinks] WHERE [LibraryID]='${componentlibrary_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Library Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
39214
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
39215
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Component Library Links', rows);
|
|
39216
|
+
return result;
|
|
39217
|
+
}
|
|
39218
|
+
|
|
39219
|
+
@Mutation(() => ComponentLibrary_)
|
|
39220
|
+
async CreateComponentLibrary(
|
|
39221
|
+
@Arg('input', () => CreateComponentLibraryInput) input: CreateComponentLibraryInput,
|
|
39222
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
39223
|
+
@PubSub() pubSub: PubSubEngine
|
|
39224
|
+
) {
|
|
39225
|
+
const provider = GetReadWriteProvider(providers);
|
|
39226
|
+
return this.CreateRecord('MJ: Component Libraries', input, provider, userPayload, pubSub)
|
|
39227
|
+
}
|
|
39228
|
+
|
|
39229
|
+
@Mutation(() => ComponentLibrary_)
|
|
39230
|
+
async UpdateComponentLibrary(
|
|
39231
|
+
@Arg('input', () => UpdateComponentLibraryInput) input: UpdateComponentLibraryInput,
|
|
39232
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
39233
|
+
@PubSub() pubSub: PubSubEngine
|
|
39234
|
+
) {
|
|
39235
|
+
const provider = GetReadWriteProvider(providers);
|
|
39236
|
+
return this.UpdateRecord('MJ: Component Libraries', input, provider, userPayload, pubSub);
|
|
39237
|
+
}
|
|
39238
|
+
|
|
39239
|
+
@Mutation(() => ComponentLibrary_)
|
|
39240
|
+
async DeleteComponentLibrary(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39241
|
+
const provider = GetReadWriteProvider(providers);
|
|
39242
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
39243
|
+
return this.DeleteRecord('MJ: Component Libraries', key, options, provider, userPayload, pubSub);
|
|
39244
|
+
}
|
|
39245
|
+
|
|
39246
|
+
}
|
|
39247
|
+
|
|
38249
39248
|
//****************************************************************************
|
|
38250
39249
|
// ENTITY CLASS for MJ: Dashboard User Preferences
|
|
38251
39250
|
//****************************************************************************
|
|
@@ -38661,6 +39660,338 @@ export class QueryParameterResolver extends ResolverBase {
|
|
|
38661
39660
|
|
|
38662
39661
|
}
|
|
38663
39662
|
|
|
39663
|
+
//****************************************************************************
|
|
39664
|
+
// ENTITY CLASS for MJ: AI Agent Relationships
|
|
39665
|
+
//****************************************************************************
|
|
39666
|
+
@ObjectType({ description: `Tracks relationships between AI agents for sub-agent orchestration` })
|
|
39667
|
+
export class AIAgentRelationship_ {
|
|
39668
|
+
@Field({description: `Primary key for AI agent relationships`})
|
|
39669
|
+
@MaxLength(16)
|
|
39670
|
+
ID: string;
|
|
39671
|
+
|
|
39672
|
+
@Field({description: `Foreign key to parent AIAgent that can invoke the sub-agent`})
|
|
39673
|
+
@MaxLength(16)
|
|
39674
|
+
AgentID: string;
|
|
39675
|
+
|
|
39676
|
+
@Field({description: `Foreign key to sub-agent AIAgent that can be invoked`})
|
|
39677
|
+
@MaxLength(16)
|
|
39678
|
+
SubAgentID: string;
|
|
39679
|
+
|
|
39680
|
+
@Field({description: `Status of the relationship: Pending (awaiting approval), Active (can invoke), or Revoked (no longer allowed)`})
|
|
39681
|
+
@MaxLength(100)
|
|
39682
|
+
Status: string;
|
|
39683
|
+
|
|
39684
|
+
@Field()
|
|
39685
|
+
@MaxLength(10)
|
|
39686
|
+
_mj__CreatedAt: Date;
|
|
39687
|
+
|
|
39688
|
+
@Field()
|
|
39689
|
+
@MaxLength(10)
|
|
39690
|
+
_mj__UpdatedAt: Date;
|
|
39691
|
+
|
|
39692
|
+
@Field({nullable: true})
|
|
39693
|
+
@MaxLength(510)
|
|
39694
|
+
Agent?: string;
|
|
39695
|
+
|
|
39696
|
+
@Field({nullable: true})
|
|
39697
|
+
@MaxLength(510)
|
|
39698
|
+
SubAgent?: string;
|
|
39699
|
+
|
|
39700
|
+
}
|
|
39701
|
+
|
|
39702
|
+
//****************************************************************************
|
|
39703
|
+
// INPUT TYPE for MJ: AI Agent Relationships
|
|
39704
|
+
//****************************************************************************
|
|
39705
|
+
@InputType()
|
|
39706
|
+
export class CreateAIAgentRelationshipInput {
|
|
39707
|
+
@Field({ nullable: true })
|
|
39708
|
+
ID?: string;
|
|
39709
|
+
|
|
39710
|
+
@Field({ nullable: true })
|
|
39711
|
+
AgentID?: string;
|
|
39712
|
+
|
|
39713
|
+
@Field({ nullable: true })
|
|
39714
|
+
SubAgentID?: string;
|
|
39715
|
+
|
|
39716
|
+
@Field({ nullable: true })
|
|
39717
|
+
Status?: string;
|
|
39718
|
+
}
|
|
39719
|
+
|
|
39720
|
+
|
|
39721
|
+
//****************************************************************************
|
|
39722
|
+
// INPUT TYPE for MJ: AI Agent Relationships
|
|
39723
|
+
//****************************************************************************
|
|
39724
|
+
@InputType()
|
|
39725
|
+
export class UpdateAIAgentRelationshipInput {
|
|
39726
|
+
@Field()
|
|
39727
|
+
ID: string;
|
|
39728
|
+
|
|
39729
|
+
@Field({ nullable: true })
|
|
39730
|
+
AgentID?: string;
|
|
39731
|
+
|
|
39732
|
+
@Field({ nullable: true })
|
|
39733
|
+
SubAgentID?: string;
|
|
39734
|
+
|
|
39735
|
+
@Field({ nullable: true })
|
|
39736
|
+
Status?: string;
|
|
39737
|
+
|
|
39738
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
39739
|
+
OldValues___?: KeyValuePairInput[];
|
|
39740
|
+
}
|
|
39741
|
+
|
|
39742
|
+
//****************************************************************************
|
|
39743
|
+
// RESOLVER for MJ: AI Agent Relationships
|
|
39744
|
+
//****************************************************************************
|
|
39745
|
+
@ObjectType()
|
|
39746
|
+
export class RunAIAgentRelationshipViewResult {
|
|
39747
|
+
@Field(() => [AIAgentRelationship_])
|
|
39748
|
+
Results: AIAgentRelationship_[];
|
|
39749
|
+
|
|
39750
|
+
@Field(() => String, {nullable: true})
|
|
39751
|
+
UserViewRunID?: string;
|
|
39752
|
+
|
|
39753
|
+
@Field(() => Int, {nullable: true})
|
|
39754
|
+
RowCount: number;
|
|
39755
|
+
|
|
39756
|
+
@Field(() => Int, {nullable: true})
|
|
39757
|
+
TotalRowCount: number;
|
|
39758
|
+
|
|
39759
|
+
@Field(() => Int, {nullable: true})
|
|
39760
|
+
ExecutionTime: number;
|
|
39761
|
+
|
|
39762
|
+
@Field({nullable: true})
|
|
39763
|
+
ErrorMessage?: string;
|
|
39764
|
+
|
|
39765
|
+
@Field(() => Boolean, {nullable: false})
|
|
39766
|
+
Success: boolean;
|
|
39767
|
+
}
|
|
39768
|
+
|
|
39769
|
+
@Resolver(AIAgentRelationship_)
|
|
39770
|
+
export class AIAgentRelationshipResolver extends ResolverBase {
|
|
39771
|
+
@Query(() => RunAIAgentRelationshipViewResult)
|
|
39772
|
+
async RunAIAgentRelationshipViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39773
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39774
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
39775
|
+
}
|
|
39776
|
+
|
|
39777
|
+
@Query(() => RunAIAgentRelationshipViewResult)
|
|
39778
|
+
async RunAIAgentRelationshipViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39779
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39780
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
39781
|
+
}
|
|
39782
|
+
|
|
39783
|
+
@Query(() => RunAIAgentRelationshipViewResult)
|
|
39784
|
+
async RunAIAgentRelationshipDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39785
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39786
|
+
input.EntityName = 'MJ: AI Agent Relationships';
|
|
39787
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
39788
|
+
}
|
|
39789
|
+
@Query(() => AIAgentRelationship_, { nullable: true })
|
|
39790
|
+
async AIAgentRelationship(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<AIAgentRelationship_ | null> {
|
|
39791
|
+
this.CheckUserReadPermissions('MJ: AI Agent Relationships', userPayload);
|
|
39792
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39793
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
39794
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRelationships] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
39795
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
39796
|
+
const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Relationships', rows && rows.length > 0 ? rows[0] : {})
|
|
39797
|
+
return result;
|
|
39798
|
+
}
|
|
39799
|
+
|
|
39800
|
+
@Mutation(() => AIAgentRelationship_)
|
|
39801
|
+
async CreateAIAgentRelationship(
|
|
39802
|
+
@Arg('input', () => CreateAIAgentRelationshipInput) input: CreateAIAgentRelationshipInput,
|
|
39803
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
39804
|
+
@PubSub() pubSub: PubSubEngine
|
|
39805
|
+
) {
|
|
39806
|
+
const provider = GetReadWriteProvider(providers);
|
|
39807
|
+
return this.CreateRecord('MJ: AI Agent Relationships', input, provider, userPayload, pubSub)
|
|
39808
|
+
}
|
|
39809
|
+
|
|
39810
|
+
@Mutation(() => AIAgentRelationship_)
|
|
39811
|
+
async UpdateAIAgentRelationship(
|
|
39812
|
+
@Arg('input', () => UpdateAIAgentRelationshipInput) input: UpdateAIAgentRelationshipInput,
|
|
39813
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
39814
|
+
@PubSub() pubSub: PubSubEngine
|
|
39815
|
+
) {
|
|
39816
|
+
const provider = GetReadWriteProvider(providers);
|
|
39817
|
+
return this.UpdateRecord('MJ: AI Agent Relationships', input, provider, userPayload, pubSub);
|
|
39818
|
+
}
|
|
39819
|
+
|
|
39820
|
+
@Mutation(() => AIAgentRelationship_)
|
|
39821
|
+
async DeleteAIAgentRelationship(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39822
|
+
const provider = GetReadWriteProvider(providers);
|
|
39823
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
39824
|
+
return this.DeleteRecord('MJ: AI Agent Relationships', key, options, provider, userPayload, pubSub);
|
|
39825
|
+
}
|
|
39826
|
+
|
|
39827
|
+
}
|
|
39828
|
+
|
|
39829
|
+
//****************************************************************************
|
|
39830
|
+
// ENTITY CLASS for MJ: Component Library Links
|
|
39831
|
+
//****************************************************************************
|
|
39832
|
+
@ObjectType({ description: `Links components to their third-party library dependencies` })
|
|
39833
|
+
export class ComponentLibraryLink_ {
|
|
39834
|
+
@Field({description: `Primary key for component-library relationship`})
|
|
39835
|
+
@MaxLength(16)
|
|
39836
|
+
ID: string;
|
|
39837
|
+
|
|
39838
|
+
@Field({description: `Foreign key to Component that depends on the library`})
|
|
39839
|
+
@MaxLength(16)
|
|
39840
|
+
ComponentID: string;
|
|
39841
|
+
|
|
39842
|
+
@Field({description: `Foreign key to ComponentLibrary that the component depends on`})
|
|
39843
|
+
@MaxLength(16)
|
|
39844
|
+
LibraryID: string;
|
|
39845
|
+
|
|
39846
|
+
@Field({nullable: true, description: `Minimum version requirement using semantic versioning (e.g., ^1.0.0, ~2.5.0)`})
|
|
39847
|
+
@MaxLength(200)
|
|
39848
|
+
MinVersion?: string;
|
|
39849
|
+
|
|
39850
|
+
@Field()
|
|
39851
|
+
@MaxLength(10)
|
|
39852
|
+
_mj__CreatedAt: Date;
|
|
39853
|
+
|
|
39854
|
+
@Field()
|
|
39855
|
+
@MaxLength(10)
|
|
39856
|
+
_mj__UpdatedAt: Date;
|
|
39857
|
+
|
|
39858
|
+
@Field()
|
|
39859
|
+
@MaxLength(1000)
|
|
39860
|
+
Component: string;
|
|
39861
|
+
|
|
39862
|
+
@Field()
|
|
39863
|
+
@MaxLength(1000)
|
|
39864
|
+
Library: string;
|
|
39865
|
+
|
|
39866
|
+
}
|
|
39867
|
+
|
|
39868
|
+
//****************************************************************************
|
|
39869
|
+
// INPUT TYPE for MJ: Component Library Links
|
|
39870
|
+
//****************************************************************************
|
|
39871
|
+
@InputType()
|
|
39872
|
+
export class CreateComponentLibraryLinkInput {
|
|
39873
|
+
@Field({ nullable: true })
|
|
39874
|
+
ID?: string;
|
|
39875
|
+
|
|
39876
|
+
@Field({ nullable: true })
|
|
39877
|
+
ComponentID?: string;
|
|
39878
|
+
|
|
39879
|
+
@Field({ nullable: true })
|
|
39880
|
+
LibraryID?: string;
|
|
39881
|
+
|
|
39882
|
+
@Field({ nullable: true })
|
|
39883
|
+
MinVersion: string | null;
|
|
39884
|
+
}
|
|
39885
|
+
|
|
39886
|
+
|
|
39887
|
+
//****************************************************************************
|
|
39888
|
+
// INPUT TYPE for MJ: Component Library Links
|
|
39889
|
+
//****************************************************************************
|
|
39890
|
+
@InputType()
|
|
39891
|
+
export class UpdateComponentLibraryLinkInput {
|
|
39892
|
+
@Field()
|
|
39893
|
+
ID: string;
|
|
39894
|
+
|
|
39895
|
+
@Field({ nullable: true })
|
|
39896
|
+
ComponentID?: string;
|
|
39897
|
+
|
|
39898
|
+
@Field({ nullable: true })
|
|
39899
|
+
LibraryID?: string;
|
|
39900
|
+
|
|
39901
|
+
@Field({ nullable: true })
|
|
39902
|
+
MinVersion?: string | null;
|
|
39903
|
+
|
|
39904
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
39905
|
+
OldValues___?: KeyValuePairInput[];
|
|
39906
|
+
}
|
|
39907
|
+
|
|
39908
|
+
//****************************************************************************
|
|
39909
|
+
// RESOLVER for MJ: Component Library Links
|
|
39910
|
+
//****************************************************************************
|
|
39911
|
+
@ObjectType()
|
|
39912
|
+
export class RunComponentLibraryLinkViewResult {
|
|
39913
|
+
@Field(() => [ComponentLibraryLink_])
|
|
39914
|
+
Results: ComponentLibraryLink_[];
|
|
39915
|
+
|
|
39916
|
+
@Field(() => String, {nullable: true})
|
|
39917
|
+
UserViewRunID?: string;
|
|
39918
|
+
|
|
39919
|
+
@Field(() => Int, {nullable: true})
|
|
39920
|
+
RowCount: number;
|
|
39921
|
+
|
|
39922
|
+
@Field(() => Int, {nullable: true})
|
|
39923
|
+
TotalRowCount: number;
|
|
39924
|
+
|
|
39925
|
+
@Field(() => Int, {nullable: true})
|
|
39926
|
+
ExecutionTime: number;
|
|
39927
|
+
|
|
39928
|
+
@Field({nullable: true})
|
|
39929
|
+
ErrorMessage?: string;
|
|
39930
|
+
|
|
39931
|
+
@Field(() => Boolean, {nullable: false})
|
|
39932
|
+
Success: boolean;
|
|
39933
|
+
}
|
|
39934
|
+
|
|
39935
|
+
@Resolver(ComponentLibraryLink_)
|
|
39936
|
+
export class ComponentLibraryLinkResolver extends ResolverBase {
|
|
39937
|
+
@Query(() => RunComponentLibraryLinkViewResult)
|
|
39938
|
+
async RunComponentLibraryLinkViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39939
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39940
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
39941
|
+
}
|
|
39942
|
+
|
|
39943
|
+
@Query(() => RunComponentLibraryLinkViewResult)
|
|
39944
|
+
async RunComponentLibraryLinkViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39945
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39946
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
39947
|
+
}
|
|
39948
|
+
|
|
39949
|
+
@Query(() => RunComponentLibraryLinkViewResult)
|
|
39950
|
+
async RunComponentLibraryLinkDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39951
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39952
|
+
input.EntityName = 'MJ: Component Library Links';
|
|
39953
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
39954
|
+
}
|
|
39955
|
+
@Query(() => ComponentLibraryLink_, { nullable: true })
|
|
39956
|
+
async ComponentLibraryLink(@Arg('ID', () => String) ID: string, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<ComponentLibraryLink_ | null> {
|
|
39957
|
+
this.CheckUserReadPermissions('MJ: Component Library Links', userPayload);
|
|
39958
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39959
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
39960
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwComponentLibraryLinks] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Component Library Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
39961
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
39962
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Component Library Links', rows && rows.length > 0 ? rows[0] : {})
|
|
39963
|
+
return result;
|
|
39964
|
+
}
|
|
39965
|
+
|
|
39966
|
+
@Mutation(() => ComponentLibraryLink_)
|
|
39967
|
+
async CreateComponentLibraryLink(
|
|
39968
|
+
@Arg('input', () => CreateComponentLibraryLinkInput) input: CreateComponentLibraryLinkInput,
|
|
39969
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
39970
|
+
@PubSub() pubSub: PubSubEngine
|
|
39971
|
+
) {
|
|
39972
|
+
const provider = GetReadWriteProvider(providers);
|
|
39973
|
+
return this.CreateRecord('MJ: Component Library Links', input, provider, userPayload, pubSub)
|
|
39974
|
+
}
|
|
39975
|
+
|
|
39976
|
+
@Mutation(() => ComponentLibraryLink_)
|
|
39977
|
+
async UpdateComponentLibraryLink(
|
|
39978
|
+
@Arg('input', () => UpdateComponentLibraryLinkInput) input: UpdateComponentLibraryLinkInput,
|
|
39979
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
39980
|
+
@PubSub() pubSub: PubSubEngine
|
|
39981
|
+
) {
|
|
39982
|
+
const provider = GetReadWriteProvider(providers);
|
|
39983
|
+
return this.UpdateRecord('MJ: Component Library Links', input, provider, userPayload, pubSub);
|
|
39984
|
+
}
|
|
39985
|
+
|
|
39986
|
+
@Mutation(() => ComponentLibraryLink_)
|
|
39987
|
+
async DeleteComponentLibraryLink(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39988
|
+
const provider = GetReadWriteProvider(providers);
|
|
39989
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
39990
|
+
return this.DeleteRecord('MJ: Component Library Links', key, options, provider, userPayload, pubSub);
|
|
39991
|
+
}
|
|
39992
|
+
|
|
39993
|
+
}
|
|
39994
|
+
|
|
38664
39995
|
//****************************************************************************
|
|
38665
39996
|
// ENTITY CLASS for Content Process Runs
|
|
38666
39997
|
//****************************************************************************
|