@memberjunction/server 2.107.0 → 2.108.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/agents/skip-sdk.d.ts +11 -0
- package/dist/agents/skip-sdk.d.ts.map +1 -1
- package/dist/agents/skip-sdk.js +262 -3
- package/dist/agents/skip-sdk.js.map +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +3 -2
- package/dist/context.js.map +1 -1
- package/dist/generated/generated.d.ts +106 -4
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +684 -34
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +1 -0
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/package.json +34 -34
- package/src/agents/skip-sdk.ts +351 -8
- package/src/context.ts +3 -2
- package/src/generated/generated.ts +434 -27
- package/src/resolvers/RunAIAgentResolver.ts +1 -0
|
@@ -4460,6 +4460,7 @@ let MJAIAgent_ = class MJAIAgent_ {
|
|
|
4460
4460
|
ChatHandlingOption;
|
|
4461
4461
|
DefaultArtifactTypeID;
|
|
4462
4462
|
OwnerUserID;
|
|
4463
|
+
InvocationMode;
|
|
4463
4464
|
Parent;
|
|
4464
4465
|
ContextCompressionPrompt;
|
|
4465
4466
|
Type;
|
|
@@ -4666,6 +4667,11 @@ __decorate([
|
|
|
4666
4667
|
MaxLength(16),
|
|
4667
4668
|
__metadata("design:type", String)
|
|
4668
4669
|
], MJAIAgent_.prototype, "OwnerUserID", void 0);
|
|
4670
|
+
__decorate([
|
|
4671
|
+
Field({ description: `Controls how the agent can be invoked: Any (default - can be top-level or sub-agent), Top-Level (only callable as primary agent), Sub-Agent (only callable as sub-agent). Used to filter available agents in tools like Sage.` }),
|
|
4672
|
+
MaxLength(40),
|
|
4673
|
+
__metadata("design:type", String)
|
|
4674
|
+
], MJAIAgent_.prototype, "InvocationMode", void 0);
|
|
4669
4675
|
__decorate([
|
|
4670
4676
|
Field({ nullable: true }),
|
|
4671
4677
|
MaxLength(510),
|
|
@@ -4810,6 +4816,7 @@ let CreateMJAIAgentInput = class CreateMJAIAgentInput {
|
|
|
4810
4816
|
ChatHandlingOption;
|
|
4811
4817
|
DefaultArtifactTypeID;
|
|
4812
4818
|
OwnerUserID;
|
|
4819
|
+
InvocationMode;
|
|
4813
4820
|
};
|
|
4814
4821
|
__decorate([
|
|
4815
4822
|
Field({ nullable: true }),
|
|
@@ -4959,6 +4966,10 @@ __decorate([
|
|
|
4959
4966
|
Field({ nullable: true }),
|
|
4960
4967
|
__metadata("design:type", String)
|
|
4961
4968
|
], CreateMJAIAgentInput.prototype, "OwnerUserID", void 0);
|
|
4969
|
+
__decorate([
|
|
4970
|
+
Field({ nullable: true }),
|
|
4971
|
+
__metadata("design:type", String)
|
|
4972
|
+
], CreateMJAIAgentInput.prototype, "InvocationMode", void 0);
|
|
4962
4973
|
CreateMJAIAgentInput = __decorate([
|
|
4963
4974
|
InputType()
|
|
4964
4975
|
], CreateMJAIAgentInput);
|
|
@@ -5001,6 +5012,7 @@ let UpdateMJAIAgentInput = class UpdateMJAIAgentInput {
|
|
|
5001
5012
|
ChatHandlingOption;
|
|
5002
5013
|
DefaultArtifactTypeID;
|
|
5003
5014
|
OwnerUserID;
|
|
5015
|
+
InvocationMode;
|
|
5004
5016
|
OldValues___;
|
|
5005
5017
|
};
|
|
5006
5018
|
__decorate([
|
|
@@ -5151,6 +5163,10 @@ __decorate([
|
|
|
5151
5163
|
Field({ nullable: true }),
|
|
5152
5164
|
__metadata("design:type", String)
|
|
5153
5165
|
], UpdateMJAIAgentInput.prototype, "OwnerUserID", void 0);
|
|
5166
|
+
__decorate([
|
|
5167
|
+
Field({ nullable: true }),
|
|
5168
|
+
__metadata("design:type", String)
|
|
5169
|
+
], UpdateMJAIAgentInput.prototype, "InvocationMode", void 0);
|
|
5154
5170
|
__decorate([
|
|
5155
5171
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
5156
5172
|
__metadata("design:type", Array)
|
|
@@ -8066,8 +8082,14 @@ let MJAIAgentAction_ = class MJAIAgentAction_ {
|
|
|
8066
8082
|
_mj__UpdatedAt;
|
|
8067
8083
|
MinExecutionsPerRun;
|
|
8068
8084
|
MaxExecutionsPerRun;
|
|
8085
|
+
ResultExpirationTurns;
|
|
8086
|
+
ResultExpirationMode;
|
|
8087
|
+
CompactMode;
|
|
8088
|
+
CompactLength;
|
|
8089
|
+
CompactPromptID;
|
|
8069
8090
|
Agent;
|
|
8070
8091
|
Action;
|
|
8092
|
+
CompactPrompt;
|
|
8071
8093
|
};
|
|
8072
8094
|
__decorate([
|
|
8073
8095
|
Field({ description: `The unique identifier for each AI agent-action mapping. Serves as the primary key.` }),
|
|
@@ -8107,6 +8129,29 @@ __decorate([
|
|
|
8107
8129
|
Field(() => Int, { nullable: true, description: `Maximum number of times this action can be executed per agent run` }),
|
|
8108
8130
|
__metadata("design:type", Number)
|
|
8109
8131
|
], MJAIAgentAction_.prototype, "MaxExecutionsPerRun", void 0);
|
|
8132
|
+
__decorate([
|
|
8133
|
+
Field(() => Int, { nullable: true, description: `Number of conversation turns before action results expire from conversation context. NULL = never expire (default). 0 = expire immediately after next turn.` }),
|
|
8134
|
+
__metadata("design:type", Number)
|
|
8135
|
+
], MJAIAgentAction_.prototype, "ResultExpirationTurns", void 0);
|
|
8136
|
+
__decorate([
|
|
8137
|
+
Field({ description: `How to handle expired action results: None (no expiration, default), Remove (delete message entirely), Compact (reduce size via CompactMode while preserving key information).` }),
|
|
8138
|
+
MaxLength(40),
|
|
8139
|
+
__metadata("design:type", String)
|
|
8140
|
+
], MJAIAgentAction_.prototype, "ResultExpirationMode", void 0);
|
|
8141
|
+
__decorate([
|
|
8142
|
+
Field({ nullable: true, description: `How to compact results when ResultExpirationMode=Compact: FirstNChars (truncate to CompactLength characters, fast and free), AISummary (use LLM to intelligently summarize with CompactPromptID or Action.DefaultCompactPromptID).` }),
|
|
8143
|
+
MaxLength(40),
|
|
8144
|
+
__metadata("design:type", String)
|
|
8145
|
+
], MJAIAgentAction_.prototype, "CompactMode", void 0);
|
|
8146
|
+
__decorate([
|
|
8147
|
+
Field(() => Int, { nullable: true, description: `Number of characters to keep when CompactMode=FirstNChars. Required when CompactMode is FirstNChars, ignored otherwise.` }),
|
|
8148
|
+
__metadata("design:type", Number)
|
|
8149
|
+
], MJAIAgentAction_.prototype, "CompactLength", void 0);
|
|
8150
|
+
__decorate([
|
|
8151
|
+
Field({ nullable: true, description: `Optional override for AI summarization prompt when CompactMode=AISummary. Lookup hierarchy: this field -> Action.DefaultCompactPromptID -> system default. Allows agent-specific summarization focus (e.g., technical vs. marketing perspective).` }),
|
|
8152
|
+
MaxLength(16),
|
|
8153
|
+
__metadata("design:type", String)
|
|
8154
|
+
], MJAIAgentAction_.prototype, "CompactPromptID", void 0);
|
|
8110
8155
|
__decorate([
|
|
8111
8156
|
Field({ nullable: true }),
|
|
8112
8157
|
MaxLength(510),
|
|
@@ -8117,6 +8162,11 @@ __decorate([
|
|
|
8117
8162
|
MaxLength(850),
|
|
8118
8163
|
__metadata("design:type", String)
|
|
8119
8164
|
], MJAIAgentAction_.prototype, "Action", void 0);
|
|
8165
|
+
__decorate([
|
|
8166
|
+
Field({ nullable: true }),
|
|
8167
|
+
MaxLength(510),
|
|
8168
|
+
__metadata("design:type", String)
|
|
8169
|
+
], MJAIAgentAction_.prototype, "CompactPrompt", void 0);
|
|
8120
8170
|
MJAIAgentAction_ = __decorate([
|
|
8121
8171
|
ObjectType({ description: `Table to store the relationship between AI agents and actions.` })
|
|
8122
8172
|
], MJAIAgentAction_);
|
|
@@ -8128,6 +8178,11 @@ let CreateMJAIAgentActionInput = class CreateMJAIAgentActionInput {
|
|
|
8128
8178
|
Status;
|
|
8129
8179
|
MinExecutionsPerRun;
|
|
8130
8180
|
MaxExecutionsPerRun;
|
|
8181
|
+
ResultExpirationTurns;
|
|
8182
|
+
ResultExpirationMode;
|
|
8183
|
+
CompactMode;
|
|
8184
|
+
CompactLength;
|
|
8185
|
+
CompactPromptID;
|
|
8131
8186
|
};
|
|
8132
8187
|
__decorate([
|
|
8133
8188
|
Field({ nullable: true }),
|
|
@@ -8153,6 +8208,26 @@ __decorate([
|
|
|
8153
8208
|
Field(() => Int, { nullable: true }),
|
|
8154
8209
|
__metadata("design:type", Number)
|
|
8155
8210
|
], CreateMJAIAgentActionInput.prototype, "MaxExecutionsPerRun", void 0);
|
|
8211
|
+
__decorate([
|
|
8212
|
+
Field(() => Int, { nullable: true }),
|
|
8213
|
+
__metadata("design:type", Number)
|
|
8214
|
+
], CreateMJAIAgentActionInput.prototype, "ResultExpirationTurns", void 0);
|
|
8215
|
+
__decorate([
|
|
8216
|
+
Field({ nullable: true }),
|
|
8217
|
+
__metadata("design:type", String)
|
|
8218
|
+
], CreateMJAIAgentActionInput.prototype, "ResultExpirationMode", void 0);
|
|
8219
|
+
__decorate([
|
|
8220
|
+
Field({ nullable: true }),
|
|
8221
|
+
__metadata("design:type", String)
|
|
8222
|
+
], CreateMJAIAgentActionInput.prototype, "CompactMode", void 0);
|
|
8223
|
+
__decorate([
|
|
8224
|
+
Field(() => Int, { nullable: true }),
|
|
8225
|
+
__metadata("design:type", Number)
|
|
8226
|
+
], CreateMJAIAgentActionInput.prototype, "CompactLength", void 0);
|
|
8227
|
+
__decorate([
|
|
8228
|
+
Field({ nullable: true }),
|
|
8229
|
+
__metadata("design:type", String)
|
|
8230
|
+
], CreateMJAIAgentActionInput.prototype, "CompactPromptID", void 0);
|
|
8156
8231
|
CreateMJAIAgentActionInput = __decorate([
|
|
8157
8232
|
InputType()
|
|
8158
8233
|
], CreateMJAIAgentActionInput);
|
|
@@ -8164,6 +8239,11 @@ let UpdateMJAIAgentActionInput = class UpdateMJAIAgentActionInput {
|
|
|
8164
8239
|
Status;
|
|
8165
8240
|
MinExecutionsPerRun;
|
|
8166
8241
|
MaxExecutionsPerRun;
|
|
8242
|
+
ResultExpirationTurns;
|
|
8243
|
+
ResultExpirationMode;
|
|
8244
|
+
CompactMode;
|
|
8245
|
+
CompactLength;
|
|
8246
|
+
CompactPromptID;
|
|
8167
8247
|
OldValues___;
|
|
8168
8248
|
};
|
|
8169
8249
|
__decorate([
|
|
@@ -8190,6 +8270,26 @@ __decorate([
|
|
|
8190
8270
|
Field(() => Int, { nullable: true }),
|
|
8191
8271
|
__metadata("design:type", Number)
|
|
8192
8272
|
], UpdateMJAIAgentActionInput.prototype, "MaxExecutionsPerRun", void 0);
|
|
8273
|
+
__decorate([
|
|
8274
|
+
Field(() => Int, { nullable: true }),
|
|
8275
|
+
__metadata("design:type", Number)
|
|
8276
|
+
], UpdateMJAIAgentActionInput.prototype, "ResultExpirationTurns", void 0);
|
|
8277
|
+
__decorate([
|
|
8278
|
+
Field({ nullable: true }),
|
|
8279
|
+
__metadata("design:type", String)
|
|
8280
|
+
], UpdateMJAIAgentActionInput.prototype, "ResultExpirationMode", void 0);
|
|
8281
|
+
__decorate([
|
|
8282
|
+
Field({ nullable: true }),
|
|
8283
|
+
__metadata("design:type", String)
|
|
8284
|
+
], UpdateMJAIAgentActionInput.prototype, "CompactMode", void 0);
|
|
8285
|
+
__decorate([
|
|
8286
|
+
Field(() => Int, { nullable: true }),
|
|
8287
|
+
__metadata("design:type", Number)
|
|
8288
|
+
], UpdateMJAIAgentActionInput.prototype, "CompactLength", void 0);
|
|
8289
|
+
__decorate([
|
|
8290
|
+
Field({ nullable: true }),
|
|
8291
|
+
__metadata("design:type", String)
|
|
8292
|
+
], UpdateMJAIAgentActionInput.prototype, "CompactPromptID", void 0);
|
|
8193
8293
|
__decorate([
|
|
8194
8294
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
8195
8295
|
__metadata("design:type", Array)
|
|
@@ -9119,10 +9219,13 @@ let MJCollection_ = class MJCollection_ {
|
|
|
9119
9219
|
Sequence;
|
|
9120
9220
|
_mj__CreatedAt;
|
|
9121
9221
|
_mj__UpdatedAt;
|
|
9222
|
+
OwnerID;
|
|
9122
9223
|
Environment;
|
|
9123
9224
|
Parent;
|
|
9225
|
+
Owner;
|
|
9124
9226
|
RootParentID;
|
|
9125
9227
|
MJ_CollectionArtifacts_CollectionIDArray;
|
|
9228
|
+
MJ_CollectionPermissions_CollectionIDArray;
|
|
9126
9229
|
MJ_Collections_ParentIDArray;
|
|
9127
9230
|
};
|
|
9128
9231
|
__decorate([
|
|
@@ -9173,6 +9276,11 @@ __decorate([
|
|
|
9173
9276
|
MaxLength(10),
|
|
9174
9277
|
__metadata("design:type", Date)
|
|
9175
9278
|
], MJCollection_.prototype, "_mj__UpdatedAt", void 0);
|
|
9279
|
+
__decorate([
|
|
9280
|
+
Field({ nullable: true, description: `The user who owns this collection and has full permissions` }),
|
|
9281
|
+
MaxLength(16),
|
|
9282
|
+
__metadata("design:type", String)
|
|
9283
|
+
], MJCollection_.prototype, "OwnerID", void 0);
|
|
9176
9284
|
__decorate([
|
|
9177
9285
|
Field(),
|
|
9178
9286
|
MaxLength(510),
|
|
@@ -9183,6 +9291,11 @@ __decorate([
|
|
|
9183
9291
|
MaxLength(510),
|
|
9184
9292
|
__metadata("design:type", String)
|
|
9185
9293
|
], MJCollection_.prototype, "Parent", void 0);
|
|
9294
|
+
__decorate([
|
|
9295
|
+
Field({ nullable: true }),
|
|
9296
|
+
MaxLength(200),
|
|
9297
|
+
__metadata("design:type", String)
|
|
9298
|
+
], MJCollection_.prototype, "Owner", void 0);
|
|
9186
9299
|
__decorate([
|
|
9187
9300
|
Field({ nullable: true }),
|
|
9188
9301
|
MaxLength(16),
|
|
@@ -9192,6 +9305,10 @@ __decorate([
|
|
|
9192
9305
|
Field(() => [MJCollectionArtifact_]),
|
|
9193
9306
|
__metadata("design:type", Array)
|
|
9194
9307
|
], MJCollection_.prototype, "MJ_CollectionArtifacts_CollectionIDArray", void 0);
|
|
9308
|
+
__decorate([
|
|
9309
|
+
Field(() => [MJCollectionPermission_]),
|
|
9310
|
+
__metadata("design:type", Array)
|
|
9311
|
+
], MJCollection_.prototype, "MJ_CollectionPermissions_CollectionIDArray", void 0);
|
|
9195
9312
|
__decorate([
|
|
9196
9313
|
Field(() => [MJCollection_]),
|
|
9197
9314
|
__metadata("design:type", Array)
|
|
@@ -9209,6 +9326,7 @@ let CreateMJCollectionInput = class CreateMJCollectionInput {
|
|
|
9209
9326
|
Icon;
|
|
9210
9327
|
Color;
|
|
9211
9328
|
Sequence;
|
|
9329
|
+
OwnerID;
|
|
9212
9330
|
};
|
|
9213
9331
|
__decorate([
|
|
9214
9332
|
Field({ nullable: true }),
|
|
@@ -9242,6 +9360,10 @@ __decorate([
|
|
|
9242
9360
|
Field(() => Int, { nullable: true }),
|
|
9243
9361
|
__metadata("design:type", Number)
|
|
9244
9362
|
], CreateMJCollectionInput.prototype, "Sequence", void 0);
|
|
9363
|
+
__decorate([
|
|
9364
|
+
Field({ nullable: true }),
|
|
9365
|
+
__metadata("design:type", String)
|
|
9366
|
+
], CreateMJCollectionInput.prototype, "OwnerID", void 0);
|
|
9245
9367
|
CreateMJCollectionInput = __decorate([
|
|
9246
9368
|
InputType()
|
|
9247
9369
|
], CreateMJCollectionInput);
|
|
@@ -9255,6 +9377,7 @@ let UpdateMJCollectionInput = class UpdateMJCollectionInput {
|
|
|
9255
9377
|
Icon;
|
|
9256
9378
|
Color;
|
|
9257
9379
|
Sequence;
|
|
9380
|
+
OwnerID;
|
|
9258
9381
|
OldValues___;
|
|
9259
9382
|
};
|
|
9260
9383
|
__decorate([
|
|
@@ -9289,6 +9412,10 @@ __decorate([
|
|
|
9289
9412
|
Field(() => Int, { nullable: true }),
|
|
9290
9413
|
__metadata("design:type", Number)
|
|
9291
9414
|
], UpdateMJCollectionInput.prototype, "Sequence", void 0);
|
|
9415
|
+
__decorate([
|
|
9416
|
+
Field({ nullable: true }),
|
|
9417
|
+
__metadata("design:type", String)
|
|
9418
|
+
], UpdateMJCollectionInput.prototype, "OwnerID", void 0);
|
|
9292
9419
|
__decorate([
|
|
9293
9420
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
9294
9421
|
__metadata("design:type", Array)
|
|
@@ -9370,6 +9497,15 @@ let MJCollectionResolver = class MJCollectionResolver extends ResolverBase {
|
|
|
9370
9497
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Artifacts', rows);
|
|
9371
9498
|
return result;
|
|
9372
9499
|
}
|
|
9500
|
+
async MJ_CollectionPermissions_CollectionIDArray(mjcollection_, { dataSources, userPayload, providers }, pubSub) {
|
|
9501
|
+
this.CheckUserReadPermissions('MJ: Collection Permissions', userPayload);
|
|
9502
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9503
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9504
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionPermissions] WHERE [CollectionID]='${mjcollection_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9505
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9506
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Permissions', rows);
|
|
9507
|
+
return result;
|
|
9508
|
+
}
|
|
9373
9509
|
async MJ_Collections_ParentIDArray(mjcollection_, { dataSources, userPayload, providers }, pubSub) {
|
|
9374
9510
|
this.CheckUserReadPermissions('MJ: Collections', userPayload);
|
|
9375
9511
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -9438,6 +9574,15 @@ __decorate([
|
|
|
9438
9574
|
__metadata("design:paramtypes", [MJCollection_, Object, PubSubEngine]),
|
|
9439
9575
|
__metadata("design:returntype", Promise)
|
|
9440
9576
|
], MJCollectionResolver.prototype, "MJ_CollectionArtifacts_CollectionIDArray", null);
|
|
9577
|
+
__decorate([
|
|
9578
|
+
FieldResolver(() => [MJCollectionPermission_]),
|
|
9579
|
+
__param(0, Root()),
|
|
9580
|
+
__param(1, Ctx()),
|
|
9581
|
+
__param(2, PubSub()),
|
|
9582
|
+
__metadata("design:type", Function),
|
|
9583
|
+
__metadata("design:paramtypes", [MJCollection_, Object, PubSubEngine]),
|
|
9584
|
+
__metadata("design:returntype", Promise)
|
|
9585
|
+
], MJCollectionResolver.prototype, "MJ_CollectionPermissions_CollectionIDArray", null);
|
|
9441
9586
|
__decorate([
|
|
9442
9587
|
FieldResolver(() => [MJCollection_]),
|
|
9443
9588
|
__param(0, Root()),
|
|
@@ -9859,6 +10004,7 @@ let MJAIPrompt_ = class MJAIPrompt_ {
|
|
|
9859
10004
|
AIResultCache_AIPromptIDArray;
|
|
9860
10005
|
MJ_AIConfigurations_DefaultPromptForContextCompressionIDArray;
|
|
9861
10006
|
MJ_AIAgentTypes_SystemPromptIDArray;
|
|
10007
|
+
AIAgentActions_CompactPromptIDArray;
|
|
9862
10008
|
MJ_AIConfigurations_DefaultPromptForContextSummarizationIDArray;
|
|
9863
10009
|
AIPrompts_ResultSelectorPromptIDArray;
|
|
9864
10010
|
MJ_AIPromptModels_PromptIDArray;
|
|
@@ -9866,6 +10012,7 @@ let MJAIPrompt_ = class MJAIPrompt_ {
|
|
|
9866
10012
|
MJ_AIAgentSteps_PromptIDArray;
|
|
9867
10013
|
MJ_AIPromptRuns_PromptIDArray;
|
|
9868
10014
|
AIAgents_ContextCompressionPromptIDArray;
|
|
10015
|
+
Actions_DefaultCompactPromptIDArray;
|
|
9869
10016
|
};
|
|
9870
10017
|
__decorate([
|
|
9871
10018
|
Field(),
|
|
@@ -10138,6 +10285,10 @@ __decorate([
|
|
|
10138
10285
|
Field(() => [MJAIAgentType_]),
|
|
10139
10286
|
__metadata("design:type", Array)
|
|
10140
10287
|
], MJAIPrompt_.prototype, "MJ_AIAgentTypes_SystemPromptIDArray", void 0);
|
|
10288
|
+
__decorate([
|
|
10289
|
+
Field(() => [MJAIAgentAction_]),
|
|
10290
|
+
__metadata("design:type", Array)
|
|
10291
|
+
], MJAIPrompt_.prototype, "AIAgentActions_CompactPromptIDArray", void 0);
|
|
10141
10292
|
__decorate([
|
|
10142
10293
|
Field(() => [MJAIConfiguration_]),
|
|
10143
10294
|
__metadata("design:type", Array)
|
|
@@ -10166,6 +10317,10 @@ __decorate([
|
|
|
10166
10317
|
Field(() => [MJAIAgent_]),
|
|
10167
10318
|
__metadata("design:type", Array)
|
|
10168
10319
|
], MJAIPrompt_.prototype, "AIAgents_ContextCompressionPromptIDArray", void 0);
|
|
10320
|
+
__decorate([
|
|
10321
|
+
Field(() => [MJAction_]),
|
|
10322
|
+
__metadata("design:type", Array)
|
|
10323
|
+
], MJAIPrompt_.prototype, "Actions_DefaultCompactPromptIDArray", void 0);
|
|
10169
10324
|
MJAIPrompt_ = __decorate([
|
|
10170
10325
|
ObjectType({ description: `Stores AI prompts, including references to categories, types, and templates.` })
|
|
10171
10326
|
], MJAIPrompt_);
|
|
@@ -10768,6 +10923,15 @@ let MJAIPromptResolver = class MJAIPromptResolver extends ResolverBase {
|
|
|
10768
10923
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', rows);
|
|
10769
10924
|
return result;
|
|
10770
10925
|
}
|
|
10926
|
+
async AIAgentActions_CompactPromptIDArray(mjaiprompt_, { dataSources, userPayload, providers }, pubSub) {
|
|
10927
|
+
this.CheckUserReadPermissions('AI Agent Actions', userPayload);
|
|
10928
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10929
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10930
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [CompactPromptID]='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
10931
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10932
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Actions', rows);
|
|
10933
|
+
return result;
|
|
10934
|
+
}
|
|
10771
10935
|
async MJ_AIConfigurations_DefaultPromptForContextSummarizationIDArray(mjaiprompt_, { dataSources, userPayload, providers }, pubSub) {
|
|
10772
10936
|
this.CheckUserReadPermissions('MJ: AI Configurations', userPayload);
|
|
10773
10937
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -10831,6 +10995,15 @@ let MJAIPromptResolver = class MJAIPromptResolver extends ResolverBase {
|
|
|
10831
10995
|
const result = this.ArrayMapFieldNamesToCodeNames('AI Agents', rows);
|
|
10832
10996
|
return result;
|
|
10833
10997
|
}
|
|
10998
|
+
async Actions_DefaultCompactPromptIDArray(mjaiprompt_, { dataSources, userPayload, providers }, pubSub) {
|
|
10999
|
+
this.CheckUserReadPermissions('Actions', userPayload);
|
|
11000
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11001
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11002
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActions] WHERE [DefaultCompactPromptID]='${mjaiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
11003
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11004
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Actions', rows);
|
|
11005
|
+
return result;
|
|
11006
|
+
}
|
|
10834
11007
|
async CreateMJAIPrompt(input, { providers, userPayload }, pubSub) {
|
|
10835
11008
|
const provider = GetReadWriteProvider(providers);
|
|
10836
11009
|
return this.CreateRecord('AI Prompts', input, provider, userPayload, pubSub);
|
|
@@ -10908,6 +11081,15 @@ __decorate([
|
|
|
10908
11081
|
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
10909
11082
|
__metadata("design:returntype", Promise)
|
|
10910
11083
|
], MJAIPromptResolver.prototype, "MJ_AIAgentTypes_SystemPromptIDArray", null);
|
|
11084
|
+
__decorate([
|
|
11085
|
+
FieldResolver(() => [MJAIAgentAction_]),
|
|
11086
|
+
__param(0, Root()),
|
|
11087
|
+
__param(1, Ctx()),
|
|
11088
|
+
__param(2, PubSub()),
|
|
11089
|
+
__metadata("design:type", Function),
|
|
11090
|
+
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
11091
|
+
__metadata("design:returntype", Promise)
|
|
11092
|
+
], MJAIPromptResolver.prototype, "AIAgentActions_CompactPromptIDArray", null);
|
|
10911
11093
|
__decorate([
|
|
10912
11094
|
FieldResolver(() => [MJAIConfiguration_]),
|
|
10913
11095
|
__param(0, Root()),
|
|
@@ -10971,6 +11153,15 @@ __decorate([
|
|
|
10971
11153
|
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
10972
11154
|
__metadata("design:returntype", Promise)
|
|
10973
11155
|
], MJAIPromptResolver.prototype, "AIAgents_ContextCompressionPromptIDArray", null);
|
|
11156
|
+
__decorate([
|
|
11157
|
+
FieldResolver(() => [MJAction_]),
|
|
11158
|
+
__param(0, Root()),
|
|
11159
|
+
__param(1, Ctx()),
|
|
11160
|
+
__param(2, PubSub()),
|
|
11161
|
+
__metadata("design:type", Function),
|
|
11162
|
+
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
11163
|
+
__metadata("design:returntype", Promise)
|
|
11164
|
+
], MJAIPromptResolver.prototype, "Actions_DefaultCompactPromptIDArray", null);
|
|
10974
11165
|
__decorate([
|
|
10975
11166
|
Mutation(() => MJAIPrompt_),
|
|
10976
11167
|
__param(0, Arg('input', () => CreateMJAIPromptInput)),
|
|
@@ -16727,8 +16918,8 @@ let MJEntity_ = class MJEntity_ {
|
|
|
16727
16918
|
RecommendationItems_DestinationEntityIDArray;
|
|
16728
16919
|
EntityCommunicationMessageTypes_EntityIDArray;
|
|
16729
16920
|
QueryEntities_EntityIDArray;
|
|
16730
|
-
MJ_AccessControlRules_EntityIDArray;
|
|
16731
16921
|
MJ_RecordLinks_SourceEntityIDArray;
|
|
16922
|
+
MJ_AccessControlRules_EntityIDArray;
|
|
16732
16923
|
GeneratedCodes_LinkedEntityIDArray;
|
|
16733
16924
|
MJ_RecordLinks_TargetEntityIDArray;
|
|
16734
16925
|
};
|
|
@@ -17159,14 +17350,14 @@ __decorate([
|
|
|
17159
17350
|
Field(() => [MJQueryEntity_]),
|
|
17160
17351
|
__metadata("design:type", Array)
|
|
17161
17352
|
], MJEntity_.prototype, "QueryEntities_EntityIDArray", void 0);
|
|
17162
|
-
__decorate([
|
|
17163
|
-
Field(() => [MJAccessControlRule_]),
|
|
17164
|
-
__metadata("design:type", Array)
|
|
17165
|
-
], MJEntity_.prototype, "MJ_AccessControlRules_EntityIDArray", void 0);
|
|
17166
17353
|
__decorate([
|
|
17167
17354
|
Field(() => [MJRecordLink_]),
|
|
17168
17355
|
__metadata("design:type", Array)
|
|
17169
17356
|
], MJEntity_.prototype, "MJ_RecordLinks_SourceEntityIDArray", void 0);
|
|
17357
|
+
__decorate([
|
|
17358
|
+
Field(() => [MJAccessControlRule_]),
|
|
17359
|
+
__metadata("design:type", Array)
|
|
17360
|
+
], MJEntity_.prototype, "MJ_AccessControlRules_EntityIDArray", void 0);
|
|
17170
17361
|
__decorate([
|
|
17171
17362
|
Field(() => [MJGeneratedCode_]),
|
|
17172
17363
|
__metadata("design:type", Array)
|
|
@@ -18123,22 +18314,22 @@ let MJEntityResolverBase = class MJEntityResolverBase extends ResolverBase {
|
|
|
18123
18314
|
const result = this.ArrayMapFieldNamesToCodeNames('Query Entities', rows);
|
|
18124
18315
|
return result;
|
|
18125
18316
|
}
|
|
18126
|
-
async
|
|
18127
|
-
this.CheckUserReadPermissions('MJ:
|
|
18317
|
+
async MJ_RecordLinks_SourceEntityIDArray(mjentity_, { dataSources, userPayload, providers }, pubSub) {
|
|
18318
|
+
this.CheckUserReadPermissions('MJ: Record Links', userPayload);
|
|
18128
18319
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18129
18320
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
18130
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
18321
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordLinks] WHERE [SourceEntityID]='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
18131
18322
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
18132
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
18323
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Record Links', rows);
|
|
18133
18324
|
return result;
|
|
18134
18325
|
}
|
|
18135
|
-
async
|
|
18136
|
-
this.CheckUserReadPermissions('MJ:
|
|
18326
|
+
async MJ_AccessControlRules_EntityIDArray(mjentity_, { dataSources, userPayload, providers }, pubSub) {
|
|
18327
|
+
this.CheckUserReadPermissions('MJ: Access Control Rules', userPayload);
|
|
18137
18328
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18138
18329
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
18139
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
18330
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAccessControlRules] WHERE [EntityID]='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Access Control Rules', userPayload, EntityPermissionType.Read, 'AND');
|
|
18140
18331
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
18141
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
18332
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Access Control Rules', rows);
|
|
18142
18333
|
return result;
|
|
18143
18334
|
}
|
|
18144
18335
|
async GeneratedCodes_LinkedEntityIDArray(mjentity_, { dataSources, userPayload, providers }, pubSub) {
|
|
@@ -18542,23 +18733,23 @@ __decorate([
|
|
|
18542
18733
|
__metadata("design:returntype", Promise)
|
|
18543
18734
|
], MJEntityResolverBase.prototype, "QueryEntities_EntityIDArray", null);
|
|
18544
18735
|
__decorate([
|
|
18545
|
-
FieldResolver(() => [
|
|
18736
|
+
FieldResolver(() => [MJRecordLink_]),
|
|
18546
18737
|
__param(0, Root()),
|
|
18547
18738
|
__param(1, Ctx()),
|
|
18548
18739
|
__param(2, PubSub()),
|
|
18549
18740
|
__metadata("design:type", Function),
|
|
18550
18741
|
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
18551
18742
|
__metadata("design:returntype", Promise)
|
|
18552
|
-
], MJEntityResolverBase.prototype, "
|
|
18743
|
+
], MJEntityResolverBase.prototype, "MJ_RecordLinks_SourceEntityIDArray", null);
|
|
18553
18744
|
__decorate([
|
|
18554
|
-
FieldResolver(() => [
|
|
18745
|
+
FieldResolver(() => [MJAccessControlRule_]),
|
|
18555
18746
|
__param(0, Root()),
|
|
18556
18747
|
__param(1, Ctx()),
|
|
18557
18748
|
__param(2, PubSub()),
|
|
18558
18749
|
__metadata("design:type", Function),
|
|
18559
18750
|
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
18560
18751
|
__metadata("design:returntype", Promise)
|
|
18561
|
-
], MJEntityResolverBase.prototype, "
|
|
18752
|
+
], MJEntityResolverBase.prototype, "MJ_AccessControlRules_EntityIDArray", null);
|
|
18562
18753
|
__decorate([
|
|
18563
18754
|
FieldResolver(() => [MJGeneratedCode_]),
|
|
18564
18755
|
__param(0, Root()),
|
|
@@ -18670,16 +18861,19 @@ let MJUser_ = class MJUser_ {
|
|
|
18670
18861
|
MJ_DashboardUserStates_UserIDArray;
|
|
18671
18862
|
MJ_ArtifactVersions_UserIDArray;
|
|
18672
18863
|
MJ_PublicLinks_UserIDArray;
|
|
18673
|
-
MJ_ScheduledJobs_NotifyUserIDArray;
|
|
18674
18864
|
MJ_ScheduledJobRuns_ExecutedByUserIDArray;
|
|
18865
|
+
MJ_ScheduledJobs_NotifyUserIDArray;
|
|
18675
18866
|
ResourcePermissions_UserIDArray;
|
|
18676
18867
|
AIAgentRequests_RequestForUserIDArray;
|
|
18677
18868
|
ConversationDetails_UserIDArray;
|
|
18678
18869
|
MJ_AccessControlRules_GrantedByUserIDArray;
|
|
18679
18870
|
MJ_Artifacts_UserIDArray;
|
|
18680
18871
|
MJ_ScheduledJobs_OwnerUserIDArray;
|
|
18872
|
+
MJ_CollectionPermissions_SharedByUserIDArray;
|
|
18681
18873
|
MJ_AIAgentRuns_UserIDArray;
|
|
18682
18874
|
MJ_AIAgentPermissions_UserIDArray;
|
|
18875
|
+
MJ_CollectionPermissions_UserIDArray;
|
|
18876
|
+
MJ_Collections_OwnerIDArray;
|
|
18683
18877
|
MJ_Tasks_UserIDArray;
|
|
18684
18878
|
AIAgents_OwnerUserIDArray;
|
|
18685
18879
|
};
|
|
@@ -18942,14 +19136,14 @@ __decorate([
|
|
|
18942
19136
|
Field(() => [MJPublicLink_]),
|
|
18943
19137
|
__metadata("design:type", Array)
|
|
18944
19138
|
], MJUser_.prototype, "MJ_PublicLinks_UserIDArray", void 0);
|
|
18945
|
-
__decorate([
|
|
18946
|
-
Field(() => [MJScheduledJob_]),
|
|
18947
|
-
__metadata("design:type", Array)
|
|
18948
|
-
], MJUser_.prototype, "MJ_ScheduledJobs_NotifyUserIDArray", void 0);
|
|
18949
19139
|
__decorate([
|
|
18950
19140
|
Field(() => [MJScheduledJobRun_]),
|
|
18951
19141
|
__metadata("design:type", Array)
|
|
18952
19142
|
], MJUser_.prototype, "MJ_ScheduledJobRuns_ExecutedByUserIDArray", void 0);
|
|
19143
|
+
__decorate([
|
|
19144
|
+
Field(() => [MJScheduledJob_]),
|
|
19145
|
+
__metadata("design:type", Array)
|
|
19146
|
+
], MJUser_.prototype, "MJ_ScheduledJobs_NotifyUserIDArray", void 0);
|
|
18953
19147
|
__decorate([
|
|
18954
19148
|
Field(() => [MJResourcePermission_]),
|
|
18955
19149
|
__metadata("design:type", Array)
|
|
@@ -18974,6 +19168,10 @@ __decorate([
|
|
|
18974
19168
|
Field(() => [MJScheduledJob_]),
|
|
18975
19169
|
__metadata("design:type", Array)
|
|
18976
19170
|
], MJUser_.prototype, "MJ_ScheduledJobs_OwnerUserIDArray", void 0);
|
|
19171
|
+
__decorate([
|
|
19172
|
+
Field(() => [MJCollectionPermission_]),
|
|
19173
|
+
__metadata("design:type", Array)
|
|
19174
|
+
], MJUser_.prototype, "MJ_CollectionPermissions_SharedByUserIDArray", void 0);
|
|
18977
19175
|
__decorate([
|
|
18978
19176
|
Field(() => [MJAIAgentRun_]),
|
|
18979
19177
|
__metadata("design:type", Array)
|
|
@@ -18982,6 +19180,14 @@ __decorate([
|
|
|
18982
19180
|
Field(() => [MJAIAgentPermission_]),
|
|
18983
19181
|
__metadata("design:type", Array)
|
|
18984
19182
|
], MJUser_.prototype, "MJ_AIAgentPermissions_UserIDArray", void 0);
|
|
19183
|
+
__decorate([
|
|
19184
|
+
Field(() => [MJCollectionPermission_]),
|
|
19185
|
+
__metadata("design:type", Array)
|
|
19186
|
+
], MJUser_.prototype, "MJ_CollectionPermissions_UserIDArray", void 0);
|
|
19187
|
+
__decorate([
|
|
19188
|
+
Field(() => [MJCollection_]),
|
|
19189
|
+
__metadata("design:type", Array)
|
|
19190
|
+
], MJUser_.prototype, "MJ_Collections_OwnerIDArray", void 0);
|
|
18985
19191
|
__decorate([
|
|
18986
19192
|
Field(() => [MJTask_]),
|
|
18987
19193
|
__metadata("design:type", Array)
|
|
@@ -19564,22 +19770,22 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
19564
19770
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Public Links', rows);
|
|
19565
19771
|
return result;
|
|
19566
19772
|
}
|
|
19567
|
-
async
|
|
19568
|
-
this.CheckUserReadPermissions('MJ: Scheduled
|
|
19773
|
+
async MJ_ScheduledJobRuns_ExecutedByUserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
19774
|
+
this.CheckUserReadPermissions('MJ: Scheduled Job Runs', userPayload);
|
|
19569
19775
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19570
19776
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19571
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
19777
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwScheduledJobRuns] WHERE [ExecutedByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Job Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
19572
19778
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
19573
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled
|
|
19779
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Job Runs', rows);
|
|
19574
19780
|
return result;
|
|
19575
19781
|
}
|
|
19576
|
-
async
|
|
19577
|
-
this.CheckUserReadPermissions('MJ: Scheduled
|
|
19782
|
+
async MJ_ScheduledJobs_NotifyUserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
19783
|
+
this.CheckUserReadPermissions('MJ: Scheduled Jobs', userPayload);
|
|
19578
19784
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19579
19785
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19580
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
19786
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwScheduledJobs] WHERE [NotifyUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Jobs', userPayload, EntityPermissionType.Read, 'AND');
|
|
19581
19787
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
19582
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled
|
|
19788
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Jobs', rows);
|
|
19583
19789
|
return result;
|
|
19584
19790
|
}
|
|
19585
19791
|
async ResourcePermissions_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
@@ -19636,6 +19842,15 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
19636
19842
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Jobs', rows);
|
|
19637
19843
|
return result;
|
|
19638
19844
|
}
|
|
19845
|
+
async MJ_CollectionPermissions_SharedByUserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
19846
|
+
this.CheckUserReadPermissions('MJ: Collection Permissions', userPayload);
|
|
19847
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19848
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19849
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionPermissions] WHERE [SharedByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
19850
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
19851
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Permissions', rows);
|
|
19852
|
+
return result;
|
|
19853
|
+
}
|
|
19639
19854
|
async MJ_AIAgentRuns_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
19640
19855
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
19641
19856
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -19654,6 +19869,24 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
19654
19869
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Permissions', rows);
|
|
19655
19870
|
return result;
|
|
19656
19871
|
}
|
|
19872
|
+
async MJ_CollectionPermissions_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
19873
|
+
this.CheckUserReadPermissions('MJ: Collection Permissions', userPayload);
|
|
19874
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19875
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19876
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionPermissions] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
19877
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
19878
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Permissions', rows);
|
|
19879
|
+
return result;
|
|
19880
|
+
}
|
|
19881
|
+
async MJ_Collections_OwnerIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
19882
|
+
this.CheckUserReadPermissions('MJ: Collections', userPayload);
|
|
19883
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19884
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19885
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollections] WHERE [OwnerID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collections', userPayload, EntityPermissionType.Read, 'AND');
|
|
19886
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
19887
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collections', rows);
|
|
19888
|
+
return result;
|
|
19889
|
+
}
|
|
19657
19890
|
async MJ_Tasks_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
19658
19891
|
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
19659
19892
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -20091,23 +20324,23 @@ __decorate([
|
|
|
20091
20324
|
__metadata("design:returntype", Promise)
|
|
20092
20325
|
], MJUserResolverBase.prototype, "MJ_PublicLinks_UserIDArray", null);
|
|
20093
20326
|
__decorate([
|
|
20094
|
-
FieldResolver(() => [
|
|
20327
|
+
FieldResolver(() => [MJScheduledJobRun_]),
|
|
20095
20328
|
__param(0, Root()),
|
|
20096
20329
|
__param(1, Ctx()),
|
|
20097
20330
|
__param(2, PubSub()),
|
|
20098
20331
|
__metadata("design:type", Function),
|
|
20099
20332
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20100
20333
|
__metadata("design:returntype", Promise)
|
|
20101
|
-
], MJUserResolverBase.prototype, "
|
|
20334
|
+
], MJUserResolverBase.prototype, "MJ_ScheduledJobRuns_ExecutedByUserIDArray", null);
|
|
20102
20335
|
__decorate([
|
|
20103
|
-
FieldResolver(() => [
|
|
20336
|
+
FieldResolver(() => [MJScheduledJob_]),
|
|
20104
20337
|
__param(0, Root()),
|
|
20105
20338
|
__param(1, Ctx()),
|
|
20106
20339
|
__param(2, PubSub()),
|
|
20107
20340
|
__metadata("design:type", Function),
|
|
20108
20341
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20109
20342
|
__metadata("design:returntype", Promise)
|
|
20110
|
-
], MJUserResolverBase.prototype, "
|
|
20343
|
+
], MJUserResolverBase.prototype, "MJ_ScheduledJobs_NotifyUserIDArray", null);
|
|
20111
20344
|
__decorate([
|
|
20112
20345
|
FieldResolver(() => [MJResourcePermission_]),
|
|
20113
20346
|
__param(0, Root()),
|
|
@@ -20162,6 +20395,15 @@ __decorate([
|
|
|
20162
20395
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20163
20396
|
__metadata("design:returntype", Promise)
|
|
20164
20397
|
], MJUserResolverBase.prototype, "MJ_ScheduledJobs_OwnerUserIDArray", null);
|
|
20398
|
+
__decorate([
|
|
20399
|
+
FieldResolver(() => [MJCollectionPermission_]),
|
|
20400
|
+
__param(0, Root()),
|
|
20401
|
+
__param(1, Ctx()),
|
|
20402
|
+
__param(2, PubSub()),
|
|
20403
|
+
__metadata("design:type", Function),
|
|
20404
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20405
|
+
__metadata("design:returntype", Promise)
|
|
20406
|
+
], MJUserResolverBase.prototype, "MJ_CollectionPermissions_SharedByUserIDArray", null);
|
|
20165
20407
|
__decorate([
|
|
20166
20408
|
FieldResolver(() => [MJAIAgentRun_]),
|
|
20167
20409
|
__param(0, Root()),
|
|
@@ -20180,6 +20422,24 @@ __decorate([
|
|
|
20180
20422
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20181
20423
|
__metadata("design:returntype", Promise)
|
|
20182
20424
|
], MJUserResolverBase.prototype, "MJ_AIAgentPermissions_UserIDArray", null);
|
|
20425
|
+
__decorate([
|
|
20426
|
+
FieldResolver(() => [MJCollectionPermission_]),
|
|
20427
|
+
__param(0, Root()),
|
|
20428
|
+
__param(1, Ctx()),
|
|
20429
|
+
__param(2, PubSub()),
|
|
20430
|
+
__metadata("design:type", Function),
|
|
20431
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20432
|
+
__metadata("design:returntype", Promise)
|
|
20433
|
+
], MJUserResolverBase.prototype, "MJ_CollectionPermissions_UserIDArray", null);
|
|
20434
|
+
__decorate([
|
|
20435
|
+
FieldResolver(() => [MJCollection_]),
|
|
20436
|
+
__param(0, Root()),
|
|
20437
|
+
__param(1, Ctx()),
|
|
20438
|
+
__param(2, PubSub()),
|
|
20439
|
+
__metadata("design:type", Function),
|
|
20440
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20441
|
+
__metadata("design:returntype", Promise)
|
|
20442
|
+
], MJUserResolverBase.prototype, "MJ_Collections_OwnerIDArray", null);
|
|
20183
20443
|
__decorate([
|
|
20184
20444
|
FieldResolver(() => [MJTask_]),
|
|
20185
20445
|
__param(0, Root()),
|
|
@@ -36983,6 +37243,7 @@ let MJConversationDetail_ = class MJConversationDetail_ {
|
|
|
36983
37243
|
ParentID;
|
|
36984
37244
|
AgentID;
|
|
36985
37245
|
Status;
|
|
37246
|
+
SuggestedResponses;
|
|
36986
37247
|
Conversation;
|
|
36987
37248
|
User;
|
|
36988
37249
|
Artifact;
|
|
@@ -37090,6 +37351,10 @@ __decorate([
|
|
|
37090
37351
|
MaxLength(40),
|
|
37091
37352
|
__metadata("design:type", String)
|
|
37092
37353
|
], MJConversationDetail_.prototype, "Status", void 0);
|
|
37354
|
+
__decorate([
|
|
37355
|
+
Field({ nullable: true, description: `JSON array of suggested responses that can be displayed to the user for quick replies. Each response object contains: text (display text), allowInput (boolean), iconClass (optional Font Awesome class), and data (optional payload).` }),
|
|
37356
|
+
__metadata("design:type", String)
|
|
37357
|
+
], MJConversationDetail_.prototype, "SuggestedResponses", void 0);
|
|
37093
37358
|
__decorate([
|
|
37094
37359
|
Field({ nullable: true }),
|
|
37095
37360
|
MaxLength(510),
|
|
@@ -37159,6 +37424,7 @@ let CreateMJConversationDetailInput = class CreateMJConversationDetailInput {
|
|
|
37159
37424
|
ParentID;
|
|
37160
37425
|
AgentID;
|
|
37161
37426
|
Status;
|
|
37427
|
+
SuggestedResponses;
|
|
37162
37428
|
};
|
|
37163
37429
|
__decorate([
|
|
37164
37430
|
Field({ nullable: true }),
|
|
@@ -37236,6 +37502,10 @@ __decorate([
|
|
|
37236
37502
|
Field({ nullable: true }),
|
|
37237
37503
|
__metadata("design:type", String)
|
|
37238
37504
|
], CreateMJConversationDetailInput.prototype, "Status", void 0);
|
|
37505
|
+
__decorate([
|
|
37506
|
+
Field({ nullable: true }),
|
|
37507
|
+
__metadata("design:type", String)
|
|
37508
|
+
], CreateMJConversationDetailInput.prototype, "SuggestedResponses", void 0);
|
|
37239
37509
|
CreateMJConversationDetailInput = __decorate([
|
|
37240
37510
|
InputType()
|
|
37241
37511
|
], CreateMJConversationDetailInput);
|
|
@@ -37260,6 +37530,7 @@ let UpdateMJConversationDetailInput = class UpdateMJConversationDetailInput {
|
|
|
37260
37530
|
ParentID;
|
|
37261
37531
|
AgentID;
|
|
37262
37532
|
Status;
|
|
37533
|
+
SuggestedResponses;
|
|
37263
37534
|
OldValues___;
|
|
37264
37535
|
};
|
|
37265
37536
|
__decorate([
|
|
@@ -37338,6 +37609,10 @@ __decorate([
|
|
|
37338
37609
|
Field({ nullable: true }),
|
|
37339
37610
|
__metadata("design:type", String)
|
|
37340
37611
|
], UpdateMJConversationDetailInput.prototype, "Status", void 0);
|
|
37612
|
+
__decorate([
|
|
37613
|
+
Field({ nullable: true }),
|
|
37614
|
+
__metadata("design:type", String)
|
|
37615
|
+
], UpdateMJConversationDetailInput.prototype, "SuggestedResponses", void 0);
|
|
37341
37616
|
__decorate([
|
|
37342
37617
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
37343
37618
|
__metadata("design:type", Array)
|
|
@@ -49783,9 +50058,11 @@ let MJAction_ = class MJAction_ {
|
|
|
49783
50058
|
DriverClass;
|
|
49784
50059
|
ParentID;
|
|
49785
50060
|
IconClass;
|
|
50061
|
+
DefaultCompactPromptID;
|
|
49786
50062
|
Category;
|
|
49787
50063
|
CodeApprovedByUser;
|
|
49788
50064
|
Parent;
|
|
50065
|
+
DefaultCompactPrompt;
|
|
49789
50066
|
RootParentID;
|
|
49790
50067
|
ActionParams_ActionIDArray;
|
|
49791
50068
|
ActionLibraries_ActionIDArray;
|
|
@@ -49900,6 +50177,11 @@ __decorate([
|
|
|
49900
50177
|
MaxLength(200),
|
|
49901
50178
|
__metadata("design:type", String)
|
|
49902
50179
|
], MJAction_.prototype, "IconClass", void 0);
|
|
50180
|
+
__decorate([
|
|
50181
|
+
Field({ nullable: true, description: `Default prompt for compacting/summarizing this action's results when used by agents with CompactMode=AISummary. Action designers define how their specific results should be summarized. Can be overridden per agent in AIAgentAction.CompactPromptID.` }),
|
|
50182
|
+
MaxLength(16),
|
|
50183
|
+
__metadata("design:type", String)
|
|
50184
|
+
], MJAction_.prototype, "DefaultCompactPromptID", void 0);
|
|
49903
50185
|
__decorate([
|
|
49904
50186
|
Field({ nullable: true }),
|
|
49905
50187
|
MaxLength(510),
|
|
@@ -49915,6 +50197,11 @@ __decorate([
|
|
|
49915
50197
|
MaxLength(850),
|
|
49916
50198
|
__metadata("design:type", String)
|
|
49917
50199
|
], MJAction_.prototype, "Parent", void 0);
|
|
50200
|
+
__decorate([
|
|
50201
|
+
Field({ nullable: true }),
|
|
50202
|
+
MaxLength(510),
|
|
50203
|
+
__metadata("design:type", String)
|
|
50204
|
+
], MJAction_.prototype, "DefaultCompactPrompt", void 0);
|
|
49918
50205
|
__decorate([
|
|
49919
50206
|
Field({ nullable: true }),
|
|
49920
50207
|
MaxLength(16),
|
|
@@ -49989,6 +50276,7 @@ let CreateMJActionInput = class CreateMJActionInput {
|
|
|
49989
50276
|
DriverClass;
|
|
49990
50277
|
ParentID;
|
|
49991
50278
|
IconClass;
|
|
50279
|
+
DefaultCompactPromptID;
|
|
49992
50280
|
};
|
|
49993
50281
|
__decorate([
|
|
49994
50282
|
Field({ nullable: true }),
|
|
@@ -50070,6 +50358,10 @@ __decorate([
|
|
|
50070
50358
|
Field({ nullable: true }),
|
|
50071
50359
|
__metadata("design:type", String)
|
|
50072
50360
|
], CreateMJActionInput.prototype, "IconClass", void 0);
|
|
50361
|
+
__decorate([
|
|
50362
|
+
Field({ nullable: true }),
|
|
50363
|
+
__metadata("design:type", String)
|
|
50364
|
+
], CreateMJActionInput.prototype, "DefaultCompactPromptID", void 0);
|
|
50073
50365
|
CreateMJActionInput = __decorate([
|
|
50074
50366
|
InputType()
|
|
50075
50367
|
], CreateMJActionInput);
|
|
@@ -50095,6 +50387,7 @@ let UpdateMJActionInput = class UpdateMJActionInput {
|
|
|
50095
50387
|
DriverClass;
|
|
50096
50388
|
ParentID;
|
|
50097
50389
|
IconClass;
|
|
50390
|
+
DefaultCompactPromptID;
|
|
50098
50391
|
OldValues___;
|
|
50099
50392
|
};
|
|
50100
50393
|
__decorate([
|
|
@@ -50177,6 +50470,10 @@ __decorate([
|
|
|
50177
50470
|
Field({ nullable: true }),
|
|
50178
50471
|
__metadata("design:type", String)
|
|
50179
50472
|
], UpdateMJActionInput.prototype, "IconClass", void 0);
|
|
50473
|
+
__decorate([
|
|
50474
|
+
Field({ nullable: true }),
|
|
50475
|
+
__metadata("design:type", String)
|
|
50476
|
+
], UpdateMJActionInput.prototype, "DefaultCompactPromptID", void 0);
|
|
50180
50477
|
__decorate([
|
|
50181
50478
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
50182
50479
|
__metadata("design:type", Array)
|
|
@@ -65806,6 +66103,329 @@ MJConversationArtifactResolver = __decorate([
|
|
|
65806
66103
|
Resolver(MJConversationArtifact_)
|
|
65807
66104
|
], MJConversationArtifactResolver);
|
|
65808
66105
|
export { MJConversationArtifactResolver };
|
|
66106
|
+
let MJCollectionPermission_ = class MJCollectionPermission_ {
|
|
66107
|
+
ID;
|
|
66108
|
+
CollectionID;
|
|
66109
|
+
UserID;
|
|
66110
|
+
CanRead;
|
|
66111
|
+
CanShare;
|
|
66112
|
+
CanEdit;
|
|
66113
|
+
CanDelete;
|
|
66114
|
+
SharedByUserID;
|
|
66115
|
+
_mj__CreatedAt;
|
|
66116
|
+
_mj__UpdatedAt;
|
|
66117
|
+
Collection;
|
|
66118
|
+
User;
|
|
66119
|
+
SharedByUser;
|
|
66120
|
+
};
|
|
66121
|
+
__decorate([
|
|
66122
|
+
Field(),
|
|
66123
|
+
MaxLength(16),
|
|
66124
|
+
__metadata("design:type", String)
|
|
66125
|
+
], MJCollectionPermission_.prototype, "ID", void 0);
|
|
66126
|
+
__decorate([
|
|
66127
|
+
Field(),
|
|
66128
|
+
MaxLength(16),
|
|
66129
|
+
__metadata("design:type", String)
|
|
66130
|
+
], MJCollectionPermission_.prototype, "CollectionID", void 0);
|
|
66131
|
+
__decorate([
|
|
66132
|
+
Field(),
|
|
66133
|
+
MaxLength(16),
|
|
66134
|
+
__metadata("design:type", String)
|
|
66135
|
+
], MJCollectionPermission_.prototype, "UserID", void 0);
|
|
66136
|
+
__decorate([
|
|
66137
|
+
Field(() => Boolean, { description: `Always 1 - users must have read permission to access a shared collection` }),
|
|
66138
|
+
__metadata("design:type", Boolean)
|
|
66139
|
+
], MJCollectionPermission_.prototype, "CanRead", void 0);
|
|
66140
|
+
__decorate([
|
|
66141
|
+
Field(() => Boolean, { description: `Can share this collection with others (but cannot grant more permissions than they have)` }),
|
|
66142
|
+
__metadata("design:type", Boolean)
|
|
66143
|
+
], MJCollectionPermission_.prototype, "CanShare", void 0);
|
|
66144
|
+
__decorate([
|
|
66145
|
+
Field(() => Boolean, { description: `Can add/remove artifacts to/from this collection` }),
|
|
66146
|
+
__metadata("design:type", Boolean)
|
|
66147
|
+
], MJCollectionPermission_.prototype, "CanEdit", void 0);
|
|
66148
|
+
__decorate([
|
|
66149
|
+
Field(() => Boolean, { description: `Can delete the collection, child collections, and artifacts` }),
|
|
66150
|
+
__metadata("design:type", Boolean)
|
|
66151
|
+
], MJCollectionPermission_.prototype, "CanDelete", void 0);
|
|
66152
|
+
__decorate([
|
|
66153
|
+
Field({ nullable: true, description: `The user who shared this collection (NULL if shared by owner)` }),
|
|
66154
|
+
MaxLength(16),
|
|
66155
|
+
__metadata("design:type", String)
|
|
66156
|
+
], MJCollectionPermission_.prototype, "SharedByUserID", void 0);
|
|
66157
|
+
__decorate([
|
|
66158
|
+
Field(),
|
|
66159
|
+
MaxLength(10),
|
|
66160
|
+
__metadata("design:type", Date)
|
|
66161
|
+
], MJCollectionPermission_.prototype, "_mj__CreatedAt", void 0);
|
|
66162
|
+
__decorate([
|
|
66163
|
+
Field(),
|
|
66164
|
+
MaxLength(10),
|
|
66165
|
+
__metadata("design:type", Date)
|
|
66166
|
+
], MJCollectionPermission_.prototype, "_mj__UpdatedAt", void 0);
|
|
66167
|
+
__decorate([
|
|
66168
|
+
Field(),
|
|
66169
|
+
MaxLength(510),
|
|
66170
|
+
__metadata("design:type", String)
|
|
66171
|
+
], MJCollectionPermission_.prototype, "Collection", void 0);
|
|
66172
|
+
__decorate([
|
|
66173
|
+
Field(),
|
|
66174
|
+
MaxLength(200),
|
|
66175
|
+
__metadata("design:type", String)
|
|
66176
|
+
], MJCollectionPermission_.prototype, "User", void 0);
|
|
66177
|
+
__decorate([
|
|
66178
|
+
Field({ nullable: true }),
|
|
66179
|
+
MaxLength(200),
|
|
66180
|
+
__metadata("design:type", String)
|
|
66181
|
+
], MJCollectionPermission_.prototype, "SharedByUser", void 0);
|
|
66182
|
+
MJCollectionPermission_ = __decorate([
|
|
66183
|
+
ObjectType({ description: `Manages sharing permissions for collections, allowing granular access control` })
|
|
66184
|
+
], MJCollectionPermission_);
|
|
66185
|
+
export { MJCollectionPermission_ };
|
|
66186
|
+
let CreateMJCollectionPermissionInput = class CreateMJCollectionPermissionInput {
|
|
66187
|
+
ID;
|
|
66188
|
+
CollectionID;
|
|
66189
|
+
UserID;
|
|
66190
|
+
CanRead;
|
|
66191
|
+
CanShare;
|
|
66192
|
+
CanEdit;
|
|
66193
|
+
CanDelete;
|
|
66194
|
+
SharedByUserID;
|
|
66195
|
+
};
|
|
66196
|
+
__decorate([
|
|
66197
|
+
Field({ nullable: true }),
|
|
66198
|
+
__metadata("design:type", String)
|
|
66199
|
+
], CreateMJCollectionPermissionInput.prototype, "ID", void 0);
|
|
66200
|
+
__decorate([
|
|
66201
|
+
Field({ nullable: true }),
|
|
66202
|
+
__metadata("design:type", String)
|
|
66203
|
+
], CreateMJCollectionPermissionInput.prototype, "CollectionID", void 0);
|
|
66204
|
+
__decorate([
|
|
66205
|
+
Field({ nullable: true }),
|
|
66206
|
+
__metadata("design:type", String)
|
|
66207
|
+
], CreateMJCollectionPermissionInput.prototype, "UserID", void 0);
|
|
66208
|
+
__decorate([
|
|
66209
|
+
Field(() => Boolean, { nullable: true }),
|
|
66210
|
+
__metadata("design:type", Boolean)
|
|
66211
|
+
], CreateMJCollectionPermissionInput.prototype, "CanRead", void 0);
|
|
66212
|
+
__decorate([
|
|
66213
|
+
Field(() => Boolean, { nullable: true }),
|
|
66214
|
+
__metadata("design:type", Boolean)
|
|
66215
|
+
], CreateMJCollectionPermissionInput.prototype, "CanShare", void 0);
|
|
66216
|
+
__decorate([
|
|
66217
|
+
Field(() => Boolean, { nullable: true }),
|
|
66218
|
+
__metadata("design:type", Boolean)
|
|
66219
|
+
], CreateMJCollectionPermissionInput.prototype, "CanEdit", void 0);
|
|
66220
|
+
__decorate([
|
|
66221
|
+
Field(() => Boolean, { nullable: true }),
|
|
66222
|
+
__metadata("design:type", Boolean)
|
|
66223
|
+
], CreateMJCollectionPermissionInput.prototype, "CanDelete", void 0);
|
|
66224
|
+
__decorate([
|
|
66225
|
+
Field({ nullable: true }),
|
|
66226
|
+
__metadata("design:type", String)
|
|
66227
|
+
], CreateMJCollectionPermissionInput.prototype, "SharedByUserID", void 0);
|
|
66228
|
+
CreateMJCollectionPermissionInput = __decorate([
|
|
66229
|
+
InputType()
|
|
66230
|
+
], CreateMJCollectionPermissionInput);
|
|
66231
|
+
export { CreateMJCollectionPermissionInput };
|
|
66232
|
+
let UpdateMJCollectionPermissionInput = class UpdateMJCollectionPermissionInput {
|
|
66233
|
+
ID;
|
|
66234
|
+
CollectionID;
|
|
66235
|
+
UserID;
|
|
66236
|
+
CanRead;
|
|
66237
|
+
CanShare;
|
|
66238
|
+
CanEdit;
|
|
66239
|
+
CanDelete;
|
|
66240
|
+
SharedByUserID;
|
|
66241
|
+
OldValues___;
|
|
66242
|
+
};
|
|
66243
|
+
__decorate([
|
|
66244
|
+
Field(),
|
|
66245
|
+
__metadata("design:type", String)
|
|
66246
|
+
], UpdateMJCollectionPermissionInput.prototype, "ID", void 0);
|
|
66247
|
+
__decorate([
|
|
66248
|
+
Field({ nullable: true }),
|
|
66249
|
+
__metadata("design:type", String)
|
|
66250
|
+
], UpdateMJCollectionPermissionInput.prototype, "CollectionID", void 0);
|
|
66251
|
+
__decorate([
|
|
66252
|
+
Field({ nullable: true }),
|
|
66253
|
+
__metadata("design:type", String)
|
|
66254
|
+
], UpdateMJCollectionPermissionInput.prototype, "UserID", void 0);
|
|
66255
|
+
__decorate([
|
|
66256
|
+
Field(() => Boolean, { nullable: true }),
|
|
66257
|
+
__metadata("design:type", Boolean)
|
|
66258
|
+
], UpdateMJCollectionPermissionInput.prototype, "CanRead", void 0);
|
|
66259
|
+
__decorate([
|
|
66260
|
+
Field(() => Boolean, { nullable: true }),
|
|
66261
|
+
__metadata("design:type", Boolean)
|
|
66262
|
+
], UpdateMJCollectionPermissionInput.prototype, "CanShare", void 0);
|
|
66263
|
+
__decorate([
|
|
66264
|
+
Field(() => Boolean, { nullable: true }),
|
|
66265
|
+
__metadata("design:type", Boolean)
|
|
66266
|
+
], UpdateMJCollectionPermissionInput.prototype, "CanEdit", void 0);
|
|
66267
|
+
__decorate([
|
|
66268
|
+
Field(() => Boolean, { nullable: true }),
|
|
66269
|
+
__metadata("design:type", Boolean)
|
|
66270
|
+
], UpdateMJCollectionPermissionInput.prototype, "CanDelete", void 0);
|
|
66271
|
+
__decorate([
|
|
66272
|
+
Field({ nullable: true }),
|
|
66273
|
+
__metadata("design:type", String)
|
|
66274
|
+
], UpdateMJCollectionPermissionInput.prototype, "SharedByUserID", void 0);
|
|
66275
|
+
__decorate([
|
|
66276
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
66277
|
+
__metadata("design:type", Array)
|
|
66278
|
+
], UpdateMJCollectionPermissionInput.prototype, "OldValues___", void 0);
|
|
66279
|
+
UpdateMJCollectionPermissionInput = __decorate([
|
|
66280
|
+
InputType()
|
|
66281
|
+
], UpdateMJCollectionPermissionInput);
|
|
66282
|
+
export { UpdateMJCollectionPermissionInput };
|
|
66283
|
+
let RunMJCollectionPermissionViewResult = class RunMJCollectionPermissionViewResult {
|
|
66284
|
+
Results;
|
|
66285
|
+
UserViewRunID;
|
|
66286
|
+
RowCount;
|
|
66287
|
+
TotalRowCount;
|
|
66288
|
+
ExecutionTime;
|
|
66289
|
+
ErrorMessage;
|
|
66290
|
+
Success;
|
|
66291
|
+
};
|
|
66292
|
+
__decorate([
|
|
66293
|
+
Field(() => [MJCollectionPermission_]),
|
|
66294
|
+
__metadata("design:type", Array)
|
|
66295
|
+
], RunMJCollectionPermissionViewResult.prototype, "Results", void 0);
|
|
66296
|
+
__decorate([
|
|
66297
|
+
Field(() => String, { nullable: true }),
|
|
66298
|
+
__metadata("design:type", String)
|
|
66299
|
+
], RunMJCollectionPermissionViewResult.prototype, "UserViewRunID", void 0);
|
|
66300
|
+
__decorate([
|
|
66301
|
+
Field(() => Int, { nullable: true }),
|
|
66302
|
+
__metadata("design:type", Number)
|
|
66303
|
+
], RunMJCollectionPermissionViewResult.prototype, "RowCount", void 0);
|
|
66304
|
+
__decorate([
|
|
66305
|
+
Field(() => Int, { nullable: true }),
|
|
66306
|
+
__metadata("design:type", Number)
|
|
66307
|
+
], RunMJCollectionPermissionViewResult.prototype, "TotalRowCount", void 0);
|
|
66308
|
+
__decorate([
|
|
66309
|
+
Field(() => Int, { nullable: true }),
|
|
66310
|
+
__metadata("design:type", Number)
|
|
66311
|
+
], RunMJCollectionPermissionViewResult.prototype, "ExecutionTime", void 0);
|
|
66312
|
+
__decorate([
|
|
66313
|
+
Field({ nullable: true }),
|
|
66314
|
+
__metadata("design:type", String)
|
|
66315
|
+
], RunMJCollectionPermissionViewResult.prototype, "ErrorMessage", void 0);
|
|
66316
|
+
__decorate([
|
|
66317
|
+
Field(() => Boolean, { nullable: false }),
|
|
66318
|
+
__metadata("design:type", Boolean)
|
|
66319
|
+
], RunMJCollectionPermissionViewResult.prototype, "Success", void 0);
|
|
66320
|
+
RunMJCollectionPermissionViewResult = __decorate([
|
|
66321
|
+
ObjectType()
|
|
66322
|
+
], RunMJCollectionPermissionViewResult);
|
|
66323
|
+
export { RunMJCollectionPermissionViewResult };
|
|
66324
|
+
let MJCollectionPermissionResolver = class MJCollectionPermissionResolver extends ResolverBase {
|
|
66325
|
+
async RunMJCollectionPermissionViewByID(input, { providers, userPayload }, pubSub) {
|
|
66326
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66327
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
66328
|
+
}
|
|
66329
|
+
async RunMJCollectionPermissionViewByName(input, { providers, userPayload }, pubSub) {
|
|
66330
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66331
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
66332
|
+
}
|
|
66333
|
+
async RunMJCollectionPermissionDynamicView(input, { providers, userPayload }, pubSub) {
|
|
66334
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66335
|
+
input.EntityName = 'MJ: Collection Permissions';
|
|
66336
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
66337
|
+
}
|
|
66338
|
+
async MJCollectionPermission(ID, { dataSources, userPayload, providers }, pubSub) {
|
|
66339
|
+
this.CheckUserReadPermissions('MJ: Collection Permissions', userPayload);
|
|
66340
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66341
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
66342
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionPermissions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
66343
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
66344
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Collection Permissions', rows && rows.length > 0 ? rows[0] : {});
|
|
66345
|
+
return result;
|
|
66346
|
+
}
|
|
66347
|
+
async CreateMJCollectionPermission(input, { providers, userPayload }, pubSub) {
|
|
66348
|
+
const provider = GetReadWriteProvider(providers);
|
|
66349
|
+
return this.CreateRecord('MJ: Collection Permissions', input, provider, userPayload, pubSub);
|
|
66350
|
+
}
|
|
66351
|
+
async UpdateMJCollectionPermission(input, { providers, userPayload }, pubSub) {
|
|
66352
|
+
const provider = GetReadWriteProvider(providers);
|
|
66353
|
+
return this.UpdateRecord('MJ: Collection Permissions', input, provider, userPayload, pubSub);
|
|
66354
|
+
}
|
|
66355
|
+
async DeleteMJCollectionPermission(ID, options, { providers, userPayload }, pubSub) {
|
|
66356
|
+
const provider = GetReadWriteProvider(providers);
|
|
66357
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
66358
|
+
return this.DeleteRecord('MJ: Collection Permissions', key, options, provider, userPayload, pubSub);
|
|
66359
|
+
}
|
|
66360
|
+
};
|
|
66361
|
+
__decorate([
|
|
66362
|
+
Query(() => RunMJCollectionPermissionViewResult),
|
|
66363
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
66364
|
+
__param(1, Ctx()),
|
|
66365
|
+
__param(2, PubSub()),
|
|
66366
|
+
__metadata("design:type", Function),
|
|
66367
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
66368
|
+
__metadata("design:returntype", Promise)
|
|
66369
|
+
], MJCollectionPermissionResolver.prototype, "RunMJCollectionPermissionViewByID", null);
|
|
66370
|
+
__decorate([
|
|
66371
|
+
Query(() => RunMJCollectionPermissionViewResult),
|
|
66372
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
66373
|
+
__param(1, Ctx()),
|
|
66374
|
+
__param(2, PubSub()),
|
|
66375
|
+
__metadata("design:type", Function),
|
|
66376
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
66377
|
+
__metadata("design:returntype", Promise)
|
|
66378
|
+
], MJCollectionPermissionResolver.prototype, "RunMJCollectionPermissionViewByName", null);
|
|
66379
|
+
__decorate([
|
|
66380
|
+
Query(() => RunMJCollectionPermissionViewResult),
|
|
66381
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
66382
|
+
__param(1, Ctx()),
|
|
66383
|
+
__param(2, PubSub()),
|
|
66384
|
+
__metadata("design:type", Function),
|
|
66385
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
66386
|
+
__metadata("design:returntype", Promise)
|
|
66387
|
+
], MJCollectionPermissionResolver.prototype, "RunMJCollectionPermissionDynamicView", null);
|
|
66388
|
+
__decorate([
|
|
66389
|
+
Query(() => MJCollectionPermission_, { nullable: true }),
|
|
66390
|
+
__param(0, Arg('ID', () => String)),
|
|
66391
|
+
__param(1, Ctx()),
|
|
66392
|
+
__param(2, PubSub()),
|
|
66393
|
+
__metadata("design:type", Function),
|
|
66394
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
66395
|
+
__metadata("design:returntype", Promise)
|
|
66396
|
+
], MJCollectionPermissionResolver.prototype, "MJCollectionPermission", null);
|
|
66397
|
+
__decorate([
|
|
66398
|
+
Mutation(() => MJCollectionPermission_),
|
|
66399
|
+
__param(0, Arg('input', () => CreateMJCollectionPermissionInput)),
|
|
66400
|
+
__param(1, Ctx()),
|
|
66401
|
+
__param(2, PubSub()),
|
|
66402
|
+
__metadata("design:type", Function),
|
|
66403
|
+
__metadata("design:paramtypes", [CreateMJCollectionPermissionInput, Object, PubSubEngine]),
|
|
66404
|
+
__metadata("design:returntype", Promise)
|
|
66405
|
+
], MJCollectionPermissionResolver.prototype, "CreateMJCollectionPermission", null);
|
|
66406
|
+
__decorate([
|
|
66407
|
+
Mutation(() => MJCollectionPermission_),
|
|
66408
|
+
__param(0, Arg('input', () => UpdateMJCollectionPermissionInput)),
|
|
66409
|
+
__param(1, Ctx()),
|
|
66410
|
+
__param(2, PubSub()),
|
|
66411
|
+
__metadata("design:type", Function),
|
|
66412
|
+
__metadata("design:paramtypes", [UpdateMJCollectionPermissionInput, Object, PubSubEngine]),
|
|
66413
|
+
__metadata("design:returntype", Promise)
|
|
66414
|
+
], MJCollectionPermissionResolver.prototype, "UpdateMJCollectionPermission", null);
|
|
66415
|
+
__decorate([
|
|
66416
|
+
Mutation(() => MJCollectionPermission_),
|
|
66417
|
+
__param(0, Arg('ID', () => String)),
|
|
66418
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
66419
|
+
__param(2, Ctx()),
|
|
66420
|
+
__param(3, PubSub()),
|
|
66421
|
+
__metadata("design:type", Function),
|
|
66422
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
66423
|
+
__metadata("design:returntype", Promise)
|
|
66424
|
+
], MJCollectionPermissionResolver.prototype, "DeleteMJCollectionPermission", null);
|
|
66425
|
+
MJCollectionPermissionResolver = __decorate([
|
|
66426
|
+
Resolver(MJCollectionPermission_)
|
|
66427
|
+
], MJCollectionPermissionResolver);
|
|
66428
|
+
export { MJCollectionPermissionResolver };
|
|
65809
66429
|
let MJAIAgentPrompt_ = class MJAIAgentPrompt_ {
|
|
65810
66430
|
ID;
|
|
65811
66431
|
AgentID;
|
|
@@ -67866,6 +68486,8 @@ let MJAIAgentRelationship_ = class MJAIAgentRelationship_ {
|
|
|
67866
68486
|
_mj__CreatedAt;
|
|
67867
68487
|
_mj__UpdatedAt;
|
|
67868
68488
|
SubAgentOutputMapping;
|
|
68489
|
+
SubAgentInputMapping;
|
|
68490
|
+
SubAgentContextPaths;
|
|
67869
68491
|
Agent;
|
|
67870
68492
|
SubAgent;
|
|
67871
68493
|
};
|
|
@@ -67903,6 +68525,14 @@ __decorate([
|
|
|
67903
68525
|
Field({ nullable: true, description: `JSON configuration mapping sub-agent result payload paths to parent agent payload paths. Enables controlled merging of sub-agent results. Format: {"subAgentPath": "parentPath", "*": "captureAllPath"}. If null, sub-agent results are not automatically merged into parent payload.` }),
|
|
67904
68526
|
__metadata("design:type", String)
|
|
67905
68527
|
], MJAIAgentRelationship_.prototype, "SubAgentOutputMapping", void 0);
|
|
68528
|
+
__decorate([
|
|
68529
|
+
Field({ nullable: true, description: `JSON mapping of parent payload paths to sub-agent initial payload paths. Enables structural data transfer from parent to related sub-agent. Format: {"parentPath": "subAgentPath", "parent.nested": "subAgent.field"}. Example: {"searchQuery": "query", "maxResults": "limit"}. If null, sub-agent starts with empty payload (default behavior).` }),
|
|
68530
|
+
__metadata("design:type", String)
|
|
68531
|
+
], MJAIAgentRelationship_.prototype, "SubAgentInputMapping", void 0);
|
|
68532
|
+
__decorate([
|
|
68533
|
+
Field({ nullable: true, description: `JSON array of parent payload paths to send as LLM context to related sub-agent. Sub-agent receives this data in a formatted context message before its task message. Format: ["path1", "path2.nested", "path3.*", "*"]. Use "*" to send entire parent payload. Example: ["userPreferences", "priorFindings.summary", "sources[*]"]. If null, no parent context is sent (default behavior).` }),
|
|
68534
|
+
__metadata("design:type", String)
|
|
68535
|
+
], MJAIAgentRelationship_.prototype, "SubAgentContextPaths", void 0);
|
|
67906
68536
|
__decorate([
|
|
67907
68537
|
Field({ nullable: true }),
|
|
67908
68538
|
MaxLength(510),
|
|
@@ -67923,6 +68553,8 @@ let CreateMJAIAgentRelationshipInput = class CreateMJAIAgentRelationshipInput {
|
|
|
67923
68553
|
SubAgentID;
|
|
67924
68554
|
Status;
|
|
67925
68555
|
SubAgentOutputMapping;
|
|
68556
|
+
SubAgentInputMapping;
|
|
68557
|
+
SubAgentContextPaths;
|
|
67926
68558
|
};
|
|
67927
68559
|
__decorate([
|
|
67928
68560
|
Field({ nullable: true }),
|
|
@@ -67944,6 +68576,14 @@ __decorate([
|
|
|
67944
68576
|
Field({ nullable: true }),
|
|
67945
68577
|
__metadata("design:type", String)
|
|
67946
68578
|
], CreateMJAIAgentRelationshipInput.prototype, "SubAgentOutputMapping", void 0);
|
|
68579
|
+
__decorate([
|
|
68580
|
+
Field({ nullable: true }),
|
|
68581
|
+
__metadata("design:type", String)
|
|
68582
|
+
], CreateMJAIAgentRelationshipInput.prototype, "SubAgentInputMapping", void 0);
|
|
68583
|
+
__decorate([
|
|
68584
|
+
Field({ nullable: true }),
|
|
68585
|
+
__metadata("design:type", String)
|
|
68586
|
+
], CreateMJAIAgentRelationshipInput.prototype, "SubAgentContextPaths", void 0);
|
|
67947
68587
|
CreateMJAIAgentRelationshipInput = __decorate([
|
|
67948
68588
|
InputType()
|
|
67949
68589
|
], CreateMJAIAgentRelationshipInput);
|
|
@@ -67954,6 +68594,8 @@ let UpdateMJAIAgentRelationshipInput = class UpdateMJAIAgentRelationshipInput {
|
|
|
67954
68594
|
SubAgentID;
|
|
67955
68595
|
Status;
|
|
67956
68596
|
SubAgentOutputMapping;
|
|
68597
|
+
SubAgentInputMapping;
|
|
68598
|
+
SubAgentContextPaths;
|
|
67957
68599
|
OldValues___;
|
|
67958
68600
|
};
|
|
67959
68601
|
__decorate([
|
|
@@ -67976,6 +68618,14 @@ __decorate([
|
|
|
67976
68618
|
Field({ nullable: true }),
|
|
67977
68619
|
__metadata("design:type", String)
|
|
67978
68620
|
], UpdateMJAIAgentRelationshipInput.prototype, "SubAgentOutputMapping", void 0);
|
|
68621
|
+
__decorate([
|
|
68622
|
+
Field({ nullable: true }),
|
|
68623
|
+
__metadata("design:type", String)
|
|
68624
|
+
], UpdateMJAIAgentRelationshipInput.prototype, "SubAgentInputMapping", void 0);
|
|
68625
|
+
__decorate([
|
|
68626
|
+
Field({ nullable: true }),
|
|
68627
|
+
__metadata("design:type", String)
|
|
68628
|
+
], UpdateMJAIAgentRelationshipInput.prototype, "SubAgentContextPaths", void 0);
|
|
67979
68629
|
__decorate([
|
|
67980
68630
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
67981
68631
|
__metadata("design:type", Array)
|