@memberjunction/server 5.45.0 → 5.46.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/auth/magicLink/MagicLinkService.d.ts +7 -0
- package/dist/auth/magicLink/MagicLinkService.d.ts.map +1 -1
- package/dist/auth/magicLink/MagicLinkService.js +13 -3
- package/dist/auth/magicLink/MagicLinkService.js.map +1 -1
- package/dist/auth/magicLink/magicLinkCore.d.ts +38 -1
- package/dist/auth/magicLink/magicLinkCore.d.ts.map +1 -1
- package/dist/auth/magicLink/magicLinkCore.js +42 -19
- package/dist/auth/magicLink/magicLinkCore.js.map +1 -1
- package/dist/generated/generated.d.ts +107 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +580 -0
- package/dist/generated/generated.js.map +1 -1
- package/dist/resolvers/MergeRecordsResolver.d.ts +2 -2
- package/dist/resolvers/MergeRecordsResolver.d.ts.map +1 -1
- package/dist/resolvers/MergeRecordsResolver.js +15 -5
- package/dist/resolvers/MergeRecordsResolver.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts +9 -0
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +6 -1
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/package.json +88 -88
- package/src/__tests__/RunAIAgentResolver.streaming.test.ts +128 -0
- package/src/__tests__/magicLink.test.ts +53 -3
- package/src/auth/magicLink/MagicLinkService.ts +13 -3
- package/src/auth/magicLink/magicLinkCore.ts +48 -20
- package/src/generated/generated.ts +406 -1
- package/src/resolvers/MergeRecordsResolver.ts +18 -5
- package/src/resolvers/RunAIAgentResolver.ts +16 -4
|
@@ -20019,6 +20019,10 @@ __decorate([
|
|
|
20019
20019
|
Field(() => [MJAIConfiguration_]),
|
|
20020
20020
|
__metadata("design:type", Array)
|
|
20021
20021
|
], MJAIConfiguration_.prototype, "MJAIConfigurations_ParentIDArray", void 0);
|
|
20022
|
+
__decorate([
|
|
20023
|
+
Field(() => [MJScopedPromptConfig_]),
|
|
20024
|
+
__metadata("design:type", Array)
|
|
20025
|
+
], MJAIConfiguration_.prototype, "MJScopedPromptConfigs_ConfigurationIDArray", void 0);
|
|
20022
20026
|
MJAIConfiguration_ = __decorate([
|
|
20023
20027
|
ObjectType({ description: `Stores configurations for AI prompt execution environments and settings.` })
|
|
20024
20028
|
], MJAIConfiguration_);
|
|
@@ -20256,6 +20260,14 @@ let MJAIConfigurationResolver = class MJAIConfigurationResolver extends Resolver
|
|
|
20256
20260
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Configurations', rows, this.GetUserFromPayload(userPayload));
|
|
20257
20261
|
return result;
|
|
20258
20262
|
}
|
|
20263
|
+
async MJScopedPromptConfigs_ConfigurationIDArray(mjaiconfiguration_, { userPayload, providers }, pubSub) {
|
|
20264
|
+
this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
|
|
20265
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
20266
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('ConfigurationID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
|
|
20267
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiconfiguration_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
20268
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
|
|
20269
|
+
return result;
|
|
20270
|
+
}
|
|
20259
20271
|
async CreateMJAIConfiguration(input, { providers, userPayload }, pubSub) {
|
|
20260
20272
|
const provider = GetReadWriteProvider(providers);
|
|
20261
20273
|
return this.CreateRecord('MJ: AI Configurations', input, provider, userPayload, pubSub);
|
|
@@ -20378,6 +20390,15 @@ __decorate([
|
|
|
20378
20390
|
__metadata("design:paramtypes", [MJAIConfiguration_, Object, PubSubEngine]),
|
|
20379
20391
|
__metadata("design:returntype", Promise)
|
|
20380
20392
|
], MJAIConfigurationResolver.prototype, "MJAIConfigurations_ParentIDArray", null);
|
|
20393
|
+
__decorate([
|
|
20394
|
+
FieldResolver(() => [MJScopedPromptConfig_]),
|
|
20395
|
+
__param(0, Root()),
|
|
20396
|
+
__param(1, Ctx()),
|
|
20397
|
+
__param(2, PubSub()),
|
|
20398
|
+
__metadata("design:type", Function),
|
|
20399
|
+
__metadata("design:paramtypes", [MJAIConfiguration_, Object, PubSubEngine]),
|
|
20400
|
+
__metadata("design:returntype", Promise)
|
|
20401
|
+
], MJAIConfigurationResolver.prototype, "MJScopedPromptConfigs_ConfigurationIDArray", null);
|
|
20381
20402
|
__decorate([
|
|
20382
20403
|
Mutation(() => MJAIConfiguration_),
|
|
20383
20404
|
__param(0, Arg('input', () => CreateMJAIConfigurationInput)),
|
|
@@ -23922,6 +23943,10 @@ __decorate([
|
|
|
23922
23943
|
Field(() => [MJAIModel_]),
|
|
23923
23944
|
__metadata("design:type", Array)
|
|
23924
23945
|
], MJAIModel_.prototype, "MJAIModels_PriorVersionIDArray", void 0);
|
|
23946
|
+
__decorate([
|
|
23947
|
+
Field(() => [MJScopedPromptConfig_]),
|
|
23948
|
+
__metadata("design:type", Array)
|
|
23949
|
+
], MJAIModel_.prototype, "MJScopedPromptConfigs_ModelIDArray", void 0);
|
|
23925
23950
|
MJAIModel_ = __decorate([
|
|
23926
23951
|
ObjectType({ description: `Catalog of all AI Models configured in the system` })
|
|
23927
23952
|
], MJAIModel_);
|
|
@@ -24383,6 +24408,14 @@ let MJAIModelResolver = class MJAIModelResolver extends ResolverBase {
|
|
|
24383
24408
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Models', rows, this.GetUserFromPayload(userPayload));
|
|
24384
24409
|
return result;
|
|
24385
24410
|
}
|
|
24411
|
+
async MJScopedPromptConfigs_ModelIDArray(mjaimodel_, { userPayload, providers }, pubSub) {
|
|
24412
|
+
this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
|
|
24413
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24414
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('ModelID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
|
|
24415
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaimodel_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
24416
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
|
|
24417
|
+
return result;
|
|
24418
|
+
}
|
|
24386
24419
|
async CreateMJAIModel(input, { providers, userPayload }, pubSub) {
|
|
24387
24420
|
const provider = GetReadWriteProvider(providers);
|
|
24388
24421
|
return this.CreateRecord('MJ: AI Models', input, provider, userPayload, pubSub);
|
|
@@ -24666,6 +24699,15 @@ __decorate([
|
|
|
24666
24699
|
__metadata("design:paramtypes", [MJAIModel_, Object, PubSubEngine]),
|
|
24667
24700
|
__metadata("design:returntype", Promise)
|
|
24668
24701
|
], MJAIModelResolver.prototype, "MJAIModels_PriorVersionIDArray", null);
|
|
24702
|
+
__decorate([
|
|
24703
|
+
FieldResolver(() => [MJScopedPromptConfig_]),
|
|
24704
|
+
__param(0, Root()),
|
|
24705
|
+
__param(1, Ctx()),
|
|
24706
|
+
__param(2, PubSub()),
|
|
24707
|
+
__metadata("design:type", Function),
|
|
24708
|
+
__metadata("design:paramtypes", [MJAIModel_, Object, PubSubEngine]),
|
|
24709
|
+
__metadata("design:returntype", Promise)
|
|
24710
|
+
], MJAIModelResolver.prototype, "MJScopedPromptConfigs_ModelIDArray", null);
|
|
24669
24711
|
__decorate([
|
|
24670
24712
|
Mutation(() => MJAIModel_),
|
|
24671
24713
|
__param(0, Arg('input', () => CreateMJAIModelInput)),
|
|
@@ -27876,6 +27918,10 @@ __decorate([
|
|
|
27876
27918
|
Field(() => [MJScopedPromptPart_]),
|
|
27877
27919
|
__metadata("design:type", Array)
|
|
27878
27920
|
], MJAIPrompt_.prototype, "MJScopedPromptParts_PromptIDArray", void 0);
|
|
27921
|
+
__decorate([
|
|
27922
|
+
Field(() => [MJScopedPromptConfig_]),
|
|
27923
|
+
__metadata("design:type", Array)
|
|
27924
|
+
], MJAIPrompt_.prototype, "MJScopedPromptConfigs_PromptIDArray", void 0);
|
|
27879
27925
|
MJAIPrompt_ = __decorate([
|
|
27880
27926
|
ObjectType({ description: `Stores AI prompts, including references to categories, types, and templates.` })
|
|
27881
27927
|
], MJAIPrompt_);
|
|
@@ -28521,6 +28567,14 @@ let MJAIPromptResolver = class MJAIPromptResolver extends ResolverBase {
|
|
|
28521
28567
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Parts', rows, this.GetUserFromPayload(userPayload));
|
|
28522
28568
|
return result;
|
|
28523
28569
|
}
|
|
28570
|
+
async MJScopedPromptConfigs_PromptIDArray(mjaiprompt_, { userPayload, providers }, pubSub) {
|
|
28571
|
+
this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
|
|
28572
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
28573
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('PromptID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
|
|
28574
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiprompt_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
28575
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
|
|
28576
|
+
return result;
|
|
28577
|
+
}
|
|
28524
28578
|
async CreateMJAIPrompt(input, { providers, userPayload }, pubSub) {
|
|
28525
28579
|
const provider = GetReadWriteProvider(providers);
|
|
28526
28580
|
return this.CreateRecord('MJ: AI Prompts', input, provider, userPayload, pubSub);
|
|
@@ -28724,6 +28778,15 @@ __decorate([
|
|
|
28724
28778
|
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
28725
28779
|
__metadata("design:returntype", Promise)
|
|
28726
28780
|
], MJAIPromptResolver.prototype, "MJScopedPromptParts_PromptIDArray", null);
|
|
28781
|
+
__decorate([
|
|
28782
|
+
FieldResolver(() => [MJScopedPromptConfig_]),
|
|
28783
|
+
__param(0, Root()),
|
|
28784
|
+
__param(1, Ctx()),
|
|
28785
|
+
__param(2, PubSub()),
|
|
28786
|
+
__metadata("design:type", Function),
|
|
28787
|
+
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
28788
|
+
__metadata("design:returntype", Promise)
|
|
28789
|
+
], MJAIPromptResolver.prototype, "MJScopedPromptConfigs_PromptIDArray", null);
|
|
28727
28790
|
__decorate([
|
|
28728
28791
|
Mutation(() => MJAIPrompt_),
|
|
28729
28792
|
__param(0, Arg('input', () => CreateMJAIPromptInput)),
|
|
@@ -31246,6 +31309,10 @@ __decorate([
|
|
|
31246
31309
|
Field(() => [MJAIAgentRun_]),
|
|
31247
31310
|
__metadata("design:type", Array)
|
|
31248
31311
|
], MJAIVendor_.prototype, "MJAIAgentRuns_OverrideVendorIDArray", void 0);
|
|
31312
|
+
__decorate([
|
|
31313
|
+
Field(() => [MJScopedPromptConfig_]),
|
|
31314
|
+
__metadata("design:type", Array)
|
|
31315
|
+
], MJAIVendor_.prototype, "MJScopedPromptConfigs_VendorIDArray", void 0);
|
|
31249
31316
|
MJAIVendor_ = __decorate([
|
|
31250
31317
|
ObjectType({ description: `Stores information about AI vendors providing models and/or inference services.` })
|
|
31251
31318
|
], MJAIVendor_);
|
|
@@ -31435,6 +31502,14 @@ let MJAIVendorResolver = class MJAIVendorResolver extends ResolverBase {
|
|
|
31435
31502
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows, this.GetUserFromPayload(userPayload));
|
|
31436
31503
|
return result;
|
|
31437
31504
|
}
|
|
31505
|
+
async MJScopedPromptConfigs_VendorIDArray(mjaivendor_, { userPayload, providers }, pubSub) {
|
|
31506
|
+
this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
|
|
31507
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31508
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('VendorID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
|
|
31509
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaivendor_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
31510
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
|
|
31511
|
+
return result;
|
|
31512
|
+
}
|
|
31438
31513
|
async CreateMJAIVendor(input, { providers, userPayload }, pubSub) {
|
|
31439
31514
|
const provider = GetReadWriteProvider(providers);
|
|
31440
31515
|
return this.CreateRecord('MJ: AI Vendors', input, provider, userPayload, pubSub);
|
|
@@ -31557,6 +31632,15 @@ __decorate([
|
|
|
31557
31632
|
__metadata("design:paramtypes", [MJAIVendor_, Object, PubSubEngine]),
|
|
31558
31633
|
__metadata("design:returntype", Promise)
|
|
31559
31634
|
], MJAIVendorResolver.prototype, "MJAIAgentRuns_OverrideVendorIDArray", null);
|
|
31635
|
+
__decorate([
|
|
31636
|
+
FieldResolver(() => [MJScopedPromptConfig_]),
|
|
31637
|
+
__param(0, Root()),
|
|
31638
|
+
__param(1, Ctx()),
|
|
31639
|
+
__param(2, PubSub()),
|
|
31640
|
+
__metadata("design:type", Function),
|
|
31641
|
+
__metadata("design:paramtypes", [MJAIVendor_, Object, PubSubEngine]),
|
|
31642
|
+
__metadata("design:returntype", Promise)
|
|
31643
|
+
], MJAIVendorResolver.prototype, "MJScopedPromptConfigs_VendorIDArray", null);
|
|
31560
31644
|
__decorate([
|
|
31561
31645
|
Mutation(() => MJAIVendor_),
|
|
31562
31646
|
__param(0, Arg('input', () => CreateMJAIVendorInput)),
|
|
@@ -66362,6 +66446,10 @@ __decorate([
|
|
|
66362
66446
|
Field(() => [MJScopedPromptPart_]),
|
|
66363
66447
|
__metadata("design:type", Array)
|
|
66364
66448
|
], MJEntity_.prototype, "MJScopedPromptParts_PrimaryScopeEntityIDArray", void 0);
|
|
66449
|
+
__decorate([
|
|
66450
|
+
Field(() => [MJScopedPromptConfig_]),
|
|
66451
|
+
__metadata("design:type", Array)
|
|
66452
|
+
], MJEntity_.prototype, "MJScopedPromptConfigs_PrimaryScopeEntityIDArray", void 0);
|
|
66365
66453
|
MJEntity_ = __decorate([
|
|
66366
66454
|
ObjectType({ description: `Catalog of all entities across all schemas` })
|
|
66367
66455
|
], MJEntity_);
|
|
@@ -67527,6 +67615,14 @@ let MJEntityResolverBase = class MJEntityResolverBase extends ResolverBase {
|
|
|
67527
67615
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Parts', rows, this.GetUserFromPayload(userPayload));
|
|
67528
67616
|
return result;
|
|
67529
67617
|
}
|
|
67618
|
+
async MJScopedPromptConfigs_PrimaryScopeEntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
|
|
67619
|
+
this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
|
|
67620
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67621
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('PrimaryScopeEntityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
|
|
67622
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentity_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67623
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
|
|
67624
|
+
return result;
|
|
67625
|
+
}
|
|
67530
67626
|
async CreateMJEntity(input, { providers, userPayload }, pubSub) {
|
|
67531
67627
|
const provider = GetReadWriteProvider(providers);
|
|
67532
67628
|
return this.CreateRecord('MJ: Entities', input, provider, userPayload, pubSub);
|
|
@@ -68215,6 +68311,15 @@ __decorate([
|
|
|
68215
68311
|
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
68216
68312
|
__metadata("design:returntype", Promise)
|
|
68217
68313
|
], MJEntityResolverBase.prototype, "MJScopedPromptParts_PrimaryScopeEntityIDArray", null);
|
|
68314
|
+
__decorate([
|
|
68315
|
+
FieldResolver(() => [MJScopedPromptConfig_]),
|
|
68316
|
+
__param(0, Root()),
|
|
68317
|
+
__param(1, Ctx()),
|
|
68318
|
+
__param(2, PubSub()),
|
|
68319
|
+
__metadata("design:type", Function),
|
|
68320
|
+
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
68321
|
+
__metadata("design:returntype", Promise)
|
|
68322
|
+
], MJEntityResolverBase.prototype, "MJScopedPromptConfigs_PrimaryScopeEntityIDArray", null);
|
|
68218
68323
|
__decorate([
|
|
68219
68324
|
Mutation(() => MJEntity_),
|
|
68220
68325
|
__param(0, Arg('input', () => CreateMJEntityInput)),
|
|
@@ -113555,6 +113660,481 @@ MJSchemaInfoResolver = __decorate([
|
|
|
113555
113660
|
], MJSchemaInfoResolver);
|
|
113556
113661
|
export { MJSchemaInfoResolver };
|
|
113557
113662
|
//****************************************************************************
|
|
113663
|
+
// ENTITY CLASS for MJ: Scoped Prompt Configs
|
|
113664
|
+
//****************************************************************************
|
|
113665
|
+
let MJScopedPromptConfig_ = class MJScopedPromptConfig_ {
|
|
113666
|
+
};
|
|
113667
|
+
__decorate([
|
|
113668
|
+
Field(),
|
|
113669
|
+
MaxLength(36),
|
|
113670
|
+
__metadata("design:type", String)
|
|
113671
|
+
], MJScopedPromptConfig_.prototype, "ID", void 0);
|
|
113672
|
+
__decorate([
|
|
113673
|
+
Field({ description: `The AIPrompt whose run settings this row overrides.` }),
|
|
113674
|
+
MaxLength(36),
|
|
113675
|
+
__metadata("design:type", String)
|
|
113676
|
+
], MJScopedPromptConfig_.prototype, "PromptID", void 0);
|
|
113677
|
+
__decorate([
|
|
113678
|
+
Field({ nullable: true, description: `Optional human-readable note about this override (authoring aid; not sent to the model).` }),
|
|
113679
|
+
__metadata("design:type", String)
|
|
113680
|
+
], MJScopedPromptConfig_.prototype, "Description", void 0);
|
|
113681
|
+
__decorate([
|
|
113682
|
+
Field({ nullable: true }),
|
|
113683
|
+
MaxLength(36),
|
|
113684
|
+
__metadata("design:type", String)
|
|
113685
|
+
], MJScopedPromptConfig_.prototype, "PrimaryScopeEntityID", void 0);
|
|
113686
|
+
__decorate([
|
|
113687
|
+
Field({ nullable: true, description: `The record ID within the primary scope entity that this override is scoped to. NULL = global (applies regardless of scope). When set with empty SecondaryScopes, the override is primary-scope-only (e.g. org-level).` }),
|
|
113688
|
+
MaxLength(100),
|
|
113689
|
+
__metadata("design:type", String)
|
|
113690
|
+
], MJScopedPromptConfig_.prototype, "PrimaryScopeRecordID", void 0);
|
|
113691
|
+
__decorate([
|
|
113692
|
+
Field({ nullable: true, description: `JSON object of additional scope dimensions (e.g. {"ChannelID":"..."}). Empty/NULL with PrimaryScopeRecordID set = primary-scope-only; populated = fully-scoped. Matched (cascading or strict) against the run's SecondaryScopes.` }),
|
|
113693
|
+
__metadata("design:type", String)
|
|
113694
|
+
], MJScopedPromptConfig_.prototype, "SecondaryScopes", void 0);
|
|
113695
|
+
__decorate([
|
|
113696
|
+
Field({ description: `Lifecycle: Active (live), Provisional (staged; eligible but flaggable as not-yet-final), Archived (excluded from resolution). Only Active and Provisional are eligible for resolution.` }),
|
|
113697
|
+
MaxLength(20),
|
|
113698
|
+
__metadata("design:type", String)
|
|
113699
|
+
], MJScopedPromptConfig_.prototype, "Status", void 0);
|
|
113700
|
+
__decorate([
|
|
113701
|
+
Field(() => Int, { description: `Precedence / tie-break for resolution. Higher wins when two rows tie on scope specificity. Default 0.` }),
|
|
113702
|
+
__metadata("design:type", Number)
|
|
113703
|
+
], MJScopedPromptConfig_.prototype, "Priority", void 0);
|
|
113704
|
+
__decorate([
|
|
113705
|
+
Field({ nullable: true, description: `Optional model override for this scope. NULL = use the prompt's own model selection. Applied as AIPromptParams.override.modelId.` }),
|
|
113706
|
+
MaxLength(36),
|
|
113707
|
+
__metadata("design:type", String)
|
|
113708
|
+
], MJScopedPromptConfig_.prototype, "ModelID", void 0);
|
|
113709
|
+
__decorate([
|
|
113710
|
+
Field({ nullable: true, description: `Optional vendor override paired with ModelID (which inference provider serves the model). NULL = let MJ pick. Applied as AIPromptParams.override.vendorId.` }),
|
|
113711
|
+
MaxLength(36),
|
|
113712
|
+
__metadata("design:type", String)
|
|
113713
|
+
], MJScopedPromptConfig_.prototype, "VendorID", void 0);
|
|
113714
|
+
__decorate([
|
|
113715
|
+
Field({ nullable: true, description: `Optional AI Configuration (environment) override for this scope. NULL = inherit. Applied as AIPromptParams.configurationId.` }),
|
|
113716
|
+
MaxLength(36),
|
|
113717
|
+
__metadata("design:type", String)
|
|
113718
|
+
], MJScopedPromptConfig_.prototype, "ConfigurationID", void 0);
|
|
113719
|
+
__decorate([
|
|
113720
|
+
Field(() => Float, { nullable: true, description: `Sampling temperature override. NULL = inherit the prompt default. Applied via AIPromptParams.additionalParameters.` }),
|
|
113721
|
+
__metadata("design:type", Number)
|
|
113722
|
+
], MJScopedPromptConfig_.prototype, "Temperature", void 0);
|
|
113723
|
+
__decorate([
|
|
113724
|
+
Field(() => Float, { nullable: true, description: `Nucleus-sampling (top-p) override. NULL = inherit. Applied via additionalParameters.` }),
|
|
113725
|
+
__metadata("design:type", Number)
|
|
113726
|
+
], MJScopedPromptConfig_.prototype, "TopP", void 0);
|
|
113727
|
+
__decorate([
|
|
113728
|
+
Field(() => Int, { nullable: true, description: `Top-k sampling override. NULL = inherit. Applied via additionalParameters.` }),
|
|
113729
|
+
__metadata("design:type", Number)
|
|
113730
|
+
], MJScopedPromptConfig_.prototype, "TopK", void 0);
|
|
113731
|
+
__decorate([
|
|
113732
|
+
Field(() => Float, { nullable: true, description: `Min-p sampling override. NULL = inherit. Applied via additionalParameters.` }),
|
|
113733
|
+
__metadata("design:type", Number)
|
|
113734
|
+
], MJScopedPromptConfig_.prototype, "MinP", void 0);
|
|
113735
|
+
__decorate([
|
|
113736
|
+
Field(() => Float, { nullable: true, description: `Frequency-penalty override. NULL = inherit. Applied via additionalParameters.` }),
|
|
113737
|
+
__metadata("design:type", Number)
|
|
113738
|
+
], MJScopedPromptConfig_.prototype, "FrequencyPenalty", void 0);
|
|
113739
|
+
__decorate([
|
|
113740
|
+
Field(() => Float, { nullable: true, description: `Presence-penalty override. NULL = inherit. Applied via additionalParameters.` }),
|
|
113741
|
+
__metadata("design:type", Number)
|
|
113742
|
+
], MJScopedPromptConfig_.prototype, "PresencePenalty", void 0);
|
|
113743
|
+
__decorate([
|
|
113744
|
+
Field(() => Int, { nullable: true, description: `Deterministic sampling seed override. NULL = inherit. Applied via additionalParameters.` }),
|
|
113745
|
+
__metadata("design:type", Number)
|
|
113746
|
+
], MJScopedPromptConfig_.prototype, "Seed", void 0);
|
|
113747
|
+
__decorate([
|
|
113748
|
+
Field({ nullable: true, description: `Comma-delimited stop sequences override. NULL = inherit. Applied via additionalParameters.` }),
|
|
113749
|
+
MaxLength(1000),
|
|
113750
|
+
__metadata("design:type", String)
|
|
113751
|
+
], MJScopedPromptConfig_.prototype, "StopSequences", void 0);
|
|
113752
|
+
__decorate([
|
|
113753
|
+
Field({ nullable: true, description: `Response-format override: Any, JSON, Markdown, ModelSpecific, or Text. NULL = inherit. Applied via additionalParameters.` }),
|
|
113754
|
+
MaxLength(20),
|
|
113755
|
+
__metadata("design:type", String)
|
|
113756
|
+
], MJScopedPromptConfig_.prototype, "ResponseFormat", void 0);
|
|
113757
|
+
__decorate([
|
|
113758
|
+
Field(() => Int, { nullable: true, description: `Reasoning/effort level override (1-100). NULL = inherit the prompt default. Applied as AIPromptParams.effortLevel.` }),
|
|
113759
|
+
__metadata("design:type", Number)
|
|
113760
|
+
], MJScopedPromptConfig_.prototype, "EffortLevel", void 0);
|
|
113761
|
+
__decorate([
|
|
113762
|
+
Field(),
|
|
113763
|
+
__metadata("design:type", Date)
|
|
113764
|
+
], MJScopedPromptConfig_.prototype, "_mj__CreatedAt", void 0);
|
|
113765
|
+
__decorate([
|
|
113766
|
+
Field(),
|
|
113767
|
+
__metadata("design:type", Date)
|
|
113768
|
+
], MJScopedPromptConfig_.prototype, "_mj__UpdatedAt", void 0);
|
|
113769
|
+
__decorate([
|
|
113770
|
+
Field(),
|
|
113771
|
+
MaxLength(255),
|
|
113772
|
+
__metadata("design:type", String)
|
|
113773
|
+
], MJScopedPromptConfig_.prototype, "Prompt", void 0);
|
|
113774
|
+
__decorate([
|
|
113775
|
+
Field({ nullable: true }),
|
|
113776
|
+
MaxLength(255),
|
|
113777
|
+
__metadata("design:type", String)
|
|
113778
|
+
], MJScopedPromptConfig_.prototype, "PrimaryScopeEntity", void 0);
|
|
113779
|
+
__decorate([
|
|
113780
|
+
Field({ nullable: true }),
|
|
113781
|
+
MaxLength(50),
|
|
113782
|
+
__metadata("design:type", String)
|
|
113783
|
+
], MJScopedPromptConfig_.prototype, "Model", void 0);
|
|
113784
|
+
__decorate([
|
|
113785
|
+
Field({ nullable: true }),
|
|
113786
|
+
MaxLength(50),
|
|
113787
|
+
__metadata("design:type", String)
|
|
113788
|
+
], MJScopedPromptConfig_.prototype, "Vendor", void 0);
|
|
113789
|
+
__decorate([
|
|
113790
|
+
Field({ nullable: true }),
|
|
113791
|
+
MaxLength(100),
|
|
113792
|
+
__metadata("design:type", String)
|
|
113793
|
+
], MJScopedPromptConfig_.prototype, "Configuration", void 0);
|
|
113794
|
+
MJScopedPromptConfig_ = __decorate([
|
|
113795
|
+
ObjectType({ description: `A scope-aware override of an AIPrompt\'s RUN SETTINGS (model/vendor, AI configuration, sampling knobs, response format, effort level). The run-settings sibling of ScopedPromptPart. Narrowed by a polymorphic scope (PrimaryScopeEntity/Record + SecondaryScopes). Resolved by a cached engine via a specificity cascade per PromptID — the most-specific in-scope row wins as a whole row (tie-broken by Priority); each non-null column overrides the prompt default, a NULL column inherits it. Runtime-explicit overrides on the agent run still win. Lets any MJ app tune model/generation behavior per scope by editing rows, not code.` })
|
|
113796
|
+
], MJScopedPromptConfig_);
|
|
113797
|
+
export { MJScopedPromptConfig_ };
|
|
113798
|
+
//****************************************************************************
|
|
113799
|
+
// INPUT TYPE for MJ: Scoped Prompt Configs
|
|
113800
|
+
//****************************************************************************
|
|
113801
|
+
let CreateMJScopedPromptConfigInput = class CreateMJScopedPromptConfigInput {
|
|
113802
|
+
};
|
|
113803
|
+
__decorate([
|
|
113804
|
+
Field({ nullable: true }),
|
|
113805
|
+
__metadata("design:type", String)
|
|
113806
|
+
], CreateMJScopedPromptConfigInput.prototype, "ID", void 0);
|
|
113807
|
+
__decorate([
|
|
113808
|
+
Field({ nullable: true }),
|
|
113809
|
+
__metadata("design:type", String)
|
|
113810
|
+
], CreateMJScopedPromptConfigInput.prototype, "PromptID", void 0);
|
|
113811
|
+
__decorate([
|
|
113812
|
+
Field({ nullable: true }),
|
|
113813
|
+
__metadata("design:type", String)
|
|
113814
|
+
], CreateMJScopedPromptConfigInput.prototype, "Description", void 0);
|
|
113815
|
+
__decorate([
|
|
113816
|
+
Field({ nullable: true }),
|
|
113817
|
+
__metadata("design:type", String)
|
|
113818
|
+
], CreateMJScopedPromptConfigInput.prototype, "PrimaryScopeEntityID", void 0);
|
|
113819
|
+
__decorate([
|
|
113820
|
+
Field({ nullable: true }),
|
|
113821
|
+
__metadata("design:type", String)
|
|
113822
|
+
], CreateMJScopedPromptConfigInput.prototype, "PrimaryScopeRecordID", void 0);
|
|
113823
|
+
__decorate([
|
|
113824
|
+
Field({ nullable: true }),
|
|
113825
|
+
__metadata("design:type", String)
|
|
113826
|
+
], CreateMJScopedPromptConfigInput.prototype, "SecondaryScopes", void 0);
|
|
113827
|
+
__decorate([
|
|
113828
|
+
Field({ nullable: true }),
|
|
113829
|
+
__metadata("design:type", String)
|
|
113830
|
+
], CreateMJScopedPromptConfigInput.prototype, "Status", void 0);
|
|
113831
|
+
__decorate([
|
|
113832
|
+
Field(() => Int, { nullable: true }),
|
|
113833
|
+
__metadata("design:type", Number)
|
|
113834
|
+
], CreateMJScopedPromptConfigInput.prototype, "Priority", void 0);
|
|
113835
|
+
__decorate([
|
|
113836
|
+
Field({ nullable: true }),
|
|
113837
|
+
__metadata("design:type", String)
|
|
113838
|
+
], CreateMJScopedPromptConfigInput.prototype, "ModelID", void 0);
|
|
113839
|
+
__decorate([
|
|
113840
|
+
Field({ nullable: true }),
|
|
113841
|
+
__metadata("design:type", String)
|
|
113842
|
+
], CreateMJScopedPromptConfigInput.prototype, "VendorID", void 0);
|
|
113843
|
+
__decorate([
|
|
113844
|
+
Field({ nullable: true }),
|
|
113845
|
+
__metadata("design:type", String)
|
|
113846
|
+
], CreateMJScopedPromptConfigInput.prototype, "ConfigurationID", void 0);
|
|
113847
|
+
__decorate([
|
|
113848
|
+
Field(() => Float, { nullable: true }),
|
|
113849
|
+
__metadata("design:type", Number)
|
|
113850
|
+
], CreateMJScopedPromptConfigInput.prototype, "Temperature", void 0);
|
|
113851
|
+
__decorate([
|
|
113852
|
+
Field(() => Float, { nullable: true }),
|
|
113853
|
+
__metadata("design:type", Number)
|
|
113854
|
+
], CreateMJScopedPromptConfigInput.prototype, "TopP", void 0);
|
|
113855
|
+
__decorate([
|
|
113856
|
+
Field(() => Int, { nullable: true }),
|
|
113857
|
+
__metadata("design:type", Number)
|
|
113858
|
+
], CreateMJScopedPromptConfigInput.prototype, "TopK", void 0);
|
|
113859
|
+
__decorate([
|
|
113860
|
+
Field(() => Float, { nullable: true }),
|
|
113861
|
+
__metadata("design:type", Number)
|
|
113862
|
+
], CreateMJScopedPromptConfigInput.prototype, "MinP", void 0);
|
|
113863
|
+
__decorate([
|
|
113864
|
+
Field(() => Float, { nullable: true }),
|
|
113865
|
+
__metadata("design:type", Number)
|
|
113866
|
+
], CreateMJScopedPromptConfigInput.prototype, "FrequencyPenalty", void 0);
|
|
113867
|
+
__decorate([
|
|
113868
|
+
Field(() => Float, { nullable: true }),
|
|
113869
|
+
__metadata("design:type", Number)
|
|
113870
|
+
], CreateMJScopedPromptConfigInput.prototype, "PresencePenalty", void 0);
|
|
113871
|
+
__decorate([
|
|
113872
|
+
Field(() => Int, { nullable: true }),
|
|
113873
|
+
__metadata("design:type", Number)
|
|
113874
|
+
], CreateMJScopedPromptConfigInput.prototype, "Seed", void 0);
|
|
113875
|
+
__decorate([
|
|
113876
|
+
Field({ nullable: true }),
|
|
113877
|
+
__metadata("design:type", String)
|
|
113878
|
+
], CreateMJScopedPromptConfigInput.prototype, "StopSequences", void 0);
|
|
113879
|
+
__decorate([
|
|
113880
|
+
Field({ nullable: true }),
|
|
113881
|
+
__metadata("design:type", String)
|
|
113882
|
+
], CreateMJScopedPromptConfigInput.prototype, "ResponseFormat", void 0);
|
|
113883
|
+
__decorate([
|
|
113884
|
+
Field(() => Int, { nullable: true }),
|
|
113885
|
+
__metadata("design:type", Number)
|
|
113886
|
+
], CreateMJScopedPromptConfigInput.prototype, "EffortLevel", void 0);
|
|
113887
|
+
__decorate([
|
|
113888
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
113889
|
+
__metadata("design:type", RestoreContextInput)
|
|
113890
|
+
], CreateMJScopedPromptConfigInput.prototype, "RestoreContext___", void 0);
|
|
113891
|
+
CreateMJScopedPromptConfigInput = __decorate([
|
|
113892
|
+
InputType()
|
|
113893
|
+
], CreateMJScopedPromptConfigInput);
|
|
113894
|
+
export { CreateMJScopedPromptConfigInput };
|
|
113895
|
+
//****************************************************************************
|
|
113896
|
+
// INPUT TYPE for MJ: Scoped Prompt Configs
|
|
113897
|
+
//****************************************************************************
|
|
113898
|
+
let UpdateMJScopedPromptConfigInput = class UpdateMJScopedPromptConfigInput {
|
|
113899
|
+
};
|
|
113900
|
+
__decorate([
|
|
113901
|
+
Field(),
|
|
113902
|
+
__metadata("design:type", String)
|
|
113903
|
+
], UpdateMJScopedPromptConfigInput.prototype, "ID", void 0);
|
|
113904
|
+
__decorate([
|
|
113905
|
+
Field({ nullable: true }),
|
|
113906
|
+
__metadata("design:type", String)
|
|
113907
|
+
], UpdateMJScopedPromptConfigInput.prototype, "PromptID", void 0);
|
|
113908
|
+
__decorate([
|
|
113909
|
+
Field({ nullable: true }),
|
|
113910
|
+
__metadata("design:type", String)
|
|
113911
|
+
], UpdateMJScopedPromptConfigInput.prototype, "Description", void 0);
|
|
113912
|
+
__decorate([
|
|
113913
|
+
Field({ nullable: true }),
|
|
113914
|
+
__metadata("design:type", String)
|
|
113915
|
+
], UpdateMJScopedPromptConfigInput.prototype, "PrimaryScopeEntityID", void 0);
|
|
113916
|
+
__decorate([
|
|
113917
|
+
Field({ nullable: true }),
|
|
113918
|
+
__metadata("design:type", String)
|
|
113919
|
+
], UpdateMJScopedPromptConfigInput.prototype, "PrimaryScopeRecordID", void 0);
|
|
113920
|
+
__decorate([
|
|
113921
|
+
Field({ nullable: true }),
|
|
113922
|
+
__metadata("design:type", String)
|
|
113923
|
+
], UpdateMJScopedPromptConfigInput.prototype, "SecondaryScopes", void 0);
|
|
113924
|
+
__decorate([
|
|
113925
|
+
Field({ nullable: true }),
|
|
113926
|
+
__metadata("design:type", String)
|
|
113927
|
+
], UpdateMJScopedPromptConfigInput.prototype, "Status", void 0);
|
|
113928
|
+
__decorate([
|
|
113929
|
+
Field(() => Int, { nullable: true }),
|
|
113930
|
+
__metadata("design:type", Number)
|
|
113931
|
+
], UpdateMJScopedPromptConfigInput.prototype, "Priority", void 0);
|
|
113932
|
+
__decorate([
|
|
113933
|
+
Field({ nullable: true }),
|
|
113934
|
+
__metadata("design:type", String)
|
|
113935
|
+
], UpdateMJScopedPromptConfigInput.prototype, "ModelID", void 0);
|
|
113936
|
+
__decorate([
|
|
113937
|
+
Field({ nullable: true }),
|
|
113938
|
+
__metadata("design:type", String)
|
|
113939
|
+
], UpdateMJScopedPromptConfigInput.prototype, "VendorID", void 0);
|
|
113940
|
+
__decorate([
|
|
113941
|
+
Field({ nullable: true }),
|
|
113942
|
+
__metadata("design:type", String)
|
|
113943
|
+
], UpdateMJScopedPromptConfigInput.prototype, "ConfigurationID", void 0);
|
|
113944
|
+
__decorate([
|
|
113945
|
+
Field(() => Float, { nullable: true }),
|
|
113946
|
+
__metadata("design:type", Number)
|
|
113947
|
+
], UpdateMJScopedPromptConfigInput.prototype, "Temperature", void 0);
|
|
113948
|
+
__decorate([
|
|
113949
|
+
Field(() => Float, { nullable: true }),
|
|
113950
|
+
__metadata("design:type", Number)
|
|
113951
|
+
], UpdateMJScopedPromptConfigInput.prototype, "TopP", void 0);
|
|
113952
|
+
__decorate([
|
|
113953
|
+
Field(() => Int, { nullable: true }),
|
|
113954
|
+
__metadata("design:type", Number)
|
|
113955
|
+
], UpdateMJScopedPromptConfigInput.prototype, "TopK", void 0);
|
|
113956
|
+
__decorate([
|
|
113957
|
+
Field(() => Float, { nullable: true }),
|
|
113958
|
+
__metadata("design:type", Number)
|
|
113959
|
+
], UpdateMJScopedPromptConfigInput.prototype, "MinP", void 0);
|
|
113960
|
+
__decorate([
|
|
113961
|
+
Field(() => Float, { nullable: true }),
|
|
113962
|
+
__metadata("design:type", Number)
|
|
113963
|
+
], UpdateMJScopedPromptConfigInput.prototype, "FrequencyPenalty", void 0);
|
|
113964
|
+
__decorate([
|
|
113965
|
+
Field(() => Float, { nullable: true }),
|
|
113966
|
+
__metadata("design:type", Number)
|
|
113967
|
+
], UpdateMJScopedPromptConfigInput.prototype, "PresencePenalty", void 0);
|
|
113968
|
+
__decorate([
|
|
113969
|
+
Field(() => Int, { nullable: true }),
|
|
113970
|
+
__metadata("design:type", Number)
|
|
113971
|
+
], UpdateMJScopedPromptConfigInput.prototype, "Seed", void 0);
|
|
113972
|
+
__decorate([
|
|
113973
|
+
Field({ nullable: true }),
|
|
113974
|
+
__metadata("design:type", String)
|
|
113975
|
+
], UpdateMJScopedPromptConfigInput.prototype, "StopSequences", void 0);
|
|
113976
|
+
__decorate([
|
|
113977
|
+
Field({ nullable: true }),
|
|
113978
|
+
__metadata("design:type", String)
|
|
113979
|
+
], UpdateMJScopedPromptConfigInput.prototype, "ResponseFormat", void 0);
|
|
113980
|
+
__decorate([
|
|
113981
|
+
Field(() => Int, { nullable: true }),
|
|
113982
|
+
__metadata("design:type", Number)
|
|
113983
|
+
], UpdateMJScopedPromptConfigInput.prototype, "EffortLevel", void 0);
|
|
113984
|
+
__decorate([
|
|
113985
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
113986
|
+
__metadata("design:type", Array)
|
|
113987
|
+
], UpdateMJScopedPromptConfigInput.prototype, "OldValues___", void 0);
|
|
113988
|
+
__decorate([
|
|
113989
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
113990
|
+
__metadata("design:type", RestoreContextInput)
|
|
113991
|
+
], UpdateMJScopedPromptConfigInput.prototype, "RestoreContext___", void 0);
|
|
113992
|
+
UpdateMJScopedPromptConfigInput = __decorate([
|
|
113993
|
+
InputType()
|
|
113994
|
+
], UpdateMJScopedPromptConfigInput);
|
|
113995
|
+
export { UpdateMJScopedPromptConfigInput };
|
|
113996
|
+
//****************************************************************************
|
|
113997
|
+
// RESOLVER for MJ: Scoped Prompt Configs
|
|
113998
|
+
//****************************************************************************
|
|
113999
|
+
let RunMJScopedPromptConfigViewResult = class RunMJScopedPromptConfigViewResult {
|
|
114000
|
+
};
|
|
114001
|
+
__decorate([
|
|
114002
|
+
Field(() => [MJScopedPromptConfig_]),
|
|
114003
|
+
__metadata("design:type", Array)
|
|
114004
|
+
], RunMJScopedPromptConfigViewResult.prototype, "Results", void 0);
|
|
114005
|
+
__decorate([
|
|
114006
|
+
Field(() => String, { nullable: true }),
|
|
114007
|
+
__metadata("design:type", String)
|
|
114008
|
+
], RunMJScopedPromptConfigViewResult.prototype, "UserViewRunID", void 0);
|
|
114009
|
+
__decorate([
|
|
114010
|
+
Field(() => Int, { nullable: true }),
|
|
114011
|
+
__metadata("design:type", Number)
|
|
114012
|
+
], RunMJScopedPromptConfigViewResult.prototype, "RowCount", void 0);
|
|
114013
|
+
__decorate([
|
|
114014
|
+
Field(() => Int, { nullable: true }),
|
|
114015
|
+
__metadata("design:type", Number)
|
|
114016
|
+
], RunMJScopedPromptConfigViewResult.prototype, "TotalRowCount", void 0);
|
|
114017
|
+
__decorate([
|
|
114018
|
+
Field(() => Int, { nullable: true }),
|
|
114019
|
+
__metadata("design:type", Number)
|
|
114020
|
+
], RunMJScopedPromptConfigViewResult.prototype, "ExecutionTime", void 0);
|
|
114021
|
+
__decorate([
|
|
114022
|
+
Field({ nullable: true }),
|
|
114023
|
+
__metadata("design:type", String)
|
|
114024
|
+
], RunMJScopedPromptConfigViewResult.prototype, "ErrorMessage", void 0);
|
|
114025
|
+
__decorate([
|
|
114026
|
+
Field(() => Boolean, { nullable: false }),
|
|
114027
|
+
__metadata("design:type", Boolean)
|
|
114028
|
+
], RunMJScopedPromptConfigViewResult.prototype, "Success", void 0);
|
|
114029
|
+
RunMJScopedPromptConfigViewResult = __decorate([
|
|
114030
|
+
ObjectType()
|
|
114031
|
+
], RunMJScopedPromptConfigViewResult);
|
|
114032
|
+
export { RunMJScopedPromptConfigViewResult };
|
|
114033
|
+
let MJScopedPromptConfigResolver = class MJScopedPromptConfigResolver extends ResolverBase {
|
|
114034
|
+
async RunMJScopedPromptConfigViewByID(input, { providers, userPayload }, pubSub) {
|
|
114035
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
114036
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
114037
|
+
}
|
|
114038
|
+
async RunMJScopedPromptConfigViewByName(input, { providers, userPayload }, pubSub) {
|
|
114039
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
114040
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
114041
|
+
}
|
|
114042
|
+
async RunMJScopedPromptConfigDynamicView(input, { providers, userPayload }, pubSub) {
|
|
114043
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
114044
|
+
input.EntityName = 'MJ: Scoped Prompt Configs';
|
|
114045
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
114046
|
+
}
|
|
114047
|
+
async MJScopedPromptConfig(ID, { userPayload, providers }, pubSub) {
|
|
114048
|
+
this.CheckUserReadPermissions('MJ: Scoped Prompt Configs', userPayload);
|
|
114049
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
114050
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScopedPromptConfigs')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scoped Prompt Configs', userPayload, EntityPermissionType.Read, 'AND');
|
|
114051
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
114052
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
114053
|
+
return result;
|
|
114054
|
+
}
|
|
114055
|
+
async CreateMJScopedPromptConfig(input, { providers, userPayload }, pubSub) {
|
|
114056
|
+
const provider = GetReadWriteProvider(providers);
|
|
114057
|
+
return this.CreateRecord('MJ: Scoped Prompt Configs', input, provider, userPayload, pubSub);
|
|
114058
|
+
}
|
|
114059
|
+
async UpdateMJScopedPromptConfig(input, { providers, userPayload }, pubSub) {
|
|
114060
|
+
const provider = GetReadWriteProvider(providers);
|
|
114061
|
+
return this.UpdateRecord('MJ: Scoped Prompt Configs', input, provider, userPayload, pubSub);
|
|
114062
|
+
}
|
|
114063
|
+
async DeleteMJScopedPromptConfig(ID, options, { providers, userPayload }, pubSub) {
|
|
114064
|
+
const provider = GetReadWriteProvider(providers);
|
|
114065
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
114066
|
+
return this.DeleteRecord('MJ: Scoped Prompt Configs', key, options, provider, userPayload, pubSub);
|
|
114067
|
+
}
|
|
114068
|
+
};
|
|
114069
|
+
__decorate([
|
|
114070
|
+
Query(() => RunMJScopedPromptConfigViewResult),
|
|
114071
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
114072
|
+
__param(1, Ctx()),
|
|
114073
|
+
__param(2, PubSub()),
|
|
114074
|
+
__metadata("design:type", Function),
|
|
114075
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
114076
|
+
__metadata("design:returntype", Promise)
|
|
114077
|
+
], MJScopedPromptConfigResolver.prototype, "RunMJScopedPromptConfigViewByID", null);
|
|
114078
|
+
__decorate([
|
|
114079
|
+
Query(() => RunMJScopedPromptConfigViewResult),
|
|
114080
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
114081
|
+
__param(1, Ctx()),
|
|
114082
|
+
__param(2, PubSub()),
|
|
114083
|
+
__metadata("design:type", Function),
|
|
114084
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
114085
|
+
__metadata("design:returntype", Promise)
|
|
114086
|
+
], MJScopedPromptConfigResolver.prototype, "RunMJScopedPromptConfigViewByName", null);
|
|
114087
|
+
__decorate([
|
|
114088
|
+
Query(() => RunMJScopedPromptConfigViewResult),
|
|
114089
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
114090
|
+
__param(1, Ctx()),
|
|
114091
|
+
__param(2, PubSub()),
|
|
114092
|
+
__metadata("design:type", Function),
|
|
114093
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
114094
|
+
__metadata("design:returntype", Promise)
|
|
114095
|
+
], MJScopedPromptConfigResolver.prototype, "RunMJScopedPromptConfigDynamicView", null);
|
|
114096
|
+
__decorate([
|
|
114097
|
+
Query(() => MJScopedPromptConfig_, { nullable: true }),
|
|
114098
|
+
__param(0, Arg('ID', () => String)),
|
|
114099
|
+
__param(1, Ctx()),
|
|
114100
|
+
__param(2, PubSub()),
|
|
114101
|
+
__metadata("design:type", Function),
|
|
114102
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
114103
|
+
__metadata("design:returntype", Promise)
|
|
114104
|
+
], MJScopedPromptConfigResolver.prototype, "MJScopedPromptConfig", null);
|
|
114105
|
+
__decorate([
|
|
114106
|
+
Mutation(() => MJScopedPromptConfig_),
|
|
114107
|
+
__param(0, Arg('input', () => CreateMJScopedPromptConfigInput)),
|
|
114108
|
+
__param(1, Ctx()),
|
|
114109
|
+
__param(2, PubSub()),
|
|
114110
|
+
__metadata("design:type", Function),
|
|
114111
|
+
__metadata("design:paramtypes", [CreateMJScopedPromptConfigInput, Object, PubSubEngine]),
|
|
114112
|
+
__metadata("design:returntype", Promise)
|
|
114113
|
+
], MJScopedPromptConfigResolver.prototype, "CreateMJScopedPromptConfig", null);
|
|
114114
|
+
__decorate([
|
|
114115
|
+
Mutation(() => MJScopedPromptConfig_),
|
|
114116
|
+
__param(0, Arg('input', () => UpdateMJScopedPromptConfigInput)),
|
|
114117
|
+
__param(1, Ctx()),
|
|
114118
|
+
__param(2, PubSub()),
|
|
114119
|
+
__metadata("design:type", Function),
|
|
114120
|
+
__metadata("design:paramtypes", [UpdateMJScopedPromptConfigInput, Object, PubSubEngine]),
|
|
114121
|
+
__metadata("design:returntype", Promise)
|
|
114122
|
+
], MJScopedPromptConfigResolver.prototype, "UpdateMJScopedPromptConfig", null);
|
|
114123
|
+
__decorate([
|
|
114124
|
+
Mutation(() => MJScopedPromptConfig_),
|
|
114125
|
+
__param(0, Arg('ID', () => String)),
|
|
114126
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
114127
|
+
__param(2, Ctx()),
|
|
114128
|
+
__param(3, PubSub()),
|
|
114129
|
+
__metadata("design:type", Function),
|
|
114130
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
114131
|
+
__metadata("design:returntype", Promise)
|
|
114132
|
+
], MJScopedPromptConfigResolver.prototype, "DeleteMJScopedPromptConfig", null);
|
|
114133
|
+
MJScopedPromptConfigResolver = __decorate([
|
|
114134
|
+
Resolver(MJScopedPromptConfig_)
|
|
114135
|
+
], MJScopedPromptConfigResolver);
|
|
114136
|
+
export { MJScopedPromptConfigResolver };
|
|
114137
|
+
//****************************************************************************
|
|
113558
114138
|
// ENTITY CLASS for MJ: Scoped Prompt Parts
|
|
113559
114139
|
//****************************************************************************
|
|
113560
114140
|
let MJScopedPromptPart_ = class MJScopedPromptPart_ {
|