@memberjunction/server 5.36.0 → 5.38.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 +12 -12
- package/dist/agents/skip-agent.d.ts.map +1 -1
- package/dist/agents/skip-agent.js +14 -2
- package/dist/agents/skip-agent.js.map +1 -1
- package/dist/agents/skip-sdk.d.ts +10 -0
- package/dist/agents/skip-sdk.d.ts.map +1 -1
- package/dist/agents/skip-sdk.js +155 -13
- package/dist/agents/skip-sdk.js.map +1 -1
- package/dist/generated/generated.d.ts +97 -5
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +553 -13
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -14
- package/dist/index.js.map +1 -1
- package/dist/resolvers/AdhocQueryResolver.d.ts.map +1 -1
- package/dist/resolvers/AdhocQueryResolver.js +42 -28
- package/dist/resolvers/AdhocQueryResolver.js.map +1 -1
- package/dist/resolvers/QueryResolver.d.ts.map +1 -1
- package/dist/resolvers/QueryResolver.js +5 -4
- package/dist/resolvers/QueryResolver.js.map +1 -1
- package/dist/resolvers/QuerySystemUserResolver.d.ts.map +1 -1
- package/dist/resolvers/QuerySystemUserResolver.js +6 -18
- package/dist/resolvers/QuerySystemUserResolver.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +6 -59
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/package.json +70 -70
- package/src/__tests__/AdhocQueryResolver.bugs.test.ts +269 -0
- package/src/__tests__/resolverBase.rls.test.ts +224 -0
- package/src/agents/skip-agent.ts +15 -2
- package/src/agents/skip-sdk.ts +163 -13
- package/src/generated/generated.ts +388 -14
- package/src/index.ts +62 -17
- package/src/resolvers/AdhocQueryResolver.ts +42 -28
- package/src/resolvers/QueryResolver.ts +7 -6
- package/src/resolvers/QuerySystemUserResolver.ts +11 -25
- package/src/resolvers/RunAIAgentResolver.ts +6 -66
|
@@ -13739,6 +13739,10 @@ __decorate([
|
|
|
13739
13739
|
Field(() => [MJAction_]),
|
|
13740
13740
|
__metadata("design:type", Array)
|
|
13741
13741
|
], MJAIAgent_.prototype, "MJActions_CreatedByAgentIDArray", void 0);
|
|
13742
|
+
__decorate([
|
|
13743
|
+
Field(() => [MJConversation_]),
|
|
13744
|
+
__metadata("design:type", Array)
|
|
13745
|
+
], MJAIAgent_.prototype, "MJConversations_DefaultAgentIDArray", void 0);
|
|
13742
13746
|
MJAIAgent_ = __decorate([
|
|
13743
13747
|
ObjectType({ description: `Table to store information about AI agents.` })
|
|
13744
13748
|
], MJAIAgent_);
|
|
@@ -14552,6 +14556,14 @@ let MJAIAgentResolver = class MJAIAgentResolver extends ResolverBase {
|
|
|
14552
14556
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Actions', rows, this.GetUserFromPayload(userPayload));
|
|
14553
14557
|
return result;
|
|
14554
14558
|
}
|
|
14559
|
+
async MJConversations_DefaultAgentIDArray(mjaiagent_, { userPayload, providers }, pubSub) {
|
|
14560
|
+
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
14561
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14562
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversations')} WHERE ${provider.QuoteIdentifier('DefaultAgentID')}='${mjaiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
14563
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
14564
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
|
|
14565
|
+
return result;
|
|
14566
|
+
}
|
|
14555
14567
|
async CreateMJAIAgent(input, { providers, userPayload }, pubSub) {
|
|
14556
14568
|
const provider = GetReadWriteProvider(providers);
|
|
14557
14569
|
return this.CreateRecord('MJ: AI Agents', input, provider, userPayload, pubSub);
|
|
@@ -14836,6 +14848,15 @@ __decorate([
|
|
|
14836
14848
|
__metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
|
|
14837
14849
|
__metadata("design:returntype", Promise)
|
|
14838
14850
|
], MJAIAgentResolver.prototype, "MJActions_CreatedByAgentIDArray", null);
|
|
14851
|
+
__decorate([
|
|
14852
|
+
FieldResolver(() => [MJConversation_]),
|
|
14853
|
+
__param(0, Root()),
|
|
14854
|
+
__param(1, Ctx()),
|
|
14855
|
+
__param(2, PubSub()),
|
|
14856
|
+
__metadata("design:type", Function),
|
|
14857
|
+
__metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
|
|
14858
|
+
__metadata("design:returntype", Promise)
|
|
14859
|
+
], MJAIAgentResolver.prototype, "MJConversations_DefaultAgentIDArray", null);
|
|
14839
14860
|
__decorate([
|
|
14840
14861
|
Mutation(() => MJAIAgent_),
|
|
14841
14862
|
__param(0, Arg('input', () => CreateMJAIAgentInput)),
|
|
@@ -28916,6 +28937,10 @@ __decorate([
|
|
|
28916
28937
|
Field(() => [MJDashboardUserPreference_]),
|
|
28917
28938
|
__metadata("design:type", Array)
|
|
28918
28939
|
], MJApplication_.prototype, "MJDashboardUserPreferences_ApplicationIDArray", void 0);
|
|
28940
|
+
__decorate([
|
|
28941
|
+
Field(() => [MJConversation_]),
|
|
28942
|
+
__metadata("design:type", Array)
|
|
28943
|
+
], MJApplication_.prototype, "MJConversations_ApplicationIDArray", void 0);
|
|
28919
28944
|
MJApplication_ = __decorate([
|
|
28920
28945
|
ObjectType({ description: `Applications are used to group entities in the user interface for ease of user access` })
|
|
28921
28946
|
], MJApplication_);
|
|
@@ -29193,6 +29218,14 @@ let MJApplicationResolver = class MJApplicationResolver extends ResolverBase {
|
|
|
29193
29218
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User Preferences', rows, this.GetUserFromPayload(userPayload));
|
|
29194
29219
|
return result;
|
|
29195
29220
|
}
|
|
29221
|
+
async MJConversations_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
|
|
29222
|
+
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
29223
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29224
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversations')} WHERE ${provider.QuoteIdentifier('ApplicationID')}='${mjapplication_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
29225
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
29226
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
|
|
29227
|
+
return result;
|
|
29228
|
+
}
|
|
29196
29229
|
async CreateMJApplication(input, { providers, userPayload }, pubSub) {
|
|
29197
29230
|
const provider = GetReadWriteProvider(providers);
|
|
29198
29231
|
return this.CreateRecord('MJ: Applications', input, provider, userPayload, pubSub);
|
|
@@ -29305,6 +29338,15 @@ __decorate([
|
|
|
29305
29338
|
__metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
|
|
29306
29339
|
__metadata("design:returntype", Promise)
|
|
29307
29340
|
], MJApplicationResolver.prototype, "MJDashboardUserPreferences_ApplicationIDArray", null);
|
|
29341
|
+
__decorate([
|
|
29342
|
+
FieldResolver(() => [MJConversation_]),
|
|
29343
|
+
__param(0, Root()),
|
|
29344
|
+
__param(1, Ctx()),
|
|
29345
|
+
__param(2, PubSub()),
|
|
29346
|
+
__metadata("design:type", Function),
|
|
29347
|
+
__metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
|
|
29348
|
+
__metadata("design:returntype", Promise)
|
|
29349
|
+
], MJApplicationResolver.prototype, "MJConversations_ApplicationIDArray", null);
|
|
29308
29350
|
__decorate([
|
|
29309
29351
|
Mutation(() => MJApplication_),
|
|
29310
29352
|
__param(0, Arg('input', () => CreateMJApplicationInput)),
|
|
@@ -31688,8 +31730,9 @@ __decorate([
|
|
|
31688
31730
|
__metadata("design:type", Date)
|
|
31689
31731
|
], MJArtifactUse_.prototype, "_mj__UpdatedAt", void 0);
|
|
31690
31732
|
__decorate([
|
|
31691
|
-
Field(
|
|
31692
|
-
|
|
31733
|
+
Field({ nullable: true }),
|
|
31734
|
+
MaxLength(255),
|
|
31735
|
+
__metadata("design:type", String)
|
|
31693
31736
|
], MJArtifactUse_.prototype, "ArtifactVersion", void 0);
|
|
31694
31737
|
__decorate([
|
|
31695
31738
|
Field(),
|
|
@@ -31954,8 +31997,9 @@ __decorate([
|
|
|
31954
31997
|
__metadata("design:type", Date)
|
|
31955
31998
|
], MJArtifactVersionAttribute_.prototype, "_mj__UpdatedAt", void 0);
|
|
31956
31999
|
__decorate([
|
|
31957
|
-
Field(
|
|
31958
|
-
|
|
32000
|
+
Field({ nullable: true }),
|
|
32001
|
+
MaxLength(255),
|
|
32002
|
+
__metadata("design:type", String)
|
|
31959
32003
|
], MJArtifactVersionAttribute_.prototype, "ArtifactVersion", void 0);
|
|
31960
32004
|
MJArtifactVersionAttribute_ = __decorate([
|
|
31961
32005
|
ObjectType({ description: `Stores extracted attribute values from artifact content based on ArtifactType ExtractRules. Prevents re-running extraction logic on every access.` })
|
|
@@ -34382,8 +34426,9 @@ __decorate([
|
|
|
34382
34426
|
__metadata("design:type", String)
|
|
34383
34427
|
], MJCollectionArtifact_.prototype, "Collection", void 0);
|
|
34384
34428
|
__decorate([
|
|
34385
|
-
Field(
|
|
34386
|
-
|
|
34429
|
+
Field({ nullable: true }),
|
|
34430
|
+
MaxLength(255),
|
|
34431
|
+
__metadata("design:type", String)
|
|
34387
34432
|
], MJCollectionArtifact_.prototype, "ArtifactVersion", void 0);
|
|
34388
34433
|
MJCollectionArtifact_ = __decorate([
|
|
34389
34434
|
ObjectType({ description: `Links collections to specific artifact versions. Each collection can contain multiple versions of the same artifact.` })
|
|
@@ -41552,6 +41597,10 @@ __decorate([
|
|
|
41552
41597
|
Field(() => [MJComponentDependency_]),
|
|
41553
41598
|
__metadata("design:type", Array)
|
|
41554
41599
|
], MJComponent_.prototype, "MJComponentDependencies_DependencyComponentIDArray", void 0);
|
|
41600
|
+
__decorate([
|
|
41601
|
+
Field(() => [MJEntityFormOverride_]),
|
|
41602
|
+
__metadata("design:type", Array)
|
|
41603
|
+
], MJComponent_.prototype, "MJEntityFormOverrides_ComponentIDArray", void 0);
|
|
41555
41604
|
MJComponent_ = __decorate([
|
|
41556
41605
|
ObjectType({ description: `Main catalog of reusable components with versioning and registry support` })
|
|
41557
41606
|
], MJComponent_);
|
|
@@ -41885,6 +41934,14 @@ let MJComponentResolver = class MJComponentResolver extends ResolverBase {
|
|
|
41885
41934
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Component Dependencies', rows, this.GetUserFromPayload(userPayload));
|
|
41886
41935
|
return result;
|
|
41887
41936
|
}
|
|
41937
|
+
async MJEntityFormOverrides_ComponentIDArray(mjcomponent_, { userPayload, providers }, pubSub) {
|
|
41938
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
41939
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41940
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('ComponentID')}='${mjcomponent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
41941
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
41942
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
41943
|
+
return result;
|
|
41944
|
+
}
|
|
41888
41945
|
async CreateMJComponent(input, { providers, userPayload }, pubSub) {
|
|
41889
41946
|
const provider = GetReadWriteProvider(providers);
|
|
41890
41947
|
return this.CreateRecord('MJ: Components', input, provider, userPayload, pubSub);
|
|
@@ -41962,6 +42019,15 @@ __decorate([
|
|
|
41962
42019
|
__metadata("design:paramtypes", [MJComponent_, Object, PubSubEngine]),
|
|
41963
42020
|
__metadata("design:returntype", Promise)
|
|
41964
42021
|
], MJComponentResolver.prototype, "MJComponentDependencies_DependencyComponentIDArray", null);
|
|
42022
|
+
__decorate([
|
|
42023
|
+
FieldResolver(() => [MJEntityFormOverride_]),
|
|
42024
|
+
__param(0, Root()),
|
|
42025
|
+
__param(1, Ctx()),
|
|
42026
|
+
__param(2, PubSub()),
|
|
42027
|
+
__metadata("design:type", Function),
|
|
42028
|
+
__metadata("design:paramtypes", [MJComponent_, Object, PubSubEngine]),
|
|
42029
|
+
__metadata("design:returntype", Promise)
|
|
42030
|
+
], MJComponentResolver.prototype, "MJEntityFormOverrides_ComponentIDArray", null);
|
|
41965
42031
|
__decorate([
|
|
41966
42032
|
Mutation(() => MJComponent_),
|
|
41967
42033
|
__param(0, Arg('input', () => CreateMJComponentInput)),
|
|
@@ -47487,8 +47553,9 @@ __decorate([
|
|
|
47487
47553
|
__metadata("design:type", String)
|
|
47488
47554
|
], MJConversationDetailArtifact_.prototype, "ConversationDetail", void 0);
|
|
47489
47555
|
__decorate([
|
|
47490
|
-
Field(
|
|
47491
|
-
|
|
47556
|
+
Field({ nullable: true }),
|
|
47557
|
+
MaxLength(255),
|
|
47558
|
+
__metadata("design:type", String)
|
|
47492
47559
|
], MJConversationDetailArtifact_.prototype, "ArtifactVersion", void 0);
|
|
47493
47560
|
MJConversationDetailArtifact_ = __decorate([
|
|
47494
47561
|
ObjectType({ description: `Junction table tracking many-to-many relationship between conversation messages and artifact versions, with directionality tracking` })
|
|
@@ -47792,11 +47859,12 @@ __decorate([
|
|
|
47792
47859
|
__metadata("design:type", String)
|
|
47793
47860
|
], MJConversationDetailAttachment_.prototype, "File", void 0);
|
|
47794
47861
|
__decorate([
|
|
47795
|
-
Field(
|
|
47796
|
-
|
|
47862
|
+
Field({ nullable: true }),
|
|
47863
|
+
MaxLength(255),
|
|
47864
|
+
__metadata("design:type", String)
|
|
47797
47865
|
], MJConversationDetailAttachment_.prototype, "ArtifactVersion", void 0);
|
|
47798
47866
|
MJConversationDetailAttachment_ = __decorate([
|
|
47799
|
-
ObjectType({ description: `
|
|
47867
|
+
ObjectType({ description: `DEPRECATED: file uploads now flow through ConversationArtifactVersion so they share storage, identity, versioning, permissions, and the artifact-tool dispatch path. Table, generated entity class, GraphQL types, and stored procedures all remain functional — runtime use produces a console warning per the framework\'s standard handling of Status=\'Deprecated\'. See packages/AI/Agents/docs/ARTIFACT_TOOLS_GUIDE.md for migration guidance. Originally: Stores attachments (images, videos, audio, documents) for conversation messages.` })
|
|
47800
47868
|
], MJConversationDetailAttachment_);
|
|
47801
47869
|
export { MJConversationDetailAttachment_ };
|
|
47802
47870
|
//****************************************************************************
|
|
@@ -49116,12 +49184,12 @@ __decorate([
|
|
|
49116
49184
|
__metadata("design:type", Boolean)
|
|
49117
49185
|
], MJConversation_.prototype, "IsArchived", void 0);
|
|
49118
49186
|
__decorate([
|
|
49119
|
-
Field({ nullable: true }),
|
|
49187
|
+
Field({ nullable: true, description: `Generic 'what is this conversation about?' pointer. Names the Entity whose record this conversation references (e.g. MJ: Components when the conversation was started in the Form Builder cockpit about a specific form). Paired with LinkedRecordID via the CK_Conversation_LinkBinding cross-column CHECK — both NULL or both populated. Surfaces use this to filter their conversation list to entries about the currently-loaded record (e.g. 'show prior conversations about THIS form'). Reusable beyond Form Builder by any future dashboard / record-context surface that wants the same UX without further schema work.` }),
|
|
49120
49188
|
MaxLength(36),
|
|
49121
49189
|
__metadata("design:type", String)
|
|
49122
49190
|
], MJConversation_.prototype, "LinkedEntityID", void 0);
|
|
49123
49191
|
__decorate([
|
|
49124
|
-
Field({ nullable: true, description: `
|
|
49192
|
+
Field({ nullable: true, description: `The primary key of the record this conversation is about, serialized as a string so any entity type can be referenced regardless of its PK shape (UUID, int, composite). Used together with LinkedEntityID — see CK_Conversation_LinkBinding. Wide enough (NVARCHAR(500) in the baseline schema) to handle chunky composite keys. Surfaces query by (LinkedEntityID, LinkedRecordID) — or by LinkedRecordID IN (...) when a lineage of records shares conversation context (e.g. multiple Component versions of the same form lineage).` }),
|
|
49125
49193
|
MaxLength(500),
|
|
49126
49194
|
__metadata("design:type", String)
|
|
49127
49195
|
], MJConversation_.prototype, "LinkedRecordID", void 0);
|
|
@@ -49162,6 +49230,25 @@ __decorate([
|
|
|
49162
49230
|
MaxLength(36),
|
|
49163
49231
|
__metadata("design:type", String)
|
|
49164
49232
|
], MJConversation_.prototype, "TestRunID", void 0);
|
|
49233
|
+
__decorate([
|
|
49234
|
+
Field({ description: `Controls where this conversation surfaces in the UI. Global = appears in the main Chat app (no application binding). Application = scoped to a specific Application's embedded chat surface (e.g. the Form Builder cockpit); hidden from the main chat list by default. Both = explicitly promoted to appear in BOTH the main chat list and the bound Application's embedded surface. Defaults to Global so pre-existing conversations stay visible in main chat. Paired with ApplicationID via a cross-column CHECK constraint: Global => ApplicationID IS NULL; Application or Both => ApplicationID IS NOT NULL.` }),
|
|
49235
|
+
MaxLength(20),
|
|
49236
|
+
__metadata("design:type", String)
|
|
49237
|
+
], MJConversation_.prototype, "ApplicationScope", void 0);
|
|
49238
|
+
__decorate([
|
|
49239
|
+
Field({ nullable: true, description: `Optional Application this conversation is bound to. Required when ApplicationScope is 'Application' or 'Both'; must be NULL when ApplicationScope is 'Global'. Enforced by the CK_Conversation_ScopeAppBinding cross-column CHECK. Used by embedded chat surfaces (e.g. the Form Builder cockpit) to filter their conversation list to just their own application's conversations.` }),
|
|
49240
|
+
MaxLength(36),
|
|
49241
|
+
__metadata("design:type", String)
|
|
49242
|
+
], MJConversation_.prototype, "ApplicationID", void 0);
|
|
49243
|
+
__decorate([
|
|
49244
|
+
Field({ nullable: true, description: `Optional per-conversation default AI agent. When set, the message router targets this agent for non-mention, non-continuity messages instead of falling through to the embedder-supplied default (e.g. Form Builder) or to Sage. Lets a user pin a conversation to a specific specialist agent (e.g. Research Agent) so Sage is never invoked for that thread. Routing precedence: @mention > continuity (last responder) > Conversation.DefaultAgentID > embedder's defaultAgentId input > Sage fallback.` }),
|
|
49245
|
+
MaxLength(36),
|
|
49246
|
+
__metadata("design:type", String)
|
|
49247
|
+
], MJConversation_.prototype, "DefaultAgentID", void 0);
|
|
49248
|
+
__decorate([
|
|
49249
|
+
Field({ nullable: true, description: `Free-form JSON extensibility column. Apps that want to attach conversation-scoped metadata (UI state, draft notes, custom analytics tags, etc.) can stuff it here without a schema change. **Namespace your keys** to avoid collisions across apps — store e.g. {"form-builder.lastPreviewRecordId":"...","my-app.fooFlag":true} rather than top-level lastPreviewRecordId. Core MJ code paths do NOT read this column; it's purely for downstream apps. NVARCHAR(MAX) so callers can store arbitrarily large blobs, but treat that as a smell — heavy data belongs in a real entity, not a JSON dump.` }),
|
|
49250
|
+
__metadata("design:type", String)
|
|
49251
|
+
], MJConversation_.prototype, "AdditionalData", void 0);
|
|
49165
49252
|
__decorate([
|
|
49166
49253
|
Field(),
|
|
49167
49254
|
MaxLength(100),
|
|
@@ -49192,6 +49279,16 @@ __decorate([
|
|
|
49192
49279
|
MaxLength(255),
|
|
49193
49280
|
__metadata("design:type", String)
|
|
49194
49281
|
], MJConversation_.prototype, "TestRun", void 0);
|
|
49282
|
+
__decorate([
|
|
49283
|
+
Field({ nullable: true }),
|
|
49284
|
+
MaxLength(100),
|
|
49285
|
+
__metadata("design:type", String)
|
|
49286
|
+
], MJConversation_.prototype, "Application", void 0);
|
|
49287
|
+
__decorate([
|
|
49288
|
+
Field({ nullable: true }),
|
|
49289
|
+
MaxLength(255),
|
|
49290
|
+
__metadata("design:type", String)
|
|
49291
|
+
], MJConversation_.prototype, "DefaultAgent", void 0);
|
|
49195
49292
|
__decorate([
|
|
49196
49293
|
Field(() => [MJConversationDetail_]),
|
|
49197
49294
|
__metadata("design:type", Array)
|
|
@@ -49285,6 +49382,22 @@ __decorate([
|
|
|
49285
49382
|
Field({ nullable: true }),
|
|
49286
49383
|
__metadata("design:type", String)
|
|
49287
49384
|
], CreateMJConversationInput.prototype, "TestRunID", void 0);
|
|
49385
|
+
__decorate([
|
|
49386
|
+
Field({ nullable: true }),
|
|
49387
|
+
__metadata("design:type", String)
|
|
49388
|
+
], CreateMJConversationInput.prototype, "ApplicationScope", void 0);
|
|
49389
|
+
__decorate([
|
|
49390
|
+
Field({ nullable: true }),
|
|
49391
|
+
__metadata("design:type", String)
|
|
49392
|
+
], CreateMJConversationInput.prototype, "ApplicationID", void 0);
|
|
49393
|
+
__decorate([
|
|
49394
|
+
Field({ nullable: true }),
|
|
49395
|
+
__metadata("design:type", String)
|
|
49396
|
+
], CreateMJConversationInput.prototype, "DefaultAgentID", void 0);
|
|
49397
|
+
__decorate([
|
|
49398
|
+
Field({ nullable: true }),
|
|
49399
|
+
__metadata("design:type", String)
|
|
49400
|
+
], CreateMJConversationInput.prototype, "AdditionalData", void 0);
|
|
49288
49401
|
__decorate([
|
|
49289
49402
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
49290
49403
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -49358,6 +49471,22 @@ __decorate([
|
|
|
49358
49471
|
Field({ nullable: true }),
|
|
49359
49472
|
__metadata("design:type", String)
|
|
49360
49473
|
], UpdateMJConversationInput.prototype, "TestRunID", void 0);
|
|
49474
|
+
__decorate([
|
|
49475
|
+
Field({ nullable: true }),
|
|
49476
|
+
__metadata("design:type", String)
|
|
49477
|
+
], UpdateMJConversationInput.prototype, "ApplicationScope", void 0);
|
|
49478
|
+
__decorate([
|
|
49479
|
+
Field({ nullable: true }),
|
|
49480
|
+
__metadata("design:type", String)
|
|
49481
|
+
], UpdateMJConversationInput.prototype, "ApplicationID", void 0);
|
|
49482
|
+
__decorate([
|
|
49483
|
+
Field({ nullable: true }),
|
|
49484
|
+
__metadata("design:type", String)
|
|
49485
|
+
], UpdateMJConversationInput.prototype, "DefaultAgentID", void 0);
|
|
49486
|
+
__decorate([
|
|
49487
|
+
Field({ nullable: true }),
|
|
49488
|
+
__metadata("design:type", String)
|
|
49489
|
+
], UpdateMJConversationInput.prototype, "AdditionalData", void 0);
|
|
49361
49490
|
__decorate([
|
|
49362
49491
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
49363
49492
|
__metadata("design:type", Array)
|
|
@@ -58738,6 +58867,10 @@ __decorate([
|
|
|
58738
58867
|
Field(() => [MJTestRun_]),
|
|
58739
58868
|
__metadata("design:type", Array)
|
|
58740
58869
|
], MJEntity_.prototype, "MJTestRuns_TargetLogEntityIDArray", void 0);
|
|
58870
|
+
__decorate([
|
|
58871
|
+
Field(() => [MJEntityFormOverride_]),
|
|
58872
|
+
__metadata("design:type", Array)
|
|
58873
|
+
], MJEntity_.prototype, "MJEntityFormOverrides_EntityIDArray", void 0);
|
|
58741
58874
|
MJEntity_ = __decorate([
|
|
58742
58875
|
ObjectType({ description: `Catalog of all entities across all schemas` })
|
|
58743
58876
|
], MJEntity_);
|
|
@@ -59799,6 +59932,14 @@ let MJEntityResolverBase = class MJEntityResolverBase extends ResolverBase {
|
|
|
59799
59932
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Test Runs', rows, this.GetUserFromPayload(userPayload));
|
|
59800
59933
|
return result;
|
|
59801
59934
|
}
|
|
59935
|
+
async MJEntityFormOverrides_EntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
|
|
59936
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
59937
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
59938
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('EntityID')}='${mjentity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
59939
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
59940
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
59941
|
+
return result;
|
|
59942
|
+
}
|
|
59802
59943
|
async CreateMJEntity(input, { providers, userPayload }, pubSub) {
|
|
59803
59944
|
const provider = GetReadWriteProvider(providers);
|
|
59804
59945
|
return this.CreateRecord('MJ: Entities', input, provider, userPayload, pubSub);
|
|
@@ -60388,6 +60529,15 @@ __decorate([
|
|
|
60388
60529
|
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
60389
60530
|
__metadata("design:returntype", Promise)
|
|
60390
60531
|
], MJEntityResolverBase.prototype, "MJTestRuns_TargetLogEntityIDArray", null);
|
|
60532
|
+
__decorate([
|
|
60533
|
+
FieldResolver(() => [MJEntityFormOverride_]),
|
|
60534
|
+
__param(0, Root()),
|
|
60535
|
+
__param(1, Ctx()),
|
|
60536
|
+
__param(2, PubSub()),
|
|
60537
|
+
__metadata("design:type", Function),
|
|
60538
|
+
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
60539
|
+
__metadata("design:returntype", Promise)
|
|
60540
|
+
], MJEntityResolverBase.prototype, "MJEntityFormOverrides_EntityIDArray", null);
|
|
60391
60541
|
__decorate([
|
|
60392
60542
|
Mutation(() => MJEntity_),
|
|
60393
60543
|
__param(0, Arg('input', () => CreateMJEntityInput)),
|
|
@@ -65154,6 +65304,354 @@ MJEntityFieldResolver = __decorate([
|
|
|
65154
65304
|
], MJEntityFieldResolver);
|
|
65155
65305
|
export { MJEntityFieldResolver };
|
|
65156
65306
|
//****************************************************************************
|
|
65307
|
+
// ENTITY CLASS for MJ: Entity Form Overrides
|
|
65308
|
+
//****************************************************************************
|
|
65309
|
+
let MJEntityFormOverride_ = class MJEntityFormOverride_ {
|
|
65310
|
+
};
|
|
65311
|
+
__decorate([
|
|
65312
|
+
Field(),
|
|
65313
|
+
MaxLength(36),
|
|
65314
|
+
__metadata("design:type", String)
|
|
65315
|
+
], MJEntityFormOverride_.prototype, "ID", void 0);
|
|
65316
|
+
__decorate([
|
|
65317
|
+
Field({ description: `Foreign key to Entity — which entity this override is for.` }),
|
|
65318
|
+
MaxLength(36),
|
|
65319
|
+
__metadata("design:type", String)
|
|
65320
|
+
], MJEntityFormOverride_.prototype, "EntityID", void 0);
|
|
65321
|
+
__decorate([
|
|
65322
|
+
Field({ description: `Foreign key to Component — the component that renders the form. Must declare componentRole='form' and implement the FormHostProps contract.` }),
|
|
65323
|
+
MaxLength(36),
|
|
65324
|
+
__metadata("design:type", String)
|
|
65325
|
+
], MJEntityFormOverride_.prototype, "ComponentID", void 0);
|
|
65326
|
+
__decorate([
|
|
65327
|
+
Field({ description: `Human-readable label for this override (e.g., "CSR Customer Form", "Compact Mobile Variant").` }),
|
|
65328
|
+
MaxLength(255),
|
|
65329
|
+
__metadata("design:type", String)
|
|
65330
|
+
], MJEntityFormOverride_.prototype, "Name", void 0);
|
|
65331
|
+
__decorate([
|
|
65332
|
+
Field({ nullable: true, description: `Optional longer description of what this override is for and when it applies.` }),
|
|
65333
|
+
__metadata("design:type", String)
|
|
65334
|
+
], MJEntityFormOverride_.prototype, "Description", void 0);
|
|
65335
|
+
__decorate([
|
|
65336
|
+
Field({ description: `Resolution tier: User (requires UserID), Role (requires RoleID), or Global. The resolver evaluates in that order — a User row beats a Role row beats a Global row.` }),
|
|
65337
|
+
MaxLength(20),
|
|
65338
|
+
__metadata("design:type", String)
|
|
65339
|
+
], MJEntityFormOverride_.prototype, "Scope", void 0);
|
|
65340
|
+
__decorate([
|
|
65341
|
+
Field({ nullable: true, description: `Required when Scope='User'. The single user this override applies to.` }),
|
|
65342
|
+
MaxLength(36),
|
|
65343
|
+
__metadata("design:type", String)
|
|
65344
|
+
], MJEntityFormOverride_.prototype, "UserID", void 0);
|
|
65345
|
+
__decorate([
|
|
65346
|
+
Field({ nullable: true, description: `Required when Scope='Role'. The role whose members see this override.` }),
|
|
65347
|
+
MaxLength(36),
|
|
65348
|
+
__metadata("design:type", String)
|
|
65349
|
+
], MJEntityFormOverride_.prototype, "RoleID", void 0);
|
|
65350
|
+
__decorate([
|
|
65351
|
+
Field(() => Int, { description: `Higher value wins within a scope tier. Ties broken by __mj_CreatedAt DESC. No IsDefault — Priority is the only mechanism.` }),
|
|
65352
|
+
__metadata("design:type", Number)
|
|
65353
|
+
], MJEntityFormOverride_.prototype, "Priority", void 0);
|
|
65354
|
+
__decorate([
|
|
65355
|
+
Field({ description: `Active = eligible for resolution. Inactive = ignored. Pending = AI-authored, awaiting human activation (resolver treats as Inactive).` }),
|
|
65356
|
+
MaxLength(20),
|
|
65357
|
+
__metadata("design:type", String)
|
|
65358
|
+
], MJEntityFormOverride_.prototype, "Status", void 0);
|
|
65359
|
+
__decorate([
|
|
65360
|
+
Field({ nullable: true, description: `Optional free-form commentary about this override — e.g. who authored it, why it exists, what should change before it goes Global, links to related discussions. Does not affect resolution.` }),
|
|
65361
|
+
__metadata("design:type", String)
|
|
65362
|
+
], MJEntityFormOverride_.prototype, "Notes", void 0);
|
|
65363
|
+
__decorate([
|
|
65364
|
+
Field(),
|
|
65365
|
+
__metadata("design:type", Date)
|
|
65366
|
+
], MJEntityFormOverride_.prototype, "_mj__CreatedAt", void 0);
|
|
65367
|
+
__decorate([
|
|
65368
|
+
Field(),
|
|
65369
|
+
__metadata("design:type", Date)
|
|
65370
|
+
], MJEntityFormOverride_.prototype, "_mj__UpdatedAt", void 0);
|
|
65371
|
+
__decorate([
|
|
65372
|
+
Field(),
|
|
65373
|
+
MaxLength(255),
|
|
65374
|
+
__metadata("design:type", String)
|
|
65375
|
+
], MJEntityFormOverride_.prototype, "Entity", void 0);
|
|
65376
|
+
__decorate([
|
|
65377
|
+
Field(),
|
|
65378
|
+
MaxLength(500),
|
|
65379
|
+
__metadata("design:type", String)
|
|
65380
|
+
], MJEntityFormOverride_.prototype, "Component", void 0);
|
|
65381
|
+
__decorate([
|
|
65382
|
+
Field({ nullable: true }),
|
|
65383
|
+
MaxLength(100),
|
|
65384
|
+
__metadata("design:type", String)
|
|
65385
|
+
], MJEntityFormOverride_.prototype, "User", void 0);
|
|
65386
|
+
__decorate([
|
|
65387
|
+
Field({ nullable: true }),
|
|
65388
|
+
MaxLength(50),
|
|
65389
|
+
__metadata("design:type", String)
|
|
65390
|
+
], MJEntityFormOverride_.prototype, "Role", void 0);
|
|
65391
|
+
MJEntityFormOverride_ = __decorate([
|
|
65392
|
+
ObjectType({ description: `Points an Entity at a Component to serve as its form at runtime. Scoped to User > Role > Global with priority-based resolution. When present and Active, takes precedence over the entity\'s @RegisterClass-registered or CodeGen-generated Angular form.` })
|
|
65393
|
+
], MJEntityFormOverride_);
|
|
65394
|
+
export { MJEntityFormOverride_ };
|
|
65395
|
+
//****************************************************************************
|
|
65396
|
+
// INPUT TYPE for MJ: Entity Form Overrides
|
|
65397
|
+
//****************************************************************************
|
|
65398
|
+
let CreateMJEntityFormOverrideInput = class CreateMJEntityFormOverrideInput {
|
|
65399
|
+
};
|
|
65400
|
+
__decorate([
|
|
65401
|
+
Field({ nullable: true }),
|
|
65402
|
+
__metadata("design:type", String)
|
|
65403
|
+
], CreateMJEntityFormOverrideInput.prototype, "ID", void 0);
|
|
65404
|
+
__decorate([
|
|
65405
|
+
Field({ nullable: true }),
|
|
65406
|
+
__metadata("design:type", String)
|
|
65407
|
+
], CreateMJEntityFormOverrideInput.prototype, "EntityID", void 0);
|
|
65408
|
+
__decorate([
|
|
65409
|
+
Field({ nullable: true }),
|
|
65410
|
+
__metadata("design:type", String)
|
|
65411
|
+
], CreateMJEntityFormOverrideInput.prototype, "ComponentID", void 0);
|
|
65412
|
+
__decorate([
|
|
65413
|
+
Field({ nullable: true }),
|
|
65414
|
+
__metadata("design:type", String)
|
|
65415
|
+
], CreateMJEntityFormOverrideInput.prototype, "Name", void 0);
|
|
65416
|
+
__decorate([
|
|
65417
|
+
Field({ nullable: true }),
|
|
65418
|
+
__metadata("design:type", String)
|
|
65419
|
+
], CreateMJEntityFormOverrideInput.prototype, "Description", void 0);
|
|
65420
|
+
__decorate([
|
|
65421
|
+
Field({ nullable: true }),
|
|
65422
|
+
__metadata("design:type", String)
|
|
65423
|
+
], CreateMJEntityFormOverrideInput.prototype, "Scope", void 0);
|
|
65424
|
+
__decorate([
|
|
65425
|
+
Field({ nullable: true }),
|
|
65426
|
+
__metadata("design:type", String)
|
|
65427
|
+
], CreateMJEntityFormOverrideInput.prototype, "UserID", void 0);
|
|
65428
|
+
__decorate([
|
|
65429
|
+
Field({ nullable: true }),
|
|
65430
|
+
__metadata("design:type", String)
|
|
65431
|
+
], CreateMJEntityFormOverrideInput.prototype, "RoleID", void 0);
|
|
65432
|
+
__decorate([
|
|
65433
|
+
Field(() => Int, { nullable: true }),
|
|
65434
|
+
__metadata("design:type", Number)
|
|
65435
|
+
], CreateMJEntityFormOverrideInput.prototype, "Priority", void 0);
|
|
65436
|
+
__decorate([
|
|
65437
|
+
Field({ nullable: true }),
|
|
65438
|
+
__metadata("design:type", String)
|
|
65439
|
+
], CreateMJEntityFormOverrideInput.prototype, "Status", void 0);
|
|
65440
|
+
__decorate([
|
|
65441
|
+
Field({ nullable: true }),
|
|
65442
|
+
__metadata("design:type", String)
|
|
65443
|
+
], CreateMJEntityFormOverrideInput.prototype, "Notes", void 0);
|
|
65444
|
+
__decorate([
|
|
65445
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
65446
|
+
__metadata("design:type", RestoreContextInput)
|
|
65447
|
+
], CreateMJEntityFormOverrideInput.prototype, "RestoreContext___", void 0);
|
|
65448
|
+
CreateMJEntityFormOverrideInput = __decorate([
|
|
65449
|
+
InputType()
|
|
65450
|
+
], CreateMJEntityFormOverrideInput);
|
|
65451
|
+
export { CreateMJEntityFormOverrideInput };
|
|
65452
|
+
//****************************************************************************
|
|
65453
|
+
// INPUT TYPE for MJ: Entity Form Overrides
|
|
65454
|
+
//****************************************************************************
|
|
65455
|
+
let UpdateMJEntityFormOverrideInput = class UpdateMJEntityFormOverrideInput {
|
|
65456
|
+
};
|
|
65457
|
+
__decorate([
|
|
65458
|
+
Field(),
|
|
65459
|
+
__metadata("design:type", String)
|
|
65460
|
+
], UpdateMJEntityFormOverrideInput.prototype, "ID", void 0);
|
|
65461
|
+
__decorate([
|
|
65462
|
+
Field({ nullable: true }),
|
|
65463
|
+
__metadata("design:type", String)
|
|
65464
|
+
], UpdateMJEntityFormOverrideInput.prototype, "EntityID", void 0);
|
|
65465
|
+
__decorate([
|
|
65466
|
+
Field({ nullable: true }),
|
|
65467
|
+
__metadata("design:type", String)
|
|
65468
|
+
], UpdateMJEntityFormOverrideInput.prototype, "ComponentID", void 0);
|
|
65469
|
+
__decorate([
|
|
65470
|
+
Field({ nullable: true }),
|
|
65471
|
+
__metadata("design:type", String)
|
|
65472
|
+
], UpdateMJEntityFormOverrideInput.prototype, "Name", void 0);
|
|
65473
|
+
__decorate([
|
|
65474
|
+
Field({ nullable: true }),
|
|
65475
|
+
__metadata("design:type", String)
|
|
65476
|
+
], UpdateMJEntityFormOverrideInput.prototype, "Description", void 0);
|
|
65477
|
+
__decorate([
|
|
65478
|
+
Field({ nullable: true }),
|
|
65479
|
+
__metadata("design:type", String)
|
|
65480
|
+
], UpdateMJEntityFormOverrideInput.prototype, "Scope", void 0);
|
|
65481
|
+
__decorate([
|
|
65482
|
+
Field({ nullable: true }),
|
|
65483
|
+
__metadata("design:type", String)
|
|
65484
|
+
], UpdateMJEntityFormOverrideInput.prototype, "UserID", void 0);
|
|
65485
|
+
__decorate([
|
|
65486
|
+
Field({ nullable: true }),
|
|
65487
|
+
__metadata("design:type", String)
|
|
65488
|
+
], UpdateMJEntityFormOverrideInput.prototype, "RoleID", void 0);
|
|
65489
|
+
__decorate([
|
|
65490
|
+
Field(() => Int, { nullable: true }),
|
|
65491
|
+
__metadata("design:type", Number)
|
|
65492
|
+
], UpdateMJEntityFormOverrideInput.prototype, "Priority", void 0);
|
|
65493
|
+
__decorate([
|
|
65494
|
+
Field({ nullable: true }),
|
|
65495
|
+
__metadata("design:type", String)
|
|
65496
|
+
], UpdateMJEntityFormOverrideInput.prototype, "Status", void 0);
|
|
65497
|
+
__decorate([
|
|
65498
|
+
Field({ nullable: true }),
|
|
65499
|
+
__metadata("design:type", String)
|
|
65500
|
+
], UpdateMJEntityFormOverrideInput.prototype, "Notes", void 0);
|
|
65501
|
+
__decorate([
|
|
65502
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
65503
|
+
__metadata("design:type", Array)
|
|
65504
|
+
], UpdateMJEntityFormOverrideInput.prototype, "OldValues___", void 0);
|
|
65505
|
+
__decorate([
|
|
65506
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
65507
|
+
__metadata("design:type", RestoreContextInput)
|
|
65508
|
+
], UpdateMJEntityFormOverrideInput.prototype, "RestoreContext___", void 0);
|
|
65509
|
+
UpdateMJEntityFormOverrideInput = __decorate([
|
|
65510
|
+
InputType()
|
|
65511
|
+
], UpdateMJEntityFormOverrideInput);
|
|
65512
|
+
export { UpdateMJEntityFormOverrideInput };
|
|
65513
|
+
//****************************************************************************
|
|
65514
|
+
// RESOLVER for MJ: Entity Form Overrides
|
|
65515
|
+
//****************************************************************************
|
|
65516
|
+
let RunMJEntityFormOverrideViewResult = class RunMJEntityFormOverrideViewResult {
|
|
65517
|
+
};
|
|
65518
|
+
__decorate([
|
|
65519
|
+
Field(() => [MJEntityFormOverride_]),
|
|
65520
|
+
__metadata("design:type", Array)
|
|
65521
|
+
], RunMJEntityFormOverrideViewResult.prototype, "Results", void 0);
|
|
65522
|
+
__decorate([
|
|
65523
|
+
Field(() => String, { nullable: true }),
|
|
65524
|
+
__metadata("design:type", String)
|
|
65525
|
+
], RunMJEntityFormOverrideViewResult.prototype, "UserViewRunID", void 0);
|
|
65526
|
+
__decorate([
|
|
65527
|
+
Field(() => Int, { nullable: true }),
|
|
65528
|
+
__metadata("design:type", Number)
|
|
65529
|
+
], RunMJEntityFormOverrideViewResult.prototype, "RowCount", void 0);
|
|
65530
|
+
__decorate([
|
|
65531
|
+
Field(() => Int, { nullable: true }),
|
|
65532
|
+
__metadata("design:type", Number)
|
|
65533
|
+
], RunMJEntityFormOverrideViewResult.prototype, "TotalRowCount", void 0);
|
|
65534
|
+
__decorate([
|
|
65535
|
+
Field(() => Int, { nullable: true }),
|
|
65536
|
+
__metadata("design:type", Number)
|
|
65537
|
+
], RunMJEntityFormOverrideViewResult.prototype, "ExecutionTime", void 0);
|
|
65538
|
+
__decorate([
|
|
65539
|
+
Field({ nullable: true }),
|
|
65540
|
+
__metadata("design:type", String)
|
|
65541
|
+
], RunMJEntityFormOverrideViewResult.prototype, "ErrorMessage", void 0);
|
|
65542
|
+
__decorate([
|
|
65543
|
+
Field(() => Boolean, { nullable: false }),
|
|
65544
|
+
__metadata("design:type", Boolean)
|
|
65545
|
+
], RunMJEntityFormOverrideViewResult.prototype, "Success", void 0);
|
|
65546
|
+
RunMJEntityFormOverrideViewResult = __decorate([
|
|
65547
|
+
ObjectType()
|
|
65548
|
+
], RunMJEntityFormOverrideViewResult);
|
|
65549
|
+
export { RunMJEntityFormOverrideViewResult };
|
|
65550
|
+
let MJEntityFormOverrideResolver = class MJEntityFormOverrideResolver extends ResolverBase {
|
|
65551
|
+
async RunMJEntityFormOverrideViewByID(input, { providers, userPayload }, pubSub) {
|
|
65552
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65553
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
65554
|
+
}
|
|
65555
|
+
async RunMJEntityFormOverrideViewByName(input, { providers, userPayload }, pubSub) {
|
|
65556
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65557
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
65558
|
+
}
|
|
65559
|
+
async RunMJEntityFormOverrideDynamicView(input, { providers, userPayload }, pubSub) {
|
|
65560
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65561
|
+
input.EntityName = 'MJ: Entity Form Overrides';
|
|
65562
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
65563
|
+
}
|
|
65564
|
+
async MJEntityFormOverride(ID, { userPayload, providers }, pubSub) {
|
|
65565
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
65566
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
65567
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('ID')}='${ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
65568
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
65569
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
65570
|
+
return result;
|
|
65571
|
+
}
|
|
65572
|
+
async CreateMJEntityFormOverride(input, { providers, userPayload }, pubSub) {
|
|
65573
|
+
const provider = GetReadWriteProvider(providers);
|
|
65574
|
+
return this.CreateRecord('MJ: Entity Form Overrides', input, provider, userPayload, pubSub);
|
|
65575
|
+
}
|
|
65576
|
+
async UpdateMJEntityFormOverride(input, { providers, userPayload }, pubSub) {
|
|
65577
|
+
const provider = GetReadWriteProvider(providers);
|
|
65578
|
+
return this.UpdateRecord('MJ: Entity Form Overrides', input, provider, userPayload, pubSub);
|
|
65579
|
+
}
|
|
65580
|
+
async DeleteMJEntityFormOverride(ID, options, { providers, userPayload }, pubSub) {
|
|
65581
|
+
const provider = GetReadWriteProvider(providers);
|
|
65582
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
65583
|
+
return this.DeleteRecord('MJ: Entity Form Overrides', key, options, provider, userPayload, pubSub);
|
|
65584
|
+
}
|
|
65585
|
+
};
|
|
65586
|
+
__decorate([
|
|
65587
|
+
Query(() => RunMJEntityFormOverrideViewResult),
|
|
65588
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
65589
|
+
__param(1, Ctx()),
|
|
65590
|
+
__param(2, PubSub()),
|
|
65591
|
+
__metadata("design:type", Function),
|
|
65592
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
65593
|
+
__metadata("design:returntype", Promise)
|
|
65594
|
+
], MJEntityFormOverrideResolver.prototype, "RunMJEntityFormOverrideViewByID", null);
|
|
65595
|
+
__decorate([
|
|
65596
|
+
Query(() => RunMJEntityFormOverrideViewResult),
|
|
65597
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
65598
|
+
__param(1, Ctx()),
|
|
65599
|
+
__param(2, PubSub()),
|
|
65600
|
+
__metadata("design:type", Function),
|
|
65601
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
65602
|
+
__metadata("design:returntype", Promise)
|
|
65603
|
+
], MJEntityFormOverrideResolver.prototype, "RunMJEntityFormOverrideViewByName", null);
|
|
65604
|
+
__decorate([
|
|
65605
|
+
Query(() => RunMJEntityFormOverrideViewResult),
|
|
65606
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
65607
|
+
__param(1, Ctx()),
|
|
65608
|
+
__param(2, PubSub()),
|
|
65609
|
+
__metadata("design:type", Function),
|
|
65610
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
65611
|
+
__metadata("design:returntype", Promise)
|
|
65612
|
+
], MJEntityFormOverrideResolver.prototype, "RunMJEntityFormOverrideDynamicView", null);
|
|
65613
|
+
__decorate([
|
|
65614
|
+
Query(() => MJEntityFormOverride_, { nullable: true }),
|
|
65615
|
+
__param(0, Arg('ID', () => String)),
|
|
65616
|
+
__param(1, Ctx()),
|
|
65617
|
+
__param(2, PubSub()),
|
|
65618
|
+
__metadata("design:type", Function),
|
|
65619
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
65620
|
+
__metadata("design:returntype", Promise)
|
|
65621
|
+
], MJEntityFormOverrideResolver.prototype, "MJEntityFormOverride", null);
|
|
65622
|
+
__decorate([
|
|
65623
|
+
Mutation(() => MJEntityFormOverride_),
|
|
65624
|
+
__param(0, Arg('input', () => CreateMJEntityFormOverrideInput)),
|
|
65625
|
+
__param(1, Ctx()),
|
|
65626
|
+
__param(2, PubSub()),
|
|
65627
|
+
__metadata("design:type", Function),
|
|
65628
|
+
__metadata("design:paramtypes", [CreateMJEntityFormOverrideInput, Object, PubSubEngine]),
|
|
65629
|
+
__metadata("design:returntype", Promise)
|
|
65630
|
+
], MJEntityFormOverrideResolver.prototype, "CreateMJEntityFormOverride", null);
|
|
65631
|
+
__decorate([
|
|
65632
|
+
Mutation(() => MJEntityFormOverride_),
|
|
65633
|
+
__param(0, Arg('input', () => UpdateMJEntityFormOverrideInput)),
|
|
65634
|
+
__param(1, Ctx()),
|
|
65635
|
+
__param(2, PubSub()),
|
|
65636
|
+
__metadata("design:type", Function),
|
|
65637
|
+
__metadata("design:paramtypes", [UpdateMJEntityFormOverrideInput, Object, PubSubEngine]),
|
|
65638
|
+
__metadata("design:returntype", Promise)
|
|
65639
|
+
], MJEntityFormOverrideResolver.prototype, "UpdateMJEntityFormOverride", null);
|
|
65640
|
+
__decorate([
|
|
65641
|
+
Mutation(() => MJEntityFormOverride_),
|
|
65642
|
+
__param(0, Arg('ID', () => String)),
|
|
65643
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
65644
|
+
__param(2, Ctx()),
|
|
65645
|
+
__param(3, PubSub()),
|
|
65646
|
+
__metadata("design:type", Function),
|
|
65647
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
65648
|
+
__metadata("design:returntype", Promise)
|
|
65649
|
+
], MJEntityFormOverrideResolver.prototype, "DeleteMJEntityFormOverride", null);
|
|
65650
|
+
MJEntityFormOverrideResolver = __decorate([
|
|
65651
|
+
Resolver(MJEntityFormOverride_)
|
|
65652
|
+
], MJEntityFormOverrideResolver);
|
|
65653
|
+
export { MJEntityFormOverrideResolver };
|
|
65654
|
+
//****************************************************************************
|
|
65157
65655
|
// ENTITY CLASS for MJ: Entity Organic Key Related Entities
|
|
65158
65656
|
//****************************************************************************
|
|
65159
65657
|
let MJEntityOrganicKeyRelatedEntity_ = class MJEntityOrganicKeyRelatedEntity_ {
|
|
@@ -92793,6 +93291,10 @@ __decorate([
|
|
|
92793
93291
|
Field(() => [MJSearchScopePermission_]),
|
|
92794
93292
|
__metadata("design:type", Array)
|
|
92795
93293
|
], MJRole_.prototype, "MJSearchScopePermissions_RoleIDArray", void 0);
|
|
93294
|
+
__decorate([
|
|
93295
|
+
Field(() => [MJEntityFormOverride_]),
|
|
93296
|
+
__metadata("design:type", Array)
|
|
93297
|
+
], MJRole_.prototype, "MJEntityFormOverrides_RoleIDArray", void 0);
|
|
92796
93298
|
MJRole_ = __decorate([
|
|
92797
93299
|
ObjectType({ description: `Roles are used for security administration and can have zero to many Users as members` })
|
|
92798
93300
|
], MJRole_);
|
|
@@ -93022,6 +93524,14 @@ let MJRoleResolver = class MJRoleResolver extends ResolverBase {
|
|
|
93022
93524
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Search Scope Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
93023
93525
|
return result;
|
|
93024
93526
|
}
|
|
93527
|
+
async MJEntityFormOverrides_RoleIDArray(mjrole_, { userPayload, providers }, pubSub) {
|
|
93528
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
93529
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
93530
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('RoleID')}='${mjrole_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
93531
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
93532
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
93533
|
+
return result;
|
|
93534
|
+
}
|
|
93025
93535
|
async CreateMJRole(input, { providers, userPayload }, pubSub) {
|
|
93026
93536
|
const provider = GetReadWriteProvider(providers);
|
|
93027
93537
|
return this.CreateRecord('MJ: Roles', input, provider, userPayload, pubSub);
|
|
@@ -93179,6 +93689,15 @@ __decorate([
|
|
|
93179
93689
|
__metadata("design:paramtypes", [MJRole_, Object, PubSubEngine]),
|
|
93180
93690
|
__metadata("design:returntype", Promise)
|
|
93181
93691
|
], MJRoleResolver.prototype, "MJSearchScopePermissions_RoleIDArray", null);
|
|
93692
|
+
__decorate([
|
|
93693
|
+
FieldResolver(() => [MJEntityFormOverride_]),
|
|
93694
|
+
__param(0, Root()),
|
|
93695
|
+
__param(1, Ctx()),
|
|
93696
|
+
__param(2, PubSub()),
|
|
93697
|
+
__metadata("design:type", Function),
|
|
93698
|
+
__metadata("design:paramtypes", [MJRole_, Object, PubSubEngine]),
|
|
93699
|
+
__metadata("design:returntype", Promise)
|
|
93700
|
+
], MJRoleResolver.prototype, "MJEntityFormOverrides_RoleIDArray", null);
|
|
93182
93701
|
__decorate([
|
|
93183
93702
|
Mutation(() => MJRole_),
|
|
93184
93703
|
__param(0, Arg('input', () => CreateMJRoleInput)),
|
|
@@ -113058,6 +113577,10 @@ __decorate([
|
|
|
113058
113577
|
Field(() => [MJList_]),
|
|
113059
113578
|
__metadata("design:type", Array)
|
|
113060
113579
|
], MJUser_.prototype, "MJLists_LastRefreshedByUserIDArray", void 0);
|
|
113580
|
+
__decorate([
|
|
113581
|
+
Field(() => [MJEntityFormOverride_]),
|
|
113582
|
+
__metadata("design:type", Array)
|
|
113583
|
+
], MJUser_.prototype, "MJEntityFormOverrides_UserIDArray", void 0);
|
|
113061
113584
|
MJUser_ = __decorate([
|
|
113062
113585
|
ObjectType({ description: `A list of all users who have or had access to the system` })
|
|
113063
113586
|
], MJUser_);
|
|
@@ -114047,6 +114570,14 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
114047
114570
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Lists', rows, this.GetUserFromPayload(userPayload));
|
|
114048
114571
|
return result;
|
|
114049
114572
|
}
|
|
114573
|
+
async MJEntityFormOverrides_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
|
|
114574
|
+
this.CheckUserReadPermissions('MJ: Entity Form Overrides', userPayload);
|
|
114575
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
114576
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntityFormOverrides')} WHERE ${provider.QuoteIdentifier('UserID')}='${mjuser_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entity Form Overrides', userPayload, EntityPermissionType.Read, 'AND');
|
|
114577
|
+
const rows = await provider.ExecuteSQL(sSQL, undefined, undefined, this.GetUserFromPayload(userPayload));
|
|
114578
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Form Overrides', rows, this.GetUserFromPayload(userPayload));
|
|
114579
|
+
return result;
|
|
114580
|
+
}
|
|
114050
114581
|
async CreateMJUser(input, { providers, userPayload }, pubSub) {
|
|
114051
114582
|
const provider = GetReadWriteProvider(providers);
|
|
114052
114583
|
return this.CreateRecord('MJ: Users', input, provider, userPayload, pubSub);
|
|
@@ -114978,6 +115509,15 @@ __decorate([
|
|
|
114978
115509
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
114979
115510
|
__metadata("design:returntype", Promise)
|
|
114980
115511
|
], MJUserResolverBase.prototype, "MJLists_LastRefreshedByUserIDArray", null);
|
|
115512
|
+
__decorate([
|
|
115513
|
+
FieldResolver(() => [MJEntityFormOverride_]),
|
|
115514
|
+
__param(0, Root()),
|
|
115515
|
+
__param(1, Ctx()),
|
|
115516
|
+
__param(2, PubSub()),
|
|
115517
|
+
__metadata("design:type", Function),
|
|
115518
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
115519
|
+
__metadata("design:returntype", Promise)
|
|
115520
|
+
], MJUserResolverBase.prototype, "MJEntityFormOverrides_UserIDArray", null);
|
|
114981
115521
|
__decorate([
|
|
114982
115522
|
Mutation(() => MJUser_),
|
|
114983
115523
|
__param(0, Arg('input', () => CreateMJUserInput)),
|