@memberjunction/server 2.29.1 → 2.30.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 +112 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +707 -0
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/QueryResolver.d.ts +2 -2
- package/dist/resolvers/QueryResolver.d.ts.map +1 -1
- package/dist/resolvers/QueryResolver.js +18 -6
- package/dist/resolvers/QueryResolver.js.map +1 -1
- package/package.json +22 -22
- package/src/generated/generated.ts +446 -1
- package/src/resolvers/QueryResolver.ts +24 -4
|
@@ -1049,6 +1049,291 @@ ExplorerNavigationItemResolver = __decorate([
|
|
|
1049
1049
|
Resolver(ExplorerNavigationItem_)
|
|
1050
1050
|
], ExplorerNavigationItemResolver);
|
|
1051
1051
|
export { ExplorerNavigationItemResolver };
|
|
1052
|
+
let GeneratedCodeCategory_ = class GeneratedCodeCategory_ {
|
|
1053
|
+
ID;
|
|
1054
|
+
Name;
|
|
1055
|
+
Description;
|
|
1056
|
+
ParentID;
|
|
1057
|
+
_mj__CreatedAt;
|
|
1058
|
+
_mj__UpdatedAt;
|
|
1059
|
+
Parent;
|
|
1060
|
+
GeneratedCodeCategories_ParentIDArray;
|
|
1061
|
+
GeneratedCodes_CategoryIDArray;
|
|
1062
|
+
};
|
|
1063
|
+
__decorate([
|
|
1064
|
+
Field(),
|
|
1065
|
+
MaxLength(16),
|
|
1066
|
+
__metadata("design:type", String)
|
|
1067
|
+
], GeneratedCodeCategory_.prototype, "ID", void 0);
|
|
1068
|
+
__decorate([
|
|
1069
|
+
Field(),
|
|
1070
|
+
MaxLength(510),
|
|
1071
|
+
__metadata("design:type", String)
|
|
1072
|
+
], GeneratedCodeCategory_.prototype, "Name", void 0);
|
|
1073
|
+
__decorate([
|
|
1074
|
+
Field({ nullable: true }),
|
|
1075
|
+
__metadata("design:type", String)
|
|
1076
|
+
], GeneratedCodeCategory_.prototype, "Description", void 0);
|
|
1077
|
+
__decorate([
|
|
1078
|
+
Field({ nullable: true, description: `Parent category ID, allowing for hierarchical categorization.` }),
|
|
1079
|
+
MaxLength(16),
|
|
1080
|
+
__metadata("design:type", String)
|
|
1081
|
+
], GeneratedCodeCategory_.prototype, "ParentID", void 0);
|
|
1082
|
+
__decorate([
|
|
1083
|
+
Field(),
|
|
1084
|
+
MaxLength(10),
|
|
1085
|
+
__metadata("design:type", Date)
|
|
1086
|
+
], GeneratedCodeCategory_.prototype, "_mj__CreatedAt", void 0);
|
|
1087
|
+
__decorate([
|
|
1088
|
+
Field(),
|
|
1089
|
+
MaxLength(10),
|
|
1090
|
+
__metadata("design:type", Date)
|
|
1091
|
+
], GeneratedCodeCategory_.prototype, "_mj__UpdatedAt", void 0);
|
|
1092
|
+
__decorate([
|
|
1093
|
+
Field({ nullable: true }),
|
|
1094
|
+
MaxLength(510),
|
|
1095
|
+
__metadata("design:type", String)
|
|
1096
|
+
], GeneratedCodeCategory_.prototype, "Parent", void 0);
|
|
1097
|
+
__decorate([
|
|
1098
|
+
Field(() => [GeneratedCodeCategory_]),
|
|
1099
|
+
__metadata("design:type", Array)
|
|
1100
|
+
], GeneratedCodeCategory_.prototype, "GeneratedCodeCategories_ParentIDArray", void 0);
|
|
1101
|
+
__decorate([
|
|
1102
|
+
Field(() => [GeneratedCode_]),
|
|
1103
|
+
__metadata("design:type", Array)
|
|
1104
|
+
], GeneratedCodeCategory_.prototype, "GeneratedCodes_CategoryIDArray", void 0);
|
|
1105
|
+
GeneratedCodeCategory_ = __decorate([
|
|
1106
|
+
ObjectType()
|
|
1107
|
+
], GeneratedCodeCategory_);
|
|
1108
|
+
export { GeneratedCodeCategory_ };
|
|
1109
|
+
let CreateGeneratedCodeCategoryInput = class CreateGeneratedCodeCategoryInput {
|
|
1110
|
+
Name;
|
|
1111
|
+
Description;
|
|
1112
|
+
ParentID;
|
|
1113
|
+
};
|
|
1114
|
+
__decorate([
|
|
1115
|
+
Field({ nullable: true }),
|
|
1116
|
+
__metadata("design:type", String)
|
|
1117
|
+
], CreateGeneratedCodeCategoryInput.prototype, "Name", void 0);
|
|
1118
|
+
__decorate([
|
|
1119
|
+
Field({ nullable: true }),
|
|
1120
|
+
__metadata("design:type", String)
|
|
1121
|
+
], CreateGeneratedCodeCategoryInput.prototype, "Description", void 0);
|
|
1122
|
+
__decorate([
|
|
1123
|
+
Field({ nullable: true }),
|
|
1124
|
+
__metadata("design:type", String)
|
|
1125
|
+
], CreateGeneratedCodeCategoryInput.prototype, "ParentID", void 0);
|
|
1126
|
+
CreateGeneratedCodeCategoryInput = __decorate([
|
|
1127
|
+
InputType()
|
|
1128
|
+
], CreateGeneratedCodeCategoryInput);
|
|
1129
|
+
export { CreateGeneratedCodeCategoryInput };
|
|
1130
|
+
let UpdateGeneratedCodeCategoryInput = class UpdateGeneratedCodeCategoryInput {
|
|
1131
|
+
ID;
|
|
1132
|
+
Name;
|
|
1133
|
+
Description;
|
|
1134
|
+
ParentID;
|
|
1135
|
+
OldValues___;
|
|
1136
|
+
};
|
|
1137
|
+
__decorate([
|
|
1138
|
+
Field(),
|
|
1139
|
+
__metadata("design:type", String)
|
|
1140
|
+
], UpdateGeneratedCodeCategoryInput.prototype, "ID", void 0);
|
|
1141
|
+
__decorate([
|
|
1142
|
+
Field({ nullable: true }),
|
|
1143
|
+
__metadata("design:type", String)
|
|
1144
|
+
], UpdateGeneratedCodeCategoryInput.prototype, "Name", void 0);
|
|
1145
|
+
__decorate([
|
|
1146
|
+
Field({ nullable: true }),
|
|
1147
|
+
__metadata("design:type", String)
|
|
1148
|
+
], UpdateGeneratedCodeCategoryInput.prototype, "Description", void 0);
|
|
1149
|
+
__decorate([
|
|
1150
|
+
Field({ nullable: true }),
|
|
1151
|
+
__metadata("design:type", String)
|
|
1152
|
+
], UpdateGeneratedCodeCategoryInput.prototype, "ParentID", void 0);
|
|
1153
|
+
__decorate([
|
|
1154
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
1155
|
+
__metadata("design:type", Array)
|
|
1156
|
+
], UpdateGeneratedCodeCategoryInput.prototype, "OldValues___", void 0);
|
|
1157
|
+
UpdateGeneratedCodeCategoryInput = __decorate([
|
|
1158
|
+
InputType()
|
|
1159
|
+
], UpdateGeneratedCodeCategoryInput);
|
|
1160
|
+
export { UpdateGeneratedCodeCategoryInput };
|
|
1161
|
+
let RunGeneratedCodeCategoryViewResult = class RunGeneratedCodeCategoryViewResult {
|
|
1162
|
+
Results;
|
|
1163
|
+
UserViewRunID;
|
|
1164
|
+
RowCount;
|
|
1165
|
+
TotalRowCount;
|
|
1166
|
+
ExecutionTime;
|
|
1167
|
+
ErrorMessage;
|
|
1168
|
+
Success;
|
|
1169
|
+
};
|
|
1170
|
+
__decorate([
|
|
1171
|
+
Field(() => [GeneratedCodeCategory_]),
|
|
1172
|
+
__metadata("design:type", Array)
|
|
1173
|
+
], RunGeneratedCodeCategoryViewResult.prototype, "Results", void 0);
|
|
1174
|
+
__decorate([
|
|
1175
|
+
Field(() => String, { nullable: true }),
|
|
1176
|
+
__metadata("design:type", String)
|
|
1177
|
+
], RunGeneratedCodeCategoryViewResult.prototype, "UserViewRunID", void 0);
|
|
1178
|
+
__decorate([
|
|
1179
|
+
Field(() => Int, { nullable: true }),
|
|
1180
|
+
__metadata("design:type", Number)
|
|
1181
|
+
], RunGeneratedCodeCategoryViewResult.prototype, "RowCount", void 0);
|
|
1182
|
+
__decorate([
|
|
1183
|
+
Field(() => Int, { nullable: true }),
|
|
1184
|
+
__metadata("design:type", Number)
|
|
1185
|
+
], RunGeneratedCodeCategoryViewResult.prototype, "TotalRowCount", void 0);
|
|
1186
|
+
__decorate([
|
|
1187
|
+
Field(() => Int, { nullable: true }),
|
|
1188
|
+
__metadata("design:type", Number)
|
|
1189
|
+
], RunGeneratedCodeCategoryViewResult.prototype, "ExecutionTime", void 0);
|
|
1190
|
+
__decorate([
|
|
1191
|
+
Field({ nullable: true }),
|
|
1192
|
+
__metadata("design:type", String)
|
|
1193
|
+
], RunGeneratedCodeCategoryViewResult.prototype, "ErrorMessage", void 0);
|
|
1194
|
+
__decorate([
|
|
1195
|
+
Field(() => Boolean, { nullable: false }),
|
|
1196
|
+
__metadata("design:type", Boolean)
|
|
1197
|
+
], RunGeneratedCodeCategoryViewResult.prototype, "Success", void 0);
|
|
1198
|
+
RunGeneratedCodeCategoryViewResult = __decorate([
|
|
1199
|
+
ObjectType()
|
|
1200
|
+
], RunGeneratedCodeCategoryViewResult);
|
|
1201
|
+
export { RunGeneratedCodeCategoryViewResult };
|
|
1202
|
+
let GeneratedCodeCategoryResolver = class GeneratedCodeCategoryResolver extends ResolverBase {
|
|
1203
|
+
async RunGeneratedCodeCategoryViewByID(input, { dataSources, userPayload }, pubSub) {
|
|
1204
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1205
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
1206
|
+
}
|
|
1207
|
+
async RunGeneratedCodeCategoryViewByName(input, { dataSources, userPayload }, pubSub) {
|
|
1208
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1209
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
1210
|
+
}
|
|
1211
|
+
async RunGeneratedCodeCategoryDynamicView(input, { dataSources, userPayload }, pubSub) {
|
|
1212
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1213
|
+
input.EntityName = 'Generated Code Categories';
|
|
1214
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
1215
|
+
}
|
|
1216
|
+
async GeneratedCodeCategory(ID, { dataSources, userPayload }, pubSub) {
|
|
1217
|
+
this.CheckUserReadPermissions('Generated Code Categories', userPayload);
|
|
1218
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1219
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodeCategories] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('Generated Code Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
1220
|
+
const result = this.MapFieldNamesToCodeNames('Generated Code Categories', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
1221
|
+
return result;
|
|
1222
|
+
}
|
|
1223
|
+
async GeneratedCodeCategories_ParentIDArray(generatedcodecategory_, { dataSources, userPayload }, pubSub) {
|
|
1224
|
+
this.CheckUserReadPermissions('Generated Code Categories', userPayload);
|
|
1225
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1226
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodeCategories] WHERE [ParentID]='${generatedcodecategory_.ID}' ` + this.getRowLevelSecurityWhereClause('Generated Code Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
1227
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Code Categories', await dataSource.query(sSQL));
|
|
1228
|
+
return result;
|
|
1229
|
+
}
|
|
1230
|
+
async GeneratedCodes_CategoryIDArray(generatedcodecategory_, { dataSources, userPayload }, pubSub) {
|
|
1231
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
1232
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1233
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [CategoryID]='${generatedcodecategory_.ID}' ` + this.getRowLevelSecurityWhereClause('Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
1234
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Codes', await dataSource.query(sSQL));
|
|
1235
|
+
return result;
|
|
1236
|
+
}
|
|
1237
|
+
async CreateGeneratedCodeCategory(input, { dataSources, userPayload }, pubSub) {
|
|
1238
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
1239
|
+
return this.CreateRecord('Generated Code Categories', input, dataSource, userPayload, pubSub);
|
|
1240
|
+
}
|
|
1241
|
+
async UpdateGeneratedCodeCategory(input, { dataSources, userPayload }, pubSub) {
|
|
1242
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
1243
|
+
return this.UpdateRecord('Generated Code Categories', input, dataSource, userPayload, pubSub);
|
|
1244
|
+
}
|
|
1245
|
+
async DeleteGeneratedCodeCategory(ID, options, { dataSources, userPayload }, pubSub) {
|
|
1246
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
1247
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
1248
|
+
return this.DeleteRecord('Generated Code Categories', key, options, dataSource, userPayload, pubSub);
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
__decorate([
|
|
1252
|
+
Query(() => RunGeneratedCodeCategoryViewResult),
|
|
1253
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
1254
|
+
__param(1, Ctx()),
|
|
1255
|
+
__param(2, PubSub()),
|
|
1256
|
+
__metadata("design:type", Function),
|
|
1257
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
1258
|
+
__metadata("design:returntype", Promise)
|
|
1259
|
+
], GeneratedCodeCategoryResolver.prototype, "RunGeneratedCodeCategoryViewByID", null);
|
|
1260
|
+
__decorate([
|
|
1261
|
+
Query(() => RunGeneratedCodeCategoryViewResult),
|
|
1262
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
1263
|
+
__param(1, Ctx()),
|
|
1264
|
+
__param(2, PubSub()),
|
|
1265
|
+
__metadata("design:type", Function),
|
|
1266
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
1267
|
+
__metadata("design:returntype", Promise)
|
|
1268
|
+
], GeneratedCodeCategoryResolver.prototype, "RunGeneratedCodeCategoryViewByName", null);
|
|
1269
|
+
__decorate([
|
|
1270
|
+
Query(() => RunGeneratedCodeCategoryViewResult),
|
|
1271
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
1272
|
+
__param(1, Ctx()),
|
|
1273
|
+
__param(2, PubSub()),
|
|
1274
|
+
__metadata("design:type", Function),
|
|
1275
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
1276
|
+
__metadata("design:returntype", Promise)
|
|
1277
|
+
], GeneratedCodeCategoryResolver.prototype, "RunGeneratedCodeCategoryDynamicView", null);
|
|
1278
|
+
__decorate([
|
|
1279
|
+
Query(() => GeneratedCodeCategory_, { nullable: true }),
|
|
1280
|
+
__param(0, Arg('ID', () => String)),
|
|
1281
|
+
__param(1, Ctx()),
|
|
1282
|
+
__param(2, PubSub()),
|
|
1283
|
+
__metadata("design:type", Function),
|
|
1284
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
1285
|
+
__metadata("design:returntype", Promise)
|
|
1286
|
+
], GeneratedCodeCategoryResolver.prototype, "GeneratedCodeCategory", null);
|
|
1287
|
+
__decorate([
|
|
1288
|
+
FieldResolver(() => [GeneratedCodeCategory_]),
|
|
1289
|
+
__param(0, Root()),
|
|
1290
|
+
__param(1, Ctx()),
|
|
1291
|
+
__param(2, PubSub()),
|
|
1292
|
+
__metadata("design:type", Function),
|
|
1293
|
+
__metadata("design:paramtypes", [GeneratedCodeCategory_, Object, PubSubEngine]),
|
|
1294
|
+
__metadata("design:returntype", Promise)
|
|
1295
|
+
], GeneratedCodeCategoryResolver.prototype, "GeneratedCodeCategories_ParentIDArray", null);
|
|
1296
|
+
__decorate([
|
|
1297
|
+
FieldResolver(() => [GeneratedCode_]),
|
|
1298
|
+
__param(0, Root()),
|
|
1299
|
+
__param(1, Ctx()),
|
|
1300
|
+
__param(2, PubSub()),
|
|
1301
|
+
__metadata("design:type", Function),
|
|
1302
|
+
__metadata("design:paramtypes", [GeneratedCodeCategory_, Object, PubSubEngine]),
|
|
1303
|
+
__metadata("design:returntype", Promise)
|
|
1304
|
+
], GeneratedCodeCategoryResolver.prototype, "GeneratedCodes_CategoryIDArray", null);
|
|
1305
|
+
__decorate([
|
|
1306
|
+
Mutation(() => GeneratedCodeCategory_),
|
|
1307
|
+
__param(0, Arg('input', () => CreateGeneratedCodeCategoryInput)),
|
|
1308
|
+
__param(1, Ctx()),
|
|
1309
|
+
__param(2, PubSub()),
|
|
1310
|
+
__metadata("design:type", Function),
|
|
1311
|
+
__metadata("design:paramtypes", [CreateGeneratedCodeCategoryInput, Object, PubSubEngine]),
|
|
1312
|
+
__metadata("design:returntype", Promise)
|
|
1313
|
+
], GeneratedCodeCategoryResolver.prototype, "CreateGeneratedCodeCategory", null);
|
|
1314
|
+
__decorate([
|
|
1315
|
+
Mutation(() => GeneratedCodeCategory_),
|
|
1316
|
+
__param(0, Arg('input', () => UpdateGeneratedCodeCategoryInput)),
|
|
1317
|
+
__param(1, Ctx()),
|
|
1318
|
+
__param(2, PubSub()),
|
|
1319
|
+
__metadata("design:type", Function),
|
|
1320
|
+
__metadata("design:paramtypes", [UpdateGeneratedCodeCategoryInput, Object, PubSubEngine]),
|
|
1321
|
+
__metadata("design:returntype", Promise)
|
|
1322
|
+
], GeneratedCodeCategoryResolver.prototype, "UpdateGeneratedCodeCategory", null);
|
|
1323
|
+
__decorate([
|
|
1324
|
+
Mutation(() => GeneratedCodeCategory_),
|
|
1325
|
+
__param(0, Arg('ID', () => String)),
|
|
1326
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
1327
|
+
__param(2, Ctx()),
|
|
1328
|
+
__param(3, PubSub()),
|
|
1329
|
+
__metadata("design:type", Function),
|
|
1330
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
1331
|
+
__metadata("design:returntype", Promise)
|
|
1332
|
+
], GeneratedCodeCategoryResolver.prototype, "DeleteGeneratedCodeCategory", null);
|
|
1333
|
+
GeneratedCodeCategoryResolver = __decorate([
|
|
1334
|
+
Resolver(GeneratedCodeCategory_)
|
|
1335
|
+
], GeneratedCodeCategoryResolver);
|
|
1336
|
+
export { GeneratedCodeCategoryResolver };
|
|
1052
1337
|
let AIAgentModel_ = class AIAgentModel_ {
|
|
1053
1338
|
ID;
|
|
1054
1339
|
AgentID;
|
|
@@ -7889,6 +8174,7 @@ let Entity_ = class Entity_ {
|
|
|
7889
8174
|
ApplicationEntities_EntityIDArray;
|
|
7890
8175
|
ResourceTypes_EntityIDArray;
|
|
7891
8176
|
QueryEntities_EntityIDArray;
|
|
8177
|
+
GeneratedCodes_LinkedEntityIDArray;
|
|
7892
8178
|
};
|
|
7893
8179
|
__decorate([
|
|
7894
8180
|
Field(),
|
|
@@ -8294,6 +8580,10 @@ __decorate([
|
|
|
8294
8580
|
Field(() => [QueryEntity_]),
|
|
8295
8581
|
__metadata("design:type", Array)
|
|
8296
8582
|
], Entity_.prototype, "QueryEntities_EntityIDArray", void 0);
|
|
8583
|
+
__decorate([
|
|
8584
|
+
Field(() => [GeneratedCode_]),
|
|
8585
|
+
__metadata("design:type", Array)
|
|
8586
|
+
], Entity_.prototype, "GeneratedCodes_LinkedEntityIDArray", void 0);
|
|
8297
8587
|
Entity_ = __decorate([
|
|
8298
8588
|
ObjectType({ description: `Catalog of all entities across all schemas` })
|
|
8299
8589
|
], Entity_);
|
|
@@ -9111,6 +9401,13 @@ let EntityResolverBase = class EntityResolverBase extends ResolverBase {
|
|
|
9111
9401
|
const result = this.ArrayMapFieldNamesToCodeNames('Query Entities', await dataSource.query(sSQL));
|
|
9112
9402
|
return result;
|
|
9113
9403
|
}
|
|
9404
|
+
async GeneratedCodes_LinkedEntityIDArray(entity_, { dataSources, userPayload }, pubSub) {
|
|
9405
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
9406
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9407
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [LinkedEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause('Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
9408
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Codes', await dataSource.query(sSQL));
|
|
9409
|
+
return result;
|
|
9410
|
+
}
|
|
9114
9411
|
async CreateEntity(input, { dataSources, userPayload }, pubSub) {
|
|
9115
9412
|
const dataSource = GetReadWriteDataSource(dataSources);
|
|
9116
9413
|
return this.CreateRecord('Entities', input, dataSource, userPayload, pubSub);
|
|
@@ -9493,6 +9790,15 @@ __decorate([
|
|
|
9493
9790
|
__metadata("design:paramtypes", [Entity_, Object, PubSubEngine]),
|
|
9494
9791
|
__metadata("design:returntype", Promise)
|
|
9495
9792
|
], EntityResolverBase.prototype, "QueryEntities_EntityIDArray", null);
|
|
9793
|
+
__decorate([
|
|
9794
|
+
FieldResolver(() => [GeneratedCode_]),
|
|
9795
|
+
__param(0, Root()),
|
|
9796
|
+
__param(1, Ctx()),
|
|
9797
|
+
__param(2, PubSub()),
|
|
9798
|
+
__metadata("design:type", Function),
|
|
9799
|
+
__metadata("design:paramtypes", [Entity_, Object, PubSubEngine]),
|
|
9800
|
+
__metadata("design:returntype", Promise)
|
|
9801
|
+
], EntityResolverBase.prototype, "GeneratedCodes_LinkedEntityIDArray", null);
|
|
9496
9802
|
__decorate([
|
|
9497
9803
|
Mutation(() => Entity_),
|
|
9498
9804
|
__param(0, Arg('input', () => CreateEntityInput)),
|
|
@@ -18889,6 +19195,7 @@ let AIModel_ = class AIModel_ {
|
|
|
18889
19195
|
AIResultCache_AIModelIDArray;
|
|
18890
19196
|
EntityAIActions_AIModelIDArray;
|
|
18891
19197
|
AIAgentModels_ModelIDArray;
|
|
19198
|
+
GeneratedCodes_GeneratedByModelIDArray;
|
|
18892
19199
|
};
|
|
18893
19200
|
__decorate([
|
|
18894
19201
|
Field(),
|
|
@@ -19005,6 +19312,10 @@ __decorate([
|
|
|
19005
19312
|
Field(() => [AIAgentModel_]),
|
|
19006
19313
|
__metadata("design:type", Array)
|
|
19007
19314
|
], AIModel_.prototype, "AIAgentModels_ModelIDArray", void 0);
|
|
19315
|
+
__decorate([
|
|
19316
|
+
Field(() => [GeneratedCode_]),
|
|
19317
|
+
__metadata("design:type", Array)
|
|
19318
|
+
], AIModel_.prototype, "GeneratedCodes_GeneratedByModelIDArray", void 0);
|
|
19008
19319
|
AIModel_ = __decorate([
|
|
19009
19320
|
ObjectType({ description: `Catalog of all AI Models configured in the system` })
|
|
19010
19321
|
], AIModel_);
|
|
@@ -19296,6 +19607,13 @@ let AIModelResolver = class AIModelResolver extends ResolverBase {
|
|
|
19296
19607
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', await dataSource.query(sSQL));
|
|
19297
19608
|
return result;
|
|
19298
19609
|
}
|
|
19610
|
+
async GeneratedCodes_GeneratedByModelIDArray(aimodel_, { dataSources, userPayload }, pubSub) {
|
|
19611
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
19612
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19613
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [GeneratedByModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause('Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
19614
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Codes', await dataSource.query(sSQL));
|
|
19615
|
+
return result;
|
|
19616
|
+
}
|
|
19299
19617
|
async CreateAIModel(input, { dataSources, userPayload }, pubSub) {
|
|
19300
19618
|
const dataSource = GetReadWriteDataSource(dataSources);
|
|
19301
19619
|
return this.CreateRecord('AI Models', input, dataSource, userPayload, pubSub);
|
|
@@ -19426,6 +19744,15 @@ __decorate([
|
|
|
19426
19744
|
__metadata("design:paramtypes", [AIModel_, Object, PubSubEngine]),
|
|
19427
19745
|
__metadata("design:returntype", Promise)
|
|
19428
19746
|
], AIModelResolver.prototype, "AIAgentModels_ModelIDArray", null);
|
|
19747
|
+
__decorate([
|
|
19748
|
+
FieldResolver(() => [GeneratedCode_]),
|
|
19749
|
+
__param(0, Root()),
|
|
19750
|
+
__param(1, Ctx()),
|
|
19751
|
+
__param(2, PubSub()),
|
|
19752
|
+
__metadata("design:type", Function),
|
|
19753
|
+
__metadata("design:paramtypes", [AIModel_, Object, PubSubEngine]),
|
|
19754
|
+
__metadata("design:returntype", Promise)
|
|
19755
|
+
], AIModelResolver.prototype, "GeneratedCodes_GeneratedByModelIDArray", null);
|
|
19429
19756
|
__decorate([
|
|
19430
19757
|
Mutation(() => AIModel_),
|
|
19431
19758
|
__param(0, Arg('input', () => CreateAIModelInput)),
|
|
@@ -49937,6 +50264,386 @@ ContentItemTagResolver = __decorate([
|
|
|
49937
50264
|
Resolver(ContentItemTag_)
|
|
49938
50265
|
], ContentItemTagResolver);
|
|
49939
50266
|
export { ContentItemTagResolver };
|
|
50267
|
+
let GeneratedCode_ = class GeneratedCode_ {
|
|
50268
|
+
ID;
|
|
50269
|
+
GeneratedAt;
|
|
50270
|
+
CategoryID;
|
|
50271
|
+
GeneratedByModelID;
|
|
50272
|
+
Name;
|
|
50273
|
+
Description;
|
|
50274
|
+
Code;
|
|
50275
|
+
Source;
|
|
50276
|
+
LinkedEntityID;
|
|
50277
|
+
LinkedRecordPrimaryKey;
|
|
50278
|
+
Status;
|
|
50279
|
+
Language;
|
|
50280
|
+
_mj__CreatedAt;
|
|
50281
|
+
_mj__UpdatedAt;
|
|
50282
|
+
Category;
|
|
50283
|
+
GeneratedByModel;
|
|
50284
|
+
LinkedEntity;
|
|
50285
|
+
};
|
|
50286
|
+
__decorate([
|
|
50287
|
+
Field(),
|
|
50288
|
+
MaxLength(16),
|
|
50289
|
+
__metadata("design:type", String)
|
|
50290
|
+
], GeneratedCode_.prototype, "ID", void 0);
|
|
50291
|
+
__decorate([
|
|
50292
|
+
Field({ description: `When the code was generated.` }),
|
|
50293
|
+
MaxLength(10),
|
|
50294
|
+
__metadata("design:type", Date)
|
|
50295
|
+
], GeneratedCode_.prototype, "GeneratedAt", void 0);
|
|
50296
|
+
__decorate([
|
|
50297
|
+
Field({ description: `Reference to the category of generated code.` }),
|
|
50298
|
+
MaxLength(16),
|
|
50299
|
+
__metadata("design:type", String)
|
|
50300
|
+
], GeneratedCode_.prototype, "CategoryID", void 0);
|
|
50301
|
+
__decorate([
|
|
50302
|
+
Field({ description: `AI model responsible for generating this code.` }),
|
|
50303
|
+
MaxLength(16),
|
|
50304
|
+
__metadata("design:type", String)
|
|
50305
|
+
], GeneratedCode_.prototype, "GeneratedByModelID", void 0);
|
|
50306
|
+
__decorate([
|
|
50307
|
+
Field({ description: `Descriptive name of the generated code.` }),
|
|
50308
|
+
MaxLength(510),
|
|
50309
|
+
__metadata("design:type", String)
|
|
50310
|
+
], GeneratedCode_.prototype, "Name", void 0);
|
|
50311
|
+
__decorate([
|
|
50312
|
+
Field({ nullable: true, description: `Optional description of the generated code.` }),
|
|
50313
|
+
__metadata("design:type", String)
|
|
50314
|
+
], GeneratedCode_.prototype, "Description", void 0);
|
|
50315
|
+
__decorate([
|
|
50316
|
+
Field({ description: `The actual generated code.` }),
|
|
50317
|
+
__metadata("design:type", String)
|
|
50318
|
+
], GeneratedCode_.prototype, "Code", void 0);
|
|
50319
|
+
__decorate([
|
|
50320
|
+
Field({ description: `Source material used to generate the code, e.g., a SQL CHECK constraint.` }),
|
|
50321
|
+
__metadata("design:type", String)
|
|
50322
|
+
], GeneratedCode_.prototype, "Source", void 0);
|
|
50323
|
+
__decorate([
|
|
50324
|
+
Field({ nullable: true }),
|
|
50325
|
+
MaxLength(16),
|
|
50326
|
+
__metadata("design:type", String)
|
|
50327
|
+
], GeneratedCode_.prototype, "LinkedEntityID", void 0);
|
|
50328
|
+
__decorate([
|
|
50329
|
+
Field({ nullable: true }),
|
|
50330
|
+
__metadata("design:type", String)
|
|
50331
|
+
], GeneratedCode_.prototype, "LinkedRecordPrimaryKey", void 0);
|
|
50332
|
+
__decorate([
|
|
50333
|
+
Field({ description: `Status of the generated code, e.g., Pending, Approved, or Rejected.` }),
|
|
50334
|
+
MaxLength(40),
|
|
50335
|
+
__metadata("design:type", String)
|
|
50336
|
+
], GeneratedCode_.prototype, "Status", void 0);
|
|
50337
|
+
__decorate([
|
|
50338
|
+
Field({ description: `Programming language of the generated code (TypeScript, SQL, HTML, CSS, JavaScript, Python, or Other).` }),
|
|
50339
|
+
MaxLength(100),
|
|
50340
|
+
__metadata("design:type", String)
|
|
50341
|
+
], GeneratedCode_.prototype, "Language", void 0);
|
|
50342
|
+
__decorate([
|
|
50343
|
+
Field(),
|
|
50344
|
+
MaxLength(10),
|
|
50345
|
+
__metadata("design:type", Date)
|
|
50346
|
+
], GeneratedCode_.prototype, "_mj__CreatedAt", void 0);
|
|
50347
|
+
__decorate([
|
|
50348
|
+
Field(),
|
|
50349
|
+
MaxLength(10),
|
|
50350
|
+
__metadata("design:type", Date)
|
|
50351
|
+
], GeneratedCode_.prototype, "_mj__UpdatedAt", void 0);
|
|
50352
|
+
__decorate([
|
|
50353
|
+
Field(),
|
|
50354
|
+
MaxLength(510),
|
|
50355
|
+
__metadata("design:type", String)
|
|
50356
|
+
], GeneratedCode_.prototype, "Category", void 0);
|
|
50357
|
+
__decorate([
|
|
50358
|
+
Field(),
|
|
50359
|
+
MaxLength(100),
|
|
50360
|
+
__metadata("design:type", String)
|
|
50361
|
+
], GeneratedCode_.prototype, "GeneratedByModel", void 0);
|
|
50362
|
+
__decorate([
|
|
50363
|
+
Field({ nullable: true }),
|
|
50364
|
+
MaxLength(510),
|
|
50365
|
+
__metadata("design:type", String)
|
|
50366
|
+
], GeneratedCode_.prototype, "LinkedEntity", void 0);
|
|
50367
|
+
GeneratedCode_ = __decorate([
|
|
50368
|
+
ObjectType()
|
|
50369
|
+
], GeneratedCode_);
|
|
50370
|
+
export { GeneratedCode_ };
|
|
50371
|
+
let CreateGeneratedCodeInput = class CreateGeneratedCodeInput {
|
|
50372
|
+
GeneratedAt;
|
|
50373
|
+
CategoryID;
|
|
50374
|
+
GeneratedByModelID;
|
|
50375
|
+
Name;
|
|
50376
|
+
Description;
|
|
50377
|
+
Code;
|
|
50378
|
+
Source;
|
|
50379
|
+
LinkedEntityID;
|
|
50380
|
+
LinkedRecordPrimaryKey;
|
|
50381
|
+
Status;
|
|
50382
|
+
Language;
|
|
50383
|
+
};
|
|
50384
|
+
__decorate([
|
|
50385
|
+
Field({ nullable: true }),
|
|
50386
|
+
__metadata("design:type", Date)
|
|
50387
|
+
], CreateGeneratedCodeInput.prototype, "GeneratedAt", void 0);
|
|
50388
|
+
__decorate([
|
|
50389
|
+
Field({ nullable: true }),
|
|
50390
|
+
__metadata("design:type", String)
|
|
50391
|
+
], CreateGeneratedCodeInput.prototype, "CategoryID", void 0);
|
|
50392
|
+
__decorate([
|
|
50393
|
+
Field({ nullable: true }),
|
|
50394
|
+
__metadata("design:type", String)
|
|
50395
|
+
], CreateGeneratedCodeInput.prototype, "GeneratedByModelID", void 0);
|
|
50396
|
+
__decorate([
|
|
50397
|
+
Field({ nullable: true }),
|
|
50398
|
+
__metadata("design:type", String)
|
|
50399
|
+
], CreateGeneratedCodeInput.prototype, "Name", void 0);
|
|
50400
|
+
__decorate([
|
|
50401
|
+
Field({ nullable: true }),
|
|
50402
|
+
__metadata("design:type", String)
|
|
50403
|
+
], CreateGeneratedCodeInput.prototype, "Description", void 0);
|
|
50404
|
+
__decorate([
|
|
50405
|
+
Field({ nullable: true }),
|
|
50406
|
+
__metadata("design:type", String)
|
|
50407
|
+
], CreateGeneratedCodeInput.prototype, "Code", void 0);
|
|
50408
|
+
__decorate([
|
|
50409
|
+
Field({ nullable: true }),
|
|
50410
|
+
__metadata("design:type", String)
|
|
50411
|
+
], CreateGeneratedCodeInput.prototype, "Source", void 0);
|
|
50412
|
+
__decorate([
|
|
50413
|
+
Field({ nullable: true }),
|
|
50414
|
+
__metadata("design:type", String)
|
|
50415
|
+
], CreateGeneratedCodeInput.prototype, "LinkedEntityID", void 0);
|
|
50416
|
+
__decorate([
|
|
50417
|
+
Field({ nullable: true }),
|
|
50418
|
+
__metadata("design:type", String)
|
|
50419
|
+
], CreateGeneratedCodeInput.prototype, "LinkedRecordPrimaryKey", void 0);
|
|
50420
|
+
__decorate([
|
|
50421
|
+
Field({ nullable: true }),
|
|
50422
|
+
__metadata("design:type", String)
|
|
50423
|
+
], CreateGeneratedCodeInput.prototype, "Status", void 0);
|
|
50424
|
+
__decorate([
|
|
50425
|
+
Field({ nullable: true }),
|
|
50426
|
+
__metadata("design:type", String)
|
|
50427
|
+
], CreateGeneratedCodeInput.prototype, "Language", void 0);
|
|
50428
|
+
CreateGeneratedCodeInput = __decorate([
|
|
50429
|
+
InputType()
|
|
50430
|
+
], CreateGeneratedCodeInput);
|
|
50431
|
+
export { CreateGeneratedCodeInput };
|
|
50432
|
+
let UpdateGeneratedCodeInput = class UpdateGeneratedCodeInput {
|
|
50433
|
+
ID;
|
|
50434
|
+
GeneratedAt;
|
|
50435
|
+
CategoryID;
|
|
50436
|
+
GeneratedByModelID;
|
|
50437
|
+
Name;
|
|
50438
|
+
Description;
|
|
50439
|
+
Code;
|
|
50440
|
+
Source;
|
|
50441
|
+
LinkedEntityID;
|
|
50442
|
+
LinkedRecordPrimaryKey;
|
|
50443
|
+
Status;
|
|
50444
|
+
Language;
|
|
50445
|
+
OldValues___;
|
|
50446
|
+
};
|
|
50447
|
+
__decorate([
|
|
50448
|
+
Field(),
|
|
50449
|
+
__metadata("design:type", String)
|
|
50450
|
+
], UpdateGeneratedCodeInput.prototype, "ID", void 0);
|
|
50451
|
+
__decorate([
|
|
50452
|
+
Field({ nullable: true }),
|
|
50453
|
+
__metadata("design:type", Date)
|
|
50454
|
+
], UpdateGeneratedCodeInput.prototype, "GeneratedAt", void 0);
|
|
50455
|
+
__decorate([
|
|
50456
|
+
Field({ nullable: true }),
|
|
50457
|
+
__metadata("design:type", String)
|
|
50458
|
+
], UpdateGeneratedCodeInput.prototype, "CategoryID", void 0);
|
|
50459
|
+
__decorate([
|
|
50460
|
+
Field({ nullable: true }),
|
|
50461
|
+
__metadata("design:type", String)
|
|
50462
|
+
], UpdateGeneratedCodeInput.prototype, "GeneratedByModelID", void 0);
|
|
50463
|
+
__decorate([
|
|
50464
|
+
Field({ nullable: true }),
|
|
50465
|
+
__metadata("design:type", String)
|
|
50466
|
+
], UpdateGeneratedCodeInput.prototype, "Name", void 0);
|
|
50467
|
+
__decorate([
|
|
50468
|
+
Field({ nullable: true }),
|
|
50469
|
+
__metadata("design:type", String)
|
|
50470
|
+
], UpdateGeneratedCodeInput.prototype, "Description", void 0);
|
|
50471
|
+
__decorate([
|
|
50472
|
+
Field({ nullable: true }),
|
|
50473
|
+
__metadata("design:type", String)
|
|
50474
|
+
], UpdateGeneratedCodeInput.prototype, "Code", void 0);
|
|
50475
|
+
__decorate([
|
|
50476
|
+
Field({ nullable: true }),
|
|
50477
|
+
__metadata("design:type", String)
|
|
50478
|
+
], UpdateGeneratedCodeInput.prototype, "Source", void 0);
|
|
50479
|
+
__decorate([
|
|
50480
|
+
Field({ nullable: true }),
|
|
50481
|
+
__metadata("design:type", String)
|
|
50482
|
+
], UpdateGeneratedCodeInput.prototype, "LinkedEntityID", void 0);
|
|
50483
|
+
__decorate([
|
|
50484
|
+
Field({ nullable: true }),
|
|
50485
|
+
__metadata("design:type", String)
|
|
50486
|
+
], UpdateGeneratedCodeInput.prototype, "LinkedRecordPrimaryKey", void 0);
|
|
50487
|
+
__decorate([
|
|
50488
|
+
Field({ nullable: true }),
|
|
50489
|
+
__metadata("design:type", String)
|
|
50490
|
+
], UpdateGeneratedCodeInput.prototype, "Status", void 0);
|
|
50491
|
+
__decorate([
|
|
50492
|
+
Field({ nullable: true }),
|
|
50493
|
+
__metadata("design:type", String)
|
|
50494
|
+
], UpdateGeneratedCodeInput.prototype, "Language", void 0);
|
|
50495
|
+
__decorate([
|
|
50496
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
50497
|
+
__metadata("design:type", Array)
|
|
50498
|
+
], UpdateGeneratedCodeInput.prototype, "OldValues___", void 0);
|
|
50499
|
+
UpdateGeneratedCodeInput = __decorate([
|
|
50500
|
+
InputType()
|
|
50501
|
+
], UpdateGeneratedCodeInput);
|
|
50502
|
+
export { UpdateGeneratedCodeInput };
|
|
50503
|
+
let RunGeneratedCodeViewResult = class RunGeneratedCodeViewResult {
|
|
50504
|
+
Results;
|
|
50505
|
+
UserViewRunID;
|
|
50506
|
+
RowCount;
|
|
50507
|
+
TotalRowCount;
|
|
50508
|
+
ExecutionTime;
|
|
50509
|
+
ErrorMessage;
|
|
50510
|
+
Success;
|
|
50511
|
+
};
|
|
50512
|
+
__decorate([
|
|
50513
|
+
Field(() => [GeneratedCode_]),
|
|
50514
|
+
__metadata("design:type", Array)
|
|
50515
|
+
], RunGeneratedCodeViewResult.prototype, "Results", void 0);
|
|
50516
|
+
__decorate([
|
|
50517
|
+
Field(() => String, { nullable: true }),
|
|
50518
|
+
__metadata("design:type", String)
|
|
50519
|
+
], RunGeneratedCodeViewResult.prototype, "UserViewRunID", void 0);
|
|
50520
|
+
__decorate([
|
|
50521
|
+
Field(() => Int, { nullable: true }),
|
|
50522
|
+
__metadata("design:type", Number)
|
|
50523
|
+
], RunGeneratedCodeViewResult.prototype, "RowCount", void 0);
|
|
50524
|
+
__decorate([
|
|
50525
|
+
Field(() => Int, { nullable: true }),
|
|
50526
|
+
__metadata("design:type", Number)
|
|
50527
|
+
], RunGeneratedCodeViewResult.prototype, "TotalRowCount", void 0);
|
|
50528
|
+
__decorate([
|
|
50529
|
+
Field(() => Int, { nullable: true }),
|
|
50530
|
+
__metadata("design:type", Number)
|
|
50531
|
+
], RunGeneratedCodeViewResult.prototype, "ExecutionTime", void 0);
|
|
50532
|
+
__decorate([
|
|
50533
|
+
Field({ nullable: true }),
|
|
50534
|
+
__metadata("design:type", String)
|
|
50535
|
+
], RunGeneratedCodeViewResult.prototype, "ErrorMessage", void 0);
|
|
50536
|
+
__decorate([
|
|
50537
|
+
Field(() => Boolean, { nullable: false }),
|
|
50538
|
+
__metadata("design:type", Boolean)
|
|
50539
|
+
], RunGeneratedCodeViewResult.prototype, "Success", void 0);
|
|
50540
|
+
RunGeneratedCodeViewResult = __decorate([
|
|
50541
|
+
ObjectType()
|
|
50542
|
+
], RunGeneratedCodeViewResult);
|
|
50543
|
+
export { RunGeneratedCodeViewResult };
|
|
50544
|
+
let GeneratedCodeResolver = class GeneratedCodeResolver extends ResolverBase {
|
|
50545
|
+
async RunGeneratedCodeViewByID(input, { dataSources, userPayload }, pubSub) {
|
|
50546
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
50547
|
+
return super.RunViewByIDGeneric(input, dataSource, userPayload, pubSub);
|
|
50548
|
+
}
|
|
50549
|
+
async RunGeneratedCodeViewByName(input, { dataSources, userPayload }, pubSub) {
|
|
50550
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
50551
|
+
return super.RunViewByNameGeneric(input, dataSource, userPayload, pubSub);
|
|
50552
|
+
}
|
|
50553
|
+
async RunGeneratedCodeDynamicView(input, { dataSources, userPayload }, pubSub) {
|
|
50554
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
50555
|
+
input.EntityName = 'Generated Codes';
|
|
50556
|
+
return super.RunDynamicViewGeneric(input, dataSource, userPayload, pubSub);
|
|
50557
|
+
}
|
|
50558
|
+
async GeneratedCode(ID, { dataSources, userPayload }, pubSub) {
|
|
50559
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
50560
|
+
const dataSource = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
50561
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause('Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
50562
|
+
const result = this.MapFieldNamesToCodeNames('Generated Codes', await dataSource.query(sSQL).then((r) => r && r.length > 0 ? r[0] : {}));
|
|
50563
|
+
return result;
|
|
50564
|
+
}
|
|
50565
|
+
async CreateGeneratedCode(input, { dataSources, userPayload }, pubSub) {
|
|
50566
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
50567
|
+
return this.CreateRecord('Generated Codes', input, dataSource, userPayload, pubSub);
|
|
50568
|
+
}
|
|
50569
|
+
async UpdateGeneratedCode(input, { dataSources, userPayload }, pubSub) {
|
|
50570
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
50571
|
+
return this.UpdateRecord('Generated Codes', input, dataSource, userPayload, pubSub);
|
|
50572
|
+
}
|
|
50573
|
+
async DeleteGeneratedCode(ID, options, { dataSources, userPayload }, pubSub) {
|
|
50574
|
+
const dataSource = GetReadWriteDataSource(dataSources);
|
|
50575
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
50576
|
+
return this.DeleteRecord('Generated Codes', key, options, dataSource, userPayload, pubSub);
|
|
50577
|
+
}
|
|
50578
|
+
};
|
|
50579
|
+
__decorate([
|
|
50580
|
+
Query(() => RunGeneratedCodeViewResult),
|
|
50581
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
50582
|
+
__param(1, Ctx()),
|
|
50583
|
+
__param(2, PubSub()),
|
|
50584
|
+
__metadata("design:type", Function),
|
|
50585
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
50586
|
+
__metadata("design:returntype", Promise)
|
|
50587
|
+
], GeneratedCodeResolver.prototype, "RunGeneratedCodeViewByID", null);
|
|
50588
|
+
__decorate([
|
|
50589
|
+
Query(() => RunGeneratedCodeViewResult),
|
|
50590
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
50591
|
+
__param(1, Ctx()),
|
|
50592
|
+
__param(2, PubSub()),
|
|
50593
|
+
__metadata("design:type", Function),
|
|
50594
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
50595
|
+
__metadata("design:returntype", Promise)
|
|
50596
|
+
], GeneratedCodeResolver.prototype, "RunGeneratedCodeViewByName", null);
|
|
50597
|
+
__decorate([
|
|
50598
|
+
Query(() => RunGeneratedCodeViewResult),
|
|
50599
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
50600
|
+
__param(1, Ctx()),
|
|
50601
|
+
__param(2, PubSub()),
|
|
50602
|
+
__metadata("design:type", Function),
|
|
50603
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
50604
|
+
__metadata("design:returntype", Promise)
|
|
50605
|
+
], GeneratedCodeResolver.prototype, "RunGeneratedCodeDynamicView", null);
|
|
50606
|
+
__decorate([
|
|
50607
|
+
Query(() => GeneratedCode_, { nullable: true }),
|
|
50608
|
+
__param(0, Arg('ID', () => String)),
|
|
50609
|
+
__param(1, Ctx()),
|
|
50610
|
+
__param(2, PubSub()),
|
|
50611
|
+
__metadata("design:type", Function),
|
|
50612
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
50613
|
+
__metadata("design:returntype", Promise)
|
|
50614
|
+
], GeneratedCodeResolver.prototype, "GeneratedCode", null);
|
|
50615
|
+
__decorate([
|
|
50616
|
+
Mutation(() => GeneratedCode_),
|
|
50617
|
+
__param(0, Arg('input', () => CreateGeneratedCodeInput)),
|
|
50618
|
+
__param(1, Ctx()),
|
|
50619
|
+
__param(2, PubSub()),
|
|
50620
|
+
__metadata("design:type", Function),
|
|
50621
|
+
__metadata("design:paramtypes", [CreateGeneratedCodeInput, Object, PubSubEngine]),
|
|
50622
|
+
__metadata("design:returntype", Promise)
|
|
50623
|
+
], GeneratedCodeResolver.prototype, "CreateGeneratedCode", null);
|
|
50624
|
+
__decorate([
|
|
50625
|
+
Mutation(() => GeneratedCode_),
|
|
50626
|
+
__param(0, Arg('input', () => UpdateGeneratedCodeInput)),
|
|
50627
|
+
__param(1, Ctx()),
|
|
50628
|
+
__param(2, PubSub()),
|
|
50629
|
+
__metadata("design:type", Function),
|
|
50630
|
+
__metadata("design:paramtypes", [UpdateGeneratedCodeInput, Object, PubSubEngine]),
|
|
50631
|
+
__metadata("design:returntype", Promise)
|
|
50632
|
+
], GeneratedCodeResolver.prototype, "UpdateGeneratedCode", null);
|
|
50633
|
+
__decorate([
|
|
50634
|
+
Mutation(() => GeneratedCode_),
|
|
50635
|
+
__param(0, Arg('ID', () => String)),
|
|
50636
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
50637
|
+
__param(2, Ctx()),
|
|
50638
|
+
__param(3, PubSub()),
|
|
50639
|
+
__metadata("design:type", Function),
|
|
50640
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
50641
|
+
__metadata("design:returntype", Promise)
|
|
50642
|
+
], GeneratedCodeResolver.prototype, "DeleteGeneratedCode", null);
|
|
50643
|
+
GeneratedCodeResolver = __decorate([
|
|
50644
|
+
Resolver(GeneratedCode_)
|
|
50645
|
+
], GeneratedCodeResolver);
|
|
50646
|
+
export { GeneratedCodeResolver };
|
|
49940
50647
|
let AIAgentLearningCycle_ = class AIAgentLearningCycle_ {
|
|
49941
50648
|
ID;
|
|
49942
50649
|
AgentID;
|