@memberjunction/server 2.52.0 → 2.54.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/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/generated/generated.d.ts +14 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +98 -0
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.js +1 -1
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/generic/RunViewResolver.d.ts +29 -1
- package/dist/generic/RunViewResolver.d.ts.map +1 -1
- package/dist/generic/RunViewResolver.js +140 -2
- package/dist/generic/RunViewResolver.js.map +1 -1
- package/dist/resolvers/FileResolver.js +1 -1
- package/dist/resolvers/FileResolver.js.map +1 -1
- package/dist/resolvers/QueryResolver.d.ts +2 -0
- package/dist/resolvers/QueryResolver.d.ts.map +1 -1
- package/dist/resolvers/QueryResolver.js +57 -0
- package/dist/resolvers/QueryResolver.js.map +1 -1
- package/dist/resolvers/RunAIPromptResolver.d.ts +1 -0
- package/dist/resolvers/RunAIPromptResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIPromptResolver.js +9 -2
- package/dist/resolvers/RunAIPromptResolver.js.map +1 -1
- package/package.json +25 -25
- package/src/config.ts +1 -1
- package/src/generated/generated.ts +60 -0
- package/src/generic/ResolverBase.ts +1 -1
- package/src/generic/RunViewResolver.ts +718 -587
- package/src/resolvers/FileResolver.ts +1 -1
- package/src/resolvers/QueryResolver.ts +134 -81
- package/src/resolvers/RunAIPromptResolver.ts +7 -2
|
@@ -41863,8 +41863,10 @@ let Action_ = class Action_ {
|
|
|
41863
41863
|
_mj__CreatedAt;
|
|
41864
41864
|
_mj__UpdatedAt;
|
|
41865
41865
|
DriverClass;
|
|
41866
|
+
ParentID;
|
|
41866
41867
|
Category;
|
|
41867
41868
|
CodeApprovedByUser;
|
|
41869
|
+
Parent;
|
|
41868
41870
|
ActionParams_ActionIDArray;
|
|
41869
41871
|
ActionLibraries_ActionIDArray;
|
|
41870
41872
|
ScheduledActions_ActionIDArray;
|
|
@@ -41874,6 +41876,7 @@ let Action_ = class Action_ {
|
|
|
41874
41876
|
EntityActions_ActionIDArray;
|
|
41875
41877
|
ActionExecutionLogs_ActionIDArray;
|
|
41876
41878
|
ActionAuthorizations_ActionIDArray;
|
|
41879
|
+
Actions_ParentIDArray;
|
|
41877
41880
|
};
|
|
41878
41881
|
__decorate([
|
|
41879
41882
|
Field(),
|
|
@@ -41966,6 +41969,11 @@ __decorate([
|
|
|
41966
41969
|
MaxLength(510),
|
|
41967
41970
|
__metadata("design:type", String)
|
|
41968
41971
|
], Action_.prototype, "DriverClass", void 0);
|
|
41972
|
+
__decorate([
|
|
41973
|
+
Field({ nullable: true, description: `Optional ID of the parent action this action inherits from. Used for hierarchical action composition where child actions can specialize parent actions.` }),
|
|
41974
|
+
MaxLength(16),
|
|
41975
|
+
__metadata("design:type", String)
|
|
41976
|
+
], Action_.prototype, "ParentID", void 0);
|
|
41969
41977
|
__decorate([
|
|
41970
41978
|
Field({ nullable: true }),
|
|
41971
41979
|
MaxLength(510),
|
|
@@ -41976,6 +41984,11 @@ __decorate([
|
|
|
41976
41984
|
MaxLength(200),
|
|
41977
41985
|
__metadata("design:type", String)
|
|
41978
41986
|
], Action_.prototype, "CodeApprovedByUser", void 0);
|
|
41987
|
+
__decorate([
|
|
41988
|
+
Field({ nullable: true }),
|
|
41989
|
+
MaxLength(850),
|
|
41990
|
+
__metadata("design:type", String)
|
|
41991
|
+
], Action_.prototype, "Parent", void 0);
|
|
41979
41992
|
__decorate([
|
|
41980
41993
|
Field(() => [ActionParam_]),
|
|
41981
41994
|
__metadata("design:type", Array)
|
|
@@ -42012,6 +42025,10 @@ __decorate([
|
|
|
42012
42025
|
Field(() => [ActionAuthorization_]),
|
|
42013
42026
|
__metadata("design:type", Array)
|
|
42014
42027
|
], Action_.prototype, "ActionAuthorizations_ActionIDArray", void 0);
|
|
42028
|
+
__decorate([
|
|
42029
|
+
Field(() => [Action_]),
|
|
42030
|
+
__metadata("design:type", Array)
|
|
42031
|
+
], Action_.prototype, "Actions_ParentIDArray", void 0);
|
|
42015
42032
|
Action_ = __decorate([
|
|
42016
42033
|
ObjectType({ description: `Stores action definitions, including prompts, generated code, user comments, and status.` })
|
|
42017
42034
|
], Action_);
|
|
@@ -42035,6 +42052,7 @@ let CreateActionInput = class CreateActionInput {
|
|
|
42035
42052
|
RetentionPeriod;
|
|
42036
42053
|
Status;
|
|
42037
42054
|
DriverClass;
|
|
42055
|
+
ParentID;
|
|
42038
42056
|
};
|
|
42039
42057
|
__decorate([
|
|
42040
42058
|
Field({ nullable: true }),
|
|
@@ -42108,6 +42126,10 @@ __decorate([
|
|
|
42108
42126
|
Field({ nullable: true }),
|
|
42109
42127
|
__metadata("design:type", String)
|
|
42110
42128
|
], CreateActionInput.prototype, "DriverClass", void 0);
|
|
42129
|
+
__decorate([
|
|
42130
|
+
Field({ nullable: true }),
|
|
42131
|
+
__metadata("design:type", String)
|
|
42132
|
+
], CreateActionInput.prototype, "ParentID", void 0);
|
|
42111
42133
|
CreateActionInput = __decorate([
|
|
42112
42134
|
InputType()
|
|
42113
42135
|
], CreateActionInput);
|
|
@@ -42131,6 +42153,7 @@ let UpdateActionInput = class UpdateActionInput {
|
|
|
42131
42153
|
RetentionPeriod;
|
|
42132
42154
|
Status;
|
|
42133
42155
|
DriverClass;
|
|
42156
|
+
ParentID;
|
|
42134
42157
|
OldValues___;
|
|
42135
42158
|
};
|
|
42136
42159
|
__decorate([
|
|
@@ -42205,6 +42228,10 @@ __decorate([
|
|
|
42205
42228
|
Field({ nullable: true }),
|
|
42206
42229
|
__metadata("design:type", String)
|
|
42207
42230
|
], UpdateActionInput.prototype, "DriverClass", void 0);
|
|
42231
|
+
__decorate([
|
|
42232
|
+
Field({ nullable: true }),
|
|
42233
|
+
__metadata("design:type", String)
|
|
42234
|
+
], UpdateActionInput.prototype, "ParentID", void 0);
|
|
42208
42235
|
__decorate([
|
|
42209
42236
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
42210
42237
|
__metadata("design:type", Array)
|
|
@@ -42348,6 +42375,14 @@ let ActionResolver = class ActionResolver extends ResolverBase {
|
|
|
42348
42375
|
const result = this.ArrayMapFieldNamesToCodeNames('Action Authorizations', rows);
|
|
42349
42376
|
return result;
|
|
42350
42377
|
}
|
|
42378
|
+
async Actions_ParentIDArray(action_, { dataSources, userPayload }, pubSub) {
|
|
42379
|
+
this.CheckUserReadPermissions('Actions', userPayload);
|
|
42380
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
42381
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActions] WHERE [ParentID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause('Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
42382
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
42383
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Actions', rows);
|
|
42384
|
+
return result;
|
|
42385
|
+
}
|
|
42351
42386
|
async CreateAction(input, { dataSources, userPayload }, pubSub) {
|
|
42352
42387
|
const connPool = GetReadWriteDataSource(dataSources);
|
|
42353
42388
|
return this.CreateRecord('Actions', input, connPool, userPayload, pubSub);
|
|
@@ -42479,6 +42514,15 @@ __decorate([
|
|
|
42479
42514
|
__metadata("design:paramtypes", [Action_, Object, PubSubEngine]),
|
|
42480
42515
|
__metadata("design:returntype", Promise)
|
|
42481
42516
|
], ActionResolver.prototype, "ActionAuthorizations_ActionIDArray", null);
|
|
42517
|
+
__decorate([
|
|
42518
|
+
FieldResolver(() => [Action_]),
|
|
42519
|
+
__param(0, Root()),
|
|
42520
|
+
__param(1, Ctx()),
|
|
42521
|
+
__param(2, PubSub()),
|
|
42522
|
+
__metadata("design:type", Function),
|
|
42523
|
+
__metadata("design:paramtypes", [Action_, Object, PubSubEngine]),
|
|
42524
|
+
__metadata("design:returntype", Promise)
|
|
42525
|
+
], ActionResolver.prototype, "Actions_ParentIDArray", null);
|
|
42482
42526
|
__decorate([
|
|
42483
42527
|
Mutation(() => Action_),
|
|
42484
42528
|
__param(0, Arg('input', () => CreateActionInput)),
|
|
@@ -47779,6 +47823,7 @@ let TemplateContent_ = class TemplateContent_ {
|
|
|
47779
47823
|
_mj__UpdatedAt;
|
|
47780
47824
|
Template;
|
|
47781
47825
|
Type;
|
|
47826
|
+
TemplateParams_TemplateContentIDArray;
|
|
47782
47827
|
};
|
|
47783
47828
|
__decorate([
|
|
47784
47829
|
Field(),
|
|
@@ -47827,6 +47872,10 @@ __decorate([
|
|
|
47827
47872
|
MaxLength(510),
|
|
47828
47873
|
__metadata("design:type", String)
|
|
47829
47874
|
], TemplateContent_.prototype, "Type", void 0);
|
|
47875
|
+
__decorate([
|
|
47876
|
+
Field(() => [TemplateParam_]),
|
|
47877
|
+
__metadata("design:type", Array)
|
|
47878
|
+
], TemplateContent_.prototype, "TemplateParams_TemplateContentIDArray", void 0);
|
|
47830
47879
|
TemplateContent_ = __decorate([
|
|
47831
47880
|
ObjectType({ description: `Template content for different versions of a template for purposes like HTML/Text/etc` })
|
|
47832
47881
|
], TemplateContent_);
|
|
@@ -47971,6 +48020,14 @@ let TemplateContentResolver = class TemplateContentResolver extends ResolverBase
|
|
|
47971
48020
|
const result = this.MapFieldNamesToCodeNames('Template Contents', rows && rows.length > 0 ? rows[0] : {});
|
|
47972
48021
|
return result;
|
|
47973
48022
|
}
|
|
48023
|
+
async TemplateParams_TemplateContentIDArray(templatecontent_, { dataSources, userPayload }, pubSub) {
|
|
48024
|
+
this.CheckUserReadPermissions('Template Params', userPayload);
|
|
48025
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
48026
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [TemplateContentID]='${templatecontent_.ID}' ` + this.getRowLevelSecurityWhereClause('Template Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
48027
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
48028
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Params', rows);
|
|
48029
|
+
return result;
|
|
48030
|
+
}
|
|
47974
48031
|
async CreateTemplateContent(input, { dataSources, userPayload }, pubSub) {
|
|
47975
48032
|
const connPool = GetReadWriteDataSource(dataSources);
|
|
47976
48033
|
return this.CreateRecord('Template Contents', input, connPool, userPayload, pubSub);
|
|
@@ -48021,6 +48078,15 @@ __decorate([
|
|
|
48021
48078
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
48022
48079
|
__metadata("design:returntype", Promise)
|
|
48023
48080
|
], TemplateContentResolver.prototype, "TemplateContent", null);
|
|
48081
|
+
__decorate([
|
|
48082
|
+
FieldResolver(() => [TemplateParam_]),
|
|
48083
|
+
__param(0, Root()),
|
|
48084
|
+
__param(1, Ctx()),
|
|
48085
|
+
__param(2, PubSub()),
|
|
48086
|
+
__metadata("design:type", Function),
|
|
48087
|
+
__metadata("design:paramtypes", [TemplateContent_, Object, PubSubEngine]),
|
|
48088
|
+
__metadata("design:returntype", Promise)
|
|
48089
|
+
], TemplateContentResolver.prototype, "TemplateParams_TemplateContentIDArray", null);
|
|
48024
48090
|
__decorate([
|
|
48025
48091
|
Mutation(() => TemplateContent_),
|
|
48026
48092
|
__param(0, Arg('input', () => CreateTemplateContentInput)),
|
|
@@ -48069,6 +48135,7 @@ let TemplateParam_ = class TemplateParam_ {
|
|
|
48069
48135
|
_mj__CreatedAt;
|
|
48070
48136
|
_mj__UpdatedAt;
|
|
48071
48137
|
OrderBy;
|
|
48138
|
+
TemplateContentID;
|
|
48072
48139
|
Template;
|
|
48073
48140
|
Entity;
|
|
48074
48141
|
};
|
|
@@ -48142,6 +48209,11 @@ __decorate([
|
|
|
48142
48209
|
Field({ nullable: true, description: `This field is used only when the Type of the TemplateParam table is "Entity". It is an optional field used to specify the sorting order for the related entity data that is used in the template for the Entity specified.` }),
|
|
48143
48210
|
__metadata("design:type", String)
|
|
48144
48211
|
], TemplateParam_.prototype, "OrderBy", void 0);
|
|
48212
|
+
__decorate([
|
|
48213
|
+
Field({ nullable: true, description: `Optional reference to a specific template content. When NULL, this parameter applies to all content items within the template. When set, this parameter applies only to the specified template content.` }),
|
|
48214
|
+
MaxLength(16),
|
|
48215
|
+
__metadata("design:type", String)
|
|
48216
|
+
], TemplateParam_.prototype, "TemplateContentID", void 0);
|
|
48145
48217
|
__decorate([
|
|
48146
48218
|
Field(),
|
|
48147
48219
|
MaxLength(510),
|
|
@@ -48170,6 +48242,7 @@ let CreateTemplateParamInput = class CreateTemplateParamInput {
|
|
|
48170
48242
|
EntityID;
|
|
48171
48243
|
RecordID;
|
|
48172
48244
|
OrderBy;
|
|
48245
|
+
TemplateContentID;
|
|
48173
48246
|
};
|
|
48174
48247
|
__decorate([
|
|
48175
48248
|
Field({ nullable: true }),
|
|
@@ -48223,6 +48296,10 @@ __decorate([
|
|
|
48223
48296
|
Field({ nullable: true }),
|
|
48224
48297
|
__metadata("design:type", String)
|
|
48225
48298
|
], CreateTemplateParamInput.prototype, "OrderBy", void 0);
|
|
48299
|
+
__decorate([
|
|
48300
|
+
Field({ nullable: true }),
|
|
48301
|
+
__metadata("design:type", String)
|
|
48302
|
+
], CreateTemplateParamInput.prototype, "TemplateContentID", void 0);
|
|
48226
48303
|
CreateTemplateParamInput = __decorate([
|
|
48227
48304
|
InputType()
|
|
48228
48305
|
], CreateTemplateParamInput);
|
|
@@ -48241,6 +48318,7 @@ let UpdateTemplateParamInput = class UpdateTemplateParamInput {
|
|
|
48241
48318
|
EntityID;
|
|
48242
48319
|
RecordID;
|
|
48243
48320
|
OrderBy;
|
|
48321
|
+
TemplateContentID;
|
|
48244
48322
|
OldValues___;
|
|
48245
48323
|
};
|
|
48246
48324
|
__decorate([
|
|
@@ -48295,6 +48373,10 @@ __decorate([
|
|
|
48295
48373
|
Field({ nullable: true }),
|
|
48296
48374
|
__metadata("design:type", String)
|
|
48297
48375
|
], UpdateTemplateParamInput.prototype, "OrderBy", void 0);
|
|
48376
|
+
__decorate([
|
|
48377
|
+
Field({ nullable: true }),
|
|
48378
|
+
__metadata("design:type", String)
|
|
48379
|
+
], UpdateTemplateParamInput.prototype, "TemplateContentID", void 0);
|
|
48298
48380
|
__decorate([
|
|
48299
48381
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
48300
48382
|
__metadata("design:type", Array)
|
|
@@ -60026,6 +60108,7 @@ let AIAgentRunStep_ = class AIAgentRunStep_ {
|
|
|
60026
60108
|
OutputData;
|
|
60027
60109
|
_mj__CreatedAt;
|
|
60028
60110
|
_mj__UpdatedAt;
|
|
60111
|
+
TargetLogID;
|
|
60029
60112
|
};
|
|
60030
60113
|
__decorate([
|
|
60031
60114
|
Field({ description: `Unique identifier for this execution step` }),
|
|
@@ -60097,6 +60180,11 @@ __decorate([
|
|
|
60097
60180
|
MaxLength(10),
|
|
60098
60181
|
__metadata("design:type", Date)
|
|
60099
60182
|
], AIAgentRunStep_.prototype, "_mj__UpdatedAt", void 0);
|
|
60183
|
+
__decorate([
|
|
60184
|
+
Field({ nullable: true, description: `ID of the execution log/run record created for this step (ActionExecutionLog.ID for action steps, AIAgentRun.ID for subagent steps, AIPromptRun.ID for prompt steps)` }),
|
|
60185
|
+
MaxLength(16),
|
|
60186
|
+
__metadata("design:type", String)
|
|
60187
|
+
], AIAgentRunStep_.prototype, "TargetLogID", void 0);
|
|
60100
60188
|
AIAgentRunStep_ = __decorate([
|
|
60101
60189
|
ObjectType()
|
|
60102
60190
|
], AIAgentRunStep_);
|
|
@@ -60115,6 +60203,7 @@ let CreateAIAgentRunStepInput = class CreateAIAgentRunStepInput {
|
|
|
60115
60203
|
ErrorMessage;
|
|
60116
60204
|
InputData;
|
|
60117
60205
|
OutputData;
|
|
60206
|
+
TargetLogID;
|
|
60118
60207
|
};
|
|
60119
60208
|
__decorate([
|
|
60120
60209
|
Field({ nullable: true }),
|
|
@@ -60168,6 +60257,10 @@ __decorate([
|
|
|
60168
60257
|
Field({ nullable: true }),
|
|
60169
60258
|
__metadata("design:type", String)
|
|
60170
60259
|
], CreateAIAgentRunStepInput.prototype, "OutputData", void 0);
|
|
60260
|
+
__decorate([
|
|
60261
|
+
Field({ nullable: true }),
|
|
60262
|
+
__metadata("design:type", String)
|
|
60263
|
+
], CreateAIAgentRunStepInput.prototype, "TargetLogID", void 0);
|
|
60171
60264
|
CreateAIAgentRunStepInput = __decorate([
|
|
60172
60265
|
InputType()
|
|
60173
60266
|
], CreateAIAgentRunStepInput);
|
|
@@ -60186,6 +60279,7 @@ let UpdateAIAgentRunStepInput = class UpdateAIAgentRunStepInput {
|
|
|
60186
60279
|
ErrorMessage;
|
|
60187
60280
|
InputData;
|
|
60188
60281
|
OutputData;
|
|
60282
|
+
TargetLogID;
|
|
60189
60283
|
OldValues___;
|
|
60190
60284
|
};
|
|
60191
60285
|
__decorate([
|
|
@@ -60240,6 +60334,10 @@ __decorate([
|
|
|
60240
60334
|
Field({ nullable: true }),
|
|
60241
60335
|
__metadata("design:type", String)
|
|
60242
60336
|
], UpdateAIAgentRunStepInput.prototype, "OutputData", void 0);
|
|
60337
|
+
__decorate([
|
|
60338
|
+
Field({ nullable: true }),
|
|
60339
|
+
__metadata("design:type", String)
|
|
60340
|
+
], UpdateAIAgentRunStepInput.prototype, "TargetLogID", void 0);
|
|
60243
60341
|
__decorate([
|
|
60244
60342
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
60245
60343
|
__metadata("design:type", Array)
|