@memberjunction/server 2.108.0 → 2.109.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-agent.d.ts.map +1 -1
- package/dist/agents/skip-agent.js +6 -13
- package/dist/agents/skip-agent.js.map +1 -1
- package/dist/generated/generated.d.ts +152 -2
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +932 -17
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +35 -34
- package/src/agents/skip-agent.ts +37 -47
- package/src/generated/generated.ts +591 -14
- package/src/index.ts +4 -0
|
@@ -4475,6 +4475,7 @@ let MJAIAgent_ = class MJAIAgent_ {
|
|
|
4475
4475
|
MJ_AIAgentRelationships_AgentIDArray;
|
|
4476
4476
|
MJ_AIAgentArtifactTypes_AgentIDArray;
|
|
4477
4477
|
MJ_AIAgentPermissions_AgentIDArray;
|
|
4478
|
+
MJ_AIAgentDataSources_AgentIDArray;
|
|
4478
4479
|
AIAgentNotes_AgentIDArray;
|
|
4479
4480
|
MJ_AIAgentPrompts_AgentIDArray;
|
|
4480
4481
|
MJ_AIAgentRuns_AgentIDArray;
|
|
@@ -4734,6 +4735,10 @@ __decorate([
|
|
|
4734
4735
|
Field(() => [MJAIAgentPermission_]),
|
|
4735
4736
|
__metadata("design:type", Array)
|
|
4736
4737
|
], MJAIAgent_.prototype, "MJ_AIAgentPermissions_AgentIDArray", void 0);
|
|
4738
|
+
__decorate([
|
|
4739
|
+
Field(() => [MJAIAgentDataSource_]),
|
|
4740
|
+
__metadata("design:type", Array)
|
|
4741
|
+
], MJAIAgent_.prototype, "MJ_AIAgentDataSources_AgentIDArray", void 0);
|
|
4737
4742
|
__decorate([
|
|
4738
4743
|
Field(() => [MJAIAgentNote_]),
|
|
4739
4744
|
__metadata("design:type", Array)
|
|
@@ -5311,6 +5316,15 @@ let MJAIAgentResolver = class MJAIAgentResolver extends ResolverBase {
|
|
|
5311
5316
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Permissions', rows);
|
|
5312
5317
|
return result;
|
|
5313
5318
|
}
|
|
5319
|
+
async MJ_AIAgentDataSources_AgentIDArray(mjaiagent_, { dataSources, userPayload, providers }, pubSub) {
|
|
5320
|
+
this.CheckUserReadPermissions('MJ: AI Agent Data Sources', userPayload);
|
|
5321
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5322
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5323
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentDataSources] WHERE [AgentID]='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Data Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
5324
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5325
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Data Sources', rows);
|
|
5326
|
+
return result;
|
|
5327
|
+
}
|
|
5314
5328
|
async AIAgentNotes_AgentIDArray(mjaiagent_, { dataSources, userPayload, providers }, pubSub) {
|
|
5315
5329
|
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
5316
5330
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -5523,6 +5537,15 @@ __decorate([
|
|
|
5523
5537
|
__metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
|
|
5524
5538
|
__metadata("design:returntype", Promise)
|
|
5525
5539
|
], MJAIAgentResolver.prototype, "MJ_AIAgentPermissions_AgentIDArray", null);
|
|
5540
|
+
__decorate([
|
|
5541
|
+
FieldResolver(() => [MJAIAgentDataSource_]),
|
|
5542
|
+
__param(0, Root()),
|
|
5543
|
+
__param(1, Ctx()),
|
|
5544
|
+
__param(2, PubSub()),
|
|
5545
|
+
__metadata("design:type", Function),
|
|
5546
|
+
__metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
|
|
5547
|
+
__metadata("design:returntype", Promise)
|
|
5548
|
+
], MJAIAgentResolver.prototype, "MJ_AIAgentDataSources_AgentIDArray", null);
|
|
5526
5549
|
__decorate([
|
|
5527
5550
|
FieldResolver(() => [MJAIAgentNote_]),
|
|
5528
5551
|
__param(0, Root()),
|
|
@@ -8073,6 +8096,329 @@ MJEnvironmentResolver = __decorate([
|
|
|
8073
8096
|
Resolver(MJEnvironment_)
|
|
8074
8097
|
], MJEnvironmentResolver);
|
|
8075
8098
|
export { MJEnvironmentResolver };
|
|
8099
|
+
let MJArtifactPermission_ = class MJArtifactPermission_ {
|
|
8100
|
+
ID;
|
|
8101
|
+
ArtifactID;
|
|
8102
|
+
UserID;
|
|
8103
|
+
CanRead;
|
|
8104
|
+
CanEdit;
|
|
8105
|
+
CanDelete;
|
|
8106
|
+
CanShare;
|
|
8107
|
+
SharedByUserID;
|
|
8108
|
+
_mj__CreatedAt;
|
|
8109
|
+
_mj__UpdatedAt;
|
|
8110
|
+
Artifact;
|
|
8111
|
+
User;
|
|
8112
|
+
SharedByUser;
|
|
8113
|
+
};
|
|
8114
|
+
__decorate([
|
|
8115
|
+
Field(),
|
|
8116
|
+
MaxLength(16),
|
|
8117
|
+
__metadata("design:type", String)
|
|
8118
|
+
], MJArtifactPermission_.prototype, "ID", void 0);
|
|
8119
|
+
__decorate([
|
|
8120
|
+
Field(),
|
|
8121
|
+
MaxLength(16),
|
|
8122
|
+
__metadata("design:type", String)
|
|
8123
|
+
], MJArtifactPermission_.prototype, "ArtifactID", void 0);
|
|
8124
|
+
__decorate([
|
|
8125
|
+
Field(),
|
|
8126
|
+
MaxLength(16),
|
|
8127
|
+
__metadata("design:type", String)
|
|
8128
|
+
], MJArtifactPermission_.prototype, "UserID", void 0);
|
|
8129
|
+
__decorate([
|
|
8130
|
+
Field(() => Boolean, { description: `Whether the user can view/read the artifact` }),
|
|
8131
|
+
__metadata("design:type", Boolean)
|
|
8132
|
+
], MJArtifactPermission_.prototype, "CanRead", void 0);
|
|
8133
|
+
__decorate([
|
|
8134
|
+
Field(() => Boolean, { description: `Whether the user can modify the artifact or create new versions` }),
|
|
8135
|
+
__metadata("design:type", Boolean)
|
|
8136
|
+
], MJArtifactPermission_.prototype, "CanEdit", void 0);
|
|
8137
|
+
__decorate([
|
|
8138
|
+
Field(() => Boolean, { description: `Whether the user can delete the artifact` }),
|
|
8139
|
+
__metadata("design:type", Boolean)
|
|
8140
|
+
], MJArtifactPermission_.prototype, "CanDelete", void 0);
|
|
8141
|
+
__decorate([
|
|
8142
|
+
Field(() => Boolean, { description: `Whether the user can share the artifact with other users` }),
|
|
8143
|
+
__metadata("design:type", Boolean)
|
|
8144
|
+
], MJArtifactPermission_.prototype, "CanShare", void 0);
|
|
8145
|
+
__decorate([
|
|
8146
|
+
Field({ nullable: true, description: `Foreign key to the User who shared this artifact (if shared)` }),
|
|
8147
|
+
MaxLength(16),
|
|
8148
|
+
__metadata("design:type", String)
|
|
8149
|
+
], MJArtifactPermission_.prototype, "SharedByUserID", void 0);
|
|
8150
|
+
__decorate([
|
|
8151
|
+
Field(),
|
|
8152
|
+
MaxLength(10),
|
|
8153
|
+
__metadata("design:type", Date)
|
|
8154
|
+
], MJArtifactPermission_.prototype, "_mj__CreatedAt", void 0);
|
|
8155
|
+
__decorate([
|
|
8156
|
+
Field(),
|
|
8157
|
+
MaxLength(10),
|
|
8158
|
+
__metadata("design:type", Date)
|
|
8159
|
+
], MJArtifactPermission_.prototype, "_mj__UpdatedAt", void 0);
|
|
8160
|
+
__decorate([
|
|
8161
|
+
Field(),
|
|
8162
|
+
MaxLength(510),
|
|
8163
|
+
__metadata("design:type", String)
|
|
8164
|
+
], MJArtifactPermission_.prototype, "Artifact", void 0);
|
|
8165
|
+
__decorate([
|
|
8166
|
+
Field(),
|
|
8167
|
+
MaxLength(200),
|
|
8168
|
+
__metadata("design:type", String)
|
|
8169
|
+
], MJArtifactPermission_.prototype, "User", void 0);
|
|
8170
|
+
__decorate([
|
|
8171
|
+
Field({ nullable: true }),
|
|
8172
|
+
MaxLength(200),
|
|
8173
|
+
__metadata("design:type", String)
|
|
8174
|
+
], MJArtifactPermission_.prototype, "SharedByUser", void 0);
|
|
8175
|
+
MJArtifactPermission_ = __decorate([
|
|
8176
|
+
ObjectType({ description: `Manages user permissions for artifacts with granular access control (Read, Edit, Delete, Share)` })
|
|
8177
|
+
], MJArtifactPermission_);
|
|
8178
|
+
export { MJArtifactPermission_ };
|
|
8179
|
+
let CreateMJArtifactPermissionInput = class CreateMJArtifactPermissionInput {
|
|
8180
|
+
ID;
|
|
8181
|
+
ArtifactID;
|
|
8182
|
+
UserID;
|
|
8183
|
+
CanRead;
|
|
8184
|
+
CanEdit;
|
|
8185
|
+
CanDelete;
|
|
8186
|
+
CanShare;
|
|
8187
|
+
SharedByUserID;
|
|
8188
|
+
};
|
|
8189
|
+
__decorate([
|
|
8190
|
+
Field({ nullable: true }),
|
|
8191
|
+
__metadata("design:type", String)
|
|
8192
|
+
], CreateMJArtifactPermissionInput.prototype, "ID", void 0);
|
|
8193
|
+
__decorate([
|
|
8194
|
+
Field({ nullable: true }),
|
|
8195
|
+
__metadata("design:type", String)
|
|
8196
|
+
], CreateMJArtifactPermissionInput.prototype, "ArtifactID", void 0);
|
|
8197
|
+
__decorate([
|
|
8198
|
+
Field({ nullable: true }),
|
|
8199
|
+
__metadata("design:type", String)
|
|
8200
|
+
], CreateMJArtifactPermissionInput.prototype, "UserID", void 0);
|
|
8201
|
+
__decorate([
|
|
8202
|
+
Field(() => Boolean, { nullable: true }),
|
|
8203
|
+
__metadata("design:type", Boolean)
|
|
8204
|
+
], CreateMJArtifactPermissionInput.prototype, "CanRead", void 0);
|
|
8205
|
+
__decorate([
|
|
8206
|
+
Field(() => Boolean, { nullable: true }),
|
|
8207
|
+
__metadata("design:type", Boolean)
|
|
8208
|
+
], CreateMJArtifactPermissionInput.prototype, "CanEdit", void 0);
|
|
8209
|
+
__decorate([
|
|
8210
|
+
Field(() => Boolean, { nullable: true }),
|
|
8211
|
+
__metadata("design:type", Boolean)
|
|
8212
|
+
], CreateMJArtifactPermissionInput.prototype, "CanDelete", void 0);
|
|
8213
|
+
__decorate([
|
|
8214
|
+
Field(() => Boolean, { nullable: true }),
|
|
8215
|
+
__metadata("design:type", Boolean)
|
|
8216
|
+
], CreateMJArtifactPermissionInput.prototype, "CanShare", void 0);
|
|
8217
|
+
__decorate([
|
|
8218
|
+
Field({ nullable: true }),
|
|
8219
|
+
__metadata("design:type", String)
|
|
8220
|
+
], CreateMJArtifactPermissionInput.prototype, "SharedByUserID", void 0);
|
|
8221
|
+
CreateMJArtifactPermissionInput = __decorate([
|
|
8222
|
+
InputType()
|
|
8223
|
+
], CreateMJArtifactPermissionInput);
|
|
8224
|
+
export { CreateMJArtifactPermissionInput };
|
|
8225
|
+
let UpdateMJArtifactPermissionInput = class UpdateMJArtifactPermissionInput {
|
|
8226
|
+
ID;
|
|
8227
|
+
ArtifactID;
|
|
8228
|
+
UserID;
|
|
8229
|
+
CanRead;
|
|
8230
|
+
CanEdit;
|
|
8231
|
+
CanDelete;
|
|
8232
|
+
CanShare;
|
|
8233
|
+
SharedByUserID;
|
|
8234
|
+
OldValues___;
|
|
8235
|
+
};
|
|
8236
|
+
__decorate([
|
|
8237
|
+
Field(),
|
|
8238
|
+
__metadata("design:type", String)
|
|
8239
|
+
], UpdateMJArtifactPermissionInput.prototype, "ID", void 0);
|
|
8240
|
+
__decorate([
|
|
8241
|
+
Field({ nullable: true }),
|
|
8242
|
+
__metadata("design:type", String)
|
|
8243
|
+
], UpdateMJArtifactPermissionInput.prototype, "ArtifactID", void 0);
|
|
8244
|
+
__decorate([
|
|
8245
|
+
Field({ nullable: true }),
|
|
8246
|
+
__metadata("design:type", String)
|
|
8247
|
+
], UpdateMJArtifactPermissionInput.prototype, "UserID", void 0);
|
|
8248
|
+
__decorate([
|
|
8249
|
+
Field(() => Boolean, { nullable: true }),
|
|
8250
|
+
__metadata("design:type", Boolean)
|
|
8251
|
+
], UpdateMJArtifactPermissionInput.prototype, "CanRead", void 0);
|
|
8252
|
+
__decorate([
|
|
8253
|
+
Field(() => Boolean, { nullable: true }),
|
|
8254
|
+
__metadata("design:type", Boolean)
|
|
8255
|
+
], UpdateMJArtifactPermissionInput.prototype, "CanEdit", void 0);
|
|
8256
|
+
__decorate([
|
|
8257
|
+
Field(() => Boolean, { nullable: true }),
|
|
8258
|
+
__metadata("design:type", Boolean)
|
|
8259
|
+
], UpdateMJArtifactPermissionInput.prototype, "CanDelete", void 0);
|
|
8260
|
+
__decorate([
|
|
8261
|
+
Field(() => Boolean, { nullable: true }),
|
|
8262
|
+
__metadata("design:type", Boolean)
|
|
8263
|
+
], UpdateMJArtifactPermissionInput.prototype, "CanShare", void 0);
|
|
8264
|
+
__decorate([
|
|
8265
|
+
Field({ nullable: true }),
|
|
8266
|
+
__metadata("design:type", String)
|
|
8267
|
+
], UpdateMJArtifactPermissionInput.prototype, "SharedByUserID", void 0);
|
|
8268
|
+
__decorate([
|
|
8269
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
8270
|
+
__metadata("design:type", Array)
|
|
8271
|
+
], UpdateMJArtifactPermissionInput.prototype, "OldValues___", void 0);
|
|
8272
|
+
UpdateMJArtifactPermissionInput = __decorate([
|
|
8273
|
+
InputType()
|
|
8274
|
+
], UpdateMJArtifactPermissionInput);
|
|
8275
|
+
export { UpdateMJArtifactPermissionInput };
|
|
8276
|
+
let RunMJArtifactPermissionViewResult = class RunMJArtifactPermissionViewResult {
|
|
8277
|
+
Results;
|
|
8278
|
+
UserViewRunID;
|
|
8279
|
+
RowCount;
|
|
8280
|
+
TotalRowCount;
|
|
8281
|
+
ExecutionTime;
|
|
8282
|
+
ErrorMessage;
|
|
8283
|
+
Success;
|
|
8284
|
+
};
|
|
8285
|
+
__decorate([
|
|
8286
|
+
Field(() => [MJArtifactPermission_]),
|
|
8287
|
+
__metadata("design:type", Array)
|
|
8288
|
+
], RunMJArtifactPermissionViewResult.prototype, "Results", void 0);
|
|
8289
|
+
__decorate([
|
|
8290
|
+
Field(() => String, { nullable: true }),
|
|
8291
|
+
__metadata("design:type", String)
|
|
8292
|
+
], RunMJArtifactPermissionViewResult.prototype, "UserViewRunID", void 0);
|
|
8293
|
+
__decorate([
|
|
8294
|
+
Field(() => Int, { nullable: true }),
|
|
8295
|
+
__metadata("design:type", Number)
|
|
8296
|
+
], RunMJArtifactPermissionViewResult.prototype, "RowCount", void 0);
|
|
8297
|
+
__decorate([
|
|
8298
|
+
Field(() => Int, { nullable: true }),
|
|
8299
|
+
__metadata("design:type", Number)
|
|
8300
|
+
], RunMJArtifactPermissionViewResult.prototype, "TotalRowCount", void 0);
|
|
8301
|
+
__decorate([
|
|
8302
|
+
Field(() => Int, { nullable: true }),
|
|
8303
|
+
__metadata("design:type", Number)
|
|
8304
|
+
], RunMJArtifactPermissionViewResult.prototype, "ExecutionTime", void 0);
|
|
8305
|
+
__decorate([
|
|
8306
|
+
Field({ nullable: true }),
|
|
8307
|
+
__metadata("design:type", String)
|
|
8308
|
+
], RunMJArtifactPermissionViewResult.prototype, "ErrorMessage", void 0);
|
|
8309
|
+
__decorate([
|
|
8310
|
+
Field(() => Boolean, { nullable: false }),
|
|
8311
|
+
__metadata("design:type", Boolean)
|
|
8312
|
+
], RunMJArtifactPermissionViewResult.prototype, "Success", void 0);
|
|
8313
|
+
RunMJArtifactPermissionViewResult = __decorate([
|
|
8314
|
+
ObjectType()
|
|
8315
|
+
], RunMJArtifactPermissionViewResult);
|
|
8316
|
+
export { RunMJArtifactPermissionViewResult };
|
|
8317
|
+
let MJArtifactPermissionResolver = class MJArtifactPermissionResolver extends ResolverBase {
|
|
8318
|
+
async RunMJArtifactPermissionViewByID(input, { providers, userPayload }, pubSub) {
|
|
8319
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8320
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
8321
|
+
}
|
|
8322
|
+
async RunMJArtifactPermissionViewByName(input, { providers, userPayload }, pubSub) {
|
|
8323
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8324
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
8325
|
+
}
|
|
8326
|
+
async RunMJArtifactPermissionDynamicView(input, { providers, userPayload }, pubSub) {
|
|
8327
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8328
|
+
input.EntityName = 'MJ: Artifact Permissions';
|
|
8329
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
8330
|
+
}
|
|
8331
|
+
async MJArtifactPermission(ID, { dataSources, userPayload, providers }, pubSub) {
|
|
8332
|
+
this.CheckUserReadPermissions('MJ: Artifact Permissions', userPayload);
|
|
8333
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8334
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
8335
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactPermissions] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
8336
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
8337
|
+
const result = this.MapFieldNamesToCodeNames('MJ: Artifact Permissions', rows && rows.length > 0 ? rows[0] : {});
|
|
8338
|
+
return result;
|
|
8339
|
+
}
|
|
8340
|
+
async CreateMJArtifactPermission(input, { providers, userPayload }, pubSub) {
|
|
8341
|
+
const provider = GetReadWriteProvider(providers);
|
|
8342
|
+
return this.CreateRecord('MJ: Artifact Permissions', input, provider, userPayload, pubSub);
|
|
8343
|
+
}
|
|
8344
|
+
async UpdateMJArtifactPermission(input, { providers, userPayload }, pubSub) {
|
|
8345
|
+
const provider = GetReadWriteProvider(providers);
|
|
8346
|
+
return this.UpdateRecord('MJ: Artifact Permissions', input, provider, userPayload, pubSub);
|
|
8347
|
+
}
|
|
8348
|
+
async DeleteMJArtifactPermission(ID, options, { providers, userPayload }, pubSub) {
|
|
8349
|
+
const provider = GetReadWriteProvider(providers);
|
|
8350
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
8351
|
+
return this.DeleteRecord('MJ: Artifact Permissions', key, options, provider, userPayload, pubSub);
|
|
8352
|
+
}
|
|
8353
|
+
};
|
|
8354
|
+
__decorate([
|
|
8355
|
+
Query(() => RunMJArtifactPermissionViewResult),
|
|
8356
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
8357
|
+
__param(1, Ctx()),
|
|
8358
|
+
__param(2, PubSub()),
|
|
8359
|
+
__metadata("design:type", Function),
|
|
8360
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
8361
|
+
__metadata("design:returntype", Promise)
|
|
8362
|
+
], MJArtifactPermissionResolver.prototype, "RunMJArtifactPermissionViewByID", null);
|
|
8363
|
+
__decorate([
|
|
8364
|
+
Query(() => RunMJArtifactPermissionViewResult),
|
|
8365
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
8366
|
+
__param(1, Ctx()),
|
|
8367
|
+
__param(2, PubSub()),
|
|
8368
|
+
__metadata("design:type", Function),
|
|
8369
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
8370
|
+
__metadata("design:returntype", Promise)
|
|
8371
|
+
], MJArtifactPermissionResolver.prototype, "RunMJArtifactPermissionViewByName", null);
|
|
8372
|
+
__decorate([
|
|
8373
|
+
Query(() => RunMJArtifactPermissionViewResult),
|
|
8374
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
8375
|
+
__param(1, Ctx()),
|
|
8376
|
+
__param(2, PubSub()),
|
|
8377
|
+
__metadata("design:type", Function),
|
|
8378
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
8379
|
+
__metadata("design:returntype", Promise)
|
|
8380
|
+
], MJArtifactPermissionResolver.prototype, "RunMJArtifactPermissionDynamicView", null);
|
|
8381
|
+
__decorate([
|
|
8382
|
+
Query(() => MJArtifactPermission_, { nullable: true }),
|
|
8383
|
+
__param(0, Arg('ID', () => String)),
|
|
8384
|
+
__param(1, Ctx()),
|
|
8385
|
+
__param(2, PubSub()),
|
|
8386
|
+
__metadata("design:type", Function),
|
|
8387
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
8388
|
+
__metadata("design:returntype", Promise)
|
|
8389
|
+
], MJArtifactPermissionResolver.prototype, "MJArtifactPermission", null);
|
|
8390
|
+
__decorate([
|
|
8391
|
+
Mutation(() => MJArtifactPermission_),
|
|
8392
|
+
__param(0, Arg('input', () => CreateMJArtifactPermissionInput)),
|
|
8393
|
+
__param(1, Ctx()),
|
|
8394
|
+
__param(2, PubSub()),
|
|
8395
|
+
__metadata("design:type", Function),
|
|
8396
|
+
__metadata("design:paramtypes", [CreateMJArtifactPermissionInput, Object, PubSubEngine]),
|
|
8397
|
+
__metadata("design:returntype", Promise)
|
|
8398
|
+
], MJArtifactPermissionResolver.prototype, "CreateMJArtifactPermission", null);
|
|
8399
|
+
__decorate([
|
|
8400
|
+
Mutation(() => MJArtifactPermission_),
|
|
8401
|
+
__param(0, Arg('input', () => UpdateMJArtifactPermissionInput)),
|
|
8402
|
+
__param(1, Ctx()),
|
|
8403
|
+
__param(2, PubSub()),
|
|
8404
|
+
__metadata("design:type", Function),
|
|
8405
|
+
__metadata("design:paramtypes", [UpdateMJArtifactPermissionInput, Object, PubSubEngine]),
|
|
8406
|
+
__metadata("design:returntype", Promise)
|
|
8407
|
+
], MJArtifactPermissionResolver.prototype, "UpdateMJArtifactPermission", null);
|
|
8408
|
+
__decorate([
|
|
8409
|
+
Mutation(() => MJArtifactPermission_),
|
|
8410
|
+
__param(0, Arg('ID', () => String)),
|
|
8411
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
8412
|
+
__param(2, Ctx()),
|
|
8413
|
+
__param(3, PubSub()),
|
|
8414
|
+
__metadata("design:type", Function),
|
|
8415
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
8416
|
+
__metadata("design:returntype", Promise)
|
|
8417
|
+
], MJArtifactPermissionResolver.prototype, "DeleteMJArtifactPermission", null);
|
|
8418
|
+
MJArtifactPermissionResolver = __decorate([
|
|
8419
|
+
Resolver(MJArtifactPermission_)
|
|
8420
|
+
], MJArtifactPermissionResolver);
|
|
8421
|
+
export { MJArtifactPermissionResolver };
|
|
8076
8422
|
let MJAIAgentAction_ = class MJAIAgentAction_ {
|
|
8077
8423
|
ID;
|
|
8078
8424
|
AgentID;
|
|
@@ -18863,6 +19209,7 @@ let MJUser_ = class MJUser_ {
|
|
|
18863
19209
|
MJ_PublicLinks_UserIDArray;
|
|
18864
19210
|
MJ_ScheduledJobRuns_ExecutedByUserIDArray;
|
|
18865
19211
|
MJ_ScheduledJobs_NotifyUserIDArray;
|
|
19212
|
+
MJ_ArtifactPermissions_UserIDArray;
|
|
18866
19213
|
ResourcePermissions_UserIDArray;
|
|
18867
19214
|
AIAgentRequests_RequestForUserIDArray;
|
|
18868
19215
|
ConversationDetails_UserIDArray;
|
|
@@ -18870,10 +19217,11 @@ let MJUser_ = class MJUser_ {
|
|
|
18870
19217
|
MJ_Artifacts_UserIDArray;
|
|
18871
19218
|
MJ_ScheduledJobs_OwnerUserIDArray;
|
|
18872
19219
|
MJ_CollectionPermissions_SharedByUserIDArray;
|
|
19220
|
+
MJ_ArtifactPermissions_SharedByUserIDArray;
|
|
18873
19221
|
MJ_AIAgentRuns_UserIDArray;
|
|
18874
19222
|
MJ_AIAgentPermissions_UserIDArray;
|
|
18875
|
-
MJ_CollectionPermissions_UserIDArray;
|
|
18876
19223
|
MJ_Collections_OwnerIDArray;
|
|
19224
|
+
MJ_CollectionPermissions_UserIDArray;
|
|
18877
19225
|
MJ_Tasks_UserIDArray;
|
|
18878
19226
|
AIAgents_OwnerUserIDArray;
|
|
18879
19227
|
};
|
|
@@ -19144,6 +19492,10 @@ __decorate([
|
|
|
19144
19492
|
Field(() => [MJScheduledJob_]),
|
|
19145
19493
|
__metadata("design:type", Array)
|
|
19146
19494
|
], MJUser_.prototype, "MJ_ScheduledJobs_NotifyUserIDArray", void 0);
|
|
19495
|
+
__decorate([
|
|
19496
|
+
Field(() => [MJArtifactPermission_]),
|
|
19497
|
+
__metadata("design:type", Array)
|
|
19498
|
+
], MJUser_.prototype, "MJ_ArtifactPermissions_UserIDArray", void 0);
|
|
19147
19499
|
__decorate([
|
|
19148
19500
|
Field(() => [MJResourcePermission_]),
|
|
19149
19501
|
__metadata("design:type", Array)
|
|
@@ -19172,6 +19524,10 @@ __decorate([
|
|
|
19172
19524
|
Field(() => [MJCollectionPermission_]),
|
|
19173
19525
|
__metadata("design:type", Array)
|
|
19174
19526
|
], MJUser_.prototype, "MJ_CollectionPermissions_SharedByUserIDArray", void 0);
|
|
19527
|
+
__decorate([
|
|
19528
|
+
Field(() => [MJArtifactPermission_]),
|
|
19529
|
+
__metadata("design:type", Array)
|
|
19530
|
+
], MJUser_.prototype, "MJ_ArtifactPermissions_SharedByUserIDArray", void 0);
|
|
19175
19531
|
__decorate([
|
|
19176
19532
|
Field(() => [MJAIAgentRun_]),
|
|
19177
19533
|
__metadata("design:type", Array)
|
|
@@ -19180,14 +19536,14 @@ __decorate([
|
|
|
19180
19536
|
Field(() => [MJAIAgentPermission_]),
|
|
19181
19537
|
__metadata("design:type", Array)
|
|
19182
19538
|
], 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
19539
|
__decorate([
|
|
19188
19540
|
Field(() => [MJCollection_]),
|
|
19189
19541
|
__metadata("design:type", Array)
|
|
19190
19542
|
], MJUser_.prototype, "MJ_Collections_OwnerIDArray", void 0);
|
|
19543
|
+
__decorate([
|
|
19544
|
+
Field(() => [MJCollectionPermission_]),
|
|
19545
|
+
__metadata("design:type", Array)
|
|
19546
|
+
], MJUser_.prototype, "MJ_CollectionPermissions_UserIDArray", void 0);
|
|
19191
19547
|
__decorate([
|
|
19192
19548
|
Field(() => [MJTask_]),
|
|
19193
19549
|
__metadata("design:type", Array)
|
|
@@ -19788,6 +20144,15 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
19788
20144
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Jobs', rows);
|
|
19789
20145
|
return result;
|
|
19790
20146
|
}
|
|
20147
|
+
async MJ_ArtifactPermissions_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
20148
|
+
this.CheckUserReadPermissions('MJ: Artifact Permissions', userPayload);
|
|
20149
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20150
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
20151
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactPermissions] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
20152
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
20153
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Permissions', rows);
|
|
20154
|
+
return result;
|
|
20155
|
+
}
|
|
19791
20156
|
async ResourcePermissions_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
19792
20157
|
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
19793
20158
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -19851,6 +20216,15 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
19851
20216
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Permissions', rows);
|
|
19852
20217
|
return result;
|
|
19853
20218
|
}
|
|
20219
|
+
async MJ_ArtifactPermissions_SharedByUserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
20220
|
+
this.CheckUserReadPermissions('MJ: Artifact Permissions', userPayload);
|
|
20221
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20222
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
20223
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactPermissions] WHERE [SharedByUserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
20224
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
20225
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Permissions', rows);
|
|
20226
|
+
return result;
|
|
20227
|
+
}
|
|
19854
20228
|
async MJ_AIAgentRuns_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
19855
20229
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
19856
20230
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -19869,22 +20243,22 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
19869
20243
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Permissions', rows);
|
|
19870
20244
|
return result;
|
|
19871
20245
|
}
|
|
19872
|
-
async
|
|
19873
|
-
this.CheckUserReadPermissions('MJ:
|
|
20246
|
+
async MJ_Collections_OwnerIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
20247
|
+
this.CheckUserReadPermissions('MJ: Collections', userPayload);
|
|
19874
20248
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19875
20249
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19876
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
20250
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollections] WHERE [OwnerID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collections', userPayload, EntityPermissionType.Read, 'AND');
|
|
19877
20251
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
19878
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
20252
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collections', rows);
|
|
19879
20253
|
return result;
|
|
19880
20254
|
}
|
|
19881
|
-
async
|
|
19882
|
-
this.CheckUserReadPermissions('MJ:
|
|
20255
|
+
async MJ_CollectionPermissions_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
20256
|
+
this.CheckUserReadPermissions('MJ: Collection Permissions', userPayload);
|
|
19883
20257
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19884
20258
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
19885
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
20259
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCollectionPermissions] WHERE [UserID]='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Collection Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
19886
20260
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
19887
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ:
|
|
20261
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Permissions', rows);
|
|
19888
20262
|
return result;
|
|
19889
20263
|
}
|
|
19890
20264
|
async MJ_Tasks_UserIDArray(mjuser_, { dataSources, userPayload, providers }, pubSub) {
|
|
@@ -20341,6 +20715,15 @@ __decorate([
|
|
|
20341
20715
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20342
20716
|
__metadata("design:returntype", Promise)
|
|
20343
20717
|
], MJUserResolverBase.prototype, "MJ_ScheduledJobs_NotifyUserIDArray", null);
|
|
20718
|
+
__decorate([
|
|
20719
|
+
FieldResolver(() => [MJArtifactPermission_]),
|
|
20720
|
+
__param(0, Root()),
|
|
20721
|
+
__param(1, Ctx()),
|
|
20722
|
+
__param(2, PubSub()),
|
|
20723
|
+
__metadata("design:type", Function),
|
|
20724
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20725
|
+
__metadata("design:returntype", Promise)
|
|
20726
|
+
], MJUserResolverBase.prototype, "MJ_ArtifactPermissions_UserIDArray", null);
|
|
20344
20727
|
__decorate([
|
|
20345
20728
|
FieldResolver(() => [MJResourcePermission_]),
|
|
20346
20729
|
__param(0, Root()),
|
|
@@ -20404,6 +20787,15 @@ __decorate([
|
|
|
20404
20787
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20405
20788
|
__metadata("design:returntype", Promise)
|
|
20406
20789
|
], MJUserResolverBase.prototype, "MJ_CollectionPermissions_SharedByUserIDArray", null);
|
|
20790
|
+
__decorate([
|
|
20791
|
+
FieldResolver(() => [MJArtifactPermission_]),
|
|
20792
|
+
__param(0, Root()),
|
|
20793
|
+
__param(1, Ctx()),
|
|
20794
|
+
__param(2, PubSub()),
|
|
20795
|
+
__metadata("design:type", Function),
|
|
20796
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20797
|
+
__metadata("design:returntype", Promise)
|
|
20798
|
+
], MJUserResolverBase.prototype, "MJ_ArtifactPermissions_SharedByUserIDArray", null);
|
|
20407
20799
|
__decorate([
|
|
20408
20800
|
FieldResolver(() => [MJAIAgentRun_]),
|
|
20409
20801
|
__param(0, Root()),
|
|
@@ -20423,23 +20815,23 @@ __decorate([
|
|
|
20423
20815
|
__metadata("design:returntype", Promise)
|
|
20424
20816
|
], MJUserResolverBase.prototype, "MJ_AIAgentPermissions_UserIDArray", null);
|
|
20425
20817
|
__decorate([
|
|
20426
|
-
FieldResolver(() => [
|
|
20818
|
+
FieldResolver(() => [MJCollection_]),
|
|
20427
20819
|
__param(0, Root()),
|
|
20428
20820
|
__param(1, Ctx()),
|
|
20429
20821
|
__param(2, PubSub()),
|
|
20430
20822
|
__metadata("design:type", Function),
|
|
20431
20823
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20432
20824
|
__metadata("design:returntype", Promise)
|
|
20433
|
-
], MJUserResolverBase.prototype, "
|
|
20825
|
+
], MJUserResolverBase.prototype, "MJ_Collections_OwnerIDArray", null);
|
|
20434
20826
|
__decorate([
|
|
20435
|
-
FieldResolver(() => [
|
|
20827
|
+
FieldResolver(() => [MJCollectionPermission_]),
|
|
20436
20828
|
__param(0, Root()),
|
|
20437
20829
|
__param(1, Ctx()),
|
|
20438
20830
|
__param(2, PubSub()),
|
|
20439
20831
|
__metadata("design:type", Function),
|
|
20440
20832
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
20441
20833
|
__metadata("design:returntype", Promise)
|
|
20442
|
-
], MJUserResolverBase.prototype, "
|
|
20834
|
+
], MJUserResolverBase.prototype, "MJ_CollectionPermissions_UserIDArray", null);
|
|
20443
20835
|
__decorate([
|
|
20444
20836
|
FieldResolver(() => [MJTask_]),
|
|
20445
20837
|
__param(0, Root()),
|
|
@@ -65391,6 +65783,7 @@ let MJArtifact_ = class MJArtifact_ {
|
|
|
65391
65783
|
User;
|
|
65392
65784
|
MJ_ArtifactVersions_ArtifactIDArray;
|
|
65393
65785
|
MJ_CollectionArtifacts_ArtifactIDArray;
|
|
65786
|
+
MJ_ArtifactPermissions_ArtifactIDArray;
|
|
65394
65787
|
};
|
|
65395
65788
|
__decorate([
|
|
65396
65789
|
Field(),
|
|
@@ -65458,6 +65851,10 @@ __decorate([
|
|
|
65458
65851
|
Field(() => [MJCollectionArtifact_]),
|
|
65459
65852
|
__metadata("design:type", Array)
|
|
65460
65853
|
], MJArtifact_.prototype, "MJ_CollectionArtifacts_ArtifactIDArray", void 0);
|
|
65854
|
+
__decorate([
|
|
65855
|
+
Field(() => [MJArtifactPermission_]),
|
|
65856
|
+
__metadata("design:type", Array)
|
|
65857
|
+
], MJArtifact_.prototype, "MJ_ArtifactPermissions_ArtifactIDArray", void 0);
|
|
65461
65858
|
MJArtifact_ = __decorate([
|
|
65462
65859
|
ObjectType({ description: `Independent content items (code, documents, charts) that can be linked to multiple conversations and collections. Supports versioning and sharing.` })
|
|
65463
65860
|
], MJArtifact_);
|
|
@@ -65631,6 +66028,15 @@ let MJArtifactResolver = class MJArtifactResolver extends ResolverBase {
|
|
|
65631
66028
|
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Collection Artifacts', rows);
|
|
65632
66029
|
return result;
|
|
65633
66030
|
}
|
|
66031
|
+
async MJ_ArtifactPermissions_ArtifactIDArray(mjartifact_, { dataSources, userPayload, providers }, pubSub) {
|
|
66032
|
+
this.CheckUserReadPermissions('MJ: Artifact Permissions', userPayload);
|
|
66033
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
66034
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
66035
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwArtifactPermissions] WHERE [ArtifactID]='${mjartifact_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Artifact Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
66036
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
66037
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Artifact Permissions', rows);
|
|
66038
|
+
return result;
|
|
66039
|
+
}
|
|
65634
66040
|
async CreateMJArtifact(input, { providers, userPayload }, pubSub) {
|
|
65635
66041
|
const provider = GetReadWriteProvider(providers);
|
|
65636
66042
|
return this.CreateRecord('MJ: Artifacts', input, provider, userPayload, pubSub);
|
|
@@ -65699,6 +66105,15 @@ __decorate([
|
|
|
65699
66105
|
__metadata("design:paramtypes", [MJArtifact_, Object, PubSubEngine]),
|
|
65700
66106
|
__metadata("design:returntype", Promise)
|
|
65701
66107
|
], MJArtifactResolver.prototype, "MJ_CollectionArtifacts_ArtifactIDArray", null);
|
|
66108
|
+
__decorate([
|
|
66109
|
+
FieldResolver(() => [MJArtifactPermission_]),
|
|
66110
|
+
__param(0, Root()),
|
|
66111
|
+
__param(1, Ctx()),
|
|
66112
|
+
__param(2, PubSub()),
|
|
66113
|
+
__metadata("design:type", Function),
|
|
66114
|
+
__metadata("design:paramtypes", [MJArtifact_, Object, PubSubEngine]),
|
|
66115
|
+
__metadata("design:returntype", Promise)
|
|
66116
|
+
], MJArtifactResolver.prototype, "MJ_ArtifactPermissions_ArtifactIDArray", null);
|
|
65702
66117
|
__decorate([
|
|
65703
66118
|
Mutation(() => MJArtifact_),
|
|
65704
66119
|
__param(0, Arg('input', () => CreateMJArtifactInput)),
|
|
@@ -78835,4 +79250,504 @@ MJArtifactVersionAttributeResolver = __decorate([
|
|
|
78835
79250
|
Resolver(MJArtifactVersionAttribute_)
|
|
78836
79251
|
], MJArtifactVersionAttributeResolver);
|
|
78837
79252
|
export { MJArtifactVersionAttributeResolver };
|
|
79253
|
+
let MJAIAgentDataSource_ = class MJAIAgentDataSource_ {
|
|
79254
|
+
ID;
|
|
79255
|
+
AgentID;
|
|
79256
|
+
Name;
|
|
79257
|
+
Description;
|
|
79258
|
+
SourceType;
|
|
79259
|
+
EntityName;
|
|
79260
|
+
ExtraFilter;
|
|
79261
|
+
OrderBy;
|
|
79262
|
+
FieldsToRetrieve;
|
|
79263
|
+
ResultType;
|
|
79264
|
+
QueryName;
|
|
79265
|
+
CategoryPath;
|
|
79266
|
+
Parameters;
|
|
79267
|
+
MaxRows;
|
|
79268
|
+
ExecutionOrder;
|
|
79269
|
+
Status;
|
|
79270
|
+
CachePolicy;
|
|
79271
|
+
CacheTimeoutSeconds;
|
|
79272
|
+
DestinationType;
|
|
79273
|
+
DestinationPath;
|
|
79274
|
+
_mj__CreatedAt;
|
|
79275
|
+
_mj__UpdatedAt;
|
|
79276
|
+
Agent;
|
|
79277
|
+
};
|
|
79278
|
+
__decorate([
|
|
79279
|
+
Field(),
|
|
79280
|
+
MaxLength(16),
|
|
79281
|
+
__metadata("design:type", String)
|
|
79282
|
+
], MJAIAgentDataSource_.prototype, "ID", void 0);
|
|
79283
|
+
__decorate([
|
|
79284
|
+
Field(),
|
|
79285
|
+
MaxLength(16),
|
|
79286
|
+
__metadata("design:type", String)
|
|
79287
|
+
], MJAIAgentDataSource_.prototype, "AgentID", void 0);
|
|
79288
|
+
__decorate([
|
|
79289
|
+
Field({ description: `Variable name for the data in the data parameter (e.g., "ALL_ENTITIES"). Must be unique within an agent.` }),
|
|
79290
|
+
MaxLength(510),
|
|
79291
|
+
__metadata("design:type", String)
|
|
79292
|
+
], MJAIAgentDataSource_.prototype, "Name", void 0);
|
|
79293
|
+
__decorate([
|
|
79294
|
+
Field({ nullable: true, description: `Description of what this data source provides` }),
|
|
79295
|
+
__metadata("design:type", String)
|
|
79296
|
+
], MJAIAgentDataSource_.prototype, "Description", void 0);
|
|
79297
|
+
__decorate([
|
|
79298
|
+
Field({ description: `Type of data source: RunView or RunQuery. Determines which parameters are used.` }),
|
|
79299
|
+
MaxLength(40),
|
|
79300
|
+
__metadata("design:type", String)
|
|
79301
|
+
], MJAIAgentDataSource_.prototype, "SourceType", void 0);
|
|
79302
|
+
__decorate([
|
|
79303
|
+
Field({ nullable: true, description: `Entity name for RunView data sources (e.g., "Entities", "AI Models")` }),
|
|
79304
|
+
MaxLength(510),
|
|
79305
|
+
__metadata("design:type", String)
|
|
79306
|
+
], MJAIAgentDataSource_.prototype, "EntityName", void 0);
|
|
79307
|
+
__decorate([
|
|
79308
|
+
Field({ nullable: true, description: `SQL WHERE clause filter for RunView data sources` }),
|
|
79309
|
+
__metadata("design:type", String)
|
|
79310
|
+
], MJAIAgentDataSource_.prototype, "ExtraFilter", void 0);
|
|
79311
|
+
__decorate([
|
|
79312
|
+
Field({ nullable: true, description: `SQL ORDER BY clause for RunView data sources` }),
|
|
79313
|
+
MaxLength(1000),
|
|
79314
|
+
__metadata("design:type", String)
|
|
79315
|
+
], MJAIAgentDataSource_.prototype, "OrderBy", void 0);
|
|
79316
|
+
__decorate([
|
|
79317
|
+
Field({ nullable: true, description: `JSON array of field names to return for RunView data sources (e.g., ["ID", "Name", "Description"])` }),
|
|
79318
|
+
__metadata("design:type", String)
|
|
79319
|
+
], MJAIAgentDataSource_.prototype, "FieldsToRetrieve", void 0);
|
|
79320
|
+
__decorate([
|
|
79321
|
+
Field({ nullable: true, description: `Result type for RunView: simple (default) or entity_object` }),
|
|
79322
|
+
MaxLength(40),
|
|
79323
|
+
__metadata("design:type", String)
|
|
79324
|
+
], MJAIAgentDataSource_.prototype, "ResultType", void 0);
|
|
79325
|
+
__decorate([
|
|
79326
|
+
Field({ nullable: true, description: `Query name for RunQuery data sources` }),
|
|
79327
|
+
MaxLength(510),
|
|
79328
|
+
__metadata("design:type", String)
|
|
79329
|
+
], MJAIAgentDataSource_.prototype, "QueryName", void 0);
|
|
79330
|
+
__decorate([
|
|
79331
|
+
Field({ nullable: true, description: `Category path for RunQuery data sources (e.g., "/MJ/AI/Agents/")` }),
|
|
79332
|
+
MaxLength(1000),
|
|
79333
|
+
__metadata("design:type", String)
|
|
79334
|
+
], MJAIAgentDataSource_.prototype, "CategoryPath", void 0);
|
|
79335
|
+
__decorate([
|
|
79336
|
+
Field({ nullable: true, description: `JSON object of parameters for RunQuery data sources (e.g., {"organizationId": "123"})` }),
|
|
79337
|
+
__metadata("design:type", String)
|
|
79338
|
+
], MJAIAgentDataSource_.prototype, "Parameters", void 0);
|
|
79339
|
+
__decorate([
|
|
79340
|
+
Field(() => Int, { nullable: true, description: `Maximum number of rows to return. Applies to both RunView and RunQuery.` }),
|
|
79341
|
+
__metadata("design:type", Number)
|
|
79342
|
+
], MJAIAgentDataSource_.prototype, "MaxRows", void 0);
|
|
79343
|
+
__decorate([
|
|
79344
|
+
Field(() => Int, { description: `Execution order when multiple data sources are defined for an agent (lower numbers execute first)` }),
|
|
79345
|
+
__metadata("design:type", Number)
|
|
79346
|
+
], MJAIAgentDataSource_.prototype, "ExecutionOrder", void 0);
|
|
79347
|
+
__decorate([
|
|
79348
|
+
Field({ description: `Status of the data source: Active or Disabled` }),
|
|
79349
|
+
MaxLength(40),
|
|
79350
|
+
__metadata("design:type", String)
|
|
79351
|
+
], MJAIAgentDataSource_.prototype, "Status", void 0);
|
|
79352
|
+
__decorate([
|
|
79353
|
+
Field({ description: `Cache policy: None (no caching), PerRun (cache for duration of agent run), PerAgent (cache across runs with timeout)` }),
|
|
79354
|
+
MaxLength(40),
|
|
79355
|
+
__metadata("design:type", String)
|
|
79356
|
+
], MJAIAgentDataSource_.prototype, "CachePolicy", void 0);
|
|
79357
|
+
__decorate([
|
|
79358
|
+
Field(() => Int, { nullable: true, description: `Time-to-live in seconds for PerAgent cache policy. Ignored for other cache policies.` }),
|
|
79359
|
+
__metadata("design:type", Number)
|
|
79360
|
+
], MJAIAgentDataSource_.prototype, "CacheTimeoutSeconds", void 0);
|
|
79361
|
+
__decorate([
|
|
79362
|
+
Field({ description: `Destination for the preloaded data: Data (for Nunjucks templates in prompts), Context (for actions only), or Payload (for agent state)` }),
|
|
79363
|
+
MaxLength(40),
|
|
79364
|
+
__metadata("design:type", String)
|
|
79365
|
+
], MJAIAgentDataSource_.prototype, "DestinationType", void 0);
|
|
79366
|
+
__decorate([
|
|
79367
|
+
Field({ nullable: true, description: `Path within the destination where data should be injected. Supports nested paths using dot notation (e.g., "config.api.endpoints", "analysis.orders.recent"). If null, uses Name as root-level key.` }),
|
|
79368
|
+
MaxLength(1000),
|
|
79369
|
+
__metadata("design:type", String)
|
|
79370
|
+
], MJAIAgentDataSource_.prototype, "DestinationPath", void 0);
|
|
79371
|
+
__decorate([
|
|
79372
|
+
Field(),
|
|
79373
|
+
MaxLength(10),
|
|
79374
|
+
__metadata("design:type", Date)
|
|
79375
|
+
], MJAIAgentDataSource_.prototype, "_mj__CreatedAt", void 0);
|
|
79376
|
+
__decorate([
|
|
79377
|
+
Field(),
|
|
79378
|
+
MaxLength(10),
|
|
79379
|
+
__metadata("design:type", Date)
|
|
79380
|
+
], MJAIAgentDataSource_.prototype, "_mj__UpdatedAt", void 0);
|
|
79381
|
+
__decorate([
|
|
79382
|
+
Field({ nullable: true }),
|
|
79383
|
+
MaxLength(510),
|
|
79384
|
+
__metadata("design:type", String)
|
|
79385
|
+
], MJAIAgentDataSource_.prototype, "Agent", void 0);
|
|
79386
|
+
MJAIAgentDataSource_ = __decorate([
|
|
79387
|
+
ObjectType({ description: `Defines data sources that should be preloaded into the data parameter before agent execution. Supports both RunView and RunQuery sources with configurable caching.` })
|
|
79388
|
+
], MJAIAgentDataSource_);
|
|
79389
|
+
export { MJAIAgentDataSource_ };
|
|
79390
|
+
let CreateMJAIAgentDataSourceInput = class CreateMJAIAgentDataSourceInput {
|
|
79391
|
+
ID;
|
|
79392
|
+
AgentID;
|
|
79393
|
+
Name;
|
|
79394
|
+
Description;
|
|
79395
|
+
SourceType;
|
|
79396
|
+
EntityName;
|
|
79397
|
+
ExtraFilter;
|
|
79398
|
+
OrderBy;
|
|
79399
|
+
FieldsToRetrieve;
|
|
79400
|
+
ResultType;
|
|
79401
|
+
QueryName;
|
|
79402
|
+
CategoryPath;
|
|
79403
|
+
Parameters;
|
|
79404
|
+
MaxRows;
|
|
79405
|
+
ExecutionOrder;
|
|
79406
|
+
Status;
|
|
79407
|
+
CachePolicy;
|
|
79408
|
+
CacheTimeoutSeconds;
|
|
79409
|
+
DestinationType;
|
|
79410
|
+
DestinationPath;
|
|
79411
|
+
};
|
|
79412
|
+
__decorate([
|
|
79413
|
+
Field({ nullable: true }),
|
|
79414
|
+
__metadata("design:type", String)
|
|
79415
|
+
], CreateMJAIAgentDataSourceInput.prototype, "ID", void 0);
|
|
79416
|
+
__decorate([
|
|
79417
|
+
Field({ nullable: true }),
|
|
79418
|
+
__metadata("design:type", String)
|
|
79419
|
+
], CreateMJAIAgentDataSourceInput.prototype, "AgentID", void 0);
|
|
79420
|
+
__decorate([
|
|
79421
|
+
Field({ nullable: true }),
|
|
79422
|
+
__metadata("design:type", String)
|
|
79423
|
+
], CreateMJAIAgentDataSourceInput.prototype, "Name", void 0);
|
|
79424
|
+
__decorate([
|
|
79425
|
+
Field({ nullable: true }),
|
|
79426
|
+
__metadata("design:type", String)
|
|
79427
|
+
], CreateMJAIAgentDataSourceInput.prototype, "Description", void 0);
|
|
79428
|
+
__decorate([
|
|
79429
|
+
Field({ nullable: true }),
|
|
79430
|
+
__metadata("design:type", String)
|
|
79431
|
+
], CreateMJAIAgentDataSourceInput.prototype, "SourceType", void 0);
|
|
79432
|
+
__decorate([
|
|
79433
|
+
Field({ nullable: true }),
|
|
79434
|
+
__metadata("design:type", String)
|
|
79435
|
+
], CreateMJAIAgentDataSourceInput.prototype, "EntityName", void 0);
|
|
79436
|
+
__decorate([
|
|
79437
|
+
Field({ nullable: true }),
|
|
79438
|
+
__metadata("design:type", String)
|
|
79439
|
+
], CreateMJAIAgentDataSourceInput.prototype, "ExtraFilter", void 0);
|
|
79440
|
+
__decorate([
|
|
79441
|
+
Field({ nullable: true }),
|
|
79442
|
+
__metadata("design:type", String)
|
|
79443
|
+
], CreateMJAIAgentDataSourceInput.prototype, "OrderBy", void 0);
|
|
79444
|
+
__decorate([
|
|
79445
|
+
Field({ nullable: true }),
|
|
79446
|
+
__metadata("design:type", String)
|
|
79447
|
+
], CreateMJAIAgentDataSourceInput.prototype, "FieldsToRetrieve", void 0);
|
|
79448
|
+
__decorate([
|
|
79449
|
+
Field({ nullable: true }),
|
|
79450
|
+
__metadata("design:type", String)
|
|
79451
|
+
], CreateMJAIAgentDataSourceInput.prototype, "ResultType", void 0);
|
|
79452
|
+
__decorate([
|
|
79453
|
+
Field({ nullable: true }),
|
|
79454
|
+
__metadata("design:type", String)
|
|
79455
|
+
], CreateMJAIAgentDataSourceInput.prototype, "QueryName", void 0);
|
|
79456
|
+
__decorate([
|
|
79457
|
+
Field({ nullable: true }),
|
|
79458
|
+
__metadata("design:type", String)
|
|
79459
|
+
], CreateMJAIAgentDataSourceInput.prototype, "CategoryPath", void 0);
|
|
79460
|
+
__decorate([
|
|
79461
|
+
Field({ nullable: true }),
|
|
79462
|
+
__metadata("design:type", String)
|
|
79463
|
+
], CreateMJAIAgentDataSourceInput.prototype, "Parameters", void 0);
|
|
79464
|
+
__decorate([
|
|
79465
|
+
Field(() => Int, { nullable: true }),
|
|
79466
|
+
__metadata("design:type", Number)
|
|
79467
|
+
], CreateMJAIAgentDataSourceInput.prototype, "MaxRows", void 0);
|
|
79468
|
+
__decorate([
|
|
79469
|
+
Field(() => Int, { nullable: true }),
|
|
79470
|
+
__metadata("design:type", Number)
|
|
79471
|
+
], CreateMJAIAgentDataSourceInput.prototype, "ExecutionOrder", void 0);
|
|
79472
|
+
__decorate([
|
|
79473
|
+
Field({ nullable: true }),
|
|
79474
|
+
__metadata("design:type", String)
|
|
79475
|
+
], CreateMJAIAgentDataSourceInput.prototype, "Status", void 0);
|
|
79476
|
+
__decorate([
|
|
79477
|
+
Field({ nullable: true }),
|
|
79478
|
+
__metadata("design:type", String)
|
|
79479
|
+
], CreateMJAIAgentDataSourceInput.prototype, "CachePolicy", void 0);
|
|
79480
|
+
__decorate([
|
|
79481
|
+
Field(() => Int, { nullable: true }),
|
|
79482
|
+
__metadata("design:type", Number)
|
|
79483
|
+
], CreateMJAIAgentDataSourceInput.prototype, "CacheTimeoutSeconds", void 0);
|
|
79484
|
+
__decorate([
|
|
79485
|
+
Field({ nullable: true }),
|
|
79486
|
+
__metadata("design:type", String)
|
|
79487
|
+
], CreateMJAIAgentDataSourceInput.prototype, "DestinationType", void 0);
|
|
79488
|
+
__decorate([
|
|
79489
|
+
Field({ nullable: true }),
|
|
79490
|
+
__metadata("design:type", String)
|
|
79491
|
+
], CreateMJAIAgentDataSourceInput.prototype, "DestinationPath", void 0);
|
|
79492
|
+
CreateMJAIAgentDataSourceInput = __decorate([
|
|
79493
|
+
InputType()
|
|
79494
|
+
], CreateMJAIAgentDataSourceInput);
|
|
79495
|
+
export { CreateMJAIAgentDataSourceInput };
|
|
79496
|
+
let UpdateMJAIAgentDataSourceInput = class UpdateMJAIAgentDataSourceInput {
|
|
79497
|
+
ID;
|
|
79498
|
+
AgentID;
|
|
79499
|
+
Name;
|
|
79500
|
+
Description;
|
|
79501
|
+
SourceType;
|
|
79502
|
+
EntityName;
|
|
79503
|
+
ExtraFilter;
|
|
79504
|
+
OrderBy;
|
|
79505
|
+
FieldsToRetrieve;
|
|
79506
|
+
ResultType;
|
|
79507
|
+
QueryName;
|
|
79508
|
+
CategoryPath;
|
|
79509
|
+
Parameters;
|
|
79510
|
+
MaxRows;
|
|
79511
|
+
ExecutionOrder;
|
|
79512
|
+
Status;
|
|
79513
|
+
CachePolicy;
|
|
79514
|
+
CacheTimeoutSeconds;
|
|
79515
|
+
DestinationType;
|
|
79516
|
+
DestinationPath;
|
|
79517
|
+
OldValues___;
|
|
79518
|
+
};
|
|
79519
|
+
__decorate([
|
|
79520
|
+
Field(),
|
|
79521
|
+
__metadata("design:type", String)
|
|
79522
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "ID", void 0);
|
|
79523
|
+
__decorate([
|
|
79524
|
+
Field({ nullable: true }),
|
|
79525
|
+
__metadata("design:type", String)
|
|
79526
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "AgentID", void 0);
|
|
79527
|
+
__decorate([
|
|
79528
|
+
Field({ nullable: true }),
|
|
79529
|
+
__metadata("design:type", String)
|
|
79530
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "Name", void 0);
|
|
79531
|
+
__decorate([
|
|
79532
|
+
Field({ nullable: true }),
|
|
79533
|
+
__metadata("design:type", String)
|
|
79534
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "Description", void 0);
|
|
79535
|
+
__decorate([
|
|
79536
|
+
Field({ nullable: true }),
|
|
79537
|
+
__metadata("design:type", String)
|
|
79538
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "SourceType", void 0);
|
|
79539
|
+
__decorate([
|
|
79540
|
+
Field({ nullable: true }),
|
|
79541
|
+
__metadata("design:type", String)
|
|
79542
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "EntityName", void 0);
|
|
79543
|
+
__decorate([
|
|
79544
|
+
Field({ nullable: true }),
|
|
79545
|
+
__metadata("design:type", String)
|
|
79546
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "ExtraFilter", void 0);
|
|
79547
|
+
__decorate([
|
|
79548
|
+
Field({ nullable: true }),
|
|
79549
|
+
__metadata("design:type", String)
|
|
79550
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "OrderBy", void 0);
|
|
79551
|
+
__decorate([
|
|
79552
|
+
Field({ nullable: true }),
|
|
79553
|
+
__metadata("design:type", String)
|
|
79554
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "FieldsToRetrieve", void 0);
|
|
79555
|
+
__decorate([
|
|
79556
|
+
Field({ nullable: true }),
|
|
79557
|
+
__metadata("design:type", String)
|
|
79558
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "ResultType", void 0);
|
|
79559
|
+
__decorate([
|
|
79560
|
+
Field({ nullable: true }),
|
|
79561
|
+
__metadata("design:type", String)
|
|
79562
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "QueryName", void 0);
|
|
79563
|
+
__decorate([
|
|
79564
|
+
Field({ nullable: true }),
|
|
79565
|
+
__metadata("design:type", String)
|
|
79566
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "CategoryPath", void 0);
|
|
79567
|
+
__decorate([
|
|
79568
|
+
Field({ nullable: true }),
|
|
79569
|
+
__metadata("design:type", String)
|
|
79570
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "Parameters", void 0);
|
|
79571
|
+
__decorate([
|
|
79572
|
+
Field(() => Int, { nullable: true }),
|
|
79573
|
+
__metadata("design:type", Number)
|
|
79574
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "MaxRows", void 0);
|
|
79575
|
+
__decorate([
|
|
79576
|
+
Field(() => Int, { nullable: true }),
|
|
79577
|
+
__metadata("design:type", Number)
|
|
79578
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "ExecutionOrder", void 0);
|
|
79579
|
+
__decorate([
|
|
79580
|
+
Field({ nullable: true }),
|
|
79581
|
+
__metadata("design:type", String)
|
|
79582
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "Status", void 0);
|
|
79583
|
+
__decorate([
|
|
79584
|
+
Field({ nullable: true }),
|
|
79585
|
+
__metadata("design:type", String)
|
|
79586
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "CachePolicy", void 0);
|
|
79587
|
+
__decorate([
|
|
79588
|
+
Field(() => Int, { nullable: true }),
|
|
79589
|
+
__metadata("design:type", Number)
|
|
79590
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "CacheTimeoutSeconds", void 0);
|
|
79591
|
+
__decorate([
|
|
79592
|
+
Field({ nullable: true }),
|
|
79593
|
+
__metadata("design:type", String)
|
|
79594
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "DestinationType", void 0);
|
|
79595
|
+
__decorate([
|
|
79596
|
+
Field({ nullable: true }),
|
|
79597
|
+
__metadata("design:type", String)
|
|
79598
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "DestinationPath", void 0);
|
|
79599
|
+
__decorate([
|
|
79600
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
79601
|
+
__metadata("design:type", Array)
|
|
79602
|
+
], UpdateMJAIAgentDataSourceInput.prototype, "OldValues___", void 0);
|
|
79603
|
+
UpdateMJAIAgentDataSourceInput = __decorate([
|
|
79604
|
+
InputType()
|
|
79605
|
+
], UpdateMJAIAgentDataSourceInput);
|
|
79606
|
+
export { UpdateMJAIAgentDataSourceInput };
|
|
79607
|
+
let RunMJAIAgentDataSourceViewResult = class RunMJAIAgentDataSourceViewResult {
|
|
79608
|
+
Results;
|
|
79609
|
+
UserViewRunID;
|
|
79610
|
+
RowCount;
|
|
79611
|
+
TotalRowCount;
|
|
79612
|
+
ExecutionTime;
|
|
79613
|
+
ErrorMessage;
|
|
79614
|
+
Success;
|
|
79615
|
+
};
|
|
79616
|
+
__decorate([
|
|
79617
|
+
Field(() => [MJAIAgentDataSource_]),
|
|
79618
|
+
__metadata("design:type", Array)
|
|
79619
|
+
], RunMJAIAgentDataSourceViewResult.prototype, "Results", void 0);
|
|
79620
|
+
__decorate([
|
|
79621
|
+
Field(() => String, { nullable: true }),
|
|
79622
|
+
__metadata("design:type", String)
|
|
79623
|
+
], RunMJAIAgentDataSourceViewResult.prototype, "UserViewRunID", void 0);
|
|
79624
|
+
__decorate([
|
|
79625
|
+
Field(() => Int, { nullable: true }),
|
|
79626
|
+
__metadata("design:type", Number)
|
|
79627
|
+
], RunMJAIAgentDataSourceViewResult.prototype, "RowCount", void 0);
|
|
79628
|
+
__decorate([
|
|
79629
|
+
Field(() => Int, { nullable: true }),
|
|
79630
|
+
__metadata("design:type", Number)
|
|
79631
|
+
], RunMJAIAgentDataSourceViewResult.prototype, "TotalRowCount", void 0);
|
|
79632
|
+
__decorate([
|
|
79633
|
+
Field(() => Int, { nullable: true }),
|
|
79634
|
+
__metadata("design:type", Number)
|
|
79635
|
+
], RunMJAIAgentDataSourceViewResult.prototype, "ExecutionTime", void 0);
|
|
79636
|
+
__decorate([
|
|
79637
|
+
Field({ nullable: true }),
|
|
79638
|
+
__metadata("design:type", String)
|
|
79639
|
+
], RunMJAIAgentDataSourceViewResult.prototype, "ErrorMessage", void 0);
|
|
79640
|
+
__decorate([
|
|
79641
|
+
Field(() => Boolean, { nullable: false }),
|
|
79642
|
+
__metadata("design:type", Boolean)
|
|
79643
|
+
], RunMJAIAgentDataSourceViewResult.prototype, "Success", void 0);
|
|
79644
|
+
RunMJAIAgentDataSourceViewResult = __decorate([
|
|
79645
|
+
ObjectType()
|
|
79646
|
+
], RunMJAIAgentDataSourceViewResult);
|
|
79647
|
+
export { RunMJAIAgentDataSourceViewResult };
|
|
79648
|
+
let MJAIAgentDataSourceResolver = class MJAIAgentDataSourceResolver extends ResolverBase {
|
|
79649
|
+
async RunMJAIAgentDataSourceViewByID(input, { providers, userPayload }, pubSub) {
|
|
79650
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
79651
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
79652
|
+
}
|
|
79653
|
+
async RunMJAIAgentDataSourceViewByName(input, { providers, userPayload }, pubSub) {
|
|
79654
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
79655
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
79656
|
+
}
|
|
79657
|
+
async RunMJAIAgentDataSourceDynamicView(input, { providers, userPayload }, pubSub) {
|
|
79658
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
79659
|
+
input.EntityName = 'MJ: AI Agent Data Sources';
|
|
79660
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
79661
|
+
}
|
|
79662
|
+
async MJAIAgentDataSource(ID, { dataSources, userPayload, providers }, pubSub) {
|
|
79663
|
+
this.CheckUserReadPermissions('MJ: AI Agent Data Sources', userPayload);
|
|
79664
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
79665
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
79666
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentDataSources] WHERE [ID]='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Data Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
79667
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
79668
|
+
const result = this.MapFieldNamesToCodeNames('MJ: AI Agent Data Sources', rows && rows.length > 0 ? rows[0] : {});
|
|
79669
|
+
return result;
|
|
79670
|
+
}
|
|
79671
|
+
async CreateMJAIAgentDataSource(input, { providers, userPayload }, pubSub) {
|
|
79672
|
+
const provider = GetReadWriteProvider(providers);
|
|
79673
|
+
return this.CreateRecord('MJ: AI Agent Data Sources', input, provider, userPayload, pubSub);
|
|
79674
|
+
}
|
|
79675
|
+
async UpdateMJAIAgentDataSource(input, { providers, userPayload }, pubSub) {
|
|
79676
|
+
const provider = GetReadWriteProvider(providers);
|
|
79677
|
+
return this.UpdateRecord('MJ: AI Agent Data Sources', input, provider, userPayload, pubSub);
|
|
79678
|
+
}
|
|
79679
|
+
async DeleteMJAIAgentDataSource(ID, options, { providers, userPayload }, pubSub) {
|
|
79680
|
+
const provider = GetReadWriteProvider(providers);
|
|
79681
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
79682
|
+
return this.DeleteRecord('MJ: AI Agent Data Sources', key, options, provider, userPayload, pubSub);
|
|
79683
|
+
}
|
|
79684
|
+
};
|
|
79685
|
+
__decorate([
|
|
79686
|
+
Query(() => RunMJAIAgentDataSourceViewResult),
|
|
79687
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
79688
|
+
__param(1, Ctx()),
|
|
79689
|
+
__param(2, PubSub()),
|
|
79690
|
+
__metadata("design:type", Function),
|
|
79691
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
79692
|
+
__metadata("design:returntype", Promise)
|
|
79693
|
+
], MJAIAgentDataSourceResolver.prototype, "RunMJAIAgentDataSourceViewByID", null);
|
|
79694
|
+
__decorate([
|
|
79695
|
+
Query(() => RunMJAIAgentDataSourceViewResult),
|
|
79696
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
79697
|
+
__param(1, Ctx()),
|
|
79698
|
+
__param(2, PubSub()),
|
|
79699
|
+
__metadata("design:type", Function),
|
|
79700
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
79701
|
+
__metadata("design:returntype", Promise)
|
|
79702
|
+
], MJAIAgentDataSourceResolver.prototype, "RunMJAIAgentDataSourceViewByName", null);
|
|
79703
|
+
__decorate([
|
|
79704
|
+
Query(() => RunMJAIAgentDataSourceViewResult),
|
|
79705
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
79706
|
+
__param(1, Ctx()),
|
|
79707
|
+
__param(2, PubSub()),
|
|
79708
|
+
__metadata("design:type", Function),
|
|
79709
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
79710
|
+
__metadata("design:returntype", Promise)
|
|
79711
|
+
], MJAIAgentDataSourceResolver.prototype, "RunMJAIAgentDataSourceDynamicView", null);
|
|
79712
|
+
__decorate([
|
|
79713
|
+
Query(() => MJAIAgentDataSource_, { nullable: true }),
|
|
79714
|
+
__param(0, Arg('ID', () => String)),
|
|
79715
|
+
__param(1, Ctx()),
|
|
79716
|
+
__param(2, PubSub()),
|
|
79717
|
+
__metadata("design:type", Function),
|
|
79718
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
79719
|
+
__metadata("design:returntype", Promise)
|
|
79720
|
+
], MJAIAgentDataSourceResolver.prototype, "MJAIAgentDataSource", null);
|
|
79721
|
+
__decorate([
|
|
79722
|
+
Mutation(() => MJAIAgentDataSource_),
|
|
79723
|
+
__param(0, Arg('input', () => CreateMJAIAgentDataSourceInput)),
|
|
79724
|
+
__param(1, Ctx()),
|
|
79725
|
+
__param(2, PubSub()),
|
|
79726
|
+
__metadata("design:type", Function),
|
|
79727
|
+
__metadata("design:paramtypes", [CreateMJAIAgentDataSourceInput, Object, PubSubEngine]),
|
|
79728
|
+
__metadata("design:returntype", Promise)
|
|
79729
|
+
], MJAIAgentDataSourceResolver.prototype, "CreateMJAIAgentDataSource", null);
|
|
79730
|
+
__decorate([
|
|
79731
|
+
Mutation(() => MJAIAgentDataSource_),
|
|
79732
|
+
__param(0, Arg('input', () => UpdateMJAIAgentDataSourceInput)),
|
|
79733
|
+
__param(1, Ctx()),
|
|
79734
|
+
__param(2, PubSub()),
|
|
79735
|
+
__metadata("design:type", Function),
|
|
79736
|
+
__metadata("design:paramtypes", [UpdateMJAIAgentDataSourceInput, Object, PubSubEngine]),
|
|
79737
|
+
__metadata("design:returntype", Promise)
|
|
79738
|
+
], MJAIAgentDataSourceResolver.prototype, "UpdateMJAIAgentDataSource", null);
|
|
79739
|
+
__decorate([
|
|
79740
|
+
Mutation(() => MJAIAgentDataSource_),
|
|
79741
|
+
__param(0, Arg('ID', () => String)),
|
|
79742
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
79743
|
+
__param(2, Ctx()),
|
|
79744
|
+
__param(3, PubSub()),
|
|
79745
|
+
__metadata("design:type", Function),
|
|
79746
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
79747
|
+
__metadata("design:returntype", Promise)
|
|
79748
|
+
], MJAIAgentDataSourceResolver.prototype, "DeleteMJAIAgentDataSource", null);
|
|
79749
|
+
MJAIAgentDataSourceResolver = __decorate([
|
|
79750
|
+
Resolver(MJAIAgentDataSource_)
|
|
79751
|
+
], MJAIAgentDataSourceResolver);
|
|
79752
|
+
export { MJAIAgentDataSourceResolver };
|
|
78838
79753
|
//# sourceMappingURL=generated.js.map
|