@memberjunction/server 5.48.0 → 5.50.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/README.md +9 -0
- package/dist/auth/magicLink/MagicLinkKeys.d.ts.map +1 -1
- package/dist/auth/magicLink/MagicLinkKeys.js +11 -4
- package/dist/auth/magicLink/MagicLinkKeys.js.map +1 -1
- package/dist/auth/magicLink/MagicLinkRouter.js +2 -2
- package/dist/auth/magicLink/MagicLinkRouter.js.map +1 -1
- package/dist/auth/magicLink/MagicLinkService.d.ts.map +1 -1
- package/dist/auth/magicLink/MagicLinkService.js +4 -0
- package/dist/auth/magicLink/MagicLinkService.js.map +1 -1
- package/dist/auth/newUsers.d.ts.map +1 -1
- package/dist/auth/newUsers.js +6 -4
- package/dist/auth/newUsers.js.map +1 -1
- package/dist/config.d.ts +40 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +28 -2
- package/dist/context.js.map +1 -1
- package/dist/generated/generated.d.ts +373 -6
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1975 -39
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +4 -2
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/generic/RunViewResolver.d.ts +1 -0
- package/dist/generic/RunViewResolver.d.ts.map +1 -1
- package/dist/generic/RunViewResolver.js +12 -0
- package/dist/generic/RunViewResolver.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -11
- package/dist/index.js.map +1 -1
- package/dist/integration/CustomColumnPromoter.d.ts +15 -2
- package/dist/integration/CustomColumnPromoter.d.ts.map +1 -1
- package/dist/integration/CustomColumnPromoter.js +113 -11
- package/dist/integration/CustomColumnPromoter.js.map +1 -1
- package/dist/integration/EntityMapLifecycle.d.ts +66 -0
- package/dist/integration/EntityMapLifecycle.d.ts.map +1 -0
- package/dist/integration/EntityMapLifecycle.js +189 -0
- package/dist/integration/EntityMapLifecycle.js.map +1 -0
- package/dist/realtimeProxy/RealtimeProxyServer.d.ts +10 -0
- package/dist/realtimeProxy/RealtimeProxyServer.d.ts.map +1 -1
- package/dist/realtimeProxy/RealtimeProxyServer.js +67 -1
- package/dist/realtimeProxy/RealtimeProxyServer.js.map +1 -1
- package/dist/realtimeWidget/WidgetRouter.d.ts.map +1 -1
- package/dist/realtimeWidget/WidgetRouter.js +6 -2
- package/dist/realtimeWidget/WidgetRouter.js.map +1 -1
- package/dist/realtimeWidget/WidgetSessionService.d.ts +12 -1
- package/dist/realtimeWidget/WidgetSessionService.d.ts.map +1 -1
- package/dist/realtimeWidget/WidgetSessionService.js +23 -8
- package/dist/realtimeWidget/WidgetSessionService.js.map +1 -1
- package/dist/resolvers/AdhocQueryResolver.d.ts +17 -0
- package/dist/resolvers/AdhocQueryResolver.d.ts.map +1 -1
- package/dist/resolvers/AdhocQueryResolver.js +81 -25
- package/dist/resolvers/AdhocQueryResolver.js.map +1 -1
- package/dist/resolvers/GetDataResolver.d.ts +16 -0
- package/dist/resolvers/GetDataResolver.d.ts.map +1 -1
- package/dist/resolvers/GetDataResolver.js +26 -1
- package/dist/resolvers/GetDataResolver.js.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts +53 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.js +531 -64
- package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
- package/dist/resolvers/QueryResolver.d.ts.map +1 -1
- package/dist/resolvers/QueryResolver.js +0 -6
- package/dist/resolvers/QueryResolver.js.map +1 -1
- package/dist/resolvers/RSUResolver.d.ts +10 -0
- package/dist/resolvers/RSUResolver.d.ts.map +1 -1
- package/dist/resolvers/RSUResolver.js +28 -0
- package/dist/resolvers/RSUResolver.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts +9 -6
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +135 -132
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/TransactionGroupResolver.d.ts +8 -1
- package/dist/resolvers/TransactionGroupResolver.d.ts.map +1 -1
- package/dist/resolvers/TransactionGroupResolver.js +29 -1
- package/dist/resolvers/TransactionGroupResolver.js.map +1 -1
- package/dist/resolvers/adhoc-query-helpers.d.ts +27 -0
- package/dist/resolvers/adhoc-query-helpers.d.ts.map +1 -0
- package/dist/resolvers/adhoc-query-helpers.js +42 -0
- package/dist/resolvers/adhoc-query-helpers.js.map +1 -0
- package/dist/rest/OAuthCallbackHandler.d.ts +9 -0
- package/dist/rest/OAuthCallbackHandler.d.ts.map +1 -1
- package/dist/rest/OAuthCallbackHandler.js +21 -4
- package/dist/rest/OAuthCallbackHandler.js.map +1 -1
- package/dist/telephony/media-upgrade-router.d.ts +14 -0
- package/dist/telephony/media-upgrade-router.d.ts.map +1 -1
- package/dist/telephony/media-upgrade-router.js +17 -1
- package/dist/telephony/media-upgrade-router.js.map +1 -1
- package/package.json +91 -89
- package/src/__tests__/AdhocQueryResolver.pagination.test.ts +114 -0
- package/src/__tests__/EntityMapLifecycle.dagWarnings.test.ts +91 -0
- package/src/__tests__/OAuthCallbackHandler.xss.test.ts +83 -0
- package/src/__tests__/RealtimeProxyServer.test.ts +53 -1
- package/src/__tests__/WidgetSessionService.test.ts +96 -0
- package/src/__tests__/adhoc-query-helpers.test.ts +50 -0
- package/src/__tests__/magicLinkService.provisionLog.test.ts +106 -0
- package/src/__tests__/media-upgrade-router.test.ts +43 -0
- package/src/__tests__/unifiedAuth.test.ts +18 -3
- package/src/auth/magicLink/MagicLinkKeys.ts +12 -6
- package/src/auth/magicLink/MagicLinkRouter.ts +2 -2
- package/src/auth/magicLink/MagicLinkService.ts +4 -0
- package/src/auth/newUsers.ts +6 -5
- package/src/config.ts +14 -0
- package/src/context.ts +28 -2
- package/src/generated/generated.ts +1385 -28
- package/src/generic/ResolverBase.ts +5 -2
- package/src/generic/RunViewResolver.ts +11 -0
- package/src/index.ts +75 -11
- package/src/integration/CustomColumnPromoter.ts +123 -6
- package/src/integration/EntityMapLifecycle.ts +221 -0
- package/src/realtimeProxy/RealtimeProxyServer.ts +70 -1
- package/src/realtimeWidget/WidgetRouter.ts +6 -2
- package/src/realtimeWidget/WidgetSessionService.ts +24 -8
- package/src/resolvers/AdhocQueryResolver.ts +97 -30
- package/src/resolvers/GetDataResolver.ts +30 -1
- package/src/resolvers/IntegrationDiscoveryResolver.ts +523 -64
- package/src/resolvers/QueryResolver.ts +1 -7
- package/src/resolvers/RSUResolver.ts +28 -0
- package/src/resolvers/RunAIAgentResolver.ts +74 -70
- package/src/resolvers/TransactionGroupResolver.ts +36 -2
- package/src/resolvers/__tests__/GetDataResolver.tokens.test.ts +138 -0
- package/src/resolvers/adhoc-query-helpers.ts +50 -0
- package/src/rest/OAuthCallbackHandler.ts +22 -4
- package/src/telephony/media-upgrade-router.ts +18 -1
|
@@ -11861,10 +11861,6 @@ __decorate([
|
|
|
11861
11861
|
Field(() => [MJAIAgentRequest_]),
|
|
11862
11862
|
__metadata("design:type", Array)
|
|
11863
11863
|
], MJAIAgentRun_.prototype, "MJAIAgentRequests_ResumingAgentRunIDArray", void 0);
|
|
11864
|
-
__decorate([
|
|
11865
|
-
Field(() => [MJAIPromptRun_]),
|
|
11866
|
-
__metadata("design:type", Array)
|
|
11867
|
-
], MJAIAgentRun_.prototype, "MJAIPromptRuns_AgentRunIDArray", void 0);
|
|
11868
11864
|
__decorate([
|
|
11869
11865
|
Field(() => [MJAIAgentRun_]),
|
|
11870
11866
|
__metadata("design:type", Array)
|
|
@@ -12430,14 +12426,6 @@ let MJAIAgentRunResolver = class MJAIAgentRunResolver extends ResolverBase {
|
|
|
12430
12426
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Requests', rows, this.GetUserFromPayload(userPayload));
|
|
12431
12427
|
return result;
|
|
12432
12428
|
}
|
|
12433
|
-
async MJAIPromptRuns_AgentRunIDArray(mjaiagentrun_, { userPayload, providers }, pubSub) {
|
|
12434
|
-
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
12435
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12436
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIPromptRuns')} WHERE ${provider.QuoteIdentifier('AgentRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
12437
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjaiagentrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
12438
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows, this.GetUserFromPayload(userPayload));
|
|
12439
|
-
return result;
|
|
12440
|
-
}
|
|
12441
12429
|
async MJAIAgentRuns_LastRunIDArray(mjaiagentrun_, { userPayload, providers }, pubSub) {
|
|
12442
12430
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
12443
12431
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -12599,15 +12587,6 @@ __decorate([
|
|
|
12599
12587
|
__metadata("design:paramtypes", [MJAIAgentRun_, Object, PubSubEngine]),
|
|
12600
12588
|
__metadata("design:returntype", Promise)
|
|
12601
12589
|
], MJAIAgentRunResolver.prototype, "MJAIAgentRequests_ResumingAgentRunIDArray", null);
|
|
12602
|
-
__decorate([
|
|
12603
|
-
FieldResolver(() => [MJAIPromptRun_]),
|
|
12604
|
-
__param(0, Root()),
|
|
12605
|
-
__param(1, Ctx()),
|
|
12606
|
-
__param(2, PubSub()),
|
|
12607
|
-
__metadata("design:type", Function),
|
|
12608
|
-
__metadata("design:paramtypes", [MJAIAgentRun_, Object, PubSubEngine]),
|
|
12609
|
-
__metadata("design:returntype", Promise)
|
|
12610
|
-
], MJAIAgentRunResolver.prototype, "MJAIPromptRuns_AgentRunIDArray", null);
|
|
12611
12590
|
__decorate([
|
|
12612
12591
|
FieldResolver(() => [MJAIAgentRun_]),
|
|
12613
12592
|
__param(0, Root()),
|
|
@@ -15739,6 +15718,36 @@ __decorate([
|
|
|
15739
15718
|
Field({ nullable: true, description: `Type-level DEFAULT configuration JSON for agents of this type — the base layer of the effective-configuration merge: type DefaultConfiguration <- agent TypeConfiguration <- runtime overrides (later layers win per key, deep-merged). Must itself conform to ConfigSchema when one is published. Null = no type defaults.` }),
|
|
15740
15719
|
__metadata("design:type", String)
|
|
15741
15720
|
], MJAIAgentType_.prototype, "DefaultConfiguration", void 0);
|
|
15721
|
+
__decorate([
|
|
15722
|
+
Field(() => Int, { nullable: true, description: `Type-level default for the in-turn context-compression message-count threshold. Overridable per agent via AIAgent.ContextCompressionMessageThreshold.` }),
|
|
15723
|
+
__metadata("design:type", Number)
|
|
15724
|
+
], MJAIAgentType_.prototype, "ContextCompressionMessageThreshold", void 0);
|
|
15725
|
+
__decorate([
|
|
15726
|
+
Field({ nullable: true, description: `Type-level default prompt used for in-turn context compression. Overridable per agent via AIAgent.ContextCompressionPromptID.` }),
|
|
15727
|
+
MaxLength(36),
|
|
15728
|
+
__metadata("design:type", String)
|
|
15729
|
+
], MJAIAgentType_.prototype, "ContextCompressionPromptID", void 0);
|
|
15730
|
+
__decorate([
|
|
15731
|
+
Field(() => Int, { nullable: true, description: `Type-level default for the number of most-recent messages kept uncompressed (the "hot tail") when context compression is applied. Overridable per agent via AIAgent.ContextCompressionMessageRetentionCount.` }),
|
|
15732
|
+
__metadata("design:type", Number)
|
|
15733
|
+
], MJAIAgentType_.prototype, "ContextCompressionMessageRetentionCount", void 0);
|
|
15734
|
+
__decorate([
|
|
15735
|
+
Field(() => Int, { nullable: true, description: `Type-level default effective working-context budget, in tokens. Null means use the selected model's MaxInputTokens. The resolved value is clamped to the model's limit at runtime (a warning is logged if it would exceed it). Overridable per agent via AIAgent.ContextWindowMaxTokens.` }),
|
|
15736
|
+
__metadata("design:type", Number)
|
|
15737
|
+
], MJAIAgentType_.prototype, "ContextWindowMaxTokens", void 0);
|
|
15738
|
+
__decorate([
|
|
15739
|
+
Field(() => Int, { description: `Type-level default: the percentage of the effective context budget at which cross-turn conversation compaction is triggered. Defaults to 75. Overridable per agent via AIAgent.CompactionTriggerPercent.` }),
|
|
15740
|
+
__metadata("design:type", Number)
|
|
15741
|
+
], MJAIAgentType_.prototype, "CompactionTriggerPercent", void 0);
|
|
15742
|
+
__decorate([
|
|
15743
|
+
Field(() => Int, { description: `Type-level default: the target percentage of the effective context budget to reduce to after a cross-turn compaction. Defaults to 30. Overridable per agent via AIAgent.CompactionTargetPercent.` }),
|
|
15744
|
+
__metadata("design:type", Number)
|
|
15745
|
+
], MJAIAgentType_.prototype, "CompactionTargetPercent", void 0);
|
|
15746
|
+
__decorate([
|
|
15747
|
+
Field({ nullable: true, description: `Type-level default prompt used for cross-turn conversation compaction (the durable summary baseline). Distinct from ContextCompressionPromptID, which governs in-turn compression. Overridable per agent via AIAgent.ConversationSummaryPromptID.` }),
|
|
15748
|
+
MaxLength(36),
|
|
15749
|
+
__metadata("design:type", String)
|
|
15750
|
+
], MJAIAgentType_.prototype, "ConversationSummaryPromptID", void 0);
|
|
15742
15751
|
__decorate([
|
|
15743
15752
|
Field({ nullable: true }),
|
|
15744
15753
|
MaxLength(255),
|
|
@@ -15749,6 +15758,16 @@ __decorate([
|
|
|
15749
15758
|
MaxLength(200),
|
|
15750
15759
|
__metadata("design:type", String)
|
|
15751
15760
|
], MJAIAgentType_.prototype, "DefaultStorageAccount", void 0);
|
|
15761
|
+
__decorate([
|
|
15762
|
+
Field({ nullable: true }),
|
|
15763
|
+
MaxLength(255),
|
|
15764
|
+
__metadata("design:type", String)
|
|
15765
|
+
], MJAIAgentType_.prototype, "ContextCompressionPrompt", void 0);
|
|
15766
|
+
__decorate([
|
|
15767
|
+
Field({ nullable: true }),
|
|
15768
|
+
MaxLength(255),
|
|
15769
|
+
__metadata("design:type", String)
|
|
15770
|
+
], MJAIAgentType_.prototype, "ConversationSummaryPrompt", void 0);
|
|
15752
15771
|
__decorate([
|
|
15753
15772
|
Field(() => [MJAIAgentCoAgent_]),
|
|
15754
15773
|
__metadata("design:type", Array)
|
|
@@ -15826,6 +15845,34 @@ __decorate([
|
|
|
15826
15845
|
Field({ nullable: true }),
|
|
15827
15846
|
__metadata("design:type", String)
|
|
15828
15847
|
], CreateMJAIAgentTypeInput.prototype, "DefaultConfiguration", void 0);
|
|
15848
|
+
__decorate([
|
|
15849
|
+
Field(() => Int, { nullable: true }),
|
|
15850
|
+
__metadata("design:type", Number)
|
|
15851
|
+
], CreateMJAIAgentTypeInput.prototype, "ContextCompressionMessageThreshold", void 0);
|
|
15852
|
+
__decorate([
|
|
15853
|
+
Field({ nullable: true }),
|
|
15854
|
+
__metadata("design:type", String)
|
|
15855
|
+
], CreateMJAIAgentTypeInput.prototype, "ContextCompressionPromptID", void 0);
|
|
15856
|
+
__decorate([
|
|
15857
|
+
Field(() => Int, { nullable: true }),
|
|
15858
|
+
__metadata("design:type", Number)
|
|
15859
|
+
], CreateMJAIAgentTypeInput.prototype, "ContextCompressionMessageRetentionCount", void 0);
|
|
15860
|
+
__decorate([
|
|
15861
|
+
Field(() => Int, { nullable: true }),
|
|
15862
|
+
__metadata("design:type", Number)
|
|
15863
|
+
], CreateMJAIAgentTypeInput.prototype, "ContextWindowMaxTokens", void 0);
|
|
15864
|
+
__decorate([
|
|
15865
|
+
Field(() => Int, { nullable: true }),
|
|
15866
|
+
__metadata("design:type", Number)
|
|
15867
|
+
], CreateMJAIAgentTypeInput.prototype, "CompactionTriggerPercent", void 0);
|
|
15868
|
+
__decorate([
|
|
15869
|
+
Field(() => Int, { nullable: true }),
|
|
15870
|
+
__metadata("design:type", Number)
|
|
15871
|
+
], CreateMJAIAgentTypeInput.prototype, "CompactionTargetPercent", void 0);
|
|
15872
|
+
__decorate([
|
|
15873
|
+
Field({ nullable: true }),
|
|
15874
|
+
__metadata("design:type", String)
|
|
15875
|
+
], CreateMJAIAgentTypeInput.prototype, "ConversationSummaryPromptID", void 0);
|
|
15829
15876
|
__decorate([
|
|
15830
15877
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
15831
15878
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -15899,6 +15946,34 @@ __decorate([
|
|
|
15899
15946
|
Field({ nullable: true }),
|
|
15900
15947
|
__metadata("design:type", String)
|
|
15901
15948
|
], UpdateMJAIAgentTypeInput.prototype, "DefaultConfiguration", void 0);
|
|
15949
|
+
__decorate([
|
|
15950
|
+
Field(() => Int, { nullable: true }),
|
|
15951
|
+
__metadata("design:type", Number)
|
|
15952
|
+
], UpdateMJAIAgentTypeInput.prototype, "ContextCompressionMessageThreshold", void 0);
|
|
15953
|
+
__decorate([
|
|
15954
|
+
Field({ nullable: true }),
|
|
15955
|
+
__metadata("design:type", String)
|
|
15956
|
+
], UpdateMJAIAgentTypeInput.prototype, "ContextCompressionPromptID", void 0);
|
|
15957
|
+
__decorate([
|
|
15958
|
+
Field(() => Int, { nullable: true }),
|
|
15959
|
+
__metadata("design:type", Number)
|
|
15960
|
+
], UpdateMJAIAgentTypeInput.prototype, "ContextCompressionMessageRetentionCount", void 0);
|
|
15961
|
+
__decorate([
|
|
15962
|
+
Field(() => Int, { nullable: true }),
|
|
15963
|
+
__metadata("design:type", Number)
|
|
15964
|
+
], UpdateMJAIAgentTypeInput.prototype, "ContextWindowMaxTokens", void 0);
|
|
15965
|
+
__decorate([
|
|
15966
|
+
Field(() => Int, { nullable: true }),
|
|
15967
|
+
__metadata("design:type", Number)
|
|
15968
|
+
], UpdateMJAIAgentTypeInput.prototype, "CompactionTriggerPercent", void 0);
|
|
15969
|
+
__decorate([
|
|
15970
|
+
Field(() => Int, { nullable: true }),
|
|
15971
|
+
__metadata("design:type", Number)
|
|
15972
|
+
], UpdateMJAIAgentTypeInput.prototype, "CompactionTargetPercent", void 0);
|
|
15973
|
+
__decorate([
|
|
15974
|
+
Field({ nullable: true }),
|
|
15975
|
+
__metadata("design:type", String)
|
|
15976
|
+
], UpdateMJAIAgentTypeInput.prototype, "ConversationSummaryPromptID", void 0);
|
|
15902
15977
|
__decorate([
|
|
15903
15978
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
15904
15979
|
__metadata("design:type", Array)
|
|
@@ -16434,6 +16509,23 @@ __decorate([
|
|
|
16434
16509
|
Field(() => Boolean, { description: `When 1, every root-level run of this agent executes in plan mode regardless of the per-request planMode flag — the agent must present a plan and receive human approval before any Actions or Sub-Agent steps execute. SupportsPlanMode is irrelevant when this is set. Use for high-consequence agents (e.g. ones with outbound-communication capabilities) where human-in-the-loop review is mandatory.` }),
|
|
16435
16510
|
__metadata("design:type", Boolean)
|
|
16436
16511
|
], MJAIAgent_.prototype, "RequirePlanMode", void 0);
|
|
16512
|
+
__decorate([
|
|
16513
|
+
Field(() => Int, { nullable: true, description: `Per-agent override for the effective working-context budget, in tokens. Null inherits the agent type's value (which, if also null, falls back to the selected model's MaxInputTokens). The resolved value is clamped to the model's limit at runtime.` }),
|
|
16514
|
+
__metadata("design:type", Number)
|
|
16515
|
+
], MJAIAgent_.prototype, "ContextWindowMaxTokens", void 0);
|
|
16516
|
+
__decorate([
|
|
16517
|
+
Field(() => Int, { nullable: true, description: `Per-agent override for the cross-turn compaction trigger percentage. Null inherits the agent type's value.` }),
|
|
16518
|
+
__metadata("design:type", Number)
|
|
16519
|
+
], MJAIAgent_.prototype, "CompactionTriggerPercent", void 0);
|
|
16520
|
+
__decorate([
|
|
16521
|
+
Field(() => Int, { nullable: true, description: `Per-agent override for the cross-turn compaction target percentage. Null inherits the agent type's value.` }),
|
|
16522
|
+
__metadata("design:type", Number)
|
|
16523
|
+
], MJAIAgent_.prototype, "CompactionTargetPercent", void 0);
|
|
16524
|
+
__decorate([
|
|
16525
|
+
Field({ nullable: true, description: `Per-agent override for the cross-turn conversation compaction prompt. Null inherits the agent type's value.` }),
|
|
16526
|
+
MaxLength(36),
|
|
16527
|
+
__metadata("design:type", String)
|
|
16528
|
+
], MJAIAgent_.prototype, "ConversationSummaryPromptID", void 0);
|
|
16437
16529
|
__decorate([
|
|
16438
16530
|
Field({ nullable: true }),
|
|
16439
16531
|
MaxLength(255),
|
|
@@ -16489,6 +16581,11 @@ __decorate([
|
|
|
16489
16581
|
MaxLength(255),
|
|
16490
16582
|
__metadata("design:type", String)
|
|
16491
16583
|
], MJAIAgent_.prototype, "DefaultMediaCollection", void 0);
|
|
16584
|
+
__decorate([
|
|
16585
|
+
Field({ nullable: true }),
|
|
16586
|
+
MaxLength(255),
|
|
16587
|
+
__metadata("design:type", String)
|
|
16588
|
+
], MJAIAgent_.prototype, "ConversationSummaryPrompt", void 0);
|
|
16492
16589
|
__decorate([
|
|
16493
16590
|
Field({ nullable: true }),
|
|
16494
16591
|
MaxLength(36),
|
|
@@ -16952,6 +17049,22 @@ __decorate([
|
|
|
16952
17049
|
Field(() => Boolean, { nullable: true }),
|
|
16953
17050
|
__metadata("design:type", Boolean)
|
|
16954
17051
|
], CreateMJAIAgentInput.prototype, "RequirePlanMode", void 0);
|
|
17052
|
+
__decorate([
|
|
17053
|
+
Field(() => Int, { nullable: true }),
|
|
17054
|
+
__metadata("design:type", Number)
|
|
17055
|
+
], CreateMJAIAgentInput.prototype, "ContextWindowMaxTokens", void 0);
|
|
17056
|
+
__decorate([
|
|
17057
|
+
Field(() => Int, { nullable: true }),
|
|
17058
|
+
__metadata("design:type", Number)
|
|
17059
|
+
], CreateMJAIAgentInput.prototype, "CompactionTriggerPercent", void 0);
|
|
17060
|
+
__decorate([
|
|
17061
|
+
Field(() => Int, { nullable: true }),
|
|
17062
|
+
__metadata("design:type", Number)
|
|
17063
|
+
], CreateMJAIAgentInput.prototype, "CompactionTargetPercent", void 0);
|
|
17064
|
+
__decorate([
|
|
17065
|
+
Field({ nullable: true }),
|
|
17066
|
+
__metadata("design:type", String)
|
|
17067
|
+
], CreateMJAIAgentInput.prototype, "ConversationSummaryPromptID", void 0);
|
|
16955
17068
|
__decorate([
|
|
16956
17069
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
16957
17070
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -17261,6 +17374,22 @@ __decorate([
|
|
|
17261
17374
|
Field(() => Boolean, { nullable: true }),
|
|
17262
17375
|
__metadata("design:type", Boolean)
|
|
17263
17376
|
], UpdateMJAIAgentInput.prototype, "RequirePlanMode", void 0);
|
|
17377
|
+
__decorate([
|
|
17378
|
+
Field(() => Int, { nullable: true }),
|
|
17379
|
+
__metadata("design:type", Number)
|
|
17380
|
+
], UpdateMJAIAgentInput.prototype, "ContextWindowMaxTokens", void 0);
|
|
17381
|
+
__decorate([
|
|
17382
|
+
Field(() => Int, { nullable: true }),
|
|
17383
|
+
__metadata("design:type", Number)
|
|
17384
|
+
], UpdateMJAIAgentInput.prototype, "CompactionTriggerPercent", void 0);
|
|
17385
|
+
__decorate([
|
|
17386
|
+
Field(() => Int, { nullable: true }),
|
|
17387
|
+
__metadata("design:type", Number)
|
|
17388
|
+
], UpdateMJAIAgentInput.prototype, "CompactionTargetPercent", void 0);
|
|
17389
|
+
__decorate([
|
|
17390
|
+
Field({ nullable: true }),
|
|
17391
|
+
__metadata("design:type", String)
|
|
17392
|
+
], UpdateMJAIAgentInput.prototype, "ConversationSummaryPromptID", void 0);
|
|
17264
17393
|
__decorate([
|
|
17265
17394
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
17266
17395
|
__metadata("design:type", Array)
|
|
@@ -25935,11 +26064,6 @@ __decorate([
|
|
|
25935
26064
|
Field(() => Int, { nullable: true, description: `Execution order for parallel child runs and result selector runs. Used to track the sequence of execution within a parallel run group. NULL for single runs and parallel parent runs.` }),
|
|
25936
26065
|
__metadata("design:type", Number)
|
|
25937
26066
|
], MJAIPromptRun_.prototype, "ExecutionOrder", void 0);
|
|
25938
|
-
__decorate([
|
|
25939
|
-
Field({ nullable: true, description: `Optional reference to the AIAgentRun that initiated this prompt execution. Links prompt runs to their parent agent runs for comprehensive execution tracking.` }),
|
|
25940
|
-
MaxLength(36),
|
|
25941
|
-
__metadata("design:type", String)
|
|
25942
|
-
], MJAIPromptRun_.prototype, "AgentRunID", void 0);
|
|
25943
26067
|
__decorate([
|
|
25944
26068
|
Field(() => Float, { nullable: true, description: `The cost of this specific prompt execution as reported by the AI provider. This does not include costs from child executions. The currency is specified in CostCurrency field.` }),
|
|
25945
26069
|
__metadata("design:type", Number)
|
|
@@ -26249,11 +26373,6 @@ __decorate([
|
|
|
26249
26373
|
MaxLength(255),
|
|
26250
26374
|
__metadata("design:type", String)
|
|
26251
26375
|
], MJAIPromptRun_.prototype, "Parent", void 0);
|
|
26252
|
-
__decorate([
|
|
26253
|
-
Field({ nullable: true }),
|
|
26254
|
-
MaxLength(255),
|
|
26255
|
-
__metadata("design:type", String)
|
|
26256
|
-
], MJAIPromptRun_.prototype, "AgentRun", void 0);
|
|
26257
26376
|
__decorate([
|
|
26258
26377
|
Field({ nullable: true }),
|
|
26259
26378
|
MaxLength(50),
|
|
@@ -26321,6 +26440,10 @@ __decorate([
|
|
|
26321
26440
|
Field(() => [MJUserRoutineRun_]),
|
|
26322
26441
|
__metadata("design:type", Array)
|
|
26323
26442
|
], MJAIPromptRun_.prototype, "MJUserRoutineRuns_PromptRunIDArray", void 0);
|
|
26443
|
+
__decorate([
|
|
26444
|
+
Field(() => [MJConversationCompactionRun_]),
|
|
26445
|
+
__metadata("design:type", Array)
|
|
26446
|
+
], MJAIPromptRun_.prototype, "MJConversationCompactionRuns_PromptRunIDArray", void 0);
|
|
26324
26447
|
MJAIPromptRun_ = __decorate([
|
|
26325
26448
|
ObjectType({ description: `Tracks AI prompt executions including timings, inputs, outputs, and performance metrics.` })
|
|
26326
26449
|
], MJAIPromptRun_);
|
|
@@ -26410,10 +26533,6 @@ __decorate([
|
|
|
26410
26533
|
Field(() => Int, { nullable: true }),
|
|
26411
26534
|
__metadata("design:type", Number)
|
|
26412
26535
|
], CreateMJAIPromptRunInput.prototype, "ExecutionOrder", void 0);
|
|
26413
|
-
__decorate([
|
|
26414
|
-
Field({ nullable: true }),
|
|
26415
|
-
__metadata("design:type", String)
|
|
26416
|
-
], CreateMJAIPromptRunInput.prototype, "AgentRunID", void 0);
|
|
26417
26536
|
__decorate([
|
|
26418
26537
|
Field(() => Float, { nullable: true }),
|
|
26419
26538
|
__metadata("design:type", Number)
|
|
@@ -26771,10 +26890,6 @@ __decorate([
|
|
|
26771
26890
|
Field(() => Int, { nullable: true }),
|
|
26772
26891
|
__metadata("design:type", Number)
|
|
26773
26892
|
], UpdateMJAIPromptRunInput.prototype, "ExecutionOrder", void 0);
|
|
26774
|
-
__decorate([
|
|
26775
|
-
Field({ nullable: true }),
|
|
26776
|
-
__metadata("design:type", String)
|
|
26777
|
-
], UpdateMJAIPromptRunInput.prototype, "AgentRunID", void 0);
|
|
26778
26893
|
__decorate([
|
|
26779
26894
|
Field(() => Float, { nullable: true }),
|
|
26780
26895
|
__metadata("design:type", Number)
|
|
@@ -27174,6 +27289,14 @@ let MJAIPromptRunResolver = class MJAIPromptRunResolver extends ResolverBase {
|
|
|
27174
27289
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routine Runs', rows, this.GetUserFromPayload(userPayload));
|
|
27175
27290
|
return result;
|
|
27176
27291
|
}
|
|
27292
|
+
async MJConversationCompactionRuns_PromptRunIDArray(mjaipromptrun_, { userPayload, providers }, pubSub) {
|
|
27293
|
+
this.CheckUserReadPermissions('MJ: Conversation Compaction Runs', userPayload);
|
|
27294
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27295
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationCompactionRuns')} WHERE ${provider.QuoteIdentifier('PromptRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Compaction Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
27296
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaipromptrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
27297
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Compaction Runs', rows, this.GetUserFromPayload(userPayload));
|
|
27298
|
+
return result;
|
|
27299
|
+
}
|
|
27177
27300
|
async CreateMJAIPromptRun(input, { providers, userPayload }, pubSub) {
|
|
27178
27301
|
const provider = GetReadWriteProvider(providers);
|
|
27179
27302
|
return this.CreateRecord('MJ: AI Prompt Runs', input, provider, userPayload, pubSub);
|
|
@@ -27296,6 +27419,15 @@ __decorate([
|
|
|
27296
27419
|
__metadata("design:paramtypes", [MJAIPromptRun_, Object, PubSubEngine]),
|
|
27297
27420
|
__metadata("design:returntype", Promise)
|
|
27298
27421
|
], MJAIPromptRunResolver.prototype, "MJUserRoutineRuns_PromptRunIDArray", null);
|
|
27422
|
+
__decorate([
|
|
27423
|
+
FieldResolver(() => [MJConversationCompactionRun_]),
|
|
27424
|
+
__param(0, Root()),
|
|
27425
|
+
__param(1, Ctx()),
|
|
27426
|
+
__param(2, PubSub()),
|
|
27427
|
+
__metadata("design:type", Function),
|
|
27428
|
+
__metadata("design:paramtypes", [MJAIPromptRun_, Object, PubSubEngine]),
|
|
27429
|
+
__metadata("design:returntype", Promise)
|
|
27430
|
+
], MJAIPromptRunResolver.prototype, "MJConversationCompactionRuns_PromptRunIDArray", null);
|
|
27299
27431
|
__decorate([
|
|
27300
27432
|
Mutation(() => MJAIPromptRun_),
|
|
27301
27433
|
__param(0, Arg('input', () => CreateMJAIPromptRunInput)),
|
|
@@ -27922,6 +28054,18 @@ __decorate([
|
|
|
27922
28054
|
Field(() => [MJScopedPromptConfig_]),
|
|
27923
28055
|
__metadata("design:type", Array)
|
|
27924
28056
|
], MJAIPrompt_.prototype, "MJScopedPromptConfigs_PromptIDArray", void 0);
|
|
28057
|
+
__decorate([
|
|
28058
|
+
Field(() => [MJAIAgent_]),
|
|
28059
|
+
__metadata("design:type", Array)
|
|
28060
|
+
], MJAIPrompt_.prototype, "MJAIAgents_ConversationSummaryPromptIDArray", void 0);
|
|
28061
|
+
__decorate([
|
|
28062
|
+
Field(() => [MJAIAgentType_]),
|
|
28063
|
+
__metadata("design:type", Array)
|
|
28064
|
+
], MJAIPrompt_.prototype, "MJAIAgentTypes_ContextCompressionPromptIDArray", void 0);
|
|
28065
|
+
__decorate([
|
|
28066
|
+
Field(() => [MJAIAgentType_]),
|
|
28067
|
+
__metadata("design:type", Array)
|
|
28068
|
+
], MJAIPrompt_.prototype, "MJAIAgentTypes_ConversationSummaryPromptIDArray", void 0);
|
|
27925
28069
|
MJAIPrompt_ = __decorate([
|
|
27926
28070
|
ObjectType({ description: `Stores AI prompts, including references to categories, types, and templates.` })
|
|
27927
28071
|
], MJAIPrompt_);
|
|
@@ -28575,6 +28719,30 @@ let MJAIPromptResolver = class MJAIPromptResolver extends ResolverBase {
|
|
|
28575
28719
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scoped Prompt Configs', rows, this.GetUserFromPayload(userPayload));
|
|
28576
28720
|
return result;
|
|
28577
28721
|
}
|
|
28722
|
+
async MJAIAgents_ConversationSummaryPromptIDArray(mjaiprompt_, { userPayload, providers }, pubSub) {
|
|
28723
|
+
this.CheckUserReadPermissions('MJ: AI Agents', userPayload);
|
|
28724
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
28725
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgents')} WHERE ${provider.QuoteIdentifier('ConversationSummaryPromptID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agents', userPayload, EntityPermissionType.Read, 'AND');
|
|
28726
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiprompt_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
28727
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agents', rows, this.GetUserFromPayload(userPayload));
|
|
28728
|
+
return result;
|
|
28729
|
+
}
|
|
28730
|
+
async MJAIAgentTypes_ContextCompressionPromptIDArray(mjaiprompt_, { userPayload, providers }, pubSub) {
|
|
28731
|
+
this.CheckUserReadPermissions('MJ: AI Agent Types', userPayload);
|
|
28732
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
28733
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentTypes')} WHERE ${provider.QuoteIdentifier('ContextCompressionPromptID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
28734
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiprompt_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
28735
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', rows, this.GetUserFromPayload(userPayload));
|
|
28736
|
+
return result;
|
|
28737
|
+
}
|
|
28738
|
+
async MJAIAgentTypes_ConversationSummaryPromptIDArray(mjaiprompt_, { userPayload, providers }, pubSub) {
|
|
28739
|
+
this.CheckUserReadPermissions('MJ: AI Agent Types', userPayload);
|
|
28740
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
28741
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentTypes')} WHERE ${provider.QuoteIdentifier('ConversationSummaryPromptID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
28742
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiprompt_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
28743
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', rows, this.GetUserFromPayload(userPayload));
|
|
28744
|
+
return result;
|
|
28745
|
+
}
|
|
28578
28746
|
async CreateMJAIPrompt(input, { providers, userPayload }, pubSub) {
|
|
28579
28747
|
const provider = GetReadWriteProvider(providers);
|
|
28580
28748
|
return this.CreateRecord('MJ: AI Prompts', input, provider, userPayload, pubSub);
|
|
@@ -28787,6 +28955,33 @@ __decorate([
|
|
|
28787
28955
|
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
28788
28956
|
__metadata("design:returntype", Promise)
|
|
28789
28957
|
], MJAIPromptResolver.prototype, "MJScopedPromptConfigs_PromptIDArray", null);
|
|
28958
|
+
__decorate([
|
|
28959
|
+
FieldResolver(() => [MJAIAgent_]),
|
|
28960
|
+
__param(0, Root()),
|
|
28961
|
+
__param(1, Ctx()),
|
|
28962
|
+
__param(2, PubSub()),
|
|
28963
|
+
__metadata("design:type", Function),
|
|
28964
|
+
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
28965
|
+
__metadata("design:returntype", Promise)
|
|
28966
|
+
], MJAIPromptResolver.prototype, "MJAIAgents_ConversationSummaryPromptIDArray", null);
|
|
28967
|
+
__decorate([
|
|
28968
|
+
FieldResolver(() => [MJAIAgentType_]),
|
|
28969
|
+
__param(0, Root()),
|
|
28970
|
+
__param(1, Ctx()),
|
|
28971
|
+
__param(2, PubSub()),
|
|
28972
|
+
__metadata("design:type", Function),
|
|
28973
|
+
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
28974
|
+
__metadata("design:returntype", Promise)
|
|
28975
|
+
], MJAIPromptResolver.prototype, "MJAIAgentTypes_ContextCompressionPromptIDArray", null);
|
|
28976
|
+
__decorate([
|
|
28977
|
+
FieldResolver(() => [MJAIAgentType_]),
|
|
28978
|
+
__param(0, Root()),
|
|
28979
|
+
__param(1, Ctx()),
|
|
28980
|
+
__param(2, PubSub()),
|
|
28981
|
+
__metadata("design:type", Function),
|
|
28982
|
+
__metadata("design:paramtypes", [MJAIPrompt_, Object, PubSubEngine]),
|
|
28983
|
+
__metadata("design:returntype", Promise)
|
|
28984
|
+
], MJAIPromptResolver.prototype, "MJAIAgentTypes_ConversationSummaryPromptIDArray", null);
|
|
28790
28985
|
__decorate([
|
|
28791
28986
|
Mutation(() => MJAIPrompt_),
|
|
28792
28987
|
__param(0, Arg('input', () => CreateMJAIPromptInput)),
|
|
@@ -30069,6 +30264,304 @@ MJAISkillPermissionResolver = __decorate([
|
|
|
30069
30264
|
], MJAISkillPermissionResolver);
|
|
30070
30265
|
export { MJAISkillPermissionResolver };
|
|
30071
30266
|
//****************************************************************************
|
|
30267
|
+
// ENTITY CLASS for MJ: AI Skill Search Scopes
|
|
30268
|
+
//****************************************************************************
|
|
30269
|
+
let MJAISkillSearchScope_ = class MJAISkillSearchScope_ {
|
|
30270
|
+
};
|
|
30271
|
+
__decorate([
|
|
30272
|
+
Field(),
|
|
30273
|
+
MaxLength(36),
|
|
30274
|
+
__metadata("design:type", String)
|
|
30275
|
+
], MJAISkillSearchScope_.prototype, "ID", void 0);
|
|
30276
|
+
__decorate([
|
|
30277
|
+
Field({ description: `The skill this grant belongs to.` }),
|
|
30278
|
+
MaxLength(36),
|
|
30279
|
+
__metadata("design:type", String)
|
|
30280
|
+
], MJAISkillSearchScope_.prototype, "SkillID", void 0);
|
|
30281
|
+
__decorate([
|
|
30282
|
+
Field({ description: `The Search Scope this skill may reach.` }),
|
|
30283
|
+
MaxLength(36),
|
|
30284
|
+
__metadata("design:type", String)
|
|
30285
|
+
], MJAISkillSearchScope_.prototype, "SearchScopeID", void 0);
|
|
30286
|
+
__decorate([
|
|
30287
|
+
Field({ description: `Active or Inactive. Inactive rows are ignored during resolution.` }),
|
|
30288
|
+
MaxLength(20),
|
|
30289
|
+
__metadata("design:type", String)
|
|
30290
|
+
], MJAISkillSearchScope_.prototype, "Status", void 0);
|
|
30291
|
+
__decorate([
|
|
30292
|
+
Field({ nullable: true, description: `Optional start of the window in which this grant is honoured. NULL = no lower bound. Evaluated against the current time on every resolution, so a window opening or closing needs no cache invalidation.` }),
|
|
30293
|
+
__metadata("design:type", Date)
|
|
30294
|
+
], MJAISkillSearchScope_.prototype, "StartAt", void 0);
|
|
30295
|
+
__decorate([
|
|
30296
|
+
Field({ nullable: true, description: `Optional end of the window in which this grant is honoured. NULL = no upper bound.` }),
|
|
30297
|
+
__metadata("design:type", Date)
|
|
30298
|
+
], MJAISkillSearchScope_.prototype, "EndAt", void 0);
|
|
30299
|
+
__decorate([
|
|
30300
|
+
Field(() => Int, { nullable: true, description: `Lower numbers win when several granted scopes are candidates and none is marked IsDefault.` }),
|
|
30301
|
+
__metadata("design:type", Number)
|
|
30302
|
+
], MJAISkillSearchScope_.prototype, "Priority", void 0);
|
|
30303
|
+
__decorate([
|
|
30304
|
+
Field(() => Boolean, { description: `When set, this scope is chosen for the skill ahead of Priority ordering.` }),
|
|
30305
|
+
__metadata("design:type", Boolean)
|
|
30306
|
+
], MJAISkillSearchScope_.prototype, "IsDefault", void 0);
|
|
30307
|
+
__decorate([
|
|
30308
|
+
Field(),
|
|
30309
|
+
__metadata("design:type", Date)
|
|
30310
|
+
], MJAISkillSearchScope_.prototype, "_mj__CreatedAt", void 0);
|
|
30311
|
+
__decorate([
|
|
30312
|
+
Field(),
|
|
30313
|
+
__metadata("design:type", Date)
|
|
30314
|
+
], MJAISkillSearchScope_.prototype, "_mj__UpdatedAt", void 0);
|
|
30315
|
+
__decorate([
|
|
30316
|
+
Field(),
|
|
30317
|
+
MaxLength(255),
|
|
30318
|
+
__metadata("design:type", String)
|
|
30319
|
+
], MJAISkillSearchScope_.prototype, "Skill", void 0);
|
|
30320
|
+
__decorate([
|
|
30321
|
+
Field(),
|
|
30322
|
+
MaxLength(200),
|
|
30323
|
+
__metadata("design:type", String)
|
|
30324
|
+
], MJAISkillSearchScope_.prototype, "SearchScope", void 0);
|
|
30325
|
+
MJAISkillSearchScope_ = __decorate([
|
|
30326
|
+
ObjectType({ description: `Search Scopes an AI Skill may reach when activated, honoured when AISkill.SearchScopeAccess = \'Assigned\'. Mirrors AIAgentSearchScope: Status plus an optional StartAt/EndAt window time-box a grant, and Priority/IsDefault pick among several. An empty table means no skill grants any scope - the pre-migration behaviour.` })
|
|
30327
|
+
], MJAISkillSearchScope_);
|
|
30328
|
+
export { MJAISkillSearchScope_ };
|
|
30329
|
+
//****************************************************************************
|
|
30330
|
+
// INPUT TYPE for MJ: AI Skill Search Scopes
|
|
30331
|
+
//****************************************************************************
|
|
30332
|
+
let CreateMJAISkillSearchScopeInput = class CreateMJAISkillSearchScopeInput {
|
|
30333
|
+
};
|
|
30334
|
+
__decorate([
|
|
30335
|
+
Field({ nullable: true }),
|
|
30336
|
+
__metadata("design:type", String)
|
|
30337
|
+
], CreateMJAISkillSearchScopeInput.prototype, "ID", void 0);
|
|
30338
|
+
__decorate([
|
|
30339
|
+
Field({ nullable: true }),
|
|
30340
|
+
__metadata("design:type", String)
|
|
30341
|
+
], CreateMJAISkillSearchScopeInput.prototype, "SkillID", void 0);
|
|
30342
|
+
__decorate([
|
|
30343
|
+
Field({ nullable: true }),
|
|
30344
|
+
__metadata("design:type", String)
|
|
30345
|
+
], CreateMJAISkillSearchScopeInput.prototype, "SearchScopeID", void 0);
|
|
30346
|
+
__decorate([
|
|
30347
|
+
Field({ nullable: true }),
|
|
30348
|
+
__metadata("design:type", String)
|
|
30349
|
+
], CreateMJAISkillSearchScopeInput.prototype, "Status", void 0);
|
|
30350
|
+
__decorate([
|
|
30351
|
+
Field({ nullable: true }),
|
|
30352
|
+
__metadata("design:type", Date)
|
|
30353
|
+
], CreateMJAISkillSearchScopeInput.prototype, "StartAt", void 0);
|
|
30354
|
+
__decorate([
|
|
30355
|
+
Field({ nullable: true }),
|
|
30356
|
+
__metadata("design:type", Date)
|
|
30357
|
+
], CreateMJAISkillSearchScopeInput.prototype, "EndAt", void 0);
|
|
30358
|
+
__decorate([
|
|
30359
|
+
Field(() => Int, { nullable: true }),
|
|
30360
|
+
__metadata("design:type", Number)
|
|
30361
|
+
], CreateMJAISkillSearchScopeInput.prototype, "Priority", void 0);
|
|
30362
|
+
__decorate([
|
|
30363
|
+
Field(() => Boolean, { nullable: true }),
|
|
30364
|
+
__metadata("design:type", Boolean)
|
|
30365
|
+
], CreateMJAISkillSearchScopeInput.prototype, "IsDefault", void 0);
|
|
30366
|
+
__decorate([
|
|
30367
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
30368
|
+
__metadata("design:type", RestoreContextInput)
|
|
30369
|
+
], CreateMJAISkillSearchScopeInput.prototype, "RestoreContext___", void 0);
|
|
30370
|
+
CreateMJAISkillSearchScopeInput = __decorate([
|
|
30371
|
+
InputType()
|
|
30372
|
+
], CreateMJAISkillSearchScopeInput);
|
|
30373
|
+
export { CreateMJAISkillSearchScopeInput };
|
|
30374
|
+
//****************************************************************************
|
|
30375
|
+
// INPUT TYPE for MJ: AI Skill Search Scopes
|
|
30376
|
+
//****************************************************************************
|
|
30377
|
+
let UpdateMJAISkillSearchScopeInput = class UpdateMJAISkillSearchScopeInput {
|
|
30378
|
+
};
|
|
30379
|
+
__decorate([
|
|
30380
|
+
Field(),
|
|
30381
|
+
__metadata("design:type", String)
|
|
30382
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "ID", void 0);
|
|
30383
|
+
__decorate([
|
|
30384
|
+
Field({ nullable: true }),
|
|
30385
|
+
__metadata("design:type", String)
|
|
30386
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "SkillID", void 0);
|
|
30387
|
+
__decorate([
|
|
30388
|
+
Field({ nullable: true }),
|
|
30389
|
+
__metadata("design:type", String)
|
|
30390
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "SearchScopeID", void 0);
|
|
30391
|
+
__decorate([
|
|
30392
|
+
Field({ nullable: true }),
|
|
30393
|
+
__metadata("design:type", String)
|
|
30394
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "Status", void 0);
|
|
30395
|
+
__decorate([
|
|
30396
|
+
Field({ nullable: true }),
|
|
30397
|
+
__metadata("design:type", Date)
|
|
30398
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "StartAt", void 0);
|
|
30399
|
+
__decorate([
|
|
30400
|
+
Field({ nullable: true }),
|
|
30401
|
+
__metadata("design:type", Date)
|
|
30402
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "EndAt", void 0);
|
|
30403
|
+
__decorate([
|
|
30404
|
+
Field(() => Int, { nullable: true }),
|
|
30405
|
+
__metadata("design:type", Number)
|
|
30406
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "Priority", void 0);
|
|
30407
|
+
__decorate([
|
|
30408
|
+
Field(() => Boolean, { nullable: true }),
|
|
30409
|
+
__metadata("design:type", Boolean)
|
|
30410
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "IsDefault", void 0);
|
|
30411
|
+
__decorate([
|
|
30412
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
30413
|
+
__metadata("design:type", Array)
|
|
30414
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "OldValues___", void 0);
|
|
30415
|
+
__decorate([
|
|
30416
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
30417
|
+
__metadata("design:type", RestoreContextInput)
|
|
30418
|
+
], UpdateMJAISkillSearchScopeInput.prototype, "RestoreContext___", void 0);
|
|
30419
|
+
UpdateMJAISkillSearchScopeInput = __decorate([
|
|
30420
|
+
InputType()
|
|
30421
|
+
], UpdateMJAISkillSearchScopeInput);
|
|
30422
|
+
export { UpdateMJAISkillSearchScopeInput };
|
|
30423
|
+
//****************************************************************************
|
|
30424
|
+
// RESOLVER for MJ: AI Skill Search Scopes
|
|
30425
|
+
//****************************************************************************
|
|
30426
|
+
let RunMJAISkillSearchScopeViewResult = class RunMJAISkillSearchScopeViewResult {
|
|
30427
|
+
};
|
|
30428
|
+
__decorate([
|
|
30429
|
+
Field(() => [MJAISkillSearchScope_]),
|
|
30430
|
+
__metadata("design:type", Array)
|
|
30431
|
+
], RunMJAISkillSearchScopeViewResult.prototype, "Results", void 0);
|
|
30432
|
+
__decorate([
|
|
30433
|
+
Field(() => String, { nullable: true }),
|
|
30434
|
+
__metadata("design:type", String)
|
|
30435
|
+
], RunMJAISkillSearchScopeViewResult.prototype, "UserViewRunID", void 0);
|
|
30436
|
+
__decorate([
|
|
30437
|
+
Field(() => Int, { nullable: true }),
|
|
30438
|
+
__metadata("design:type", Number)
|
|
30439
|
+
], RunMJAISkillSearchScopeViewResult.prototype, "RowCount", void 0);
|
|
30440
|
+
__decorate([
|
|
30441
|
+
Field(() => Int, { nullable: true }),
|
|
30442
|
+
__metadata("design:type", Number)
|
|
30443
|
+
], RunMJAISkillSearchScopeViewResult.prototype, "TotalRowCount", void 0);
|
|
30444
|
+
__decorate([
|
|
30445
|
+
Field(() => Int, { nullable: true }),
|
|
30446
|
+
__metadata("design:type", Number)
|
|
30447
|
+
], RunMJAISkillSearchScopeViewResult.prototype, "ExecutionTime", void 0);
|
|
30448
|
+
__decorate([
|
|
30449
|
+
Field({ nullable: true }),
|
|
30450
|
+
__metadata("design:type", String)
|
|
30451
|
+
], RunMJAISkillSearchScopeViewResult.prototype, "ErrorMessage", void 0);
|
|
30452
|
+
__decorate([
|
|
30453
|
+
Field(() => Boolean, { nullable: false }),
|
|
30454
|
+
__metadata("design:type", Boolean)
|
|
30455
|
+
], RunMJAISkillSearchScopeViewResult.prototype, "Success", void 0);
|
|
30456
|
+
RunMJAISkillSearchScopeViewResult = __decorate([
|
|
30457
|
+
ObjectType()
|
|
30458
|
+
], RunMJAISkillSearchScopeViewResult);
|
|
30459
|
+
export { RunMJAISkillSearchScopeViewResult };
|
|
30460
|
+
let MJAISkillSearchScopeResolver = class MJAISkillSearchScopeResolver extends ResolverBase {
|
|
30461
|
+
async RunMJAISkillSearchScopeViewByID(input, { providers, userPayload }, pubSub) {
|
|
30462
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30463
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
30464
|
+
}
|
|
30465
|
+
async RunMJAISkillSearchScopeViewByName(input, { providers, userPayload }, pubSub) {
|
|
30466
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30467
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
30468
|
+
}
|
|
30469
|
+
async RunMJAISkillSearchScopeDynamicView(input, { providers, userPayload }, pubSub) {
|
|
30470
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30471
|
+
input.EntityName = 'MJ: AI Skill Search Scopes';
|
|
30472
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
30473
|
+
}
|
|
30474
|
+
async MJAISkillSearchScope(ID, { userPayload, providers }, pubSub) {
|
|
30475
|
+
this.CheckUserReadPermissions('MJ: AI Skill Search Scopes', userPayload);
|
|
30476
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
30477
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAISkillSearchScopes')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Skill Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
30478
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
30479
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Skill Search Scopes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
30480
|
+
return result;
|
|
30481
|
+
}
|
|
30482
|
+
async CreateMJAISkillSearchScope(input, { providers, userPayload }, pubSub) {
|
|
30483
|
+
const provider = GetReadWriteProvider(providers);
|
|
30484
|
+
return this.CreateRecord('MJ: AI Skill Search Scopes', input, provider, userPayload, pubSub);
|
|
30485
|
+
}
|
|
30486
|
+
async UpdateMJAISkillSearchScope(input, { providers, userPayload }, pubSub) {
|
|
30487
|
+
const provider = GetReadWriteProvider(providers);
|
|
30488
|
+
return this.UpdateRecord('MJ: AI Skill Search Scopes', input, provider, userPayload, pubSub);
|
|
30489
|
+
}
|
|
30490
|
+
async DeleteMJAISkillSearchScope(ID, options, { providers, userPayload }, pubSub) {
|
|
30491
|
+
const provider = GetReadWriteProvider(providers);
|
|
30492
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
30493
|
+
return this.DeleteRecord('MJ: AI Skill Search Scopes', key, options, provider, userPayload, pubSub);
|
|
30494
|
+
}
|
|
30495
|
+
};
|
|
30496
|
+
__decorate([
|
|
30497
|
+
Query(() => RunMJAISkillSearchScopeViewResult),
|
|
30498
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
30499
|
+
__param(1, Ctx()),
|
|
30500
|
+
__param(2, PubSub()),
|
|
30501
|
+
__metadata("design:type", Function),
|
|
30502
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
30503
|
+
__metadata("design:returntype", Promise)
|
|
30504
|
+
], MJAISkillSearchScopeResolver.prototype, "RunMJAISkillSearchScopeViewByID", null);
|
|
30505
|
+
__decorate([
|
|
30506
|
+
Query(() => RunMJAISkillSearchScopeViewResult),
|
|
30507
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
30508
|
+
__param(1, Ctx()),
|
|
30509
|
+
__param(2, PubSub()),
|
|
30510
|
+
__metadata("design:type", Function),
|
|
30511
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
30512
|
+
__metadata("design:returntype", Promise)
|
|
30513
|
+
], MJAISkillSearchScopeResolver.prototype, "RunMJAISkillSearchScopeViewByName", null);
|
|
30514
|
+
__decorate([
|
|
30515
|
+
Query(() => RunMJAISkillSearchScopeViewResult),
|
|
30516
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
30517
|
+
__param(1, Ctx()),
|
|
30518
|
+
__param(2, PubSub()),
|
|
30519
|
+
__metadata("design:type", Function),
|
|
30520
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
30521
|
+
__metadata("design:returntype", Promise)
|
|
30522
|
+
], MJAISkillSearchScopeResolver.prototype, "RunMJAISkillSearchScopeDynamicView", null);
|
|
30523
|
+
__decorate([
|
|
30524
|
+
Query(() => MJAISkillSearchScope_, { nullable: true }),
|
|
30525
|
+
__param(0, Arg('ID', () => String)),
|
|
30526
|
+
__param(1, Ctx()),
|
|
30527
|
+
__param(2, PubSub()),
|
|
30528
|
+
__metadata("design:type", Function),
|
|
30529
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
30530
|
+
__metadata("design:returntype", Promise)
|
|
30531
|
+
], MJAISkillSearchScopeResolver.prototype, "MJAISkillSearchScope", null);
|
|
30532
|
+
__decorate([
|
|
30533
|
+
Mutation(() => MJAISkillSearchScope_),
|
|
30534
|
+
__param(0, Arg('input', () => CreateMJAISkillSearchScopeInput)),
|
|
30535
|
+
__param(1, Ctx()),
|
|
30536
|
+
__param(2, PubSub()),
|
|
30537
|
+
__metadata("design:type", Function),
|
|
30538
|
+
__metadata("design:paramtypes", [CreateMJAISkillSearchScopeInput, Object, PubSubEngine]),
|
|
30539
|
+
__metadata("design:returntype", Promise)
|
|
30540
|
+
], MJAISkillSearchScopeResolver.prototype, "CreateMJAISkillSearchScope", null);
|
|
30541
|
+
__decorate([
|
|
30542
|
+
Mutation(() => MJAISkillSearchScope_),
|
|
30543
|
+
__param(0, Arg('input', () => UpdateMJAISkillSearchScopeInput)),
|
|
30544
|
+
__param(1, Ctx()),
|
|
30545
|
+
__param(2, PubSub()),
|
|
30546
|
+
__metadata("design:type", Function),
|
|
30547
|
+
__metadata("design:paramtypes", [UpdateMJAISkillSearchScopeInput, Object, PubSubEngine]),
|
|
30548
|
+
__metadata("design:returntype", Promise)
|
|
30549
|
+
], MJAISkillSearchScopeResolver.prototype, "UpdateMJAISkillSearchScope", null);
|
|
30550
|
+
__decorate([
|
|
30551
|
+
Mutation(() => MJAISkillSearchScope_),
|
|
30552
|
+
__param(0, Arg('ID', () => String)),
|
|
30553
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
30554
|
+
__param(2, Ctx()),
|
|
30555
|
+
__param(3, PubSub()),
|
|
30556
|
+
__metadata("design:type", Function),
|
|
30557
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
30558
|
+
__metadata("design:returntype", Promise)
|
|
30559
|
+
], MJAISkillSearchScopeResolver.prototype, "DeleteMJAISkillSearchScope", null);
|
|
30560
|
+
MJAISkillSearchScopeResolver = __decorate([
|
|
30561
|
+
Resolver(MJAISkillSearchScope_)
|
|
30562
|
+
], MJAISkillSearchScopeResolver);
|
|
30563
|
+
export { MJAISkillSearchScopeResolver };
|
|
30564
|
+
//****************************************************************************
|
|
30072
30565
|
// ENTITY CLASS for MJ: AI Skill Sub Agents
|
|
30073
30566
|
//****************************************************************************
|
|
30074
30567
|
let MJAISkillSubAgent_ = class MJAISkillSubAgent_ {
|
|
@@ -30366,6 +30859,11 @@ __decorate([
|
|
|
30366
30859
|
MaxLength(20),
|
|
30367
30860
|
__metadata("design:type", String)
|
|
30368
30861
|
], MJAISkill_.prototype, "ActivationMode", void 0);
|
|
30862
|
+
__decorate([
|
|
30863
|
+
Field({ nullable: true, description: `Which Search Scopes this skill may reach when activated. None = grants no retrieval scope; Assigned = only scopes listed in AISkillSearchScope; All = any active scope. NULL behaves as None so existing skills are unaffected. Mirrors AIAgent.SearchScopeAccess so a skill and an agent are interchangeable principals to SearchScopePermissionResolver.` }),
|
|
30864
|
+
MaxLength(20),
|
|
30865
|
+
__metadata("design:type", String)
|
|
30866
|
+
], MJAISkill_.prototype, "SearchScopeAccess", void 0);
|
|
30369
30867
|
__decorate([
|
|
30370
30868
|
Field(),
|
|
30371
30869
|
MaxLength(100),
|
|
@@ -30387,6 +30885,14 @@ __decorate([
|
|
|
30387
30885
|
Field(() => [MJAISkillPermission_]),
|
|
30388
30886
|
__metadata("design:type", Array)
|
|
30389
30887
|
], MJAISkill_.prototype, "MJAISkillPermissions_SkillIDArray", void 0);
|
|
30888
|
+
__decorate([
|
|
30889
|
+
Field(() => [MJSearchExecutionLog_]),
|
|
30890
|
+
__metadata("design:type", Array)
|
|
30891
|
+
], MJAISkill_.prototype, "MJSearchExecutionLogs_AISkillIDArray", void 0);
|
|
30892
|
+
__decorate([
|
|
30893
|
+
Field(() => [MJAISkillSearchScope_]),
|
|
30894
|
+
__metadata("design:type", Array)
|
|
30895
|
+
], MJAISkill_.prototype, "MJAISkillSearchScopes_SkillIDArray", void 0);
|
|
30390
30896
|
MJAISkill_ = __decorate([
|
|
30391
30897
|
ObjectType()
|
|
30392
30898
|
], MJAISkill_);
|
|
@@ -30436,6 +30942,10 @@ __decorate([
|
|
|
30436
30942
|
Field({ nullable: true }),
|
|
30437
30943
|
__metadata("design:type", String)
|
|
30438
30944
|
], CreateMJAISkillInput.prototype, "ActivationMode", void 0);
|
|
30945
|
+
__decorate([
|
|
30946
|
+
Field({ nullable: true }),
|
|
30947
|
+
__metadata("design:type", String)
|
|
30948
|
+
], CreateMJAISkillInput.prototype, "SearchScopeAccess", void 0);
|
|
30439
30949
|
__decorate([
|
|
30440
30950
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
30441
30951
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -30489,6 +30999,10 @@ __decorate([
|
|
|
30489
30999
|
Field({ nullable: true }),
|
|
30490
31000
|
__metadata("design:type", String)
|
|
30491
31001
|
], UpdateMJAISkillInput.prototype, "ActivationMode", void 0);
|
|
31002
|
+
__decorate([
|
|
31003
|
+
Field({ nullable: true }),
|
|
31004
|
+
__metadata("design:type", String)
|
|
31005
|
+
], UpdateMJAISkillInput.prototype, "SearchScopeAccess", void 0);
|
|
30492
31006
|
__decorate([
|
|
30493
31007
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
30494
31008
|
__metadata("design:type", Array)
|
|
@@ -30592,6 +31106,22 @@ let MJAISkillResolver = class MJAISkillResolver extends ResolverBase {
|
|
|
30592
31106
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Skill Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
30593
31107
|
return result;
|
|
30594
31108
|
}
|
|
31109
|
+
async MJSearchExecutionLogs_AISkillIDArray(mjaiskill_, { userPayload, providers }, pubSub) {
|
|
31110
|
+
this.CheckUserReadPermissions('MJ: Search Execution Logs', userPayload);
|
|
31111
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31112
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchExecutionLogs')} WHERE ${provider.QuoteIdentifier('AISkillID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
31113
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiskill_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
31114
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Execution Logs', rows, this.GetUserFromPayload(userPayload));
|
|
31115
|
+
return result;
|
|
31116
|
+
}
|
|
31117
|
+
async MJAISkillSearchScopes_SkillIDArray(mjaiskill_, { userPayload, providers }, pubSub) {
|
|
31118
|
+
this.CheckUserReadPermissions('MJ: AI Skill Search Scopes', userPayload);
|
|
31119
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31120
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAISkillSearchScopes')} WHERE ${provider.QuoteIdentifier('SkillID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Skill Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
31121
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiskill_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
31122
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Skill Search Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
31123
|
+
return result;
|
|
31124
|
+
}
|
|
30595
31125
|
async CreateMJAISkill(input, { providers, userPayload }, pubSub) {
|
|
30596
31126
|
const provider = GetReadWriteProvider(providers);
|
|
30597
31127
|
return this.CreateRecord('MJ: AI Skills', input, provider, userPayload, pubSub);
|
|
@@ -30678,6 +31208,24 @@ __decorate([
|
|
|
30678
31208
|
__metadata("design:paramtypes", [MJAISkill_, Object, PubSubEngine]),
|
|
30679
31209
|
__metadata("design:returntype", Promise)
|
|
30680
31210
|
], MJAISkillResolver.prototype, "MJAISkillPermissions_SkillIDArray", null);
|
|
31211
|
+
__decorate([
|
|
31212
|
+
FieldResolver(() => [MJSearchExecutionLog_]),
|
|
31213
|
+
__param(0, Root()),
|
|
31214
|
+
__param(1, Ctx()),
|
|
31215
|
+
__param(2, PubSub()),
|
|
31216
|
+
__metadata("design:type", Function),
|
|
31217
|
+
__metadata("design:paramtypes", [MJAISkill_, Object, PubSubEngine]),
|
|
31218
|
+
__metadata("design:returntype", Promise)
|
|
31219
|
+
], MJAISkillResolver.prototype, "MJSearchExecutionLogs_AISkillIDArray", null);
|
|
31220
|
+
__decorate([
|
|
31221
|
+
FieldResolver(() => [MJAISkillSearchScope_]),
|
|
31222
|
+
__param(0, Root()),
|
|
31223
|
+
__param(1, Ctx()),
|
|
31224
|
+
__param(2, PubSub()),
|
|
31225
|
+
__metadata("design:type", Function),
|
|
31226
|
+
__metadata("design:paramtypes", [MJAISkill_, Object, PubSubEngine]),
|
|
31227
|
+
__metadata("design:returntype", Promise)
|
|
31228
|
+
], MJAISkillResolver.prototype, "MJAISkillSearchScopes_SkillIDArray", null);
|
|
30681
31229
|
__decorate([
|
|
30682
31230
|
Mutation(() => MJAISkill_),
|
|
30683
31231
|
__param(0, Arg('input', () => CreateMJAISkillInput)),
|
|
@@ -49291,6 +49839,499 @@ MJContentItemAttributeResolver = __decorate([
|
|
|
49291
49839
|
], MJContentItemAttributeResolver);
|
|
49292
49840
|
export { MJContentItemAttributeResolver };
|
|
49293
49841
|
//****************************************************************************
|
|
49842
|
+
// ENTITY CLASS for MJ: Content Item Chunks
|
|
49843
|
+
//****************************************************************************
|
|
49844
|
+
let MJContentItemChunk_ = class MJContentItemChunk_ {
|
|
49845
|
+
};
|
|
49846
|
+
__decorate([
|
|
49847
|
+
Field(),
|
|
49848
|
+
MaxLength(36),
|
|
49849
|
+
__metadata("design:type", String)
|
|
49850
|
+
], MJContentItemChunk_.prototype, "ID", void 0);
|
|
49851
|
+
__decorate([
|
|
49852
|
+
Field(),
|
|
49853
|
+
MaxLength(36),
|
|
49854
|
+
__metadata("design:type", String)
|
|
49855
|
+
], MJContentItemChunk_.prototype, "ContentItemID", void 0);
|
|
49856
|
+
__decorate([
|
|
49857
|
+
Field(() => Int, { description: `Zero-based ordinal position of this chunk within the parent Content Item, preserving the original order in which the text was split.` }),
|
|
49858
|
+
__metadata("design:type", Number)
|
|
49859
|
+
], MJContentItemChunk_.prototype, "Sequence", void 0);
|
|
49860
|
+
__decorate([
|
|
49861
|
+
Field({ nullable: true, description: `The chunk of extracted text (from the parent Content Item) that was embedded to produce this chunk's vector. NULL for media-only segments (for example an image, or a video window with no transcript), where the embedded payload is the media itself and any readable representation lives in Description/Transcript.` }),
|
|
49862
|
+
__metadata("design:type", String)
|
|
49863
|
+
], MJContentItemChunk_.prototype, "Text", void 0);
|
|
49864
|
+
__decorate([
|
|
49865
|
+
Field({ nullable: true, description: `The identifier of this chunk's vector record in the vector database (e.g. Pinecone) — the deterministic key MemberJunction assigns and upserts the chunk's embedding under. Provides traceability from the chunk back to its stored vector.` }),
|
|
49866
|
+
MaxLength(100),
|
|
49867
|
+
__metadata("design:type", String)
|
|
49868
|
+
], MJContentItemChunk_.prototype, "VectorRecordID", void 0);
|
|
49869
|
+
__decorate([
|
|
49870
|
+
Field({ description: `Embedding lifecycle state of this chunk: Pending (default), Processing, Active, Complete, Processed, Failed, or Skipped.` }),
|
|
49871
|
+
MaxLength(20),
|
|
49872
|
+
__metadata("design:type", String)
|
|
49873
|
+
], MJContentItemChunk_.prototype, "EmbeddingStatus", void 0);
|
|
49874
|
+
__decorate([
|
|
49875
|
+
Field({ description: `Tagging lifecycle state of this chunk: Pending (default), Processing, Active, Complete, Processed, Failed, or Skipped.` }),
|
|
49876
|
+
MaxLength(20),
|
|
49877
|
+
__metadata("design:type", String)
|
|
49878
|
+
], MJContentItemChunk_.prototype, "TaggingStatus", void 0);
|
|
49879
|
+
__decorate([
|
|
49880
|
+
Field({ nullable: true, description: `Deletion lifecycle state of this chunk's vector: NULL when not slated for deletion, Pending when vector removal is queued, or Deleted once the vector has been removed from the vector database.` }),
|
|
49881
|
+
MaxLength(20),
|
|
49882
|
+
__metadata("design:type", String)
|
|
49883
|
+
], MJContentItemChunk_.prototype, "DeleteStatus", void 0);
|
|
49884
|
+
__decorate([
|
|
49885
|
+
Field({ nullable: true, description: `Timestamp of the last successful embedding of this chunk.` }),
|
|
49886
|
+
__metadata("design:type", Date)
|
|
49887
|
+
], MJContentItemChunk_.prototype, "LastEmbeddedAt", void 0);
|
|
49888
|
+
__decorate([
|
|
49889
|
+
Field({ nullable: true, description: `Timestamp of the last successful tagging of this chunk.` }),
|
|
49890
|
+
__metadata("design:type", Date)
|
|
49891
|
+
], MJContentItemChunk_.prototype, "LastTaggedAt", void 0);
|
|
49892
|
+
__decorate([
|
|
49893
|
+
Field({ nullable: true, description: `Timestamp of the last successful deletion of this chunk's vector from the vector database.` }),
|
|
49894
|
+
__metadata("design:type", Date)
|
|
49895
|
+
], MJContentItemChunk_.prototype, "LastDeletedAt", void 0);
|
|
49896
|
+
__decorate([
|
|
49897
|
+
Field(),
|
|
49898
|
+
__metadata("design:type", Date)
|
|
49899
|
+
], MJContentItemChunk_.prototype, "_mj__CreatedAt", void 0);
|
|
49900
|
+
__decorate([
|
|
49901
|
+
Field(),
|
|
49902
|
+
__metadata("design:type", Date)
|
|
49903
|
+
], MJContentItemChunk_.prototype, "_mj__UpdatedAt", void 0);
|
|
49904
|
+
__decorate([
|
|
49905
|
+
Field({ description: `The modality of this chunk's embedded payload: text (default), image, audio, video, or multimodal (text and media fused into a single vector). Determines which vector index the chunk's embedding belongs to, since a multimodal embedding model produces vectors of a different dimension than a text model, and is used at retrieval time to merge results per modality rather than taking a single global top-k.` }),
|
|
49906
|
+
MaxLength(20),
|
|
49907
|
+
__metadata("design:type", String)
|
|
49908
|
+
], MJContentItemChunk_.prototype, "Modality", void 0);
|
|
49909
|
+
__decorate([
|
|
49910
|
+
Field(() => Int, { nullable: true, description: `Inclusive character offset where this chunk begins within the parent Content Item's extracted text. Together with EndOffset this is the provenance link that resolves a search hit back to the exact passage in the source document. NULL for media segments, which are positioned by StartMs/EndMs instead.` }),
|
|
49911
|
+
__metadata("design:type", Number)
|
|
49912
|
+
], MJContentItemChunk_.prototype, "StartOffset", void 0);
|
|
49913
|
+
__decorate([
|
|
49914
|
+
Field(() => Int, { nullable: true, description: `Exclusive character offset where this chunk ends within the parent Content Item's extracted text. See StartOffset. NULL for media segments.` }),
|
|
49915
|
+
__metadata("design:type", Number)
|
|
49916
|
+
], MJContentItemChunk_.prototype, "EndOffset", void 0);
|
|
49917
|
+
__decorate([
|
|
49918
|
+
Field(() => Int, { nullable: true, description: `Start of this chunk's time window, in milliseconds from the beginning of the parent audio or video asset. Set by transcript- or window-based segmentation; enables time-windowed playback deep-links from a search result (for example 14:22-15:05 of a session recording). NULL for text segments.` }),
|
|
49919
|
+
__metadata("design:type", Number)
|
|
49920
|
+
], MJContentItemChunk_.prototype, "StartMs", void 0);
|
|
49921
|
+
__decorate([
|
|
49922
|
+
Field(() => Int, { nullable: true, description: `End of this chunk's time window, in milliseconds from the beginning of the parent audio or video asset. See StartMs. NULL for text segments.` }),
|
|
49923
|
+
__metadata("design:type", Number)
|
|
49924
|
+
], MJContentItemChunk_.prototype, "EndMs", void 0);
|
|
49925
|
+
__decorate([
|
|
49926
|
+
Field(() => Int, { nullable: true, description: `One-based page number this chunk came from, for paginated sources such as PDFs or slide decks. Provides citation-grade provenance alongside the character offsets. NULL when the source is not paginated.` }),
|
|
49927
|
+
__metadata("design:type", Number)
|
|
49928
|
+
], MJContentItemChunk_.prototype, "PageNumber", void 0);
|
|
49929
|
+
__decorate([
|
|
49930
|
+
Field({ nullable: true, description: `Human-readable label for this segment — a document heading for structure-based segmentation, or a generated chapter title for topic- and transcript-based segmentation. Displayed with search results and prepended to the embedded text so a chunk's vector carries its own topic.` }),
|
|
49931
|
+
MaxLength(500),
|
|
49932
|
+
__metadata("design:type", String)
|
|
49933
|
+
], MJContentItemChunk_.prototype, "SegmentTitle", void 0);
|
|
49934
|
+
__decorate([
|
|
49935
|
+
Field({ nullable: true, description: `An AI-generated description of this chunk's content, primarily for non-text segments. Retrieval of a media chunk otherwise yields only a pointer (an asset and a time window) that an agent cannot reason over; this column is the readable representation that an agent reads, a cross-encoder reranks, and lexical search matches. A short summary of it may be mirrored into the vector record's metadata for display and filtering, but the full text belongs here.` }),
|
|
49936
|
+
__metadata("design:type", String)
|
|
49937
|
+
], MJContentItemChunk_.prototype, "Description", void 0);
|
|
49938
|
+
__decorate([
|
|
49939
|
+
Field({ nullable: true, description: `The verbatim transcript covering this chunk's time window, for audio and video segments, including speaker labels where the source provides them. Distinct from Description, which is a generated summary: this is what was actually said, and it is what makes a recording findable by lexical search.` }),
|
|
49940
|
+
__metadata("design:type", String)
|
|
49941
|
+
], MJContentItemChunk_.prototype, "Transcript", void 0);
|
|
49942
|
+
__decorate([
|
|
49943
|
+
Field({ nullable: true, description: `Registration key of the segmentation strategy that produced this chunk (for example StructuralText, SemanticText, Transcript, or FixedWindow). Provenance: when a Content Source's configured strategy changes, this identifies which chunks were produced by the previous strategy and therefore need re-chunking.` }),
|
|
49944
|
+
MaxLength(100),
|
|
49945
|
+
__metadata("design:type", String)
|
|
49946
|
+
], MJContentItemChunk_.prototype, "SegmenterKey", void 0);
|
|
49947
|
+
__decorate([
|
|
49948
|
+
Field({ nullable: true, description: `Optional self-reference to another chunk of the same Content Item that is the parent of this one, expressing a chapter to sub-chapter hierarchy — for example a five-minute chapter of a recording and the individual speaker turns within it, or a document section and its subsections. NULL for top-level segments.` }),
|
|
49949
|
+
MaxLength(36),
|
|
49950
|
+
__metadata("design:type", String)
|
|
49951
|
+
], MJContentItemChunk_.prototype, "ParentChunkID", void 0);
|
|
49952
|
+
__decorate([
|
|
49953
|
+
Field({ nullable: true }),
|
|
49954
|
+
MaxLength(250),
|
|
49955
|
+
__metadata("design:type", String)
|
|
49956
|
+
], MJContentItemChunk_.prototype, "ContentItem", void 0);
|
|
49957
|
+
__decorate([
|
|
49958
|
+
Field({ nullable: true }),
|
|
49959
|
+
MaxLength(36),
|
|
49960
|
+
__metadata("design:type", String)
|
|
49961
|
+
], MJContentItemChunk_.prototype, "RootParentChunkID", void 0);
|
|
49962
|
+
__decorate([
|
|
49963
|
+
Field(() => [MJContentItemChunk_]),
|
|
49964
|
+
__metadata("design:type", Array)
|
|
49965
|
+
], MJContentItemChunk_.prototype, "MJContentItemChunks_ParentChunkIDArray", void 0);
|
|
49966
|
+
MJContentItemChunk_ = __decorate([
|
|
49967
|
+
ObjectType({ description: `Represents an individual chunk of a Content Item\'s text that was embedded as a distinct vector. When a Content Item is too large to embed as a single vector it is split into ordered chunks; each chunk becomes one row here, linking the stored vector back to the specific portion of the parent Content Item it represents.` })
|
|
49968
|
+
], MJContentItemChunk_);
|
|
49969
|
+
export { MJContentItemChunk_ };
|
|
49970
|
+
//****************************************************************************
|
|
49971
|
+
// INPUT TYPE for MJ: Content Item Chunks
|
|
49972
|
+
//****************************************************************************
|
|
49973
|
+
let CreateMJContentItemChunkInput = class CreateMJContentItemChunkInput {
|
|
49974
|
+
};
|
|
49975
|
+
__decorate([
|
|
49976
|
+
Field({ nullable: true }),
|
|
49977
|
+
__metadata("design:type", String)
|
|
49978
|
+
], CreateMJContentItemChunkInput.prototype, "ID", void 0);
|
|
49979
|
+
__decorate([
|
|
49980
|
+
Field({ nullable: true }),
|
|
49981
|
+
__metadata("design:type", String)
|
|
49982
|
+
], CreateMJContentItemChunkInput.prototype, "ContentItemID", void 0);
|
|
49983
|
+
__decorate([
|
|
49984
|
+
Field(() => Int, { nullable: true }),
|
|
49985
|
+
__metadata("design:type", Number)
|
|
49986
|
+
], CreateMJContentItemChunkInput.prototype, "Sequence", void 0);
|
|
49987
|
+
__decorate([
|
|
49988
|
+
Field({ nullable: true }),
|
|
49989
|
+
__metadata("design:type", String)
|
|
49990
|
+
], CreateMJContentItemChunkInput.prototype, "Text", void 0);
|
|
49991
|
+
__decorate([
|
|
49992
|
+
Field({ nullable: true }),
|
|
49993
|
+
__metadata("design:type", String)
|
|
49994
|
+
], CreateMJContentItemChunkInput.prototype, "VectorRecordID", void 0);
|
|
49995
|
+
__decorate([
|
|
49996
|
+
Field({ nullable: true }),
|
|
49997
|
+
__metadata("design:type", String)
|
|
49998
|
+
], CreateMJContentItemChunkInput.prototype, "EmbeddingStatus", void 0);
|
|
49999
|
+
__decorate([
|
|
50000
|
+
Field({ nullable: true }),
|
|
50001
|
+
__metadata("design:type", String)
|
|
50002
|
+
], CreateMJContentItemChunkInput.prototype, "TaggingStatus", void 0);
|
|
50003
|
+
__decorate([
|
|
50004
|
+
Field({ nullable: true }),
|
|
50005
|
+
__metadata("design:type", String)
|
|
50006
|
+
], CreateMJContentItemChunkInput.prototype, "DeleteStatus", void 0);
|
|
50007
|
+
__decorate([
|
|
50008
|
+
Field({ nullable: true }),
|
|
50009
|
+
__metadata("design:type", Date)
|
|
50010
|
+
], CreateMJContentItemChunkInput.prototype, "LastEmbeddedAt", void 0);
|
|
50011
|
+
__decorate([
|
|
50012
|
+
Field({ nullable: true }),
|
|
50013
|
+
__metadata("design:type", Date)
|
|
50014
|
+
], CreateMJContentItemChunkInput.prototype, "LastTaggedAt", void 0);
|
|
50015
|
+
__decorate([
|
|
50016
|
+
Field({ nullable: true }),
|
|
50017
|
+
__metadata("design:type", Date)
|
|
50018
|
+
], CreateMJContentItemChunkInput.prototype, "LastDeletedAt", void 0);
|
|
50019
|
+
__decorate([
|
|
50020
|
+
Field({ nullable: true }),
|
|
50021
|
+
__metadata("design:type", String)
|
|
50022
|
+
], CreateMJContentItemChunkInput.prototype, "Modality", void 0);
|
|
50023
|
+
__decorate([
|
|
50024
|
+
Field(() => Int, { nullable: true }),
|
|
50025
|
+
__metadata("design:type", Number)
|
|
50026
|
+
], CreateMJContentItemChunkInput.prototype, "StartOffset", void 0);
|
|
50027
|
+
__decorate([
|
|
50028
|
+
Field(() => Int, { nullable: true }),
|
|
50029
|
+
__metadata("design:type", Number)
|
|
50030
|
+
], CreateMJContentItemChunkInput.prototype, "EndOffset", void 0);
|
|
50031
|
+
__decorate([
|
|
50032
|
+
Field(() => Int, { nullable: true }),
|
|
50033
|
+
__metadata("design:type", Number)
|
|
50034
|
+
], CreateMJContentItemChunkInput.prototype, "StartMs", void 0);
|
|
50035
|
+
__decorate([
|
|
50036
|
+
Field(() => Int, { nullable: true }),
|
|
50037
|
+
__metadata("design:type", Number)
|
|
50038
|
+
], CreateMJContentItemChunkInput.prototype, "EndMs", void 0);
|
|
50039
|
+
__decorate([
|
|
50040
|
+
Field(() => Int, { nullable: true }),
|
|
50041
|
+
__metadata("design:type", Number)
|
|
50042
|
+
], CreateMJContentItemChunkInput.prototype, "PageNumber", void 0);
|
|
50043
|
+
__decorate([
|
|
50044
|
+
Field({ nullable: true }),
|
|
50045
|
+
__metadata("design:type", String)
|
|
50046
|
+
], CreateMJContentItemChunkInput.prototype, "SegmentTitle", void 0);
|
|
50047
|
+
__decorate([
|
|
50048
|
+
Field({ nullable: true }),
|
|
50049
|
+
__metadata("design:type", String)
|
|
50050
|
+
], CreateMJContentItemChunkInput.prototype, "Description", void 0);
|
|
50051
|
+
__decorate([
|
|
50052
|
+
Field({ nullable: true }),
|
|
50053
|
+
__metadata("design:type", String)
|
|
50054
|
+
], CreateMJContentItemChunkInput.prototype, "Transcript", void 0);
|
|
50055
|
+
__decorate([
|
|
50056
|
+
Field({ nullable: true }),
|
|
50057
|
+
__metadata("design:type", String)
|
|
50058
|
+
], CreateMJContentItemChunkInput.prototype, "SegmenterKey", void 0);
|
|
50059
|
+
__decorate([
|
|
50060
|
+
Field({ nullable: true }),
|
|
50061
|
+
__metadata("design:type", String)
|
|
50062
|
+
], CreateMJContentItemChunkInput.prototype, "ParentChunkID", void 0);
|
|
50063
|
+
__decorate([
|
|
50064
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
50065
|
+
__metadata("design:type", RestoreContextInput)
|
|
50066
|
+
], CreateMJContentItemChunkInput.prototype, "RestoreContext___", void 0);
|
|
50067
|
+
CreateMJContentItemChunkInput = __decorate([
|
|
50068
|
+
InputType()
|
|
50069
|
+
], CreateMJContentItemChunkInput);
|
|
50070
|
+
export { CreateMJContentItemChunkInput };
|
|
50071
|
+
//****************************************************************************
|
|
50072
|
+
// INPUT TYPE for MJ: Content Item Chunks
|
|
50073
|
+
//****************************************************************************
|
|
50074
|
+
let UpdateMJContentItemChunkInput = class UpdateMJContentItemChunkInput {
|
|
50075
|
+
};
|
|
50076
|
+
__decorate([
|
|
50077
|
+
Field(),
|
|
50078
|
+
__metadata("design:type", String)
|
|
50079
|
+
], UpdateMJContentItemChunkInput.prototype, "ID", void 0);
|
|
50080
|
+
__decorate([
|
|
50081
|
+
Field({ nullable: true }),
|
|
50082
|
+
__metadata("design:type", String)
|
|
50083
|
+
], UpdateMJContentItemChunkInput.prototype, "ContentItemID", void 0);
|
|
50084
|
+
__decorate([
|
|
50085
|
+
Field(() => Int, { nullable: true }),
|
|
50086
|
+
__metadata("design:type", Number)
|
|
50087
|
+
], UpdateMJContentItemChunkInput.prototype, "Sequence", void 0);
|
|
50088
|
+
__decorate([
|
|
50089
|
+
Field({ nullable: true }),
|
|
50090
|
+
__metadata("design:type", String)
|
|
50091
|
+
], UpdateMJContentItemChunkInput.prototype, "Text", void 0);
|
|
50092
|
+
__decorate([
|
|
50093
|
+
Field({ nullable: true }),
|
|
50094
|
+
__metadata("design:type", String)
|
|
50095
|
+
], UpdateMJContentItemChunkInput.prototype, "VectorRecordID", void 0);
|
|
50096
|
+
__decorate([
|
|
50097
|
+
Field({ nullable: true }),
|
|
50098
|
+
__metadata("design:type", String)
|
|
50099
|
+
], UpdateMJContentItemChunkInput.prototype, "EmbeddingStatus", void 0);
|
|
50100
|
+
__decorate([
|
|
50101
|
+
Field({ nullable: true }),
|
|
50102
|
+
__metadata("design:type", String)
|
|
50103
|
+
], UpdateMJContentItemChunkInput.prototype, "TaggingStatus", void 0);
|
|
50104
|
+
__decorate([
|
|
50105
|
+
Field({ nullable: true }),
|
|
50106
|
+
__metadata("design:type", String)
|
|
50107
|
+
], UpdateMJContentItemChunkInput.prototype, "DeleteStatus", void 0);
|
|
50108
|
+
__decorate([
|
|
50109
|
+
Field({ nullable: true }),
|
|
50110
|
+
__metadata("design:type", Date)
|
|
50111
|
+
], UpdateMJContentItemChunkInput.prototype, "LastEmbeddedAt", void 0);
|
|
50112
|
+
__decorate([
|
|
50113
|
+
Field({ nullable: true }),
|
|
50114
|
+
__metadata("design:type", Date)
|
|
50115
|
+
], UpdateMJContentItemChunkInput.prototype, "LastTaggedAt", void 0);
|
|
50116
|
+
__decorate([
|
|
50117
|
+
Field({ nullable: true }),
|
|
50118
|
+
__metadata("design:type", Date)
|
|
50119
|
+
], UpdateMJContentItemChunkInput.prototype, "LastDeletedAt", void 0);
|
|
50120
|
+
__decorate([
|
|
50121
|
+
Field({ nullable: true }),
|
|
50122
|
+
__metadata("design:type", String)
|
|
50123
|
+
], UpdateMJContentItemChunkInput.prototype, "Modality", void 0);
|
|
50124
|
+
__decorate([
|
|
50125
|
+
Field(() => Int, { nullable: true }),
|
|
50126
|
+
__metadata("design:type", Number)
|
|
50127
|
+
], UpdateMJContentItemChunkInput.prototype, "StartOffset", void 0);
|
|
50128
|
+
__decorate([
|
|
50129
|
+
Field(() => Int, { nullable: true }),
|
|
50130
|
+
__metadata("design:type", Number)
|
|
50131
|
+
], UpdateMJContentItemChunkInput.prototype, "EndOffset", void 0);
|
|
50132
|
+
__decorate([
|
|
50133
|
+
Field(() => Int, { nullable: true }),
|
|
50134
|
+
__metadata("design:type", Number)
|
|
50135
|
+
], UpdateMJContentItemChunkInput.prototype, "StartMs", void 0);
|
|
50136
|
+
__decorate([
|
|
50137
|
+
Field(() => Int, { nullable: true }),
|
|
50138
|
+
__metadata("design:type", Number)
|
|
50139
|
+
], UpdateMJContentItemChunkInput.prototype, "EndMs", void 0);
|
|
50140
|
+
__decorate([
|
|
50141
|
+
Field(() => Int, { nullable: true }),
|
|
50142
|
+
__metadata("design:type", Number)
|
|
50143
|
+
], UpdateMJContentItemChunkInput.prototype, "PageNumber", void 0);
|
|
50144
|
+
__decorate([
|
|
50145
|
+
Field({ nullable: true }),
|
|
50146
|
+
__metadata("design:type", String)
|
|
50147
|
+
], UpdateMJContentItemChunkInput.prototype, "SegmentTitle", void 0);
|
|
50148
|
+
__decorate([
|
|
50149
|
+
Field({ nullable: true }),
|
|
50150
|
+
__metadata("design:type", String)
|
|
50151
|
+
], UpdateMJContentItemChunkInput.prototype, "Description", void 0);
|
|
50152
|
+
__decorate([
|
|
50153
|
+
Field({ nullable: true }),
|
|
50154
|
+
__metadata("design:type", String)
|
|
50155
|
+
], UpdateMJContentItemChunkInput.prototype, "Transcript", void 0);
|
|
50156
|
+
__decorate([
|
|
50157
|
+
Field({ nullable: true }),
|
|
50158
|
+
__metadata("design:type", String)
|
|
50159
|
+
], UpdateMJContentItemChunkInput.prototype, "SegmenterKey", void 0);
|
|
50160
|
+
__decorate([
|
|
50161
|
+
Field({ nullable: true }),
|
|
50162
|
+
__metadata("design:type", String)
|
|
50163
|
+
], UpdateMJContentItemChunkInput.prototype, "ParentChunkID", void 0);
|
|
50164
|
+
__decorate([
|
|
50165
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
50166
|
+
__metadata("design:type", Array)
|
|
50167
|
+
], UpdateMJContentItemChunkInput.prototype, "OldValues___", void 0);
|
|
50168
|
+
__decorate([
|
|
50169
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
50170
|
+
__metadata("design:type", RestoreContextInput)
|
|
50171
|
+
], UpdateMJContentItemChunkInput.prototype, "RestoreContext___", void 0);
|
|
50172
|
+
UpdateMJContentItemChunkInput = __decorate([
|
|
50173
|
+
InputType()
|
|
50174
|
+
], UpdateMJContentItemChunkInput);
|
|
50175
|
+
export { UpdateMJContentItemChunkInput };
|
|
50176
|
+
//****************************************************************************
|
|
50177
|
+
// RESOLVER for MJ: Content Item Chunks
|
|
50178
|
+
//****************************************************************************
|
|
50179
|
+
let RunMJContentItemChunkViewResult = class RunMJContentItemChunkViewResult {
|
|
50180
|
+
};
|
|
50181
|
+
__decorate([
|
|
50182
|
+
Field(() => [MJContentItemChunk_]),
|
|
50183
|
+
__metadata("design:type", Array)
|
|
50184
|
+
], RunMJContentItemChunkViewResult.prototype, "Results", void 0);
|
|
50185
|
+
__decorate([
|
|
50186
|
+
Field(() => String, { nullable: true }),
|
|
50187
|
+
__metadata("design:type", String)
|
|
50188
|
+
], RunMJContentItemChunkViewResult.prototype, "UserViewRunID", void 0);
|
|
50189
|
+
__decorate([
|
|
50190
|
+
Field(() => Int, { nullable: true }),
|
|
50191
|
+
__metadata("design:type", Number)
|
|
50192
|
+
], RunMJContentItemChunkViewResult.prototype, "RowCount", void 0);
|
|
50193
|
+
__decorate([
|
|
50194
|
+
Field(() => Int, { nullable: true }),
|
|
50195
|
+
__metadata("design:type", Number)
|
|
50196
|
+
], RunMJContentItemChunkViewResult.prototype, "TotalRowCount", void 0);
|
|
50197
|
+
__decorate([
|
|
50198
|
+
Field(() => Int, { nullable: true }),
|
|
50199
|
+
__metadata("design:type", Number)
|
|
50200
|
+
], RunMJContentItemChunkViewResult.prototype, "ExecutionTime", void 0);
|
|
50201
|
+
__decorate([
|
|
50202
|
+
Field({ nullable: true }),
|
|
50203
|
+
__metadata("design:type", String)
|
|
50204
|
+
], RunMJContentItemChunkViewResult.prototype, "ErrorMessage", void 0);
|
|
50205
|
+
__decorate([
|
|
50206
|
+
Field(() => Boolean, { nullable: false }),
|
|
50207
|
+
__metadata("design:type", Boolean)
|
|
50208
|
+
], RunMJContentItemChunkViewResult.prototype, "Success", void 0);
|
|
50209
|
+
RunMJContentItemChunkViewResult = __decorate([
|
|
50210
|
+
ObjectType()
|
|
50211
|
+
], RunMJContentItemChunkViewResult);
|
|
50212
|
+
export { RunMJContentItemChunkViewResult };
|
|
50213
|
+
let MJContentItemChunkResolver = class MJContentItemChunkResolver extends ResolverBase {
|
|
50214
|
+
async RunMJContentItemChunkViewByID(input, { providers, userPayload }, pubSub) {
|
|
50215
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
50216
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
50217
|
+
}
|
|
50218
|
+
async RunMJContentItemChunkViewByName(input, { providers, userPayload }, pubSub) {
|
|
50219
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
50220
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
50221
|
+
}
|
|
50222
|
+
async RunMJContentItemChunkDynamicView(input, { providers, userPayload }, pubSub) {
|
|
50223
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
50224
|
+
input.EntityName = 'MJ: Content Item Chunks';
|
|
50225
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
50226
|
+
}
|
|
50227
|
+
async MJContentItemChunk(ID, { userPayload, providers }, pubSub) {
|
|
50228
|
+
this.CheckUserReadPermissions('MJ: Content Item Chunks', userPayload);
|
|
50229
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
50230
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemChunks')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Chunks', userPayload, EntityPermissionType.Read, 'AND');
|
|
50231
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
50232
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Content Item Chunks', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
50233
|
+
return result;
|
|
50234
|
+
}
|
|
50235
|
+
async MJContentItemChunks_ParentChunkIDArray(mjcontentitemchunk_, { userPayload, providers }, pubSub) {
|
|
50236
|
+
this.CheckUserReadPermissions('MJ: Content Item Chunks', userPayload);
|
|
50237
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
50238
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemChunks')} WHERE ${provider.QuoteIdentifier('ParentChunkID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Chunks', userPayload, EntityPermissionType.Read, 'AND');
|
|
50239
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcontentitemchunk_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
50240
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Chunks', rows, this.GetUserFromPayload(userPayload));
|
|
50241
|
+
return result;
|
|
50242
|
+
}
|
|
50243
|
+
async CreateMJContentItemChunk(input, { providers, userPayload }, pubSub) {
|
|
50244
|
+
const provider = GetReadWriteProvider(providers);
|
|
50245
|
+
return this.CreateRecord('MJ: Content Item Chunks', input, provider, userPayload, pubSub);
|
|
50246
|
+
}
|
|
50247
|
+
async UpdateMJContentItemChunk(input, { providers, userPayload }, pubSub) {
|
|
50248
|
+
const provider = GetReadWriteProvider(providers);
|
|
50249
|
+
return this.UpdateRecord('MJ: Content Item Chunks', input, provider, userPayload, pubSub);
|
|
50250
|
+
}
|
|
50251
|
+
async DeleteMJContentItemChunk(ID, options, { providers, userPayload }, pubSub) {
|
|
50252
|
+
const provider = GetReadWriteProvider(providers);
|
|
50253
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
50254
|
+
return this.DeleteRecord('MJ: Content Item Chunks', key, options, provider, userPayload, pubSub);
|
|
50255
|
+
}
|
|
50256
|
+
};
|
|
50257
|
+
__decorate([
|
|
50258
|
+
Query(() => RunMJContentItemChunkViewResult),
|
|
50259
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
50260
|
+
__param(1, Ctx()),
|
|
50261
|
+
__param(2, PubSub()),
|
|
50262
|
+
__metadata("design:type", Function),
|
|
50263
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
50264
|
+
__metadata("design:returntype", Promise)
|
|
50265
|
+
], MJContentItemChunkResolver.prototype, "RunMJContentItemChunkViewByID", null);
|
|
50266
|
+
__decorate([
|
|
50267
|
+
Query(() => RunMJContentItemChunkViewResult),
|
|
50268
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
50269
|
+
__param(1, Ctx()),
|
|
50270
|
+
__param(2, PubSub()),
|
|
50271
|
+
__metadata("design:type", Function),
|
|
50272
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
50273
|
+
__metadata("design:returntype", Promise)
|
|
50274
|
+
], MJContentItemChunkResolver.prototype, "RunMJContentItemChunkViewByName", null);
|
|
50275
|
+
__decorate([
|
|
50276
|
+
Query(() => RunMJContentItemChunkViewResult),
|
|
50277
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
50278
|
+
__param(1, Ctx()),
|
|
50279
|
+
__param(2, PubSub()),
|
|
50280
|
+
__metadata("design:type", Function),
|
|
50281
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
50282
|
+
__metadata("design:returntype", Promise)
|
|
50283
|
+
], MJContentItemChunkResolver.prototype, "RunMJContentItemChunkDynamicView", null);
|
|
50284
|
+
__decorate([
|
|
50285
|
+
Query(() => MJContentItemChunk_, { nullable: true }),
|
|
50286
|
+
__param(0, Arg('ID', () => String)),
|
|
50287
|
+
__param(1, Ctx()),
|
|
50288
|
+
__param(2, PubSub()),
|
|
50289
|
+
__metadata("design:type", Function),
|
|
50290
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
50291
|
+
__metadata("design:returntype", Promise)
|
|
50292
|
+
], MJContentItemChunkResolver.prototype, "MJContentItemChunk", null);
|
|
50293
|
+
__decorate([
|
|
50294
|
+
FieldResolver(() => [MJContentItemChunk_]),
|
|
50295
|
+
__param(0, Root()),
|
|
50296
|
+
__param(1, Ctx()),
|
|
50297
|
+
__param(2, PubSub()),
|
|
50298
|
+
__metadata("design:type", Function),
|
|
50299
|
+
__metadata("design:paramtypes", [MJContentItemChunk_, Object, PubSubEngine]),
|
|
50300
|
+
__metadata("design:returntype", Promise)
|
|
50301
|
+
], MJContentItemChunkResolver.prototype, "MJContentItemChunks_ParentChunkIDArray", null);
|
|
50302
|
+
__decorate([
|
|
50303
|
+
Mutation(() => MJContentItemChunk_),
|
|
50304
|
+
__param(0, Arg('input', () => CreateMJContentItemChunkInput)),
|
|
50305
|
+
__param(1, Ctx()),
|
|
50306
|
+
__param(2, PubSub()),
|
|
50307
|
+
__metadata("design:type", Function),
|
|
50308
|
+
__metadata("design:paramtypes", [CreateMJContentItemChunkInput, Object, PubSubEngine]),
|
|
50309
|
+
__metadata("design:returntype", Promise)
|
|
50310
|
+
], MJContentItemChunkResolver.prototype, "CreateMJContentItemChunk", null);
|
|
50311
|
+
__decorate([
|
|
50312
|
+
Mutation(() => MJContentItemChunk_),
|
|
50313
|
+
__param(0, Arg('input', () => UpdateMJContentItemChunkInput)),
|
|
50314
|
+
__param(1, Ctx()),
|
|
50315
|
+
__param(2, PubSub()),
|
|
50316
|
+
__metadata("design:type", Function),
|
|
50317
|
+
__metadata("design:paramtypes", [UpdateMJContentItemChunkInput, Object, PubSubEngine]),
|
|
50318
|
+
__metadata("design:returntype", Promise)
|
|
50319
|
+
], MJContentItemChunkResolver.prototype, "UpdateMJContentItemChunk", null);
|
|
50320
|
+
__decorate([
|
|
50321
|
+
Mutation(() => MJContentItemChunk_),
|
|
50322
|
+
__param(0, Arg('ID', () => String)),
|
|
50323
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
50324
|
+
__param(2, Ctx()),
|
|
50325
|
+
__param(3, PubSub()),
|
|
50326
|
+
__metadata("design:type", Function),
|
|
50327
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
50328
|
+
__metadata("design:returntype", Promise)
|
|
50329
|
+
], MJContentItemChunkResolver.prototype, "DeleteMJContentItemChunk", null);
|
|
50330
|
+
MJContentItemChunkResolver = __decorate([
|
|
50331
|
+
Resolver(MJContentItemChunk_)
|
|
50332
|
+
], MJContentItemChunkResolver);
|
|
50333
|
+
export { MJContentItemChunkResolver };
|
|
50334
|
+
//****************************************************************************
|
|
49294
50335
|
// ENTITY CLASS for MJ: Content Item Duplicates
|
|
49295
50336
|
//****************************************************************************
|
|
49296
50337
|
let MJContentItemDuplicate_ = class MJContentItemDuplicate_ {
|
|
@@ -49989,6 +51030,21 @@ __decorate([
|
|
|
49989
51030
|
Field({ nullable: true, description: `Timestamp of the most recent successful autotagging run for this content item.` }),
|
|
49990
51031
|
__metadata("design:type", Date)
|
|
49991
51032
|
], MJContentItem_.prototype, "LastTaggedAt", void 0);
|
|
51033
|
+
__decorate([
|
|
51034
|
+
Field({ nullable: true, description: `The identifier of this Content Item's vector record in the vector database (e.g. Pinecone) — the deterministic key MemberJunction assigns and upserts the embedding under when the item is embedded as a single vector. Provides traceability from the Content Item back to its stored vector. For chunked items, per-chunk identifiers are tracked on the ContentItemChunk entity instead.` }),
|
|
51035
|
+
MaxLength(100),
|
|
51036
|
+
__metadata("design:type", String)
|
|
51037
|
+
], MJContentItem_.prototype, "VectorRecordID", void 0);
|
|
51038
|
+
__decorate([
|
|
51039
|
+
Field({ nullable: true, description: `Optional self-reference to another Content Item that is the parent of this one, enabling a content-item hierarchy (e.g. a document and its sub-pages, or a site and its crawled pages). NULL for top-level items.` }),
|
|
51040
|
+
MaxLength(36),
|
|
51041
|
+
__metadata("design:type", String)
|
|
51042
|
+
], MJContentItem_.prototype, "ParentID", void 0);
|
|
51043
|
+
__decorate([
|
|
51044
|
+
Field({ nullable: true, description: `Optional display/clickable URL for this Content Item (e.g. a canonical or human-facing link), distinct from the source URL used for ingestion.` }),
|
|
51045
|
+
MaxLength(2000),
|
|
51046
|
+
__metadata("design:type", String)
|
|
51047
|
+
], MJContentItem_.prototype, "DisplayLink", void 0);
|
|
49992
51048
|
__decorate([
|
|
49993
51049
|
Field({ nullable: true }),
|
|
49994
51050
|
MaxLength(255),
|
|
@@ -50019,6 +51075,16 @@ __decorate([
|
|
|
50019
51075
|
MaxLength(50),
|
|
50020
51076
|
__metadata("design:type", String)
|
|
50021
51077
|
], MJContentItem_.prototype, "EmbeddingModel", void 0);
|
|
51078
|
+
__decorate([
|
|
51079
|
+
Field({ nullable: true }),
|
|
51080
|
+
MaxLength(250),
|
|
51081
|
+
__metadata("design:type", String)
|
|
51082
|
+
], MJContentItem_.prototype, "Parent", void 0);
|
|
51083
|
+
__decorate([
|
|
51084
|
+
Field({ nullable: true }),
|
|
51085
|
+
MaxLength(36),
|
|
51086
|
+
__metadata("design:type", String)
|
|
51087
|
+
], MJContentItem_.prototype, "RootParentID", void 0);
|
|
50022
51088
|
__decorate([
|
|
50023
51089
|
Field(() => [MJContentItemAttribute_]),
|
|
50024
51090
|
__metadata("design:type", Array)
|
|
@@ -50035,10 +51101,18 @@ __decorate([
|
|
|
50035
51101
|
Field(() => [MJContentItemDuplicate_]),
|
|
50036
51102
|
__metadata("design:type", Array)
|
|
50037
51103
|
], MJContentItem_.prototype, "MJContentItemDuplicates_ContentItemBIDArray", void 0);
|
|
51104
|
+
__decorate([
|
|
51105
|
+
Field(() => [MJContentItem_]),
|
|
51106
|
+
__metadata("design:type", Array)
|
|
51107
|
+
], MJContentItem_.prototype, "MJContentItems_ParentIDArray", void 0);
|
|
50038
51108
|
__decorate([
|
|
50039
51109
|
Field(() => [MJTagSuggestion_]),
|
|
50040
51110
|
__metadata("design:type", Array)
|
|
50041
51111
|
], MJContentItem_.prototype, "MJTagSuggestions_SourceContentItemIDArray", void 0);
|
|
51112
|
+
__decorate([
|
|
51113
|
+
Field(() => [MJContentItemChunk_]),
|
|
51114
|
+
__metadata("design:type", Array)
|
|
51115
|
+
], MJContentItem_.prototype, "MJContentItemChunks_ContentItemIDArray", void 0);
|
|
50042
51116
|
MJContentItem_ = __decorate([
|
|
50043
51117
|
ObjectType({ description: `Stores extracted text from content assets, as well as the source location, versioning, and links to extracted tags and attributes.` })
|
|
50044
51118
|
], MJContentItem_);
|
|
@@ -50112,6 +51186,18 @@ __decorate([
|
|
|
50112
51186
|
Field({ nullable: true }),
|
|
50113
51187
|
__metadata("design:type", Date)
|
|
50114
51188
|
], CreateMJContentItemInput.prototype, "LastTaggedAt", void 0);
|
|
51189
|
+
__decorate([
|
|
51190
|
+
Field({ nullable: true }),
|
|
51191
|
+
__metadata("design:type", String)
|
|
51192
|
+
], CreateMJContentItemInput.prototype, "VectorRecordID", void 0);
|
|
51193
|
+
__decorate([
|
|
51194
|
+
Field({ nullable: true }),
|
|
51195
|
+
__metadata("design:type", String)
|
|
51196
|
+
], CreateMJContentItemInput.prototype, "ParentID", void 0);
|
|
51197
|
+
__decorate([
|
|
51198
|
+
Field({ nullable: true }),
|
|
51199
|
+
__metadata("design:type", String)
|
|
51200
|
+
], CreateMJContentItemInput.prototype, "DisplayLink", void 0);
|
|
50115
51201
|
__decorate([
|
|
50116
51202
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
50117
51203
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -50189,6 +51275,18 @@ __decorate([
|
|
|
50189
51275
|
Field({ nullable: true }),
|
|
50190
51276
|
__metadata("design:type", Date)
|
|
50191
51277
|
], UpdateMJContentItemInput.prototype, "LastTaggedAt", void 0);
|
|
51278
|
+
__decorate([
|
|
51279
|
+
Field({ nullable: true }),
|
|
51280
|
+
__metadata("design:type", String)
|
|
51281
|
+
], UpdateMJContentItemInput.prototype, "VectorRecordID", void 0);
|
|
51282
|
+
__decorate([
|
|
51283
|
+
Field({ nullable: true }),
|
|
51284
|
+
__metadata("design:type", String)
|
|
51285
|
+
], UpdateMJContentItemInput.prototype, "ParentID", void 0);
|
|
51286
|
+
__decorate([
|
|
51287
|
+
Field({ nullable: true }),
|
|
51288
|
+
__metadata("design:type", String)
|
|
51289
|
+
], UpdateMJContentItemInput.prototype, "DisplayLink", void 0);
|
|
50192
51290
|
__decorate([
|
|
50193
51291
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
50194
51292
|
__metadata("design:type", Array)
|
|
@@ -50292,6 +51390,14 @@ let MJContentItemResolver = class MJContentItemResolver extends ResolverBase {
|
|
|
50292
51390
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Duplicates', rows, this.GetUserFromPayload(userPayload));
|
|
50293
51391
|
return result;
|
|
50294
51392
|
}
|
|
51393
|
+
async MJContentItems_ParentIDArray(mjcontentitem_, { userPayload, providers }, pubSub) {
|
|
51394
|
+
this.CheckUserReadPermissions('MJ: Content Items', userPayload);
|
|
51395
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
51396
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItems')} WHERE ${provider.QuoteIdentifier('ParentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
51397
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcontentitem_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
51398
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Items', rows, this.GetUserFromPayload(userPayload));
|
|
51399
|
+
return result;
|
|
51400
|
+
}
|
|
50295
51401
|
async MJTagSuggestions_SourceContentItemIDArray(mjcontentitem_, { userPayload, providers }, pubSub) {
|
|
50296
51402
|
this.CheckUserReadPermissions('MJ: Tag Suggestions', userPayload);
|
|
50297
51403
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -50300,6 +51406,14 @@ let MJContentItemResolver = class MJContentItemResolver extends ResolverBase {
|
|
|
50300
51406
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
|
|
50301
51407
|
return result;
|
|
50302
51408
|
}
|
|
51409
|
+
async MJContentItemChunks_ContentItemIDArray(mjcontentitem_, { userPayload, providers }, pubSub) {
|
|
51410
|
+
this.CheckUserReadPermissions('MJ: Content Item Chunks', userPayload);
|
|
51411
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
51412
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentItemChunks')} WHERE ${provider.QuoteIdentifier('ContentItemID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Item Chunks', userPayload, EntityPermissionType.Read, 'AND');
|
|
51413
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcontentitem_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
51414
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Chunks', rows, this.GetUserFromPayload(userPayload));
|
|
51415
|
+
return result;
|
|
51416
|
+
}
|
|
50303
51417
|
async CreateMJContentItem(input, { providers, userPayload }, pubSub) {
|
|
50304
51418
|
const provider = GetReadWriteProvider(providers);
|
|
50305
51419
|
return this.CreateRecord('MJ: Content Items', input, provider, userPayload, pubSub);
|
|
@@ -50386,6 +51500,15 @@ __decorate([
|
|
|
50386
51500
|
__metadata("design:paramtypes", [MJContentItem_, Object, PubSubEngine]),
|
|
50387
51501
|
__metadata("design:returntype", Promise)
|
|
50388
51502
|
], MJContentItemResolver.prototype, "MJContentItemDuplicates_ContentItemBIDArray", null);
|
|
51503
|
+
__decorate([
|
|
51504
|
+
FieldResolver(() => [MJContentItem_]),
|
|
51505
|
+
__param(0, Root()),
|
|
51506
|
+
__param(1, Ctx()),
|
|
51507
|
+
__param(2, PubSub()),
|
|
51508
|
+
__metadata("design:type", Function),
|
|
51509
|
+
__metadata("design:paramtypes", [MJContentItem_, Object, PubSubEngine]),
|
|
51510
|
+
__metadata("design:returntype", Promise)
|
|
51511
|
+
], MJContentItemResolver.prototype, "MJContentItems_ParentIDArray", null);
|
|
50389
51512
|
__decorate([
|
|
50390
51513
|
FieldResolver(() => [MJTagSuggestion_]),
|
|
50391
51514
|
__param(0, Root()),
|
|
@@ -50395,6 +51518,15 @@ __decorate([
|
|
|
50395
51518
|
__metadata("design:paramtypes", [MJContentItem_, Object, PubSubEngine]),
|
|
50396
51519
|
__metadata("design:returntype", Promise)
|
|
50397
51520
|
], MJContentItemResolver.prototype, "MJTagSuggestions_SourceContentItemIDArray", null);
|
|
51521
|
+
__decorate([
|
|
51522
|
+
FieldResolver(() => [MJContentItemChunk_]),
|
|
51523
|
+
__param(0, Root()),
|
|
51524
|
+
__param(1, Ctx()),
|
|
51525
|
+
__param(2, PubSub()),
|
|
51526
|
+
__metadata("design:type", Function),
|
|
51527
|
+
__metadata("design:paramtypes", [MJContentItem_, Object, PubSubEngine]),
|
|
51528
|
+
__metadata("design:returntype", Promise)
|
|
51529
|
+
], MJContentItemResolver.prototype, "MJContentItemChunks_ContentItemIDArray", null);
|
|
50398
51530
|
__decorate([
|
|
50399
51531
|
Mutation(() => MJContentItem_),
|
|
50400
51532
|
__param(0, Arg('input', () => CreateMJContentItemInput)),
|
|
@@ -52354,6 +53486,16 @@ __decorate([
|
|
|
52354
53486
|
MaxLength(36),
|
|
52355
53487
|
__metadata("design:type", String)
|
|
52356
53488
|
], MJContentSource_.prototype, "ScheduledActionID", void 0);
|
|
53489
|
+
__decorate([
|
|
53490
|
+
Field({ nullable: true, description: `Registration key of the segmentation strategy used to split this source's content into embeddable chunks — for example StructuralText (document headings), AdaptiveBoundary (target size closing on the nearest natural break), SemanticText (LLM-detected topic boundaries), Transcript (audio/video chapters), PagedContent (one segment per page), or FixedWindow (uniform windows). NULL falls back to the Content Type's value, then to a built-in default.` }),
|
|
53491
|
+
MaxLength(100),
|
|
53492
|
+
__metadata("design:type", String)
|
|
53493
|
+
], MJContentSource_.prototype, "SegmenterKey", void 0);
|
|
53494
|
+
__decorate([
|
|
53495
|
+
Field({ nullable: true, description: `Registration key of the content-cleaning strategy applied to this source before segmentation — for example Html (CSS-selector-driven extraction that drops navigation, sidebars, and advertising) or PlainText (whitespace normalization only). Cleaning is separate from segmentation because the two change for different reasons: a new site template needs new selectors, not a new chunking strategy. NULL falls back to the Content Type's value, then to a default inferred from the content's mime type.` }),
|
|
53496
|
+
MaxLength(100),
|
|
53497
|
+
__metadata("design:type", String)
|
|
53498
|
+
], MJContentSource_.prototype, "CleanerKey", void 0);
|
|
52357
53499
|
__decorate([
|
|
52358
53500
|
Field(),
|
|
52359
53501
|
MaxLength(255),
|
|
@@ -52471,6 +53613,14 @@ __decorate([
|
|
|
52471
53613
|
Field({ nullable: true }),
|
|
52472
53614
|
__metadata("design:type", String)
|
|
52473
53615
|
], CreateMJContentSourceInput.prototype, "ScheduledActionID", void 0);
|
|
53616
|
+
__decorate([
|
|
53617
|
+
Field({ nullable: true }),
|
|
53618
|
+
__metadata("design:type", String)
|
|
53619
|
+
], CreateMJContentSourceInput.prototype, "SegmenterKey", void 0);
|
|
53620
|
+
__decorate([
|
|
53621
|
+
Field({ nullable: true }),
|
|
53622
|
+
__metadata("design:type", String)
|
|
53623
|
+
], CreateMJContentSourceInput.prototype, "CleanerKey", void 0);
|
|
52474
53624
|
__decorate([
|
|
52475
53625
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
52476
53626
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -52532,6 +53682,14 @@ __decorate([
|
|
|
52532
53682
|
Field({ nullable: true }),
|
|
52533
53683
|
__metadata("design:type", String)
|
|
52534
53684
|
], UpdateMJContentSourceInput.prototype, "ScheduledActionID", void 0);
|
|
53685
|
+
__decorate([
|
|
53686
|
+
Field({ nullable: true }),
|
|
53687
|
+
__metadata("design:type", String)
|
|
53688
|
+
], UpdateMJContentSourceInput.prototype, "SegmenterKey", void 0);
|
|
53689
|
+
__decorate([
|
|
53690
|
+
Field({ nullable: true }),
|
|
53691
|
+
__metadata("design:type", String)
|
|
53692
|
+
], UpdateMJContentSourceInput.prototype, "CleanerKey", void 0);
|
|
52535
53693
|
__decorate([
|
|
52536
53694
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
52537
53695
|
__metadata("design:type", Array)
|
|
@@ -53075,6 +54233,16 @@ __decorate([
|
|
|
53075
54233
|
Field({ nullable: true, description: `JSON configuration blob for content-type-level settings. Conforms to the IContentTypeConfiguration interface. Reserved for future type-wide settings such as default tag taxonomy rules and processing options.` }),
|
|
53076
54234
|
__metadata("design:type", String)
|
|
53077
54235
|
], MJContentType_.prototype, "Configuration", void 0);
|
|
54236
|
+
__decorate([
|
|
54237
|
+
Field({ nullable: true, description: `Default segmentation strategy for content of this type, used when a Content Source does not specify its own SegmenterKey. See ContentSource.SegmenterKey for the available strategies.` }),
|
|
54238
|
+
MaxLength(100),
|
|
54239
|
+
__metadata("design:type", String)
|
|
54240
|
+
], MJContentType_.prototype, "SegmenterKey", void 0);
|
|
54241
|
+
__decorate([
|
|
54242
|
+
Field({ nullable: true, description: `Default content-cleaning strategy for content of this type, used when a Content Source does not specify its own CleanerKey. See ContentSource.CleanerKey.` }),
|
|
54243
|
+
MaxLength(100),
|
|
54244
|
+
__metadata("design:type", String)
|
|
54245
|
+
], MJContentType_.prototype, "CleanerKey", void 0);
|
|
53078
54246
|
__decorate([
|
|
53079
54247
|
Field(),
|
|
53080
54248
|
MaxLength(50),
|
|
@@ -53143,6 +54311,14 @@ __decorate([
|
|
|
53143
54311
|
Field({ nullable: true }),
|
|
53144
54312
|
__metadata("design:type", String)
|
|
53145
54313
|
], CreateMJContentTypeInput.prototype, "Configuration", void 0);
|
|
54314
|
+
__decorate([
|
|
54315
|
+
Field({ nullable: true }),
|
|
54316
|
+
__metadata("design:type", String)
|
|
54317
|
+
], CreateMJContentTypeInput.prototype, "SegmenterKey", void 0);
|
|
54318
|
+
__decorate([
|
|
54319
|
+
Field({ nullable: true }),
|
|
54320
|
+
__metadata("design:type", String)
|
|
54321
|
+
], CreateMJContentTypeInput.prototype, "CleanerKey", void 0);
|
|
53146
54322
|
__decorate([
|
|
53147
54323
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
53148
54324
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -53192,6 +54368,14 @@ __decorate([
|
|
|
53192
54368
|
Field({ nullable: true }),
|
|
53193
54369
|
__metadata("design:type", String)
|
|
53194
54370
|
], UpdateMJContentTypeInput.prototype, "Configuration", void 0);
|
|
54371
|
+
__decorate([
|
|
54372
|
+
Field({ nullable: true }),
|
|
54373
|
+
__metadata("design:type", String)
|
|
54374
|
+
], UpdateMJContentTypeInput.prototype, "SegmenterKey", void 0);
|
|
54375
|
+
__decorate([
|
|
54376
|
+
Field({ nullable: true }),
|
|
54377
|
+
__metadata("design:type", String)
|
|
54378
|
+
], UpdateMJContentTypeInput.prototype, "CleanerKey", void 0);
|
|
53195
54379
|
__decorate([
|
|
53196
54380
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
53197
54381
|
__metadata("design:type", Array)
|
|
@@ -54263,6 +55447,243 @@ MJConversationArtifactResolver = __decorate([
|
|
|
54263
55447
|
], MJConversationArtifactResolver);
|
|
54264
55448
|
export { MJConversationArtifactResolver };
|
|
54265
55449
|
//****************************************************************************
|
|
55450
|
+
// ENTITY CLASS for MJ: Conversation Compaction Runs
|
|
55451
|
+
//****************************************************************************
|
|
55452
|
+
let MJConversationCompactionRun_ = class MJConversationCompactionRun_ {
|
|
55453
|
+
};
|
|
55454
|
+
__decorate([
|
|
55455
|
+
Field(),
|
|
55456
|
+
MaxLength(36),
|
|
55457
|
+
__metadata("design:type", String)
|
|
55458
|
+
], MJConversationCompactionRun_.prototype, "ID", void 0);
|
|
55459
|
+
__decorate([
|
|
55460
|
+
Field({ description: `The conversation detail row whose SummaryOfEarlierConversation was produced by this compaction run.` }),
|
|
55461
|
+
MaxLength(36),
|
|
55462
|
+
__metadata("design:type", String)
|
|
55463
|
+
], MJConversationCompactionRun_.prototype, "ConversationDetailID", void 0);
|
|
55464
|
+
__decorate([
|
|
55465
|
+
Field({ description: `The AI Prompt Run that generated the compaction summary (model, tokens, cost, prompt version).` }),
|
|
55466
|
+
MaxLength(36),
|
|
55467
|
+
__metadata("design:type", String)
|
|
55468
|
+
], MJConversationCompactionRun_.prototype, "PromptRunID", void 0);
|
|
55469
|
+
__decorate([
|
|
55470
|
+
Field(),
|
|
55471
|
+
__metadata("design:type", Date)
|
|
55472
|
+
], MJConversationCompactionRun_.prototype, "_mj__CreatedAt", void 0);
|
|
55473
|
+
__decorate([
|
|
55474
|
+
Field(),
|
|
55475
|
+
__metadata("design:type", Date)
|
|
55476
|
+
], MJConversationCompactionRun_.prototype, "_mj__UpdatedAt", void 0);
|
|
55477
|
+
__decorate([
|
|
55478
|
+
Field({ nullable: true }),
|
|
55479
|
+
MaxLength(100),
|
|
55480
|
+
__metadata("design:type", String)
|
|
55481
|
+
], MJConversationCompactionRun_.prototype, "ConversationDetail", void 0);
|
|
55482
|
+
__decorate([
|
|
55483
|
+
Field({ nullable: true }),
|
|
55484
|
+
MaxLength(255),
|
|
55485
|
+
__metadata("design:type", String)
|
|
55486
|
+
], MJConversationCompactionRun_.prototype, "PromptRun", void 0);
|
|
55487
|
+
MJConversationCompactionRun_ = __decorate([
|
|
55488
|
+
ObjectType({ description: `Links a conversation detail boundary row to the AI Prompt Run that produced its compaction summary. Audit-only join table replacing the former ConversationDetail.SummaryPromptRunID FK to break the CodeGen cycle.` })
|
|
55489
|
+
], MJConversationCompactionRun_);
|
|
55490
|
+
export { MJConversationCompactionRun_ };
|
|
55491
|
+
//****************************************************************************
|
|
55492
|
+
// INPUT TYPE for MJ: Conversation Compaction Runs
|
|
55493
|
+
//****************************************************************************
|
|
55494
|
+
let CreateMJConversationCompactionRunInput = class CreateMJConversationCompactionRunInput {
|
|
55495
|
+
};
|
|
55496
|
+
__decorate([
|
|
55497
|
+
Field({ nullable: true }),
|
|
55498
|
+
__metadata("design:type", String)
|
|
55499
|
+
], CreateMJConversationCompactionRunInput.prototype, "ID", void 0);
|
|
55500
|
+
__decorate([
|
|
55501
|
+
Field({ nullable: true }),
|
|
55502
|
+
__metadata("design:type", String)
|
|
55503
|
+
], CreateMJConversationCompactionRunInput.prototype, "ConversationDetailID", void 0);
|
|
55504
|
+
__decorate([
|
|
55505
|
+
Field({ nullable: true }),
|
|
55506
|
+
__metadata("design:type", String)
|
|
55507
|
+
], CreateMJConversationCompactionRunInput.prototype, "PromptRunID", void 0);
|
|
55508
|
+
__decorate([
|
|
55509
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
55510
|
+
__metadata("design:type", RestoreContextInput)
|
|
55511
|
+
], CreateMJConversationCompactionRunInput.prototype, "RestoreContext___", void 0);
|
|
55512
|
+
CreateMJConversationCompactionRunInput = __decorate([
|
|
55513
|
+
InputType()
|
|
55514
|
+
], CreateMJConversationCompactionRunInput);
|
|
55515
|
+
export { CreateMJConversationCompactionRunInput };
|
|
55516
|
+
//****************************************************************************
|
|
55517
|
+
// INPUT TYPE for MJ: Conversation Compaction Runs
|
|
55518
|
+
//****************************************************************************
|
|
55519
|
+
let UpdateMJConversationCompactionRunInput = class UpdateMJConversationCompactionRunInput {
|
|
55520
|
+
};
|
|
55521
|
+
__decorate([
|
|
55522
|
+
Field(),
|
|
55523
|
+
__metadata("design:type", String)
|
|
55524
|
+
], UpdateMJConversationCompactionRunInput.prototype, "ID", void 0);
|
|
55525
|
+
__decorate([
|
|
55526
|
+
Field({ nullable: true }),
|
|
55527
|
+
__metadata("design:type", String)
|
|
55528
|
+
], UpdateMJConversationCompactionRunInput.prototype, "ConversationDetailID", void 0);
|
|
55529
|
+
__decorate([
|
|
55530
|
+
Field({ nullable: true }),
|
|
55531
|
+
__metadata("design:type", String)
|
|
55532
|
+
], UpdateMJConversationCompactionRunInput.prototype, "PromptRunID", void 0);
|
|
55533
|
+
__decorate([
|
|
55534
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
55535
|
+
__metadata("design:type", Array)
|
|
55536
|
+
], UpdateMJConversationCompactionRunInput.prototype, "OldValues___", void 0);
|
|
55537
|
+
__decorate([
|
|
55538
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
55539
|
+
__metadata("design:type", RestoreContextInput)
|
|
55540
|
+
], UpdateMJConversationCompactionRunInput.prototype, "RestoreContext___", void 0);
|
|
55541
|
+
UpdateMJConversationCompactionRunInput = __decorate([
|
|
55542
|
+
InputType()
|
|
55543
|
+
], UpdateMJConversationCompactionRunInput);
|
|
55544
|
+
export { UpdateMJConversationCompactionRunInput };
|
|
55545
|
+
//****************************************************************************
|
|
55546
|
+
// RESOLVER for MJ: Conversation Compaction Runs
|
|
55547
|
+
//****************************************************************************
|
|
55548
|
+
let RunMJConversationCompactionRunViewResult = class RunMJConversationCompactionRunViewResult {
|
|
55549
|
+
};
|
|
55550
|
+
__decorate([
|
|
55551
|
+
Field(() => [MJConversationCompactionRun_]),
|
|
55552
|
+
__metadata("design:type", Array)
|
|
55553
|
+
], RunMJConversationCompactionRunViewResult.prototype, "Results", void 0);
|
|
55554
|
+
__decorate([
|
|
55555
|
+
Field(() => String, { nullable: true }),
|
|
55556
|
+
__metadata("design:type", String)
|
|
55557
|
+
], RunMJConversationCompactionRunViewResult.prototype, "UserViewRunID", void 0);
|
|
55558
|
+
__decorate([
|
|
55559
|
+
Field(() => Int, { nullable: true }),
|
|
55560
|
+
__metadata("design:type", Number)
|
|
55561
|
+
], RunMJConversationCompactionRunViewResult.prototype, "RowCount", void 0);
|
|
55562
|
+
__decorate([
|
|
55563
|
+
Field(() => Int, { nullable: true }),
|
|
55564
|
+
__metadata("design:type", Number)
|
|
55565
|
+
], RunMJConversationCompactionRunViewResult.prototype, "TotalRowCount", void 0);
|
|
55566
|
+
__decorate([
|
|
55567
|
+
Field(() => Int, { nullable: true }),
|
|
55568
|
+
__metadata("design:type", Number)
|
|
55569
|
+
], RunMJConversationCompactionRunViewResult.prototype, "ExecutionTime", void 0);
|
|
55570
|
+
__decorate([
|
|
55571
|
+
Field({ nullable: true }),
|
|
55572
|
+
__metadata("design:type", String)
|
|
55573
|
+
], RunMJConversationCompactionRunViewResult.prototype, "ErrorMessage", void 0);
|
|
55574
|
+
__decorate([
|
|
55575
|
+
Field(() => Boolean, { nullable: false }),
|
|
55576
|
+
__metadata("design:type", Boolean)
|
|
55577
|
+
], RunMJConversationCompactionRunViewResult.prototype, "Success", void 0);
|
|
55578
|
+
RunMJConversationCompactionRunViewResult = __decorate([
|
|
55579
|
+
ObjectType()
|
|
55580
|
+
], RunMJConversationCompactionRunViewResult);
|
|
55581
|
+
export { RunMJConversationCompactionRunViewResult };
|
|
55582
|
+
let MJConversationCompactionRunResolver = class MJConversationCompactionRunResolver extends ResolverBase {
|
|
55583
|
+
async RunMJConversationCompactionRunViewByID(input, { providers, userPayload }, pubSub) {
|
|
55584
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
55585
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
55586
|
+
}
|
|
55587
|
+
async RunMJConversationCompactionRunViewByName(input, { providers, userPayload }, pubSub) {
|
|
55588
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
55589
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
55590
|
+
}
|
|
55591
|
+
async RunMJConversationCompactionRunDynamicView(input, { providers, userPayload }, pubSub) {
|
|
55592
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
55593
|
+
input.EntityName = 'MJ: Conversation Compaction Runs';
|
|
55594
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
55595
|
+
}
|
|
55596
|
+
async MJConversationCompactionRun(ID, { userPayload, providers }, pubSub) {
|
|
55597
|
+
this.CheckUserReadPermissions('MJ: Conversation Compaction Runs', userPayload);
|
|
55598
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
55599
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationCompactionRuns')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Compaction Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
55600
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
55601
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Conversation Compaction Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
55602
|
+
return result;
|
|
55603
|
+
}
|
|
55604
|
+
async CreateMJConversationCompactionRun(input, { providers, userPayload }, pubSub) {
|
|
55605
|
+
const provider = GetReadWriteProvider(providers);
|
|
55606
|
+
return this.CreateRecord('MJ: Conversation Compaction Runs', input, provider, userPayload, pubSub);
|
|
55607
|
+
}
|
|
55608
|
+
async UpdateMJConversationCompactionRun(input, { providers, userPayload }, pubSub) {
|
|
55609
|
+
const provider = GetReadWriteProvider(providers);
|
|
55610
|
+
return this.UpdateRecord('MJ: Conversation Compaction Runs', input, provider, userPayload, pubSub);
|
|
55611
|
+
}
|
|
55612
|
+
async DeleteMJConversationCompactionRun(ID, options, { providers, userPayload }, pubSub) {
|
|
55613
|
+
const provider = GetReadWriteProvider(providers);
|
|
55614
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
55615
|
+
return this.DeleteRecord('MJ: Conversation Compaction Runs', key, options, provider, userPayload, pubSub);
|
|
55616
|
+
}
|
|
55617
|
+
};
|
|
55618
|
+
__decorate([
|
|
55619
|
+
Query(() => RunMJConversationCompactionRunViewResult),
|
|
55620
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
55621
|
+
__param(1, Ctx()),
|
|
55622
|
+
__param(2, PubSub()),
|
|
55623
|
+
__metadata("design:type", Function),
|
|
55624
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
55625
|
+
__metadata("design:returntype", Promise)
|
|
55626
|
+
], MJConversationCompactionRunResolver.prototype, "RunMJConversationCompactionRunViewByID", null);
|
|
55627
|
+
__decorate([
|
|
55628
|
+
Query(() => RunMJConversationCompactionRunViewResult),
|
|
55629
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
55630
|
+
__param(1, Ctx()),
|
|
55631
|
+
__param(2, PubSub()),
|
|
55632
|
+
__metadata("design:type", Function),
|
|
55633
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
55634
|
+
__metadata("design:returntype", Promise)
|
|
55635
|
+
], MJConversationCompactionRunResolver.prototype, "RunMJConversationCompactionRunViewByName", null);
|
|
55636
|
+
__decorate([
|
|
55637
|
+
Query(() => RunMJConversationCompactionRunViewResult),
|
|
55638
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
55639
|
+
__param(1, Ctx()),
|
|
55640
|
+
__param(2, PubSub()),
|
|
55641
|
+
__metadata("design:type", Function),
|
|
55642
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
55643
|
+
__metadata("design:returntype", Promise)
|
|
55644
|
+
], MJConversationCompactionRunResolver.prototype, "RunMJConversationCompactionRunDynamicView", null);
|
|
55645
|
+
__decorate([
|
|
55646
|
+
Query(() => MJConversationCompactionRun_, { nullable: true }),
|
|
55647
|
+
__param(0, Arg('ID', () => String)),
|
|
55648
|
+
__param(1, Ctx()),
|
|
55649
|
+
__param(2, PubSub()),
|
|
55650
|
+
__metadata("design:type", Function),
|
|
55651
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
55652
|
+
__metadata("design:returntype", Promise)
|
|
55653
|
+
], MJConversationCompactionRunResolver.prototype, "MJConversationCompactionRun", null);
|
|
55654
|
+
__decorate([
|
|
55655
|
+
Mutation(() => MJConversationCompactionRun_),
|
|
55656
|
+
__param(0, Arg('input', () => CreateMJConversationCompactionRunInput)),
|
|
55657
|
+
__param(1, Ctx()),
|
|
55658
|
+
__param(2, PubSub()),
|
|
55659
|
+
__metadata("design:type", Function),
|
|
55660
|
+
__metadata("design:paramtypes", [CreateMJConversationCompactionRunInput, Object, PubSubEngine]),
|
|
55661
|
+
__metadata("design:returntype", Promise)
|
|
55662
|
+
], MJConversationCompactionRunResolver.prototype, "CreateMJConversationCompactionRun", null);
|
|
55663
|
+
__decorate([
|
|
55664
|
+
Mutation(() => MJConversationCompactionRun_),
|
|
55665
|
+
__param(0, Arg('input', () => UpdateMJConversationCompactionRunInput)),
|
|
55666
|
+
__param(1, Ctx()),
|
|
55667
|
+
__param(2, PubSub()),
|
|
55668
|
+
__metadata("design:type", Function),
|
|
55669
|
+
__metadata("design:paramtypes", [UpdateMJConversationCompactionRunInput, Object, PubSubEngine]),
|
|
55670
|
+
__metadata("design:returntype", Promise)
|
|
55671
|
+
], MJConversationCompactionRunResolver.prototype, "UpdateMJConversationCompactionRun", null);
|
|
55672
|
+
__decorate([
|
|
55673
|
+
Mutation(() => MJConversationCompactionRun_),
|
|
55674
|
+
__param(0, Arg('ID', () => String)),
|
|
55675
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
55676
|
+
__param(2, Ctx()),
|
|
55677
|
+
__param(3, PubSub()),
|
|
55678
|
+
__metadata("design:type", Function),
|
|
55679
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
55680
|
+
__metadata("design:returntype", Promise)
|
|
55681
|
+
], MJConversationCompactionRunResolver.prototype, "DeleteMJConversationCompactionRun", null);
|
|
55682
|
+
MJConversationCompactionRunResolver = __decorate([
|
|
55683
|
+
Resolver(MJConversationCompactionRun_)
|
|
55684
|
+
], MJConversationCompactionRunResolver);
|
|
55685
|
+
export { MJConversationCompactionRunResolver };
|
|
55686
|
+
//****************************************************************************
|
|
54266
55687
|
// ENTITY CLASS for MJ: Conversation Detail Artifacts
|
|
54267
55688
|
//****************************************************************************
|
|
54268
55689
|
let MJConversationDetailArtifact_ = class MJConversationDetailArtifact_ {
|
|
@@ -55314,6 +56735,10 @@ __decorate([
|
|
|
55314
56735
|
MaxLength(20),
|
|
55315
56736
|
__metadata("design:type", String)
|
|
55316
56737
|
], MJConversationDetail_.prototype, "MediaType", void 0);
|
|
56738
|
+
__decorate([
|
|
56739
|
+
Field(() => Int, { description: `Monotonic, per-conversation ordinal assigned on insert (1-based). Provides a stable symbolic handle used by conversation-history retrieval tools and by the sequence markers embedded in compaction summaries. A summary stored in SummaryOfEarlierConversation on a given row covers all rows with a lower Sequence in the same conversation.` }),
|
|
56740
|
+
__metadata("design:type", Number)
|
|
56741
|
+
], MJConversationDetail_.prototype, "Sequence", void 0);
|
|
55317
56742
|
__decorate([
|
|
55318
56743
|
Field({ nullable: true }),
|
|
55319
56744
|
MaxLength(255),
|
|
@@ -55390,6 +56815,10 @@ __decorate([
|
|
|
55390
56815
|
Field(() => [MJTask_]),
|
|
55391
56816
|
__metadata("design:type", Array)
|
|
55392
56817
|
], MJConversationDetail_.prototype, "MJTasks_ConversationDetailIDArray", void 0);
|
|
56818
|
+
__decorate([
|
|
56819
|
+
Field(() => [MJConversationCompactionRun_]),
|
|
56820
|
+
__metadata("design:type", Array)
|
|
56821
|
+
], MJConversationDetail_.prototype, "MJConversationCompactionRuns_ConversationDetailIDArray", void 0);
|
|
55393
56822
|
MJConversationDetail_ = __decorate([
|
|
55394
56823
|
ObjectType({ description: `Stores individual messages, responses, and interactions within a conversation, maintaining the complete dialogue history with timestamps.` })
|
|
55395
56824
|
], MJConversationDetail_);
|
|
@@ -55795,6 +57224,14 @@ let MJConversationDetailResolver = class MJConversationDetailResolver extends Re
|
|
|
55795
57224
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows, this.GetUserFromPayload(userPayload));
|
|
55796
57225
|
return result;
|
|
55797
57226
|
}
|
|
57227
|
+
async MJConversationCompactionRuns_ConversationDetailIDArray(mjconversationdetail_, { userPayload, providers }, pubSub) {
|
|
57228
|
+
this.CheckUserReadPermissions('MJ: Conversation Compaction Runs', userPayload);
|
|
57229
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57230
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationCompactionRuns')} WHERE ${provider.QuoteIdentifier('ConversationDetailID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Compaction Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
57231
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjconversationdetail_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
57232
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Compaction Runs', rows, this.GetUserFromPayload(userPayload));
|
|
57233
|
+
return result;
|
|
57234
|
+
}
|
|
55798
57235
|
async CreateMJConversationDetail(input, { providers, userPayload }, pubSub) {
|
|
55799
57236
|
const provider = GetReadWriteProvider(providers);
|
|
55800
57237
|
return this.CreateRecord('MJ: Conversation Details', input, provider, userPayload, pubSub);
|
|
@@ -55926,6 +57363,15 @@ __decorate([
|
|
|
55926
57363
|
__metadata("design:paramtypes", [MJConversationDetail_, Object, PubSubEngine]),
|
|
55927
57364
|
__metadata("design:returntype", Promise)
|
|
55928
57365
|
], MJConversationDetailResolver.prototype, "MJTasks_ConversationDetailIDArray", null);
|
|
57366
|
+
__decorate([
|
|
57367
|
+
FieldResolver(() => [MJConversationCompactionRun_]),
|
|
57368
|
+
__param(0, Root()),
|
|
57369
|
+
__param(1, Ctx()),
|
|
57370
|
+
__param(2, PubSub()),
|
|
57371
|
+
__metadata("design:type", Function),
|
|
57372
|
+
__metadata("design:paramtypes", [MJConversationDetail_, Object, PubSubEngine]),
|
|
57373
|
+
__metadata("design:returntype", Promise)
|
|
57374
|
+
], MJConversationDetailResolver.prototype, "MJConversationCompactionRuns_ConversationDetailIDArray", null);
|
|
55929
57375
|
__decorate([
|
|
55930
57376
|
Mutation(() => MJConversationDetail_),
|
|
55931
57377
|
__param(0, Arg('input', () => CreateMJConversationDetailInput)),
|
|
@@ -95745,6 +97191,16 @@ __decorate([
|
|
|
95745
97191
|
MaxLength(500),
|
|
95746
97192
|
__metadata("design:type", String)
|
|
95747
97193
|
], MJOpenApp_.prototype, "Subpath", void 0);
|
|
97194
|
+
__decorate([
|
|
97195
|
+
Field({ nullable: true, description: `The last install/upgrade/remove step that completed successfully for this app while Status is Installing, Upgrading, or Removing. Used to resume a crashed or failed operation from the correct point instead of restarting it entirely. Cleared (NULL) once the operation reaches a terminal state (Active/Disabled/Removed/Error).` }),
|
|
97196
|
+
MaxLength(50),
|
|
97197
|
+
__metadata("design:type", String)
|
|
97198
|
+
], MJOpenApp_.prototype, "LastCompletedStep", void 0);
|
|
97199
|
+
__decorate([
|
|
97200
|
+
Field({ nullable: true, description: `The version this app was being upgraded TO when LastCompletedStep was last written, for Upgrade only. A resume only trusts LastCompletedStep when this matches the version currently being requested — otherwise a checkpoint from an interrupted upgrade to a different version could wrongly skip steps for the new target. Cleared alongside LastCompletedStep.` }),
|
|
97201
|
+
MaxLength(20),
|
|
97202
|
+
__metadata("design:type", String)
|
|
97203
|
+
], MJOpenApp_.prototype, "LastCompletedStepTargetVersion", void 0);
|
|
95748
97204
|
__decorate([
|
|
95749
97205
|
Field(),
|
|
95750
97206
|
MaxLength(100),
|
|
@@ -95847,6 +97303,14 @@ __decorate([
|
|
|
95847
97303
|
Field({ nullable: true }),
|
|
95848
97304
|
__metadata("design:type", String)
|
|
95849
97305
|
], CreateMJOpenAppInput.prototype, "Subpath", void 0);
|
|
97306
|
+
__decorate([
|
|
97307
|
+
Field({ nullable: true }),
|
|
97308
|
+
__metadata("design:type", String)
|
|
97309
|
+
], CreateMJOpenAppInput.prototype, "LastCompletedStep", void 0);
|
|
97310
|
+
__decorate([
|
|
97311
|
+
Field({ nullable: true }),
|
|
97312
|
+
__metadata("design:type", String)
|
|
97313
|
+
], CreateMJOpenAppInput.prototype, "LastCompletedStepTargetVersion", void 0);
|
|
95850
97314
|
__decorate([
|
|
95851
97315
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
95852
97316
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -95936,6 +97400,14 @@ __decorate([
|
|
|
95936
97400
|
Field({ nullable: true }),
|
|
95937
97401
|
__metadata("design:type", String)
|
|
95938
97402
|
], UpdateMJOpenAppInput.prototype, "Subpath", void 0);
|
|
97403
|
+
__decorate([
|
|
97404
|
+
Field({ nullable: true }),
|
|
97405
|
+
__metadata("design:type", String)
|
|
97406
|
+
], UpdateMJOpenAppInput.prototype, "LastCompletedStep", void 0);
|
|
97407
|
+
__decorate([
|
|
97408
|
+
Field({ nullable: true }),
|
|
97409
|
+
__metadata("design:type", String)
|
|
97410
|
+
], UpdateMJOpenAppInput.prototype, "LastCompletedStepTargetVersion", void 0);
|
|
95939
97411
|
__decorate([
|
|
95940
97412
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
95941
97413
|
__metadata("design:type", Array)
|
|
@@ -114564,6 +116036,20 @@ __decorate([
|
|
|
114564
116036
|
Field(),
|
|
114565
116037
|
__metadata("design:type", Date)
|
|
114566
116038
|
], MJSearchExecutionLog_.prototype, "_mj__UpdatedAt", void 0);
|
|
116039
|
+
__decorate([
|
|
116040
|
+
Field({ nullable: true, description: `The AI Skill on whose behalf this search ran, or NULL for a search with no active skill. Mirrors AIAgentID: since a skill is a search principal in its own right (AISkill.SearchScopeAccess plus MJ: AI Skill Search Scopes rows can reach a scope the user's own roles do not grant), the log must record which skill was active or the entitlement decision cannot be reconstructed.` }),
|
|
116041
|
+
MaxLength(36),
|
|
116042
|
+
__metadata("design:type", String)
|
|
116043
|
+
], MJSearchExecutionLog_.prototype, "AISkillID", void 0);
|
|
116044
|
+
__decorate([
|
|
116045
|
+
Field({ nullable: true, description: `The tenant this search ran for, taken from SearchContext.PrimaryScopeRecordID. Lets a multi-tenant deployment partition, filter and retain search audit history per customer. NULL for untenanted searches. Named for the existing primary-scope concept rather than OrganizationID because a scope's primary scope may be a Company, Client or Practice.` }),
|
|
116046
|
+
MaxLength(36),
|
|
116047
|
+
__metadata("design:type", String)
|
|
116048
|
+
], MJSearchExecutionLog_.prototype, "PrimaryScopeRecordID", void 0);
|
|
116049
|
+
__decorate([
|
|
116050
|
+
Field({ nullable: true, description: `Serialized ScopeExplanation recording WHY this search could reach what it reached: the entitlement decision and the grant that produced it, every dimension with its provenance (CallerSupplied / ServerDerived / Default / DiscardedCaller / Absent), and each lane's rendered filter with its active-or-skipped status and reason. Identical in shape to the value returned by SearchEngine.ExplainScope(), so the dry-run an administrator previews before running a search is the same structure the audit log stores afterwards. NULL when the engine did not capture a decision (older writers, or a failure before scope resolution).` }),
|
|
116051
|
+
__metadata("design:type", String)
|
|
116052
|
+
], MJSearchExecutionLog_.prototype, "ScopeDecisionJSON", void 0);
|
|
114567
116053
|
__decorate([
|
|
114568
116054
|
Field({ nullable: true }),
|
|
114569
116055
|
MaxLength(200),
|
|
@@ -114579,6 +116065,11 @@ __decorate([
|
|
|
114579
116065
|
MaxLength(255),
|
|
114580
116066
|
__metadata("design:type", String)
|
|
114581
116067
|
], MJSearchExecutionLog_.prototype, "AIAgent", void 0);
|
|
116068
|
+
__decorate([
|
|
116069
|
+
Field({ nullable: true }),
|
|
116070
|
+
MaxLength(255),
|
|
116071
|
+
__metadata("design:type", String)
|
|
116072
|
+
], MJSearchExecutionLog_.prototype, "AISkill", void 0);
|
|
114582
116073
|
MJSearchExecutionLog_ = __decorate([
|
|
114583
116074
|
ObjectType({ description: `One row per SearchEngine.search invocation. Populated by SearchEngine\'s post-fusion logging hook (Phase 3.2). Read by the Knowledge Hub Search Analytics dashboard (Phase 3.3) and the per-scope tuning CSV export (Phase 3.4).` })
|
|
114584
116075
|
], MJSearchExecutionLog_);
|
|
@@ -114636,6 +116127,18 @@ __decorate([
|
|
|
114636
116127
|
Field({ nullable: true }),
|
|
114637
116128
|
__metadata("design:type", String)
|
|
114638
116129
|
], CreateMJSearchExecutionLogInput.prototype, "ProvidersJSON", void 0);
|
|
116130
|
+
__decorate([
|
|
116131
|
+
Field({ nullable: true }),
|
|
116132
|
+
__metadata("design:type", String)
|
|
116133
|
+
], CreateMJSearchExecutionLogInput.prototype, "AISkillID", void 0);
|
|
116134
|
+
__decorate([
|
|
116135
|
+
Field({ nullable: true }),
|
|
116136
|
+
__metadata("design:type", String)
|
|
116137
|
+
], CreateMJSearchExecutionLogInput.prototype, "PrimaryScopeRecordID", void 0);
|
|
116138
|
+
__decorate([
|
|
116139
|
+
Field({ nullable: true }),
|
|
116140
|
+
__metadata("design:type", String)
|
|
116141
|
+
], CreateMJSearchExecutionLogInput.prototype, "ScopeDecisionJSON", void 0);
|
|
114639
116142
|
__decorate([
|
|
114640
116143
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
114641
116144
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -114697,6 +116200,18 @@ __decorate([
|
|
|
114697
116200
|
Field({ nullable: true }),
|
|
114698
116201
|
__metadata("design:type", String)
|
|
114699
116202
|
], UpdateMJSearchExecutionLogInput.prototype, "ProvidersJSON", void 0);
|
|
116203
|
+
__decorate([
|
|
116204
|
+
Field({ nullable: true }),
|
|
116205
|
+
__metadata("design:type", String)
|
|
116206
|
+
], UpdateMJSearchExecutionLogInput.prototype, "AISkillID", void 0);
|
|
116207
|
+
__decorate([
|
|
116208
|
+
Field({ nullable: true }),
|
|
116209
|
+
__metadata("design:type", String)
|
|
116210
|
+
], UpdateMJSearchExecutionLogInput.prototype, "PrimaryScopeRecordID", void 0);
|
|
116211
|
+
__decorate([
|
|
116212
|
+
Field({ nullable: true }),
|
|
116213
|
+
__metadata("design:type", String)
|
|
116214
|
+
], UpdateMJSearchExecutionLogInput.prototype, "ScopeDecisionJSON", void 0);
|
|
114700
116215
|
__decorate([
|
|
114701
116216
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
114702
116217
|
__metadata("design:type", Array)
|
|
@@ -115263,6 +116778,10 @@ __decorate([
|
|
|
115263
116778
|
Field(),
|
|
115264
116779
|
__metadata("design:type", Date)
|
|
115265
116780
|
], MJSearchScopeEntity_.prototype, "_mj__UpdatedAt", void 0);
|
|
116781
|
+
__decorate([
|
|
116782
|
+
Field({ nullable: true, description: `JSON array of column or alias names the rendered ExtraFilter MUST reference for this lane to be considered safe, e.g. ["OrganizationID","ContentSourceID"]. Checked against the RENDERED filter at search time: if one is missing the lane is SKIPPED rather than queried, because a partially-rendered filter (an {% if %} clause dropped when its dimension was absent or discarded) is still valid SQL and silently widens the search. Same concept and same engine check as SearchScopeExternalIndex.RequiredMetadataKeys, applied to the SQL lane. NULL = no contract declared, which is the pre-migration behaviour.` }),
|
|
116783
|
+
__metadata("design:type", String)
|
|
116784
|
+
], MJSearchScopeEntity_.prototype, "RequiredMetadataKeys", void 0);
|
|
115266
116785
|
__decorate([
|
|
115267
116786
|
Field(),
|
|
115268
116787
|
MaxLength(200),
|
|
@@ -115302,6 +116821,10 @@ __decorate([
|
|
|
115302
116821
|
Field({ nullable: true }),
|
|
115303
116822
|
__metadata("design:type", String)
|
|
115304
116823
|
], CreateMJSearchScopeEntityInput.prototype, "UserSearchString", void 0);
|
|
116824
|
+
__decorate([
|
|
116825
|
+
Field({ nullable: true }),
|
|
116826
|
+
__metadata("design:type", String)
|
|
116827
|
+
], CreateMJSearchScopeEntityInput.prototype, "RequiredMetadataKeys", void 0);
|
|
115305
116828
|
__decorate([
|
|
115306
116829
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
115307
116830
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -115335,6 +116858,10 @@ __decorate([
|
|
|
115335
116858
|
Field({ nullable: true }),
|
|
115336
116859
|
__metadata("design:type", String)
|
|
115337
116860
|
], UpdateMJSearchScopeEntityInput.prototype, "UserSearchString", void 0);
|
|
116861
|
+
__decorate([
|
|
116862
|
+
Field({ nullable: true }),
|
|
116863
|
+
__metadata("design:type", String)
|
|
116864
|
+
], UpdateMJSearchScopeEntityInput.prototype, "RequiredMetadataKeys", void 0);
|
|
115338
116865
|
__decorate([
|
|
115339
116866
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
115340
116867
|
__metadata("design:type", Array)
|
|
@@ -115534,6 +117061,10 @@ __decorate([
|
|
|
115534
117061
|
Field(),
|
|
115535
117062
|
__metadata("design:type", Date)
|
|
115536
117063
|
], MJSearchScopeExternalIndex_.prototype, "_mj__UpdatedAt", void 0);
|
|
117064
|
+
__decorate([
|
|
117065
|
+
Field({ nullable: true, description: `JSON array of metadata key names the rendered MetadataFilter MUST constrain on for this lane to be considered safe, e.g. ["OrganizationID","ContentSourceID"]. Checked against the RENDERED filter at search time: if a key is missing the lane is SKIPPED rather than queried, because a partially-rendered filter silently widens the search. This also documents the ingest contract — these are the labels the writer must stamp on every document in the index, since a filter on a key that was never written either matches nothing or (on providers that ignore unknown keys) matches everything. NULL = no contract declared, which is the pre-migration behaviour.` }),
|
|
117066
|
+
__metadata("design:type", String)
|
|
117067
|
+
], MJSearchScopeExternalIndex_.prototype, "RequiredMetadataKeys", void 0);
|
|
115537
117068
|
__decorate([
|
|
115538
117069
|
Field(),
|
|
115539
117070
|
MaxLength(200),
|
|
@@ -115581,6 +117112,10 @@ __decorate([
|
|
|
115581
117112
|
Field({ nullable: true }),
|
|
115582
117113
|
__metadata("design:type", String)
|
|
115583
117114
|
], CreateMJSearchScopeExternalIndexInput.prototype, "MetadataFilter", void 0);
|
|
117115
|
+
__decorate([
|
|
117116
|
+
Field({ nullable: true }),
|
|
117117
|
+
__metadata("design:type", String)
|
|
117118
|
+
], CreateMJSearchScopeExternalIndexInput.prototype, "RequiredMetadataKeys", void 0);
|
|
115584
117119
|
__decorate([
|
|
115585
117120
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
115586
117121
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -115622,6 +117157,10 @@ __decorate([
|
|
|
115622
117157
|
Field({ nullable: true }),
|
|
115623
117158
|
__metadata("design:type", String)
|
|
115624
117159
|
], UpdateMJSearchScopeExternalIndexInput.prototype, "MetadataFilter", void 0);
|
|
117160
|
+
__decorate([
|
|
117161
|
+
Field({ nullable: true }),
|
|
117162
|
+
__metadata("design:type", String)
|
|
117163
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "RequiredMetadataKeys", void 0);
|
|
115625
117164
|
__decorate([
|
|
115626
117165
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
115627
117166
|
__metadata("design:type", Array)
|
|
@@ -115813,6 +117352,19 @@ __decorate([
|
|
|
115813
117352
|
Field(),
|
|
115814
117353
|
__metadata("design:type", Date)
|
|
115815
117354
|
], MJSearchScopePermission_.prototype, "_mj__UpdatedAt", void 0);
|
|
117355
|
+
__decorate([
|
|
117356
|
+
Field({ nullable: true, description: `Optional start of the window in which this grant applies. NULL = no lower bound. SearchScopePermission was the only member of this family without a time window, so temporary grants previously needed a bespoke mechanism.` }),
|
|
117357
|
+
__metadata("design:type", Date)
|
|
117358
|
+
], MJSearchScopePermission_.prototype, "StartAt", void 0);
|
|
117359
|
+
__decorate([
|
|
117360
|
+
Field({ nullable: true, description: `Optional end of the window in which this grant applies. NULL = no upper bound.` }),
|
|
117361
|
+
__metadata("design:type", Date)
|
|
117362
|
+
], MJSearchScopePermission_.prototype, "EndAt", void 0);
|
|
117363
|
+
__decorate([
|
|
117364
|
+
Field({ nullable: true, description: `Optional tenant this grant is limited to, matched against SearchContext.PrimaryScopeRecordID at search time and type-checkable against the scope's own PrimaryScopeEntityID. NULL = applies to every tenant, which is the pre-migration behaviour for all existing rows. Deliberately NOT called OrganizationID: MJ is domain-agnostic and a scope's primary scope may be a Company, Client or Practice, so this reuses the existing primary-scope concept rather than inventing a parallel tenancy column.` }),
|
|
117365
|
+
MaxLength(36),
|
|
117366
|
+
__metadata("design:type", String)
|
|
117367
|
+
], MJSearchScopePermission_.prototype, "PrimaryScopeRecordID", void 0);
|
|
115816
117368
|
__decorate([
|
|
115817
117369
|
Field(),
|
|
115818
117370
|
MaxLength(200),
|
|
@@ -115857,6 +117409,18 @@ __decorate([
|
|
|
115857
117409
|
Field({ nullable: true }),
|
|
115858
117410
|
__metadata("design:type", String)
|
|
115859
117411
|
], CreateMJSearchScopePermissionInput.prototype, "PermissionLevel", void 0);
|
|
117412
|
+
__decorate([
|
|
117413
|
+
Field({ nullable: true }),
|
|
117414
|
+
__metadata("design:type", Date)
|
|
117415
|
+
], CreateMJSearchScopePermissionInput.prototype, "StartAt", void 0);
|
|
117416
|
+
__decorate([
|
|
117417
|
+
Field({ nullable: true }),
|
|
117418
|
+
__metadata("design:type", Date)
|
|
117419
|
+
], CreateMJSearchScopePermissionInput.prototype, "EndAt", void 0);
|
|
117420
|
+
__decorate([
|
|
117421
|
+
Field({ nullable: true }),
|
|
117422
|
+
__metadata("design:type", String)
|
|
117423
|
+
], CreateMJSearchScopePermissionInput.prototype, "PrimaryScopeRecordID", void 0);
|
|
115860
117424
|
__decorate([
|
|
115861
117425
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
115862
117426
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -115890,6 +117454,18 @@ __decorate([
|
|
|
115890
117454
|
Field({ nullable: true }),
|
|
115891
117455
|
__metadata("design:type", String)
|
|
115892
117456
|
], UpdateMJSearchScopePermissionInput.prototype, "PermissionLevel", void 0);
|
|
117457
|
+
__decorate([
|
|
117458
|
+
Field({ nullable: true }),
|
|
117459
|
+
__metadata("design:type", Date)
|
|
117460
|
+
], UpdateMJSearchScopePermissionInput.prototype, "StartAt", void 0);
|
|
117461
|
+
__decorate([
|
|
117462
|
+
Field({ nullable: true }),
|
|
117463
|
+
__metadata("design:type", Date)
|
|
117464
|
+
], UpdateMJSearchScopePermissionInput.prototype, "EndAt", void 0);
|
|
117465
|
+
__decorate([
|
|
117466
|
+
Field({ nullable: true }),
|
|
117467
|
+
__metadata("design:type", String)
|
|
117468
|
+
], UpdateMJSearchScopePermissionInput.prototype, "PrimaryScopeRecordID", void 0);
|
|
115893
117469
|
__decorate([
|
|
115894
117470
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
115895
117471
|
__metadata("design:type", Array)
|
|
@@ -116973,6 +118549,10 @@ __decorate([
|
|
|
116973
118549
|
Field(() => [MJSearchExecutionLog_]),
|
|
116974
118550
|
__metadata("design:type", Array)
|
|
116975
118551
|
], MJSearchScope_.prototype, "MJSearchExecutionLogs_SearchScopeIDArray", void 0);
|
|
118552
|
+
__decorate([
|
|
118553
|
+
Field(() => [MJAISkillSearchScope_]),
|
|
118554
|
+
__metadata("design:type", Array)
|
|
118555
|
+
], MJSearchScope_.prototype, "MJAISkillSearchScopes_SearchScopeIDArray", void 0);
|
|
116976
118556
|
MJSearchScope_ = __decorate([
|
|
116977
118557
|
ObjectType({ description: `A named, reusable boundary defining WHICH content participates in a search (providers, external indexes, entities, storage accounts). Combined with a runtime SearchContext, it enables multi-tenant, permission-aware, agent-friendly retrieval. See plans/search-scopes-rag-plus.md.` })
|
|
116978
118558
|
], MJSearchScope_);
|
|
@@ -117234,6 +118814,14 @@ let MJSearchScopeResolver = class MJSearchScopeResolver extends ResolverBase {
|
|
|
117234
118814
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Execution Logs', rows, this.GetUserFromPayload(userPayload));
|
|
117235
118815
|
return result;
|
|
117236
118816
|
}
|
|
118817
|
+
async MJAISkillSearchScopes_SearchScopeIDArray(mjsearchscope_, { userPayload, providers }, pubSub) {
|
|
118818
|
+
this.CheckUserReadPermissions('MJ: AI Skill Search Scopes', userPayload);
|
|
118819
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
118820
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAISkillSearchScopes')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Skill Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
118821
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjsearchscope_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
118822
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Skill Search Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
118823
|
+
return result;
|
|
118824
|
+
}
|
|
117237
118825
|
async CreateMJSearchScope(input, { providers, userPayload }, pubSub) {
|
|
117238
118826
|
const provider = GetReadWriteProvider(providers);
|
|
117239
118827
|
return this.CreateRecord('MJ: Search Scopes', input, provider, userPayload, pubSub);
|
|
@@ -117356,6 +118944,15 @@ __decorate([
|
|
|
117356
118944
|
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
117357
118945
|
__metadata("design:returntype", Promise)
|
|
117358
118946
|
], MJSearchScopeResolver.prototype, "MJSearchExecutionLogs_SearchScopeIDArray", null);
|
|
118947
|
+
__decorate([
|
|
118948
|
+
FieldResolver(() => [MJAISkillSearchScope_]),
|
|
118949
|
+
__param(0, Root()),
|
|
118950
|
+
__param(1, Ctx()),
|
|
118951
|
+
__param(2, PubSub()),
|
|
118952
|
+
__metadata("design:type", Function),
|
|
118953
|
+
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
118954
|
+
__metadata("design:returntype", Promise)
|
|
118955
|
+
], MJSearchScopeResolver.prototype, "MJAISkillSearchScopes_SearchScopeIDArray", null);
|
|
117359
118956
|
__decorate([
|
|
117360
118957
|
Mutation(() => MJSearchScope_),
|
|
117361
118958
|
__param(0, Arg('input', () => CreateMJSearchScopeInput)),
|
|
@@ -129266,6 +130863,345 @@ MJTestResolver = __decorate([
|
|
|
129266
130863
|
], MJTestResolver);
|
|
129267
130864
|
export { MJTestResolver };
|
|
129268
130865
|
//****************************************************************************
|
|
130866
|
+
// ENTITY CLASS for MJ: Themes
|
|
130867
|
+
//****************************************************************************
|
|
130868
|
+
let MJTheme_ = class MJTheme_ {
|
|
130869
|
+
};
|
|
130870
|
+
__decorate([
|
|
130871
|
+
Field(),
|
|
130872
|
+
MaxLength(36),
|
|
130873
|
+
__metadata("design:type", String)
|
|
130874
|
+
], MJTheme_.prototype, "ID", void 0);
|
|
130875
|
+
__decorate([
|
|
130876
|
+
Field({ description: `Display name for the theme (unique).` }),
|
|
130877
|
+
MaxLength(100),
|
|
130878
|
+
__metadata("design:type", String)
|
|
130879
|
+
], MJTheme_.prototype, "Name", void 0);
|
|
130880
|
+
__decorate([
|
|
130881
|
+
Field({ nullable: true, description: `Optional description of the theme.` }),
|
|
130882
|
+
__metadata("design:type", String)
|
|
130883
|
+
], MJTheme_.prototype, "Description", void 0);
|
|
130884
|
+
__decorate([
|
|
130885
|
+
Field({ description: `Brand seeds as JSON (the ThemeSeeds shape from @memberjunction/theme-engine): primary/accent/tertiary hue anchors, neutralChroma, vibrancy, radius, depth, fontFamily, and an optional vizPalette override. Source of truth — the full token contract is derived from this, not stored.` }),
|
|
130886
|
+
__metadata("design:type", String)
|
|
130887
|
+
], MJTheme_.prototype, "Seeds", void 0);
|
|
130888
|
+
__decorate([
|
|
130889
|
+
Field({ nullable: true, description: `Public URL of the logo mark for light surfaces. Logos are variant uploads, never recolored.` }),
|
|
130890
|
+
MaxLength(1000),
|
|
130891
|
+
__metadata("design:type", String)
|
|
130892
|
+
], MJTheme_.prototype, "LightMarkURL", void 0);
|
|
130893
|
+
__decorate([
|
|
130894
|
+
Field({ nullable: true, description: `Public URL of the logo mark for dark surfaces. Dark mode swaps to this artwork rather than transforming the light mark.` }),
|
|
130895
|
+
MaxLength(1000),
|
|
130896
|
+
__metadata("design:type", String)
|
|
130897
|
+
], MJTheme_.prototype, "DarkMarkURL", void 0);
|
|
130898
|
+
__decorate([
|
|
130899
|
+
Field({ nullable: true, description: `Optional public URL of the full wordmark logo.` }),
|
|
130900
|
+
MaxLength(1000),
|
|
130901
|
+
__metadata("design:type", String)
|
|
130902
|
+
], MJTheme_.prototype, "WordmarkURL", void 0);
|
|
130903
|
+
__decorate([
|
|
130904
|
+
Field({ nullable: true, description: `Optional public URL of a single-fill monochrome logo variant.` }),
|
|
130905
|
+
MaxLength(1000),
|
|
130906
|
+
__metadata("design:type", String)
|
|
130907
|
+
], MJTheme_.prototype, "MonochromeURL", void 0);
|
|
130908
|
+
__decorate([
|
|
130909
|
+
Field(() => Boolean, { description: `When 1, this is the default theme applied when no other is selected. Single-default enforcement is handled at the application layer.` }),
|
|
130910
|
+
__metadata("design:type", Boolean)
|
|
130911
|
+
], MJTheme_.prototype, "IsDefault", void 0);
|
|
130912
|
+
__decorate([
|
|
130913
|
+
Field({ description: `Lifecycle status: Active (available), Inactive (retired), or Draft (in progress, not applied).` }),
|
|
130914
|
+
MaxLength(20),
|
|
130915
|
+
__metadata("design:type", String)
|
|
130916
|
+
], MJTheme_.prototype, "Status", void 0);
|
|
130917
|
+
__decorate([
|
|
130918
|
+
Field({ nullable: true, description: `Optional advanced token overrides as a JSON object mapping a --mj-* CSS custom property name to a value (e.g. {"--mj-brand-primary-hover":"#0a5cff"}). Applied on top of the seed-derived token contract at load, before CustomCSS. Leave null to use the pure derived theme.` }),
|
|
130919
|
+
__metadata("design:type", String)
|
|
130920
|
+
], MJTheme_.prototype, "Overrides", void 0);
|
|
130921
|
+
__decorate([
|
|
130922
|
+
Field({ nullable: true, description: `Optional advanced raw CSS appended to the theme overlay and auto-scoped under [data-theme-overlay="<id>"]. Applied last, after the derived tokens and Overrides. Escape hatch for rules the seed/token model cannot express; leave null for none.` }),
|
|
130923
|
+
__metadata("design:type", String)
|
|
130924
|
+
], MJTheme_.prototype, "CustomCSS", void 0);
|
|
130925
|
+
__decorate([
|
|
130926
|
+
Field(),
|
|
130927
|
+
__metadata("design:type", Date)
|
|
130928
|
+
], MJTheme_.prototype, "_mj__CreatedAt", void 0);
|
|
130929
|
+
__decorate([
|
|
130930
|
+
Field(),
|
|
130931
|
+
__metadata("design:type", Date)
|
|
130932
|
+
], MJTheme_.prototype, "_mj__UpdatedAt", void 0);
|
|
130933
|
+
MJTheme_ = __decorate([
|
|
130934
|
+
ObjectType({ description: `A named brand theme. Stores ~8 brand seeds (color hue anchors, neutral character, vibrancy, shape, depth, type, viz palette) as JSON; the full --mj-* design-token contract is derived from the seeds at load. A theme is a brand — light/dark is the user\'s mode layered under it, so a theme carries no per-mode values.` })
|
|
130935
|
+
], MJTheme_);
|
|
130936
|
+
export { MJTheme_ };
|
|
130937
|
+
//****************************************************************************
|
|
130938
|
+
// INPUT TYPE for MJ: Themes
|
|
130939
|
+
//****************************************************************************
|
|
130940
|
+
let CreateMJThemeInput = class CreateMJThemeInput {
|
|
130941
|
+
};
|
|
130942
|
+
__decorate([
|
|
130943
|
+
Field({ nullable: true }),
|
|
130944
|
+
__metadata("design:type", String)
|
|
130945
|
+
], CreateMJThemeInput.prototype, "ID", void 0);
|
|
130946
|
+
__decorate([
|
|
130947
|
+
Field({ nullable: true }),
|
|
130948
|
+
__metadata("design:type", String)
|
|
130949
|
+
], CreateMJThemeInput.prototype, "Name", void 0);
|
|
130950
|
+
__decorate([
|
|
130951
|
+
Field({ nullable: true }),
|
|
130952
|
+
__metadata("design:type", String)
|
|
130953
|
+
], CreateMJThemeInput.prototype, "Description", void 0);
|
|
130954
|
+
__decorate([
|
|
130955
|
+
Field({ nullable: true }),
|
|
130956
|
+
__metadata("design:type", String)
|
|
130957
|
+
], CreateMJThemeInput.prototype, "Seeds", void 0);
|
|
130958
|
+
__decorate([
|
|
130959
|
+
Field({ nullable: true }),
|
|
130960
|
+
__metadata("design:type", String)
|
|
130961
|
+
], CreateMJThemeInput.prototype, "LightMarkURL", void 0);
|
|
130962
|
+
__decorate([
|
|
130963
|
+
Field({ nullable: true }),
|
|
130964
|
+
__metadata("design:type", String)
|
|
130965
|
+
], CreateMJThemeInput.prototype, "DarkMarkURL", void 0);
|
|
130966
|
+
__decorate([
|
|
130967
|
+
Field({ nullable: true }),
|
|
130968
|
+
__metadata("design:type", String)
|
|
130969
|
+
], CreateMJThemeInput.prototype, "WordmarkURL", void 0);
|
|
130970
|
+
__decorate([
|
|
130971
|
+
Field({ nullable: true }),
|
|
130972
|
+
__metadata("design:type", String)
|
|
130973
|
+
], CreateMJThemeInput.prototype, "MonochromeURL", void 0);
|
|
130974
|
+
__decorate([
|
|
130975
|
+
Field(() => Boolean, { nullable: true }),
|
|
130976
|
+
__metadata("design:type", Boolean)
|
|
130977
|
+
], CreateMJThemeInput.prototype, "IsDefault", void 0);
|
|
130978
|
+
__decorate([
|
|
130979
|
+
Field({ nullable: true }),
|
|
130980
|
+
__metadata("design:type", String)
|
|
130981
|
+
], CreateMJThemeInput.prototype, "Status", void 0);
|
|
130982
|
+
__decorate([
|
|
130983
|
+
Field({ nullable: true }),
|
|
130984
|
+
__metadata("design:type", String)
|
|
130985
|
+
], CreateMJThemeInput.prototype, "Overrides", void 0);
|
|
130986
|
+
__decorate([
|
|
130987
|
+
Field({ nullable: true }),
|
|
130988
|
+
__metadata("design:type", String)
|
|
130989
|
+
], CreateMJThemeInput.prototype, "CustomCSS", void 0);
|
|
130990
|
+
__decorate([
|
|
130991
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
130992
|
+
__metadata("design:type", RestoreContextInput)
|
|
130993
|
+
], CreateMJThemeInput.prototype, "RestoreContext___", void 0);
|
|
130994
|
+
CreateMJThemeInput = __decorate([
|
|
130995
|
+
InputType()
|
|
130996
|
+
], CreateMJThemeInput);
|
|
130997
|
+
export { CreateMJThemeInput };
|
|
130998
|
+
//****************************************************************************
|
|
130999
|
+
// INPUT TYPE for MJ: Themes
|
|
131000
|
+
//****************************************************************************
|
|
131001
|
+
let UpdateMJThemeInput = class UpdateMJThemeInput {
|
|
131002
|
+
};
|
|
131003
|
+
__decorate([
|
|
131004
|
+
Field(),
|
|
131005
|
+
__metadata("design:type", String)
|
|
131006
|
+
], UpdateMJThemeInput.prototype, "ID", void 0);
|
|
131007
|
+
__decorate([
|
|
131008
|
+
Field({ nullable: true }),
|
|
131009
|
+
__metadata("design:type", String)
|
|
131010
|
+
], UpdateMJThemeInput.prototype, "Name", void 0);
|
|
131011
|
+
__decorate([
|
|
131012
|
+
Field({ nullable: true }),
|
|
131013
|
+
__metadata("design:type", String)
|
|
131014
|
+
], UpdateMJThemeInput.prototype, "Description", void 0);
|
|
131015
|
+
__decorate([
|
|
131016
|
+
Field({ nullable: true }),
|
|
131017
|
+
__metadata("design:type", String)
|
|
131018
|
+
], UpdateMJThemeInput.prototype, "Seeds", void 0);
|
|
131019
|
+
__decorate([
|
|
131020
|
+
Field({ nullable: true }),
|
|
131021
|
+
__metadata("design:type", String)
|
|
131022
|
+
], UpdateMJThemeInput.prototype, "LightMarkURL", void 0);
|
|
131023
|
+
__decorate([
|
|
131024
|
+
Field({ nullable: true }),
|
|
131025
|
+
__metadata("design:type", String)
|
|
131026
|
+
], UpdateMJThemeInput.prototype, "DarkMarkURL", void 0);
|
|
131027
|
+
__decorate([
|
|
131028
|
+
Field({ nullable: true }),
|
|
131029
|
+
__metadata("design:type", String)
|
|
131030
|
+
], UpdateMJThemeInput.prototype, "WordmarkURL", void 0);
|
|
131031
|
+
__decorate([
|
|
131032
|
+
Field({ nullable: true }),
|
|
131033
|
+
__metadata("design:type", String)
|
|
131034
|
+
], UpdateMJThemeInput.prototype, "MonochromeURL", void 0);
|
|
131035
|
+
__decorate([
|
|
131036
|
+
Field(() => Boolean, { nullable: true }),
|
|
131037
|
+
__metadata("design:type", Boolean)
|
|
131038
|
+
], UpdateMJThemeInput.prototype, "IsDefault", void 0);
|
|
131039
|
+
__decorate([
|
|
131040
|
+
Field({ nullable: true }),
|
|
131041
|
+
__metadata("design:type", String)
|
|
131042
|
+
], UpdateMJThemeInput.prototype, "Status", void 0);
|
|
131043
|
+
__decorate([
|
|
131044
|
+
Field({ nullable: true }),
|
|
131045
|
+
__metadata("design:type", String)
|
|
131046
|
+
], UpdateMJThemeInput.prototype, "Overrides", void 0);
|
|
131047
|
+
__decorate([
|
|
131048
|
+
Field({ nullable: true }),
|
|
131049
|
+
__metadata("design:type", String)
|
|
131050
|
+
], UpdateMJThemeInput.prototype, "CustomCSS", void 0);
|
|
131051
|
+
__decorate([
|
|
131052
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
131053
|
+
__metadata("design:type", Array)
|
|
131054
|
+
], UpdateMJThemeInput.prototype, "OldValues___", void 0);
|
|
131055
|
+
__decorate([
|
|
131056
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
131057
|
+
__metadata("design:type", RestoreContextInput)
|
|
131058
|
+
], UpdateMJThemeInput.prototype, "RestoreContext___", void 0);
|
|
131059
|
+
UpdateMJThemeInput = __decorate([
|
|
131060
|
+
InputType()
|
|
131061
|
+
], UpdateMJThemeInput);
|
|
131062
|
+
export { UpdateMJThemeInput };
|
|
131063
|
+
//****************************************************************************
|
|
131064
|
+
// RESOLVER for MJ: Themes
|
|
131065
|
+
//****************************************************************************
|
|
131066
|
+
let RunMJThemeViewResult = class RunMJThemeViewResult {
|
|
131067
|
+
};
|
|
131068
|
+
__decorate([
|
|
131069
|
+
Field(() => [MJTheme_]),
|
|
131070
|
+
__metadata("design:type", Array)
|
|
131071
|
+
], RunMJThemeViewResult.prototype, "Results", void 0);
|
|
131072
|
+
__decorate([
|
|
131073
|
+
Field(() => String, { nullable: true }),
|
|
131074
|
+
__metadata("design:type", String)
|
|
131075
|
+
], RunMJThemeViewResult.prototype, "UserViewRunID", void 0);
|
|
131076
|
+
__decorate([
|
|
131077
|
+
Field(() => Int, { nullable: true }),
|
|
131078
|
+
__metadata("design:type", Number)
|
|
131079
|
+
], RunMJThemeViewResult.prototype, "RowCount", void 0);
|
|
131080
|
+
__decorate([
|
|
131081
|
+
Field(() => Int, { nullable: true }),
|
|
131082
|
+
__metadata("design:type", Number)
|
|
131083
|
+
], RunMJThemeViewResult.prototype, "TotalRowCount", void 0);
|
|
131084
|
+
__decorate([
|
|
131085
|
+
Field(() => Int, { nullable: true }),
|
|
131086
|
+
__metadata("design:type", Number)
|
|
131087
|
+
], RunMJThemeViewResult.prototype, "ExecutionTime", void 0);
|
|
131088
|
+
__decorate([
|
|
131089
|
+
Field({ nullable: true }),
|
|
131090
|
+
__metadata("design:type", String)
|
|
131091
|
+
], RunMJThemeViewResult.prototype, "ErrorMessage", void 0);
|
|
131092
|
+
__decorate([
|
|
131093
|
+
Field(() => Boolean, { nullable: false }),
|
|
131094
|
+
__metadata("design:type", Boolean)
|
|
131095
|
+
], RunMJThemeViewResult.prototype, "Success", void 0);
|
|
131096
|
+
RunMJThemeViewResult = __decorate([
|
|
131097
|
+
ObjectType()
|
|
131098
|
+
], RunMJThemeViewResult);
|
|
131099
|
+
export { RunMJThemeViewResult };
|
|
131100
|
+
let MJThemeResolver = class MJThemeResolver extends ResolverBase {
|
|
131101
|
+
async RunMJThemeViewByID(input, { providers, userPayload }, pubSub) {
|
|
131102
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131103
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
131104
|
+
}
|
|
131105
|
+
async RunMJThemeViewByName(input, { providers, userPayload }, pubSub) {
|
|
131106
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131107
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
131108
|
+
}
|
|
131109
|
+
async RunMJThemeDynamicView(input, { providers, userPayload }, pubSub) {
|
|
131110
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131111
|
+
input.EntityName = 'MJ: Themes';
|
|
131112
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
131113
|
+
}
|
|
131114
|
+
async MJTheme(ID, { userPayload, providers }, pubSub) {
|
|
131115
|
+
this.CheckUserReadPermissions('MJ: Themes', userPayload);
|
|
131116
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131117
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwThemes')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Themes', userPayload, EntityPermissionType.Read, 'AND');
|
|
131118
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
131119
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Themes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
131120
|
+
return result;
|
|
131121
|
+
}
|
|
131122
|
+
async CreateMJTheme(input, { providers, userPayload }, pubSub) {
|
|
131123
|
+
const provider = GetReadWriteProvider(providers);
|
|
131124
|
+
return this.CreateRecord('MJ: Themes', input, provider, userPayload, pubSub);
|
|
131125
|
+
}
|
|
131126
|
+
async UpdateMJTheme(input, { providers, userPayload }, pubSub) {
|
|
131127
|
+
const provider = GetReadWriteProvider(providers);
|
|
131128
|
+
return this.UpdateRecord('MJ: Themes', input, provider, userPayload, pubSub);
|
|
131129
|
+
}
|
|
131130
|
+
async DeleteMJTheme(ID, options, { providers, userPayload }, pubSub) {
|
|
131131
|
+
const provider = GetReadWriteProvider(providers);
|
|
131132
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
131133
|
+
return this.DeleteRecord('MJ: Themes', key, options, provider, userPayload, pubSub);
|
|
131134
|
+
}
|
|
131135
|
+
};
|
|
131136
|
+
__decorate([
|
|
131137
|
+
Query(() => RunMJThemeViewResult),
|
|
131138
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
131139
|
+
__param(1, Ctx()),
|
|
131140
|
+
__param(2, PubSub()),
|
|
131141
|
+
__metadata("design:type", Function),
|
|
131142
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
131143
|
+
__metadata("design:returntype", Promise)
|
|
131144
|
+
], MJThemeResolver.prototype, "RunMJThemeViewByID", null);
|
|
131145
|
+
__decorate([
|
|
131146
|
+
Query(() => RunMJThemeViewResult),
|
|
131147
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
131148
|
+
__param(1, Ctx()),
|
|
131149
|
+
__param(2, PubSub()),
|
|
131150
|
+
__metadata("design:type", Function),
|
|
131151
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
131152
|
+
__metadata("design:returntype", Promise)
|
|
131153
|
+
], MJThemeResolver.prototype, "RunMJThemeViewByName", null);
|
|
131154
|
+
__decorate([
|
|
131155
|
+
Query(() => RunMJThemeViewResult),
|
|
131156
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
131157
|
+
__param(1, Ctx()),
|
|
131158
|
+
__param(2, PubSub()),
|
|
131159
|
+
__metadata("design:type", Function),
|
|
131160
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
131161
|
+
__metadata("design:returntype", Promise)
|
|
131162
|
+
], MJThemeResolver.prototype, "RunMJThemeDynamicView", null);
|
|
131163
|
+
__decorate([
|
|
131164
|
+
Query(() => MJTheme_, { nullable: true }),
|
|
131165
|
+
__param(0, Arg('ID', () => String)),
|
|
131166
|
+
__param(1, Ctx()),
|
|
131167
|
+
__param(2, PubSub()),
|
|
131168
|
+
__metadata("design:type", Function),
|
|
131169
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
131170
|
+
__metadata("design:returntype", Promise)
|
|
131171
|
+
], MJThemeResolver.prototype, "MJTheme", null);
|
|
131172
|
+
__decorate([
|
|
131173
|
+
Mutation(() => MJTheme_),
|
|
131174
|
+
__param(0, Arg('input', () => CreateMJThemeInput)),
|
|
131175
|
+
__param(1, Ctx()),
|
|
131176
|
+
__param(2, PubSub()),
|
|
131177
|
+
__metadata("design:type", Function),
|
|
131178
|
+
__metadata("design:paramtypes", [CreateMJThemeInput, Object, PubSubEngine]),
|
|
131179
|
+
__metadata("design:returntype", Promise)
|
|
131180
|
+
], MJThemeResolver.prototype, "CreateMJTheme", null);
|
|
131181
|
+
__decorate([
|
|
131182
|
+
Mutation(() => MJTheme_),
|
|
131183
|
+
__param(0, Arg('input', () => UpdateMJThemeInput)),
|
|
131184
|
+
__param(1, Ctx()),
|
|
131185
|
+
__param(2, PubSub()),
|
|
131186
|
+
__metadata("design:type", Function),
|
|
131187
|
+
__metadata("design:paramtypes", [UpdateMJThemeInput, Object, PubSubEngine]),
|
|
131188
|
+
__metadata("design:returntype", Promise)
|
|
131189
|
+
], MJThemeResolver.prototype, "UpdateMJTheme", null);
|
|
131190
|
+
__decorate([
|
|
131191
|
+
Mutation(() => MJTheme_),
|
|
131192
|
+
__param(0, Arg('ID', () => String)),
|
|
131193
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
131194
|
+
__param(2, Ctx()),
|
|
131195
|
+
__param(3, PubSub()),
|
|
131196
|
+
__metadata("design:type", Function),
|
|
131197
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
131198
|
+
__metadata("design:returntype", Promise)
|
|
131199
|
+
], MJThemeResolver.prototype, "DeleteMJTheme", null);
|
|
131200
|
+
MJThemeResolver = __decorate([
|
|
131201
|
+
Resolver(MJTheme_)
|
|
131202
|
+
], MJThemeResolver);
|
|
131203
|
+
export { MJThemeResolver };
|
|
131204
|
+
//****************************************************************************
|
|
129269
131205
|
// ENTITY CLASS for MJ: User Application Entities
|
|
129270
131206
|
//****************************************************************************
|
|
129271
131207
|
let MJUserApplicationEntity_ = class MJUserApplicationEntity_ {
|