@memberjunction/server 5.33.0 → 5.34.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 +2 -1
- package/dist/agents/skip-agent.d.ts +3 -1
- package/dist/agents/skip-agent.d.ts.map +1 -1
- package/dist/agents/skip-agent.js +15 -3
- package/dist/agents/skip-agent.js.map +1 -1
- package/dist/generated/generated.d.ts +551 -5
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +3277 -120
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts +1 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +9 -2
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/generic/RunViewResolver.d.ts +5 -1
- package/dist/generic/RunViewResolver.d.ts.map +1 -1
- package/dist/generic/RunViewResolver.js +33 -2
- package/dist/generic/RunViewResolver.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/resolvers/AvailableSearchProvidersResolver.d.ts +26 -0
- package/dist/resolvers/AvailableSearchProvidersResolver.d.ts.map +1 -0
- package/dist/resolvers/AvailableSearchProvidersResolver.js +65 -0
- package/dist/resolvers/AvailableSearchProvidersResolver.js.map +1 -0
- package/dist/resolvers/ComponentRegistryResolver.d.ts +11 -25
- package/dist/resolvers/ComponentRegistryResolver.d.ts.map +1 -1
- package/dist/resolvers/ComponentRegistryResolver.js +51 -93
- package/dist/resolvers/ComponentRegistryResolver.js.map +1 -1
- package/dist/resolvers/QuerySystemUserResolver.d.ts +6 -0
- package/dist/resolvers/QuerySystemUserResolver.d.ts.map +1 -1
- package/dist/resolvers/QuerySystemUserResolver.js +31 -1
- package/dist/resolvers/QuerySystemUserResolver.js.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.d.ts +44 -1
- package/dist/resolvers/SearchKnowledgeResolver.d.ts.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.js +217 -7
- package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -1
- package/dist/resolvers/SearchKnowledgeStreamResolver.d.ts +79 -0
- package/dist/resolvers/SearchKnowledgeStreamResolver.d.ts.map +1 -0
- package/dist/resolvers/SearchKnowledgeStreamResolver.js +342 -0
- package/dist/resolvers/SearchKnowledgeStreamResolver.js.map +1 -0
- package/dist/types.d.ts +6 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +68 -68
- package/src/agents/skip-agent.ts +18 -4
- package/src/generated/generated.ts +2229 -80
- package/src/generic/ResolverBase.ts +11 -2
- package/src/generic/RunViewResolver.ts +29 -2
- package/src/index.ts +17 -2
- package/src/resolvers/AvailableSearchProvidersResolver.ts +43 -0
- package/src/resolvers/ComponentRegistryResolver.ts +71 -123
- package/src/resolvers/QuerySystemUserResolver.ts +27 -1
- package/src/resolvers/SearchKnowledgeResolver.ts +205 -4
- package/src/resolvers/SearchKnowledgeStreamResolver.ts +338 -0
- package/src/types.ts +6 -1
|
@@ -11743,6 +11743,371 @@ MJAIAgentRunResolver = __decorate([
|
|
|
11743
11743
|
], MJAIAgentRunResolver);
|
|
11744
11744
|
export { MJAIAgentRunResolver };
|
|
11745
11745
|
//****************************************************************************
|
|
11746
|
+
// ENTITY CLASS for MJ: AI Agent Search Scopes
|
|
11747
|
+
//****************************************************************************
|
|
11748
|
+
let MJAIAgentSearchScope_ = class MJAIAgentSearchScope_ {
|
|
11749
|
+
};
|
|
11750
|
+
__decorate([
|
|
11751
|
+
Field(),
|
|
11752
|
+
MaxLength(36),
|
|
11753
|
+
__metadata("design:type", String)
|
|
11754
|
+
], MJAIAgentSearchScope_.prototype, "ID", void 0);
|
|
11755
|
+
__decorate([
|
|
11756
|
+
Field(),
|
|
11757
|
+
MaxLength(36),
|
|
11758
|
+
__metadata("design:type", String)
|
|
11759
|
+
], MJAIAgentSearchScope_.prototype, "AgentID", void 0);
|
|
11760
|
+
__decorate([
|
|
11761
|
+
Field(),
|
|
11762
|
+
MaxLength(36),
|
|
11763
|
+
__metadata("design:type", String)
|
|
11764
|
+
], MJAIAgentSearchScope_.prototype, "SearchScopeID", void 0);
|
|
11765
|
+
__decorate([
|
|
11766
|
+
Field({ description: `When this scope is used: PreExecution (injected as retrieved context before the agent runs), AgentInvoked (callable via the scoped search Action), or Both.` }),
|
|
11767
|
+
MaxLength(20),
|
|
11768
|
+
__metadata("design:type", String)
|
|
11769
|
+
], MJAIAgentSearchScope_.prototype, "Phase", void 0);
|
|
11770
|
+
__decorate([
|
|
11771
|
+
Field({ description: `Lifecycle status. Only Active rows are considered at runtime.` }),
|
|
11772
|
+
MaxLength(20),
|
|
11773
|
+
__metadata("design:type", String)
|
|
11774
|
+
], MJAIAgentSearchScope_.prototype, "Status", void 0);
|
|
11775
|
+
__decorate([
|
|
11776
|
+
Field({ nullable: true, description: `Time-windowed activation for this agent-scope assignment. NULL = immediately active.` }),
|
|
11777
|
+
__metadata("design:type", Date)
|
|
11778
|
+
], MJAIAgentSearchScope_.prototype, "StartAt", void 0);
|
|
11779
|
+
__decorate([
|
|
11780
|
+
Field({ nullable: true, description: `Time-windowed deactivation for this agent-scope assignment. NULL = no expiry.` }),
|
|
11781
|
+
__metadata("design:type", Date)
|
|
11782
|
+
], MJAIAgentSearchScope_.prototype, "EndAt", void 0);
|
|
11783
|
+
__decorate([
|
|
11784
|
+
Field(() => Int, { description: `Ordering within Phase. Lower = higher priority. Used for pre-execution ordering and as default preference for agent-invoked scope selection.` }),
|
|
11785
|
+
__metadata("design:type", Number)
|
|
11786
|
+
], MJAIAgentSearchScope_.prototype, "Priority", void 0);
|
|
11787
|
+
__decorate([
|
|
11788
|
+
Field(() => Int, { nullable: true, description: `Override max results for this scope when used by this agent. NULL = use scope/engine default.` }),
|
|
11789
|
+
__metadata("design:type", Number)
|
|
11790
|
+
], MJAIAgentSearchScope_.prototype, "MaxResults", void 0);
|
|
11791
|
+
__decorate([
|
|
11792
|
+
Field(() => Float, { nullable: true, description: `Override min score threshold (0.0000–1.0000). NULL = use engine default.` }),
|
|
11793
|
+
__metadata("design:type", Number)
|
|
11794
|
+
], MJAIAgentSearchScope_.prototype, "MinScore", void 0);
|
|
11795
|
+
__decorate([
|
|
11796
|
+
Field({ nullable: true, description: `FK to Templates. MJ Template used to generate the search query from conversation context (lastUserMessage, recentMessages, payload, etc.). NULL = use lastUserMessage as-is. Can be further specialized per-provider via SearchScopeProvider.QueryTransformTemplateID.` }),
|
|
11797
|
+
MaxLength(36),
|
|
11798
|
+
__metadata("design:type", String)
|
|
11799
|
+
], MJAIAgentSearchScope_.prototype, "QueryTemplateID", void 0);
|
|
11800
|
+
__decorate([
|
|
11801
|
+
Field({ nullable: true, description: `JSON override for RRF per-provider fusion weights when this agent uses this scope. Resolution order: AIAgentSearchScope.FusionWeightsOverride > SearchScope.ScopeConfig.fusionWeights > engine defaults. Example: { "vector": 2.0, "fulltext": 1.0, "entity": 1.0 }.` }),
|
|
11802
|
+
__metadata("design:type", String)
|
|
11803
|
+
], MJAIAgentSearchScope_.prototype, "FusionWeightsOverride", void 0);
|
|
11804
|
+
__decorate([
|
|
11805
|
+
Field(() => Boolean, { description: `If true, this is the agent's default scope when no scope is specified in a tool call.` }),
|
|
11806
|
+
__metadata("design:type", Boolean)
|
|
11807
|
+
], MJAIAgentSearchScope_.prototype, "IsDefault", void 0);
|
|
11808
|
+
__decorate([
|
|
11809
|
+
Field(),
|
|
11810
|
+
__metadata("design:type", Date)
|
|
11811
|
+
], MJAIAgentSearchScope_.prototype, "_mj__CreatedAt", void 0);
|
|
11812
|
+
__decorate([
|
|
11813
|
+
Field(),
|
|
11814
|
+
__metadata("design:type", Date)
|
|
11815
|
+
], MJAIAgentSearchScope_.prototype, "_mj__UpdatedAt", void 0);
|
|
11816
|
+
__decorate([
|
|
11817
|
+
Field({ nullable: true }),
|
|
11818
|
+
MaxLength(255),
|
|
11819
|
+
__metadata("design:type", String)
|
|
11820
|
+
], MJAIAgentSearchScope_.prototype, "Agent", void 0);
|
|
11821
|
+
__decorate([
|
|
11822
|
+
Field(),
|
|
11823
|
+
MaxLength(200),
|
|
11824
|
+
__metadata("design:type", String)
|
|
11825
|
+
], MJAIAgentSearchScope_.prototype, "SearchScope", void 0);
|
|
11826
|
+
__decorate([
|
|
11827
|
+
Field({ nullable: true }),
|
|
11828
|
+
MaxLength(255),
|
|
11829
|
+
__metadata("design:type", String)
|
|
11830
|
+
], MJAIAgentSearchScope_.prototype, "QueryTemplate", void 0);
|
|
11831
|
+
MJAIAgentSearchScope_ = __decorate([
|
|
11832
|
+
ObjectType({ description: `Many-to-many between agents and search scopes, with phase and scheduling control. Drives both pre-execution RAG and agent-invoked scoped search.` })
|
|
11833
|
+
], MJAIAgentSearchScope_);
|
|
11834
|
+
export { MJAIAgentSearchScope_ };
|
|
11835
|
+
//****************************************************************************
|
|
11836
|
+
// INPUT TYPE for MJ: AI Agent Search Scopes
|
|
11837
|
+
//****************************************************************************
|
|
11838
|
+
let CreateMJAIAgentSearchScopeInput = class CreateMJAIAgentSearchScopeInput {
|
|
11839
|
+
};
|
|
11840
|
+
__decorate([
|
|
11841
|
+
Field({ nullable: true }),
|
|
11842
|
+
__metadata("design:type", String)
|
|
11843
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "ID", void 0);
|
|
11844
|
+
__decorate([
|
|
11845
|
+
Field({ nullable: true }),
|
|
11846
|
+
__metadata("design:type", String)
|
|
11847
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "AgentID", void 0);
|
|
11848
|
+
__decorate([
|
|
11849
|
+
Field({ nullable: true }),
|
|
11850
|
+
__metadata("design:type", String)
|
|
11851
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "SearchScopeID", void 0);
|
|
11852
|
+
__decorate([
|
|
11853
|
+
Field({ nullable: true }),
|
|
11854
|
+
__metadata("design:type", String)
|
|
11855
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "Phase", void 0);
|
|
11856
|
+
__decorate([
|
|
11857
|
+
Field({ nullable: true }),
|
|
11858
|
+
__metadata("design:type", String)
|
|
11859
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "Status", void 0);
|
|
11860
|
+
__decorate([
|
|
11861
|
+
Field({ nullable: true }),
|
|
11862
|
+
__metadata("design:type", Date)
|
|
11863
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "StartAt", void 0);
|
|
11864
|
+
__decorate([
|
|
11865
|
+
Field({ nullable: true }),
|
|
11866
|
+
__metadata("design:type", Date)
|
|
11867
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "EndAt", void 0);
|
|
11868
|
+
__decorate([
|
|
11869
|
+
Field(() => Int, { nullable: true }),
|
|
11870
|
+
__metadata("design:type", Number)
|
|
11871
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "Priority", void 0);
|
|
11872
|
+
__decorate([
|
|
11873
|
+
Field(() => Int, { nullable: true }),
|
|
11874
|
+
__metadata("design:type", Number)
|
|
11875
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "MaxResults", void 0);
|
|
11876
|
+
__decorate([
|
|
11877
|
+
Field(() => Float, { nullable: true }),
|
|
11878
|
+
__metadata("design:type", Number)
|
|
11879
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "MinScore", void 0);
|
|
11880
|
+
__decorate([
|
|
11881
|
+
Field({ nullable: true }),
|
|
11882
|
+
__metadata("design:type", String)
|
|
11883
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "QueryTemplateID", void 0);
|
|
11884
|
+
__decorate([
|
|
11885
|
+
Field({ nullable: true }),
|
|
11886
|
+
__metadata("design:type", String)
|
|
11887
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "FusionWeightsOverride", void 0);
|
|
11888
|
+
__decorate([
|
|
11889
|
+
Field(() => Boolean, { nullable: true }),
|
|
11890
|
+
__metadata("design:type", Boolean)
|
|
11891
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "IsDefault", void 0);
|
|
11892
|
+
__decorate([
|
|
11893
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
11894
|
+
__metadata("design:type", RestoreContextInput)
|
|
11895
|
+
], CreateMJAIAgentSearchScopeInput.prototype, "RestoreContext___", void 0);
|
|
11896
|
+
CreateMJAIAgentSearchScopeInput = __decorate([
|
|
11897
|
+
InputType()
|
|
11898
|
+
], CreateMJAIAgentSearchScopeInput);
|
|
11899
|
+
export { CreateMJAIAgentSearchScopeInput };
|
|
11900
|
+
//****************************************************************************
|
|
11901
|
+
// INPUT TYPE for MJ: AI Agent Search Scopes
|
|
11902
|
+
//****************************************************************************
|
|
11903
|
+
let UpdateMJAIAgentSearchScopeInput = class UpdateMJAIAgentSearchScopeInput {
|
|
11904
|
+
};
|
|
11905
|
+
__decorate([
|
|
11906
|
+
Field(),
|
|
11907
|
+
__metadata("design:type", String)
|
|
11908
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "ID", void 0);
|
|
11909
|
+
__decorate([
|
|
11910
|
+
Field({ nullable: true }),
|
|
11911
|
+
__metadata("design:type", String)
|
|
11912
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "AgentID", void 0);
|
|
11913
|
+
__decorate([
|
|
11914
|
+
Field({ nullable: true }),
|
|
11915
|
+
__metadata("design:type", String)
|
|
11916
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "SearchScopeID", void 0);
|
|
11917
|
+
__decorate([
|
|
11918
|
+
Field({ nullable: true }),
|
|
11919
|
+
__metadata("design:type", String)
|
|
11920
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "Phase", void 0);
|
|
11921
|
+
__decorate([
|
|
11922
|
+
Field({ nullable: true }),
|
|
11923
|
+
__metadata("design:type", String)
|
|
11924
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "Status", void 0);
|
|
11925
|
+
__decorate([
|
|
11926
|
+
Field({ nullable: true }),
|
|
11927
|
+
__metadata("design:type", Date)
|
|
11928
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "StartAt", void 0);
|
|
11929
|
+
__decorate([
|
|
11930
|
+
Field({ nullable: true }),
|
|
11931
|
+
__metadata("design:type", Date)
|
|
11932
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "EndAt", void 0);
|
|
11933
|
+
__decorate([
|
|
11934
|
+
Field(() => Int, { nullable: true }),
|
|
11935
|
+
__metadata("design:type", Number)
|
|
11936
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "Priority", void 0);
|
|
11937
|
+
__decorate([
|
|
11938
|
+
Field(() => Int, { nullable: true }),
|
|
11939
|
+
__metadata("design:type", Number)
|
|
11940
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "MaxResults", void 0);
|
|
11941
|
+
__decorate([
|
|
11942
|
+
Field(() => Float, { nullable: true }),
|
|
11943
|
+
__metadata("design:type", Number)
|
|
11944
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "MinScore", void 0);
|
|
11945
|
+
__decorate([
|
|
11946
|
+
Field({ nullable: true }),
|
|
11947
|
+
__metadata("design:type", String)
|
|
11948
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "QueryTemplateID", void 0);
|
|
11949
|
+
__decorate([
|
|
11950
|
+
Field({ nullable: true }),
|
|
11951
|
+
__metadata("design:type", String)
|
|
11952
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "FusionWeightsOverride", void 0);
|
|
11953
|
+
__decorate([
|
|
11954
|
+
Field(() => Boolean, { nullable: true }),
|
|
11955
|
+
__metadata("design:type", Boolean)
|
|
11956
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "IsDefault", void 0);
|
|
11957
|
+
__decorate([
|
|
11958
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
11959
|
+
__metadata("design:type", Array)
|
|
11960
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "OldValues___", void 0);
|
|
11961
|
+
__decorate([
|
|
11962
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
11963
|
+
__metadata("design:type", RestoreContextInput)
|
|
11964
|
+
], UpdateMJAIAgentSearchScopeInput.prototype, "RestoreContext___", void 0);
|
|
11965
|
+
UpdateMJAIAgentSearchScopeInput = __decorate([
|
|
11966
|
+
InputType()
|
|
11967
|
+
], UpdateMJAIAgentSearchScopeInput);
|
|
11968
|
+
export { UpdateMJAIAgentSearchScopeInput };
|
|
11969
|
+
//****************************************************************************
|
|
11970
|
+
// RESOLVER for MJ: AI Agent Search Scopes
|
|
11971
|
+
//****************************************************************************
|
|
11972
|
+
let RunMJAIAgentSearchScopeViewResult = class RunMJAIAgentSearchScopeViewResult {
|
|
11973
|
+
};
|
|
11974
|
+
__decorate([
|
|
11975
|
+
Field(() => [MJAIAgentSearchScope_]),
|
|
11976
|
+
__metadata("design:type", Array)
|
|
11977
|
+
], RunMJAIAgentSearchScopeViewResult.prototype, "Results", void 0);
|
|
11978
|
+
__decorate([
|
|
11979
|
+
Field(() => String, { nullable: true }),
|
|
11980
|
+
__metadata("design:type", String)
|
|
11981
|
+
], RunMJAIAgentSearchScopeViewResult.prototype, "UserViewRunID", void 0);
|
|
11982
|
+
__decorate([
|
|
11983
|
+
Field(() => Int, { nullable: true }),
|
|
11984
|
+
__metadata("design:type", Number)
|
|
11985
|
+
], RunMJAIAgentSearchScopeViewResult.prototype, "RowCount", void 0);
|
|
11986
|
+
__decorate([
|
|
11987
|
+
Field(() => Int, { nullable: true }),
|
|
11988
|
+
__metadata("design:type", Number)
|
|
11989
|
+
], RunMJAIAgentSearchScopeViewResult.prototype, "TotalRowCount", void 0);
|
|
11990
|
+
__decorate([
|
|
11991
|
+
Field(() => Int, { nullable: true }),
|
|
11992
|
+
__metadata("design:type", Number)
|
|
11993
|
+
], RunMJAIAgentSearchScopeViewResult.prototype, "ExecutionTime", void 0);
|
|
11994
|
+
__decorate([
|
|
11995
|
+
Field({ nullable: true }),
|
|
11996
|
+
__metadata("design:type", String)
|
|
11997
|
+
], RunMJAIAgentSearchScopeViewResult.prototype, "ErrorMessage", void 0);
|
|
11998
|
+
__decorate([
|
|
11999
|
+
Field(() => Boolean, { nullable: false }),
|
|
12000
|
+
__metadata("design:type", Boolean)
|
|
12001
|
+
], RunMJAIAgentSearchScopeViewResult.prototype, "Success", void 0);
|
|
12002
|
+
RunMJAIAgentSearchScopeViewResult = __decorate([
|
|
12003
|
+
ObjectType()
|
|
12004
|
+
], RunMJAIAgentSearchScopeViewResult);
|
|
12005
|
+
export { RunMJAIAgentSearchScopeViewResult };
|
|
12006
|
+
let MJAIAgentSearchScopeResolver = class MJAIAgentSearchScopeResolver extends ResolverBase {
|
|
12007
|
+
async RunMJAIAgentSearchScopeViewByID(input, { providers, userPayload }, pubSub) {
|
|
12008
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12009
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
12010
|
+
}
|
|
12011
|
+
async RunMJAIAgentSearchScopeViewByName(input, { providers, userPayload }, pubSub) {
|
|
12012
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12013
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
12014
|
+
}
|
|
12015
|
+
async RunMJAIAgentSearchScopeDynamicView(input, { providers, userPayload }, pubSub) {
|
|
12016
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12017
|
+
input.EntityName = 'MJ: AI Agent Search Scopes';
|
|
12018
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
12019
|
+
}
|
|
12020
|
+
async MJAIAgentSearchScope(ID, { userPayload, providers }, pubSub) {
|
|
12021
|
+
this.CheckUserReadPermissions('MJ: AI Agent Search Scopes', userPayload);
|
|
12022
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12023
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentSearchScopes')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
12024
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
12025
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Search Scopes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
12026
|
+
return result;
|
|
12027
|
+
}
|
|
12028
|
+
async CreateMJAIAgentSearchScope(input, { providers, userPayload }, pubSub) {
|
|
12029
|
+
const provider = GetReadWriteProvider(providers);
|
|
12030
|
+
return this.CreateRecord('MJ: AI Agent Search Scopes', input, provider, userPayload, pubSub);
|
|
12031
|
+
}
|
|
12032
|
+
async UpdateMJAIAgentSearchScope(input, { providers, userPayload }, pubSub) {
|
|
12033
|
+
const provider = GetReadWriteProvider(providers);
|
|
12034
|
+
return this.UpdateRecord('MJ: AI Agent Search Scopes', input, provider, userPayload, pubSub);
|
|
12035
|
+
}
|
|
12036
|
+
async DeleteMJAIAgentSearchScope(ID, options, { providers, userPayload }, pubSub) {
|
|
12037
|
+
const provider = GetReadWriteProvider(providers);
|
|
12038
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
12039
|
+
return this.DeleteRecord('MJ: AI Agent Search Scopes', key, options, provider, userPayload, pubSub);
|
|
12040
|
+
}
|
|
12041
|
+
};
|
|
12042
|
+
__decorate([
|
|
12043
|
+
Query(() => RunMJAIAgentSearchScopeViewResult),
|
|
12044
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
12045
|
+
__param(1, Ctx()),
|
|
12046
|
+
__param(2, PubSub()),
|
|
12047
|
+
__metadata("design:type", Function),
|
|
12048
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
12049
|
+
__metadata("design:returntype", Promise)
|
|
12050
|
+
], MJAIAgentSearchScopeResolver.prototype, "RunMJAIAgentSearchScopeViewByID", null);
|
|
12051
|
+
__decorate([
|
|
12052
|
+
Query(() => RunMJAIAgentSearchScopeViewResult),
|
|
12053
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
12054
|
+
__param(1, Ctx()),
|
|
12055
|
+
__param(2, PubSub()),
|
|
12056
|
+
__metadata("design:type", Function),
|
|
12057
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
12058
|
+
__metadata("design:returntype", Promise)
|
|
12059
|
+
], MJAIAgentSearchScopeResolver.prototype, "RunMJAIAgentSearchScopeViewByName", null);
|
|
12060
|
+
__decorate([
|
|
12061
|
+
Query(() => RunMJAIAgentSearchScopeViewResult),
|
|
12062
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
12063
|
+
__param(1, Ctx()),
|
|
12064
|
+
__param(2, PubSub()),
|
|
12065
|
+
__metadata("design:type", Function),
|
|
12066
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
12067
|
+
__metadata("design:returntype", Promise)
|
|
12068
|
+
], MJAIAgentSearchScopeResolver.prototype, "RunMJAIAgentSearchScopeDynamicView", null);
|
|
12069
|
+
__decorate([
|
|
12070
|
+
Query(() => MJAIAgentSearchScope_, { nullable: true }),
|
|
12071
|
+
__param(0, Arg('ID', () => String)),
|
|
12072
|
+
__param(1, Ctx()),
|
|
12073
|
+
__param(2, PubSub()),
|
|
12074
|
+
__metadata("design:type", Function),
|
|
12075
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
12076
|
+
__metadata("design:returntype", Promise)
|
|
12077
|
+
], MJAIAgentSearchScopeResolver.prototype, "MJAIAgentSearchScope", null);
|
|
12078
|
+
__decorate([
|
|
12079
|
+
Mutation(() => MJAIAgentSearchScope_),
|
|
12080
|
+
__param(0, Arg('input', () => CreateMJAIAgentSearchScopeInput)),
|
|
12081
|
+
__param(1, Ctx()),
|
|
12082
|
+
__param(2, PubSub()),
|
|
12083
|
+
__metadata("design:type", Function),
|
|
12084
|
+
__metadata("design:paramtypes", [CreateMJAIAgentSearchScopeInput, Object, PubSubEngine]),
|
|
12085
|
+
__metadata("design:returntype", Promise)
|
|
12086
|
+
], MJAIAgentSearchScopeResolver.prototype, "CreateMJAIAgentSearchScope", null);
|
|
12087
|
+
__decorate([
|
|
12088
|
+
Mutation(() => MJAIAgentSearchScope_),
|
|
12089
|
+
__param(0, Arg('input', () => UpdateMJAIAgentSearchScopeInput)),
|
|
12090
|
+
__param(1, Ctx()),
|
|
12091
|
+
__param(2, PubSub()),
|
|
12092
|
+
__metadata("design:type", Function),
|
|
12093
|
+
__metadata("design:paramtypes", [UpdateMJAIAgentSearchScopeInput, Object, PubSubEngine]),
|
|
12094
|
+
__metadata("design:returntype", Promise)
|
|
12095
|
+
], MJAIAgentSearchScopeResolver.prototype, "UpdateMJAIAgentSearchScope", null);
|
|
12096
|
+
__decorate([
|
|
12097
|
+
Mutation(() => MJAIAgentSearchScope_),
|
|
12098
|
+
__param(0, Arg('ID', () => String)),
|
|
12099
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
12100
|
+
__param(2, Ctx()),
|
|
12101
|
+
__param(3, PubSub()),
|
|
12102
|
+
__metadata("design:type", Function),
|
|
12103
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
12104
|
+
__metadata("design:returntype", Promise)
|
|
12105
|
+
], MJAIAgentSearchScopeResolver.prototype, "DeleteMJAIAgentSearchScope", null);
|
|
12106
|
+
MJAIAgentSearchScopeResolver = __decorate([
|
|
12107
|
+
Resolver(MJAIAgentSearchScope_)
|
|
12108
|
+
], MJAIAgentSearchScopeResolver);
|
|
12109
|
+
export { MJAIAgentSearchScopeResolver };
|
|
12110
|
+
//****************************************************************************
|
|
11746
12111
|
// ENTITY CLASS for MJ: AI Agent Step Paths
|
|
11747
12112
|
//****************************************************************************
|
|
11748
12113
|
let MJAIAgentStepPath_ = class MJAIAgentStepPath_ {
|
|
@@ -13216,6 +13581,11 @@ __decorate([
|
|
|
13216
13581
|
MaxLength(36),
|
|
13217
13582
|
__metadata("design:type", String)
|
|
13218
13583
|
], MJAIAgent_.prototype, "DefaultStorageAccountID", void 0);
|
|
13584
|
+
__decorate([
|
|
13585
|
+
Field({ description: `Controls the agent's search capability. All = may use any scope including Global; search action does not restrict. Assigned = may use ONLY scopes explicitly linked via AIAgentSearchScope; scoped search action enforces this. None = agent has no search capability; the scoped search action rejects all requests.` }),
|
|
13586
|
+
MaxLength(20),
|
|
13587
|
+
__metadata("design:type", String)
|
|
13588
|
+
], MJAIAgent_.prototype, "SearchScopeAccess", void 0);
|
|
13219
13589
|
__decorate([
|
|
13220
13590
|
Field({ nullable: true }),
|
|
13221
13591
|
MaxLength(255),
|
|
@@ -13305,6 +13675,14 @@ __decorate([
|
|
|
13305
13675
|
Field(() => [MJAIAgentClientTool_]),
|
|
13306
13676
|
__metadata("design:type", Array)
|
|
13307
13677
|
], MJAIAgent_.prototype, "MJAIAgentClientTools_AgentIDArray", void 0);
|
|
13678
|
+
__decorate([
|
|
13679
|
+
Field(() => [MJAIAgentSearchScope_]),
|
|
13680
|
+
__metadata("design:type", Array)
|
|
13681
|
+
], MJAIAgent_.prototype, "MJAIAgentSearchScopes_AgentIDArray", void 0);
|
|
13682
|
+
__decorate([
|
|
13683
|
+
Field(() => [MJSearchExecutionLog_]),
|
|
13684
|
+
__metadata("design:type", Array)
|
|
13685
|
+
], MJAIAgent_.prototype, "MJSearchExecutionLogs_AIAgentIDArray", void 0);
|
|
13308
13686
|
__decorate([
|
|
13309
13687
|
Field(() => [MJAIAgentNote_]),
|
|
13310
13688
|
__metadata("design:type", Array)
|
|
@@ -13614,6 +13992,10 @@ __decorate([
|
|
|
13614
13992
|
Field({ nullable: true }),
|
|
13615
13993
|
__metadata("design:type", String)
|
|
13616
13994
|
], CreateMJAIAgentInput.prototype, "DefaultStorageAccountID", void 0);
|
|
13995
|
+
__decorate([
|
|
13996
|
+
Field({ nullable: true }),
|
|
13997
|
+
__metadata("design:type", String)
|
|
13998
|
+
], CreateMJAIAgentInput.prototype, "SearchScopeAccess", void 0);
|
|
13617
13999
|
__decorate([
|
|
13618
14000
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
13619
14001
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -13875,6 +14257,10 @@ __decorate([
|
|
|
13875
14257
|
Field({ nullable: true }),
|
|
13876
14258
|
__metadata("design:type", String)
|
|
13877
14259
|
], UpdateMJAIAgentInput.prototype, "DefaultStorageAccountID", void 0);
|
|
14260
|
+
__decorate([
|
|
14261
|
+
Field({ nullable: true }),
|
|
14262
|
+
__metadata("design:type", String)
|
|
14263
|
+
], UpdateMJAIAgentInput.prototype, "SearchScopeAccess", void 0);
|
|
13878
14264
|
__decorate([
|
|
13879
14265
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
13880
14266
|
__metadata("design:type", Array)
|
|
@@ -14034,6 +14420,22 @@ let MJAIAgentResolver = class MJAIAgentResolver extends ResolverBase {
|
|
|
14034
14420
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Client Tools', rows, this.GetUserFromPayload(userPayload));
|
|
14035
14421
|
return result;
|
|
14036
14422
|
}
|
|
14423
|
+
async MJAIAgentSearchScopes_AgentIDArray(mjaiagent_, { userPayload, providers }, pubSub) {
|
|
14424
|
+
this.CheckUserReadPermissions('MJ: AI Agent Search Scopes', userPayload);
|
|
14425
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14426
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentSearchScopes')} WHERE ${provider.QuoteIdentifier('AgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
14427
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14428
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Search Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
14429
|
+
return result;
|
|
14430
|
+
}
|
|
14431
|
+
async MJSearchExecutionLogs_AIAgentIDArray(mjaiagent_, { userPayload, providers }, pubSub) {
|
|
14432
|
+
this.CheckUserReadPermissions('MJ: Search Execution Logs', userPayload);
|
|
14433
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14434
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchExecutionLogs')} WHERE ${provider.QuoteIdentifier('AIAgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
14435
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14436
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Execution Logs', rows, this.GetUserFromPayload(userPayload));
|
|
14437
|
+
return result;
|
|
14438
|
+
}
|
|
14037
14439
|
async MJAIAgentNotes_AgentIDArray(mjaiagent_, { userPayload, providers }, pubSub) {
|
|
14038
14440
|
this.CheckUserReadPermissions('MJ: AI Agent Notes', userPayload);
|
|
14039
14441
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -14287,6 +14689,24 @@ __decorate([
|
|
|
14287
14689
|
__metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
|
|
14288
14690
|
__metadata("design:returntype", Promise)
|
|
14289
14691
|
], MJAIAgentResolver.prototype, "MJAIAgentClientTools_AgentIDArray", null);
|
|
14692
|
+
__decorate([
|
|
14693
|
+
FieldResolver(() => [MJAIAgentSearchScope_]),
|
|
14694
|
+
__param(0, Root()),
|
|
14695
|
+
__param(1, Ctx()),
|
|
14696
|
+
__param(2, PubSub()),
|
|
14697
|
+
__metadata("design:type", Function),
|
|
14698
|
+
__metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
|
|
14699
|
+
__metadata("design:returntype", Promise)
|
|
14700
|
+
], MJAIAgentResolver.prototype, "MJAIAgentSearchScopes_AgentIDArray", null);
|
|
14701
|
+
__decorate([
|
|
14702
|
+
FieldResolver(() => [MJSearchExecutionLog_]),
|
|
14703
|
+
__param(0, Root()),
|
|
14704
|
+
__param(1, Ctx()),
|
|
14705
|
+
__param(2, PubSub()),
|
|
14706
|
+
__metadata("design:type", Function),
|
|
14707
|
+
__metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
|
|
14708
|
+
__metadata("design:returntype", Promise)
|
|
14709
|
+
], MJAIAgentResolver.prototype, "MJSearchExecutionLogs_AIAgentIDArray", null);
|
|
14290
14710
|
__decorate([
|
|
14291
14711
|
FieldResolver(() => [MJAIAgentNote_]),
|
|
14292
14712
|
__param(0, Root()),
|
|
@@ -24078,8 +24498,8 @@ __decorate([
|
|
|
24078
24498
|
__metadata("design:type", String)
|
|
24079
24499
|
], MJAIResultCache_.prototype, "ConfigurationID", void 0);
|
|
24080
24500
|
__decorate([
|
|
24081
|
-
Field(
|
|
24082
|
-
__metadata("design:type",
|
|
24501
|
+
Field({ nullable: true, description: `Vector representation of the prompt for similarity matching.` }),
|
|
24502
|
+
__metadata("design:type", String)
|
|
24083
24503
|
], MJAIResultCache_.prototype, "PromptEmbedding", void 0);
|
|
24084
24504
|
__decorate([
|
|
24085
24505
|
Field({ nullable: true, description: `Reference to the AIPromptRun that created this cache entry.` }),
|
|
@@ -24170,8 +24590,8 @@ __decorate([
|
|
|
24170
24590
|
__metadata("design:type", String)
|
|
24171
24591
|
], CreateMJAIResultCacheInput.prototype, "ConfigurationID", void 0);
|
|
24172
24592
|
__decorate([
|
|
24173
|
-
Field(
|
|
24174
|
-
__metadata("design:type",
|
|
24593
|
+
Field({ nullable: true }),
|
|
24594
|
+
__metadata("design:type", String)
|
|
24175
24595
|
], CreateMJAIResultCacheInput.prototype, "PromptEmbedding", void 0);
|
|
24176
24596
|
__decorate([
|
|
24177
24597
|
Field({ nullable: true }),
|
|
@@ -24235,8 +24655,8 @@ __decorate([
|
|
|
24235
24655
|
__metadata("design:type", String)
|
|
24236
24656
|
], UpdateMJAIResultCacheInput.prototype, "ConfigurationID", void 0);
|
|
24237
24657
|
__decorate([
|
|
24238
|
-
Field(
|
|
24239
|
-
__metadata("design:type",
|
|
24658
|
+
Field({ nullable: true }),
|
|
24659
|
+
__metadata("design:type", String)
|
|
24240
24660
|
], UpdateMJAIResultCacheInput.prototype, "PromptEmbedding", void 0);
|
|
24241
24661
|
__decorate([
|
|
24242
24662
|
Field({ nullable: true }),
|
|
@@ -58203,6 +58623,10 @@ __decorate([
|
|
|
58203
58623
|
Field(() => [MJArchiveRunDetail_]),
|
|
58204
58624
|
__metadata("design:type", Array)
|
|
58205
58625
|
], MJEntity_.prototype, "MJArchiveRunDetails_EntityIDArray", void 0);
|
|
58626
|
+
__decorate([
|
|
58627
|
+
Field(() => [MJSearchScopeEntity_]),
|
|
58628
|
+
__metadata("design:type", Array)
|
|
58629
|
+
], MJEntity_.prototype, "MJSearchScopeEntities_EntityIDArray", void 0);
|
|
58206
58630
|
__decorate([
|
|
58207
58631
|
Field(() => [MJResourceType_]),
|
|
58208
58632
|
__metadata("design:type", Array)
|
|
@@ -59240,6 +59664,14 @@ let MJEntityResolverBase = class MJEntityResolverBase extends ResolverBase {
|
|
|
59240
59664
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
59241
59665
|
return result;
|
|
59242
59666
|
}
|
|
59667
|
+
async MJSearchScopeEntities_EntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
|
|
59668
|
+
this.CheckUserReadPermissions('MJ: Search Scope Entities', userPayload);
|
|
59669
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
59670
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeEntities')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
59671
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
59672
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Entities', rows, this.GetUserFromPayload(userPayload));
|
|
59673
|
+
return result;
|
|
59674
|
+
}
|
|
59243
59675
|
async MJResourceTypes_CategoryEntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
|
|
59244
59676
|
this.CheckUserReadPermissions('MJ: Resource Types', userPayload);
|
|
59245
59677
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -59816,6 +60248,15 @@ __decorate([
|
|
|
59816
60248
|
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
59817
60249
|
__metadata("design:returntype", Promise)
|
|
59818
60250
|
], MJEntityResolverBase.prototype, "MJArchiveRunDetails_EntityIDArray", null);
|
|
60251
|
+
__decorate([
|
|
60252
|
+
FieldResolver(() => [MJSearchScopeEntity_]),
|
|
60253
|
+
__param(0, Root()),
|
|
60254
|
+
__param(1, Ctx()),
|
|
60255
|
+
__param(2, PubSub()),
|
|
60256
|
+
__metadata("design:type", Function),
|
|
60257
|
+
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
60258
|
+
__metadata("design:returntype", Promise)
|
|
60259
|
+
], MJEntityResolverBase.prototype, "MJSearchScopeEntities_EntityIDArray", null);
|
|
59819
60260
|
__decorate([
|
|
59820
60261
|
FieldResolver(() => [MJResourceType_]),
|
|
59821
60262
|
__param(0, Root()),
|
|
@@ -63791,7 +64232,7 @@ __decorate([
|
|
|
63791
64232
|
__metadata("design:type", String)
|
|
63792
64233
|
], MJEntityField_.prototype, "GeneratedFormSection", void 0);
|
|
63793
64234
|
__decorate([
|
|
63794
|
-
Field(() => Boolean, { description: `
|
|
64235
|
+
Field(() => Boolean, { description: `When 1, this field is read-only at the API layer (excluded from spCreate / spUpdate / GraphQL input types). Set automatically when the column is either (a) not present in the base table — e.g., a joined name lookup in the base view, or (b) a SQL Server computed column or PostgreSQL generated column. Cases (a) and (b) are distinguished by the IsComputed flag: IsVirtual=1, IsComputed=0 means view-only; IsVirtual=1, IsComputed=1 means computed/generated and physically present in the base table.` }),
|
|
63795
64236
|
__metadata("design:type", Boolean)
|
|
63796
64237
|
], MJEntityField_.prototype, "IsVirtual", void 0);
|
|
63797
64238
|
__decorate([
|
|
@@ -63933,6 +64374,10 @@ __decorate([
|
|
|
63933
64374
|
Field(() => Boolean, { description: `When true (default), CodeGen can automatically suggest and apply ExtendedType values (GeoLatitude, GeoLongitude, GeoAddress, etc.) during LLM field categorization. Set to 0 to lock admin-specified ExtendedType.` }),
|
|
63934
64375
|
__metadata("design:type", Boolean)
|
|
63935
64376
|
], MJEntityField_.prototype, "AutoUpdateExtendedType", void 0);
|
|
64377
|
+
__decorate([
|
|
64378
|
+
Field(() => Boolean, { description: `When 1, this field is a SQL Server computed column or PostgreSQL generated column — physically present in the base table but read-only at the SQL layer. Distinct from IsVirtual, which means the column is not in the base table at all (e.g., joined name lookups in the base view). A computed column has both IsVirtual=1 (read-only at the API layer) and IsComputed=1 (physically in the table). The difference matters for base-view JOIN target selection: when an FK's related Name Field is computed, the generated view joins to the related entity's base table instead of its view.` }),
|
|
64379
|
+
__metadata("design:type", Boolean)
|
|
64380
|
+
], MJEntityField_.prototype, "IsComputed", void 0);
|
|
63936
64381
|
__decorate([
|
|
63937
64382
|
Field({ nullable: true }),
|
|
63938
64383
|
__metadata("design:type", String)
|
|
@@ -64206,6 +64651,10 @@ __decorate([
|
|
|
64206
64651
|
Field(() => Boolean, { nullable: true }),
|
|
64207
64652
|
__metadata("design:type", Boolean)
|
|
64208
64653
|
], CreateMJEntityFieldInput.prototype, "AutoUpdateExtendedType", void 0);
|
|
64654
|
+
__decorate([
|
|
64655
|
+
Field(() => Boolean, { nullable: true }),
|
|
64656
|
+
__metadata("design:type", Boolean)
|
|
64657
|
+
], CreateMJEntityFieldInput.prototype, "IsComputed", void 0);
|
|
64209
64658
|
__decorate([
|
|
64210
64659
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
64211
64660
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -64419,6 +64868,10 @@ __decorate([
|
|
|
64419
64868
|
Field(() => Boolean, { nullable: true }),
|
|
64420
64869
|
__metadata("design:type", Boolean)
|
|
64421
64870
|
], UpdateMJEntityFieldInput.prototype, "AutoUpdateExtendedType", void 0);
|
|
64871
|
+
__decorate([
|
|
64872
|
+
Field(() => Boolean, { nullable: true }),
|
|
64873
|
+
__metadata("design:type", Boolean)
|
|
64874
|
+
], UpdateMJEntityFieldInput.prototype, "IsComputed", void 0);
|
|
64422
64875
|
__decorate([
|
|
64423
64876
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
64424
64877
|
__metadata("design:type", Array)
|
|
@@ -69003,6 +69456,10 @@ __decorate([
|
|
|
69003
69456
|
Field(() => [MJArchiveConfiguration_]),
|
|
69004
69457
|
__metadata("design:type", Array)
|
|
69005
69458
|
], MJFileStorageAccount_.prototype, "MJArchiveConfigurations_StorageAccountIDArray", void 0);
|
|
69459
|
+
__decorate([
|
|
69460
|
+
Field(() => [MJSearchScopeStorageAccount_]),
|
|
69461
|
+
__metadata("design:type", Array)
|
|
69462
|
+
], MJFileStorageAccount_.prototype, "MJSearchScopeStorageAccounts_FileStorageAccountIDArray", void 0);
|
|
69006
69463
|
__decorate([
|
|
69007
69464
|
Field(() => [MJFileStorageAccountPermission_]),
|
|
69008
69465
|
__metadata("design:type", Array)
|
|
@@ -69172,6 +69629,14 @@ let MJFileStorageAccountResolver = class MJFileStorageAccountResolver extends Re
|
|
|
69172
69629
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Archive Configurations', rows, this.GetUserFromPayload(userPayload));
|
|
69173
69630
|
return result;
|
|
69174
69631
|
}
|
|
69632
|
+
async MJSearchScopeStorageAccounts_FileStorageAccountIDArray(mjfilestorageaccount_, { userPayload, providers }, pubSub) {
|
|
69633
|
+
this.CheckUserReadPermissions('MJ: Search Scope Storage Accounts', userPayload);
|
|
69634
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
69635
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeStorageAccounts')} WHERE ${provider.QuoteIdentifier('FileStorageAccountID')}='${mjfilestorageaccount_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Storage Accounts', userPayload, EntityPermissionType.Read, 'AND');
|
|
69636
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
69637
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Storage Accounts', rows, this.GetUserFromPayload(userPayload));
|
|
69638
|
+
return result;
|
|
69639
|
+
}
|
|
69175
69640
|
async MJFileStorageAccountPermissions_FileStorageAccountIDArray(mjfilestorageaccount_, { userPayload, providers }, pubSub) {
|
|
69176
69641
|
this.CheckUserReadPermissions('MJ: File Storage Account Permissions', userPayload);
|
|
69177
69642
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -69264,6 +69729,15 @@ __decorate([
|
|
|
69264
69729
|
__metadata("design:paramtypes", [MJFileStorageAccount_, Object, PubSubEngine]),
|
|
69265
69730
|
__metadata("design:returntype", Promise)
|
|
69266
69731
|
], MJFileStorageAccountResolver.prototype, "MJArchiveConfigurations_StorageAccountIDArray", null);
|
|
69732
|
+
__decorate([
|
|
69733
|
+
FieldResolver(() => [MJSearchScopeStorageAccount_]),
|
|
69734
|
+
__param(0, Root()),
|
|
69735
|
+
__param(1, Ctx()),
|
|
69736
|
+
__param(2, PubSub()),
|
|
69737
|
+
__metadata("design:type", Function),
|
|
69738
|
+
__metadata("design:paramtypes", [MJFileStorageAccount_, Object, PubSubEngine]),
|
|
69739
|
+
__metadata("design:returntype", Promise)
|
|
69740
|
+
], MJFileStorageAccountResolver.prototype, "MJSearchScopeStorageAccounts_FileStorageAccountIDArray", null);
|
|
69267
69741
|
__decorate([
|
|
69268
69742
|
FieldResolver(() => [MJFileStorageAccountPermission_]),
|
|
69269
69743
|
__param(0, Root()),
|
|
@@ -92135,6 +92609,10 @@ __decorate([
|
|
|
92135
92609
|
Field(() => [MJAIAgentPermission_]),
|
|
92136
92610
|
__metadata("design:type", Array)
|
|
92137
92611
|
], MJRole_.prototype, "MJAIAgentPermissions_RoleIDArray", void 0);
|
|
92612
|
+
__decorate([
|
|
92613
|
+
Field(() => [MJSearchScopePermission_]),
|
|
92614
|
+
__metadata("design:type", Array)
|
|
92615
|
+
], MJRole_.prototype, "MJSearchScopePermissions_RoleIDArray", void 0);
|
|
92138
92616
|
MJRole_ = __decorate([
|
|
92139
92617
|
ObjectType({ description: `Roles are used for security administration and can have zero to many Users as members` })
|
|
92140
92618
|
], MJRole_);
|
|
@@ -92356,6 +92834,14 @@ let MJRoleResolver = class MJRoleResolver extends ResolverBase {
|
|
|
92356
92834
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
92357
92835
|
return result;
|
|
92358
92836
|
}
|
|
92837
|
+
async MJSearchScopePermissions_RoleIDArray(mjrole_, { userPayload, providers }, pubSub) {
|
|
92838
|
+
this.CheckUserReadPermissions('MJ: Search Scope Permissions', userPayload);
|
|
92839
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
92840
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopePermissions')} WHERE ${provider.QuoteIdentifier('RoleID')}='${mjrole_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
92841
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
92842
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
92843
|
+
return result;
|
|
92844
|
+
}
|
|
92359
92845
|
async CreateMJRole(input, { providers, userPayload }, pubSub) {
|
|
92360
92846
|
const provider = GetReadWriteProvider(providers);
|
|
92361
92847
|
return this.CreateRecord('MJ: Roles', input, provider, userPayload, pubSub);
|
|
@@ -92504,6 +92990,15 @@ __decorate([
|
|
|
92504
92990
|
__metadata("design:paramtypes", [MJRole_, Object, PubSubEngine]),
|
|
92505
92991
|
__metadata("design:returntype", Promise)
|
|
92506
92992
|
], MJRoleResolver.prototype, "MJAIAgentPermissions_RoleIDArray", null);
|
|
92993
|
+
__decorate([
|
|
92994
|
+
FieldResolver(() => [MJSearchScopePermission_]),
|
|
92995
|
+
__param(0, Root()),
|
|
92996
|
+
__param(1, Ctx()),
|
|
92997
|
+
__param(2, PubSub()),
|
|
92998
|
+
__metadata("design:type", Function),
|
|
92999
|
+
__metadata("design:paramtypes", [MJRole_, Object, PubSubEngine]),
|
|
93000
|
+
__metadata("design:returntype", Promise)
|
|
93001
|
+
], MJRoleResolver.prototype, "MJSearchScopePermissions_RoleIDArray", null);
|
|
92507
93002
|
__decorate([
|
|
92508
93003
|
Mutation(() => MJRole_),
|
|
92509
93004
|
__param(0, Arg('input', () => CreateMJRoleInput)),
|
|
@@ -95086,6 +95581,360 @@ MJSchemaInfoResolver = __decorate([
|
|
|
95086
95581
|
], MJSchemaInfoResolver);
|
|
95087
95582
|
export { MJSchemaInfoResolver };
|
|
95088
95583
|
//****************************************************************************
|
|
95584
|
+
// ENTITY CLASS for MJ: Search Execution Logs
|
|
95585
|
+
//****************************************************************************
|
|
95586
|
+
let MJSearchExecutionLog_ = class MJSearchExecutionLog_ {
|
|
95587
|
+
};
|
|
95588
|
+
__decorate([
|
|
95589
|
+
Field(),
|
|
95590
|
+
MaxLength(36),
|
|
95591
|
+
__metadata("design:type", String)
|
|
95592
|
+
], MJSearchExecutionLog_.prototype, "ID", void 0);
|
|
95593
|
+
__decorate([
|
|
95594
|
+
Field({ nullable: true, description: `The SearchScope this invocation targeted. NULL for unscoped global search.` }),
|
|
95595
|
+
MaxLength(36),
|
|
95596
|
+
__metadata("design:type", String)
|
|
95597
|
+
], MJSearchExecutionLog_.prototype, "SearchScopeID", void 0);
|
|
95598
|
+
__decorate([
|
|
95599
|
+
Field({ nullable: true, description: `The User who initiated the search. NULL for system / unauthenticated callers.` }),
|
|
95600
|
+
MaxLength(36),
|
|
95601
|
+
__metadata("design:type", String)
|
|
95602
|
+
], MJSearchExecutionLog_.prototype, "UserID", void 0);
|
|
95603
|
+
__decorate([
|
|
95604
|
+
Field({ nullable: true, description: `The AIAgent identity if the search was invoked from an agent (e.g. ScopedSearchAction). NULL for direct human-initiated searches.` }),
|
|
95605
|
+
MaxLength(36),
|
|
95606
|
+
__metadata("design:type", String)
|
|
95607
|
+
], MJSearchExecutionLog_.prototype, "AIAgentID", void 0);
|
|
95608
|
+
__decorate([
|
|
95609
|
+
Field({ description: `Raw query string the user / agent submitted. NVARCHAR(MAX) because some queries are long (full sentences, snippets). Stored verbatim for analytics — do NOT rely on this for permission decisions.` }),
|
|
95610
|
+
__metadata("design:type", String)
|
|
95611
|
+
], MJSearchExecutionLog_.prototype, "Query", void 0);
|
|
95612
|
+
__decorate([
|
|
95613
|
+
Field(() => Int, { description: `End-to-end search duration in milliseconds, measured at the SearchEngine.search call boundary (provider runs + fusion + rerank + permission filter + enrichment).` }),
|
|
95614
|
+
__metadata("design:type", Number)
|
|
95615
|
+
], MJSearchExecutionLog_.prototype, "TotalDurationMs", void 0);
|
|
95616
|
+
__decorate([
|
|
95617
|
+
Field(() => Int, { description: `Number of results returned to the caller after permission filtering, deduplication, and score-threshold trimming. Use this as the hit-rate denominator (rows where ResultCount > 0).` }),
|
|
95618
|
+
__metadata("design:type", Number)
|
|
95619
|
+
], MJSearchExecutionLog_.prototype, "ResultCount", void 0);
|
|
95620
|
+
__decorate([
|
|
95621
|
+
Field({ nullable: true, description: `BaseReRanker.Name of the reranker that ran (e.g. 'Cohere', 'Voyage', 'OpenAI', 'BGE', 'NoopReRanker'). NULL when no rerank stage executed for this invocation.` }),
|
|
95622
|
+
MaxLength(100),
|
|
95623
|
+
__metadata("design:type", String)
|
|
95624
|
+
], MJSearchExecutionLog_.prototype, "RerankerName", void 0);
|
|
95625
|
+
__decorate([
|
|
95626
|
+
Field(() => Float, { nullable: true, description: `Total reranker spend in cents for this invocation, populated from the BaseReRanker.CostReporter callback via RerankerBudgetGuard. NULL when no rerank ran or no real-provider cost was incurred (Noop / BGE).` }),
|
|
95627
|
+
__metadata("design:type", Number)
|
|
95628
|
+
], MJSearchExecutionLog_.prototype, "RerankerCostCents", void 0);
|
|
95629
|
+
__decorate([
|
|
95630
|
+
Field({ description: `Outcome of the search: 'Success' (results returned, possibly empty), 'Failure' (an exception bubbled out — see FailureReason), 'Forbidden' (the caller lacked SearchScopePermission for the requested scope). Constrained by CK_SearchExecutionLog_Status.` }),
|
|
95631
|
+
MaxLength(20),
|
|
95632
|
+
__metadata("design:type", String)
|
|
95633
|
+
], MJSearchExecutionLog_.prototype, "Status", void 0);
|
|
95634
|
+
__decorate([
|
|
95635
|
+
Field({ nullable: true, description: `Short human-readable failure reason when Status = 'Failure' or 'Forbidden'. NULL on success.` }),
|
|
95636
|
+
MaxLength(500),
|
|
95637
|
+
__metadata("design:type", String)
|
|
95638
|
+
], MJSearchExecutionLog_.prototype, "FailureReason", void 0);
|
|
95639
|
+
__decorate([
|
|
95640
|
+
Field({ nullable: true, description: `JSON array of per-provider breakdown entries: [{"Provider":"Vector","DurationMs":123,"ResultCount":5,"ErrorMessage":null}, ...]. Used by the analytics dashboard for p50/p95 latency-by-provider charts and to spot consistently slow providers.` }),
|
|
95641
|
+
__metadata("design:type", String)
|
|
95642
|
+
], MJSearchExecutionLog_.prototype, "ProvidersJSON", void 0);
|
|
95643
|
+
__decorate([
|
|
95644
|
+
Field(),
|
|
95645
|
+
__metadata("design:type", Date)
|
|
95646
|
+
], MJSearchExecutionLog_.prototype, "_mj__CreatedAt", void 0);
|
|
95647
|
+
__decorate([
|
|
95648
|
+
Field(),
|
|
95649
|
+
__metadata("design:type", Date)
|
|
95650
|
+
], MJSearchExecutionLog_.prototype, "_mj__UpdatedAt", void 0);
|
|
95651
|
+
__decorate([
|
|
95652
|
+
Field({ nullable: true }),
|
|
95653
|
+
MaxLength(200),
|
|
95654
|
+
__metadata("design:type", String)
|
|
95655
|
+
], MJSearchExecutionLog_.prototype, "SearchScope", void 0);
|
|
95656
|
+
__decorate([
|
|
95657
|
+
Field({ nullable: true }),
|
|
95658
|
+
MaxLength(100),
|
|
95659
|
+
__metadata("design:type", String)
|
|
95660
|
+
], MJSearchExecutionLog_.prototype, "User", void 0);
|
|
95661
|
+
__decorate([
|
|
95662
|
+
Field({ nullable: true }),
|
|
95663
|
+
MaxLength(255),
|
|
95664
|
+
__metadata("design:type", String)
|
|
95665
|
+
], MJSearchExecutionLog_.prototype, "AIAgent", void 0);
|
|
95666
|
+
MJSearchExecutionLog_ = __decorate([
|
|
95667
|
+
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).` })
|
|
95668
|
+
], MJSearchExecutionLog_);
|
|
95669
|
+
export { MJSearchExecutionLog_ };
|
|
95670
|
+
//****************************************************************************
|
|
95671
|
+
// INPUT TYPE for MJ: Search Execution Logs
|
|
95672
|
+
//****************************************************************************
|
|
95673
|
+
let CreateMJSearchExecutionLogInput = class CreateMJSearchExecutionLogInput {
|
|
95674
|
+
};
|
|
95675
|
+
__decorate([
|
|
95676
|
+
Field({ nullable: true }),
|
|
95677
|
+
__metadata("design:type", String)
|
|
95678
|
+
], CreateMJSearchExecutionLogInput.prototype, "ID", void 0);
|
|
95679
|
+
__decorate([
|
|
95680
|
+
Field({ nullable: true }),
|
|
95681
|
+
__metadata("design:type", String)
|
|
95682
|
+
], CreateMJSearchExecutionLogInput.prototype, "SearchScopeID", void 0);
|
|
95683
|
+
__decorate([
|
|
95684
|
+
Field({ nullable: true }),
|
|
95685
|
+
__metadata("design:type", String)
|
|
95686
|
+
], CreateMJSearchExecutionLogInput.prototype, "UserID", void 0);
|
|
95687
|
+
__decorate([
|
|
95688
|
+
Field({ nullable: true }),
|
|
95689
|
+
__metadata("design:type", String)
|
|
95690
|
+
], CreateMJSearchExecutionLogInput.prototype, "AIAgentID", void 0);
|
|
95691
|
+
__decorate([
|
|
95692
|
+
Field({ nullable: true }),
|
|
95693
|
+
__metadata("design:type", String)
|
|
95694
|
+
], CreateMJSearchExecutionLogInput.prototype, "Query", void 0);
|
|
95695
|
+
__decorate([
|
|
95696
|
+
Field(() => Int, { nullable: true }),
|
|
95697
|
+
__metadata("design:type", Number)
|
|
95698
|
+
], CreateMJSearchExecutionLogInput.prototype, "TotalDurationMs", void 0);
|
|
95699
|
+
__decorate([
|
|
95700
|
+
Field(() => Int, { nullable: true }),
|
|
95701
|
+
__metadata("design:type", Number)
|
|
95702
|
+
], CreateMJSearchExecutionLogInput.prototype, "ResultCount", void 0);
|
|
95703
|
+
__decorate([
|
|
95704
|
+
Field({ nullable: true }),
|
|
95705
|
+
__metadata("design:type", String)
|
|
95706
|
+
], CreateMJSearchExecutionLogInput.prototype, "RerankerName", void 0);
|
|
95707
|
+
__decorate([
|
|
95708
|
+
Field(() => Float, { nullable: true }),
|
|
95709
|
+
__metadata("design:type", Number)
|
|
95710
|
+
], CreateMJSearchExecutionLogInput.prototype, "RerankerCostCents", void 0);
|
|
95711
|
+
__decorate([
|
|
95712
|
+
Field({ nullable: true }),
|
|
95713
|
+
__metadata("design:type", String)
|
|
95714
|
+
], CreateMJSearchExecutionLogInput.prototype, "Status", void 0);
|
|
95715
|
+
__decorate([
|
|
95716
|
+
Field({ nullable: true }),
|
|
95717
|
+
__metadata("design:type", String)
|
|
95718
|
+
], CreateMJSearchExecutionLogInput.prototype, "FailureReason", void 0);
|
|
95719
|
+
__decorate([
|
|
95720
|
+
Field({ nullable: true }),
|
|
95721
|
+
__metadata("design:type", String)
|
|
95722
|
+
], CreateMJSearchExecutionLogInput.prototype, "ProvidersJSON", void 0);
|
|
95723
|
+
__decorate([
|
|
95724
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
95725
|
+
__metadata("design:type", RestoreContextInput)
|
|
95726
|
+
], CreateMJSearchExecutionLogInput.prototype, "RestoreContext___", void 0);
|
|
95727
|
+
CreateMJSearchExecutionLogInput = __decorate([
|
|
95728
|
+
InputType()
|
|
95729
|
+
], CreateMJSearchExecutionLogInput);
|
|
95730
|
+
export { CreateMJSearchExecutionLogInput };
|
|
95731
|
+
//****************************************************************************
|
|
95732
|
+
// INPUT TYPE for MJ: Search Execution Logs
|
|
95733
|
+
//****************************************************************************
|
|
95734
|
+
let UpdateMJSearchExecutionLogInput = class UpdateMJSearchExecutionLogInput {
|
|
95735
|
+
};
|
|
95736
|
+
__decorate([
|
|
95737
|
+
Field(),
|
|
95738
|
+
__metadata("design:type", String)
|
|
95739
|
+
], UpdateMJSearchExecutionLogInput.prototype, "ID", void 0);
|
|
95740
|
+
__decorate([
|
|
95741
|
+
Field({ nullable: true }),
|
|
95742
|
+
__metadata("design:type", String)
|
|
95743
|
+
], UpdateMJSearchExecutionLogInput.prototype, "SearchScopeID", void 0);
|
|
95744
|
+
__decorate([
|
|
95745
|
+
Field({ nullable: true }),
|
|
95746
|
+
__metadata("design:type", String)
|
|
95747
|
+
], UpdateMJSearchExecutionLogInput.prototype, "UserID", void 0);
|
|
95748
|
+
__decorate([
|
|
95749
|
+
Field({ nullable: true }),
|
|
95750
|
+
__metadata("design:type", String)
|
|
95751
|
+
], UpdateMJSearchExecutionLogInput.prototype, "AIAgentID", void 0);
|
|
95752
|
+
__decorate([
|
|
95753
|
+
Field({ nullable: true }),
|
|
95754
|
+
__metadata("design:type", String)
|
|
95755
|
+
], UpdateMJSearchExecutionLogInput.prototype, "Query", void 0);
|
|
95756
|
+
__decorate([
|
|
95757
|
+
Field(() => Int, { nullable: true }),
|
|
95758
|
+
__metadata("design:type", Number)
|
|
95759
|
+
], UpdateMJSearchExecutionLogInput.prototype, "TotalDurationMs", void 0);
|
|
95760
|
+
__decorate([
|
|
95761
|
+
Field(() => Int, { nullable: true }),
|
|
95762
|
+
__metadata("design:type", Number)
|
|
95763
|
+
], UpdateMJSearchExecutionLogInput.prototype, "ResultCount", void 0);
|
|
95764
|
+
__decorate([
|
|
95765
|
+
Field({ nullable: true }),
|
|
95766
|
+
__metadata("design:type", String)
|
|
95767
|
+
], UpdateMJSearchExecutionLogInput.prototype, "RerankerName", void 0);
|
|
95768
|
+
__decorate([
|
|
95769
|
+
Field(() => Float, { nullable: true }),
|
|
95770
|
+
__metadata("design:type", Number)
|
|
95771
|
+
], UpdateMJSearchExecutionLogInput.prototype, "RerankerCostCents", void 0);
|
|
95772
|
+
__decorate([
|
|
95773
|
+
Field({ nullable: true }),
|
|
95774
|
+
__metadata("design:type", String)
|
|
95775
|
+
], UpdateMJSearchExecutionLogInput.prototype, "Status", void 0);
|
|
95776
|
+
__decorate([
|
|
95777
|
+
Field({ nullable: true }),
|
|
95778
|
+
__metadata("design:type", String)
|
|
95779
|
+
], UpdateMJSearchExecutionLogInput.prototype, "FailureReason", void 0);
|
|
95780
|
+
__decorate([
|
|
95781
|
+
Field({ nullable: true }),
|
|
95782
|
+
__metadata("design:type", String)
|
|
95783
|
+
], UpdateMJSearchExecutionLogInput.prototype, "ProvidersJSON", void 0);
|
|
95784
|
+
__decorate([
|
|
95785
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
95786
|
+
__metadata("design:type", Array)
|
|
95787
|
+
], UpdateMJSearchExecutionLogInput.prototype, "OldValues___", void 0);
|
|
95788
|
+
__decorate([
|
|
95789
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
95790
|
+
__metadata("design:type", RestoreContextInput)
|
|
95791
|
+
], UpdateMJSearchExecutionLogInput.prototype, "RestoreContext___", void 0);
|
|
95792
|
+
UpdateMJSearchExecutionLogInput = __decorate([
|
|
95793
|
+
InputType()
|
|
95794
|
+
], UpdateMJSearchExecutionLogInput);
|
|
95795
|
+
export { UpdateMJSearchExecutionLogInput };
|
|
95796
|
+
//****************************************************************************
|
|
95797
|
+
// RESOLVER for MJ: Search Execution Logs
|
|
95798
|
+
//****************************************************************************
|
|
95799
|
+
let RunMJSearchExecutionLogViewResult = class RunMJSearchExecutionLogViewResult {
|
|
95800
|
+
};
|
|
95801
|
+
__decorate([
|
|
95802
|
+
Field(() => [MJSearchExecutionLog_]),
|
|
95803
|
+
__metadata("design:type", Array)
|
|
95804
|
+
], RunMJSearchExecutionLogViewResult.prototype, "Results", void 0);
|
|
95805
|
+
__decorate([
|
|
95806
|
+
Field(() => String, { nullable: true }),
|
|
95807
|
+
__metadata("design:type", String)
|
|
95808
|
+
], RunMJSearchExecutionLogViewResult.prototype, "UserViewRunID", void 0);
|
|
95809
|
+
__decorate([
|
|
95810
|
+
Field(() => Int, { nullable: true }),
|
|
95811
|
+
__metadata("design:type", Number)
|
|
95812
|
+
], RunMJSearchExecutionLogViewResult.prototype, "RowCount", void 0);
|
|
95813
|
+
__decorate([
|
|
95814
|
+
Field(() => Int, { nullable: true }),
|
|
95815
|
+
__metadata("design:type", Number)
|
|
95816
|
+
], RunMJSearchExecutionLogViewResult.prototype, "TotalRowCount", void 0);
|
|
95817
|
+
__decorate([
|
|
95818
|
+
Field(() => Int, { nullable: true }),
|
|
95819
|
+
__metadata("design:type", Number)
|
|
95820
|
+
], RunMJSearchExecutionLogViewResult.prototype, "ExecutionTime", void 0);
|
|
95821
|
+
__decorate([
|
|
95822
|
+
Field({ nullable: true }),
|
|
95823
|
+
__metadata("design:type", String)
|
|
95824
|
+
], RunMJSearchExecutionLogViewResult.prototype, "ErrorMessage", void 0);
|
|
95825
|
+
__decorate([
|
|
95826
|
+
Field(() => Boolean, { nullable: false }),
|
|
95827
|
+
__metadata("design:type", Boolean)
|
|
95828
|
+
], RunMJSearchExecutionLogViewResult.prototype, "Success", void 0);
|
|
95829
|
+
RunMJSearchExecutionLogViewResult = __decorate([
|
|
95830
|
+
ObjectType()
|
|
95831
|
+
], RunMJSearchExecutionLogViewResult);
|
|
95832
|
+
export { RunMJSearchExecutionLogViewResult };
|
|
95833
|
+
let MJSearchExecutionLogResolver = class MJSearchExecutionLogResolver extends ResolverBase {
|
|
95834
|
+
async RunMJSearchExecutionLogViewByID(input, { providers, userPayload }, pubSub) {
|
|
95835
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95836
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
95837
|
+
}
|
|
95838
|
+
async RunMJSearchExecutionLogViewByName(input, { providers, userPayload }, pubSub) {
|
|
95839
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95840
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
95841
|
+
}
|
|
95842
|
+
async RunMJSearchExecutionLogDynamicView(input, { providers, userPayload }, pubSub) {
|
|
95843
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95844
|
+
input.EntityName = 'MJ: Search Execution Logs';
|
|
95845
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
95846
|
+
}
|
|
95847
|
+
async MJSearchExecutionLog(ID, { userPayload, providers }, pubSub) {
|
|
95848
|
+
this.CheckUserReadPermissions('MJ: Search Execution Logs', userPayload);
|
|
95849
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95850
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchExecutionLogs')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
95851
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
95852
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Execution Logs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
95853
|
+
return result;
|
|
95854
|
+
}
|
|
95855
|
+
async CreateMJSearchExecutionLog(input, { providers, userPayload }, pubSub) {
|
|
95856
|
+
const provider = GetReadWriteProvider(providers);
|
|
95857
|
+
return this.CreateRecord('MJ: Search Execution Logs', input, provider, userPayload, pubSub);
|
|
95858
|
+
}
|
|
95859
|
+
async UpdateMJSearchExecutionLog(input, { providers, userPayload }, pubSub) {
|
|
95860
|
+
const provider = GetReadWriteProvider(providers);
|
|
95861
|
+
return this.UpdateRecord('MJ: Search Execution Logs', input, provider, userPayload, pubSub);
|
|
95862
|
+
}
|
|
95863
|
+
async DeleteMJSearchExecutionLog(ID, options, { providers, userPayload }, pubSub) {
|
|
95864
|
+
const provider = GetReadWriteProvider(providers);
|
|
95865
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
95866
|
+
return this.DeleteRecord('MJ: Search Execution Logs', key, options, provider, userPayload, pubSub);
|
|
95867
|
+
}
|
|
95868
|
+
};
|
|
95869
|
+
__decorate([
|
|
95870
|
+
Query(() => RunMJSearchExecutionLogViewResult),
|
|
95871
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
95872
|
+
__param(1, Ctx()),
|
|
95873
|
+
__param(2, PubSub()),
|
|
95874
|
+
__metadata("design:type", Function),
|
|
95875
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
95876
|
+
__metadata("design:returntype", Promise)
|
|
95877
|
+
], MJSearchExecutionLogResolver.prototype, "RunMJSearchExecutionLogViewByID", null);
|
|
95878
|
+
__decorate([
|
|
95879
|
+
Query(() => RunMJSearchExecutionLogViewResult),
|
|
95880
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
95881
|
+
__param(1, Ctx()),
|
|
95882
|
+
__param(2, PubSub()),
|
|
95883
|
+
__metadata("design:type", Function),
|
|
95884
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
95885
|
+
__metadata("design:returntype", Promise)
|
|
95886
|
+
], MJSearchExecutionLogResolver.prototype, "RunMJSearchExecutionLogViewByName", null);
|
|
95887
|
+
__decorate([
|
|
95888
|
+
Query(() => RunMJSearchExecutionLogViewResult),
|
|
95889
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
95890
|
+
__param(1, Ctx()),
|
|
95891
|
+
__param(2, PubSub()),
|
|
95892
|
+
__metadata("design:type", Function),
|
|
95893
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
95894
|
+
__metadata("design:returntype", Promise)
|
|
95895
|
+
], MJSearchExecutionLogResolver.prototype, "RunMJSearchExecutionLogDynamicView", null);
|
|
95896
|
+
__decorate([
|
|
95897
|
+
Query(() => MJSearchExecutionLog_, { nullable: true }),
|
|
95898
|
+
__param(0, Arg('ID', () => String)),
|
|
95899
|
+
__param(1, Ctx()),
|
|
95900
|
+
__param(2, PubSub()),
|
|
95901
|
+
__metadata("design:type", Function),
|
|
95902
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
95903
|
+
__metadata("design:returntype", Promise)
|
|
95904
|
+
], MJSearchExecutionLogResolver.prototype, "MJSearchExecutionLog", null);
|
|
95905
|
+
__decorate([
|
|
95906
|
+
Mutation(() => MJSearchExecutionLog_),
|
|
95907
|
+
__param(0, Arg('input', () => CreateMJSearchExecutionLogInput)),
|
|
95908
|
+
__param(1, Ctx()),
|
|
95909
|
+
__param(2, PubSub()),
|
|
95910
|
+
__metadata("design:type", Function),
|
|
95911
|
+
__metadata("design:paramtypes", [CreateMJSearchExecutionLogInput, Object, PubSubEngine]),
|
|
95912
|
+
__metadata("design:returntype", Promise)
|
|
95913
|
+
], MJSearchExecutionLogResolver.prototype, "CreateMJSearchExecutionLog", null);
|
|
95914
|
+
__decorate([
|
|
95915
|
+
Mutation(() => MJSearchExecutionLog_),
|
|
95916
|
+
__param(0, Arg('input', () => UpdateMJSearchExecutionLogInput)),
|
|
95917
|
+
__param(1, Ctx()),
|
|
95918
|
+
__param(2, PubSub()),
|
|
95919
|
+
__metadata("design:type", Function),
|
|
95920
|
+
__metadata("design:paramtypes", [UpdateMJSearchExecutionLogInput, Object, PubSubEngine]),
|
|
95921
|
+
__metadata("design:returntype", Promise)
|
|
95922
|
+
], MJSearchExecutionLogResolver.prototype, "UpdateMJSearchExecutionLog", null);
|
|
95923
|
+
__decorate([
|
|
95924
|
+
Mutation(() => MJSearchExecutionLog_),
|
|
95925
|
+
__param(0, Arg('ID', () => String)),
|
|
95926
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
95927
|
+
__param(2, Ctx()),
|
|
95928
|
+
__param(3, PubSub()),
|
|
95929
|
+
__metadata("design:type", Function),
|
|
95930
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
95931
|
+
__metadata("design:returntype", Promise)
|
|
95932
|
+
], MJSearchExecutionLogResolver.prototype, "DeleteMJSearchExecutionLog", null);
|
|
95933
|
+
MJSearchExecutionLogResolver = __decorate([
|
|
95934
|
+
Resolver(MJSearchExecutionLog_)
|
|
95935
|
+
], MJSearchExecutionLogResolver);
|
|
95936
|
+
export { MJSearchExecutionLogResolver };
|
|
95937
|
+
//****************************************************************************
|
|
95089
95938
|
// ENTITY CLASS for MJ: Search Providers
|
|
95090
95939
|
//****************************************************************************
|
|
95091
95940
|
let MJSearchProvider_ = class MJSearchProvider_ {
|
|
@@ -95162,273 +96011,2455 @@ __decorate([
|
|
|
95162
96011
|
MaxLength(200),
|
|
95163
96012
|
__metadata("design:type", String)
|
|
95164
96013
|
], MJSearchProvider_.prototype, "Credential", void 0);
|
|
96014
|
+
__decorate([
|
|
96015
|
+
Field(() => [MJSearchScopeProvider_]),
|
|
96016
|
+
__metadata("design:type", Array)
|
|
96017
|
+
], MJSearchProvider_.prototype, "MJSearchScopeProviders_SearchProviderIDArray", void 0);
|
|
95165
96018
|
MJSearchProvider_ = __decorate([
|
|
95166
96019
|
ObjectType()
|
|
95167
96020
|
], MJSearchProvider_);
|
|
95168
96021
|
export { MJSearchProvider_ };
|
|
95169
96022
|
//****************************************************************************
|
|
95170
|
-
// INPUT TYPE for MJ: Search Providers
|
|
96023
|
+
// INPUT TYPE for MJ: Search Providers
|
|
96024
|
+
//****************************************************************************
|
|
96025
|
+
let CreateMJSearchProviderInput = class CreateMJSearchProviderInput {
|
|
96026
|
+
};
|
|
96027
|
+
__decorate([
|
|
96028
|
+
Field({ nullable: true }),
|
|
96029
|
+
__metadata("design:type", String)
|
|
96030
|
+
], CreateMJSearchProviderInput.prototype, "ID", void 0);
|
|
96031
|
+
__decorate([
|
|
96032
|
+
Field({ nullable: true }),
|
|
96033
|
+
__metadata("design:type", String)
|
|
96034
|
+
], CreateMJSearchProviderInput.prototype, "Name", void 0);
|
|
96035
|
+
__decorate([
|
|
96036
|
+
Field({ nullable: true }),
|
|
96037
|
+
__metadata("design:type", String)
|
|
96038
|
+
], CreateMJSearchProviderInput.prototype, "Description", void 0);
|
|
96039
|
+
__decorate([
|
|
96040
|
+
Field({ nullable: true }),
|
|
96041
|
+
__metadata("design:type", String)
|
|
96042
|
+
], CreateMJSearchProviderInput.prototype, "DriverClass", void 0);
|
|
96043
|
+
__decorate([
|
|
96044
|
+
Field({ nullable: true }),
|
|
96045
|
+
__metadata("design:type", String)
|
|
96046
|
+
], CreateMJSearchProviderInput.prototype, "Status", void 0);
|
|
96047
|
+
__decorate([
|
|
96048
|
+
Field(() => Int, { nullable: true }),
|
|
96049
|
+
__metadata("design:type", Number)
|
|
96050
|
+
], CreateMJSearchProviderInput.prototype, "Priority", void 0);
|
|
96051
|
+
__decorate([
|
|
96052
|
+
Field(() => Boolean, { nullable: true }),
|
|
96053
|
+
__metadata("design:type", Boolean)
|
|
96054
|
+
], CreateMJSearchProviderInput.prototype, "SupportsPreview", void 0);
|
|
96055
|
+
__decorate([
|
|
96056
|
+
Field(() => Int, { nullable: true }),
|
|
96057
|
+
__metadata("design:type", Number)
|
|
96058
|
+
], CreateMJSearchProviderInput.prototype, "MaxResultsOverride", void 0);
|
|
96059
|
+
__decorate([
|
|
96060
|
+
Field({ nullable: true }),
|
|
96061
|
+
__metadata("design:type", String)
|
|
96062
|
+
], CreateMJSearchProviderInput.prototype, "ProviderConfig", void 0);
|
|
96063
|
+
__decorate([
|
|
96064
|
+
Field({ nullable: true }),
|
|
96065
|
+
__metadata("design:type", String)
|
|
96066
|
+
], CreateMJSearchProviderInput.prototype, "CredentialID", void 0);
|
|
96067
|
+
__decorate([
|
|
96068
|
+
Field({ nullable: true }),
|
|
96069
|
+
__metadata("design:type", String)
|
|
96070
|
+
], CreateMJSearchProviderInput.prototype, "DisplayName", void 0);
|
|
96071
|
+
__decorate([
|
|
96072
|
+
Field({ nullable: true }),
|
|
96073
|
+
__metadata("design:type", String)
|
|
96074
|
+
], CreateMJSearchProviderInput.prototype, "Icon", void 0);
|
|
96075
|
+
__decorate([
|
|
96076
|
+
Field({ nullable: true }),
|
|
96077
|
+
__metadata("design:type", String)
|
|
96078
|
+
], CreateMJSearchProviderInput.prototype, "Comments", void 0);
|
|
96079
|
+
__decorate([
|
|
96080
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
96081
|
+
__metadata("design:type", RestoreContextInput)
|
|
96082
|
+
], CreateMJSearchProviderInput.prototype, "RestoreContext___", void 0);
|
|
96083
|
+
CreateMJSearchProviderInput = __decorate([
|
|
96084
|
+
InputType()
|
|
96085
|
+
], CreateMJSearchProviderInput);
|
|
96086
|
+
export { CreateMJSearchProviderInput };
|
|
96087
|
+
//****************************************************************************
|
|
96088
|
+
// INPUT TYPE for MJ: Search Providers
|
|
96089
|
+
//****************************************************************************
|
|
96090
|
+
let UpdateMJSearchProviderInput = class UpdateMJSearchProviderInput {
|
|
96091
|
+
};
|
|
96092
|
+
__decorate([
|
|
96093
|
+
Field(),
|
|
96094
|
+
__metadata("design:type", String)
|
|
96095
|
+
], UpdateMJSearchProviderInput.prototype, "ID", void 0);
|
|
96096
|
+
__decorate([
|
|
96097
|
+
Field({ nullable: true }),
|
|
96098
|
+
__metadata("design:type", String)
|
|
96099
|
+
], UpdateMJSearchProviderInput.prototype, "Name", void 0);
|
|
96100
|
+
__decorate([
|
|
96101
|
+
Field({ nullable: true }),
|
|
96102
|
+
__metadata("design:type", String)
|
|
96103
|
+
], UpdateMJSearchProviderInput.prototype, "Description", void 0);
|
|
96104
|
+
__decorate([
|
|
96105
|
+
Field({ nullable: true }),
|
|
96106
|
+
__metadata("design:type", String)
|
|
96107
|
+
], UpdateMJSearchProviderInput.prototype, "DriverClass", void 0);
|
|
96108
|
+
__decorate([
|
|
96109
|
+
Field({ nullable: true }),
|
|
96110
|
+
__metadata("design:type", String)
|
|
96111
|
+
], UpdateMJSearchProviderInput.prototype, "Status", void 0);
|
|
96112
|
+
__decorate([
|
|
96113
|
+
Field(() => Int, { nullable: true }),
|
|
96114
|
+
__metadata("design:type", Number)
|
|
96115
|
+
], UpdateMJSearchProviderInput.prototype, "Priority", void 0);
|
|
96116
|
+
__decorate([
|
|
96117
|
+
Field(() => Boolean, { nullable: true }),
|
|
96118
|
+
__metadata("design:type", Boolean)
|
|
96119
|
+
], UpdateMJSearchProviderInput.prototype, "SupportsPreview", void 0);
|
|
96120
|
+
__decorate([
|
|
96121
|
+
Field(() => Int, { nullable: true }),
|
|
96122
|
+
__metadata("design:type", Number)
|
|
96123
|
+
], UpdateMJSearchProviderInput.prototype, "MaxResultsOverride", void 0);
|
|
96124
|
+
__decorate([
|
|
96125
|
+
Field({ nullable: true }),
|
|
96126
|
+
__metadata("design:type", String)
|
|
96127
|
+
], UpdateMJSearchProviderInput.prototype, "ProviderConfig", void 0);
|
|
96128
|
+
__decorate([
|
|
96129
|
+
Field({ nullable: true }),
|
|
96130
|
+
__metadata("design:type", String)
|
|
96131
|
+
], UpdateMJSearchProviderInput.prototype, "CredentialID", void 0);
|
|
96132
|
+
__decorate([
|
|
96133
|
+
Field({ nullable: true }),
|
|
96134
|
+
__metadata("design:type", String)
|
|
96135
|
+
], UpdateMJSearchProviderInput.prototype, "DisplayName", void 0);
|
|
96136
|
+
__decorate([
|
|
96137
|
+
Field({ nullable: true }),
|
|
96138
|
+
__metadata("design:type", String)
|
|
96139
|
+
], UpdateMJSearchProviderInput.prototype, "Icon", void 0);
|
|
96140
|
+
__decorate([
|
|
96141
|
+
Field({ nullable: true }),
|
|
96142
|
+
__metadata("design:type", String)
|
|
96143
|
+
], UpdateMJSearchProviderInput.prototype, "Comments", void 0);
|
|
96144
|
+
__decorate([
|
|
96145
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
96146
|
+
__metadata("design:type", Array)
|
|
96147
|
+
], UpdateMJSearchProviderInput.prototype, "OldValues___", void 0);
|
|
96148
|
+
__decorate([
|
|
96149
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
96150
|
+
__metadata("design:type", RestoreContextInput)
|
|
96151
|
+
], UpdateMJSearchProviderInput.prototype, "RestoreContext___", void 0);
|
|
96152
|
+
UpdateMJSearchProviderInput = __decorate([
|
|
96153
|
+
InputType()
|
|
96154
|
+
], UpdateMJSearchProviderInput);
|
|
96155
|
+
export { UpdateMJSearchProviderInput };
|
|
96156
|
+
//****************************************************************************
|
|
96157
|
+
// RESOLVER for MJ: Search Providers
|
|
96158
|
+
//****************************************************************************
|
|
96159
|
+
let RunMJSearchProviderViewResult = class RunMJSearchProviderViewResult {
|
|
96160
|
+
};
|
|
96161
|
+
__decorate([
|
|
96162
|
+
Field(() => [MJSearchProvider_]),
|
|
96163
|
+
__metadata("design:type", Array)
|
|
96164
|
+
], RunMJSearchProviderViewResult.prototype, "Results", void 0);
|
|
96165
|
+
__decorate([
|
|
96166
|
+
Field(() => String, { nullable: true }),
|
|
96167
|
+
__metadata("design:type", String)
|
|
96168
|
+
], RunMJSearchProviderViewResult.prototype, "UserViewRunID", void 0);
|
|
96169
|
+
__decorate([
|
|
96170
|
+
Field(() => Int, { nullable: true }),
|
|
96171
|
+
__metadata("design:type", Number)
|
|
96172
|
+
], RunMJSearchProviderViewResult.prototype, "RowCount", void 0);
|
|
96173
|
+
__decorate([
|
|
96174
|
+
Field(() => Int, { nullable: true }),
|
|
96175
|
+
__metadata("design:type", Number)
|
|
96176
|
+
], RunMJSearchProviderViewResult.prototype, "TotalRowCount", void 0);
|
|
96177
|
+
__decorate([
|
|
96178
|
+
Field(() => Int, { nullable: true }),
|
|
96179
|
+
__metadata("design:type", Number)
|
|
96180
|
+
], RunMJSearchProviderViewResult.prototype, "ExecutionTime", void 0);
|
|
96181
|
+
__decorate([
|
|
96182
|
+
Field({ nullable: true }),
|
|
96183
|
+
__metadata("design:type", String)
|
|
96184
|
+
], RunMJSearchProviderViewResult.prototype, "ErrorMessage", void 0);
|
|
96185
|
+
__decorate([
|
|
96186
|
+
Field(() => Boolean, { nullable: false }),
|
|
96187
|
+
__metadata("design:type", Boolean)
|
|
96188
|
+
], RunMJSearchProviderViewResult.prototype, "Success", void 0);
|
|
96189
|
+
RunMJSearchProviderViewResult = __decorate([
|
|
96190
|
+
ObjectType()
|
|
96191
|
+
], RunMJSearchProviderViewResult);
|
|
96192
|
+
export { RunMJSearchProviderViewResult };
|
|
96193
|
+
let MJSearchProviderResolver = class MJSearchProviderResolver extends ResolverBase {
|
|
96194
|
+
async RunMJSearchProviderViewByID(input, { providers, userPayload }, pubSub) {
|
|
96195
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96196
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
96197
|
+
}
|
|
96198
|
+
async RunMJSearchProviderViewByName(input, { providers, userPayload }, pubSub) {
|
|
96199
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96200
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
96201
|
+
}
|
|
96202
|
+
async RunMJSearchProviderDynamicView(input, { providers, userPayload }, pubSub) {
|
|
96203
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96204
|
+
input.EntityName = 'MJ: Search Providers';
|
|
96205
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
96206
|
+
}
|
|
96207
|
+
async MJSearchProvider(ID, { userPayload, providers }, pubSub) {
|
|
96208
|
+
this.CheckUserReadPermissions('MJ: Search Providers', userPayload);
|
|
96209
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96210
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchProviders')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Providers', userPayload, EntityPermissionType.Read, 'AND');
|
|
96211
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
96212
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Providers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
96213
|
+
return result;
|
|
96214
|
+
}
|
|
96215
|
+
async MJSearchScopeProviders_SearchProviderIDArray(mjsearchprovider_, { userPayload, providers }, pubSub) {
|
|
96216
|
+
this.CheckUserReadPermissions('MJ: Search Scope Providers', userPayload);
|
|
96217
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96218
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeProviders')} WHERE ${provider.QuoteIdentifier('SearchProviderID')}='${mjsearchprovider_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Providers', userPayload, EntityPermissionType.Read, 'AND');
|
|
96219
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
96220
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Providers', rows, this.GetUserFromPayload(userPayload));
|
|
96221
|
+
return result;
|
|
96222
|
+
}
|
|
96223
|
+
async CreateMJSearchProvider(input, { providers, userPayload }, pubSub) {
|
|
96224
|
+
const provider = GetReadWriteProvider(providers);
|
|
96225
|
+
return this.CreateRecord('MJ: Search Providers', input, provider, userPayload, pubSub);
|
|
96226
|
+
}
|
|
96227
|
+
async UpdateMJSearchProvider(input, { providers, userPayload }, pubSub) {
|
|
96228
|
+
const provider = GetReadWriteProvider(providers);
|
|
96229
|
+
return this.UpdateRecord('MJ: Search Providers', input, provider, userPayload, pubSub);
|
|
96230
|
+
}
|
|
96231
|
+
async DeleteMJSearchProvider(ID, options, { providers, userPayload }, pubSub) {
|
|
96232
|
+
const provider = GetReadWriteProvider(providers);
|
|
96233
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
96234
|
+
return this.DeleteRecord('MJ: Search Providers', key, options, provider, userPayload, pubSub);
|
|
96235
|
+
}
|
|
96236
|
+
};
|
|
96237
|
+
__decorate([
|
|
96238
|
+
Query(() => RunMJSearchProviderViewResult),
|
|
96239
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
96240
|
+
__param(1, Ctx()),
|
|
96241
|
+
__param(2, PubSub()),
|
|
96242
|
+
__metadata("design:type", Function),
|
|
96243
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
96244
|
+
__metadata("design:returntype", Promise)
|
|
96245
|
+
], MJSearchProviderResolver.prototype, "RunMJSearchProviderViewByID", null);
|
|
96246
|
+
__decorate([
|
|
96247
|
+
Query(() => RunMJSearchProviderViewResult),
|
|
96248
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
96249
|
+
__param(1, Ctx()),
|
|
96250
|
+
__param(2, PubSub()),
|
|
96251
|
+
__metadata("design:type", Function),
|
|
96252
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
96253
|
+
__metadata("design:returntype", Promise)
|
|
96254
|
+
], MJSearchProviderResolver.prototype, "RunMJSearchProviderViewByName", null);
|
|
96255
|
+
__decorate([
|
|
96256
|
+
Query(() => RunMJSearchProviderViewResult),
|
|
96257
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
96258
|
+
__param(1, Ctx()),
|
|
96259
|
+
__param(2, PubSub()),
|
|
96260
|
+
__metadata("design:type", Function),
|
|
96261
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
96262
|
+
__metadata("design:returntype", Promise)
|
|
96263
|
+
], MJSearchProviderResolver.prototype, "RunMJSearchProviderDynamicView", null);
|
|
96264
|
+
__decorate([
|
|
96265
|
+
Query(() => MJSearchProvider_, { nullable: true }),
|
|
96266
|
+
__param(0, Arg('ID', () => String)),
|
|
96267
|
+
__param(1, Ctx()),
|
|
96268
|
+
__param(2, PubSub()),
|
|
96269
|
+
__metadata("design:type", Function),
|
|
96270
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
96271
|
+
__metadata("design:returntype", Promise)
|
|
96272
|
+
], MJSearchProviderResolver.prototype, "MJSearchProvider", null);
|
|
96273
|
+
__decorate([
|
|
96274
|
+
FieldResolver(() => [MJSearchScopeProvider_]),
|
|
96275
|
+
__param(0, Root()),
|
|
96276
|
+
__param(1, Ctx()),
|
|
96277
|
+
__param(2, PubSub()),
|
|
96278
|
+
__metadata("design:type", Function),
|
|
96279
|
+
__metadata("design:paramtypes", [MJSearchProvider_, Object, PubSubEngine]),
|
|
96280
|
+
__metadata("design:returntype", Promise)
|
|
96281
|
+
], MJSearchProviderResolver.prototype, "MJSearchScopeProviders_SearchProviderIDArray", null);
|
|
96282
|
+
__decorate([
|
|
96283
|
+
Mutation(() => MJSearchProvider_),
|
|
96284
|
+
__param(0, Arg('input', () => CreateMJSearchProviderInput)),
|
|
96285
|
+
__param(1, Ctx()),
|
|
96286
|
+
__param(2, PubSub()),
|
|
96287
|
+
__metadata("design:type", Function),
|
|
96288
|
+
__metadata("design:paramtypes", [CreateMJSearchProviderInput, Object, PubSubEngine]),
|
|
96289
|
+
__metadata("design:returntype", Promise)
|
|
96290
|
+
], MJSearchProviderResolver.prototype, "CreateMJSearchProvider", null);
|
|
96291
|
+
__decorate([
|
|
96292
|
+
Mutation(() => MJSearchProvider_),
|
|
96293
|
+
__param(0, Arg('input', () => UpdateMJSearchProviderInput)),
|
|
96294
|
+
__param(1, Ctx()),
|
|
96295
|
+
__param(2, PubSub()),
|
|
96296
|
+
__metadata("design:type", Function),
|
|
96297
|
+
__metadata("design:paramtypes", [UpdateMJSearchProviderInput, Object, PubSubEngine]),
|
|
96298
|
+
__metadata("design:returntype", Promise)
|
|
96299
|
+
], MJSearchProviderResolver.prototype, "UpdateMJSearchProvider", null);
|
|
96300
|
+
__decorate([
|
|
96301
|
+
Mutation(() => MJSearchProvider_),
|
|
96302
|
+
__param(0, Arg('ID', () => String)),
|
|
96303
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
96304
|
+
__param(2, Ctx()),
|
|
96305
|
+
__param(3, PubSub()),
|
|
96306
|
+
__metadata("design:type", Function),
|
|
96307
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
96308
|
+
__metadata("design:returntype", Promise)
|
|
96309
|
+
], MJSearchProviderResolver.prototype, "DeleteMJSearchProvider", null);
|
|
96310
|
+
MJSearchProviderResolver = __decorate([
|
|
96311
|
+
Resolver(MJSearchProvider_)
|
|
96312
|
+
], MJSearchProviderResolver);
|
|
96313
|
+
export { MJSearchProviderResolver };
|
|
96314
|
+
//****************************************************************************
|
|
96315
|
+
// ENTITY CLASS for MJ: Search Scope Entities
|
|
96316
|
+
//****************************************************************************
|
|
96317
|
+
let MJSearchScopeEntity_ = class MJSearchScopeEntity_ {
|
|
96318
|
+
};
|
|
96319
|
+
__decorate([
|
|
96320
|
+
Field(),
|
|
96321
|
+
MaxLength(36),
|
|
96322
|
+
__metadata("design:type", String)
|
|
96323
|
+
], MJSearchScopeEntity_.prototype, "ID", void 0);
|
|
96324
|
+
__decorate([
|
|
96325
|
+
Field(),
|
|
96326
|
+
MaxLength(36),
|
|
96327
|
+
__metadata("design:type", String)
|
|
96328
|
+
], MJSearchScopeEntity_.prototype, "SearchScopeID", void 0);
|
|
96329
|
+
__decorate([
|
|
96330
|
+
Field(),
|
|
96331
|
+
MaxLength(36),
|
|
96332
|
+
__metadata("design:type", String)
|
|
96333
|
+
], MJSearchScopeEntity_.prototype, "EntityID", void 0);
|
|
96334
|
+
__decorate([
|
|
96335
|
+
Field({ nullable: true, description: `Optional SQL filter applied to this entity's search within this scope. Example: Status='Published' AND DepartmentID='abc'. Rendered as a Nunjucks template with SearchContext variables for multi-tenant filtering.` }),
|
|
96336
|
+
__metadata("design:type", String)
|
|
96337
|
+
], MJSearchScopeEntity_.prototype, "ExtraFilter", void 0);
|
|
96338
|
+
__decorate([
|
|
96339
|
+
Field({ nullable: true, description: `Optional override for the UserSearchString passed to RunView for this entity within this scope. Nunjucks template (e.g., "{{ query }} AND type:policy"). NULL = pass the user's actual query through as-is.` }),
|
|
96340
|
+
__metadata("design:type", String)
|
|
96341
|
+
], MJSearchScopeEntity_.prototype, "UserSearchString", void 0);
|
|
96342
|
+
__decorate([
|
|
96343
|
+
Field(),
|
|
96344
|
+
__metadata("design:type", Date)
|
|
96345
|
+
], MJSearchScopeEntity_.prototype, "_mj__CreatedAt", void 0);
|
|
96346
|
+
__decorate([
|
|
96347
|
+
Field(),
|
|
96348
|
+
__metadata("design:type", Date)
|
|
96349
|
+
], MJSearchScopeEntity_.prototype, "_mj__UpdatedAt", void 0);
|
|
96350
|
+
__decorate([
|
|
96351
|
+
Field(),
|
|
96352
|
+
MaxLength(200),
|
|
96353
|
+
__metadata("design:type", String)
|
|
96354
|
+
], MJSearchScopeEntity_.prototype, "SearchScope", void 0);
|
|
96355
|
+
__decorate([
|
|
96356
|
+
Field(),
|
|
96357
|
+
MaxLength(255),
|
|
96358
|
+
__metadata("design:type", String)
|
|
96359
|
+
], MJSearchScopeEntity_.prototype, "Entity", void 0);
|
|
96360
|
+
MJSearchScopeEntity_ = __decorate([
|
|
96361
|
+
ObjectType({ description: `Controls which entities participate in entity and full-text search within a scope, with optional per-entity filter and user-search-string overrides.` })
|
|
96362
|
+
], MJSearchScopeEntity_);
|
|
96363
|
+
export { MJSearchScopeEntity_ };
|
|
96364
|
+
//****************************************************************************
|
|
96365
|
+
// INPUT TYPE for MJ: Search Scope Entities
|
|
96366
|
+
//****************************************************************************
|
|
96367
|
+
let CreateMJSearchScopeEntityInput = class CreateMJSearchScopeEntityInput {
|
|
96368
|
+
};
|
|
96369
|
+
__decorate([
|
|
96370
|
+
Field({ nullable: true }),
|
|
96371
|
+
__metadata("design:type", String)
|
|
96372
|
+
], CreateMJSearchScopeEntityInput.prototype, "ID", void 0);
|
|
96373
|
+
__decorate([
|
|
96374
|
+
Field({ nullable: true }),
|
|
96375
|
+
__metadata("design:type", String)
|
|
96376
|
+
], CreateMJSearchScopeEntityInput.prototype, "SearchScopeID", void 0);
|
|
96377
|
+
__decorate([
|
|
96378
|
+
Field({ nullable: true }),
|
|
96379
|
+
__metadata("design:type", String)
|
|
96380
|
+
], CreateMJSearchScopeEntityInput.prototype, "EntityID", void 0);
|
|
96381
|
+
__decorate([
|
|
96382
|
+
Field({ nullable: true }),
|
|
96383
|
+
__metadata("design:type", String)
|
|
96384
|
+
], CreateMJSearchScopeEntityInput.prototype, "ExtraFilter", void 0);
|
|
96385
|
+
__decorate([
|
|
96386
|
+
Field({ nullable: true }),
|
|
96387
|
+
__metadata("design:type", String)
|
|
96388
|
+
], CreateMJSearchScopeEntityInput.prototype, "UserSearchString", void 0);
|
|
96389
|
+
__decorate([
|
|
96390
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
96391
|
+
__metadata("design:type", RestoreContextInput)
|
|
96392
|
+
], CreateMJSearchScopeEntityInput.prototype, "RestoreContext___", void 0);
|
|
96393
|
+
CreateMJSearchScopeEntityInput = __decorate([
|
|
96394
|
+
InputType()
|
|
96395
|
+
], CreateMJSearchScopeEntityInput);
|
|
96396
|
+
export { CreateMJSearchScopeEntityInput };
|
|
96397
|
+
//****************************************************************************
|
|
96398
|
+
// INPUT TYPE for MJ: Search Scope Entities
|
|
96399
|
+
//****************************************************************************
|
|
96400
|
+
let UpdateMJSearchScopeEntityInput = class UpdateMJSearchScopeEntityInput {
|
|
96401
|
+
};
|
|
96402
|
+
__decorate([
|
|
96403
|
+
Field(),
|
|
96404
|
+
__metadata("design:type", String)
|
|
96405
|
+
], UpdateMJSearchScopeEntityInput.prototype, "ID", void 0);
|
|
96406
|
+
__decorate([
|
|
96407
|
+
Field({ nullable: true }),
|
|
96408
|
+
__metadata("design:type", String)
|
|
96409
|
+
], UpdateMJSearchScopeEntityInput.prototype, "SearchScopeID", void 0);
|
|
96410
|
+
__decorate([
|
|
96411
|
+
Field({ nullable: true }),
|
|
96412
|
+
__metadata("design:type", String)
|
|
96413
|
+
], UpdateMJSearchScopeEntityInput.prototype, "EntityID", void 0);
|
|
96414
|
+
__decorate([
|
|
96415
|
+
Field({ nullable: true }),
|
|
96416
|
+
__metadata("design:type", String)
|
|
96417
|
+
], UpdateMJSearchScopeEntityInput.prototype, "ExtraFilter", void 0);
|
|
96418
|
+
__decorate([
|
|
96419
|
+
Field({ nullable: true }),
|
|
96420
|
+
__metadata("design:type", String)
|
|
96421
|
+
], UpdateMJSearchScopeEntityInput.prototype, "UserSearchString", void 0);
|
|
96422
|
+
__decorate([
|
|
96423
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
96424
|
+
__metadata("design:type", Array)
|
|
96425
|
+
], UpdateMJSearchScopeEntityInput.prototype, "OldValues___", void 0);
|
|
96426
|
+
__decorate([
|
|
96427
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
96428
|
+
__metadata("design:type", RestoreContextInput)
|
|
96429
|
+
], UpdateMJSearchScopeEntityInput.prototype, "RestoreContext___", void 0);
|
|
96430
|
+
UpdateMJSearchScopeEntityInput = __decorate([
|
|
96431
|
+
InputType()
|
|
96432
|
+
], UpdateMJSearchScopeEntityInput);
|
|
96433
|
+
export { UpdateMJSearchScopeEntityInput };
|
|
96434
|
+
//****************************************************************************
|
|
96435
|
+
// RESOLVER for MJ: Search Scope Entities
|
|
96436
|
+
//****************************************************************************
|
|
96437
|
+
let RunMJSearchScopeEntityViewResult = class RunMJSearchScopeEntityViewResult {
|
|
96438
|
+
};
|
|
96439
|
+
__decorate([
|
|
96440
|
+
Field(() => [MJSearchScopeEntity_]),
|
|
96441
|
+
__metadata("design:type", Array)
|
|
96442
|
+
], RunMJSearchScopeEntityViewResult.prototype, "Results", void 0);
|
|
96443
|
+
__decorate([
|
|
96444
|
+
Field(() => String, { nullable: true }),
|
|
96445
|
+
__metadata("design:type", String)
|
|
96446
|
+
], RunMJSearchScopeEntityViewResult.prototype, "UserViewRunID", void 0);
|
|
96447
|
+
__decorate([
|
|
96448
|
+
Field(() => Int, { nullable: true }),
|
|
96449
|
+
__metadata("design:type", Number)
|
|
96450
|
+
], RunMJSearchScopeEntityViewResult.prototype, "RowCount", void 0);
|
|
96451
|
+
__decorate([
|
|
96452
|
+
Field(() => Int, { nullable: true }),
|
|
96453
|
+
__metadata("design:type", Number)
|
|
96454
|
+
], RunMJSearchScopeEntityViewResult.prototype, "TotalRowCount", void 0);
|
|
96455
|
+
__decorate([
|
|
96456
|
+
Field(() => Int, { nullable: true }),
|
|
96457
|
+
__metadata("design:type", Number)
|
|
96458
|
+
], RunMJSearchScopeEntityViewResult.prototype, "ExecutionTime", void 0);
|
|
96459
|
+
__decorate([
|
|
96460
|
+
Field({ nullable: true }),
|
|
96461
|
+
__metadata("design:type", String)
|
|
96462
|
+
], RunMJSearchScopeEntityViewResult.prototype, "ErrorMessage", void 0);
|
|
96463
|
+
__decorate([
|
|
96464
|
+
Field(() => Boolean, { nullable: false }),
|
|
96465
|
+
__metadata("design:type", Boolean)
|
|
96466
|
+
], RunMJSearchScopeEntityViewResult.prototype, "Success", void 0);
|
|
96467
|
+
RunMJSearchScopeEntityViewResult = __decorate([
|
|
96468
|
+
ObjectType()
|
|
96469
|
+
], RunMJSearchScopeEntityViewResult);
|
|
96470
|
+
export { RunMJSearchScopeEntityViewResult };
|
|
96471
|
+
let MJSearchScopeEntityResolver = class MJSearchScopeEntityResolver extends ResolverBase {
|
|
96472
|
+
async RunMJSearchScopeEntityViewByID(input, { providers, userPayload }, pubSub) {
|
|
96473
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96474
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
96475
|
+
}
|
|
96476
|
+
async RunMJSearchScopeEntityViewByName(input, { providers, userPayload }, pubSub) {
|
|
96477
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96478
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
96479
|
+
}
|
|
96480
|
+
async RunMJSearchScopeEntityDynamicView(input, { providers, userPayload }, pubSub) {
|
|
96481
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96482
|
+
input.EntityName = 'MJ: Search Scope Entities';
|
|
96483
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
96484
|
+
}
|
|
96485
|
+
async MJSearchScopeEntity(ID, { userPayload, providers }, pubSub) {
|
|
96486
|
+
this.CheckUserReadPermissions('MJ: Search Scope Entities', userPayload);
|
|
96487
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96488
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeEntities')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
96489
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
96490
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Scope Entities', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
96491
|
+
return result;
|
|
96492
|
+
}
|
|
96493
|
+
async CreateMJSearchScopeEntity(input, { providers, userPayload }, pubSub) {
|
|
96494
|
+
const provider = GetReadWriteProvider(providers);
|
|
96495
|
+
return this.CreateRecord('MJ: Search Scope Entities', input, provider, userPayload, pubSub);
|
|
96496
|
+
}
|
|
96497
|
+
async UpdateMJSearchScopeEntity(input, { providers, userPayload }, pubSub) {
|
|
96498
|
+
const provider = GetReadWriteProvider(providers);
|
|
96499
|
+
return this.UpdateRecord('MJ: Search Scope Entities', input, provider, userPayload, pubSub);
|
|
96500
|
+
}
|
|
96501
|
+
async DeleteMJSearchScopeEntity(ID, options, { providers, userPayload }, pubSub) {
|
|
96502
|
+
const provider = GetReadWriteProvider(providers);
|
|
96503
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
96504
|
+
return this.DeleteRecord('MJ: Search Scope Entities', key, options, provider, userPayload, pubSub);
|
|
96505
|
+
}
|
|
96506
|
+
};
|
|
96507
|
+
__decorate([
|
|
96508
|
+
Query(() => RunMJSearchScopeEntityViewResult),
|
|
96509
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
96510
|
+
__param(1, Ctx()),
|
|
96511
|
+
__param(2, PubSub()),
|
|
96512
|
+
__metadata("design:type", Function),
|
|
96513
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
96514
|
+
__metadata("design:returntype", Promise)
|
|
96515
|
+
], MJSearchScopeEntityResolver.prototype, "RunMJSearchScopeEntityViewByID", null);
|
|
96516
|
+
__decorate([
|
|
96517
|
+
Query(() => RunMJSearchScopeEntityViewResult),
|
|
96518
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
96519
|
+
__param(1, Ctx()),
|
|
96520
|
+
__param(2, PubSub()),
|
|
96521
|
+
__metadata("design:type", Function),
|
|
96522
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
96523
|
+
__metadata("design:returntype", Promise)
|
|
96524
|
+
], MJSearchScopeEntityResolver.prototype, "RunMJSearchScopeEntityViewByName", null);
|
|
96525
|
+
__decorate([
|
|
96526
|
+
Query(() => RunMJSearchScopeEntityViewResult),
|
|
96527
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
96528
|
+
__param(1, Ctx()),
|
|
96529
|
+
__param(2, PubSub()),
|
|
96530
|
+
__metadata("design:type", Function),
|
|
96531
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
96532
|
+
__metadata("design:returntype", Promise)
|
|
96533
|
+
], MJSearchScopeEntityResolver.prototype, "RunMJSearchScopeEntityDynamicView", null);
|
|
96534
|
+
__decorate([
|
|
96535
|
+
Query(() => MJSearchScopeEntity_, { nullable: true }),
|
|
96536
|
+
__param(0, Arg('ID', () => String)),
|
|
96537
|
+
__param(1, Ctx()),
|
|
96538
|
+
__param(2, PubSub()),
|
|
96539
|
+
__metadata("design:type", Function),
|
|
96540
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
96541
|
+
__metadata("design:returntype", Promise)
|
|
96542
|
+
], MJSearchScopeEntityResolver.prototype, "MJSearchScopeEntity", null);
|
|
96543
|
+
__decorate([
|
|
96544
|
+
Mutation(() => MJSearchScopeEntity_),
|
|
96545
|
+
__param(0, Arg('input', () => CreateMJSearchScopeEntityInput)),
|
|
96546
|
+
__param(1, Ctx()),
|
|
96547
|
+
__param(2, PubSub()),
|
|
96548
|
+
__metadata("design:type", Function),
|
|
96549
|
+
__metadata("design:paramtypes", [CreateMJSearchScopeEntityInput, Object, PubSubEngine]),
|
|
96550
|
+
__metadata("design:returntype", Promise)
|
|
96551
|
+
], MJSearchScopeEntityResolver.prototype, "CreateMJSearchScopeEntity", null);
|
|
96552
|
+
__decorate([
|
|
96553
|
+
Mutation(() => MJSearchScopeEntity_),
|
|
96554
|
+
__param(0, Arg('input', () => UpdateMJSearchScopeEntityInput)),
|
|
96555
|
+
__param(1, Ctx()),
|
|
96556
|
+
__param(2, PubSub()),
|
|
96557
|
+
__metadata("design:type", Function),
|
|
96558
|
+
__metadata("design:paramtypes", [UpdateMJSearchScopeEntityInput, Object, PubSubEngine]),
|
|
96559
|
+
__metadata("design:returntype", Promise)
|
|
96560
|
+
], MJSearchScopeEntityResolver.prototype, "UpdateMJSearchScopeEntity", null);
|
|
96561
|
+
__decorate([
|
|
96562
|
+
Mutation(() => MJSearchScopeEntity_),
|
|
96563
|
+
__param(0, Arg('ID', () => String)),
|
|
96564
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
96565
|
+
__param(2, Ctx()),
|
|
96566
|
+
__param(3, PubSub()),
|
|
96567
|
+
__metadata("design:type", Function),
|
|
96568
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
96569
|
+
__metadata("design:returntype", Promise)
|
|
96570
|
+
], MJSearchScopeEntityResolver.prototype, "DeleteMJSearchScopeEntity", null);
|
|
96571
|
+
MJSearchScopeEntityResolver = __decorate([
|
|
96572
|
+
Resolver(MJSearchScopeEntity_)
|
|
96573
|
+
], MJSearchScopeEntityResolver);
|
|
96574
|
+
export { MJSearchScopeEntityResolver };
|
|
96575
|
+
//****************************************************************************
|
|
96576
|
+
// ENTITY CLASS for MJ: Search Scope External Indexes
|
|
96577
|
+
//****************************************************************************
|
|
96578
|
+
let MJSearchScopeExternalIndex_ = class MJSearchScopeExternalIndex_ {
|
|
96579
|
+
};
|
|
96580
|
+
__decorate([
|
|
96581
|
+
Field(),
|
|
96582
|
+
MaxLength(36),
|
|
96583
|
+
__metadata("design:type", String)
|
|
96584
|
+
], MJSearchScopeExternalIndex_.prototype, "ID", void 0);
|
|
96585
|
+
__decorate([
|
|
96586
|
+
Field(),
|
|
96587
|
+
MaxLength(36),
|
|
96588
|
+
__metadata("design:type", String)
|
|
96589
|
+
], MJSearchScopeExternalIndex_.prototype, "SearchScopeID", void 0);
|
|
96590
|
+
__decorate([
|
|
96591
|
+
Field({ description: `Discriminator. Determines which provider class consumes this row: Vector | Elasticsearch | Typesense | AzureAISearch | OpenSearch | Other.` }),
|
|
96592
|
+
MaxLength(40),
|
|
96593
|
+
__metadata("design:type", String)
|
|
96594
|
+
], MJSearchScopeExternalIndex_.prototype, "IndexType", void 0);
|
|
96595
|
+
__decorate([
|
|
96596
|
+
Field({ nullable: true, description: `FK to VectorIndex. REQUIRED when IndexType='Vector'. NULL for all other IndexType values.` }),
|
|
96597
|
+
MaxLength(36),
|
|
96598
|
+
__metadata("design:type", String)
|
|
96599
|
+
], MJSearchScopeExternalIndex_.prototype, "VectorIndexID", void 0);
|
|
96600
|
+
__decorate([
|
|
96601
|
+
Field({ nullable: true, description: `For non-vector IndexTypes: the remote engine's index/collection/alias name (e.g., Elasticsearch index "kb_docs_v3", Typesense collection "articles"). NULL for IndexType='Vector' (VectorIndexID resolves the name instead).` }),
|
|
96602
|
+
MaxLength(400),
|
|
96603
|
+
__metadata("design:type", String)
|
|
96604
|
+
], MJSearchScopeExternalIndex_.prototype, "ExternalIndexName", void 0);
|
|
96605
|
+
__decorate([
|
|
96606
|
+
Field({ nullable: true, description: `JSON with extra connection/config hints the provider needs (cluster alias, routing key, custom analyzer, etc.). Provider-interpreted.` }),
|
|
96607
|
+
__metadata("design:type", String)
|
|
96608
|
+
], MJSearchScopeExternalIndex_.prototype, "ExternalIndexConfig", void 0);
|
|
96609
|
+
__decorate([
|
|
96610
|
+
Field({ nullable: true, description: `JSON filter expression applied as a native metadata filter on the remote engine. Pinecone/Qdrant/PGVector metadata filter, or Elasticsearch filter DSL, etc. Rendered as a Nunjucks template so SearchContext.PrimaryScopeRecordID and SearchContext.SecondaryScopes.* can be interpolated for multi-tenant filtering.` }),
|
|
96611
|
+
__metadata("design:type", String)
|
|
96612
|
+
], MJSearchScopeExternalIndex_.prototype, "MetadataFilter", void 0);
|
|
96613
|
+
__decorate([
|
|
96614
|
+
Field(),
|
|
96615
|
+
__metadata("design:type", Date)
|
|
96616
|
+
], MJSearchScopeExternalIndex_.prototype, "_mj__CreatedAt", void 0);
|
|
96617
|
+
__decorate([
|
|
96618
|
+
Field(),
|
|
96619
|
+
__metadata("design:type", Date)
|
|
96620
|
+
], MJSearchScopeExternalIndex_.prototype, "_mj__UpdatedAt", void 0);
|
|
96621
|
+
__decorate([
|
|
96622
|
+
Field(),
|
|
96623
|
+
MaxLength(200),
|
|
96624
|
+
__metadata("design:type", String)
|
|
96625
|
+
], MJSearchScopeExternalIndex_.prototype, "SearchScope", void 0);
|
|
96626
|
+
__decorate([
|
|
96627
|
+
Field({ nullable: true }),
|
|
96628
|
+
MaxLength(255),
|
|
96629
|
+
__metadata("design:type", String)
|
|
96630
|
+
], MJSearchScopeExternalIndex_.prototype, "VectorIndex", void 0);
|
|
96631
|
+
MJSearchScopeExternalIndex_ = __decorate([
|
|
96632
|
+
ObjectType({ description: `Scoped external/provider-owned indexes. Generic — covers vector stores (Pinecone, Qdrant, PGVector) and text/hybrid engines (Elasticsearch, Typesense, Azure AI Search, OpenSearch). A single scope can mix types; each row is consumed only by the provider matching its IndexType.` })
|
|
96633
|
+
], MJSearchScopeExternalIndex_);
|
|
96634
|
+
export { MJSearchScopeExternalIndex_ };
|
|
96635
|
+
//****************************************************************************
|
|
96636
|
+
// INPUT TYPE for MJ: Search Scope External Indexes
|
|
96637
|
+
//****************************************************************************
|
|
96638
|
+
let CreateMJSearchScopeExternalIndexInput = class CreateMJSearchScopeExternalIndexInput {
|
|
96639
|
+
};
|
|
96640
|
+
__decorate([
|
|
96641
|
+
Field({ nullable: true }),
|
|
96642
|
+
__metadata("design:type", String)
|
|
96643
|
+
], CreateMJSearchScopeExternalIndexInput.prototype, "ID", void 0);
|
|
96644
|
+
__decorate([
|
|
96645
|
+
Field({ nullable: true }),
|
|
96646
|
+
__metadata("design:type", String)
|
|
96647
|
+
], CreateMJSearchScopeExternalIndexInput.prototype, "SearchScopeID", void 0);
|
|
96648
|
+
__decorate([
|
|
96649
|
+
Field({ nullable: true }),
|
|
96650
|
+
__metadata("design:type", String)
|
|
96651
|
+
], CreateMJSearchScopeExternalIndexInput.prototype, "IndexType", void 0);
|
|
96652
|
+
__decorate([
|
|
96653
|
+
Field({ nullable: true }),
|
|
96654
|
+
__metadata("design:type", String)
|
|
96655
|
+
], CreateMJSearchScopeExternalIndexInput.prototype, "VectorIndexID", void 0);
|
|
96656
|
+
__decorate([
|
|
96657
|
+
Field({ nullable: true }),
|
|
96658
|
+
__metadata("design:type", String)
|
|
96659
|
+
], CreateMJSearchScopeExternalIndexInput.prototype, "ExternalIndexName", void 0);
|
|
96660
|
+
__decorate([
|
|
96661
|
+
Field({ nullable: true }),
|
|
96662
|
+
__metadata("design:type", String)
|
|
96663
|
+
], CreateMJSearchScopeExternalIndexInput.prototype, "ExternalIndexConfig", void 0);
|
|
96664
|
+
__decorate([
|
|
96665
|
+
Field({ nullable: true }),
|
|
96666
|
+
__metadata("design:type", String)
|
|
96667
|
+
], CreateMJSearchScopeExternalIndexInput.prototype, "MetadataFilter", void 0);
|
|
96668
|
+
__decorate([
|
|
96669
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
96670
|
+
__metadata("design:type", RestoreContextInput)
|
|
96671
|
+
], CreateMJSearchScopeExternalIndexInput.prototype, "RestoreContext___", void 0);
|
|
96672
|
+
CreateMJSearchScopeExternalIndexInput = __decorate([
|
|
96673
|
+
InputType()
|
|
96674
|
+
], CreateMJSearchScopeExternalIndexInput);
|
|
96675
|
+
export { CreateMJSearchScopeExternalIndexInput };
|
|
96676
|
+
//****************************************************************************
|
|
96677
|
+
// INPUT TYPE for MJ: Search Scope External Indexes
|
|
96678
|
+
//****************************************************************************
|
|
96679
|
+
let UpdateMJSearchScopeExternalIndexInput = class UpdateMJSearchScopeExternalIndexInput {
|
|
96680
|
+
};
|
|
96681
|
+
__decorate([
|
|
96682
|
+
Field(),
|
|
96683
|
+
__metadata("design:type", String)
|
|
96684
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "ID", void 0);
|
|
96685
|
+
__decorate([
|
|
96686
|
+
Field({ nullable: true }),
|
|
96687
|
+
__metadata("design:type", String)
|
|
96688
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "SearchScopeID", void 0);
|
|
96689
|
+
__decorate([
|
|
96690
|
+
Field({ nullable: true }),
|
|
96691
|
+
__metadata("design:type", String)
|
|
96692
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "IndexType", void 0);
|
|
96693
|
+
__decorate([
|
|
96694
|
+
Field({ nullable: true }),
|
|
96695
|
+
__metadata("design:type", String)
|
|
96696
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "VectorIndexID", void 0);
|
|
96697
|
+
__decorate([
|
|
96698
|
+
Field({ nullable: true }),
|
|
96699
|
+
__metadata("design:type", String)
|
|
96700
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "ExternalIndexName", void 0);
|
|
96701
|
+
__decorate([
|
|
96702
|
+
Field({ nullable: true }),
|
|
96703
|
+
__metadata("design:type", String)
|
|
96704
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "ExternalIndexConfig", void 0);
|
|
96705
|
+
__decorate([
|
|
96706
|
+
Field({ nullable: true }),
|
|
96707
|
+
__metadata("design:type", String)
|
|
96708
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "MetadataFilter", void 0);
|
|
96709
|
+
__decorate([
|
|
96710
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
96711
|
+
__metadata("design:type", Array)
|
|
96712
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "OldValues___", void 0);
|
|
96713
|
+
__decorate([
|
|
96714
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
96715
|
+
__metadata("design:type", RestoreContextInput)
|
|
96716
|
+
], UpdateMJSearchScopeExternalIndexInput.prototype, "RestoreContext___", void 0);
|
|
96717
|
+
UpdateMJSearchScopeExternalIndexInput = __decorate([
|
|
96718
|
+
InputType()
|
|
96719
|
+
], UpdateMJSearchScopeExternalIndexInput);
|
|
96720
|
+
export { UpdateMJSearchScopeExternalIndexInput };
|
|
96721
|
+
//****************************************************************************
|
|
96722
|
+
// RESOLVER for MJ: Search Scope External Indexes
|
|
96723
|
+
//****************************************************************************
|
|
96724
|
+
let RunMJSearchScopeExternalIndexViewResult = class RunMJSearchScopeExternalIndexViewResult {
|
|
96725
|
+
};
|
|
96726
|
+
__decorate([
|
|
96727
|
+
Field(() => [MJSearchScopeExternalIndex_]),
|
|
96728
|
+
__metadata("design:type", Array)
|
|
96729
|
+
], RunMJSearchScopeExternalIndexViewResult.prototype, "Results", void 0);
|
|
96730
|
+
__decorate([
|
|
96731
|
+
Field(() => String, { nullable: true }),
|
|
96732
|
+
__metadata("design:type", String)
|
|
96733
|
+
], RunMJSearchScopeExternalIndexViewResult.prototype, "UserViewRunID", void 0);
|
|
96734
|
+
__decorate([
|
|
96735
|
+
Field(() => Int, { nullable: true }),
|
|
96736
|
+
__metadata("design:type", Number)
|
|
96737
|
+
], RunMJSearchScopeExternalIndexViewResult.prototype, "RowCount", void 0);
|
|
96738
|
+
__decorate([
|
|
96739
|
+
Field(() => Int, { nullable: true }),
|
|
96740
|
+
__metadata("design:type", Number)
|
|
96741
|
+
], RunMJSearchScopeExternalIndexViewResult.prototype, "TotalRowCount", void 0);
|
|
96742
|
+
__decorate([
|
|
96743
|
+
Field(() => Int, { nullable: true }),
|
|
96744
|
+
__metadata("design:type", Number)
|
|
96745
|
+
], RunMJSearchScopeExternalIndexViewResult.prototype, "ExecutionTime", void 0);
|
|
96746
|
+
__decorate([
|
|
96747
|
+
Field({ nullable: true }),
|
|
96748
|
+
__metadata("design:type", String)
|
|
96749
|
+
], RunMJSearchScopeExternalIndexViewResult.prototype, "ErrorMessage", void 0);
|
|
96750
|
+
__decorate([
|
|
96751
|
+
Field(() => Boolean, { nullable: false }),
|
|
96752
|
+
__metadata("design:type", Boolean)
|
|
96753
|
+
], RunMJSearchScopeExternalIndexViewResult.prototype, "Success", void 0);
|
|
96754
|
+
RunMJSearchScopeExternalIndexViewResult = __decorate([
|
|
96755
|
+
ObjectType()
|
|
96756
|
+
], RunMJSearchScopeExternalIndexViewResult);
|
|
96757
|
+
export { RunMJSearchScopeExternalIndexViewResult };
|
|
96758
|
+
let MJSearchScopeExternalIndexResolver = class MJSearchScopeExternalIndexResolver extends ResolverBase {
|
|
96759
|
+
async RunMJSearchScopeExternalIndexViewByID(input, { providers, userPayload }, pubSub) {
|
|
96760
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96761
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
96762
|
+
}
|
|
96763
|
+
async RunMJSearchScopeExternalIndexViewByName(input, { providers, userPayload }, pubSub) {
|
|
96764
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96765
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
96766
|
+
}
|
|
96767
|
+
async RunMJSearchScopeExternalIndexDynamicView(input, { providers, userPayload }, pubSub) {
|
|
96768
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96769
|
+
input.EntityName = 'MJ: Search Scope External Indexes';
|
|
96770
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
96771
|
+
}
|
|
96772
|
+
async MJSearchScopeExternalIndex(ID, { userPayload, providers }, pubSub) {
|
|
96773
|
+
this.CheckUserReadPermissions('MJ: Search Scope External Indexes', userPayload);
|
|
96774
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
96775
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeExternalIndexes')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope External Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
96776
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
96777
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Scope External Indexes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
96778
|
+
return result;
|
|
96779
|
+
}
|
|
96780
|
+
async CreateMJSearchScopeExternalIndex(input, { providers, userPayload }, pubSub) {
|
|
96781
|
+
const provider = GetReadWriteProvider(providers);
|
|
96782
|
+
return this.CreateRecord('MJ: Search Scope External Indexes', input, provider, userPayload, pubSub);
|
|
96783
|
+
}
|
|
96784
|
+
async UpdateMJSearchScopeExternalIndex(input, { providers, userPayload }, pubSub) {
|
|
96785
|
+
const provider = GetReadWriteProvider(providers);
|
|
96786
|
+
return this.UpdateRecord('MJ: Search Scope External Indexes', input, provider, userPayload, pubSub);
|
|
96787
|
+
}
|
|
96788
|
+
async DeleteMJSearchScopeExternalIndex(ID, options, { providers, userPayload }, pubSub) {
|
|
96789
|
+
const provider = GetReadWriteProvider(providers);
|
|
96790
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
96791
|
+
return this.DeleteRecord('MJ: Search Scope External Indexes', key, options, provider, userPayload, pubSub);
|
|
96792
|
+
}
|
|
96793
|
+
};
|
|
96794
|
+
__decorate([
|
|
96795
|
+
Query(() => RunMJSearchScopeExternalIndexViewResult),
|
|
96796
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
96797
|
+
__param(1, Ctx()),
|
|
96798
|
+
__param(2, PubSub()),
|
|
96799
|
+
__metadata("design:type", Function),
|
|
96800
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
96801
|
+
__metadata("design:returntype", Promise)
|
|
96802
|
+
], MJSearchScopeExternalIndexResolver.prototype, "RunMJSearchScopeExternalIndexViewByID", null);
|
|
96803
|
+
__decorate([
|
|
96804
|
+
Query(() => RunMJSearchScopeExternalIndexViewResult),
|
|
96805
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
96806
|
+
__param(1, Ctx()),
|
|
96807
|
+
__param(2, PubSub()),
|
|
96808
|
+
__metadata("design:type", Function),
|
|
96809
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
96810
|
+
__metadata("design:returntype", Promise)
|
|
96811
|
+
], MJSearchScopeExternalIndexResolver.prototype, "RunMJSearchScopeExternalIndexViewByName", null);
|
|
96812
|
+
__decorate([
|
|
96813
|
+
Query(() => RunMJSearchScopeExternalIndexViewResult),
|
|
96814
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
96815
|
+
__param(1, Ctx()),
|
|
96816
|
+
__param(2, PubSub()),
|
|
96817
|
+
__metadata("design:type", Function),
|
|
96818
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
96819
|
+
__metadata("design:returntype", Promise)
|
|
96820
|
+
], MJSearchScopeExternalIndexResolver.prototype, "RunMJSearchScopeExternalIndexDynamicView", null);
|
|
96821
|
+
__decorate([
|
|
96822
|
+
Query(() => MJSearchScopeExternalIndex_, { nullable: true }),
|
|
96823
|
+
__param(0, Arg('ID', () => String)),
|
|
96824
|
+
__param(1, Ctx()),
|
|
96825
|
+
__param(2, PubSub()),
|
|
96826
|
+
__metadata("design:type", Function),
|
|
96827
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
96828
|
+
__metadata("design:returntype", Promise)
|
|
96829
|
+
], MJSearchScopeExternalIndexResolver.prototype, "MJSearchScopeExternalIndex", null);
|
|
96830
|
+
__decorate([
|
|
96831
|
+
Mutation(() => MJSearchScopeExternalIndex_),
|
|
96832
|
+
__param(0, Arg('input', () => CreateMJSearchScopeExternalIndexInput)),
|
|
96833
|
+
__param(1, Ctx()),
|
|
96834
|
+
__param(2, PubSub()),
|
|
96835
|
+
__metadata("design:type", Function),
|
|
96836
|
+
__metadata("design:paramtypes", [CreateMJSearchScopeExternalIndexInput, Object, PubSubEngine]),
|
|
96837
|
+
__metadata("design:returntype", Promise)
|
|
96838
|
+
], MJSearchScopeExternalIndexResolver.prototype, "CreateMJSearchScopeExternalIndex", null);
|
|
96839
|
+
__decorate([
|
|
96840
|
+
Mutation(() => MJSearchScopeExternalIndex_),
|
|
96841
|
+
__param(0, Arg('input', () => UpdateMJSearchScopeExternalIndexInput)),
|
|
96842
|
+
__param(1, Ctx()),
|
|
96843
|
+
__param(2, PubSub()),
|
|
96844
|
+
__metadata("design:type", Function),
|
|
96845
|
+
__metadata("design:paramtypes", [UpdateMJSearchScopeExternalIndexInput, Object, PubSubEngine]),
|
|
96846
|
+
__metadata("design:returntype", Promise)
|
|
96847
|
+
], MJSearchScopeExternalIndexResolver.prototype, "UpdateMJSearchScopeExternalIndex", null);
|
|
96848
|
+
__decorate([
|
|
96849
|
+
Mutation(() => MJSearchScopeExternalIndex_),
|
|
96850
|
+
__param(0, Arg('ID', () => String)),
|
|
96851
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
96852
|
+
__param(2, Ctx()),
|
|
96853
|
+
__param(3, PubSub()),
|
|
96854
|
+
__metadata("design:type", Function),
|
|
96855
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
96856
|
+
__metadata("design:returntype", Promise)
|
|
96857
|
+
], MJSearchScopeExternalIndexResolver.prototype, "DeleteMJSearchScopeExternalIndex", null);
|
|
96858
|
+
MJSearchScopeExternalIndexResolver = __decorate([
|
|
96859
|
+
Resolver(MJSearchScopeExternalIndex_)
|
|
96860
|
+
], MJSearchScopeExternalIndexResolver);
|
|
96861
|
+
export { MJSearchScopeExternalIndexResolver };
|
|
96862
|
+
//****************************************************************************
|
|
96863
|
+
// ENTITY CLASS for MJ: Search Scope Permissions
|
|
96864
|
+
//****************************************************************************
|
|
96865
|
+
let MJSearchScopePermission_ = class MJSearchScopePermission_ {
|
|
96866
|
+
};
|
|
96867
|
+
__decorate([
|
|
96868
|
+
Field({ description: `Primary key. Auto-generated.` }),
|
|
96869
|
+
MaxLength(36),
|
|
96870
|
+
__metadata("design:type", String)
|
|
96871
|
+
], MJSearchScopePermission_.prototype, "ID", void 0);
|
|
96872
|
+
__decorate([
|
|
96873
|
+
Field({ description: `The SearchScope this permission row applies to.` }),
|
|
96874
|
+
MaxLength(36),
|
|
96875
|
+
__metadata("design:type", String)
|
|
96876
|
+
], MJSearchScopePermission_.prototype, "SearchScopeID", void 0);
|
|
96877
|
+
__decorate([
|
|
96878
|
+
Field({ nullable: true, description: `The user this permission applies to. Mutually exclusive with RoleID — exactly one must be set.` }),
|
|
96879
|
+
MaxLength(36),
|
|
96880
|
+
__metadata("design:type", String)
|
|
96881
|
+
], MJSearchScopePermission_.prototype, "UserID", void 0);
|
|
96882
|
+
__decorate([
|
|
96883
|
+
Field({ nullable: true, description: `The role this permission applies to. Mutually exclusive with UserID — exactly one must be set. Permissions granted via roles flow to all users in that role.` }),
|
|
96884
|
+
MaxLength(36),
|
|
96885
|
+
__metadata("design:type", String)
|
|
96886
|
+
], MJSearchScopePermission_.prototype, "RoleID", void 0);
|
|
96887
|
+
__decorate([
|
|
96888
|
+
Field({ description: `Capability granted on this SearchScope. None = explicit deny (overrides role grants), Read = view scope metadata, Search = invoke ScopedSearchAction, Manage = full edit including authoring of permission rows. The resolver picks the highest level when multiple grants apply (direct + role).` }),
|
|
96889
|
+
MaxLength(20),
|
|
96890
|
+
__metadata("design:type", String)
|
|
96891
|
+
], MJSearchScopePermission_.prototype, "PermissionLevel", void 0);
|
|
96892
|
+
__decorate([
|
|
96893
|
+
Field(),
|
|
96894
|
+
__metadata("design:type", Date)
|
|
96895
|
+
], MJSearchScopePermission_.prototype, "_mj__CreatedAt", void 0);
|
|
96896
|
+
__decorate([
|
|
96897
|
+
Field(),
|
|
96898
|
+
__metadata("design:type", Date)
|
|
96899
|
+
], MJSearchScopePermission_.prototype, "_mj__UpdatedAt", void 0);
|
|
96900
|
+
__decorate([
|
|
96901
|
+
Field(),
|
|
96902
|
+
MaxLength(200),
|
|
96903
|
+
__metadata("design:type", String)
|
|
96904
|
+
], MJSearchScopePermission_.prototype, "SearchScope", void 0);
|
|
96905
|
+
__decorate([
|
|
96906
|
+
Field({ nullable: true }),
|
|
96907
|
+
MaxLength(100),
|
|
96908
|
+
__metadata("design:type", String)
|
|
96909
|
+
], MJSearchScopePermission_.prototype, "User", void 0);
|
|
96910
|
+
__decorate([
|
|
96911
|
+
Field({ nullable: true }),
|
|
96912
|
+
MaxLength(50),
|
|
96913
|
+
__metadata("design:type", String)
|
|
96914
|
+
], MJSearchScopePermission_.prototype, "Role", void 0);
|
|
96915
|
+
MJSearchScopePermission_ = __decorate([
|
|
96916
|
+
ObjectType({ description: `Per-user or per-role permission grant on a SearchScope. Exactly one of UserID or RoleID is set on each row; the other is NULL. PermissionLevel is one of None, Read, Search, Manage. Combined with AIAgent.SearchScopeAccess for agent-side fallbacks via the SearchScopePermissionResolver.` })
|
|
96917
|
+
], MJSearchScopePermission_);
|
|
96918
|
+
export { MJSearchScopePermission_ };
|
|
96919
|
+
//****************************************************************************
|
|
96920
|
+
// INPUT TYPE for MJ: Search Scope Permissions
|
|
96921
|
+
//****************************************************************************
|
|
96922
|
+
let CreateMJSearchScopePermissionInput = class CreateMJSearchScopePermissionInput {
|
|
96923
|
+
};
|
|
96924
|
+
__decorate([
|
|
96925
|
+
Field({ nullable: true }),
|
|
96926
|
+
__metadata("design:type", String)
|
|
96927
|
+
], CreateMJSearchScopePermissionInput.prototype, "ID", void 0);
|
|
96928
|
+
__decorate([
|
|
96929
|
+
Field({ nullable: true }),
|
|
96930
|
+
__metadata("design:type", String)
|
|
96931
|
+
], CreateMJSearchScopePermissionInput.prototype, "SearchScopeID", void 0);
|
|
96932
|
+
__decorate([
|
|
96933
|
+
Field({ nullable: true }),
|
|
96934
|
+
__metadata("design:type", String)
|
|
96935
|
+
], CreateMJSearchScopePermissionInput.prototype, "UserID", void 0);
|
|
96936
|
+
__decorate([
|
|
96937
|
+
Field({ nullable: true }),
|
|
96938
|
+
__metadata("design:type", String)
|
|
96939
|
+
], CreateMJSearchScopePermissionInput.prototype, "RoleID", void 0);
|
|
96940
|
+
__decorate([
|
|
96941
|
+
Field({ nullable: true }),
|
|
96942
|
+
__metadata("design:type", String)
|
|
96943
|
+
], CreateMJSearchScopePermissionInput.prototype, "PermissionLevel", void 0);
|
|
96944
|
+
__decorate([
|
|
96945
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
96946
|
+
__metadata("design:type", RestoreContextInput)
|
|
96947
|
+
], CreateMJSearchScopePermissionInput.prototype, "RestoreContext___", void 0);
|
|
96948
|
+
CreateMJSearchScopePermissionInput = __decorate([
|
|
96949
|
+
InputType()
|
|
96950
|
+
], CreateMJSearchScopePermissionInput);
|
|
96951
|
+
export { CreateMJSearchScopePermissionInput };
|
|
96952
|
+
//****************************************************************************
|
|
96953
|
+
// INPUT TYPE for MJ: Search Scope Permissions
|
|
96954
|
+
//****************************************************************************
|
|
96955
|
+
let UpdateMJSearchScopePermissionInput = class UpdateMJSearchScopePermissionInput {
|
|
96956
|
+
};
|
|
96957
|
+
__decorate([
|
|
96958
|
+
Field(),
|
|
96959
|
+
__metadata("design:type", String)
|
|
96960
|
+
], UpdateMJSearchScopePermissionInput.prototype, "ID", void 0);
|
|
96961
|
+
__decorate([
|
|
96962
|
+
Field({ nullable: true }),
|
|
96963
|
+
__metadata("design:type", String)
|
|
96964
|
+
], UpdateMJSearchScopePermissionInput.prototype, "SearchScopeID", void 0);
|
|
96965
|
+
__decorate([
|
|
96966
|
+
Field({ nullable: true }),
|
|
96967
|
+
__metadata("design:type", String)
|
|
96968
|
+
], UpdateMJSearchScopePermissionInput.prototype, "UserID", void 0);
|
|
96969
|
+
__decorate([
|
|
96970
|
+
Field({ nullable: true }),
|
|
96971
|
+
__metadata("design:type", String)
|
|
96972
|
+
], UpdateMJSearchScopePermissionInput.prototype, "RoleID", void 0);
|
|
96973
|
+
__decorate([
|
|
96974
|
+
Field({ nullable: true }),
|
|
96975
|
+
__metadata("design:type", String)
|
|
96976
|
+
], UpdateMJSearchScopePermissionInput.prototype, "PermissionLevel", void 0);
|
|
96977
|
+
__decorate([
|
|
96978
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
96979
|
+
__metadata("design:type", Array)
|
|
96980
|
+
], UpdateMJSearchScopePermissionInput.prototype, "OldValues___", void 0);
|
|
96981
|
+
__decorate([
|
|
96982
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
96983
|
+
__metadata("design:type", RestoreContextInput)
|
|
96984
|
+
], UpdateMJSearchScopePermissionInput.prototype, "RestoreContext___", void 0);
|
|
96985
|
+
UpdateMJSearchScopePermissionInput = __decorate([
|
|
96986
|
+
InputType()
|
|
96987
|
+
], UpdateMJSearchScopePermissionInput);
|
|
96988
|
+
export { UpdateMJSearchScopePermissionInput };
|
|
96989
|
+
//****************************************************************************
|
|
96990
|
+
// RESOLVER for MJ: Search Scope Permissions
|
|
96991
|
+
//****************************************************************************
|
|
96992
|
+
let RunMJSearchScopePermissionViewResult = class RunMJSearchScopePermissionViewResult {
|
|
96993
|
+
};
|
|
96994
|
+
__decorate([
|
|
96995
|
+
Field(() => [MJSearchScopePermission_]),
|
|
96996
|
+
__metadata("design:type", Array)
|
|
96997
|
+
], RunMJSearchScopePermissionViewResult.prototype, "Results", void 0);
|
|
96998
|
+
__decorate([
|
|
96999
|
+
Field(() => String, { nullable: true }),
|
|
97000
|
+
__metadata("design:type", String)
|
|
97001
|
+
], RunMJSearchScopePermissionViewResult.prototype, "UserViewRunID", void 0);
|
|
97002
|
+
__decorate([
|
|
97003
|
+
Field(() => Int, { nullable: true }),
|
|
97004
|
+
__metadata("design:type", Number)
|
|
97005
|
+
], RunMJSearchScopePermissionViewResult.prototype, "RowCount", void 0);
|
|
97006
|
+
__decorate([
|
|
97007
|
+
Field(() => Int, { nullable: true }),
|
|
97008
|
+
__metadata("design:type", Number)
|
|
97009
|
+
], RunMJSearchScopePermissionViewResult.prototype, "TotalRowCount", void 0);
|
|
97010
|
+
__decorate([
|
|
97011
|
+
Field(() => Int, { nullable: true }),
|
|
97012
|
+
__metadata("design:type", Number)
|
|
97013
|
+
], RunMJSearchScopePermissionViewResult.prototype, "ExecutionTime", void 0);
|
|
97014
|
+
__decorate([
|
|
97015
|
+
Field({ nullable: true }),
|
|
97016
|
+
__metadata("design:type", String)
|
|
97017
|
+
], RunMJSearchScopePermissionViewResult.prototype, "ErrorMessage", void 0);
|
|
97018
|
+
__decorate([
|
|
97019
|
+
Field(() => Boolean, { nullable: false }),
|
|
97020
|
+
__metadata("design:type", Boolean)
|
|
97021
|
+
], RunMJSearchScopePermissionViewResult.prototype, "Success", void 0);
|
|
97022
|
+
RunMJSearchScopePermissionViewResult = __decorate([
|
|
97023
|
+
ObjectType()
|
|
97024
|
+
], RunMJSearchScopePermissionViewResult);
|
|
97025
|
+
export { RunMJSearchScopePermissionViewResult };
|
|
97026
|
+
let MJSearchScopePermissionResolver = class MJSearchScopePermissionResolver extends ResolverBase {
|
|
97027
|
+
async RunMJSearchScopePermissionViewByID(input, { providers, userPayload }, pubSub) {
|
|
97028
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97029
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97030
|
+
}
|
|
97031
|
+
async RunMJSearchScopePermissionViewByName(input, { providers, userPayload }, pubSub) {
|
|
97032
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97033
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97034
|
+
}
|
|
97035
|
+
async RunMJSearchScopePermissionDynamicView(input, { providers, userPayload }, pubSub) {
|
|
97036
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97037
|
+
input.EntityName = 'MJ: Search Scope Permissions';
|
|
97038
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
97039
|
+
}
|
|
97040
|
+
async MJSearchScopePermission(ID, { userPayload, providers }, pubSub) {
|
|
97041
|
+
this.CheckUserReadPermissions('MJ: Search Scope Permissions', userPayload);
|
|
97042
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97043
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopePermissions')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
97044
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
97045
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Scope Permissions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
97046
|
+
return result;
|
|
97047
|
+
}
|
|
97048
|
+
async CreateMJSearchScopePermission(input, { providers, userPayload }, pubSub) {
|
|
97049
|
+
const provider = GetReadWriteProvider(providers);
|
|
97050
|
+
return this.CreateRecord('MJ: Search Scope Permissions', input, provider, userPayload, pubSub);
|
|
97051
|
+
}
|
|
97052
|
+
async UpdateMJSearchScopePermission(input, { providers, userPayload }, pubSub) {
|
|
97053
|
+
const provider = GetReadWriteProvider(providers);
|
|
97054
|
+
return this.UpdateRecord('MJ: Search Scope Permissions', input, provider, userPayload, pubSub);
|
|
97055
|
+
}
|
|
97056
|
+
async DeleteMJSearchScopePermission(ID, options, { providers, userPayload }, pubSub) {
|
|
97057
|
+
const provider = GetReadWriteProvider(providers);
|
|
97058
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
97059
|
+
return this.DeleteRecord('MJ: Search Scope Permissions', key, options, provider, userPayload, pubSub);
|
|
97060
|
+
}
|
|
97061
|
+
};
|
|
97062
|
+
__decorate([
|
|
97063
|
+
Query(() => RunMJSearchScopePermissionViewResult),
|
|
97064
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
97065
|
+
__param(1, Ctx()),
|
|
97066
|
+
__param(2, PubSub()),
|
|
97067
|
+
__metadata("design:type", Function),
|
|
97068
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
97069
|
+
__metadata("design:returntype", Promise)
|
|
97070
|
+
], MJSearchScopePermissionResolver.prototype, "RunMJSearchScopePermissionViewByID", null);
|
|
97071
|
+
__decorate([
|
|
97072
|
+
Query(() => RunMJSearchScopePermissionViewResult),
|
|
97073
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
97074
|
+
__param(1, Ctx()),
|
|
97075
|
+
__param(2, PubSub()),
|
|
97076
|
+
__metadata("design:type", Function),
|
|
97077
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
97078
|
+
__metadata("design:returntype", Promise)
|
|
97079
|
+
], MJSearchScopePermissionResolver.prototype, "RunMJSearchScopePermissionViewByName", null);
|
|
97080
|
+
__decorate([
|
|
97081
|
+
Query(() => RunMJSearchScopePermissionViewResult),
|
|
97082
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
97083
|
+
__param(1, Ctx()),
|
|
97084
|
+
__param(2, PubSub()),
|
|
97085
|
+
__metadata("design:type", Function),
|
|
97086
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
97087
|
+
__metadata("design:returntype", Promise)
|
|
97088
|
+
], MJSearchScopePermissionResolver.prototype, "RunMJSearchScopePermissionDynamicView", null);
|
|
97089
|
+
__decorate([
|
|
97090
|
+
Query(() => MJSearchScopePermission_, { nullable: true }),
|
|
97091
|
+
__param(0, Arg('ID', () => String)),
|
|
97092
|
+
__param(1, Ctx()),
|
|
97093
|
+
__param(2, PubSub()),
|
|
97094
|
+
__metadata("design:type", Function),
|
|
97095
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
97096
|
+
__metadata("design:returntype", Promise)
|
|
97097
|
+
], MJSearchScopePermissionResolver.prototype, "MJSearchScopePermission", null);
|
|
97098
|
+
__decorate([
|
|
97099
|
+
Mutation(() => MJSearchScopePermission_),
|
|
97100
|
+
__param(0, Arg('input', () => CreateMJSearchScopePermissionInput)),
|
|
97101
|
+
__param(1, Ctx()),
|
|
97102
|
+
__param(2, PubSub()),
|
|
97103
|
+
__metadata("design:type", Function),
|
|
97104
|
+
__metadata("design:paramtypes", [CreateMJSearchScopePermissionInput, Object, PubSubEngine]),
|
|
97105
|
+
__metadata("design:returntype", Promise)
|
|
97106
|
+
], MJSearchScopePermissionResolver.prototype, "CreateMJSearchScopePermission", null);
|
|
97107
|
+
__decorate([
|
|
97108
|
+
Mutation(() => MJSearchScopePermission_),
|
|
97109
|
+
__param(0, Arg('input', () => UpdateMJSearchScopePermissionInput)),
|
|
97110
|
+
__param(1, Ctx()),
|
|
97111
|
+
__param(2, PubSub()),
|
|
97112
|
+
__metadata("design:type", Function),
|
|
97113
|
+
__metadata("design:paramtypes", [UpdateMJSearchScopePermissionInput, Object, PubSubEngine]),
|
|
97114
|
+
__metadata("design:returntype", Promise)
|
|
97115
|
+
], MJSearchScopePermissionResolver.prototype, "UpdateMJSearchScopePermission", null);
|
|
97116
|
+
__decorate([
|
|
97117
|
+
Mutation(() => MJSearchScopePermission_),
|
|
97118
|
+
__param(0, Arg('ID', () => String)),
|
|
97119
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
97120
|
+
__param(2, Ctx()),
|
|
97121
|
+
__param(3, PubSub()),
|
|
97122
|
+
__metadata("design:type", Function),
|
|
97123
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
97124
|
+
__metadata("design:returntype", Promise)
|
|
97125
|
+
], MJSearchScopePermissionResolver.prototype, "DeleteMJSearchScopePermission", null);
|
|
97126
|
+
MJSearchScopePermissionResolver = __decorate([
|
|
97127
|
+
Resolver(MJSearchScopePermission_)
|
|
97128
|
+
], MJSearchScopePermissionResolver);
|
|
97129
|
+
export { MJSearchScopePermissionResolver };
|
|
97130
|
+
//****************************************************************************
|
|
97131
|
+
// ENTITY CLASS for MJ: Search Scope Providers
|
|
97132
|
+
//****************************************************************************
|
|
97133
|
+
let MJSearchScopeProvider_ = class MJSearchScopeProvider_ {
|
|
97134
|
+
};
|
|
97135
|
+
__decorate([
|
|
97136
|
+
Field(),
|
|
97137
|
+
MaxLength(36),
|
|
97138
|
+
__metadata("design:type", String)
|
|
97139
|
+
], MJSearchScopeProvider_.prototype, "ID", void 0);
|
|
97140
|
+
__decorate([
|
|
97141
|
+
Field(),
|
|
97142
|
+
MaxLength(36),
|
|
97143
|
+
__metadata("design:type", String)
|
|
97144
|
+
], MJSearchScopeProvider_.prototype, "SearchScopeID", void 0);
|
|
97145
|
+
__decorate([
|
|
97146
|
+
Field(),
|
|
97147
|
+
MaxLength(36),
|
|
97148
|
+
__metadata("design:type", String)
|
|
97149
|
+
], MJSearchScopeProvider_.prototype, "SearchProviderID", void 0);
|
|
97150
|
+
__decorate([
|
|
97151
|
+
Field(() => Boolean, { description: `Whether this provider is active for this scope. Lets an admin toggle providers off per-scope without deleting the row.` }),
|
|
97152
|
+
__metadata("design:type", Boolean)
|
|
97153
|
+
], MJSearchScopeProvider_.prototype, "Enabled", void 0);
|
|
97154
|
+
__decorate([
|
|
97155
|
+
Field(() => Int, { nullable: true, description: `Override the max-results value for this provider within this scope. NULL = use the provider's default.` }),
|
|
97156
|
+
__metadata("design:type", Number)
|
|
97157
|
+
], MJSearchScopeProvider_.prototype, "MaxResultsOverride", void 0);
|
|
97158
|
+
__decorate([
|
|
97159
|
+
Field({ nullable: true, description: `JSON override for provider-specific configuration within this scope. Provider interprets.` }),
|
|
97160
|
+
__metadata("design:type", String)
|
|
97161
|
+
], MJSearchScopeProvider_.prototype, "ProviderConfigOverride", void 0);
|
|
97162
|
+
__decorate([
|
|
97163
|
+
Field({ nullable: true, description: `Optional FK to Templates. When set, the user/agent query is rewritten through this Template before being sent to this provider. Lets vector providers get a chunk-shaped rewrite while FTS providers get keyword extraction within the same scope. Resolution order: this > AIAgentSearchScope.QueryTemplateID > raw lastUserMessage.` }),
|
|
97164
|
+
MaxLength(36),
|
|
97165
|
+
__metadata("design:type", String)
|
|
97166
|
+
], MJSearchScopeProvider_.prototype, "QueryTransformTemplateID", void 0);
|
|
97167
|
+
__decorate([
|
|
97168
|
+
Field(),
|
|
97169
|
+
__metadata("design:type", Date)
|
|
97170
|
+
], MJSearchScopeProvider_.prototype, "_mj__CreatedAt", void 0);
|
|
97171
|
+
__decorate([
|
|
97172
|
+
Field(),
|
|
97173
|
+
__metadata("design:type", Date)
|
|
97174
|
+
], MJSearchScopeProvider_.prototype, "_mj__UpdatedAt", void 0);
|
|
97175
|
+
__decorate([
|
|
97176
|
+
Field(),
|
|
97177
|
+
MaxLength(200),
|
|
97178
|
+
__metadata("design:type", String)
|
|
97179
|
+
], MJSearchScopeProvider_.prototype, "SearchScope", void 0);
|
|
97180
|
+
__decorate([
|
|
97181
|
+
Field(),
|
|
97182
|
+
MaxLength(200),
|
|
97183
|
+
__metadata("design:type", String)
|
|
97184
|
+
], MJSearchScopeProvider_.prototype, "SearchProvider", void 0);
|
|
97185
|
+
__decorate([
|
|
97186
|
+
Field({ nullable: true }),
|
|
97187
|
+
MaxLength(255),
|
|
97188
|
+
__metadata("design:type", String)
|
|
97189
|
+
], MJSearchScopeProvider_.prototype, "QueryTransformTemplate", void 0);
|
|
97190
|
+
MJSearchScopeProvider_ = __decorate([
|
|
97191
|
+
ObjectType({ description: `Controls which SearchProviders participate in a given SearchScope. Each row enables one provider within one scope, with optional overrides.` })
|
|
97192
|
+
], MJSearchScopeProvider_);
|
|
97193
|
+
export { MJSearchScopeProvider_ };
|
|
97194
|
+
//****************************************************************************
|
|
97195
|
+
// INPUT TYPE for MJ: Search Scope Providers
|
|
97196
|
+
//****************************************************************************
|
|
97197
|
+
let CreateMJSearchScopeProviderInput = class CreateMJSearchScopeProviderInput {
|
|
97198
|
+
};
|
|
97199
|
+
__decorate([
|
|
97200
|
+
Field({ nullable: true }),
|
|
97201
|
+
__metadata("design:type", String)
|
|
97202
|
+
], CreateMJSearchScopeProviderInput.prototype, "ID", void 0);
|
|
97203
|
+
__decorate([
|
|
97204
|
+
Field({ nullable: true }),
|
|
97205
|
+
__metadata("design:type", String)
|
|
97206
|
+
], CreateMJSearchScopeProviderInput.prototype, "SearchScopeID", void 0);
|
|
97207
|
+
__decorate([
|
|
97208
|
+
Field({ nullable: true }),
|
|
97209
|
+
__metadata("design:type", String)
|
|
97210
|
+
], CreateMJSearchScopeProviderInput.prototype, "SearchProviderID", void 0);
|
|
97211
|
+
__decorate([
|
|
97212
|
+
Field(() => Boolean, { nullable: true }),
|
|
97213
|
+
__metadata("design:type", Boolean)
|
|
97214
|
+
], CreateMJSearchScopeProviderInput.prototype, "Enabled", void 0);
|
|
97215
|
+
__decorate([
|
|
97216
|
+
Field(() => Int, { nullable: true }),
|
|
97217
|
+
__metadata("design:type", Number)
|
|
97218
|
+
], CreateMJSearchScopeProviderInput.prototype, "MaxResultsOverride", void 0);
|
|
97219
|
+
__decorate([
|
|
97220
|
+
Field({ nullable: true }),
|
|
97221
|
+
__metadata("design:type", String)
|
|
97222
|
+
], CreateMJSearchScopeProviderInput.prototype, "ProviderConfigOverride", void 0);
|
|
97223
|
+
__decorate([
|
|
97224
|
+
Field({ nullable: true }),
|
|
97225
|
+
__metadata("design:type", String)
|
|
97226
|
+
], CreateMJSearchScopeProviderInput.prototype, "QueryTransformTemplateID", void 0);
|
|
97227
|
+
__decorate([
|
|
97228
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
97229
|
+
__metadata("design:type", RestoreContextInput)
|
|
97230
|
+
], CreateMJSearchScopeProviderInput.prototype, "RestoreContext___", void 0);
|
|
97231
|
+
CreateMJSearchScopeProviderInput = __decorate([
|
|
97232
|
+
InputType()
|
|
97233
|
+
], CreateMJSearchScopeProviderInput);
|
|
97234
|
+
export { CreateMJSearchScopeProviderInput };
|
|
97235
|
+
//****************************************************************************
|
|
97236
|
+
// INPUT TYPE for MJ: Search Scope Providers
|
|
97237
|
+
//****************************************************************************
|
|
97238
|
+
let UpdateMJSearchScopeProviderInput = class UpdateMJSearchScopeProviderInput {
|
|
97239
|
+
};
|
|
97240
|
+
__decorate([
|
|
97241
|
+
Field(),
|
|
97242
|
+
__metadata("design:type", String)
|
|
97243
|
+
], UpdateMJSearchScopeProviderInput.prototype, "ID", void 0);
|
|
97244
|
+
__decorate([
|
|
97245
|
+
Field({ nullable: true }),
|
|
97246
|
+
__metadata("design:type", String)
|
|
97247
|
+
], UpdateMJSearchScopeProviderInput.prototype, "SearchScopeID", void 0);
|
|
97248
|
+
__decorate([
|
|
97249
|
+
Field({ nullable: true }),
|
|
97250
|
+
__metadata("design:type", String)
|
|
97251
|
+
], UpdateMJSearchScopeProviderInput.prototype, "SearchProviderID", void 0);
|
|
97252
|
+
__decorate([
|
|
97253
|
+
Field(() => Boolean, { nullable: true }),
|
|
97254
|
+
__metadata("design:type", Boolean)
|
|
97255
|
+
], UpdateMJSearchScopeProviderInput.prototype, "Enabled", void 0);
|
|
97256
|
+
__decorate([
|
|
97257
|
+
Field(() => Int, { nullable: true }),
|
|
97258
|
+
__metadata("design:type", Number)
|
|
97259
|
+
], UpdateMJSearchScopeProviderInput.prototype, "MaxResultsOverride", void 0);
|
|
97260
|
+
__decorate([
|
|
97261
|
+
Field({ nullable: true }),
|
|
97262
|
+
__metadata("design:type", String)
|
|
97263
|
+
], UpdateMJSearchScopeProviderInput.prototype, "ProviderConfigOverride", void 0);
|
|
97264
|
+
__decorate([
|
|
97265
|
+
Field({ nullable: true }),
|
|
97266
|
+
__metadata("design:type", String)
|
|
97267
|
+
], UpdateMJSearchScopeProviderInput.prototype, "QueryTransformTemplateID", void 0);
|
|
97268
|
+
__decorate([
|
|
97269
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
97270
|
+
__metadata("design:type", Array)
|
|
97271
|
+
], UpdateMJSearchScopeProviderInput.prototype, "OldValues___", void 0);
|
|
97272
|
+
__decorate([
|
|
97273
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
97274
|
+
__metadata("design:type", RestoreContextInput)
|
|
97275
|
+
], UpdateMJSearchScopeProviderInput.prototype, "RestoreContext___", void 0);
|
|
97276
|
+
UpdateMJSearchScopeProviderInput = __decorate([
|
|
97277
|
+
InputType()
|
|
97278
|
+
], UpdateMJSearchScopeProviderInput);
|
|
97279
|
+
export { UpdateMJSearchScopeProviderInput };
|
|
97280
|
+
//****************************************************************************
|
|
97281
|
+
// RESOLVER for MJ: Search Scope Providers
|
|
97282
|
+
//****************************************************************************
|
|
97283
|
+
let RunMJSearchScopeProviderViewResult = class RunMJSearchScopeProviderViewResult {
|
|
97284
|
+
};
|
|
97285
|
+
__decorate([
|
|
97286
|
+
Field(() => [MJSearchScopeProvider_]),
|
|
97287
|
+
__metadata("design:type", Array)
|
|
97288
|
+
], RunMJSearchScopeProviderViewResult.prototype, "Results", void 0);
|
|
97289
|
+
__decorate([
|
|
97290
|
+
Field(() => String, { nullable: true }),
|
|
97291
|
+
__metadata("design:type", String)
|
|
97292
|
+
], RunMJSearchScopeProviderViewResult.prototype, "UserViewRunID", void 0);
|
|
97293
|
+
__decorate([
|
|
97294
|
+
Field(() => Int, { nullable: true }),
|
|
97295
|
+
__metadata("design:type", Number)
|
|
97296
|
+
], RunMJSearchScopeProviderViewResult.prototype, "RowCount", void 0);
|
|
97297
|
+
__decorate([
|
|
97298
|
+
Field(() => Int, { nullable: true }),
|
|
97299
|
+
__metadata("design:type", Number)
|
|
97300
|
+
], RunMJSearchScopeProviderViewResult.prototype, "TotalRowCount", void 0);
|
|
97301
|
+
__decorate([
|
|
97302
|
+
Field(() => Int, { nullable: true }),
|
|
97303
|
+
__metadata("design:type", Number)
|
|
97304
|
+
], RunMJSearchScopeProviderViewResult.prototype, "ExecutionTime", void 0);
|
|
97305
|
+
__decorate([
|
|
97306
|
+
Field({ nullable: true }),
|
|
97307
|
+
__metadata("design:type", String)
|
|
97308
|
+
], RunMJSearchScopeProviderViewResult.prototype, "ErrorMessage", void 0);
|
|
97309
|
+
__decorate([
|
|
97310
|
+
Field(() => Boolean, { nullable: false }),
|
|
97311
|
+
__metadata("design:type", Boolean)
|
|
97312
|
+
], RunMJSearchScopeProviderViewResult.prototype, "Success", void 0);
|
|
97313
|
+
RunMJSearchScopeProviderViewResult = __decorate([
|
|
97314
|
+
ObjectType()
|
|
97315
|
+
], RunMJSearchScopeProviderViewResult);
|
|
97316
|
+
export { RunMJSearchScopeProviderViewResult };
|
|
97317
|
+
let MJSearchScopeProviderResolver = class MJSearchScopeProviderResolver extends ResolverBase {
|
|
97318
|
+
async RunMJSearchScopeProviderViewByID(input, { providers, userPayload }, pubSub) {
|
|
97319
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97320
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97321
|
+
}
|
|
97322
|
+
async RunMJSearchScopeProviderViewByName(input, { providers, userPayload }, pubSub) {
|
|
97323
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97324
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97325
|
+
}
|
|
97326
|
+
async RunMJSearchScopeProviderDynamicView(input, { providers, userPayload }, pubSub) {
|
|
97327
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97328
|
+
input.EntityName = 'MJ: Search Scope Providers';
|
|
97329
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
97330
|
+
}
|
|
97331
|
+
async MJSearchScopeProvider(ID, { userPayload, providers }, pubSub) {
|
|
97332
|
+
this.CheckUserReadPermissions('MJ: Search Scope Providers', userPayload);
|
|
97333
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97334
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeProviders')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Providers', userPayload, EntityPermissionType.Read, 'AND');
|
|
97335
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
97336
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Scope Providers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
97337
|
+
return result;
|
|
97338
|
+
}
|
|
97339
|
+
async CreateMJSearchScopeProvider(input, { providers, userPayload }, pubSub) {
|
|
97340
|
+
const provider = GetReadWriteProvider(providers);
|
|
97341
|
+
return this.CreateRecord('MJ: Search Scope Providers', input, provider, userPayload, pubSub);
|
|
97342
|
+
}
|
|
97343
|
+
async UpdateMJSearchScopeProvider(input, { providers, userPayload }, pubSub) {
|
|
97344
|
+
const provider = GetReadWriteProvider(providers);
|
|
97345
|
+
return this.UpdateRecord('MJ: Search Scope Providers', input, provider, userPayload, pubSub);
|
|
97346
|
+
}
|
|
97347
|
+
async DeleteMJSearchScopeProvider(ID, options, { providers, userPayload }, pubSub) {
|
|
97348
|
+
const provider = GetReadWriteProvider(providers);
|
|
97349
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
97350
|
+
return this.DeleteRecord('MJ: Search Scope Providers', key, options, provider, userPayload, pubSub);
|
|
97351
|
+
}
|
|
97352
|
+
};
|
|
97353
|
+
__decorate([
|
|
97354
|
+
Query(() => RunMJSearchScopeProviderViewResult),
|
|
97355
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
97356
|
+
__param(1, Ctx()),
|
|
97357
|
+
__param(2, PubSub()),
|
|
97358
|
+
__metadata("design:type", Function),
|
|
97359
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
97360
|
+
__metadata("design:returntype", Promise)
|
|
97361
|
+
], MJSearchScopeProviderResolver.prototype, "RunMJSearchScopeProviderViewByID", null);
|
|
97362
|
+
__decorate([
|
|
97363
|
+
Query(() => RunMJSearchScopeProviderViewResult),
|
|
97364
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
97365
|
+
__param(1, Ctx()),
|
|
97366
|
+
__param(2, PubSub()),
|
|
97367
|
+
__metadata("design:type", Function),
|
|
97368
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
97369
|
+
__metadata("design:returntype", Promise)
|
|
97370
|
+
], MJSearchScopeProviderResolver.prototype, "RunMJSearchScopeProviderViewByName", null);
|
|
97371
|
+
__decorate([
|
|
97372
|
+
Query(() => RunMJSearchScopeProviderViewResult),
|
|
97373
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
97374
|
+
__param(1, Ctx()),
|
|
97375
|
+
__param(2, PubSub()),
|
|
97376
|
+
__metadata("design:type", Function),
|
|
97377
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
97378
|
+
__metadata("design:returntype", Promise)
|
|
97379
|
+
], MJSearchScopeProviderResolver.prototype, "RunMJSearchScopeProviderDynamicView", null);
|
|
97380
|
+
__decorate([
|
|
97381
|
+
Query(() => MJSearchScopeProvider_, { nullable: true }),
|
|
97382
|
+
__param(0, Arg('ID', () => String)),
|
|
97383
|
+
__param(1, Ctx()),
|
|
97384
|
+
__param(2, PubSub()),
|
|
97385
|
+
__metadata("design:type", Function),
|
|
97386
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
97387
|
+
__metadata("design:returntype", Promise)
|
|
97388
|
+
], MJSearchScopeProviderResolver.prototype, "MJSearchScopeProvider", null);
|
|
97389
|
+
__decorate([
|
|
97390
|
+
Mutation(() => MJSearchScopeProvider_),
|
|
97391
|
+
__param(0, Arg('input', () => CreateMJSearchScopeProviderInput)),
|
|
97392
|
+
__param(1, Ctx()),
|
|
97393
|
+
__param(2, PubSub()),
|
|
97394
|
+
__metadata("design:type", Function),
|
|
97395
|
+
__metadata("design:paramtypes", [CreateMJSearchScopeProviderInput, Object, PubSubEngine]),
|
|
97396
|
+
__metadata("design:returntype", Promise)
|
|
97397
|
+
], MJSearchScopeProviderResolver.prototype, "CreateMJSearchScopeProvider", null);
|
|
97398
|
+
__decorate([
|
|
97399
|
+
Mutation(() => MJSearchScopeProvider_),
|
|
97400
|
+
__param(0, Arg('input', () => UpdateMJSearchScopeProviderInput)),
|
|
97401
|
+
__param(1, Ctx()),
|
|
97402
|
+
__param(2, PubSub()),
|
|
97403
|
+
__metadata("design:type", Function),
|
|
97404
|
+
__metadata("design:paramtypes", [UpdateMJSearchScopeProviderInput, Object, PubSubEngine]),
|
|
97405
|
+
__metadata("design:returntype", Promise)
|
|
97406
|
+
], MJSearchScopeProviderResolver.prototype, "UpdateMJSearchScopeProvider", null);
|
|
97407
|
+
__decorate([
|
|
97408
|
+
Mutation(() => MJSearchScopeProvider_),
|
|
97409
|
+
__param(0, Arg('ID', () => String)),
|
|
97410
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
97411
|
+
__param(2, Ctx()),
|
|
97412
|
+
__param(3, PubSub()),
|
|
97413
|
+
__metadata("design:type", Function),
|
|
97414
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
97415
|
+
__metadata("design:returntype", Promise)
|
|
97416
|
+
], MJSearchScopeProviderResolver.prototype, "DeleteMJSearchScopeProvider", null);
|
|
97417
|
+
MJSearchScopeProviderResolver = __decorate([
|
|
97418
|
+
Resolver(MJSearchScopeProvider_)
|
|
97419
|
+
], MJSearchScopeProviderResolver);
|
|
97420
|
+
export { MJSearchScopeProviderResolver };
|
|
97421
|
+
//****************************************************************************
|
|
97422
|
+
// ENTITY CLASS for MJ: Search Scope Storage Accounts
|
|
97423
|
+
//****************************************************************************
|
|
97424
|
+
let MJSearchScopeStorageAccount_ = class MJSearchScopeStorageAccount_ {
|
|
97425
|
+
};
|
|
97426
|
+
__decorate([
|
|
97427
|
+
Field(),
|
|
97428
|
+
MaxLength(36),
|
|
97429
|
+
__metadata("design:type", String)
|
|
97430
|
+
], MJSearchScopeStorageAccount_.prototype, "ID", void 0);
|
|
97431
|
+
__decorate([
|
|
97432
|
+
Field(),
|
|
97433
|
+
MaxLength(36),
|
|
97434
|
+
__metadata("design:type", String)
|
|
97435
|
+
], MJSearchScopeStorageAccount_.prototype, "SearchScopeID", void 0);
|
|
97436
|
+
__decorate([
|
|
97437
|
+
Field(),
|
|
97438
|
+
MaxLength(36),
|
|
97439
|
+
__metadata("design:type", String)
|
|
97440
|
+
], MJSearchScopeStorageAccount_.prototype, "FileStorageAccountID", void 0);
|
|
97441
|
+
__decorate([
|
|
97442
|
+
Field({ nullable: true, description: `Optional folder path restriction. NULL = entire storage account. Example: /policies/hr/. Rendered as a Nunjucks template with SearchContext variables so platforms can do per-tenant folder routing like /tenants/{{ context.PrimaryScopeRecordID }}/.` }),
|
|
97443
|
+
MaxLength(1000),
|
|
97444
|
+
__metadata("design:type", String)
|
|
97445
|
+
], MJSearchScopeStorageAccount_.prototype, "FolderPath", void 0);
|
|
97446
|
+
__decorate([
|
|
97447
|
+
Field(),
|
|
97448
|
+
__metadata("design:type", Date)
|
|
97449
|
+
], MJSearchScopeStorageAccount_.prototype, "_mj__CreatedAt", void 0);
|
|
97450
|
+
__decorate([
|
|
97451
|
+
Field(),
|
|
97452
|
+
__metadata("design:type", Date)
|
|
97453
|
+
], MJSearchScopeStorageAccount_.prototype, "_mj__UpdatedAt", void 0);
|
|
97454
|
+
__decorate([
|
|
97455
|
+
Field(),
|
|
97456
|
+
MaxLength(200),
|
|
97457
|
+
__metadata("design:type", String)
|
|
97458
|
+
], MJSearchScopeStorageAccount_.prototype, "SearchScope", void 0);
|
|
97459
|
+
__decorate([
|
|
97460
|
+
Field(),
|
|
97461
|
+
MaxLength(200),
|
|
97462
|
+
__metadata("design:type", String)
|
|
97463
|
+
], MJSearchScopeStorageAccount_.prototype, "FileStorageAccount", void 0);
|
|
97464
|
+
MJSearchScopeStorageAccount_ = __decorate([
|
|
97465
|
+
ObjectType({ description: `Controls which file storage accounts/folders participate in a scope.` })
|
|
97466
|
+
], MJSearchScopeStorageAccount_);
|
|
97467
|
+
export { MJSearchScopeStorageAccount_ };
|
|
97468
|
+
//****************************************************************************
|
|
97469
|
+
// INPUT TYPE for MJ: Search Scope Storage Accounts
|
|
97470
|
+
//****************************************************************************
|
|
97471
|
+
let CreateMJSearchScopeStorageAccountInput = class CreateMJSearchScopeStorageAccountInput {
|
|
97472
|
+
};
|
|
97473
|
+
__decorate([
|
|
97474
|
+
Field({ nullable: true }),
|
|
97475
|
+
__metadata("design:type", String)
|
|
97476
|
+
], CreateMJSearchScopeStorageAccountInput.prototype, "ID", void 0);
|
|
97477
|
+
__decorate([
|
|
97478
|
+
Field({ nullable: true }),
|
|
97479
|
+
__metadata("design:type", String)
|
|
97480
|
+
], CreateMJSearchScopeStorageAccountInput.prototype, "SearchScopeID", void 0);
|
|
97481
|
+
__decorate([
|
|
97482
|
+
Field({ nullable: true }),
|
|
97483
|
+
__metadata("design:type", String)
|
|
97484
|
+
], CreateMJSearchScopeStorageAccountInput.prototype, "FileStorageAccountID", void 0);
|
|
97485
|
+
__decorate([
|
|
97486
|
+
Field({ nullable: true }),
|
|
97487
|
+
__metadata("design:type", String)
|
|
97488
|
+
], CreateMJSearchScopeStorageAccountInput.prototype, "FolderPath", void 0);
|
|
97489
|
+
__decorate([
|
|
97490
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
97491
|
+
__metadata("design:type", RestoreContextInput)
|
|
97492
|
+
], CreateMJSearchScopeStorageAccountInput.prototype, "RestoreContext___", void 0);
|
|
97493
|
+
CreateMJSearchScopeStorageAccountInput = __decorate([
|
|
97494
|
+
InputType()
|
|
97495
|
+
], CreateMJSearchScopeStorageAccountInput);
|
|
97496
|
+
export { CreateMJSearchScopeStorageAccountInput };
|
|
97497
|
+
//****************************************************************************
|
|
97498
|
+
// INPUT TYPE for MJ: Search Scope Storage Accounts
|
|
97499
|
+
//****************************************************************************
|
|
97500
|
+
let UpdateMJSearchScopeStorageAccountInput = class UpdateMJSearchScopeStorageAccountInput {
|
|
97501
|
+
};
|
|
97502
|
+
__decorate([
|
|
97503
|
+
Field(),
|
|
97504
|
+
__metadata("design:type", String)
|
|
97505
|
+
], UpdateMJSearchScopeStorageAccountInput.prototype, "ID", void 0);
|
|
97506
|
+
__decorate([
|
|
97507
|
+
Field({ nullable: true }),
|
|
97508
|
+
__metadata("design:type", String)
|
|
97509
|
+
], UpdateMJSearchScopeStorageAccountInput.prototype, "SearchScopeID", void 0);
|
|
97510
|
+
__decorate([
|
|
97511
|
+
Field({ nullable: true }),
|
|
97512
|
+
__metadata("design:type", String)
|
|
97513
|
+
], UpdateMJSearchScopeStorageAccountInput.prototype, "FileStorageAccountID", void 0);
|
|
97514
|
+
__decorate([
|
|
97515
|
+
Field({ nullable: true }),
|
|
97516
|
+
__metadata("design:type", String)
|
|
97517
|
+
], UpdateMJSearchScopeStorageAccountInput.prototype, "FolderPath", void 0);
|
|
97518
|
+
__decorate([
|
|
97519
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
97520
|
+
__metadata("design:type", Array)
|
|
97521
|
+
], UpdateMJSearchScopeStorageAccountInput.prototype, "OldValues___", void 0);
|
|
97522
|
+
__decorate([
|
|
97523
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
97524
|
+
__metadata("design:type", RestoreContextInput)
|
|
97525
|
+
], UpdateMJSearchScopeStorageAccountInput.prototype, "RestoreContext___", void 0);
|
|
97526
|
+
UpdateMJSearchScopeStorageAccountInput = __decorate([
|
|
97527
|
+
InputType()
|
|
97528
|
+
], UpdateMJSearchScopeStorageAccountInput);
|
|
97529
|
+
export { UpdateMJSearchScopeStorageAccountInput };
|
|
97530
|
+
//****************************************************************************
|
|
97531
|
+
// RESOLVER for MJ: Search Scope Storage Accounts
|
|
97532
|
+
//****************************************************************************
|
|
97533
|
+
let RunMJSearchScopeStorageAccountViewResult = class RunMJSearchScopeStorageAccountViewResult {
|
|
97534
|
+
};
|
|
97535
|
+
__decorate([
|
|
97536
|
+
Field(() => [MJSearchScopeStorageAccount_]),
|
|
97537
|
+
__metadata("design:type", Array)
|
|
97538
|
+
], RunMJSearchScopeStorageAccountViewResult.prototype, "Results", void 0);
|
|
97539
|
+
__decorate([
|
|
97540
|
+
Field(() => String, { nullable: true }),
|
|
97541
|
+
__metadata("design:type", String)
|
|
97542
|
+
], RunMJSearchScopeStorageAccountViewResult.prototype, "UserViewRunID", void 0);
|
|
97543
|
+
__decorate([
|
|
97544
|
+
Field(() => Int, { nullable: true }),
|
|
97545
|
+
__metadata("design:type", Number)
|
|
97546
|
+
], RunMJSearchScopeStorageAccountViewResult.prototype, "RowCount", void 0);
|
|
97547
|
+
__decorate([
|
|
97548
|
+
Field(() => Int, { nullable: true }),
|
|
97549
|
+
__metadata("design:type", Number)
|
|
97550
|
+
], RunMJSearchScopeStorageAccountViewResult.prototype, "TotalRowCount", void 0);
|
|
97551
|
+
__decorate([
|
|
97552
|
+
Field(() => Int, { nullable: true }),
|
|
97553
|
+
__metadata("design:type", Number)
|
|
97554
|
+
], RunMJSearchScopeStorageAccountViewResult.prototype, "ExecutionTime", void 0);
|
|
97555
|
+
__decorate([
|
|
97556
|
+
Field({ nullable: true }),
|
|
97557
|
+
__metadata("design:type", String)
|
|
97558
|
+
], RunMJSearchScopeStorageAccountViewResult.prototype, "ErrorMessage", void 0);
|
|
97559
|
+
__decorate([
|
|
97560
|
+
Field(() => Boolean, { nullable: false }),
|
|
97561
|
+
__metadata("design:type", Boolean)
|
|
97562
|
+
], RunMJSearchScopeStorageAccountViewResult.prototype, "Success", void 0);
|
|
97563
|
+
RunMJSearchScopeStorageAccountViewResult = __decorate([
|
|
97564
|
+
ObjectType()
|
|
97565
|
+
], RunMJSearchScopeStorageAccountViewResult);
|
|
97566
|
+
export { RunMJSearchScopeStorageAccountViewResult };
|
|
97567
|
+
let MJSearchScopeStorageAccountResolver = class MJSearchScopeStorageAccountResolver extends ResolverBase {
|
|
97568
|
+
async RunMJSearchScopeStorageAccountViewByID(input, { providers, userPayload }, pubSub) {
|
|
97569
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97570
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97571
|
+
}
|
|
97572
|
+
async RunMJSearchScopeStorageAccountViewByName(input, { providers, userPayload }, pubSub) {
|
|
97573
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97574
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97575
|
+
}
|
|
97576
|
+
async RunMJSearchScopeStorageAccountDynamicView(input, { providers, userPayload }, pubSub) {
|
|
97577
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97578
|
+
input.EntityName = 'MJ: Search Scope Storage Accounts';
|
|
97579
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
97580
|
+
}
|
|
97581
|
+
async MJSearchScopeStorageAccount(ID, { userPayload, providers }, pubSub) {
|
|
97582
|
+
this.CheckUserReadPermissions('MJ: Search Scope Storage Accounts', userPayload);
|
|
97583
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97584
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeStorageAccounts')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Storage Accounts', userPayload, EntityPermissionType.Read, 'AND');
|
|
97585
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
97586
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Scope Storage Accounts', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
97587
|
+
return result;
|
|
97588
|
+
}
|
|
97589
|
+
async CreateMJSearchScopeStorageAccount(input, { providers, userPayload }, pubSub) {
|
|
97590
|
+
const provider = GetReadWriteProvider(providers);
|
|
97591
|
+
return this.CreateRecord('MJ: Search Scope Storage Accounts', input, provider, userPayload, pubSub);
|
|
97592
|
+
}
|
|
97593
|
+
async UpdateMJSearchScopeStorageAccount(input, { providers, userPayload }, pubSub) {
|
|
97594
|
+
const provider = GetReadWriteProvider(providers);
|
|
97595
|
+
return this.UpdateRecord('MJ: Search Scope Storage Accounts', input, provider, userPayload, pubSub);
|
|
97596
|
+
}
|
|
97597
|
+
async DeleteMJSearchScopeStorageAccount(ID, options, { providers, userPayload }, pubSub) {
|
|
97598
|
+
const provider = GetReadWriteProvider(providers);
|
|
97599
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
97600
|
+
return this.DeleteRecord('MJ: Search Scope Storage Accounts', key, options, provider, userPayload, pubSub);
|
|
97601
|
+
}
|
|
97602
|
+
};
|
|
97603
|
+
__decorate([
|
|
97604
|
+
Query(() => RunMJSearchScopeStorageAccountViewResult),
|
|
97605
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
97606
|
+
__param(1, Ctx()),
|
|
97607
|
+
__param(2, PubSub()),
|
|
97608
|
+
__metadata("design:type", Function),
|
|
97609
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
97610
|
+
__metadata("design:returntype", Promise)
|
|
97611
|
+
], MJSearchScopeStorageAccountResolver.prototype, "RunMJSearchScopeStorageAccountViewByID", null);
|
|
97612
|
+
__decorate([
|
|
97613
|
+
Query(() => RunMJSearchScopeStorageAccountViewResult),
|
|
97614
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
97615
|
+
__param(1, Ctx()),
|
|
97616
|
+
__param(2, PubSub()),
|
|
97617
|
+
__metadata("design:type", Function),
|
|
97618
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
97619
|
+
__metadata("design:returntype", Promise)
|
|
97620
|
+
], MJSearchScopeStorageAccountResolver.prototype, "RunMJSearchScopeStorageAccountViewByName", null);
|
|
97621
|
+
__decorate([
|
|
97622
|
+
Query(() => RunMJSearchScopeStorageAccountViewResult),
|
|
97623
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
97624
|
+
__param(1, Ctx()),
|
|
97625
|
+
__param(2, PubSub()),
|
|
97626
|
+
__metadata("design:type", Function),
|
|
97627
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
97628
|
+
__metadata("design:returntype", Promise)
|
|
97629
|
+
], MJSearchScopeStorageAccountResolver.prototype, "RunMJSearchScopeStorageAccountDynamicView", null);
|
|
97630
|
+
__decorate([
|
|
97631
|
+
Query(() => MJSearchScopeStorageAccount_, { nullable: true }),
|
|
97632
|
+
__param(0, Arg('ID', () => String)),
|
|
97633
|
+
__param(1, Ctx()),
|
|
97634
|
+
__param(2, PubSub()),
|
|
97635
|
+
__metadata("design:type", Function),
|
|
97636
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
97637
|
+
__metadata("design:returntype", Promise)
|
|
97638
|
+
], MJSearchScopeStorageAccountResolver.prototype, "MJSearchScopeStorageAccount", null);
|
|
97639
|
+
__decorate([
|
|
97640
|
+
Mutation(() => MJSearchScopeStorageAccount_),
|
|
97641
|
+
__param(0, Arg('input', () => CreateMJSearchScopeStorageAccountInput)),
|
|
97642
|
+
__param(1, Ctx()),
|
|
97643
|
+
__param(2, PubSub()),
|
|
97644
|
+
__metadata("design:type", Function),
|
|
97645
|
+
__metadata("design:paramtypes", [CreateMJSearchScopeStorageAccountInput, Object, PubSubEngine]),
|
|
97646
|
+
__metadata("design:returntype", Promise)
|
|
97647
|
+
], MJSearchScopeStorageAccountResolver.prototype, "CreateMJSearchScopeStorageAccount", null);
|
|
97648
|
+
__decorate([
|
|
97649
|
+
Mutation(() => MJSearchScopeStorageAccount_),
|
|
97650
|
+
__param(0, Arg('input', () => UpdateMJSearchScopeStorageAccountInput)),
|
|
97651
|
+
__param(1, Ctx()),
|
|
97652
|
+
__param(2, PubSub()),
|
|
97653
|
+
__metadata("design:type", Function),
|
|
97654
|
+
__metadata("design:paramtypes", [UpdateMJSearchScopeStorageAccountInput, Object, PubSubEngine]),
|
|
97655
|
+
__metadata("design:returntype", Promise)
|
|
97656
|
+
], MJSearchScopeStorageAccountResolver.prototype, "UpdateMJSearchScopeStorageAccount", null);
|
|
97657
|
+
__decorate([
|
|
97658
|
+
Mutation(() => MJSearchScopeStorageAccount_),
|
|
97659
|
+
__param(0, Arg('ID', () => String)),
|
|
97660
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
97661
|
+
__param(2, Ctx()),
|
|
97662
|
+
__param(3, PubSub()),
|
|
97663
|
+
__metadata("design:type", Function),
|
|
97664
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
97665
|
+
__metadata("design:returntype", Promise)
|
|
97666
|
+
], MJSearchScopeStorageAccountResolver.prototype, "DeleteMJSearchScopeStorageAccount", null);
|
|
97667
|
+
MJSearchScopeStorageAccountResolver = __decorate([
|
|
97668
|
+
Resolver(MJSearchScopeStorageAccount_)
|
|
97669
|
+
], MJSearchScopeStorageAccountResolver);
|
|
97670
|
+
export { MJSearchScopeStorageAccountResolver };
|
|
97671
|
+
//****************************************************************************
|
|
97672
|
+
// ENTITY CLASS for MJ: Search Scope Test Queries
|
|
97673
|
+
//****************************************************************************
|
|
97674
|
+
let MJSearchScopeTestQuery_ = class MJSearchScopeTestQuery_ {
|
|
97675
|
+
};
|
|
97676
|
+
__decorate([
|
|
97677
|
+
Field(),
|
|
97678
|
+
MaxLength(36),
|
|
97679
|
+
__metadata("design:type", String)
|
|
97680
|
+
], MJSearchScopeTestQuery_.prototype, "ID", void 0);
|
|
97681
|
+
__decorate([
|
|
97682
|
+
Field({ description: `The SearchScope this test query belongs to. Cascade-restricted via FK so accidental scope deletion preserves test history.` }),
|
|
97683
|
+
MaxLength(36),
|
|
97684
|
+
__metadata("design:type", String)
|
|
97685
|
+
], MJSearchScopeTestQuery_.prototype, "SearchScopeID", void 0);
|
|
97686
|
+
__decorate([
|
|
97687
|
+
Field({ description: `Short human-readable label for the test query, shown in the form's test-query grid (e.g. "VIP customer escalation", "expense reimbursement policy").` }),
|
|
97688
|
+
MaxLength(200),
|
|
97689
|
+
__metadata("design:type", String)
|
|
97690
|
+
], MJSearchScopeTestQuery_.prototype, "Label", void 0);
|
|
97691
|
+
__decorate([
|
|
97692
|
+
Field({ description: `The query text itself. NVARCHAR(MAX) because canonical queries can be full sentences or chunks of natural-language context.` }),
|
|
97693
|
+
__metadata("design:type", String)
|
|
97694
|
+
], MJSearchScopeTestQuery_.prototype, "Query", void 0);
|
|
97695
|
+
__decorate([
|
|
97696
|
+
Field({ nullable: true, description: `Optional MJ entity name (e.g. "Contacts", "Documents") of the expected top result. When set together with ExpectedTopResultRecordID, lets the test runner assert that the tuned scope returns the right record at rank #1 — a regression tripwire for fusion / reranker changes.` }),
|
|
97697
|
+
MaxLength(255),
|
|
97698
|
+
__metadata("design:type", String)
|
|
97699
|
+
], MJSearchScopeTestQuery_.prototype, "ExpectedTopResultEntity", void 0);
|
|
97700
|
+
__decorate([
|
|
97701
|
+
Field({ nullable: true, description: `Optional record ID of the expected top result, paired with ExpectedTopResultEntity. NULL = no assertion (the query is exploratory).` }),
|
|
97702
|
+
MaxLength(36),
|
|
97703
|
+
__metadata("design:type", String)
|
|
97704
|
+
], MJSearchScopeTestQuery_.prototype, "ExpectedTopResultRecordID", void 0);
|
|
97705
|
+
__decorate([
|
|
97706
|
+
Field({ nullable: true, description: `Free-form notes explaining why this query is canonical or what edge case it represents.` }),
|
|
97707
|
+
__metadata("design:type", String)
|
|
97708
|
+
], MJSearchScopeTestQuery_.prototype, "Notes", void 0);
|
|
97709
|
+
__decorate([
|
|
97710
|
+
Field(),
|
|
97711
|
+
__metadata("design:type", Date)
|
|
97712
|
+
], MJSearchScopeTestQuery_.prototype, "_mj__CreatedAt", void 0);
|
|
97713
|
+
__decorate([
|
|
97714
|
+
Field(),
|
|
97715
|
+
__metadata("design:type", Date)
|
|
97716
|
+
], MJSearchScopeTestQuery_.prototype, "_mj__UpdatedAt", void 0);
|
|
97717
|
+
__decorate([
|
|
97718
|
+
Field(),
|
|
97719
|
+
MaxLength(200),
|
|
97720
|
+
__metadata("design:type", String)
|
|
97721
|
+
], MJSearchScopeTestQuery_.prototype, "SearchScope", void 0);
|
|
97722
|
+
MJSearchScopeTestQuery_ = __decorate([
|
|
97723
|
+
ObjectType({ description: `Canonical test queries owned by a SearchScope. Used by scope authors to validate tuning changes — re-run a saved query after swapping the reranker or adjusting fusion weights and compare results to the prior run.` })
|
|
97724
|
+
], MJSearchScopeTestQuery_);
|
|
97725
|
+
export { MJSearchScopeTestQuery_ };
|
|
97726
|
+
//****************************************************************************
|
|
97727
|
+
// INPUT TYPE for MJ: Search Scope Test Queries
|
|
95171
97728
|
//****************************************************************************
|
|
95172
|
-
let
|
|
97729
|
+
let CreateMJSearchScopeTestQueryInput = class CreateMJSearchScopeTestQueryInput {
|
|
95173
97730
|
};
|
|
95174
97731
|
__decorate([
|
|
95175
97732
|
Field({ nullable: true }),
|
|
95176
97733
|
__metadata("design:type", String)
|
|
95177
|
-
],
|
|
97734
|
+
], CreateMJSearchScopeTestQueryInput.prototype, "ID", void 0);
|
|
95178
97735
|
__decorate([
|
|
95179
97736
|
Field({ nullable: true }),
|
|
95180
97737
|
__metadata("design:type", String)
|
|
95181
|
-
],
|
|
97738
|
+
], CreateMJSearchScopeTestQueryInput.prototype, "SearchScopeID", void 0);
|
|
95182
97739
|
__decorate([
|
|
95183
97740
|
Field({ nullable: true }),
|
|
95184
97741
|
__metadata("design:type", String)
|
|
95185
|
-
],
|
|
97742
|
+
], CreateMJSearchScopeTestQueryInput.prototype, "Label", void 0);
|
|
95186
97743
|
__decorate([
|
|
95187
97744
|
Field({ nullable: true }),
|
|
95188
97745
|
__metadata("design:type", String)
|
|
95189
|
-
],
|
|
97746
|
+
], CreateMJSearchScopeTestQueryInput.prototype, "Query", void 0);
|
|
95190
97747
|
__decorate([
|
|
95191
97748
|
Field({ nullable: true }),
|
|
95192
97749
|
__metadata("design:type", String)
|
|
95193
|
-
],
|
|
97750
|
+
], CreateMJSearchScopeTestQueryInput.prototype, "ExpectedTopResultEntity", void 0);
|
|
95194
97751
|
__decorate([
|
|
95195
|
-
Field(
|
|
95196
|
-
__metadata("design:type",
|
|
95197
|
-
],
|
|
97752
|
+
Field({ nullable: true }),
|
|
97753
|
+
__metadata("design:type", String)
|
|
97754
|
+
], CreateMJSearchScopeTestQueryInput.prototype, "ExpectedTopResultRecordID", void 0);
|
|
95198
97755
|
__decorate([
|
|
95199
|
-
Field(
|
|
95200
|
-
__metadata("design:type",
|
|
95201
|
-
],
|
|
97756
|
+
Field({ nullable: true }),
|
|
97757
|
+
__metadata("design:type", String)
|
|
97758
|
+
], CreateMJSearchScopeTestQueryInput.prototype, "Notes", void 0);
|
|
95202
97759
|
__decorate([
|
|
95203
|
-
Field(() =>
|
|
95204
|
-
__metadata("design:type",
|
|
95205
|
-
],
|
|
97760
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
97761
|
+
__metadata("design:type", RestoreContextInput)
|
|
97762
|
+
], CreateMJSearchScopeTestQueryInput.prototype, "RestoreContext___", void 0);
|
|
97763
|
+
CreateMJSearchScopeTestQueryInput = __decorate([
|
|
97764
|
+
InputType()
|
|
97765
|
+
], CreateMJSearchScopeTestQueryInput);
|
|
97766
|
+
export { CreateMJSearchScopeTestQueryInput };
|
|
97767
|
+
//****************************************************************************
|
|
97768
|
+
// INPUT TYPE for MJ: Search Scope Test Queries
|
|
97769
|
+
//****************************************************************************
|
|
97770
|
+
let UpdateMJSearchScopeTestQueryInput = class UpdateMJSearchScopeTestQueryInput {
|
|
97771
|
+
};
|
|
97772
|
+
__decorate([
|
|
97773
|
+
Field(),
|
|
97774
|
+
__metadata("design:type", String)
|
|
97775
|
+
], UpdateMJSearchScopeTestQueryInput.prototype, "ID", void 0);
|
|
95206
97776
|
__decorate([
|
|
95207
97777
|
Field({ nullable: true }),
|
|
95208
97778
|
__metadata("design:type", String)
|
|
95209
|
-
],
|
|
97779
|
+
], UpdateMJSearchScopeTestQueryInput.prototype, "SearchScopeID", void 0);
|
|
95210
97780
|
__decorate([
|
|
95211
97781
|
Field({ nullable: true }),
|
|
95212
97782
|
__metadata("design:type", String)
|
|
95213
|
-
],
|
|
97783
|
+
], UpdateMJSearchScopeTestQueryInput.prototype, "Label", void 0);
|
|
95214
97784
|
__decorate([
|
|
95215
97785
|
Field({ nullable: true }),
|
|
95216
97786
|
__metadata("design:type", String)
|
|
95217
|
-
],
|
|
97787
|
+
], UpdateMJSearchScopeTestQueryInput.prototype, "Query", void 0);
|
|
95218
97788
|
__decorate([
|
|
95219
97789
|
Field({ nullable: true }),
|
|
95220
97790
|
__metadata("design:type", String)
|
|
95221
|
-
],
|
|
97791
|
+
], UpdateMJSearchScopeTestQueryInput.prototype, "ExpectedTopResultEntity", void 0);
|
|
95222
97792
|
__decorate([
|
|
95223
97793
|
Field({ nullable: true }),
|
|
95224
97794
|
__metadata("design:type", String)
|
|
95225
|
-
],
|
|
97795
|
+
], UpdateMJSearchScopeTestQueryInput.prototype, "ExpectedTopResultRecordID", void 0);
|
|
97796
|
+
__decorate([
|
|
97797
|
+
Field({ nullable: true }),
|
|
97798
|
+
__metadata("design:type", String)
|
|
97799
|
+
], UpdateMJSearchScopeTestQueryInput.prototype, "Notes", void 0);
|
|
97800
|
+
__decorate([
|
|
97801
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
97802
|
+
__metadata("design:type", Array)
|
|
97803
|
+
], UpdateMJSearchScopeTestQueryInput.prototype, "OldValues___", void 0);
|
|
95226
97804
|
__decorate([
|
|
95227
97805
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
95228
97806
|
__metadata("design:type", RestoreContextInput)
|
|
95229
|
-
],
|
|
95230
|
-
|
|
97807
|
+
], UpdateMJSearchScopeTestQueryInput.prototype, "RestoreContext___", void 0);
|
|
97808
|
+
UpdateMJSearchScopeTestQueryInput = __decorate([
|
|
95231
97809
|
InputType()
|
|
95232
|
-
],
|
|
95233
|
-
export {
|
|
97810
|
+
], UpdateMJSearchScopeTestQueryInput);
|
|
97811
|
+
export { UpdateMJSearchScopeTestQueryInput };
|
|
95234
97812
|
//****************************************************************************
|
|
95235
|
-
//
|
|
97813
|
+
// RESOLVER for MJ: Search Scope Test Queries
|
|
95236
97814
|
//****************************************************************************
|
|
95237
|
-
let
|
|
97815
|
+
let RunMJSearchScopeTestQueryViewResult = class RunMJSearchScopeTestQueryViewResult {
|
|
97816
|
+
};
|
|
97817
|
+
__decorate([
|
|
97818
|
+
Field(() => [MJSearchScopeTestQuery_]),
|
|
97819
|
+
__metadata("design:type", Array)
|
|
97820
|
+
], RunMJSearchScopeTestQueryViewResult.prototype, "Results", void 0);
|
|
97821
|
+
__decorate([
|
|
97822
|
+
Field(() => String, { nullable: true }),
|
|
97823
|
+
__metadata("design:type", String)
|
|
97824
|
+
], RunMJSearchScopeTestQueryViewResult.prototype, "UserViewRunID", void 0);
|
|
97825
|
+
__decorate([
|
|
97826
|
+
Field(() => Int, { nullable: true }),
|
|
97827
|
+
__metadata("design:type", Number)
|
|
97828
|
+
], RunMJSearchScopeTestQueryViewResult.prototype, "RowCount", void 0);
|
|
97829
|
+
__decorate([
|
|
97830
|
+
Field(() => Int, { nullable: true }),
|
|
97831
|
+
__metadata("design:type", Number)
|
|
97832
|
+
], RunMJSearchScopeTestQueryViewResult.prototype, "TotalRowCount", void 0);
|
|
97833
|
+
__decorate([
|
|
97834
|
+
Field(() => Int, { nullable: true }),
|
|
97835
|
+
__metadata("design:type", Number)
|
|
97836
|
+
], RunMJSearchScopeTestQueryViewResult.prototype, "ExecutionTime", void 0);
|
|
97837
|
+
__decorate([
|
|
97838
|
+
Field({ nullable: true }),
|
|
97839
|
+
__metadata("design:type", String)
|
|
97840
|
+
], RunMJSearchScopeTestQueryViewResult.prototype, "ErrorMessage", void 0);
|
|
97841
|
+
__decorate([
|
|
97842
|
+
Field(() => Boolean, { nullable: false }),
|
|
97843
|
+
__metadata("design:type", Boolean)
|
|
97844
|
+
], RunMJSearchScopeTestQueryViewResult.prototype, "Success", void 0);
|
|
97845
|
+
RunMJSearchScopeTestQueryViewResult = __decorate([
|
|
97846
|
+
ObjectType()
|
|
97847
|
+
], RunMJSearchScopeTestQueryViewResult);
|
|
97848
|
+
export { RunMJSearchScopeTestQueryViewResult };
|
|
97849
|
+
let MJSearchScopeTestQueryResolver = class MJSearchScopeTestQueryResolver extends ResolverBase {
|
|
97850
|
+
async RunMJSearchScopeTestQueryViewByID(input, { providers, userPayload }, pubSub) {
|
|
97851
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97852
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97853
|
+
}
|
|
97854
|
+
async RunMJSearchScopeTestQueryViewByName(input, { providers, userPayload }, pubSub) {
|
|
97855
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97856
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97857
|
+
}
|
|
97858
|
+
async RunMJSearchScopeTestQueryDynamicView(input, { providers, userPayload }, pubSub) {
|
|
97859
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97860
|
+
input.EntityName = 'MJ: Search Scope Test Queries';
|
|
97861
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
97862
|
+
}
|
|
97863
|
+
async MJSearchScopeTestQuery(ID, { userPayload, providers }, pubSub) {
|
|
97864
|
+
this.CheckUserReadPermissions('MJ: Search Scope Test Queries', userPayload);
|
|
97865
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97866
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeTestQueries')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Test Queries', userPayload, EntityPermissionType.Read, 'AND');
|
|
97867
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
97868
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Scope Test Queries', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
97869
|
+
return result;
|
|
97870
|
+
}
|
|
97871
|
+
async CreateMJSearchScopeTestQuery(input, { providers, userPayload }, pubSub) {
|
|
97872
|
+
const provider = GetReadWriteProvider(providers);
|
|
97873
|
+
return this.CreateRecord('MJ: Search Scope Test Queries', input, provider, userPayload, pubSub);
|
|
97874
|
+
}
|
|
97875
|
+
async UpdateMJSearchScopeTestQuery(input, { providers, userPayload }, pubSub) {
|
|
97876
|
+
const provider = GetReadWriteProvider(providers);
|
|
97877
|
+
return this.UpdateRecord('MJ: Search Scope Test Queries', input, provider, userPayload, pubSub);
|
|
97878
|
+
}
|
|
97879
|
+
async DeleteMJSearchScopeTestQuery(ID, options, { providers, userPayload }, pubSub) {
|
|
97880
|
+
const provider = GetReadWriteProvider(providers);
|
|
97881
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
97882
|
+
return this.DeleteRecord('MJ: Search Scope Test Queries', key, options, provider, userPayload, pubSub);
|
|
97883
|
+
}
|
|
97884
|
+
};
|
|
97885
|
+
__decorate([
|
|
97886
|
+
Query(() => RunMJSearchScopeTestQueryViewResult),
|
|
97887
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
97888
|
+
__param(1, Ctx()),
|
|
97889
|
+
__param(2, PubSub()),
|
|
97890
|
+
__metadata("design:type", Function),
|
|
97891
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
97892
|
+
__metadata("design:returntype", Promise)
|
|
97893
|
+
], MJSearchScopeTestQueryResolver.prototype, "RunMJSearchScopeTestQueryViewByID", null);
|
|
97894
|
+
__decorate([
|
|
97895
|
+
Query(() => RunMJSearchScopeTestQueryViewResult),
|
|
97896
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
97897
|
+
__param(1, Ctx()),
|
|
97898
|
+
__param(2, PubSub()),
|
|
97899
|
+
__metadata("design:type", Function),
|
|
97900
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
97901
|
+
__metadata("design:returntype", Promise)
|
|
97902
|
+
], MJSearchScopeTestQueryResolver.prototype, "RunMJSearchScopeTestQueryViewByName", null);
|
|
97903
|
+
__decorate([
|
|
97904
|
+
Query(() => RunMJSearchScopeTestQueryViewResult),
|
|
97905
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
97906
|
+
__param(1, Ctx()),
|
|
97907
|
+
__param(2, PubSub()),
|
|
97908
|
+
__metadata("design:type", Function),
|
|
97909
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
97910
|
+
__metadata("design:returntype", Promise)
|
|
97911
|
+
], MJSearchScopeTestQueryResolver.prototype, "RunMJSearchScopeTestQueryDynamicView", null);
|
|
97912
|
+
__decorate([
|
|
97913
|
+
Query(() => MJSearchScopeTestQuery_, { nullable: true }),
|
|
97914
|
+
__param(0, Arg('ID', () => String)),
|
|
97915
|
+
__param(1, Ctx()),
|
|
97916
|
+
__param(2, PubSub()),
|
|
97917
|
+
__metadata("design:type", Function),
|
|
97918
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
97919
|
+
__metadata("design:returntype", Promise)
|
|
97920
|
+
], MJSearchScopeTestQueryResolver.prototype, "MJSearchScopeTestQuery", null);
|
|
97921
|
+
__decorate([
|
|
97922
|
+
Mutation(() => MJSearchScopeTestQuery_),
|
|
97923
|
+
__param(0, Arg('input', () => CreateMJSearchScopeTestQueryInput)),
|
|
97924
|
+
__param(1, Ctx()),
|
|
97925
|
+
__param(2, PubSub()),
|
|
97926
|
+
__metadata("design:type", Function),
|
|
97927
|
+
__metadata("design:paramtypes", [CreateMJSearchScopeTestQueryInput, Object, PubSubEngine]),
|
|
97928
|
+
__metadata("design:returntype", Promise)
|
|
97929
|
+
], MJSearchScopeTestQueryResolver.prototype, "CreateMJSearchScopeTestQuery", null);
|
|
97930
|
+
__decorate([
|
|
97931
|
+
Mutation(() => MJSearchScopeTestQuery_),
|
|
97932
|
+
__param(0, Arg('input', () => UpdateMJSearchScopeTestQueryInput)),
|
|
97933
|
+
__param(1, Ctx()),
|
|
97934
|
+
__param(2, PubSub()),
|
|
97935
|
+
__metadata("design:type", Function),
|
|
97936
|
+
__metadata("design:paramtypes", [UpdateMJSearchScopeTestQueryInput, Object, PubSubEngine]),
|
|
97937
|
+
__metadata("design:returntype", Promise)
|
|
97938
|
+
], MJSearchScopeTestQueryResolver.prototype, "UpdateMJSearchScopeTestQuery", null);
|
|
97939
|
+
__decorate([
|
|
97940
|
+
Mutation(() => MJSearchScopeTestQuery_),
|
|
97941
|
+
__param(0, Arg('ID', () => String)),
|
|
97942
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
97943
|
+
__param(2, Ctx()),
|
|
97944
|
+
__param(3, PubSub()),
|
|
97945
|
+
__metadata("design:type", Function),
|
|
97946
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
97947
|
+
__metadata("design:returntype", Promise)
|
|
97948
|
+
], MJSearchScopeTestQueryResolver.prototype, "DeleteMJSearchScopeTestQuery", null);
|
|
97949
|
+
MJSearchScopeTestQueryResolver = __decorate([
|
|
97950
|
+
Resolver(MJSearchScopeTestQuery_)
|
|
97951
|
+
], MJSearchScopeTestQueryResolver);
|
|
97952
|
+
export { MJSearchScopeTestQueryResolver };
|
|
97953
|
+
//****************************************************************************
|
|
97954
|
+
// ENTITY CLASS for MJ: Search Scopes
|
|
97955
|
+
//****************************************************************************
|
|
97956
|
+
let MJSearchScope_ = class MJSearchScope_ {
|
|
95238
97957
|
};
|
|
95239
97958
|
__decorate([
|
|
95240
97959
|
Field(),
|
|
97960
|
+
MaxLength(36),
|
|
95241
97961
|
__metadata("design:type", String)
|
|
95242
|
-
],
|
|
97962
|
+
], MJSearchScope_.prototype, "ID", void 0);
|
|
97963
|
+
__decorate([
|
|
97964
|
+
Field({ description: `Human-readable scope name (e.g., "HR Policies", "Engineering Docs"). Unique across the system.` }),
|
|
97965
|
+
MaxLength(200),
|
|
97966
|
+
__metadata("design:type", String)
|
|
97967
|
+
], MJSearchScope_.prototype, "Name", void 0);
|
|
97968
|
+
__decorate([
|
|
97969
|
+
Field({ nullable: true, description: `Detailed description of what this scope covers. Surfaced to agents in the available-scopes prompt injection so the LLM can choose a scope.` }),
|
|
97970
|
+
__metadata("design:type", String)
|
|
97971
|
+
], MJSearchScope_.prototype, "Description", void 0);
|
|
97972
|
+
__decorate([
|
|
97973
|
+
Field({ nullable: true, description: `Font Awesome (or equivalent) icon class used by the scope selector UI.` }),
|
|
97974
|
+
MaxLength(200),
|
|
97975
|
+
__metadata("design:type", String)
|
|
97976
|
+
], MJSearchScope_.prototype, "Icon", void 0);
|
|
97977
|
+
__decorate([
|
|
97978
|
+
Field(() => Boolean, { description: `If true, this scope includes everything (equivalent to no scope filtering). Exactly one Global scope should exist; it is seeded via metadata sync.` }),
|
|
97979
|
+
__metadata("design:type", Boolean)
|
|
97980
|
+
], MJSearchScope_.prototype, "IsGlobal", void 0);
|
|
97981
|
+
__decorate([
|
|
97982
|
+
Field(() => Boolean, { description: `If true, this is the default scope for users/agents that do not specify one.` }),
|
|
97983
|
+
__metadata("design:type", Boolean)
|
|
97984
|
+
], MJSearchScope_.prototype, "IsDefault", void 0);
|
|
97985
|
+
__decorate([
|
|
97986
|
+
Field({ nullable: true, description: `NULL = organization-wide scope. Set = personal scope owned by this user (visible/usable only by that user unless explicitly shared).` }),
|
|
97987
|
+
MaxLength(36),
|
|
97988
|
+
__metadata("design:type", String)
|
|
97989
|
+
], MJSearchScope_.prototype, "OwnerUserID", void 0);
|
|
97990
|
+
__decorate([
|
|
97991
|
+
Field({ description: `Lifecycle status. Only Active scopes are considered at query time.` }),
|
|
97992
|
+
MaxLength(20),
|
|
97993
|
+
__metadata("design:type", String)
|
|
97994
|
+
], MJSearchScope_.prototype, "Status", void 0);
|
|
97995
|
+
__decorate([
|
|
97996
|
+
Field({ nullable: true, description: `Optional time-window activation. Scope is inactive before StartAt. NULL = immediately active.` }),
|
|
97997
|
+
__metadata("design:type", Date)
|
|
97998
|
+
], MJSearchScope_.prototype, "StartAt", void 0);
|
|
97999
|
+
__decorate([
|
|
98000
|
+
Field({ nullable: true, description: `Optional time-window deactivation. Scope is inactive after EndAt. NULL = no expiry.` }),
|
|
98001
|
+
__metadata("design:type", Date)
|
|
98002
|
+
], MJSearchScope_.prototype, "EndAt", void 0);
|
|
98003
|
+
__decorate([
|
|
98004
|
+
Field({ nullable: true, description: `JSON configuration for advanced scope behavior. Recognized keys: rrfK (RRF k parameter), fusionWeights (per-provider weights), reRanker (optional re-ranker stage config: driverClass, inputTopN, outputTopN, config), permissionOverfetchFactor.` }),
|
|
98005
|
+
__metadata("design:type", String)
|
|
98006
|
+
], MJSearchScope_.prototype, "ScopeConfig", void 0);
|
|
98007
|
+
__decorate([
|
|
98008
|
+
Field({ nullable: true, description: `JSON defining available multi-tenant SearchContext dimensions, inheritance modes, and validation rules. Uses the SecondaryScopeConfig structure shared with the agent memory system (@memberjunction/ai-core-plus). NULL = scope is not multi-tenant aware.` }),
|
|
98009
|
+
__metadata("design:type", String)
|
|
98010
|
+
], MJSearchScope_.prototype, "SearchContextConfig", void 0);
|
|
98011
|
+
__decorate([
|
|
98012
|
+
Field(() => Int, { nullable: true, description: `Optional cap on reranker spend (in cents) per search invocation against this scope. NULL means uncapped — existing behavior. When set, the SearchEngine's budget guard short-circuits any reranker call whose projected cost would push the run total past this value, and accumulates actual post-call cost via each reranker's CostReporter callback (BaseReRanker.CostReporter). Real-provider rerankers (Cohere, Voyage, OpenAI) report cost; NoopReRanker and BGEReRanker report zero (local / pass-through).` }),
|
|
98013
|
+
__metadata("design:type", Number)
|
|
98014
|
+
], MJSearchScope_.prototype, "RerankerBudgetCents", void 0);
|
|
98015
|
+
__decorate([
|
|
98016
|
+
Field(),
|
|
98017
|
+
__metadata("design:type", Date)
|
|
98018
|
+
], MJSearchScope_.prototype, "_mj__CreatedAt", void 0);
|
|
98019
|
+
__decorate([
|
|
98020
|
+
Field(),
|
|
98021
|
+
__metadata("design:type", Date)
|
|
98022
|
+
], MJSearchScope_.prototype, "_mj__UpdatedAt", void 0);
|
|
95243
98023
|
__decorate([
|
|
95244
98024
|
Field({ nullable: true }),
|
|
98025
|
+
MaxLength(100),
|
|
95245
98026
|
__metadata("design:type", String)
|
|
95246
|
-
],
|
|
98027
|
+
], MJSearchScope_.prototype, "OwnerUser", void 0);
|
|
98028
|
+
__decorate([
|
|
98029
|
+
Field(() => [MJSearchScopeExternalIndex_]),
|
|
98030
|
+
__metadata("design:type", Array)
|
|
98031
|
+
], MJSearchScope_.prototype, "MJSearchScopeExternalIndexes_SearchScopeIDArray", void 0);
|
|
98032
|
+
__decorate([
|
|
98033
|
+
Field(() => [MJSearchScopeEntity_]),
|
|
98034
|
+
__metadata("design:type", Array)
|
|
98035
|
+
], MJSearchScope_.prototype, "MJSearchScopeEntities_SearchScopeIDArray", void 0);
|
|
98036
|
+
__decorate([
|
|
98037
|
+
Field(() => [MJSearchScopePermission_]),
|
|
98038
|
+
__metadata("design:type", Array)
|
|
98039
|
+
], MJSearchScope_.prototype, "MJSearchScopePermissions_SearchScopeIDArray", void 0);
|
|
98040
|
+
__decorate([
|
|
98041
|
+
Field(() => [MJSearchScopeTestQuery_]),
|
|
98042
|
+
__metadata("design:type", Array)
|
|
98043
|
+
], MJSearchScope_.prototype, "MJSearchScopeTestQueries_SearchScopeIDArray", void 0);
|
|
98044
|
+
__decorate([
|
|
98045
|
+
Field(() => [MJSearchScopeProvider_]),
|
|
98046
|
+
__metadata("design:type", Array)
|
|
98047
|
+
], MJSearchScope_.prototype, "MJSearchScopeProviders_SearchScopeIDArray", void 0);
|
|
98048
|
+
__decorate([
|
|
98049
|
+
Field(() => [MJSearchScopeStorageAccount_]),
|
|
98050
|
+
__metadata("design:type", Array)
|
|
98051
|
+
], MJSearchScope_.prototype, "MJSearchScopeStorageAccounts_SearchScopeIDArray", void 0);
|
|
98052
|
+
__decorate([
|
|
98053
|
+
Field(() => [MJAIAgentSearchScope_]),
|
|
98054
|
+
__metadata("design:type", Array)
|
|
98055
|
+
], MJSearchScope_.prototype, "MJAIAgentSearchScopes_SearchScopeIDArray", void 0);
|
|
98056
|
+
__decorate([
|
|
98057
|
+
Field(() => [MJSearchExecutionLog_]),
|
|
98058
|
+
__metadata("design:type", Array)
|
|
98059
|
+
], MJSearchScope_.prototype, "MJSearchExecutionLogs_SearchScopeIDArray", void 0);
|
|
98060
|
+
MJSearchScope_ = __decorate([
|
|
98061
|
+
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.` })
|
|
98062
|
+
], MJSearchScope_);
|
|
98063
|
+
export { MJSearchScope_ };
|
|
98064
|
+
//****************************************************************************
|
|
98065
|
+
// INPUT TYPE for MJ: Search Scopes
|
|
98066
|
+
//****************************************************************************
|
|
98067
|
+
let CreateMJSearchScopeInput = class CreateMJSearchScopeInput {
|
|
98068
|
+
};
|
|
95247
98069
|
__decorate([
|
|
95248
98070
|
Field({ nullable: true }),
|
|
95249
98071
|
__metadata("design:type", String)
|
|
95250
|
-
],
|
|
98072
|
+
], CreateMJSearchScopeInput.prototype, "ID", void 0);
|
|
95251
98073
|
__decorate([
|
|
95252
98074
|
Field({ nullable: true }),
|
|
95253
98075
|
__metadata("design:type", String)
|
|
95254
|
-
],
|
|
98076
|
+
], CreateMJSearchScopeInput.prototype, "Name", void 0);
|
|
95255
98077
|
__decorate([
|
|
95256
98078
|
Field({ nullable: true }),
|
|
95257
98079
|
__metadata("design:type", String)
|
|
95258
|
-
],
|
|
98080
|
+
], CreateMJSearchScopeInput.prototype, "Description", void 0);
|
|
95259
98081
|
__decorate([
|
|
95260
|
-
Field(
|
|
95261
|
-
__metadata("design:type",
|
|
95262
|
-
],
|
|
98082
|
+
Field({ nullable: true }),
|
|
98083
|
+
__metadata("design:type", String)
|
|
98084
|
+
], CreateMJSearchScopeInput.prototype, "Icon", void 0);
|
|
95263
98085
|
__decorate([
|
|
95264
98086
|
Field(() => Boolean, { nullable: true }),
|
|
95265
98087
|
__metadata("design:type", Boolean)
|
|
95266
|
-
],
|
|
98088
|
+
], CreateMJSearchScopeInput.prototype, "IsGlobal", void 0);
|
|
98089
|
+
__decorate([
|
|
98090
|
+
Field(() => Boolean, { nullable: true }),
|
|
98091
|
+
__metadata("design:type", Boolean)
|
|
98092
|
+
], CreateMJSearchScopeInput.prototype, "IsDefault", void 0);
|
|
98093
|
+
__decorate([
|
|
98094
|
+
Field({ nullable: true }),
|
|
98095
|
+
__metadata("design:type", String)
|
|
98096
|
+
], CreateMJSearchScopeInput.prototype, "OwnerUserID", void 0);
|
|
98097
|
+
__decorate([
|
|
98098
|
+
Field({ nullable: true }),
|
|
98099
|
+
__metadata("design:type", String)
|
|
98100
|
+
], CreateMJSearchScopeInput.prototype, "Status", void 0);
|
|
98101
|
+
__decorate([
|
|
98102
|
+
Field({ nullable: true }),
|
|
98103
|
+
__metadata("design:type", Date)
|
|
98104
|
+
], CreateMJSearchScopeInput.prototype, "StartAt", void 0);
|
|
98105
|
+
__decorate([
|
|
98106
|
+
Field({ nullable: true }),
|
|
98107
|
+
__metadata("design:type", Date)
|
|
98108
|
+
], CreateMJSearchScopeInput.prototype, "EndAt", void 0);
|
|
98109
|
+
__decorate([
|
|
98110
|
+
Field({ nullable: true }),
|
|
98111
|
+
__metadata("design:type", String)
|
|
98112
|
+
], CreateMJSearchScopeInput.prototype, "ScopeConfig", void 0);
|
|
98113
|
+
__decorate([
|
|
98114
|
+
Field({ nullable: true }),
|
|
98115
|
+
__metadata("design:type", String)
|
|
98116
|
+
], CreateMJSearchScopeInput.prototype, "SearchContextConfig", void 0);
|
|
95267
98117
|
__decorate([
|
|
95268
98118
|
Field(() => Int, { nullable: true }),
|
|
95269
98119
|
__metadata("design:type", Number)
|
|
95270
|
-
],
|
|
98120
|
+
], CreateMJSearchScopeInput.prototype, "RerankerBudgetCents", void 0);
|
|
98121
|
+
__decorate([
|
|
98122
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
98123
|
+
__metadata("design:type", RestoreContextInput)
|
|
98124
|
+
], CreateMJSearchScopeInput.prototype, "RestoreContext___", void 0);
|
|
98125
|
+
CreateMJSearchScopeInput = __decorate([
|
|
98126
|
+
InputType()
|
|
98127
|
+
], CreateMJSearchScopeInput);
|
|
98128
|
+
export { CreateMJSearchScopeInput };
|
|
98129
|
+
//****************************************************************************
|
|
98130
|
+
// INPUT TYPE for MJ: Search Scopes
|
|
98131
|
+
//****************************************************************************
|
|
98132
|
+
let UpdateMJSearchScopeInput = class UpdateMJSearchScopeInput {
|
|
98133
|
+
};
|
|
98134
|
+
__decorate([
|
|
98135
|
+
Field(),
|
|
98136
|
+
__metadata("design:type", String)
|
|
98137
|
+
], UpdateMJSearchScopeInput.prototype, "ID", void 0);
|
|
95271
98138
|
__decorate([
|
|
95272
98139
|
Field({ nullable: true }),
|
|
95273
98140
|
__metadata("design:type", String)
|
|
95274
|
-
],
|
|
98141
|
+
], UpdateMJSearchScopeInput.prototype, "Name", void 0);
|
|
95275
98142
|
__decorate([
|
|
95276
98143
|
Field({ nullable: true }),
|
|
95277
98144
|
__metadata("design:type", String)
|
|
95278
|
-
],
|
|
98145
|
+
], UpdateMJSearchScopeInput.prototype, "Description", void 0);
|
|
95279
98146
|
__decorate([
|
|
95280
98147
|
Field({ nullable: true }),
|
|
95281
98148
|
__metadata("design:type", String)
|
|
95282
|
-
],
|
|
98149
|
+
], UpdateMJSearchScopeInput.prototype, "Icon", void 0);
|
|
98150
|
+
__decorate([
|
|
98151
|
+
Field(() => Boolean, { nullable: true }),
|
|
98152
|
+
__metadata("design:type", Boolean)
|
|
98153
|
+
], UpdateMJSearchScopeInput.prototype, "IsGlobal", void 0);
|
|
98154
|
+
__decorate([
|
|
98155
|
+
Field(() => Boolean, { nullable: true }),
|
|
98156
|
+
__metadata("design:type", Boolean)
|
|
98157
|
+
], UpdateMJSearchScopeInput.prototype, "IsDefault", void 0);
|
|
95283
98158
|
__decorate([
|
|
95284
98159
|
Field({ nullable: true }),
|
|
95285
98160
|
__metadata("design:type", String)
|
|
95286
|
-
],
|
|
98161
|
+
], UpdateMJSearchScopeInput.prototype, "OwnerUserID", void 0);
|
|
95287
98162
|
__decorate([
|
|
95288
98163
|
Field({ nullable: true }),
|
|
95289
98164
|
__metadata("design:type", String)
|
|
95290
|
-
],
|
|
98165
|
+
], UpdateMJSearchScopeInput.prototype, "Status", void 0);
|
|
98166
|
+
__decorate([
|
|
98167
|
+
Field({ nullable: true }),
|
|
98168
|
+
__metadata("design:type", Date)
|
|
98169
|
+
], UpdateMJSearchScopeInput.prototype, "StartAt", void 0);
|
|
98170
|
+
__decorate([
|
|
98171
|
+
Field({ nullable: true }),
|
|
98172
|
+
__metadata("design:type", Date)
|
|
98173
|
+
], UpdateMJSearchScopeInput.prototype, "EndAt", void 0);
|
|
98174
|
+
__decorate([
|
|
98175
|
+
Field({ nullable: true }),
|
|
98176
|
+
__metadata("design:type", String)
|
|
98177
|
+
], UpdateMJSearchScopeInput.prototype, "ScopeConfig", void 0);
|
|
98178
|
+
__decorate([
|
|
98179
|
+
Field({ nullable: true }),
|
|
98180
|
+
__metadata("design:type", String)
|
|
98181
|
+
], UpdateMJSearchScopeInput.prototype, "SearchContextConfig", void 0);
|
|
98182
|
+
__decorate([
|
|
98183
|
+
Field(() => Int, { nullable: true }),
|
|
98184
|
+
__metadata("design:type", Number)
|
|
98185
|
+
], UpdateMJSearchScopeInput.prototype, "RerankerBudgetCents", void 0);
|
|
95291
98186
|
__decorate([
|
|
95292
98187
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
95293
98188
|
__metadata("design:type", Array)
|
|
95294
|
-
],
|
|
98189
|
+
], UpdateMJSearchScopeInput.prototype, "OldValues___", void 0);
|
|
95295
98190
|
__decorate([
|
|
95296
98191
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
95297
98192
|
__metadata("design:type", RestoreContextInput)
|
|
95298
|
-
],
|
|
95299
|
-
|
|
98193
|
+
], UpdateMJSearchScopeInput.prototype, "RestoreContext___", void 0);
|
|
98194
|
+
UpdateMJSearchScopeInput = __decorate([
|
|
95300
98195
|
InputType()
|
|
95301
|
-
],
|
|
95302
|
-
export {
|
|
98196
|
+
], UpdateMJSearchScopeInput);
|
|
98197
|
+
export { UpdateMJSearchScopeInput };
|
|
95303
98198
|
//****************************************************************************
|
|
95304
|
-
// RESOLVER for MJ: Search
|
|
98199
|
+
// RESOLVER for MJ: Search Scopes
|
|
95305
98200
|
//****************************************************************************
|
|
95306
|
-
let
|
|
98201
|
+
let RunMJSearchScopeViewResult = class RunMJSearchScopeViewResult {
|
|
95307
98202
|
};
|
|
95308
98203
|
__decorate([
|
|
95309
|
-
Field(() => [
|
|
98204
|
+
Field(() => [MJSearchScope_]),
|
|
95310
98205
|
__metadata("design:type", Array)
|
|
95311
|
-
],
|
|
98206
|
+
], RunMJSearchScopeViewResult.prototype, "Results", void 0);
|
|
95312
98207
|
__decorate([
|
|
95313
98208
|
Field(() => String, { nullable: true }),
|
|
95314
98209
|
__metadata("design:type", String)
|
|
95315
|
-
],
|
|
98210
|
+
], RunMJSearchScopeViewResult.prototype, "UserViewRunID", void 0);
|
|
95316
98211
|
__decorate([
|
|
95317
98212
|
Field(() => Int, { nullable: true }),
|
|
95318
98213
|
__metadata("design:type", Number)
|
|
95319
|
-
],
|
|
98214
|
+
], RunMJSearchScopeViewResult.prototype, "RowCount", void 0);
|
|
95320
98215
|
__decorate([
|
|
95321
98216
|
Field(() => Int, { nullable: true }),
|
|
95322
98217
|
__metadata("design:type", Number)
|
|
95323
|
-
],
|
|
98218
|
+
], RunMJSearchScopeViewResult.prototype, "TotalRowCount", void 0);
|
|
95324
98219
|
__decorate([
|
|
95325
98220
|
Field(() => Int, { nullable: true }),
|
|
95326
98221
|
__metadata("design:type", Number)
|
|
95327
|
-
],
|
|
98222
|
+
], RunMJSearchScopeViewResult.prototype, "ExecutionTime", void 0);
|
|
95328
98223
|
__decorate([
|
|
95329
98224
|
Field({ nullable: true }),
|
|
95330
98225
|
__metadata("design:type", String)
|
|
95331
|
-
],
|
|
98226
|
+
], RunMJSearchScopeViewResult.prototype, "ErrorMessage", void 0);
|
|
95332
98227
|
__decorate([
|
|
95333
98228
|
Field(() => Boolean, { nullable: false }),
|
|
95334
98229
|
__metadata("design:type", Boolean)
|
|
95335
|
-
],
|
|
95336
|
-
|
|
98230
|
+
], RunMJSearchScopeViewResult.prototype, "Success", void 0);
|
|
98231
|
+
RunMJSearchScopeViewResult = __decorate([
|
|
95337
98232
|
ObjectType()
|
|
95338
|
-
],
|
|
95339
|
-
export {
|
|
95340
|
-
let
|
|
95341
|
-
async
|
|
98233
|
+
], RunMJSearchScopeViewResult);
|
|
98234
|
+
export { RunMJSearchScopeViewResult };
|
|
98235
|
+
let MJSearchScopeResolver = class MJSearchScopeResolver extends ResolverBase {
|
|
98236
|
+
async RunMJSearchScopeViewByID(input, { providers, userPayload }, pubSub) {
|
|
95342
98237
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95343
98238
|
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
95344
98239
|
}
|
|
95345
|
-
async
|
|
98240
|
+
async RunMJSearchScopeViewByName(input, { providers, userPayload }, pubSub) {
|
|
95346
98241
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95347
98242
|
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
95348
98243
|
}
|
|
95349
|
-
async
|
|
98244
|
+
async RunMJSearchScopeDynamicView(input, { providers, userPayload }, pubSub) {
|
|
95350
98245
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95351
|
-
input.EntityName = 'MJ: Search
|
|
98246
|
+
input.EntityName = 'MJ: Search Scopes';
|
|
95352
98247
|
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
95353
98248
|
}
|
|
95354
|
-
async
|
|
95355
|
-
this.CheckUserReadPermissions('MJ: Search
|
|
98249
|
+
async MJSearchScope(ID, { userPayload, providers }, pubSub) {
|
|
98250
|
+
this.CheckUserReadPermissions('MJ: Search Scopes', userPayload);
|
|
95356
98251
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95357
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
98252
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopes')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
95358
98253
|
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
95359
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Search
|
|
98254
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Search Scopes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
95360
98255
|
return result;
|
|
95361
98256
|
}
|
|
95362
|
-
async
|
|
98257
|
+
async MJSearchScopeExternalIndexes_SearchScopeIDArray(mjsearchscope_, { userPayload, providers }, pubSub) {
|
|
98258
|
+
this.CheckUserReadPermissions('MJ: Search Scope External Indexes', userPayload);
|
|
98259
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98260
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeExternalIndexes')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}='${mjsearchscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope External Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
98261
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
98262
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope External Indexes', rows, this.GetUserFromPayload(userPayload));
|
|
98263
|
+
return result;
|
|
98264
|
+
}
|
|
98265
|
+
async MJSearchScopeEntities_SearchScopeIDArray(mjsearchscope_, { userPayload, providers }, pubSub) {
|
|
98266
|
+
this.CheckUserReadPermissions('MJ: Search Scope Entities', userPayload);
|
|
98267
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98268
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeEntities')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}='${mjsearchscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
98269
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
98270
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Entities', rows, this.GetUserFromPayload(userPayload));
|
|
98271
|
+
return result;
|
|
98272
|
+
}
|
|
98273
|
+
async MJSearchScopePermissions_SearchScopeIDArray(mjsearchscope_, { userPayload, providers }, pubSub) {
|
|
98274
|
+
this.CheckUserReadPermissions('MJ: Search Scope Permissions', userPayload);
|
|
98275
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98276
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopePermissions')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}='${mjsearchscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
98277
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
98278
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
98279
|
+
return result;
|
|
98280
|
+
}
|
|
98281
|
+
async MJSearchScopeTestQueries_SearchScopeIDArray(mjsearchscope_, { userPayload, providers }, pubSub) {
|
|
98282
|
+
this.CheckUserReadPermissions('MJ: Search Scope Test Queries', userPayload);
|
|
98283
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98284
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeTestQueries')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}='${mjsearchscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Test Queries', userPayload, EntityPermissionType.Read, 'AND');
|
|
98285
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
98286
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Test Queries', rows, this.GetUserFromPayload(userPayload));
|
|
98287
|
+
return result;
|
|
98288
|
+
}
|
|
98289
|
+
async MJSearchScopeProviders_SearchScopeIDArray(mjsearchscope_, { userPayload, providers }, pubSub) {
|
|
98290
|
+
this.CheckUserReadPermissions('MJ: Search Scope Providers', userPayload);
|
|
98291
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98292
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeProviders')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}='${mjsearchscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Providers', userPayload, EntityPermissionType.Read, 'AND');
|
|
98293
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
98294
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Providers', rows, this.GetUserFromPayload(userPayload));
|
|
98295
|
+
return result;
|
|
98296
|
+
}
|
|
98297
|
+
async MJSearchScopeStorageAccounts_SearchScopeIDArray(mjsearchscope_, { userPayload, providers }, pubSub) {
|
|
98298
|
+
this.CheckUserReadPermissions('MJ: Search Scope Storage Accounts', userPayload);
|
|
98299
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98300
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeStorageAccounts')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}='${mjsearchscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Storage Accounts', userPayload, EntityPermissionType.Read, 'AND');
|
|
98301
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
98302
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Storage Accounts', rows, this.GetUserFromPayload(userPayload));
|
|
98303
|
+
return result;
|
|
98304
|
+
}
|
|
98305
|
+
async MJAIAgentSearchScopes_SearchScopeIDArray(mjsearchscope_, { userPayload, providers }, pubSub) {
|
|
98306
|
+
this.CheckUserReadPermissions('MJ: AI Agent Search Scopes', userPayload);
|
|
98307
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98308
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentSearchScopes')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}='${mjsearchscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
98309
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
98310
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Search Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
98311
|
+
return result;
|
|
98312
|
+
}
|
|
98313
|
+
async MJSearchExecutionLogs_SearchScopeIDArray(mjsearchscope_, { userPayload, providers }, pubSub) {
|
|
98314
|
+
this.CheckUserReadPermissions('MJ: Search Execution Logs', userPayload);
|
|
98315
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98316
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchExecutionLogs')} WHERE ${provider.QuoteIdentifier('SearchScopeID')}='${mjsearchscope_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
98317
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
98318
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Execution Logs', rows, this.GetUserFromPayload(userPayload));
|
|
98319
|
+
return result;
|
|
98320
|
+
}
|
|
98321
|
+
async CreateMJSearchScope(input, { providers, userPayload }, pubSub) {
|
|
95363
98322
|
const provider = GetReadWriteProvider(providers);
|
|
95364
|
-
return this.CreateRecord('MJ: Search
|
|
98323
|
+
return this.CreateRecord('MJ: Search Scopes', input, provider, userPayload, pubSub);
|
|
95365
98324
|
}
|
|
95366
|
-
async
|
|
98325
|
+
async UpdateMJSearchScope(input, { providers, userPayload }, pubSub) {
|
|
95367
98326
|
const provider = GetReadWriteProvider(providers);
|
|
95368
|
-
return this.UpdateRecord('MJ: Search
|
|
98327
|
+
return this.UpdateRecord('MJ: Search Scopes', input, provider, userPayload, pubSub);
|
|
95369
98328
|
}
|
|
95370
|
-
async
|
|
98329
|
+
async DeleteMJSearchScope(ID, options, { providers, userPayload }, pubSub) {
|
|
95371
98330
|
const provider = GetReadWriteProvider(providers);
|
|
95372
98331
|
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
95373
|
-
return this.DeleteRecord('MJ: Search
|
|
98332
|
+
return this.DeleteRecord('MJ: Search Scopes', key, options, provider, userPayload, pubSub);
|
|
95374
98333
|
}
|
|
95375
98334
|
};
|
|
95376
98335
|
__decorate([
|
|
95377
|
-
Query(() =>
|
|
98336
|
+
Query(() => RunMJSearchScopeViewResult),
|
|
95378
98337
|
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
95379
98338
|
__param(1, Ctx()),
|
|
95380
98339
|
__param(2, PubSub()),
|
|
95381
98340
|
__metadata("design:type", Function),
|
|
95382
98341
|
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
95383
98342
|
__metadata("design:returntype", Promise)
|
|
95384
|
-
],
|
|
98343
|
+
], MJSearchScopeResolver.prototype, "RunMJSearchScopeViewByID", null);
|
|
95385
98344
|
__decorate([
|
|
95386
|
-
Query(() =>
|
|
98345
|
+
Query(() => RunMJSearchScopeViewResult),
|
|
95387
98346
|
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
95388
98347
|
__param(1, Ctx()),
|
|
95389
98348
|
__param(2, PubSub()),
|
|
95390
98349
|
__metadata("design:type", Function),
|
|
95391
98350
|
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
95392
98351
|
__metadata("design:returntype", Promise)
|
|
95393
|
-
],
|
|
98352
|
+
], MJSearchScopeResolver.prototype, "RunMJSearchScopeViewByName", null);
|
|
95394
98353
|
__decorate([
|
|
95395
|
-
Query(() =>
|
|
98354
|
+
Query(() => RunMJSearchScopeViewResult),
|
|
95396
98355
|
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
95397
98356
|
__param(1, Ctx()),
|
|
95398
98357
|
__param(2, PubSub()),
|
|
95399
98358
|
__metadata("design:type", Function),
|
|
95400
98359
|
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
95401
98360
|
__metadata("design:returntype", Promise)
|
|
95402
|
-
],
|
|
98361
|
+
], MJSearchScopeResolver.prototype, "RunMJSearchScopeDynamicView", null);
|
|
95403
98362
|
__decorate([
|
|
95404
|
-
Query(() =>
|
|
98363
|
+
Query(() => MJSearchScope_, { nullable: true }),
|
|
95405
98364
|
__param(0, Arg('ID', () => String)),
|
|
95406
98365
|
__param(1, Ctx()),
|
|
95407
98366
|
__param(2, PubSub()),
|
|
95408
98367
|
__metadata("design:type", Function),
|
|
95409
98368
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
95410
98369
|
__metadata("design:returntype", Promise)
|
|
95411
|
-
],
|
|
98370
|
+
], MJSearchScopeResolver.prototype, "MJSearchScope", null);
|
|
95412
98371
|
__decorate([
|
|
95413
|
-
|
|
95414
|
-
__param(0,
|
|
98372
|
+
FieldResolver(() => [MJSearchScopeExternalIndex_]),
|
|
98373
|
+
__param(0, Root()),
|
|
95415
98374
|
__param(1, Ctx()),
|
|
95416
98375
|
__param(2, PubSub()),
|
|
95417
98376
|
__metadata("design:type", Function),
|
|
95418
|
-
__metadata("design:paramtypes", [
|
|
98377
|
+
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
95419
98378
|
__metadata("design:returntype", Promise)
|
|
95420
|
-
],
|
|
98379
|
+
], MJSearchScopeResolver.prototype, "MJSearchScopeExternalIndexes_SearchScopeIDArray", null);
|
|
95421
98380
|
__decorate([
|
|
95422
|
-
|
|
95423
|
-
__param(0,
|
|
98381
|
+
FieldResolver(() => [MJSearchScopeEntity_]),
|
|
98382
|
+
__param(0, Root()),
|
|
95424
98383
|
__param(1, Ctx()),
|
|
95425
98384
|
__param(2, PubSub()),
|
|
95426
98385
|
__metadata("design:type", Function),
|
|
95427
|
-
__metadata("design:paramtypes", [
|
|
98386
|
+
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
95428
98387
|
__metadata("design:returntype", Promise)
|
|
95429
|
-
],
|
|
98388
|
+
], MJSearchScopeResolver.prototype, "MJSearchScopeEntities_SearchScopeIDArray", null);
|
|
95430
98389
|
__decorate([
|
|
95431
|
-
|
|
98390
|
+
FieldResolver(() => [MJSearchScopePermission_]),
|
|
98391
|
+
__param(0, Root()),
|
|
98392
|
+
__param(1, Ctx()),
|
|
98393
|
+
__param(2, PubSub()),
|
|
98394
|
+
__metadata("design:type", Function),
|
|
98395
|
+
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
98396
|
+
__metadata("design:returntype", Promise)
|
|
98397
|
+
], MJSearchScopeResolver.prototype, "MJSearchScopePermissions_SearchScopeIDArray", null);
|
|
98398
|
+
__decorate([
|
|
98399
|
+
FieldResolver(() => [MJSearchScopeTestQuery_]),
|
|
98400
|
+
__param(0, Root()),
|
|
98401
|
+
__param(1, Ctx()),
|
|
98402
|
+
__param(2, PubSub()),
|
|
98403
|
+
__metadata("design:type", Function),
|
|
98404
|
+
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
98405
|
+
__metadata("design:returntype", Promise)
|
|
98406
|
+
], MJSearchScopeResolver.prototype, "MJSearchScopeTestQueries_SearchScopeIDArray", null);
|
|
98407
|
+
__decorate([
|
|
98408
|
+
FieldResolver(() => [MJSearchScopeProvider_]),
|
|
98409
|
+
__param(0, Root()),
|
|
98410
|
+
__param(1, Ctx()),
|
|
98411
|
+
__param(2, PubSub()),
|
|
98412
|
+
__metadata("design:type", Function),
|
|
98413
|
+
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
98414
|
+
__metadata("design:returntype", Promise)
|
|
98415
|
+
], MJSearchScopeResolver.prototype, "MJSearchScopeProviders_SearchScopeIDArray", null);
|
|
98416
|
+
__decorate([
|
|
98417
|
+
FieldResolver(() => [MJSearchScopeStorageAccount_]),
|
|
98418
|
+
__param(0, Root()),
|
|
98419
|
+
__param(1, Ctx()),
|
|
98420
|
+
__param(2, PubSub()),
|
|
98421
|
+
__metadata("design:type", Function),
|
|
98422
|
+
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
98423
|
+
__metadata("design:returntype", Promise)
|
|
98424
|
+
], MJSearchScopeResolver.prototype, "MJSearchScopeStorageAccounts_SearchScopeIDArray", null);
|
|
98425
|
+
__decorate([
|
|
98426
|
+
FieldResolver(() => [MJAIAgentSearchScope_]),
|
|
98427
|
+
__param(0, Root()),
|
|
98428
|
+
__param(1, Ctx()),
|
|
98429
|
+
__param(2, PubSub()),
|
|
98430
|
+
__metadata("design:type", Function),
|
|
98431
|
+
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
98432
|
+
__metadata("design:returntype", Promise)
|
|
98433
|
+
], MJSearchScopeResolver.prototype, "MJAIAgentSearchScopes_SearchScopeIDArray", null);
|
|
98434
|
+
__decorate([
|
|
98435
|
+
FieldResolver(() => [MJSearchExecutionLog_]),
|
|
98436
|
+
__param(0, Root()),
|
|
98437
|
+
__param(1, Ctx()),
|
|
98438
|
+
__param(2, PubSub()),
|
|
98439
|
+
__metadata("design:type", Function),
|
|
98440
|
+
__metadata("design:paramtypes", [MJSearchScope_, Object, PubSubEngine]),
|
|
98441
|
+
__metadata("design:returntype", Promise)
|
|
98442
|
+
], MJSearchScopeResolver.prototype, "MJSearchExecutionLogs_SearchScopeIDArray", null);
|
|
98443
|
+
__decorate([
|
|
98444
|
+
Mutation(() => MJSearchScope_),
|
|
98445
|
+
__param(0, Arg('input', () => CreateMJSearchScopeInput)),
|
|
98446
|
+
__param(1, Ctx()),
|
|
98447
|
+
__param(2, PubSub()),
|
|
98448
|
+
__metadata("design:type", Function),
|
|
98449
|
+
__metadata("design:paramtypes", [CreateMJSearchScopeInput, Object, PubSubEngine]),
|
|
98450
|
+
__metadata("design:returntype", Promise)
|
|
98451
|
+
], MJSearchScopeResolver.prototype, "CreateMJSearchScope", null);
|
|
98452
|
+
__decorate([
|
|
98453
|
+
Mutation(() => MJSearchScope_),
|
|
98454
|
+
__param(0, Arg('input', () => UpdateMJSearchScopeInput)),
|
|
98455
|
+
__param(1, Ctx()),
|
|
98456
|
+
__param(2, PubSub()),
|
|
98457
|
+
__metadata("design:type", Function),
|
|
98458
|
+
__metadata("design:paramtypes", [UpdateMJSearchScopeInput, Object, PubSubEngine]),
|
|
98459
|
+
__metadata("design:returntype", Promise)
|
|
98460
|
+
], MJSearchScopeResolver.prototype, "UpdateMJSearchScope", null);
|
|
98461
|
+
__decorate([
|
|
98462
|
+
Mutation(() => MJSearchScope_),
|
|
95432
98463
|
__param(0, Arg('ID', () => String)),
|
|
95433
98464
|
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
95434
98465
|
__param(2, Ctx()),
|
|
@@ -95436,11 +98467,11 @@ __decorate([
|
|
|
95436
98467
|
__metadata("design:type", Function),
|
|
95437
98468
|
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
95438
98469
|
__metadata("design:returntype", Promise)
|
|
95439
|
-
],
|
|
95440
|
-
|
|
95441
|
-
Resolver(
|
|
95442
|
-
],
|
|
95443
|
-
export {
|
|
98470
|
+
], MJSearchScopeResolver.prototype, "DeleteMJSearchScope", null);
|
|
98471
|
+
MJSearchScopeResolver = __decorate([
|
|
98472
|
+
Resolver(MJSearchScope_)
|
|
98473
|
+
], MJSearchScopeResolver);
|
|
98474
|
+
export { MJSearchScopeResolver };
|
|
95444
98475
|
//****************************************************************************
|
|
95445
98476
|
// ENTITY CLASS for MJ: Skills
|
|
95446
98477
|
//****************************************************************************
|
|
@@ -98220,14 +101251,14 @@ __decorate([
|
|
|
98220
101251
|
Field(() => [MJTaggedItem_]),
|
|
98221
101252
|
__metadata("design:type", Array)
|
|
98222
101253
|
], MJTag_.prototype, "MJTaggedItems_TagIDArray", void 0);
|
|
98223
|
-
__decorate([
|
|
98224
|
-
Field(() => [MJTagCoOccurrence_]),
|
|
98225
|
-
__metadata("design:type", Array)
|
|
98226
|
-
], MJTag_.prototype, "MJTagCoOccurrences_TagBIDArray", void 0);
|
|
98227
101254
|
__decorate([
|
|
98228
101255
|
Field(() => [MJContentItemTag_]),
|
|
98229
101256
|
__metadata("design:type", Array)
|
|
98230
101257
|
], MJTag_.prototype, "MJContentItemTags_TagIDArray", void 0);
|
|
101258
|
+
__decorate([
|
|
101259
|
+
Field(() => [MJTagCoOccurrence_]),
|
|
101260
|
+
__metadata("design:type", Array)
|
|
101261
|
+
], MJTag_.prototype, "MJTagCoOccurrences_TagBIDArray", void 0);
|
|
98231
101262
|
__decorate([
|
|
98232
101263
|
Field(() => [MJTagSynonym_]),
|
|
98233
101264
|
__metadata("design:type", Array)
|
|
@@ -98501,14 +101532,6 @@ let MJTagResolver = class MJTagResolver extends ResolverBase {
|
|
|
98501
101532
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tagged Items', rows, this.GetUserFromPayload(userPayload));
|
|
98502
101533
|
return result;
|
|
98503
101534
|
}
|
|
98504
|
-
async MJTagCoOccurrences_TagBIDArray(mjtag_, { userPayload, providers }, pubSub) {
|
|
98505
|
-
this.CheckUserReadPermissions('MJ: Tag Co Occurrences', userPayload);
|
|
98506
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98507
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagCoOccurrences')} WHERE ${provider.QuoteIdentifier('TagBID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Co Occurrences', userPayload, EntityPermissionType.Read, 'AND');
|
|
98508
|
-
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
98509
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Co Occurrences', rows, this.GetUserFromPayload(userPayload));
|
|
98510
|
-
return result;
|
|
98511
|
-
}
|
|
98512
101535
|
async MJContentItemTags_TagIDArray(mjtag_, { userPayload, providers }, pubSub) {
|
|
98513
101536
|
this.CheckUserReadPermissions('MJ: Content Item Tags', userPayload);
|
|
98514
101537
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -98517,6 +101540,14 @@ let MJTagResolver = class MJTagResolver extends ResolverBase {
|
|
|
98517
101540
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Item Tags', rows, this.GetUserFromPayload(userPayload));
|
|
98518
101541
|
return result;
|
|
98519
101542
|
}
|
|
101543
|
+
async MJTagCoOccurrences_TagBIDArray(mjtag_, { userPayload, providers }, pubSub) {
|
|
101544
|
+
this.CheckUserReadPermissions('MJ: Tag Co Occurrences', userPayload);
|
|
101545
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
101546
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTagCoOccurrences')} WHERE ${provider.QuoteIdentifier('TagBID')}='${mjtag_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tag Co Occurrences', userPayload, EntityPermissionType.Read, 'AND');
|
|
101547
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
101548
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Co Occurrences', rows, this.GetUserFromPayload(userPayload));
|
|
101549
|
+
return result;
|
|
101550
|
+
}
|
|
98520
101551
|
async MJTagSynonyms_TagIDArray(mjtag_, { userPayload, providers }, pubSub) {
|
|
98521
101552
|
this.CheckUserReadPermissions('MJ: Tag Synonyms', userPayload);
|
|
98522
101553
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -98658,23 +101689,23 @@ __decorate([
|
|
|
98658
101689
|
__metadata("design:returntype", Promise)
|
|
98659
101690
|
], MJTagResolver.prototype, "MJTaggedItems_TagIDArray", null);
|
|
98660
101691
|
__decorate([
|
|
98661
|
-
FieldResolver(() => [
|
|
101692
|
+
FieldResolver(() => [MJContentItemTag_]),
|
|
98662
101693
|
__param(0, Root()),
|
|
98663
101694
|
__param(1, Ctx()),
|
|
98664
101695
|
__param(2, PubSub()),
|
|
98665
101696
|
__metadata("design:type", Function),
|
|
98666
101697
|
__metadata("design:paramtypes", [MJTag_, Object, PubSubEngine]),
|
|
98667
101698
|
__metadata("design:returntype", Promise)
|
|
98668
|
-
], MJTagResolver.prototype, "
|
|
101699
|
+
], MJTagResolver.prototype, "MJContentItemTags_TagIDArray", null);
|
|
98669
101700
|
__decorate([
|
|
98670
|
-
FieldResolver(() => [
|
|
101701
|
+
FieldResolver(() => [MJTagCoOccurrence_]),
|
|
98671
101702
|
__param(0, Root()),
|
|
98672
101703
|
__param(1, Ctx()),
|
|
98673
101704
|
__param(2, PubSub()),
|
|
98674
101705
|
__metadata("design:type", Function),
|
|
98675
101706
|
__metadata("design:paramtypes", [MJTag_, Object, PubSubEngine]),
|
|
98676
101707
|
__metadata("design:returntype", Promise)
|
|
98677
|
-
], MJTagResolver.prototype, "
|
|
101708
|
+
], MJTagResolver.prototype, "MJTagCoOccurrences_TagBIDArray", null);
|
|
98678
101709
|
__decorate([
|
|
98679
101710
|
FieldResolver(() => [MJTagSynonym_]),
|
|
98680
101711
|
__param(0, Root()),
|
|
@@ -101091,6 +104122,14 @@ __decorate([
|
|
|
101091
104122
|
Field(() => [MJUserNotificationType_]),
|
|
101092
104123
|
__metadata("design:type", Array)
|
|
101093
104124
|
], MJTemplate_.prototype, "MJUserNotificationTypes_SMSTemplateIDArray", void 0);
|
|
104125
|
+
__decorate([
|
|
104126
|
+
Field(() => [MJSearchScopeProvider_]),
|
|
104127
|
+
__metadata("design:type", Array)
|
|
104128
|
+
], MJTemplate_.prototype, "MJSearchScopeProviders_QueryTransformTemplateIDArray", void 0);
|
|
104129
|
+
__decorate([
|
|
104130
|
+
Field(() => [MJAIAgentSearchScope_]),
|
|
104131
|
+
__metadata("design:type", Array)
|
|
104132
|
+
], MJTemplate_.prototype, "MJAIAgentSearchScopes_QueryTemplateIDArray", void 0);
|
|
101094
104133
|
__decorate([
|
|
101095
104134
|
Field(() => [MJEntityDocument_]),
|
|
101096
104135
|
__metadata("design:type", Array)
|
|
@@ -101300,6 +104339,22 @@ let MJTemplateResolver = class MJTemplateResolver extends ResolverBase {
|
|
|
101300
104339
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Notification Types', rows, this.GetUserFromPayload(userPayload));
|
|
101301
104340
|
return result;
|
|
101302
104341
|
}
|
|
104342
|
+
async MJSearchScopeProviders_QueryTransformTemplateIDArray(mjtemplate_, { userPayload, providers }, pubSub) {
|
|
104343
|
+
this.CheckUserReadPermissions('MJ: Search Scope Providers', userPayload);
|
|
104344
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
104345
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeProviders')} WHERE ${provider.QuoteIdentifier('QueryTransformTemplateID')}='${mjtemplate_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Providers', userPayload, EntityPermissionType.Read, 'AND');
|
|
104346
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
104347
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Providers', rows, this.GetUserFromPayload(userPayload));
|
|
104348
|
+
return result;
|
|
104349
|
+
}
|
|
104350
|
+
async MJAIAgentSearchScopes_QueryTemplateIDArray(mjtemplate_, { userPayload, providers }, pubSub) {
|
|
104351
|
+
this.CheckUserReadPermissions('MJ: AI Agent Search Scopes', userPayload);
|
|
104352
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
104353
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentSearchScopes')} WHERE ${provider.QuoteIdentifier('QueryTemplateID')}='${mjtemplate_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
104354
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
104355
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Search Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
104356
|
+
return result;
|
|
104357
|
+
}
|
|
101303
104358
|
async MJEntityDocuments_TemplateIDArray(mjtemplate_, { userPayload, providers }, pubSub) {
|
|
101304
104359
|
this.CheckUserReadPermissions('MJ: Entity Documents', userPayload);
|
|
101305
104360
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -101403,6 +104458,24 @@ __decorate([
|
|
|
101403
104458
|
__metadata("design:paramtypes", [MJTemplate_, Object, PubSubEngine]),
|
|
101404
104459
|
__metadata("design:returntype", Promise)
|
|
101405
104460
|
], MJTemplateResolver.prototype, "MJUserNotificationTypes_SMSTemplateIDArray", null);
|
|
104461
|
+
__decorate([
|
|
104462
|
+
FieldResolver(() => [MJSearchScopeProvider_]),
|
|
104463
|
+
__param(0, Root()),
|
|
104464
|
+
__param(1, Ctx()),
|
|
104465
|
+
__param(2, PubSub()),
|
|
104466
|
+
__metadata("design:type", Function),
|
|
104467
|
+
__metadata("design:paramtypes", [MJTemplate_, Object, PubSubEngine]),
|
|
104468
|
+
__metadata("design:returntype", Promise)
|
|
104469
|
+
], MJTemplateResolver.prototype, "MJSearchScopeProviders_QueryTransformTemplateIDArray", null);
|
|
104470
|
+
__decorate([
|
|
104471
|
+
FieldResolver(() => [MJAIAgentSearchScope_]),
|
|
104472
|
+
__param(0, Root()),
|
|
104473
|
+
__param(1, Ctx()),
|
|
104474
|
+
__param(2, PubSub()),
|
|
104475
|
+
__metadata("design:type", Function),
|
|
104476
|
+
__metadata("design:paramtypes", [MJTemplate_, Object, PubSubEngine]),
|
|
104477
|
+
__metadata("design:returntype", Promise)
|
|
104478
|
+
], MJTemplateResolver.prototype, "MJAIAgentSearchScopes_QueryTemplateIDArray", null);
|
|
101406
104479
|
__decorate([
|
|
101407
104480
|
FieldResolver(() => [MJEntityDocument_]),
|
|
101408
104481
|
__param(0, Root()),
|
|
@@ -109668,6 +112741,10 @@ __decorate([
|
|
|
109668
112741
|
Field(() => [MJTagSuggestion_]),
|
|
109669
112742
|
__metadata("design:type", Array)
|
|
109670
112743
|
], MJUser_.prototype, "MJTagSuggestions_ReviewedByUserIDArray", void 0);
|
|
112744
|
+
__decorate([
|
|
112745
|
+
Field(() => [MJSearchScope_]),
|
|
112746
|
+
__metadata("design:type", Array)
|
|
112747
|
+
], MJUser_.prototype, "MJSearchScopes_OwnerUserIDArray", void 0);
|
|
109671
112748
|
__decorate([
|
|
109672
112749
|
Field(() => [MJResourcePermission_]),
|
|
109673
112750
|
__metadata("design:type", Array)
|
|
@@ -109756,6 +112833,14 @@ __decorate([
|
|
|
109756
112833
|
Field(() => [MJRecordMergeLog_]),
|
|
109757
112834
|
__metadata("design:type", Array)
|
|
109758
112835
|
], MJUser_.prototype, "MJRecordMergeLogs_InitiatedByUserIDArray", void 0);
|
|
112836
|
+
__decorate([
|
|
112837
|
+
Field(() => [MJSearchScopePermission_]),
|
|
112838
|
+
__metadata("design:type", Array)
|
|
112839
|
+
], MJUser_.prototype, "MJSearchScopePermissions_UserIDArray", void 0);
|
|
112840
|
+
__decorate([
|
|
112841
|
+
Field(() => [MJSearchExecutionLog_]),
|
|
112842
|
+
__metadata("design:type", Array)
|
|
112843
|
+
], MJUser_.prototype, "MJSearchExecutionLogs_UserIDArray", void 0);
|
|
109759
112844
|
__decorate([
|
|
109760
112845
|
Field(() => [MJTask_]),
|
|
109761
112846
|
__metadata("design:type", Array)
|
|
@@ -110525,6 +113610,14 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
110525
113610
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tag Suggestions', rows, this.GetUserFromPayload(userPayload));
|
|
110526
113611
|
return result;
|
|
110527
113612
|
}
|
|
113613
|
+
async MJSearchScopes_OwnerUserIDArray(mjuser_, { userPayload, providers }, pubSub) {
|
|
113614
|
+
this.CheckUserReadPermissions('MJ: Search Scopes', userPayload);
|
|
113615
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
113616
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopes')} WHERE ${provider.QuoteIdentifier('OwnerUserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scopes', userPayload, EntityPermissionType.Read, 'AND');
|
|
113617
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
113618
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scopes', rows, this.GetUserFromPayload(userPayload));
|
|
113619
|
+
return result;
|
|
113620
|
+
}
|
|
110528
113621
|
async MJResourcePermissions_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
|
|
110529
113622
|
this.CheckUserReadPermissions('MJ: Resource Permissions', userPayload);
|
|
110530
113623
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -110701,6 +113794,22 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
110701
113794
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Merge Logs', rows, this.GetUserFromPayload(userPayload));
|
|
110702
113795
|
return result;
|
|
110703
113796
|
}
|
|
113797
|
+
async MJSearchScopePermissions_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
|
|
113798
|
+
this.CheckUserReadPermissions('MJ: Search Scope Permissions', userPayload);
|
|
113799
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
113800
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopePermissions')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
113801
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
113802
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
113803
|
+
return result;
|
|
113804
|
+
}
|
|
113805
|
+
async MJSearchExecutionLogs_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
|
|
113806
|
+
this.CheckUserReadPermissions('MJ: Search Execution Logs', userPayload);
|
|
113807
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
113808
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchExecutionLogs')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
113809
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
113810
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Execution Logs', rows, this.GetUserFromPayload(userPayload));
|
|
113811
|
+
return result;
|
|
113812
|
+
}
|
|
110704
113813
|
async MJTasks_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
|
|
110705
113814
|
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
110706
113815
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -111395,6 +114504,15 @@ __decorate([
|
|
|
111395
114504
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
111396
114505
|
__metadata("design:returntype", Promise)
|
|
111397
114506
|
], MJUserResolverBase.prototype, "MJTagSuggestions_ReviewedByUserIDArray", null);
|
|
114507
|
+
__decorate([
|
|
114508
|
+
FieldResolver(() => [MJSearchScope_]),
|
|
114509
|
+
__param(0, Root()),
|
|
114510
|
+
__param(1, Ctx()),
|
|
114511
|
+
__param(2, PubSub()),
|
|
114512
|
+
__metadata("design:type", Function),
|
|
114513
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
114514
|
+
__metadata("design:returntype", Promise)
|
|
114515
|
+
], MJUserResolverBase.prototype, "MJSearchScopes_OwnerUserIDArray", null);
|
|
111398
114516
|
__decorate([
|
|
111399
114517
|
FieldResolver(() => [MJResourcePermission_]),
|
|
111400
114518
|
__param(0, Root()),
|
|
@@ -111593,6 +114711,24 @@ __decorate([
|
|
|
111593
114711
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
111594
114712
|
__metadata("design:returntype", Promise)
|
|
111595
114713
|
], MJUserResolverBase.prototype, "MJRecordMergeLogs_InitiatedByUserIDArray", null);
|
|
114714
|
+
__decorate([
|
|
114715
|
+
FieldResolver(() => [MJSearchScopePermission_]),
|
|
114716
|
+
__param(0, Root()),
|
|
114717
|
+
__param(1, Ctx()),
|
|
114718
|
+
__param(2, PubSub()),
|
|
114719
|
+
__metadata("design:type", Function),
|
|
114720
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
114721
|
+
__metadata("design:returntype", Promise)
|
|
114722
|
+
], MJUserResolverBase.prototype, "MJSearchScopePermissions_UserIDArray", null);
|
|
114723
|
+
__decorate([
|
|
114724
|
+
FieldResolver(() => [MJSearchExecutionLog_]),
|
|
114725
|
+
__param(0, Root()),
|
|
114726
|
+
__param(1, Ctx()),
|
|
114727
|
+
__param(2, PubSub()),
|
|
114728
|
+
__metadata("design:type", Function),
|
|
114729
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
114730
|
+
__metadata("design:returntype", Promise)
|
|
114731
|
+
], MJUserResolverBase.prototype, "MJSearchExecutionLogs_UserIDArray", null);
|
|
111596
114732
|
__decorate([
|
|
111597
114733
|
FieldResolver(() => [MJTask_]),
|
|
111598
114734
|
__param(0, Root()),
|
|
@@ -112045,6 +115181,10 @@ __decorate([
|
|
|
112045
115181
|
Field(() => [MJEntityRecordDocument_]),
|
|
112046
115182
|
__metadata("design:type", Array)
|
|
112047
115183
|
], MJVectorIndex_.prototype, "MJEntityRecordDocuments_VectorIndexIDArray", void 0);
|
|
115184
|
+
__decorate([
|
|
115185
|
+
Field(() => [MJSearchScopeExternalIndex_]),
|
|
115186
|
+
__metadata("design:type", Array)
|
|
115187
|
+
], MJVectorIndex_.prototype, "MJSearchScopeExternalIndexes_VectorIndexIDArray", void 0);
|
|
112048
115188
|
__decorate([
|
|
112049
115189
|
Field(() => [MJEntityDocument_]),
|
|
112050
115190
|
__metadata("design:type", Array)
|
|
@@ -112230,6 +115370,14 @@ let MJVectorIndexResolver = class MJVectorIndexResolver extends ResolverBase {
|
|
|
112230
115370
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Record Documents', rows, this.GetUserFromPayload(userPayload));
|
|
112231
115371
|
return result;
|
|
112232
115372
|
}
|
|
115373
|
+
async MJSearchScopeExternalIndexes_VectorIndexIDArray(mjvectorindex_, { userPayload, providers }, pubSub) {
|
|
115374
|
+
this.CheckUserReadPermissions('MJ: Search Scope External Indexes', userPayload);
|
|
115375
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
115376
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwSearchScopeExternalIndexes')} WHERE ${provider.QuoteIdentifier('VectorIndexID')}='${mjvectorindex_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Search Scope External Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
115377
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
115378
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope External Indexes', rows, this.GetUserFromPayload(userPayload));
|
|
115379
|
+
return result;
|
|
115380
|
+
}
|
|
112233
115381
|
async MJEntityDocuments_VectorIndexIDArray(mjvectorindex_, { userPayload, providers }, pubSub) {
|
|
112234
115382
|
this.CheckUserReadPermissions('MJ: Entity Documents', userPayload);
|
|
112235
115383
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -112313,6 +115461,15 @@ __decorate([
|
|
|
112313
115461
|
__metadata("design:paramtypes", [MJVectorIndex_, Object, PubSubEngine]),
|
|
112314
115462
|
__metadata("design:returntype", Promise)
|
|
112315
115463
|
], MJVectorIndexResolver.prototype, "MJEntityRecordDocuments_VectorIndexIDArray", null);
|
|
115464
|
+
__decorate([
|
|
115465
|
+
FieldResolver(() => [MJSearchScopeExternalIndex_]),
|
|
115466
|
+
__param(0, Root()),
|
|
115467
|
+
__param(1, Ctx()),
|
|
115468
|
+
__param(2, PubSub()),
|
|
115469
|
+
__metadata("design:type", Function),
|
|
115470
|
+
__metadata("design:paramtypes", [MJVectorIndex_, Object, PubSubEngine]),
|
|
115471
|
+
__metadata("design:returntype", Promise)
|
|
115472
|
+
], MJVectorIndexResolver.prototype, "MJSearchScopeExternalIndexes_VectorIndexIDArray", null);
|
|
112316
115473
|
__decorate([
|
|
112317
115474
|
FieldResolver(() => [MJEntityDocument_]),
|
|
112318
115475
|
__param(0, Root()),
|