@memberjunction/server 2.77.0 → 2.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/generated.d.ts +223 -180
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1378 -1158
- package/dist/generated/generated.js.map +1 -1
- package/package.json +34 -34
- package/src/generated/generated.ts +1013 -879
|
@@ -1344,12 +1344,12 @@ each time the agent processes a prompt step.`})
|
|
|
1344
1344
|
@MaxLength(200)
|
|
1345
1345
|
User?: string;
|
|
1346
1346
|
|
|
1347
|
-
@Field(() => [AIAgentRunStep_])
|
|
1348
|
-
MJ_AIAgentRunSteps_AgentRunIDArray: AIAgentRunStep_[]; // Link to MJ_AIAgentRunSteps
|
|
1349
|
-
|
|
1350
1347
|
@Field(() => [AIAgentRun_])
|
|
1351
1348
|
MJ_AIAgentRuns_ParentRunIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
1352
1349
|
|
|
1350
|
+
@Field(() => [AIAgentRunStep_])
|
|
1351
|
+
MJ_AIAgentRunSteps_AgentRunIDArray: AIAgentRunStep_[]; // Link to MJ_AIAgentRunSteps
|
|
1352
|
+
|
|
1353
1353
|
@Field(() => [AIPromptRun_])
|
|
1354
1354
|
MJ_AIPromptRuns_AgentRunIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
1355
1355
|
|
|
@@ -1603,25 +1603,25 @@ export class AIAgentRunResolver extends ResolverBase {
|
|
|
1603
1603
|
return result;
|
|
1604
1604
|
}
|
|
1605
1605
|
|
|
1606
|
-
@FieldResolver(() => [
|
|
1607
|
-
async
|
|
1608
|
-
this.CheckUserReadPermissions('MJ: AI Agent
|
|
1606
|
+
@FieldResolver(() => [AIAgentRun_])
|
|
1607
|
+
async MJ_AIAgentRuns_ParentRunIDArray(@Root() aiagentrun_: AIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1608
|
+
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
1609
1609
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1610
1610
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1611
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
1611
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRuns] WHERE [ParentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
1612
1612
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
1613
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent
|
|
1613
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Runs', rows);
|
|
1614
1614
|
return result;
|
|
1615
1615
|
}
|
|
1616
1616
|
|
|
1617
|
-
@FieldResolver(() => [
|
|
1618
|
-
async
|
|
1619
|
-
this.CheckUserReadPermissions('MJ: AI Agent
|
|
1617
|
+
@FieldResolver(() => [AIAgentRunStep_])
|
|
1618
|
+
async MJ_AIAgentRunSteps_AgentRunIDArray(@Root() aiagentrun_: AIAgentRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1619
|
+
this.CheckUserReadPermissions('MJ: AI Agent Run Steps', userPayload);
|
|
1620
1620
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1621
1621
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1622
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
1622
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRunSteps] WHERE [AgentRunID]='${aiagentrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Run Steps', userPayload, EntityPermissionType.Read, 'AND');
|
|
1623
1623
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
1624
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent
|
|
1624
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Run Steps', rows);
|
|
1625
1625
|
return result;
|
|
1626
1626
|
}
|
|
1627
1627
|
|
|
@@ -1695,9 +1695,6 @@ export class AIVendor_ {
|
|
|
1695
1695
|
@Field(() => [AIResultCache_])
|
|
1696
1696
|
AIResultCache_VendorIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
1697
1697
|
|
|
1698
|
-
@Field(() => [AIModelCost_])
|
|
1699
|
-
MJ_AIModelCosts_VendorIDArray: AIModelCost_[]; // Link to MJ_AIModelCosts
|
|
1700
|
-
|
|
1701
1698
|
@Field(() => [AIModelVendor_])
|
|
1702
1699
|
MJ_AIModelVendors_VendorIDArray: AIModelVendor_[]; // Link to MJ_AIModelVendors
|
|
1703
1700
|
|
|
@@ -1707,6 +1704,9 @@ export class AIVendor_ {
|
|
|
1707
1704
|
@Field(() => [AIVendorType_])
|
|
1708
1705
|
MJ_AIVendorTypes_VendorIDArray: AIVendorType_[]; // Link to MJ_AIVendorTypes
|
|
1709
1706
|
|
|
1707
|
+
@Field(() => [AIModelCost_])
|
|
1708
|
+
MJ_AIModelCosts_VendorIDArray: AIModelCost_[]; // Link to MJ_AIModelCosts
|
|
1709
|
+
|
|
1710
1710
|
}
|
|
1711
1711
|
|
|
1712
1712
|
//****************************************************************************
|
|
@@ -1823,17 +1823,6 @@ export class AIVendorResolver extends ResolverBase {
|
|
|
1823
1823
|
return result;
|
|
1824
1824
|
}
|
|
1825
1825
|
|
|
1826
|
-
@FieldResolver(() => [AIModelCost_])
|
|
1827
|
-
async MJ_AIModelCosts_VendorIDArray(@Root() aivendor_: AIVendor_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1828
|
-
this.CheckUserReadPermissions('MJ: AI Model Costs', userPayload);
|
|
1829
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1830
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1831
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelCosts] WHERE [VendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Costs', userPayload, EntityPermissionType.Read, 'AND');
|
|
1832
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
1833
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Costs', rows);
|
|
1834
|
-
return result;
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
1826
|
@FieldResolver(() => [AIModelVendor_])
|
|
1838
1827
|
async MJ_AIModelVendors_VendorIDArray(@Root() aivendor_: AIVendor_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1839
1828
|
this.CheckUserReadPermissions('MJ: AI Model Vendors', userPayload);
|
|
@@ -1867,6 +1856,17 @@ export class AIVendorResolver extends ResolverBase {
|
|
|
1867
1856
|
return result;
|
|
1868
1857
|
}
|
|
1869
1858
|
|
|
1859
|
+
@FieldResolver(() => [AIModelCost_])
|
|
1860
|
+
async MJ_AIModelCosts_VendorIDArray(@Root() aivendor_: AIVendor_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1861
|
+
this.CheckUserReadPermissions('MJ: AI Model Costs', userPayload);
|
|
1862
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1863
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
1864
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIModelCosts] WHERE [VendorID]='${aivendor_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Model Costs', userPayload, EntityPermissionType.Read, 'AND');
|
|
1865
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
1866
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Model Costs', rows);
|
|
1867
|
+
return result;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
1870
|
@Mutation(() => AIVendor_)
|
|
1871
1871
|
async CreateAIVendor(
|
|
1872
1872
|
@Arg('input', () => CreateAIVendorInput) input: CreateAIVendorInput,
|
|
@@ -1949,15 +1949,15 @@ export class AIConfiguration_ {
|
|
|
1949
1949
|
@Field(() => [AIAgentPrompt_])
|
|
1950
1950
|
MJ_AIAgentPrompts_ConfigurationIDArray: AIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
1951
1951
|
|
|
1952
|
+
@Field(() => [AIPromptRun_])
|
|
1953
|
+
MJ_AIPromptRuns_ConfigurationIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
1954
|
+
|
|
1952
1955
|
@Field(() => [AIPromptModel_])
|
|
1953
1956
|
MJ_AIPromptModels_ConfigurationIDArray: AIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
1954
1957
|
|
|
1955
1958
|
@Field(() => [AIResultCache_])
|
|
1956
1959
|
AIResultCache_ConfigurationIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
1957
1960
|
|
|
1958
|
-
@Field(() => [AIPromptRun_])
|
|
1959
|
-
MJ_AIPromptRuns_ConfigurationIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
1960
|
-
|
|
1961
1961
|
}
|
|
1962
1962
|
|
|
1963
1963
|
//****************************************************************************
|
|
@@ -2098,6 +2098,17 @@ export class AIConfigurationResolver extends ResolverBase {
|
|
|
2098
2098
|
return result;
|
|
2099
2099
|
}
|
|
2100
2100
|
|
|
2101
|
+
@FieldResolver(() => [AIPromptRun_])
|
|
2102
|
+
async MJ_AIPromptRuns_ConfigurationIDArray(@Root() aiconfiguration_: AIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2103
|
+
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
2104
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2105
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2106
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2107
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2108
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
|
|
2109
|
+
return result;
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2101
2112
|
@FieldResolver(() => [AIPromptModel_])
|
|
2102
2113
|
async MJ_AIPromptModels_ConfigurationIDArray(@Root() aiconfiguration_: AIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2103
2114
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
@@ -2120,17 +2131,6 @@ export class AIConfigurationResolver extends ResolverBase {
|
|
|
2120
2131
|
return result;
|
|
2121
2132
|
}
|
|
2122
2133
|
|
|
2123
|
-
@FieldResolver(() => [AIPromptRun_])
|
|
2124
|
-
async MJ_AIPromptRuns_ConfigurationIDArray(@Root() aiconfiguration_: AIConfiguration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2125
|
-
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
2126
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2127
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2128
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIPromptRuns] WHERE [ConfigurationID]='${aiconfiguration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Prompt Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
2129
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2130
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Prompt Runs', rows);
|
|
2131
|
-
return result;
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
2134
|
@Mutation(() => AIConfiguration_)
|
|
2135
2135
|
async CreateAIConfiguration(
|
|
2136
2136
|
@Arg('input', () => CreateAIConfigurationInput) input: CreateAIConfigurationInput,
|
|
@@ -2304,23 +2304,23 @@ if this limit is exceeded.`})
|
|
|
2304
2304
|
@MaxLength(200)
|
|
2305
2305
|
Type?: string;
|
|
2306
2306
|
|
|
2307
|
-
@Field(() => [AIAgentRequest_])
|
|
2308
|
-
AIAgentRequests_AgentIDArray: AIAgentRequest_[]; // Link to AIAgentRequests
|
|
2309
|
-
|
|
2310
|
-
@Field(() => [AIAgentLearningCycle_])
|
|
2311
|
-
AIAgentLearningCycles_AgentIDArray: AIAgentLearningCycle_[]; // Link to AIAgentLearningCycles
|
|
2312
|
-
|
|
2313
2307
|
@Field(() => [AIAgentModel_])
|
|
2314
2308
|
AIAgentModels_AgentIDArray: AIAgentModel_[]; // Link to AIAgentModels
|
|
2315
2309
|
|
|
2316
2310
|
@Field(() => [AIAgentAction_])
|
|
2317
2311
|
AIAgentActions_AgentIDArray: AIAgentAction_[]; // Link to AIAgentActions
|
|
2318
2312
|
|
|
2313
|
+
@Field(() => [AIAgentLearningCycle_])
|
|
2314
|
+
AIAgentLearningCycles_AgentIDArray: AIAgentLearningCycle_[]; // Link to AIAgentLearningCycles
|
|
2315
|
+
|
|
2316
|
+
@Field(() => [AIAgentRequest_])
|
|
2317
|
+
AIAgentRequests_AgentIDArray: AIAgentRequest_[]; // Link to AIAgentRequests
|
|
2318
|
+
|
|
2319
2319
|
@Field(() => [AIAgentStep_])
|
|
2320
2320
|
MJ_AIAgentSteps_AgentIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
2321
2321
|
|
|
2322
|
-
@Field(() => [
|
|
2323
|
-
|
|
2322
|
+
@Field(() => [AIAgentNote_])
|
|
2323
|
+
AIAgentNotes_AgentIDArray: AIAgentNote_[]; // Link to AIAgentNotes
|
|
2324
2324
|
|
|
2325
2325
|
@Field(() => [AIAgentPrompt_])
|
|
2326
2326
|
MJ_AIAgentPrompts_AgentIDArray: AIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
@@ -2328,8 +2328,8 @@ if this limit is exceeded.`})
|
|
|
2328
2328
|
@Field(() => [AIAgentRun_])
|
|
2329
2329
|
MJ_AIAgentRuns_AgentIDArray: AIAgentRun_[]; // Link to MJ_AIAgentRuns
|
|
2330
2330
|
|
|
2331
|
-
@Field(() => [
|
|
2332
|
-
|
|
2331
|
+
@Field(() => [AIAgentStep_])
|
|
2332
|
+
MJ_AIAgentSteps_SubAgentIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
2333
2333
|
|
|
2334
2334
|
@Field(() => [AIResultCache_])
|
|
2335
2335
|
AIResultCache_AgentIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
@@ -2614,47 +2614,47 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
2614
2614
|
return result;
|
|
2615
2615
|
}
|
|
2616
2616
|
|
|
2617
|
-
@FieldResolver(() => [
|
|
2618
|
-
async
|
|
2619
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2617
|
+
@FieldResolver(() => [AIAgentModel_])
|
|
2618
|
+
async AIAgentModels_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2619
|
+
this.CheckUserReadPermissions('AI Agent Models', userPayload);
|
|
2620
2620
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2621
2621
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2622
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2622
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
2623
2623
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2624
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2624
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', rows);
|
|
2625
2625
|
return result;
|
|
2626
2626
|
}
|
|
2627
2627
|
|
|
2628
|
-
@FieldResolver(() => [
|
|
2629
|
-
async
|
|
2630
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2628
|
+
@FieldResolver(() => [AIAgentAction_])
|
|
2629
|
+
async AIAgentActions_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2630
|
+
this.CheckUserReadPermissions('AI Agent Actions', userPayload);
|
|
2631
2631
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2632
2632
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2633
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2633
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentActions] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
2634
2634
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2635
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2635
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Actions', rows);
|
|
2636
2636
|
return result;
|
|
2637
2637
|
}
|
|
2638
2638
|
|
|
2639
|
-
@FieldResolver(() => [
|
|
2640
|
-
async
|
|
2641
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2639
|
+
@FieldResolver(() => [AIAgentLearningCycle_])
|
|
2640
|
+
async AIAgentLearningCycles_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2641
|
+
this.CheckUserReadPermissions('AI Agent Learning Cycles', userPayload);
|
|
2642
2642
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2643
2643
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2644
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2644
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentLearningCycles] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Learning Cycles', userPayload, EntityPermissionType.Read, 'AND');
|
|
2645
2645
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2646
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2646
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Learning Cycles', rows);
|
|
2647
2647
|
return result;
|
|
2648
2648
|
}
|
|
2649
2649
|
|
|
2650
|
-
@FieldResolver(() => [
|
|
2651
|
-
async
|
|
2652
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2650
|
+
@FieldResolver(() => [AIAgentRequest_])
|
|
2651
|
+
async AIAgentRequests_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2652
|
+
this.CheckUserReadPermissions('AI Agent Requests', userPayload);
|
|
2653
2653
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2654
2654
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2655
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2655
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentRequests] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Requests', userPayload, EntityPermissionType.Read, 'AND');
|
|
2656
2656
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2657
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2657
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Requests', rows);
|
|
2658
2658
|
return result;
|
|
2659
2659
|
}
|
|
2660
2660
|
|
|
@@ -2669,14 +2669,14 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
2669
2669
|
return result;
|
|
2670
2670
|
}
|
|
2671
2671
|
|
|
2672
|
-
@FieldResolver(() => [
|
|
2673
|
-
async
|
|
2674
|
-
this.CheckUserReadPermissions('
|
|
2672
|
+
@FieldResolver(() => [AIAgentNote_])
|
|
2673
|
+
async AIAgentNotes_AgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2674
|
+
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
2675
2675
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2676
2676
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2677
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2677
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [AgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
2678
2678
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2679
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
2679
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
|
|
2680
2680
|
return result;
|
|
2681
2681
|
}
|
|
2682
2682
|
|
|
@@ -2702,14 +2702,14 @@ export class AIAgentResolver extends ResolverBase {
|
|
|
2702
2702
|
return result;
|
|
2703
2703
|
}
|
|
2704
2704
|
|
|
2705
|
-
@FieldResolver(() => [
|
|
2706
|
-
async
|
|
2707
|
-
this.CheckUserReadPermissions('AI Agent
|
|
2705
|
+
@FieldResolver(() => [AIAgentStep_])
|
|
2706
|
+
async MJ_AIAgentSteps_SubAgentIDArray(@Root() aiagent_: AIAgent_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2707
|
+
this.CheckUserReadPermissions('MJ: AI Agent Steps', userPayload);
|
|
2708
2708
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2709
2709
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
2710
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
2710
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentSteps] WHERE [SubAgentID]='${aiagent_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Steps', userPayload, EntityPermissionType.Read, 'AND');
|
|
2711
2711
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
2712
|
-
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent
|
|
2712
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Steps', rows);
|
|
2713
2713
|
return result;
|
|
2714
2714
|
}
|
|
2715
2715
|
|
|
@@ -4598,27 +4598,27 @@ export class AIPrompt_ {
|
|
|
4598
4598
|
@Field(() => [AIResultCache_])
|
|
4599
4599
|
AIResultCache_AIPromptIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
4600
4600
|
|
|
4601
|
-
@Field(() => [AIAgentType_])
|
|
4602
|
-
MJ_AIAgentTypes_SystemPromptIDArray: AIAgentType_[]; // Link to MJ_AIAgentTypes
|
|
4603
|
-
|
|
4604
4601
|
@Field(() => [AIConfiguration_])
|
|
4605
4602
|
MJ_AIConfigurations_DefaultPromptForContextCompressionIDArray: AIConfiguration_[]; // Link to MJ_AIConfigurations
|
|
4606
4603
|
|
|
4604
|
+
@Field(() => [AIAgentType_])
|
|
4605
|
+
MJ_AIAgentTypes_SystemPromptIDArray: AIAgentType_[]; // Link to MJ_AIAgentTypes
|
|
4606
|
+
|
|
4607
4607
|
@Field(() => [AIConfiguration_])
|
|
4608
4608
|
MJ_AIConfigurations_DefaultPromptForContextSummarizationIDArray: AIConfiguration_[]; // Link to MJ_AIConfigurations
|
|
4609
4609
|
|
|
4610
4610
|
@Field(() => [AIPrompt_])
|
|
4611
4611
|
AIPrompts_ResultSelectorPromptIDArray: AIPrompt_[]; // Link to AIPrompts
|
|
4612
4612
|
|
|
4613
|
+
@Field(() => [AIAgentPrompt_])
|
|
4614
|
+
MJ_AIAgentPrompts_PromptIDArray: AIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
4615
|
+
|
|
4613
4616
|
@Field(() => [AIPromptModel_])
|
|
4614
4617
|
MJ_AIPromptModels_PromptIDArray: AIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
4615
4618
|
|
|
4616
4619
|
@Field(() => [AIAgentStep_])
|
|
4617
4620
|
MJ_AIAgentSteps_PromptIDArray: AIAgentStep_[]; // Link to MJ_AIAgentSteps
|
|
4618
4621
|
|
|
4619
|
-
@Field(() => [AIAgentPrompt_])
|
|
4620
|
-
MJ_AIAgentPrompts_PromptIDArray: AIAgentPrompt_[]; // Link to MJ_AIAgentPrompts
|
|
4621
|
-
|
|
4622
4622
|
@Field(() => [AIPromptRun_])
|
|
4623
4623
|
MJ_AIPromptRuns_PromptIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
4624
4624
|
|
|
@@ -5000,25 +5000,25 @@ export class AIPromptResolver extends ResolverBase {
|
|
|
5000
5000
|
return result;
|
|
5001
5001
|
}
|
|
5002
5002
|
|
|
5003
|
-
@FieldResolver(() => [
|
|
5004
|
-
async
|
|
5005
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
5003
|
+
@FieldResolver(() => [AIConfiguration_])
|
|
5004
|
+
async MJ_AIConfigurations_DefaultPromptForContextCompressionIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5005
|
+
this.CheckUserReadPermissions('MJ: AI Configurations', userPayload);
|
|
5006
5006
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5007
5007
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5008
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
5008
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIConfigurations] WHERE [DefaultPromptForContextCompressionID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Configurations', userPayload, EntityPermissionType.Read, 'AND');
|
|
5009
5009
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5010
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
5010
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Configurations', rows);
|
|
5011
5011
|
return result;
|
|
5012
5012
|
}
|
|
5013
5013
|
|
|
5014
|
-
@FieldResolver(() => [
|
|
5015
|
-
async
|
|
5016
|
-
this.CheckUserReadPermissions('MJ: AI
|
|
5014
|
+
@FieldResolver(() => [AIAgentType_])
|
|
5015
|
+
async MJ_AIAgentTypes_SystemPromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5016
|
+
this.CheckUserReadPermissions('MJ: AI Agent Types', userPayload);
|
|
5017
5017
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5018
5018
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5019
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
5019
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentTypes] WHERE [SystemPromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
5020
5020
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5021
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI
|
|
5021
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Types', rows);
|
|
5022
5022
|
return result;
|
|
5023
5023
|
}
|
|
5024
5024
|
|
|
@@ -5044,6 +5044,17 @@ export class AIPromptResolver extends ResolverBase {
|
|
|
5044
5044
|
return result;
|
|
5045
5045
|
}
|
|
5046
5046
|
|
|
5047
|
+
@FieldResolver(() => [AIAgentPrompt_])
|
|
5048
|
+
async MJ_AIAgentPrompts_PromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5049
|
+
this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
|
|
5050
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5051
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5052
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
|
|
5053
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5054
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
|
|
5055
|
+
return result;
|
|
5056
|
+
}
|
|
5057
|
+
|
|
5047
5058
|
@FieldResolver(() => [AIPromptModel_])
|
|
5048
5059
|
async MJ_AIPromptModels_PromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5049
5060
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
@@ -5066,17 +5077,6 @@ export class AIPromptResolver extends ResolverBase {
|
|
|
5066
5077
|
return result;
|
|
5067
5078
|
}
|
|
5068
5079
|
|
|
5069
|
-
@FieldResolver(() => [AIAgentPrompt_])
|
|
5070
|
-
async MJ_AIAgentPrompts_PromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5071
|
-
this.CheckUserReadPermissions('MJ: AI Agent Prompts', userPayload);
|
|
5072
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5073
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5074
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentPrompts] WHERE [PromptID]='${aiprompt_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Prompts', userPayload, EntityPermissionType.Read, 'AND');
|
|
5075
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5076
|
-
const result = this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Prompts', rows);
|
|
5077
|
-
return result;
|
|
5078
|
-
}
|
|
5079
|
-
|
|
5080
5080
|
@FieldResolver(() => [AIPromptRun_])
|
|
5081
5081
|
async MJ_AIPromptRuns_PromptIDArray(@Root() aiprompt_: AIPrompt_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5082
5082
|
this.CheckUserReadPermissions('MJ: AI Prompt Runs', userPayload);
|
|
@@ -5780,14 +5780,14 @@ export class Company_ {
|
|
|
5780
5780
|
@MaxLength(10)
|
|
5781
5781
|
_mj__UpdatedAt: Date;
|
|
5782
5782
|
|
|
5783
|
-
@Field(() => [
|
|
5784
|
-
|
|
5783
|
+
@Field(() => [Employee_])
|
|
5784
|
+
Employees_CompanyIDArray: Employee_[]; // Link to Employees
|
|
5785
5785
|
|
|
5786
5786
|
@Field(() => [CompanyIntegration_])
|
|
5787
5787
|
CompanyIntegrations_CompanyNameArray: CompanyIntegration_[]; // Link to CompanyIntegrations
|
|
5788
5788
|
|
|
5789
|
-
@Field(() => [
|
|
5790
|
-
|
|
5789
|
+
@Field(() => [Workflow_])
|
|
5790
|
+
Workflows_CompanyNameArray: Workflow_[]; // Link to Workflows
|
|
5791
5791
|
|
|
5792
5792
|
}
|
|
5793
5793
|
|
|
@@ -5912,14 +5912,14 @@ export class CompanyResolver extends ResolverBase {
|
|
|
5912
5912
|
return result;
|
|
5913
5913
|
}
|
|
5914
5914
|
|
|
5915
|
-
@FieldResolver(() => [
|
|
5916
|
-
async
|
|
5917
|
-
this.CheckUserReadPermissions('
|
|
5915
|
+
@FieldResolver(() => [Employee_])
|
|
5916
|
+
async Employees_CompanyIDArray(@Root() company_: Company_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5917
|
+
this.CheckUserReadPermissions('Employees', userPayload);
|
|
5918
5918
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5919
5919
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5920
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
5920
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployees] WHERE [CompanyID]='${company_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employees', userPayload, EntityPermissionType.Read, 'AND');
|
|
5921
5921
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5922
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
5922
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employees', rows);
|
|
5923
5923
|
return result;
|
|
5924
5924
|
}
|
|
5925
5925
|
|
|
@@ -5934,14 +5934,14 @@ export class CompanyResolver extends ResolverBase {
|
|
|
5934
5934
|
return result;
|
|
5935
5935
|
}
|
|
5936
5936
|
|
|
5937
|
-
@FieldResolver(() => [
|
|
5938
|
-
async
|
|
5939
|
-
this.CheckUserReadPermissions('
|
|
5937
|
+
@FieldResolver(() => [Workflow_])
|
|
5938
|
+
async Workflows_CompanyNameArray(@Root() company_: Company_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5939
|
+
this.CheckUserReadPermissions('Workflows', userPayload);
|
|
5940
5940
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5941
5941
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
5942
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
5942
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwWorkflows] WHERE [CompanyName]='${company_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Workflows', userPayload, EntityPermissionType.Read, 'AND');
|
|
5943
5943
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
5944
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
5944
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Workflows', rows);
|
|
5945
5945
|
return result;
|
|
5946
5946
|
}
|
|
5947
5947
|
|
|
@@ -6046,21 +6046,21 @@ export class Employee_ {
|
|
|
6046
6046
|
@MaxLength(200)
|
|
6047
6047
|
SupervisorEmail?: string;
|
|
6048
6048
|
|
|
6049
|
-
@Field(() => [
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
@Field(() => [EmployeeSkill_])
|
|
6053
|
-
EmployeeSkills_EmployeeIDArray: EmployeeSkill_[]; // Link to EmployeeSkills
|
|
6049
|
+
@Field(() => [Employee_])
|
|
6050
|
+
Employees_SupervisorIDArray: Employee_[]; // Link to Employees
|
|
6054
6051
|
|
|
6055
6052
|
@Field(() => [EmployeeCompanyIntegration_])
|
|
6056
6053
|
EmployeeCompanyIntegrations_EmployeeIDArray: EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
6057
6054
|
|
|
6058
|
-
@Field(() => [Employee_])
|
|
6059
|
-
Employees_SupervisorIDArray: Employee_[]; // Link to Employees
|
|
6060
|
-
|
|
6061
6055
|
@Field(() => [EmployeeRole_])
|
|
6062
6056
|
EmployeeRoles_EmployeeIDArray: EmployeeRole_[]; // Link to EmployeeRoles
|
|
6063
6057
|
|
|
6058
|
+
@Field(() => [EmployeeSkill_])
|
|
6059
|
+
EmployeeSkills_EmployeeIDArray: EmployeeSkill_[]; // Link to EmployeeSkills
|
|
6060
|
+
|
|
6061
|
+
@Field(() => [User_])
|
|
6062
|
+
Users_EmployeeIDArray: User_[]; // Link to Users
|
|
6063
|
+
|
|
6064
6064
|
}
|
|
6065
6065
|
|
|
6066
6066
|
//****************************************************************************
|
|
@@ -6202,58 +6202,58 @@ export class EmployeeResolver extends ResolverBase {
|
|
|
6202
6202
|
return result;
|
|
6203
6203
|
}
|
|
6204
6204
|
|
|
6205
|
-
@FieldResolver(() => [
|
|
6206
|
-
async
|
|
6207
|
-
this.CheckUserReadPermissions('
|
|
6205
|
+
@FieldResolver(() => [Employee_])
|
|
6206
|
+
async Employees_SupervisorIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6207
|
+
this.CheckUserReadPermissions('Employees', userPayload);
|
|
6208
6208
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6209
6209
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6210
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6210
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployees] WHERE [SupervisorID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employees', userPayload, EntityPermissionType.Read, 'AND');
|
|
6211
6211
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6212
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6212
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employees', rows);
|
|
6213
6213
|
return result;
|
|
6214
6214
|
}
|
|
6215
6215
|
|
|
6216
|
-
@FieldResolver(() => [
|
|
6217
|
-
async
|
|
6218
|
-
this.CheckUserReadPermissions('Employee
|
|
6216
|
+
@FieldResolver(() => [EmployeeCompanyIntegration_])
|
|
6217
|
+
async EmployeeCompanyIntegrations_EmployeeIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6218
|
+
this.CheckUserReadPermissions('Employee Company Integrations', userPayload);
|
|
6219
6219
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6220
6220
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6221
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6221
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeCompanyIntegrations] WHERE [EmployeeID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
6222
6222
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6223
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Employee
|
|
6223
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Company Integrations', rows);
|
|
6224
6224
|
return result;
|
|
6225
6225
|
}
|
|
6226
6226
|
|
|
6227
|
-
@FieldResolver(() => [
|
|
6228
|
-
async
|
|
6229
|
-
this.CheckUserReadPermissions('Employee
|
|
6227
|
+
@FieldResolver(() => [EmployeeRole_])
|
|
6228
|
+
async EmployeeRoles_EmployeeIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6229
|
+
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
6230
6230
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6231
6231
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6232
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6232
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeRoles] WHERE [EmployeeID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
6233
6233
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6234
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Employee
|
|
6234
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Roles', rows);
|
|
6235
6235
|
return result;
|
|
6236
6236
|
}
|
|
6237
6237
|
|
|
6238
|
-
@FieldResolver(() => [
|
|
6239
|
-
async
|
|
6240
|
-
this.CheckUserReadPermissions('
|
|
6238
|
+
@FieldResolver(() => [EmployeeSkill_])
|
|
6239
|
+
async EmployeeSkills_EmployeeIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6240
|
+
this.CheckUserReadPermissions('Employee Skills', userPayload);
|
|
6241
6241
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6242
6242
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6243
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6243
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeSkills] WHERE [EmployeeID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Skills', userPayload, EntityPermissionType.Read, 'AND');
|
|
6244
6244
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6245
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6245
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Skills', rows);
|
|
6246
6246
|
return result;
|
|
6247
6247
|
}
|
|
6248
6248
|
|
|
6249
|
-
@FieldResolver(() => [
|
|
6250
|
-
async
|
|
6251
|
-
this.CheckUserReadPermissions('
|
|
6249
|
+
@FieldResolver(() => [User_])
|
|
6250
|
+
async Users_EmployeeIDArray(@Root() employee_: Employee_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
6251
|
+
this.CheckUserReadPermissions('Users', userPayload);
|
|
6252
6252
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6253
6253
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
6254
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
6254
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUsers] WHERE [EmployeeID]='${employee_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Users', userPayload, EntityPermissionType.Read, 'AND');
|
|
6255
6255
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
6256
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
6256
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Users', rows);
|
|
6257
6257
|
return result;
|
|
6258
6258
|
}
|
|
6259
6259
|
|
|
@@ -6963,21 +6963,21 @@ export class Role_ {
|
|
|
6963
6963
|
@MaxLength(10)
|
|
6964
6964
|
_mj__UpdatedAt: Date;
|
|
6965
6965
|
|
|
6966
|
+
@Field(() => [EmployeeRole_])
|
|
6967
|
+
EmployeeRoles_RoleIDArray: EmployeeRole_[]; // Link to EmployeeRoles
|
|
6968
|
+
|
|
6969
|
+
@Field(() => [EntityPermission_])
|
|
6970
|
+
EntityPermissions_RoleNameArray: EntityPermission_[]; // Link to EntityPermissions
|
|
6971
|
+
|
|
6966
6972
|
@Field(() => [UserRole_])
|
|
6967
6973
|
UserRoles_RoleNameArray: UserRole_[]; // Link to UserRoles
|
|
6968
6974
|
|
|
6969
6975
|
@Field(() => [AuthorizationRole_])
|
|
6970
6976
|
AuthorizationRoles_RoleNameArray: AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
6971
6977
|
|
|
6972
|
-
@Field(() => [EntityPermission_])
|
|
6973
|
-
EntityPermissions_RoleNameArray: EntityPermission_[]; // Link to EntityPermissions
|
|
6974
|
-
|
|
6975
6978
|
@Field(() => [QueryPermission_])
|
|
6976
6979
|
QueryPermissions_RoleNameArray: QueryPermission_[]; // Link to QueryPermissions
|
|
6977
6980
|
|
|
6978
|
-
@Field(() => [EmployeeRole_])
|
|
6979
|
-
EmployeeRoles_RoleIDArray: EmployeeRole_[]; // Link to EmployeeRoles
|
|
6980
|
-
|
|
6981
6981
|
@Field(() => [ResourcePermission_])
|
|
6982
6982
|
ResourcePermissions_RoleIDArray: ResourcePermission_[]; // Link to ResourcePermissions
|
|
6983
6983
|
|
|
@@ -7098,6 +7098,28 @@ export class RoleResolver extends ResolverBase {
|
|
|
7098
7098
|
return result;
|
|
7099
7099
|
}
|
|
7100
7100
|
|
|
7101
|
+
@FieldResolver(() => [EmployeeRole_])
|
|
7102
|
+
async EmployeeRoles_RoleIDArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7103
|
+
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
7104
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7105
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
7106
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeRoles] WHERE [RoleID]='${role_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
7107
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
7108
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Roles', rows);
|
|
7109
|
+
return result;
|
|
7110
|
+
}
|
|
7111
|
+
|
|
7112
|
+
@FieldResolver(() => [EntityPermission_])
|
|
7113
|
+
async EntityPermissions_RoleNameArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7114
|
+
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
7115
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7116
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
7117
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityPermissions] WHERE [RoleName]='${role_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
7118
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
7119
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Permissions', rows);
|
|
7120
|
+
return result;
|
|
7121
|
+
}
|
|
7122
|
+
|
|
7101
7123
|
@FieldResolver(() => [UserRole_])
|
|
7102
7124
|
async UserRoles_RoleNameArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7103
7125
|
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
@@ -7120,17 +7142,6 @@ export class RoleResolver extends ResolverBase {
|
|
|
7120
7142
|
return result;
|
|
7121
7143
|
}
|
|
7122
7144
|
|
|
7123
|
-
@FieldResolver(() => [EntityPermission_])
|
|
7124
|
-
async EntityPermissions_RoleNameArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7125
|
-
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
7126
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7127
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
7128
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityPermissions] WHERE [RoleName]='${role_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
7129
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
7130
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity Permissions', rows);
|
|
7131
|
-
return result;
|
|
7132
|
-
}
|
|
7133
|
-
|
|
7134
7145
|
@FieldResolver(() => [QueryPermission_])
|
|
7135
7146
|
async QueryPermissions_RoleNameArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7136
7147
|
this.CheckUserReadPermissions('Query Permissions', userPayload);
|
|
@@ -7142,17 +7153,6 @@ export class RoleResolver extends ResolverBase {
|
|
|
7142
7153
|
return result;
|
|
7143
7154
|
}
|
|
7144
7155
|
|
|
7145
|
-
@FieldResolver(() => [EmployeeRole_])
|
|
7146
|
-
async EmployeeRoles_RoleIDArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7147
|
-
this.CheckUserReadPermissions('Employee Roles', userPayload);
|
|
7148
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7149
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
7150
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeRoles] WHERE [RoleID]='${role_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
7151
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
7152
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Employee Roles', rows);
|
|
7153
|
-
return result;
|
|
7154
|
-
}
|
|
7155
|
-
|
|
7156
7156
|
@FieldResolver(() => [ResourcePermission_])
|
|
7157
7157
|
async ResourcePermissions_RoleIDArray(@Root() role_: Role_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
7158
7158
|
this.CheckUserReadPermissions('Resource Permissions', userPayload);
|
|
@@ -7918,17 +7918,17 @@ export class CompanyIntegration_ {
|
|
|
7918
7918
|
@MaxLength(8)
|
|
7919
7919
|
LastRunEndedAt?: Date;
|
|
7920
7920
|
|
|
7921
|
-
@Field(() => [CompanyIntegrationRecordMap_])
|
|
7922
|
-
CompanyIntegrationRecordMaps_CompanyIntegrationIDArray: CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
7923
|
-
|
|
7924
7921
|
@Field(() => [List_])
|
|
7925
7922
|
Lists_CompanyIntegrationIDArray: List_[]; // Link to Lists
|
|
7926
7923
|
|
|
7924
|
+
@Field(() => [EmployeeCompanyIntegration_])
|
|
7925
|
+
EmployeeCompanyIntegrations_CompanyIntegrationIDArray: EmployeeCompanyIntegration_[]; // Link to EmployeeCompanyIntegrations
|
|
7926
|
+
|
|
7927
7927
|
@Field(() => [CompanyIntegrationRun_])
|
|
7928
7928
|
CompanyIntegrationRuns_CompanyIntegrationIDArray: CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
7929
7929
|
|
|
7930
|
-
@Field(() => [
|
|
7931
|
-
|
|
7930
|
+
@Field(() => [CompanyIntegrationRecordMap_])
|
|
7931
|
+
CompanyIntegrationRecordMaps_CompanyIntegrationIDArray: CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
7932
7932
|
|
|
7933
7933
|
}
|
|
7934
7934
|
|
|
@@ -8090,25 +8090,25 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
8090
8090
|
return result;
|
|
8091
8091
|
}
|
|
8092
8092
|
|
|
8093
|
-
@FieldResolver(() => [
|
|
8094
|
-
async
|
|
8095
|
-
this.CheckUserReadPermissions('
|
|
8093
|
+
@FieldResolver(() => [List_])
|
|
8094
|
+
async Lists_CompanyIntegrationIDArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8095
|
+
this.CheckUserReadPermissions('Lists', userPayload);
|
|
8096
8096
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8097
8097
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
8098
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
8098
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwLists] WHERE [CompanyIntegrationID]='${companyintegration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
8099
8099
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
8100
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
8100
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Lists', rows);
|
|
8101
8101
|
return result;
|
|
8102
8102
|
}
|
|
8103
8103
|
|
|
8104
|
-
@FieldResolver(() => [
|
|
8105
|
-
async
|
|
8106
|
-
this.CheckUserReadPermissions('
|
|
8104
|
+
@FieldResolver(() => [EmployeeCompanyIntegration_])
|
|
8105
|
+
async EmployeeCompanyIntegrations_CompanyIntegrationIDArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8106
|
+
this.CheckUserReadPermissions('Employee Company Integrations', userPayload);
|
|
8107
8107
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8108
8108
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
8109
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
8109
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEmployeeCompanyIntegrations] WHERE [CompanyIntegrationID]='${companyintegration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Employee Company Integrations', userPayload, EntityPermissionType.Read, 'AND');
|
|
8110
8110
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
8111
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
8111
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Employee Company Integrations', rows);
|
|
8112
8112
|
return result;
|
|
8113
8113
|
}
|
|
8114
8114
|
|
|
@@ -8123,14 +8123,14 @@ export class CompanyIntegrationResolver extends ResolverBase {
|
|
|
8123
8123
|
return result;
|
|
8124
8124
|
}
|
|
8125
8125
|
|
|
8126
|
-
@FieldResolver(() => [
|
|
8127
|
-
async
|
|
8128
|
-
this.CheckUserReadPermissions('
|
|
8126
|
+
@FieldResolver(() => [CompanyIntegrationRecordMap_])
|
|
8127
|
+
async CompanyIntegrationRecordMaps_CompanyIntegrationIDArray(@Root() companyintegration_: CompanyIntegration_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8128
|
+
this.CheckUserReadPermissions('Company Integration Record Maps', userPayload);
|
|
8129
8129
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8130
8130
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
8131
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
8131
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRecordMaps] WHERE [CompanyIntegrationID]='${companyintegration_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Company Integration Record Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
8132
8132
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
8133
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
8133
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Record Maps', rows);
|
|
8134
8134
|
return result;
|
|
8135
8135
|
}
|
|
8136
8136
|
|
|
@@ -8906,111 +8906,111 @@ export class Entity_ {
|
|
|
8906
8906
|
@MaxLength(510)
|
|
8907
8907
|
ParentBaseView?: string;
|
|
8908
8908
|
|
|
8909
|
-
@Field(() => [
|
|
8910
|
-
|
|
8909
|
+
@Field(() => [EntityPermission_])
|
|
8910
|
+
EntityPermissions_EntityIDArray: EntityPermission_[]; // Link to EntityPermissions
|
|
8911
8911
|
|
|
8912
|
-
@Field(() => [
|
|
8913
|
-
|
|
8912
|
+
@Field(() => [EntityRelationship_])
|
|
8913
|
+
EntityRelationships_EntityIDArray: EntityRelationship_[]; // Link to EntityRelationships
|
|
8914
8914
|
|
|
8915
|
-
@Field(() => [
|
|
8916
|
-
|
|
8915
|
+
@Field(() => [EntityField_])
|
|
8916
|
+
EntityFields_EntityIDArray: EntityField_[]; // Link to EntityFields
|
|
8917
8917
|
|
|
8918
|
-
@Field(() => [
|
|
8919
|
-
|
|
8918
|
+
@Field(() => [EntityAIAction_])
|
|
8919
|
+
EntityAIActions_EntityIDArray: EntityAIAction_[]; // Link to EntityAIActions
|
|
8920
8920
|
|
|
8921
|
-
@Field(() => [
|
|
8922
|
-
|
|
8921
|
+
@Field(() => [UserRecordLog_])
|
|
8922
|
+
UserRecordLogs_EntityIDArray: UserRecordLog_[]; // Link to UserRecordLogs
|
|
8923
|
+
|
|
8924
|
+
@Field(() => [IntegrationURLFormat_])
|
|
8925
|
+
IntegrationURLFormats_EntityIDArray: IntegrationURLFormat_[]; // Link to IntegrationURLFormats
|
|
8923
8926
|
|
|
8924
8927
|
@Field(() => [Entity_])
|
|
8925
8928
|
Entities_ParentIDArray: Entity_[]; // Link to Entities
|
|
8926
8929
|
|
|
8927
|
-
@Field(() => [
|
|
8928
|
-
|
|
8930
|
+
@Field(() => [UserFavorite_])
|
|
8931
|
+
UserFavorites_EntityIDArray: UserFavorite_[]; // Link to UserFavorites
|
|
8929
8932
|
|
|
8930
|
-
@Field(() => [
|
|
8931
|
-
|
|
8933
|
+
@Field(() => [CompanyIntegrationRunDetail_])
|
|
8934
|
+
CompanyIntegrationRunDetails_EntityIDArray: CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
8932
8935
|
|
|
8933
|
-
@Field(() => [
|
|
8934
|
-
|
|
8936
|
+
@Field(() => [ApplicationEntity_])
|
|
8937
|
+
ApplicationEntities_EntityIDArray: ApplicationEntity_[]; // Link to ApplicationEntities
|
|
8935
8938
|
|
|
8936
|
-
@Field(() => [
|
|
8937
|
-
|
|
8939
|
+
@Field(() => [UserApplicationEntity_])
|
|
8940
|
+
UserApplicationEntities_EntityIDArray: UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
8938
8941
|
|
|
8939
|
-
@Field(() => [
|
|
8940
|
-
|
|
8942
|
+
@Field(() => [List_])
|
|
8943
|
+
Lists_EntityIDArray: List_[]; // Link to Lists
|
|
8944
|
+
|
|
8945
|
+
@Field(() => [UserView_])
|
|
8946
|
+
UserViews_EntityIDArray: UserView_[]; // Link to UserViews
|
|
8947
|
+
|
|
8948
|
+
@Field(() => [RecordChange_])
|
|
8949
|
+
RecordChanges_EntityIDArray: RecordChange_[]; // Link to RecordChanges
|
|
8950
|
+
|
|
8951
|
+
@Field(() => [AuditLog_])
|
|
8952
|
+
AuditLogs_EntityIDArray: AuditLog_[]; // Link to AuditLogs
|
|
8953
|
+
|
|
8954
|
+
@Field(() => [ResourceType_])
|
|
8955
|
+
ResourceTypes_EntityIDArray: ResourceType_[]; // Link to ResourceTypes
|
|
8941
8956
|
|
|
8942
8957
|
@Field(() => [TaggedItem_])
|
|
8943
8958
|
TaggedItems_EntityIDArray: TaggedItem_[]; // Link to TaggedItems
|
|
8944
8959
|
|
|
8960
|
+
@Field(() => [DatasetItem_])
|
|
8961
|
+
DatasetItems_EntityIDArray: DatasetItem_[]; // Link to DatasetItems
|
|
8962
|
+
|
|
8963
|
+
@Field(() => [CompanyIntegrationRecordMap_])
|
|
8964
|
+
CompanyIntegrationRecordMaps_EntityIDArray: CompanyIntegrationRecordMap_[]; // Link to CompanyIntegrationRecordMaps
|
|
8965
|
+
|
|
8945
8966
|
@Field(() => [RecordMergeLog_])
|
|
8946
8967
|
RecordMergeLogs_EntityIDArray: RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
8947
8968
|
|
|
8948
|
-
@Field(() => [UserApplicationEntity_])
|
|
8949
|
-
UserApplicationEntities_EntityIDArray: UserApplicationEntity_[]; // Link to UserApplicationEntities
|
|
8950
|
-
|
|
8951
8969
|
@Field(() => [QueryField_])
|
|
8952
8970
|
QueryFields_SourceEntityIDArray: QueryField_[]; // Link to QueryFields
|
|
8953
8971
|
|
|
8954
|
-
@Field(() => [
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
@Field(() => [RecommendationItem_])
|
|
8958
|
-
RecommendationItems_DestinationEntityIDArray: RecommendationItem_[]; // Link to RecommendationItems
|
|
8959
|
-
|
|
8960
|
-
@Field(() => [EntityPermission_])
|
|
8961
|
-
EntityPermissions_EntityIDArray: EntityPermission_[]; // Link to EntityPermissions
|
|
8962
|
-
|
|
8963
|
-
@Field(() => [List_])
|
|
8964
|
-
Lists_EntityIDArray: List_[]; // Link to Lists
|
|
8965
|
-
|
|
8966
|
-
@Field(() => [UserRecordLog_])
|
|
8967
|
-
UserRecordLogs_EntityIDArray: UserRecordLog_[]; // Link to UserRecordLogs
|
|
8972
|
+
@Field(() => [Conversation_])
|
|
8973
|
+
Conversations_LinkedEntityIDArray: Conversation_[]; // Link to Conversations
|
|
8968
8974
|
|
|
8969
8975
|
@Field(() => [EntityDocument_])
|
|
8970
8976
|
EntityDocuments_EntityIDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
8971
8977
|
|
|
8972
|
-
@Field(() => [
|
|
8973
|
-
|
|
8978
|
+
@Field(() => [DataContextItem_])
|
|
8979
|
+
DataContextItems_EntityIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
8980
|
+
|
|
8981
|
+
@Field(() => [User_])
|
|
8982
|
+
Users_LinkedEntityIDArray: User_[]; // Link to Users
|
|
8983
|
+
|
|
8984
|
+
@Field(() => [EntityRecordDocument_])
|
|
8985
|
+
EntityRecordDocuments_EntityIDArray: EntityRecordDocument_[]; // Link to EntityRecordDocuments
|
|
8974
8986
|
|
|
8975
8987
|
@Field(() => [FileEntityRecordLink_])
|
|
8976
8988
|
FileEntityRecordLinks_EntityIDArray: FileEntityRecordLink_[]; // Link to FileEntityRecordLinks
|
|
8977
8989
|
|
|
8990
|
+
@Field(() => [UserViewCategory_])
|
|
8991
|
+
UserViewCategories_EntityIDArray: UserViewCategory_[]; // Link to UserViewCategories
|
|
8992
|
+
|
|
8978
8993
|
@Field(() => [EntitySetting_])
|
|
8979
8994
|
EntitySettings_EntityIDArray: EntitySetting_[]; // Link to EntitySettings
|
|
8980
8995
|
|
|
8981
|
-
@Field(() => [
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
@Field(() => [CompanyIntegrationRunDetail_])
|
|
8985
|
-
CompanyIntegrationRunDetails_EntityIDArray: CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
8996
|
+
@Field(() => [DuplicateRun_])
|
|
8997
|
+
DuplicateRuns_EntityIDArray: DuplicateRun_[]; // Link to DuplicateRuns
|
|
8986
8998
|
|
|
8987
|
-
@Field(() => [
|
|
8988
|
-
|
|
8999
|
+
@Field(() => [EntityAction_])
|
|
9000
|
+
EntityActions_EntityIDArray: EntityAction_[]; // Link to EntityActions
|
|
8989
9001
|
|
|
8990
|
-
@Field(() => [
|
|
8991
|
-
|
|
9002
|
+
@Field(() => [TemplateParam_])
|
|
9003
|
+
TemplateParams_EntityIDArray: TemplateParam_[]; // Link to TemplateParams
|
|
8992
9004
|
|
|
8993
|
-
@Field(() => [
|
|
8994
|
-
|
|
9005
|
+
@Field(() => [Recommendation_])
|
|
9006
|
+
Recommendations_SourceEntityIDArray: Recommendation_[]; // Link to Recommendations
|
|
8995
9007
|
|
|
8996
|
-
@Field(() => [
|
|
8997
|
-
|
|
9008
|
+
@Field(() => [RecommendationItem_])
|
|
9009
|
+
RecommendationItems_DestinationEntityIDArray: RecommendationItem_[]; // Link to RecommendationItems
|
|
8998
9010
|
|
|
8999
9011
|
@Field(() => [EntityCommunicationMessageType_])
|
|
9000
9012
|
EntityCommunicationMessageTypes_EntityIDArray: EntityCommunicationMessageType_[]; // Link to EntityCommunicationMessageTypes
|
|
9001
9013
|
|
|
9002
|
-
@Field(() => [EntityRecordDocument_])
|
|
9003
|
-
EntityRecordDocuments_EntityIDArray: EntityRecordDocument_[]; // Link to EntityRecordDocuments
|
|
9004
|
-
|
|
9005
|
-
@Field(() => [RecordChange_])
|
|
9006
|
-
RecordChanges_EntityIDArray: RecordChange_[]; // Link to RecordChanges
|
|
9007
|
-
|
|
9008
|
-
@Field(() => [ApplicationEntity_])
|
|
9009
|
-
ApplicationEntities_EntityIDArray: ApplicationEntity_[]; // Link to ApplicationEntities
|
|
9010
|
-
|
|
9011
|
-
@Field(() => [ResourceType_])
|
|
9012
|
-
ResourceTypes_EntityIDArray: ResourceType_[]; // Link to ResourceTypes
|
|
9013
|
-
|
|
9014
9014
|
@Field(() => [QueryEntity_])
|
|
9015
9015
|
QueryEntities_EntityIDArray: QueryEntity_[]; // Link to QueryEntities
|
|
9016
9016
|
|
|
@@ -9416,388 +9416,388 @@ export class EntityResolverBase extends ResolverBase {
|
|
|
9416
9416
|
return result;
|
|
9417
9417
|
}
|
|
9418
9418
|
|
|
9419
|
-
@FieldResolver(() => [
|
|
9420
|
-
async
|
|
9421
|
-
this.CheckUserReadPermissions('
|
|
9419
|
+
@FieldResolver(() => [EntityPermission_])
|
|
9420
|
+
async EntityPermissions_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9421
|
+
this.CheckUserReadPermissions('Entity Permissions', userPayload);
|
|
9422
9422
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9423
9423
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9424
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9424
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityPermissions] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9425
9425
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9426
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9426
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Permissions', rows);
|
|
9427
9427
|
return result;
|
|
9428
9428
|
}
|
|
9429
9429
|
|
|
9430
|
-
@FieldResolver(() => [
|
|
9431
|
-
async
|
|
9432
|
-
this.CheckUserReadPermissions('
|
|
9430
|
+
@FieldResolver(() => [EntityRelationship_])
|
|
9431
|
+
async EntityRelationships_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9432
|
+
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
9433
9433
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9434
9434
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9435
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9435
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRelationships] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
9436
9436
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9437
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9437
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Relationships', rows);
|
|
9438
9438
|
return result;
|
|
9439
9439
|
}
|
|
9440
9440
|
|
|
9441
|
-
@FieldResolver(() => [
|
|
9442
|
-
async
|
|
9443
|
-
this.CheckUserReadPermissions('
|
|
9441
|
+
@FieldResolver(() => [EntityField_])
|
|
9442
|
+
async EntityFields_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9443
|
+
this.CheckUserReadPermissions('Entity Fields', userPayload);
|
|
9444
9444
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9445
9445
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9446
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9446
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityFields] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
9447
9447
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9448
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9448
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Fields', rows);
|
|
9449
9449
|
return result;
|
|
9450
9450
|
}
|
|
9451
9451
|
|
|
9452
|
-
@FieldResolver(() => [
|
|
9453
|
-
async
|
|
9454
|
-
this.CheckUserReadPermissions('
|
|
9452
|
+
@FieldResolver(() => [EntityAIAction_])
|
|
9453
|
+
async EntityAIActions_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9454
|
+
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
9455
9455
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9456
9456
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9457
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9457
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityAIActions] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9458
9458
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9459
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9459
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', rows);
|
|
9460
9460
|
return result;
|
|
9461
9461
|
}
|
|
9462
9462
|
|
|
9463
|
-
@FieldResolver(() => [
|
|
9464
|
-
async
|
|
9465
|
-
this.CheckUserReadPermissions('
|
|
9463
|
+
@FieldResolver(() => [UserRecordLog_])
|
|
9464
|
+
async UserRecordLogs_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9465
|
+
this.CheckUserReadPermissions('User Record Logs', userPayload);
|
|
9466
9466
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9467
9467
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9468
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9468
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRecordLogs] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Record Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9469
9469
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9470
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9470
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Record Logs', rows);
|
|
9471
9471
|
return result;
|
|
9472
9472
|
}
|
|
9473
9473
|
|
|
9474
|
-
@FieldResolver(() => [
|
|
9475
|
-
async
|
|
9476
|
-
this.CheckUserReadPermissions('
|
|
9474
|
+
@FieldResolver(() => [IntegrationURLFormat_])
|
|
9475
|
+
async IntegrationURLFormats_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9476
|
+
this.CheckUserReadPermissions('Integration URL Formats', userPayload);
|
|
9477
9477
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9478
9478
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9479
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9479
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwIntegrationURLFormats] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Integration URL Formats', userPayload, EntityPermissionType.Read, 'AND');
|
|
9480
9480
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9481
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9481
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Integration URL Formats', rows);
|
|
9482
9482
|
return result;
|
|
9483
9483
|
}
|
|
9484
9484
|
|
|
9485
|
-
@FieldResolver(() => [
|
|
9486
|
-
async
|
|
9487
|
-
this.CheckUserReadPermissions('
|
|
9485
|
+
@FieldResolver(() => [Entity_])
|
|
9486
|
+
async Entities_ParentIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9487
|
+
this.CheckUserReadPermissions('Entities', userPayload);
|
|
9488
9488
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9489
9489
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9490
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9490
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntities] WHERE [ParentID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
9491
9491
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9492
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9492
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entities', rows);
|
|
9493
9493
|
return result;
|
|
9494
9494
|
}
|
|
9495
9495
|
|
|
9496
|
-
@FieldResolver(() => [
|
|
9497
|
-
async
|
|
9498
|
-
this.CheckUserReadPermissions('
|
|
9496
|
+
@FieldResolver(() => [UserFavorite_])
|
|
9497
|
+
async UserFavorites_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9498
|
+
this.CheckUserReadPermissions('User Favorites', userPayload);
|
|
9499
9499
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9500
9500
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9501
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9501
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserFavorites] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
9502
9502
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9503
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9503
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Favorites', rows);
|
|
9504
9504
|
return result;
|
|
9505
9505
|
}
|
|
9506
9506
|
|
|
9507
|
-
@FieldResolver(() => [
|
|
9508
|
-
async
|
|
9509
|
-
this.CheckUserReadPermissions('
|
|
9507
|
+
@FieldResolver(() => [CompanyIntegrationRunDetail_])
|
|
9508
|
+
async CompanyIntegrationRunDetails_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9509
|
+
this.CheckUserReadPermissions('Company Integration Run Details', userPayload);
|
|
9510
9510
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9511
9511
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9512
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9512
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRunDetails] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Company Integration Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
9513
9513
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9514
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9514
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Run Details', rows);
|
|
9515
9515
|
return result;
|
|
9516
9516
|
}
|
|
9517
9517
|
|
|
9518
|
-
@FieldResolver(() => [
|
|
9519
|
-
async
|
|
9520
|
-
this.CheckUserReadPermissions('
|
|
9518
|
+
@FieldResolver(() => [ApplicationEntity_])
|
|
9519
|
+
async ApplicationEntities_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9520
|
+
this.CheckUserReadPermissions('Application Entities', userPayload);
|
|
9521
9521
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9522
9522
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9523
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9523
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationEntities] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
9524
9524
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9525
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9525
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Application Entities', rows);
|
|
9526
9526
|
return result;
|
|
9527
9527
|
}
|
|
9528
9528
|
|
|
9529
|
-
@FieldResolver(() => [
|
|
9530
|
-
async
|
|
9531
|
-
this.CheckUserReadPermissions('
|
|
9529
|
+
@FieldResolver(() => [UserApplicationEntity_])
|
|
9530
|
+
async UserApplicationEntities_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9531
|
+
this.CheckUserReadPermissions('User Application Entities', userPayload);
|
|
9532
9532
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9533
9533
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9534
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9534
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserApplicationEntities] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
9535
9535
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9536
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9536
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Application Entities', rows);
|
|
9537
9537
|
return result;
|
|
9538
9538
|
}
|
|
9539
9539
|
|
|
9540
|
-
@FieldResolver(() => [
|
|
9541
|
-
async
|
|
9542
|
-
this.CheckUserReadPermissions('
|
|
9540
|
+
@FieldResolver(() => [List_])
|
|
9541
|
+
async Lists_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9542
|
+
this.CheckUserReadPermissions('Lists', userPayload);
|
|
9543
9543
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9544
9544
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9545
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9545
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwLists] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
9546
9546
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9547
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9547
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Lists', rows);
|
|
9548
9548
|
return result;
|
|
9549
9549
|
}
|
|
9550
9550
|
|
|
9551
|
-
@FieldResolver(() => [
|
|
9552
|
-
async
|
|
9553
|
-
this.CheckUserReadPermissions('
|
|
9551
|
+
@FieldResolver(() => [UserView_])
|
|
9552
|
+
async UserViews_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9553
|
+
this.CheckUserReadPermissions('User Views', userPayload);
|
|
9554
9554
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9555
9555
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9556
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9556
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViews] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
9557
9557
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9558
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9558
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Views', rows);
|
|
9559
9559
|
return result;
|
|
9560
9560
|
}
|
|
9561
9561
|
|
|
9562
|
-
@FieldResolver(() => [
|
|
9563
|
-
async
|
|
9564
|
-
this.CheckUserReadPermissions('
|
|
9562
|
+
@FieldResolver(() => [RecordChange_])
|
|
9563
|
+
async RecordChanges_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9564
|
+
this.CheckUserReadPermissions('Record Changes', userPayload);
|
|
9565
9565
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9566
9566
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9567
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9567
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChanges] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Changes', userPayload, EntityPermissionType.Read, 'AND');
|
|
9568
9568
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9569
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9569
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Changes', rows);
|
|
9570
9570
|
return result;
|
|
9571
9571
|
}
|
|
9572
9572
|
|
|
9573
|
-
@FieldResolver(() => [
|
|
9574
|
-
async
|
|
9575
|
-
this.CheckUserReadPermissions('
|
|
9573
|
+
@FieldResolver(() => [AuditLog_])
|
|
9574
|
+
async AuditLogs_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9575
|
+
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
9576
9576
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9577
9577
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9578
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9578
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9579
9579
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9580
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9580
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', rows);
|
|
9581
9581
|
return result;
|
|
9582
9582
|
}
|
|
9583
9583
|
|
|
9584
|
-
@FieldResolver(() => [
|
|
9585
|
-
async
|
|
9586
|
-
this.CheckUserReadPermissions('
|
|
9584
|
+
@FieldResolver(() => [ResourceType_])
|
|
9585
|
+
async ResourceTypes_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9586
|
+
this.CheckUserReadPermissions('Resource Types', userPayload);
|
|
9587
9587
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9588
9588
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9589
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9589
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceTypes] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Resource Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
9590
9590
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9591
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9591
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Types', rows);
|
|
9592
9592
|
return result;
|
|
9593
9593
|
}
|
|
9594
9594
|
|
|
9595
|
-
@FieldResolver(() => [
|
|
9596
|
-
async
|
|
9597
|
-
this.CheckUserReadPermissions('
|
|
9595
|
+
@FieldResolver(() => [TaggedItem_])
|
|
9596
|
+
async TaggedItems_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9597
|
+
this.CheckUserReadPermissions('Tagged Items', userPayload);
|
|
9598
9598
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9599
9599
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9600
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9600
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTaggedItems] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Tagged Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
9601
9601
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9602
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9602
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Tagged Items', rows);
|
|
9603
9603
|
return result;
|
|
9604
9604
|
}
|
|
9605
9605
|
|
|
9606
|
-
@FieldResolver(() => [
|
|
9607
|
-
async
|
|
9608
|
-
this.CheckUserReadPermissions('
|
|
9606
|
+
@FieldResolver(() => [DatasetItem_])
|
|
9607
|
+
async DatasetItems_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9608
|
+
this.CheckUserReadPermissions('Dataset Items', userPayload);
|
|
9609
9609
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9610
9610
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9611
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9611
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDatasetItems] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dataset Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
9612
9612
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9613
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9613
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dataset Items', rows);
|
|
9614
9614
|
return result;
|
|
9615
9615
|
}
|
|
9616
9616
|
|
|
9617
|
-
@FieldResolver(() => [
|
|
9618
|
-
async
|
|
9619
|
-
this.CheckUserReadPermissions('
|
|
9617
|
+
@FieldResolver(() => [CompanyIntegrationRecordMap_])
|
|
9618
|
+
async CompanyIntegrationRecordMaps_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9619
|
+
this.CheckUserReadPermissions('Company Integration Record Maps', userPayload);
|
|
9620
9620
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9621
9621
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9622
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9622
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRecordMaps] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Company Integration Record Maps', userPayload, EntityPermissionType.Read, 'AND');
|
|
9623
9623
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9624
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9624
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Record Maps', rows);
|
|
9625
9625
|
return result;
|
|
9626
9626
|
}
|
|
9627
9627
|
|
|
9628
|
-
@FieldResolver(() => [
|
|
9629
|
-
async
|
|
9630
|
-
this.CheckUserReadPermissions('
|
|
9628
|
+
@FieldResolver(() => [RecordMergeLog_])
|
|
9629
|
+
async RecordMergeLogs_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9630
|
+
this.CheckUserReadPermissions('Record Merge Logs', userPayload);
|
|
9631
9631
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9632
9632
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9633
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9633
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordMergeLogs] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9634
9634
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9635
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9635
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Merge Logs', rows);
|
|
9636
9636
|
return result;
|
|
9637
9637
|
}
|
|
9638
9638
|
|
|
9639
|
-
@FieldResolver(() => [
|
|
9640
|
-
async
|
|
9641
|
-
this.CheckUserReadPermissions('
|
|
9639
|
+
@FieldResolver(() => [QueryField_])
|
|
9640
|
+
async QueryFields_SourceEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9641
|
+
this.CheckUserReadPermissions('Query Fields', userPayload);
|
|
9642
9642
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9643
9643
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9644
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9644
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryFields] WHERE [SourceEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Query Fields', userPayload, EntityPermissionType.Read, 'AND');
|
|
9645
9645
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9646
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9646
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Query Fields', rows);
|
|
9647
9647
|
return result;
|
|
9648
9648
|
}
|
|
9649
9649
|
|
|
9650
|
-
@FieldResolver(() => [
|
|
9651
|
-
async
|
|
9652
|
-
this.CheckUserReadPermissions('
|
|
9650
|
+
@FieldResolver(() => [Conversation_])
|
|
9651
|
+
async Conversations_LinkedEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9652
|
+
this.CheckUserReadPermissions('Conversations', userPayload);
|
|
9653
9653
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9654
9654
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9655
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9655
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwConversations] WHERE [LinkedEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
9656
9656
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9657
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9657
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Conversations', rows);
|
|
9658
9658
|
return result;
|
|
9659
9659
|
}
|
|
9660
9660
|
|
|
9661
|
-
@FieldResolver(() => [
|
|
9662
|
-
async
|
|
9663
|
-
this.CheckUserReadPermissions('
|
|
9661
|
+
@FieldResolver(() => [EntityDocument_])
|
|
9662
|
+
async EntityDocuments_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9663
|
+
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
9664
9664
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9665
9665
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9666
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9666
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
9667
9667
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9668
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9668
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', rows);
|
|
9669
9669
|
return result;
|
|
9670
9670
|
}
|
|
9671
9671
|
|
|
9672
|
-
@FieldResolver(() => [
|
|
9673
|
-
async
|
|
9674
|
-
this.CheckUserReadPermissions('
|
|
9672
|
+
@FieldResolver(() => [DataContextItem_])
|
|
9673
|
+
async DataContextItems_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9674
|
+
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
9675
9675
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9676
9676
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9677
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9677
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
9678
9678
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9679
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9679
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', rows);
|
|
9680
9680
|
return result;
|
|
9681
9681
|
}
|
|
9682
9682
|
|
|
9683
|
-
@FieldResolver(() => [
|
|
9684
|
-
async
|
|
9685
|
-
this.CheckUserReadPermissions('
|
|
9683
|
+
@FieldResolver(() => [User_])
|
|
9684
|
+
async Users_LinkedEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9685
|
+
this.CheckUserReadPermissions('Users', userPayload);
|
|
9686
9686
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9687
9687
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9688
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9688
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUsers] WHERE [LinkedEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Users', userPayload, EntityPermissionType.Read, 'AND');
|
|
9689
9689
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9690
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9690
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Users', rows);
|
|
9691
9691
|
return result;
|
|
9692
9692
|
}
|
|
9693
9693
|
|
|
9694
|
-
@FieldResolver(() => [
|
|
9695
|
-
async
|
|
9696
|
-
this.CheckUserReadPermissions('
|
|
9694
|
+
@FieldResolver(() => [EntityRecordDocument_])
|
|
9695
|
+
async EntityRecordDocuments_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9696
|
+
this.CheckUserReadPermissions('Entity Record Documents', userPayload);
|
|
9697
9697
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9698
9698
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9699
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9699
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRecordDocuments] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Record Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
9700
9700
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9701
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9701
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Record Documents', rows);
|
|
9702
9702
|
return result;
|
|
9703
9703
|
}
|
|
9704
9704
|
|
|
9705
|
-
@FieldResolver(() => [
|
|
9706
|
-
async
|
|
9707
|
-
this.CheckUserReadPermissions('
|
|
9705
|
+
@FieldResolver(() => [FileEntityRecordLink_])
|
|
9706
|
+
async FileEntityRecordLinks_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9707
|
+
this.CheckUserReadPermissions('File Entity Record Links', userPayload);
|
|
9708
9708
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9709
9709
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9710
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9710
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwFileEntityRecordLinks] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'File Entity Record Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
9711
9711
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9712
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9712
|
+
const result = this.ArrayMapFieldNamesToCodeNames('File Entity Record Links', rows);
|
|
9713
9713
|
return result;
|
|
9714
9714
|
}
|
|
9715
9715
|
|
|
9716
|
-
@FieldResolver(() => [
|
|
9717
|
-
async
|
|
9718
|
-
this.CheckUserReadPermissions('
|
|
9716
|
+
@FieldResolver(() => [UserViewCategory_])
|
|
9717
|
+
async UserViewCategories_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9718
|
+
this.CheckUserReadPermissions('User View Categories', userPayload);
|
|
9719
9719
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9720
9720
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9721
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9721
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewCategories] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User View Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
9722
9722
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9723
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9723
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User View Categories', rows);
|
|
9724
9724
|
return result;
|
|
9725
9725
|
}
|
|
9726
9726
|
|
|
9727
|
-
@FieldResolver(() => [
|
|
9728
|
-
async
|
|
9729
|
-
this.CheckUserReadPermissions('Entity
|
|
9727
|
+
@FieldResolver(() => [EntitySetting_])
|
|
9728
|
+
async EntitySettings_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9729
|
+
this.CheckUserReadPermissions('Entity Settings', userPayload);
|
|
9730
9730
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9731
9731
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9732
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9732
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntitySettings] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
9733
9733
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9734
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity
|
|
9734
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Settings', rows);
|
|
9735
9735
|
return result;
|
|
9736
9736
|
}
|
|
9737
9737
|
|
|
9738
|
-
@FieldResolver(() => [
|
|
9739
|
-
async
|
|
9740
|
-
this.CheckUserReadPermissions('
|
|
9738
|
+
@FieldResolver(() => [DuplicateRun_])
|
|
9739
|
+
async DuplicateRuns_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9740
|
+
this.CheckUserReadPermissions('Duplicate Runs', userPayload);
|
|
9741
9741
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9742
9742
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9743
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9743
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRuns] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Duplicate Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
9744
9744
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9745
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9745
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Runs', rows);
|
|
9746
9746
|
return result;
|
|
9747
9747
|
}
|
|
9748
9748
|
|
|
9749
|
-
@FieldResolver(() => [
|
|
9750
|
-
async
|
|
9751
|
-
this.CheckUserReadPermissions('Entity
|
|
9749
|
+
@FieldResolver(() => [EntityAction_])
|
|
9750
|
+
async EntityActions_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9751
|
+
this.CheckUserReadPermissions('Entity Actions', userPayload);
|
|
9752
9752
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9753
9753
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9754
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9754
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityActions] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9755
9755
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9756
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity
|
|
9756
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Actions', rows);
|
|
9757
9757
|
return result;
|
|
9758
9758
|
}
|
|
9759
9759
|
|
|
9760
|
-
@FieldResolver(() => [
|
|
9761
|
-
async
|
|
9762
|
-
this.CheckUserReadPermissions('
|
|
9760
|
+
@FieldResolver(() => [TemplateParam_])
|
|
9761
|
+
async TemplateParams_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9762
|
+
this.CheckUserReadPermissions('Template Params', userPayload);
|
|
9763
9763
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9764
9764
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9765
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9765
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Template Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
9766
9766
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9767
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9767
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Params', rows);
|
|
9768
9768
|
return result;
|
|
9769
9769
|
}
|
|
9770
9770
|
|
|
9771
|
-
@FieldResolver(() => [
|
|
9772
|
-
async
|
|
9773
|
-
this.CheckUserReadPermissions('
|
|
9771
|
+
@FieldResolver(() => [Recommendation_])
|
|
9772
|
+
async Recommendations_SourceEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9773
|
+
this.CheckUserReadPermissions('Recommendations', userPayload);
|
|
9774
9774
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9775
9775
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9776
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9776
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendations] WHERE [SourceEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Recommendations', userPayload, EntityPermissionType.Read, 'AND');
|
|
9777
9777
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9778
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9778
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendations', rows);
|
|
9779
9779
|
return result;
|
|
9780
9780
|
}
|
|
9781
9781
|
|
|
9782
|
-
@FieldResolver(() => [
|
|
9783
|
-
async
|
|
9784
|
-
this.CheckUserReadPermissions('
|
|
9782
|
+
@FieldResolver(() => [RecommendationItem_])
|
|
9783
|
+
async RecommendationItems_DestinationEntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9784
|
+
this.CheckUserReadPermissions('Recommendation Items', userPayload);
|
|
9785
9785
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9786
9786
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9787
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9787
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationItems] WHERE [DestinationEntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Recommendation Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
9788
9788
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9789
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9789
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Items', rows);
|
|
9790
9790
|
return result;
|
|
9791
9791
|
}
|
|
9792
9792
|
|
|
9793
|
-
@FieldResolver(() => [
|
|
9794
|
-
async
|
|
9795
|
-
this.CheckUserReadPermissions('
|
|
9793
|
+
@FieldResolver(() => [EntityCommunicationMessageType_])
|
|
9794
|
+
async EntityCommunicationMessageTypes_EntityIDArray(@Root() entity_: Entity_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9795
|
+
this.CheckUserReadPermissions('Entity Communication Message Types', userPayload);
|
|
9796
9796
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9797
9797
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
9798
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
9798
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityCommunicationMessageTypes] WHERE [EntityID]='${entity_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Communication Message Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
9799
9799
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
9800
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
9800
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Communication Message Types', rows);
|
|
9801
9801
|
return result;
|
|
9802
9802
|
}
|
|
9803
9803
|
|
|
@@ -9936,98 +9936,95 @@ export class User_ {
|
|
|
9936
9936
|
@MaxLength(200)
|
|
9937
9937
|
EmployeeSupervisorEmail?: string;
|
|
9938
9938
|
|
|
9939
|
-
@Field(() => [RecommendationRun_])
|
|
9940
|
-
RecommendationRuns_RunByUserIDArray: RecommendationRun_[]; // Link to RecommendationRuns
|
|
9941
|
-
|
|
9942
9939
|
@Field(() => [UserApplication_])
|
|
9943
9940
|
UserApplications_UserIDArray: UserApplication_[]; // Link to UserApplications
|
|
9944
9941
|
|
|
9945
|
-
@Field(() => [
|
|
9946
|
-
|
|
9942
|
+
@Field(() => [UserRole_])
|
|
9943
|
+
UserRoles_UserIDArray: UserRole_[]; // Link to UserRoles
|
|
9947
9944
|
|
|
9948
|
-
@Field(() => [
|
|
9949
|
-
|
|
9945
|
+
@Field(() => [Workspace_])
|
|
9946
|
+
Workspaces_UserIDArray: Workspace_[]; // Link to Workspaces
|
|
9950
9947
|
|
|
9951
9948
|
@Field(() => [Report_])
|
|
9952
9949
|
Reports_UserIDArray: Report_[]; // Link to Reports
|
|
9953
9950
|
|
|
9954
|
-
@Field(() => [
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
@Field(() => [Action_])
|
|
9958
|
-
Actions_CodeApprovedByUserIDArray: Action_[]; // Link to Actions
|
|
9951
|
+
@Field(() => [ReportSnapshot_])
|
|
9952
|
+
ReportSnapshots_UserIDArray: ReportSnapshot_[]; // Link to ReportSnapshots
|
|
9959
9953
|
|
|
9960
|
-
@Field(() => [
|
|
9961
|
-
|
|
9954
|
+
@Field(() => [RecordChange_])
|
|
9955
|
+
RecordChanges_UserIDArray: RecordChange_[]; // Link to RecordChanges
|
|
9962
9956
|
|
|
9963
|
-
@Field(() => [
|
|
9964
|
-
|
|
9957
|
+
@Field(() => [Dashboard_])
|
|
9958
|
+
Dashboards_UserIDArray: Dashboard_[]; // Link to Dashboards
|
|
9965
9959
|
|
|
9966
|
-
@Field(() => [
|
|
9967
|
-
|
|
9960
|
+
@Field(() => [UserViewRun_])
|
|
9961
|
+
UserViewRuns_RunByUserIDArray: UserViewRun_[]; // Link to UserViewRuns
|
|
9968
9962
|
|
|
9969
|
-
@Field(() => [
|
|
9970
|
-
|
|
9963
|
+
@Field(() => [AuditLog_])
|
|
9964
|
+
AuditLogs_UserIDArray: AuditLog_[]; // Link to AuditLogs
|
|
9971
9965
|
|
|
9972
|
-
@Field(() => [
|
|
9973
|
-
|
|
9966
|
+
@Field(() => [List_])
|
|
9967
|
+
Lists_UserIDArray: List_[]; // Link to Lists
|
|
9974
9968
|
|
|
9975
|
-
@Field(() => [
|
|
9976
|
-
|
|
9969
|
+
@Field(() => [UserFavorite_])
|
|
9970
|
+
UserFavorites_UserIDArray: UserFavorite_[]; // Link to UserFavorites
|
|
9977
9971
|
|
|
9978
|
-
@Field(() => [
|
|
9979
|
-
|
|
9972
|
+
@Field(() => [UserRecordLog_])
|
|
9973
|
+
UserRecordLogs_UserIDArray: UserRecordLog_[]; // Link to UserRecordLogs
|
|
9980
9974
|
|
|
9981
|
-
@Field(() => [
|
|
9982
|
-
|
|
9975
|
+
@Field(() => [UserView_])
|
|
9976
|
+
UserViews_UserIDArray: UserView_[]; // Link to UserViews
|
|
9983
9977
|
|
|
9984
|
-
@Field(() => [
|
|
9985
|
-
|
|
9978
|
+
@Field(() => [CompanyIntegrationRun_])
|
|
9979
|
+
CompanyIntegrationRuns_RunByUserIDArray: CompanyIntegrationRun_[]; // Link to CompanyIntegrationRuns
|
|
9986
9980
|
|
|
9987
|
-
@Field(() => [
|
|
9988
|
-
|
|
9981
|
+
@Field(() => [UserNotification_])
|
|
9982
|
+
UserNotifications_UserIDArray: UserNotification_[]; // Link to UserNotifications
|
|
9989
9983
|
|
|
9990
9984
|
@Field(() => [Conversation_])
|
|
9991
9985
|
Conversations_UserIDArray: Conversation_[]; // Link to Conversations
|
|
9992
9986
|
|
|
9993
|
-
@Field(() => [
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
@Field(() => [CommunicationRun_])
|
|
9997
|
-
CommunicationRuns_UserIDArray: CommunicationRun_[]; // Link to CommunicationRuns
|
|
9987
|
+
@Field(() => [RecordMergeLog_])
|
|
9988
|
+
RecordMergeLogs_InitiatedByUserIDArray: RecordMergeLog_[]; // Link to RecordMergeLogs
|
|
9998
9989
|
|
|
9999
|
-
@Field(() => [
|
|
10000
|
-
|
|
9990
|
+
@Field(() => [DataContext_])
|
|
9991
|
+
DataContexts_UserIDArray: DataContext_[]; // Link to DataContexts
|
|
10001
9992
|
|
|
10002
|
-
@Field(() => [
|
|
10003
|
-
|
|
9993
|
+
@Field(() => [ReportCategory_])
|
|
9994
|
+
ReportCategories_UserIDArray: ReportCategory_[]; // Link to ReportCategories
|
|
10004
9995
|
|
|
10005
|
-
@Field(() => [
|
|
10006
|
-
|
|
9996
|
+
@Field(() => [UserViewCategory_])
|
|
9997
|
+
UserViewCategories_UserIDArray: UserViewCategory_[]; // Link to UserViewCategories
|
|
10007
9998
|
|
|
10008
|
-
@Field(() => [
|
|
10009
|
-
|
|
9999
|
+
@Field(() => [DashboardCategory_])
|
|
10000
|
+
DashboardCategories_UserIDArray: DashboardCategory_[]; // Link to DashboardCategories
|
|
10010
10001
|
|
|
10011
|
-
@Field(() => [
|
|
10012
|
-
|
|
10002
|
+
@Field(() => [QueryCategory_])
|
|
10003
|
+
QueryCategories_UserIDArray: QueryCategory_[]; // Link to QueryCategories
|
|
10013
10004
|
|
|
10014
10005
|
@Field(() => [DuplicateRun_])
|
|
10015
10006
|
DuplicateRuns_StartedByUserIDArray: DuplicateRun_[]; // Link to DuplicateRuns
|
|
10016
10007
|
|
|
10017
|
-
@Field(() => [
|
|
10018
|
-
|
|
10008
|
+
@Field(() => [ActionExecutionLog_])
|
|
10009
|
+
ActionExecutionLogs_UserIDArray: ActionExecutionLog_[]; // Link to ActionExecutionLogs
|
|
10019
10010
|
|
|
10020
|
-
@Field(() => [
|
|
10021
|
-
|
|
10011
|
+
@Field(() => [Action_])
|
|
10012
|
+
Actions_CodeApprovedByUserIDArray: Action_[]; // Link to Actions
|
|
10013
|
+
|
|
10014
|
+
@Field(() => [CommunicationRun_])
|
|
10015
|
+
CommunicationRuns_UserIDArray: CommunicationRun_[]; // Link to CommunicationRuns
|
|
10022
10016
|
|
|
10023
10017
|
@Field(() => [Template_])
|
|
10024
10018
|
Templates_UserIDArray: Template_[]; // Link to Templates
|
|
10025
10019
|
|
|
10026
|
-
@Field(() => [
|
|
10027
|
-
|
|
10020
|
+
@Field(() => [TemplateCategory_])
|
|
10021
|
+
TemplateCategories_UserIDArray: TemplateCategory_[]; // Link to TemplateCategories
|
|
10028
10022
|
|
|
10029
|
-
@Field(() => [
|
|
10030
|
-
|
|
10023
|
+
@Field(() => [RecommendationRun_])
|
|
10024
|
+
RecommendationRuns_RunByUserIDArray: RecommendationRun_[]; // Link to RecommendationRuns
|
|
10025
|
+
|
|
10026
|
+
@Field(() => [RecordChangeReplayRun_])
|
|
10027
|
+
RecordChangeReplayRuns_UserIDArray: RecordChangeReplayRun_[]; // Link to RecordChangeReplayRuns
|
|
10031
10028
|
|
|
10032
10029
|
@Field(() => [ListCategory_])
|
|
10033
10030
|
ListCategories_UserIDArray: ListCategory_[]; // Link to ListCategories
|
|
@@ -10035,17 +10032,20 @@ export class User_ {
|
|
|
10035
10032
|
@Field(() => [ScheduledAction_])
|
|
10036
10033
|
ScheduledActions_CreatedByUserIDArray: ScheduledAction_[]; // Link to ScheduledActions
|
|
10037
10034
|
|
|
10035
|
+
@Field(() => [ResourceLink_])
|
|
10036
|
+
ResourceLinks_UserIDArray: ResourceLink_[]; // Link to ResourceLinks
|
|
10037
|
+
|
|
10038
10038
|
@Field(() => [AIAgentRequest_])
|
|
10039
10039
|
AIAgentRequests_ResponseByUserIDArray: AIAgentRequest_[]; // Link to AIAgentRequests
|
|
10040
10040
|
|
|
10041
|
-
@Field(() => [
|
|
10042
|
-
|
|
10041
|
+
@Field(() => [AIAgentNote_])
|
|
10042
|
+
AIAgentNotes_UserIDArray: AIAgentNote_[]; // Link to AIAgentNotes
|
|
10043
10043
|
|
|
10044
10044
|
@Field(() => [ReportUserState_])
|
|
10045
10045
|
MJ_ReportUserStates_UserIDArray: ReportUserState_[]; // Link to MJ_ReportUserStates
|
|
10046
10046
|
|
|
10047
|
-
@Field(() => [
|
|
10048
|
-
|
|
10047
|
+
@Field(() => [DashboardUserPreference_])
|
|
10048
|
+
MJ_DashboardUserPreferences_UserIDArray: DashboardUserPreference_[]; // Link to MJ_DashboardUserPreferences
|
|
10049
10049
|
|
|
10050
10050
|
@Field(() => [DashboardUserState_])
|
|
10051
10051
|
MJ_DashboardUserStates_UserIDArray: DashboardUserState_[]; // Link to MJ_DashboardUserStates
|
|
@@ -10221,17 +10221,6 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10221
10221
|
return result;
|
|
10222
10222
|
}
|
|
10223
10223
|
|
|
10224
|
-
@FieldResolver(() => [RecommendationRun_])
|
|
10225
|
-
async RecommendationRuns_RunByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10226
|
-
this.CheckUserReadPermissions('Recommendation Runs', userPayload);
|
|
10227
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10228
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10229
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationRuns] WHERE [RunByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Recommendation Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10230
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10231
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Runs', rows);
|
|
10232
|
-
return result;
|
|
10233
|
-
}
|
|
10234
|
-
|
|
10235
10224
|
@FieldResolver(() => [UserApplication_])
|
|
10236
10225
|
async UserApplications_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10237
10226
|
this.CheckUserReadPermissions('User Applications', userPayload);
|
|
@@ -10243,25 +10232,25 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10243
10232
|
return result;
|
|
10244
10233
|
}
|
|
10245
10234
|
|
|
10246
|
-
@FieldResolver(() => [
|
|
10247
|
-
async
|
|
10248
|
-
this.CheckUserReadPermissions('
|
|
10235
|
+
@FieldResolver(() => [UserRole_])
|
|
10236
|
+
async UserRoles_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10237
|
+
this.CheckUserReadPermissions('User Roles', userPayload);
|
|
10249
10238
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10250
10239
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10251
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10240
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRoles] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Roles', userPayload, EntityPermissionType.Read, 'AND');
|
|
10252
10241
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10253
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10242
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Roles', rows);
|
|
10254
10243
|
return result;
|
|
10255
10244
|
}
|
|
10256
10245
|
|
|
10257
|
-
@FieldResolver(() => [
|
|
10258
|
-
async
|
|
10259
|
-
this.CheckUserReadPermissions('
|
|
10246
|
+
@FieldResolver(() => [Workspace_])
|
|
10247
|
+
async Workspaces_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10248
|
+
this.CheckUserReadPermissions('Workspaces', userPayload);
|
|
10260
10249
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10261
10250
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10262
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10251
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwWorkspaces] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Workspaces', userPayload, EntityPermissionType.Read, 'AND');
|
|
10263
10252
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10264
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10253
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Workspaces', rows);
|
|
10265
10254
|
return result;
|
|
10266
10255
|
}
|
|
10267
10256
|
|
|
@@ -10276,135 +10265,124 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10276
10265
|
return result;
|
|
10277
10266
|
}
|
|
10278
10267
|
|
|
10279
|
-
@FieldResolver(() => [
|
|
10280
|
-
async
|
|
10281
|
-
this.CheckUserReadPermissions('
|
|
10282
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10283
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10284
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10285
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10286
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Dashboard Categories', rows);
|
|
10287
|
-
return result;
|
|
10288
|
-
}
|
|
10289
|
-
|
|
10290
|
-
@FieldResolver(() => [Action_])
|
|
10291
|
-
async Actions_CodeApprovedByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10292
|
-
this.CheckUserReadPermissions('Actions', userPayload);
|
|
10268
|
+
@FieldResolver(() => [ReportSnapshot_])
|
|
10269
|
+
async ReportSnapshots_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10270
|
+
this.CheckUserReadPermissions('Report Snapshots', userPayload);
|
|
10293
10271
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10294
10272
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10295
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10273
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportSnapshots] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
10296
10274
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10297
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10275
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Report Snapshots', rows);
|
|
10298
10276
|
return result;
|
|
10299
10277
|
}
|
|
10300
10278
|
|
|
10301
|
-
@FieldResolver(() => [
|
|
10302
|
-
async
|
|
10303
|
-
this.CheckUserReadPermissions('
|
|
10279
|
+
@FieldResolver(() => [RecordChange_])
|
|
10280
|
+
async RecordChanges_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10281
|
+
this.CheckUserReadPermissions('Record Changes', userPayload);
|
|
10304
10282
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10305
10283
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10306
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10284
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChanges] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Changes', userPayload, EntityPermissionType.Read, 'AND');
|
|
10307
10285
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10308
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10286
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Changes', rows);
|
|
10309
10287
|
return result;
|
|
10310
10288
|
}
|
|
10311
10289
|
|
|
10312
|
-
@FieldResolver(() => [
|
|
10313
|
-
async
|
|
10314
|
-
this.CheckUserReadPermissions('
|
|
10290
|
+
@FieldResolver(() => [Dashboard_])
|
|
10291
|
+
async Dashboards_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10292
|
+
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
10315
10293
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10316
10294
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10317
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10295
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboards] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
10318
10296
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10319
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10297
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboards', rows);
|
|
10320
10298
|
return result;
|
|
10321
10299
|
}
|
|
10322
10300
|
|
|
10323
|
-
@FieldResolver(() => [
|
|
10324
|
-
async
|
|
10325
|
-
this.CheckUserReadPermissions('
|
|
10301
|
+
@FieldResolver(() => [UserViewRun_])
|
|
10302
|
+
async UserViewRuns_RunByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10303
|
+
this.CheckUserReadPermissions('User View Runs', userPayload);
|
|
10326
10304
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10327
10305
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10328
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10306
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewRuns] WHERE [RunByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User View Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10329
10307
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10330
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10308
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User View Runs', rows);
|
|
10331
10309
|
return result;
|
|
10332
10310
|
}
|
|
10333
10311
|
|
|
10334
|
-
@FieldResolver(() => [
|
|
10335
|
-
async
|
|
10336
|
-
this.CheckUserReadPermissions('
|
|
10312
|
+
@FieldResolver(() => [AuditLog_])
|
|
10313
|
+
async AuditLogs_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10314
|
+
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
10337
10315
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10338
10316
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10339
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10317
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10340
10318
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10341
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10319
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', rows);
|
|
10342
10320
|
return result;
|
|
10343
10321
|
}
|
|
10344
10322
|
|
|
10345
|
-
@FieldResolver(() => [
|
|
10346
|
-
async
|
|
10347
|
-
this.CheckUserReadPermissions('
|
|
10323
|
+
@FieldResolver(() => [List_])
|
|
10324
|
+
async Lists_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10325
|
+
this.CheckUserReadPermissions('Lists', userPayload);
|
|
10348
10326
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10349
10327
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10350
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10328
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwLists] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Lists', userPayload, EntityPermissionType.Read, 'AND');
|
|
10351
10329
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10352
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10330
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Lists', rows);
|
|
10353
10331
|
return result;
|
|
10354
10332
|
}
|
|
10355
10333
|
|
|
10356
|
-
@FieldResolver(() => [
|
|
10357
|
-
async
|
|
10358
|
-
this.CheckUserReadPermissions('
|
|
10334
|
+
@FieldResolver(() => [UserFavorite_])
|
|
10335
|
+
async UserFavorites_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10336
|
+
this.CheckUserReadPermissions('User Favorites', userPayload);
|
|
10359
10337
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10360
10338
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10361
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10339
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserFavorites] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Favorites', userPayload, EntityPermissionType.Read, 'AND');
|
|
10362
10340
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10363
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10341
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Favorites', rows);
|
|
10364
10342
|
return result;
|
|
10365
10343
|
}
|
|
10366
10344
|
|
|
10367
|
-
@FieldResolver(() => [
|
|
10368
|
-
async
|
|
10369
|
-
this.CheckUserReadPermissions('Record
|
|
10345
|
+
@FieldResolver(() => [UserRecordLog_])
|
|
10346
|
+
async UserRecordLogs_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10347
|
+
this.CheckUserReadPermissions('User Record Logs', userPayload);
|
|
10370
10348
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10371
10349
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10372
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10350
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserRecordLogs] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Record Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10373
10351
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10374
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Record
|
|
10352
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Record Logs', rows);
|
|
10375
10353
|
return result;
|
|
10376
10354
|
}
|
|
10377
10355
|
|
|
10378
|
-
@FieldResolver(() => [
|
|
10379
|
-
async
|
|
10380
|
-
this.CheckUserReadPermissions('User
|
|
10356
|
+
@FieldResolver(() => [UserView_])
|
|
10357
|
+
async UserViews_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10358
|
+
this.CheckUserReadPermissions('User Views', userPayload);
|
|
10381
10359
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10382
10360
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10383
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10361
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViews] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Views', userPayload, EntityPermissionType.Read, 'AND');
|
|
10384
10362
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10385
|
-
const result = this.ArrayMapFieldNamesToCodeNames('User
|
|
10363
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Views', rows);
|
|
10386
10364
|
return result;
|
|
10387
10365
|
}
|
|
10388
10366
|
|
|
10389
|
-
@FieldResolver(() => [
|
|
10390
|
-
async
|
|
10391
|
-
this.CheckUserReadPermissions('
|
|
10367
|
+
@FieldResolver(() => [CompanyIntegrationRun_])
|
|
10368
|
+
async CompanyIntegrationRuns_RunByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10369
|
+
this.CheckUserReadPermissions('Company Integration Runs', userPayload);
|
|
10392
10370
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10393
10371
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10394
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10372
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRuns] WHERE [RunByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Company Integration Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10395
10373
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10396
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10374
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Runs', rows);
|
|
10397
10375
|
return result;
|
|
10398
10376
|
}
|
|
10399
10377
|
|
|
10400
|
-
@FieldResolver(() => [
|
|
10401
|
-
async
|
|
10402
|
-
this.CheckUserReadPermissions('
|
|
10378
|
+
@FieldResolver(() => [UserNotification_])
|
|
10379
|
+
async UserNotifications_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10380
|
+
this.CheckUserReadPermissions('User Notifications', userPayload);
|
|
10403
10381
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10404
10382
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10405
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10383
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserNotifications] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User Notifications', userPayload, EntityPermissionType.Read, 'AND');
|
|
10406
10384
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10407
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10385
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User Notifications', rows);
|
|
10408
10386
|
return result;
|
|
10409
10387
|
}
|
|
10410
10388
|
|
|
@@ -10419,113 +10397,113 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10419
10397
|
return result;
|
|
10420
10398
|
}
|
|
10421
10399
|
|
|
10422
|
-
@FieldResolver(() => [
|
|
10423
|
-
async
|
|
10424
|
-
this.CheckUserReadPermissions('
|
|
10400
|
+
@FieldResolver(() => [RecordMergeLog_])
|
|
10401
|
+
async RecordMergeLogs_InitiatedByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10402
|
+
this.CheckUserReadPermissions('Record Merge Logs', userPayload);
|
|
10425
10403
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10426
10404
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10427
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10405
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordMergeLogs] WHERE [InitiatedByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Merge Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10428
10406
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10429
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10407
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Merge Logs', rows);
|
|
10430
10408
|
return result;
|
|
10431
10409
|
}
|
|
10432
10410
|
|
|
10433
|
-
@FieldResolver(() => [
|
|
10434
|
-
async
|
|
10435
|
-
this.CheckUserReadPermissions('
|
|
10411
|
+
@FieldResolver(() => [DataContext_])
|
|
10412
|
+
async DataContexts_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10413
|
+
this.CheckUserReadPermissions('Data Contexts', userPayload);
|
|
10436
10414
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10437
10415
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10438
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10416
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContexts] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Contexts', userPayload, EntityPermissionType.Read, 'AND');
|
|
10439
10417
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10440
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10418
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Contexts', rows);
|
|
10441
10419
|
return result;
|
|
10442
10420
|
}
|
|
10443
10421
|
|
|
10444
|
-
@FieldResolver(() => [
|
|
10445
|
-
async
|
|
10446
|
-
this.CheckUserReadPermissions('
|
|
10422
|
+
@FieldResolver(() => [ReportCategory_])
|
|
10423
|
+
async ReportCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10424
|
+
this.CheckUserReadPermissions('Report Categories', userPayload);
|
|
10447
10425
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10448
10426
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10449
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10427
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReportCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10450
10428
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10451
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10429
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Report Categories', rows);
|
|
10452
10430
|
return result;
|
|
10453
10431
|
}
|
|
10454
10432
|
|
|
10455
|
-
@FieldResolver(() => [
|
|
10456
|
-
async
|
|
10457
|
-
this.CheckUserReadPermissions('
|
|
10433
|
+
@FieldResolver(() => [UserViewCategory_])
|
|
10434
|
+
async UserViewCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10435
|
+
this.CheckUserReadPermissions('User View Categories', userPayload);
|
|
10458
10436
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10459
10437
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10460
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10438
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwUserViewCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'User View Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10461
10439
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10462
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10440
|
+
const result = this.ArrayMapFieldNamesToCodeNames('User View Categories', rows);
|
|
10463
10441
|
return result;
|
|
10464
10442
|
}
|
|
10465
10443
|
|
|
10466
|
-
@FieldResolver(() => [
|
|
10467
|
-
async
|
|
10468
|
-
this.CheckUserReadPermissions('
|
|
10444
|
+
@FieldResolver(() => [DashboardCategory_])
|
|
10445
|
+
async DashboardCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10446
|
+
this.CheckUserReadPermissions('Dashboard Categories', userPayload);
|
|
10469
10447
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10470
10448
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10471
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10449
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10472
10450
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10473
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10451
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboard Categories', rows);
|
|
10474
10452
|
return result;
|
|
10475
10453
|
}
|
|
10476
10454
|
|
|
10477
|
-
@FieldResolver(() => [
|
|
10478
|
-
async
|
|
10479
|
-
this.CheckUserReadPermissions('
|
|
10455
|
+
@FieldResolver(() => [QueryCategory_])
|
|
10456
|
+
async QueryCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10457
|
+
this.CheckUserReadPermissions('Query Categories', userPayload);
|
|
10480
10458
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10481
10459
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10482
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10460
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Query Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10483
10461
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10484
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10462
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Query Categories', rows);
|
|
10485
10463
|
return result;
|
|
10486
10464
|
}
|
|
10487
10465
|
|
|
10488
|
-
@FieldResolver(() => [
|
|
10489
|
-
async
|
|
10490
|
-
this.CheckUserReadPermissions('
|
|
10466
|
+
@FieldResolver(() => [DuplicateRun_])
|
|
10467
|
+
async DuplicateRuns_StartedByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10468
|
+
this.CheckUserReadPermissions('Duplicate Runs', userPayload);
|
|
10491
10469
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10492
10470
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10493
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10471
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDuplicateRuns] WHERE [StartedByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Duplicate Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10494
10472
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10495
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10473
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Duplicate Runs', rows);
|
|
10496
10474
|
return result;
|
|
10497
10475
|
}
|
|
10498
10476
|
|
|
10499
|
-
@FieldResolver(() => [
|
|
10500
|
-
async
|
|
10501
|
-
this.CheckUserReadPermissions('
|
|
10477
|
+
@FieldResolver(() => [ActionExecutionLog_])
|
|
10478
|
+
async ActionExecutionLogs_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10479
|
+
this.CheckUserReadPermissions('Action Execution Logs', userPayload);
|
|
10502
10480
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10503
10481
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10504
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10482
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionExecutionLogs] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Action Execution Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10505
10483
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10506
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10484
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Action Execution Logs', rows);
|
|
10507
10485
|
return result;
|
|
10508
10486
|
}
|
|
10509
10487
|
|
|
10510
|
-
@FieldResolver(() => [
|
|
10511
|
-
async
|
|
10512
|
-
this.CheckUserReadPermissions('
|
|
10488
|
+
@FieldResolver(() => [Action_])
|
|
10489
|
+
async Actions_CodeApprovedByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10490
|
+
this.CheckUserReadPermissions('Actions', userPayload);
|
|
10513
10491
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10514
10492
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10515
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10493
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActions] WHERE [CodeApprovedByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
10516
10494
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10517
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10495
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Actions', rows);
|
|
10518
10496
|
return result;
|
|
10519
10497
|
}
|
|
10520
10498
|
|
|
10521
|
-
@FieldResolver(() => [
|
|
10522
|
-
async
|
|
10523
|
-
this.CheckUserReadPermissions('
|
|
10499
|
+
@FieldResolver(() => [CommunicationRun_])
|
|
10500
|
+
async CommunicationRuns_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10501
|
+
this.CheckUserReadPermissions('Communication Runs', userPayload);
|
|
10524
10502
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10525
10503
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10526
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10504
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCommunicationRuns] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Communication Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10527
10505
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10528
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10506
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Communication Runs', rows);
|
|
10529
10507
|
return result;
|
|
10530
10508
|
}
|
|
10531
10509
|
|
|
@@ -10540,25 +10518,36 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10540
10518
|
return result;
|
|
10541
10519
|
}
|
|
10542
10520
|
|
|
10543
|
-
@FieldResolver(() => [
|
|
10544
|
-
async
|
|
10545
|
-
this.CheckUserReadPermissions('
|
|
10521
|
+
@FieldResolver(() => [TemplateCategory_])
|
|
10522
|
+
async TemplateCategories_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10523
|
+
this.CheckUserReadPermissions('Template Categories', userPayload);
|
|
10546
10524
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10547
10525
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10548
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10526
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateCategories] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Template Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
10549
10527
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10550
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10528
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Categories', rows);
|
|
10551
10529
|
return result;
|
|
10552
10530
|
}
|
|
10553
10531
|
|
|
10554
|
-
@FieldResolver(() => [
|
|
10555
|
-
async
|
|
10556
|
-
this.CheckUserReadPermissions('
|
|
10532
|
+
@FieldResolver(() => [RecommendationRun_])
|
|
10533
|
+
async RecommendationRuns_RunByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10534
|
+
this.CheckUserReadPermissions('Recommendation Runs', userPayload);
|
|
10557
10535
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10558
10536
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10559
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10537
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecommendationRuns] WHERE [RunByUserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Recommendation Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10560
10538
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10561
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10539
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Recommendation Runs', rows);
|
|
10540
|
+
return result;
|
|
10541
|
+
}
|
|
10542
|
+
|
|
10543
|
+
@FieldResolver(() => [RecordChangeReplayRun_])
|
|
10544
|
+
async RecordChangeReplayRuns_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10545
|
+
this.CheckUserReadPermissions('Record Change Replay Runs', userPayload);
|
|
10546
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10547
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10548
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwRecordChangeReplayRuns] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Record Change Replay Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
10549
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10550
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Record Change Replay Runs', rows);
|
|
10562
10551
|
return result;
|
|
10563
10552
|
}
|
|
10564
10553
|
|
|
@@ -10584,6 +10573,17 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10584
10573
|
return result;
|
|
10585
10574
|
}
|
|
10586
10575
|
|
|
10576
|
+
@FieldResolver(() => [ResourceLink_])
|
|
10577
|
+
async ResourceLinks_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10578
|
+
this.CheckUserReadPermissions('Resource Links', userPayload);
|
|
10579
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10580
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10581
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwResourceLinks] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Resource Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
10582
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10583
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Resource Links', rows);
|
|
10584
|
+
return result;
|
|
10585
|
+
}
|
|
10586
|
+
|
|
10587
10587
|
@FieldResolver(() => [AIAgentRequest_])
|
|
10588
10588
|
async AIAgentRequests_ResponseByUserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10589
10589
|
this.CheckUserReadPermissions('AI Agent Requests', userPayload);
|
|
@@ -10595,14 +10595,14 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10595
10595
|
return result;
|
|
10596
10596
|
}
|
|
10597
10597
|
|
|
10598
|
-
@FieldResolver(() => [
|
|
10599
|
-
async
|
|
10600
|
-
this.CheckUserReadPermissions('
|
|
10598
|
+
@FieldResolver(() => [AIAgentNote_])
|
|
10599
|
+
async AIAgentNotes_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10600
|
+
this.CheckUserReadPermissions('AI Agent Notes', userPayload);
|
|
10601
10601
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10602
10602
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10603
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10603
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentNotes] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Notes', userPayload, EntityPermissionType.Read, 'AND');
|
|
10604
10604
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10605
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10605
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Notes', rows);
|
|
10606
10606
|
return result;
|
|
10607
10607
|
}
|
|
10608
10608
|
|
|
@@ -10617,14 +10617,14 @@ export class UserResolverBase extends ResolverBase {
|
|
|
10617
10617
|
return result;
|
|
10618
10618
|
}
|
|
10619
10619
|
|
|
10620
|
-
@FieldResolver(() => [
|
|
10621
|
-
async
|
|
10622
|
-
this.CheckUserReadPermissions('
|
|
10620
|
+
@FieldResolver(() => [DashboardUserPreference_])
|
|
10621
|
+
async MJ_DashboardUserPreferences_UserIDArray(@Root() user_: User_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
10622
|
+
this.CheckUserReadPermissions('MJ: Dashboard User Preferences', userPayload);
|
|
10623
10623
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10624
10624
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
10625
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
10625
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardUserPreferences] WHERE [UserID]='${user_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Dashboard User Preferences', userPayload, EntityPermissionType.Read, 'AND');
|
|
10626
10626
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
10627
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
10627
|
+
const result = this.ArrayMapFieldNamesToCodeNames('MJ: Dashboard User Preferences', rows);
|
|
10628
10628
|
return result;
|
|
10629
10629
|
}
|
|
10630
10630
|
|
|
@@ -11386,14 +11386,14 @@ export class UserView_ {
|
|
|
11386
11386
|
@MaxLength(510)
|
|
11387
11387
|
EntityBaseView: string;
|
|
11388
11388
|
|
|
11389
|
-
@Field(() => [
|
|
11390
|
-
|
|
11389
|
+
@Field(() => [EntityRelationship_])
|
|
11390
|
+
EntityRelationships_DisplayUserViewGUIDArray: EntityRelationship_[]; // Link to EntityRelationships
|
|
11391
11391
|
|
|
11392
11392
|
@Field(() => [UserViewRun_])
|
|
11393
11393
|
UserViewRuns_UserViewIDArray: UserViewRun_[]; // Link to UserViewRuns
|
|
11394
11394
|
|
|
11395
|
-
@Field(() => [
|
|
11396
|
-
|
|
11395
|
+
@Field(() => [DataContextItem_])
|
|
11396
|
+
DataContextItems_ViewIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
11397
11397
|
|
|
11398
11398
|
}
|
|
11399
11399
|
|
|
@@ -11596,14 +11596,14 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
11596
11596
|
return result;
|
|
11597
11597
|
}
|
|
11598
11598
|
|
|
11599
|
-
@FieldResolver(() => [
|
|
11600
|
-
async
|
|
11601
|
-
this.CheckUserReadPermissions('
|
|
11599
|
+
@FieldResolver(() => [EntityRelationship_])
|
|
11600
|
+
async EntityRelationships_DisplayUserViewGUIDArray(@Root() userview_: UserView_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11601
|
+
this.CheckUserReadPermissions('Entity Relationships', userPayload);
|
|
11602
11602
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11603
11603
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11604
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
11604
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityRelationships] WHERE [DisplayUserViewGUID]='${userview_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Relationships', userPayload, EntityPermissionType.Read, 'AND');
|
|
11605
11605
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11606
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
11606
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Relationships', rows);
|
|
11607
11607
|
return result;
|
|
11608
11608
|
}
|
|
11609
11609
|
|
|
@@ -11618,14 +11618,14 @@ export class UserViewResolverBase extends ResolverBase {
|
|
|
11618
11618
|
return result;
|
|
11619
11619
|
}
|
|
11620
11620
|
|
|
11621
|
-
@FieldResolver(() => [
|
|
11622
|
-
async
|
|
11623
|
-
this.CheckUserReadPermissions('
|
|
11621
|
+
@FieldResolver(() => [DataContextItem_])
|
|
11622
|
+
async DataContextItems_ViewIDArray(@Root() userview_: UserView_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11623
|
+
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
11624
11624
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11625
11625
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11626
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
11626
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [ViewID]='${userview_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
11627
11627
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11628
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
11628
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', rows);
|
|
11629
11629
|
return result;
|
|
11630
11630
|
}
|
|
11631
11631
|
|
|
@@ -11719,15 +11719,15 @@ export class CompanyIntegrationRun_ {
|
|
|
11719
11719
|
@MaxLength(200)
|
|
11720
11720
|
RunByUser: string;
|
|
11721
11721
|
|
|
11722
|
+
@Field(() => [CompanyIntegrationRunAPILog_])
|
|
11723
|
+
CompanyIntegrationRunAPILogs_CompanyIntegrationRunIDArray: CompanyIntegrationRunAPILog_[]; // Link to CompanyIntegrationRunAPILogs
|
|
11724
|
+
|
|
11722
11725
|
@Field(() => [ErrorLog_])
|
|
11723
11726
|
ErrorLogs_CompanyIntegrationRunIDArray: ErrorLog_[]; // Link to ErrorLogs
|
|
11724
11727
|
|
|
11725
11728
|
@Field(() => [CompanyIntegrationRunDetail_])
|
|
11726
11729
|
CompanyIntegrationRunDetails_CompanyIntegrationRunIDArray: CompanyIntegrationRunDetail_[]; // Link to CompanyIntegrationRunDetails
|
|
11727
11730
|
|
|
11728
|
-
@Field(() => [CompanyIntegrationRunAPILog_])
|
|
11729
|
-
CompanyIntegrationRunAPILogs_CompanyIntegrationRunIDArray: CompanyIntegrationRunAPILog_[]; // Link to CompanyIntegrationRunAPILogs
|
|
11730
|
-
|
|
11731
11731
|
}
|
|
11732
11732
|
|
|
11733
11733
|
//****************************************************************************
|
|
@@ -11864,6 +11864,17 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
11864
11864
|
return result;
|
|
11865
11865
|
}
|
|
11866
11866
|
|
|
11867
|
+
@FieldResolver(() => [CompanyIntegrationRunAPILog_])
|
|
11868
|
+
async CompanyIntegrationRunAPILogs_CompanyIntegrationRunIDArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11869
|
+
this.CheckUserReadPermissions('Company Integration Run API Logs', userPayload);
|
|
11870
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11871
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11872
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRunAPILogs] WHERE [CompanyIntegrationRunID]='${companyintegrationrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Company Integration Run API Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
11873
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11874
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Run API Logs', rows);
|
|
11875
|
+
return result;
|
|
11876
|
+
}
|
|
11877
|
+
|
|
11867
11878
|
@FieldResolver(() => [ErrorLog_])
|
|
11868
11879
|
async ErrorLogs_CompanyIntegrationRunIDArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11869
11880
|
this.CheckUserReadPermissions('Error Logs', userPayload);
|
|
@@ -11886,17 +11897,6 @@ export class CompanyIntegrationRunResolver extends ResolverBase {
|
|
|
11886
11897
|
return result;
|
|
11887
11898
|
}
|
|
11888
11899
|
|
|
11889
|
-
@FieldResolver(() => [CompanyIntegrationRunAPILog_])
|
|
11890
|
-
async CompanyIntegrationRunAPILogs_CompanyIntegrationRunIDArray(@Root() companyintegrationrun_: CompanyIntegrationRun_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
11891
|
-
this.CheckUserReadPermissions('Company Integration Run API Logs', userPayload);
|
|
11892
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11893
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
11894
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCompanyIntegrationRunAPILogs] WHERE [CompanyIntegrationRunID]='${companyintegrationrun_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Company Integration Run API Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
11895
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
11896
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Company Integration Run API Logs', rows);
|
|
11897
|
-
return result;
|
|
11898
|
-
}
|
|
11899
|
-
|
|
11900
11900
|
@Mutation(() => CompanyIntegrationRun_)
|
|
11901
11901
|
async CreateCompanyIntegrationRun(
|
|
11902
11902
|
@Arg('input', () => CreateCompanyIntegrationRunInput) input: CreateCompanyIntegrationRunInput,
|
|
@@ -12379,14 +12379,14 @@ export class Application_ {
|
|
|
12379
12379
|
@Field({nullable: true, description: `Comma-delimited list of schema names where entities will be automatically added to the application when created in those schemas`})
|
|
12380
12380
|
SchemaAutoAddNewEntities?: string;
|
|
12381
12381
|
|
|
12382
|
-
@Field(() => [
|
|
12383
|
-
|
|
12382
|
+
@Field(() => [ApplicationEntity_])
|
|
12383
|
+
ApplicationEntities_ApplicationIDArray: ApplicationEntity_[]; // Link to ApplicationEntities
|
|
12384
12384
|
|
|
12385
12385
|
@Field(() => [UserApplication_])
|
|
12386
12386
|
UserApplications_ApplicationIDArray: UserApplication_[]; // Link to UserApplications
|
|
12387
12387
|
|
|
12388
|
-
@Field(() => [
|
|
12389
|
-
|
|
12388
|
+
@Field(() => [ApplicationSetting_])
|
|
12389
|
+
ApplicationSettings_ApplicationIDArray: ApplicationSetting_[]; // Link to ApplicationSettings
|
|
12390
12390
|
|
|
12391
12391
|
@Field(() => [Dashboard_])
|
|
12392
12392
|
Dashboards_ApplicationIDArray: Dashboard_[]; // Link to Dashboards
|
|
@@ -12517,14 +12517,14 @@ export class ApplicationResolver extends ResolverBase {
|
|
|
12517
12517
|
return result;
|
|
12518
12518
|
}
|
|
12519
12519
|
|
|
12520
|
-
@FieldResolver(() => [
|
|
12521
|
-
async
|
|
12522
|
-
this.CheckUserReadPermissions('Application
|
|
12520
|
+
@FieldResolver(() => [ApplicationEntity_])
|
|
12521
|
+
async ApplicationEntities_ApplicationIDArray(@Root() application_: Application_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12522
|
+
this.CheckUserReadPermissions('Application Entities', userPayload);
|
|
12523
12523
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12524
12524
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
12525
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
12525
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationEntities] WHERE [ApplicationID]='${application_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Application Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
12526
12526
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
12527
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Application
|
|
12527
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Application Entities', rows);
|
|
12528
12528
|
return result;
|
|
12529
12529
|
}
|
|
12530
12530
|
|
|
@@ -12539,14 +12539,14 @@ export class ApplicationResolver extends ResolverBase {
|
|
|
12539
12539
|
return result;
|
|
12540
12540
|
}
|
|
12541
12541
|
|
|
12542
|
-
@FieldResolver(() => [
|
|
12543
|
-
async
|
|
12544
|
-
this.CheckUserReadPermissions('Application
|
|
12542
|
+
@FieldResolver(() => [ApplicationSetting_])
|
|
12543
|
+
async ApplicationSettings_ApplicationIDArray(@Root() application_: Application_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12544
|
+
this.CheckUserReadPermissions('Application Settings', userPayload);
|
|
12545
12545
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12546
12546
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
12547
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
12547
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwApplicationSettings] WHERE [ApplicationID]='${application_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Application Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
12548
12548
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
12549
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Application
|
|
12549
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Application Settings', rows);
|
|
12550
12550
|
return result;
|
|
12551
12551
|
}
|
|
12552
12552
|
|
|
@@ -15848,17 +15848,17 @@ export class Authorization_ {
|
|
|
15848
15848
|
@Field(() => [AuthorizationRole_])
|
|
15849
15849
|
AuthorizationRoles_AuthorizationIDArray: AuthorizationRole_[]; // Link to AuthorizationRoles
|
|
15850
15850
|
|
|
15851
|
-
@Field(() => [ActionAuthorization_])
|
|
15852
|
-
ActionAuthorizations_AuthorizationIDArray: ActionAuthorization_[]; // Link to ActionAuthorizations
|
|
15853
|
-
|
|
15854
15851
|
@Field(() => [Authorization_])
|
|
15855
15852
|
Authorizations_ParentIDArray: Authorization_[]; // Link to Authorizations
|
|
15856
15853
|
|
|
15854
|
+
@Field(() => [AuditLogType_])
|
|
15855
|
+
AuditLogTypes_AuthorizationNameArray: AuditLogType_[]; // Link to AuditLogTypes
|
|
15856
|
+
|
|
15857
15857
|
@Field(() => [AuditLog_])
|
|
15858
15858
|
AuditLogs_AuthorizationNameArray: AuditLog_[]; // Link to AuditLogs
|
|
15859
15859
|
|
|
15860
|
-
@Field(() => [
|
|
15861
|
-
|
|
15860
|
+
@Field(() => [ActionAuthorization_])
|
|
15861
|
+
ActionAuthorizations_AuthorizationIDArray: ActionAuthorization_[]; // Link to ActionAuthorizations
|
|
15862
15862
|
|
|
15863
15863
|
}
|
|
15864
15864
|
|
|
@@ -15994,25 +15994,25 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
15994
15994
|
return result;
|
|
15995
15995
|
}
|
|
15996
15996
|
|
|
15997
|
-
@FieldResolver(() => [
|
|
15998
|
-
async
|
|
15999
|
-
this.CheckUserReadPermissions('
|
|
15997
|
+
@FieldResolver(() => [Authorization_])
|
|
15998
|
+
async Authorizations_ParentIDArray(@Root() authorization_: Authorization_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
15999
|
+
this.CheckUserReadPermissions('Authorizations', userPayload);
|
|
16000
16000
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16001
16001
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16002
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16002
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuthorizations] WHERE [ParentID]='${authorization_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Authorizations', userPayload, EntityPermissionType.Read, 'AND');
|
|
16003
16003
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16004
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
16004
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Authorizations', rows);
|
|
16005
16005
|
return result;
|
|
16006
16006
|
}
|
|
16007
16007
|
|
|
16008
|
-
@FieldResolver(() => [
|
|
16009
|
-
async
|
|
16010
|
-
this.CheckUserReadPermissions('
|
|
16008
|
+
@FieldResolver(() => [AuditLogType_])
|
|
16009
|
+
async AuditLogTypes_AuthorizationNameArray(@Root() authorization_: Authorization_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16010
|
+
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
16011
16011
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16012
16012
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16013
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16013
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogTypes] WHERE [AuthorizationName]='${authorization_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Log Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
16014
16014
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16015
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
16015
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Log Types', rows);
|
|
16016
16016
|
return result;
|
|
16017
16017
|
}
|
|
16018
16018
|
|
|
@@ -16027,14 +16027,14 @@ export class AuthorizationResolver extends ResolverBase {
|
|
|
16027
16027
|
return result;
|
|
16028
16028
|
}
|
|
16029
16029
|
|
|
16030
|
-
@FieldResolver(() => [
|
|
16031
|
-
async
|
|
16032
|
-
this.CheckUserReadPermissions('
|
|
16030
|
+
@FieldResolver(() => [ActionAuthorization_])
|
|
16031
|
+
async ActionAuthorizations_AuthorizationIDArray(@Root() authorization_: Authorization_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16032
|
+
this.CheckUserReadPermissions('Action Authorizations', userPayload);
|
|
16033
16033
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16034
16034
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16035
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16035
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionAuthorizations] WHERE [AuthorizationID]='${authorization_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Action Authorizations', userPayload, EntityPermissionType.Read, 'AND');
|
|
16036
16036
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16037
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
16037
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Action Authorizations', rows);
|
|
16038
16038
|
return result;
|
|
16039
16039
|
}
|
|
16040
16040
|
|
|
@@ -16284,12 +16284,12 @@ export class AuditLogType_ {
|
|
|
16284
16284
|
@MaxLength(200)
|
|
16285
16285
|
Authorization?: string;
|
|
16286
16286
|
|
|
16287
|
-
@Field(() => [AuditLogType_])
|
|
16288
|
-
AuditLogTypes_ParentIDArray: AuditLogType_[]; // Link to AuditLogTypes
|
|
16289
|
-
|
|
16290
16287
|
@Field(() => [AuditLog_])
|
|
16291
16288
|
AuditLogs_AuditLogTypeNameArray: AuditLog_[]; // Link to AuditLogs
|
|
16292
16289
|
|
|
16290
|
+
@Field(() => [AuditLogType_])
|
|
16291
|
+
AuditLogTypes_ParentIDArray: AuditLogType_[]; // Link to AuditLogTypes
|
|
16292
|
+
|
|
16293
16293
|
}
|
|
16294
16294
|
|
|
16295
16295
|
//****************************************************************************
|
|
@@ -16407,25 +16407,25 @@ export class AuditLogTypeResolver extends ResolverBase {
|
|
|
16407
16407
|
return result;
|
|
16408
16408
|
}
|
|
16409
16409
|
|
|
16410
|
-
@FieldResolver(() => [
|
|
16411
|
-
async
|
|
16412
|
-
this.CheckUserReadPermissions('Audit
|
|
16410
|
+
@FieldResolver(() => [AuditLog_])
|
|
16411
|
+
async AuditLogs_AuditLogTypeNameArray(@Root() auditlogtype_: AuditLogType_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16412
|
+
this.CheckUserReadPermissions('Audit Logs', userPayload);
|
|
16413
16413
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16414
16414
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16415
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16415
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogs] WHERE [AuditLogTypeName]='${auditlogtype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
16416
16416
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16417
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Audit
|
|
16417
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Logs', rows);
|
|
16418
16418
|
return result;
|
|
16419
16419
|
}
|
|
16420
16420
|
|
|
16421
|
-
@FieldResolver(() => [
|
|
16422
|
-
async
|
|
16423
|
-
this.CheckUserReadPermissions('Audit
|
|
16421
|
+
@FieldResolver(() => [AuditLogType_])
|
|
16422
|
+
async AuditLogTypes_ParentIDArray(@Root() auditlogtype_: AuditLogType_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16423
|
+
this.CheckUserReadPermissions('Audit Log Types', userPayload);
|
|
16424
16424
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16425
16425
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16426
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16426
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAuditLogTypes] WHERE [ParentID]='${auditlogtype_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Audit Log Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
16427
16427
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16428
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Audit
|
|
16428
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Audit Log Types', rows);
|
|
16429
16429
|
return result;
|
|
16430
16430
|
}
|
|
16431
16431
|
|
|
@@ -16733,36 +16733,36 @@ export class AIModel_ {
|
|
|
16733
16733
|
@Field(() => [AIAction_])
|
|
16734
16734
|
AIActions_DefaultModelIDArray: AIAction_[]; // Link to AIActions
|
|
16735
16735
|
|
|
16736
|
-
@Field(() => [EntityDocument_])
|
|
16737
|
-
EntityDocuments_AIModelIDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
16738
|
-
|
|
16739
16736
|
@Field(() => [AIModelAction_])
|
|
16740
16737
|
AIModelActions_AIModelIDArray: AIModelAction_[]; // Link to AIModelActions
|
|
16741
16738
|
|
|
16742
16739
|
@Field(() => [VectorIndex_])
|
|
16743
16740
|
VectorIndexes_EmbeddingModelIDArray: VectorIndex_[]; // Link to VectorIndexes
|
|
16744
16741
|
|
|
16742
|
+
@Field(() => [EntityDocument_])
|
|
16743
|
+
EntityDocuments_AIModelIDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
16744
|
+
|
|
16745
|
+
@Field(() => [EntityAIAction_])
|
|
16746
|
+
EntityAIActions_AIModelIDArray: EntityAIAction_[]; // Link to EntityAIActions
|
|
16747
|
+
|
|
16745
16748
|
@Field(() => [ContentType_])
|
|
16746
16749
|
ContentTypes_AIModelIDArray: ContentType_[]; // Link to ContentTypes
|
|
16747
16750
|
|
|
16748
16751
|
@Field(() => [AIResultCache_])
|
|
16749
16752
|
AIResultCache_AIModelIDArray: AIResultCache_[]; // Link to AIResultCache
|
|
16750
16753
|
|
|
16751
|
-
@Field(() => [
|
|
16752
|
-
|
|
16754
|
+
@Field(() => [AIAgentModel_])
|
|
16755
|
+
AIAgentModels_ModelIDArray: AIAgentModel_[]; // Link to AIAgentModels
|
|
16753
16756
|
|
|
16754
16757
|
@Field(() => [AIModelVendor_])
|
|
16755
16758
|
MJ_AIModelVendors_ModelIDArray: AIModelVendor_[]; // Link to MJ_AIModelVendors
|
|
16756
16759
|
|
|
16757
|
-
@Field(() => [
|
|
16758
|
-
|
|
16760
|
+
@Field(() => [GeneratedCode_])
|
|
16761
|
+
GeneratedCodes_GeneratedByModelIDArray: GeneratedCode_[]; // Link to GeneratedCodes
|
|
16759
16762
|
|
|
16760
16763
|
@Field(() => [AIModelCost_])
|
|
16761
16764
|
MJ_AIModelCosts_ModelIDArray: AIModelCost_[]; // Link to MJ_AIModelCosts
|
|
16762
16765
|
|
|
16763
|
-
@Field(() => [GeneratedCode_])
|
|
16764
|
-
GeneratedCodes_GeneratedByModelIDArray: GeneratedCode_[]; // Link to GeneratedCodes
|
|
16765
|
-
|
|
16766
16766
|
@Field(() => [AIPromptModel_])
|
|
16767
16767
|
MJ_AIPromptModels_ModelIDArray: AIPromptModel_[]; // Link to MJ_AIPromptModels
|
|
16768
16768
|
|
|
@@ -16921,17 +16921,6 @@ export class AIModelResolver extends ResolverBase {
|
|
|
16921
16921
|
return result;
|
|
16922
16922
|
}
|
|
16923
16923
|
|
|
16924
|
-
@FieldResolver(() => [EntityDocument_])
|
|
16925
|
-
async EntityDocuments_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16926
|
-
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
16927
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16928
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16929
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
16930
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16931
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', rows);
|
|
16932
|
-
return result;
|
|
16933
|
-
}
|
|
16934
|
-
|
|
16935
16924
|
@FieldResolver(() => [AIModelAction_])
|
|
16936
16925
|
async AIModelActions_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16937
16926
|
this.CheckUserReadPermissions('AI Model Actions', userPayload);
|
|
@@ -16954,6 +16943,28 @@ export class AIModelResolver extends ResolverBase {
|
|
|
16954
16943
|
return result;
|
|
16955
16944
|
}
|
|
16956
16945
|
|
|
16946
|
+
@FieldResolver(() => [EntityDocument_])
|
|
16947
|
+
async EntityDocuments_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16948
|
+
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
16949
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16950
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16951
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
16952
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16953
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', rows);
|
|
16954
|
+
return result;
|
|
16955
|
+
}
|
|
16956
|
+
|
|
16957
|
+
@FieldResolver(() => [EntityAIAction_])
|
|
16958
|
+
async EntityAIActions_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16959
|
+
this.CheckUserReadPermissions('Entity AI Actions', userPayload);
|
|
16960
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16961
|
+
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16962
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityAIActions] WHERE [AIModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity AI Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
16963
|
+
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16964
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity AI Actions', rows);
|
|
16965
|
+
return result;
|
|
16966
|
+
}
|
|
16967
|
+
|
|
16957
16968
|
@FieldResolver(() => [ContentType_])
|
|
16958
16969
|
async ContentTypes_AIModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16959
16970
|
this.CheckUserReadPermissions('Content Types', userPayload);
|
|
@@ -16976,14 +16987,14 @@ export class AIModelResolver extends ResolverBase {
|
|
|
16976
16987
|
return result;
|
|
16977
16988
|
}
|
|
16978
16989
|
|
|
16979
|
-
@FieldResolver(() => [
|
|
16980
|
-
async
|
|
16981
|
-
this.CheckUserReadPermissions('
|
|
16990
|
+
@FieldResolver(() => [AIAgentModel_])
|
|
16991
|
+
async AIAgentModels_ModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
16992
|
+
this.CheckUserReadPermissions('AI Agent Models', userPayload);
|
|
16982
16993
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16983
16994
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
16984
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
16995
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwAIAgentModels] WHERE [ModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'AI Agent Models', userPayload, EntityPermissionType.Read, 'AND');
|
|
16985
16996
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
16986
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
16997
|
+
const result = this.ArrayMapFieldNamesToCodeNames('AI Agent Models', rows);
|
|
16987
16998
|
return result;
|
|
16988
16999
|
}
|
|
16989
17000
|
|
|
@@ -16998,14 +17009,14 @@ export class AIModelResolver extends ResolverBase {
|
|
|
16998
17009
|
return result;
|
|
16999
17010
|
}
|
|
17000
17011
|
|
|
17001
|
-
@FieldResolver(() => [
|
|
17002
|
-
async
|
|
17003
|
-
this.CheckUserReadPermissions('
|
|
17012
|
+
@FieldResolver(() => [GeneratedCode_])
|
|
17013
|
+
async GeneratedCodes_GeneratedByModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17014
|
+
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
17004
17015
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17005
17016
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
17006
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
17017
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [GeneratedByModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
17007
17018
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
17008
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
17019
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Generated Codes', rows);
|
|
17009
17020
|
return result;
|
|
17010
17021
|
}
|
|
17011
17022
|
|
|
@@ -17020,17 +17031,6 @@ export class AIModelResolver extends ResolverBase {
|
|
|
17020
17031
|
return result;
|
|
17021
17032
|
}
|
|
17022
17033
|
|
|
17023
|
-
@FieldResolver(() => [GeneratedCode_])
|
|
17024
|
-
async GeneratedCodes_GeneratedByModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17025
|
-
this.CheckUserReadPermissions('Generated Codes', userPayload);
|
|
17026
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17027
|
-
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
17028
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwGeneratedCodes] WHERE [GeneratedByModelID]='${aimodel_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Generated Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
17029
|
-
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
17030
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Generated Codes', rows);
|
|
17031
|
-
return result;
|
|
17032
|
-
}
|
|
17033
|
-
|
|
17034
17034
|
@FieldResolver(() => [AIPromptModel_])
|
|
17035
17035
|
async MJ_AIPromptModels_ModelIDArray(@Root() aimodel_: AIModel_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17036
17036
|
this.CheckUserReadPermissions('MJ: AI Prompt Models', userPayload);
|
|
@@ -23417,12 +23417,12 @@ export class Query_ {
|
|
|
23417
23417
|
@Field(() => [QueryField_])
|
|
23418
23418
|
QueryFields_QueryIDArray: QueryField_[]; // Link to QueryFields
|
|
23419
23419
|
|
|
23420
|
-
@Field(() => [DataContextItem_])
|
|
23421
|
-
DataContextItems_QueryIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
23422
|
-
|
|
23423
23420
|
@Field(() => [QueryPermission_])
|
|
23424
23421
|
QueryPermissions_QueryIDArray: QueryPermission_[]; // Link to QueryPermissions
|
|
23425
23422
|
|
|
23423
|
+
@Field(() => [DataContextItem_])
|
|
23424
|
+
DataContextItems_QueryIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
23425
|
+
|
|
23426
23426
|
@Field(() => [QueryParameter_])
|
|
23427
23427
|
MJ_QueryParameters_QueryIDArray: QueryParameter_[]; // Link to MJ_QueryParameters
|
|
23428
23428
|
|
|
@@ -23594,25 +23594,25 @@ export class QueryResolver extends ResolverBase {
|
|
|
23594
23594
|
return result;
|
|
23595
23595
|
}
|
|
23596
23596
|
|
|
23597
|
-
@FieldResolver(() => [
|
|
23598
|
-
async
|
|
23599
|
-
this.CheckUserReadPermissions('
|
|
23597
|
+
@FieldResolver(() => [QueryPermission_])
|
|
23598
|
+
async QueryPermissions_QueryIDArray(@Root() query_: Query_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23599
|
+
this.CheckUserReadPermissions('Query Permissions', userPayload);
|
|
23600
23600
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23601
23601
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
23602
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
23602
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwQueryPermissions] WHERE [QueryID]='${query_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Query Permissions', userPayload, EntityPermissionType.Read, 'AND');
|
|
23603
23603
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
23604
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
23604
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Query Permissions', rows);
|
|
23605
23605
|
return result;
|
|
23606
23606
|
}
|
|
23607
23607
|
|
|
23608
|
-
@FieldResolver(() => [
|
|
23609
|
-
async
|
|
23610
|
-
this.CheckUserReadPermissions('
|
|
23608
|
+
@FieldResolver(() => [DataContextItem_])
|
|
23609
|
+
async DataContextItems_QueryIDArray(@Root() query_: Query_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
23610
|
+
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
23611
23611
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
23612
23612
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
23613
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
23613
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [QueryID]='${query_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
23614
23614
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
23615
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
23615
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', rows);
|
|
23616
23616
|
return result;
|
|
23617
23617
|
}
|
|
23618
23618
|
|
|
@@ -24377,12 +24377,12 @@ export class VectorDatabase_ {
|
|
|
24377
24377
|
@MaxLength(10)
|
|
24378
24378
|
_mj__UpdatedAt: Date;
|
|
24379
24379
|
|
|
24380
|
-
@Field(() => [EntityDocument_])
|
|
24381
|
-
EntityDocuments_IDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
24382
|
-
|
|
24383
24380
|
@Field(() => [VectorIndex_])
|
|
24384
24381
|
VectorIndexes_VectorDatabaseIDArray: VectorIndex_[]; // Link to VectorIndexes
|
|
24385
24382
|
|
|
24383
|
+
@Field(() => [EntityDocument_])
|
|
24384
|
+
EntityDocuments_IDArray: EntityDocument_[]; // Link to EntityDocuments
|
|
24385
|
+
|
|
24386
24386
|
}
|
|
24387
24387
|
|
|
24388
24388
|
//****************************************************************************
|
|
@@ -24489,25 +24489,25 @@ export class VectorDatabaseResolver extends ResolverBase {
|
|
|
24489
24489
|
return result;
|
|
24490
24490
|
}
|
|
24491
24491
|
|
|
24492
|
-
@FieldResolver(() => [
|
|
24493
|
-
async
|
|
24494
|
-
this.CheckUserReadPermissions('
|
|
24492
|
+
@FieldResolver(() => [VectorIndex_])
|
|
24493
|
+
async VectorIndexes_VectorDatabaseIDArray(@Root() vectordatabase_: VectorDatabase_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24494
|
+
this.CheckUserReadPermissions('Vector Indexes', userPayload);
|
|
24495
24495
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24496
24496
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
24497
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
24497
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwVectorIndexes] WHERE [VectorDatabaseID]='${vectordatabase_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Vector Indexes', userPayload, EntityPermissionType.Read, 'AND');
|
|
24498
24498
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
24499
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
24499
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Vector Indexes', rows);
|
|
24500
24500
|
return result;
|
|
24501
24501
|
}
|
|
24502
24502
|
|
|
24503
|
-
@FieldResolver(() => [
|
|
24504
|
-
async
|
|
24505
|
-
this.CheckUserReadPermissions('
|
|
24503
|
+
@FieldResolver(() => [EntityDocument_])
|
|
24504
|
+
async EntityDocuments_IDArray(@Root() vectordatabase_: VectorDatabase_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24505
|
+
this.CheckUserReadPermissions('Entity Documents', userPayload);
|
|
24506
24506
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24507
24507
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
24508
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
24508
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocuments] WHERE [ID]='${vectordatabase_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Documents', userPayload, EntityPermissionType.Read, 'AND');
|
|
24509
24509
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
24510
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
24510
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Documents', rows);
|
|
24511
24511
|
return result;
|
|
24512
24512
|
}
|
|
24513
24513
|
|
|
@@ -24829,12 +24829,12 @@ export class EntityDocument_ {
|
|
|
24829
24829
|
@MaxLength(100)
|
|
24830
24830
|
AIModel: string;
|
|
24831
24831
|
|
|
24832
|
-
@Field(() => [EntityDocumentSetting_])
|
|
24833
|
-
EntityDocumentSettings_EntityDocumentIDArray: EntityDocumentSetting_[]; // Link to EntityDocumentSettings
|
|
24834
|
-
|
|
24835
24832
|
@Field(() => [EntityDocumentRun_])
|
|
24836
24833
|
EntityDocumentRuns_EntityDocumentIDArray: EntityDocumentRun_[]; // Link to EntityDocumentRuns
|
|
24837
24834
|
|
|
24835
|
+
@Field(() => [EntityDocumentSetting_])
|
|
24836
|
+
EntityDocumentSettings_EntityDocumentIDArray: EntityDocumentSetting_[]; // Link to EntityDocumentSettings
|
|
24837
|
+
|
|
24838
24838
|
@Field(() => [EntityRecordDocument_])
|
|
24839
24839
|
EntityRecordDocuments_EntityDocumentIDArray: EntityRecordDocument_[]; // Link to EntityRecordDocuments
|
|
24840
24840
|
|
|
@@ -24974,25 +24974,25 @@ export class EntityDocumentResolver extends ResolverBase {
|
|
|
24974
24974
|
return result;
|
|
24975
24975
|
}
|
|
24976
24976
|
|
|
24977
|
-
@FieldResolver(() => [
|
|
24978
|
-
async
|
|
24979
|
-
this.CheckUserReadPermissions('Entity Document
|
|
24977
|
+
@FieldResolver(() => [EntityDocumentRun_])
|
|
24978
|
+
async EntityDocumentRuns_EntityDocumentIDArray(@Root() entitydocument_: EntityDocument_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24979
|
+
this.CheckUserReadPermissions('Entity Document Runs', userPayload);
|
|
24980
24980
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24981
24981
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
24982
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
24982
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocumentRuns] WHERE [EntityDocumentID]='${entitydocument_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Document Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
24983
24983
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
24984
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document
|
|
24984
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document Runs', rows);
|
|
24985
24985
|
return result;
|
|
24986
24986
|
}
|
|
24987
24987
|
|
|
24988
|
-
@FieldResolver(() => [
|
|
24989
|
-
async
|
|
24990
|
-
this.CheckUserReadPermissions('Entity Document
|
|
24988
|
+
@FieldResolver(() => [EntityDocumentSetting_])
|
|
24989
|
+
async EntityDocumentSettings_EntityDocumentIDArray(@Root() entitydocument_: EntityDocument_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
24990
|
+
this.CheckUserReadPermissions('Entity Document Settings', userPayload);
|
|
24991
24991
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
24992
24992
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
24993
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
24993
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwEntityDocumentSettings] WHERE [EntityDocumentID]='${entitydocument_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Entity Document Settings', userPayload, EntityPermissionType.Read, 'AND');
|
|
24994
24994
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
24995
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document
|
|
24995
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Entity Document Settings', rows);
|
|
24996
24996
|
return result;
|
|
24997
24997
|
}
|
|
24998
24998
|
|
|
@@ -25323,12 +25323,12 @@ export class DataContext_ {
|
|
|
25323
25323
|
@MaxLength(200)
|
|
25324
25324
|
User: string;
|
|
25325
25325
|
|
|
25326
|
-
@Field(() => [Report_])
|
|
25327
|
-
Reports_DataContextIDArray: Report_[]; // Link to Reports
|
|
25328
|
-
|
|
25329
25326
|
@Field(() => [DataContextItem_])
|
|
25330
25327
|
DataContextItems_DataContextIDArray: DataContextItem_[]; // Link to DataContextItems
|
|
25331
25328
|
|
|
25329
|
+
@Field(() => [Report_])
|
|
25330
|
+
Reports_DataContextIDArray: Report_[]; // Link to Reports
|
|
25331
|
+
|
|
25332
25332
|
@Field(() => [Conversation_])
|
|
25333
25333
|
Conversations_DataContextIDArray: Conversation_[]; // Link to Conversations
|
|
25334
25334
|
|
|
@@ -25438,25 +25438,25 @@ export class DataContextResolver extends ResolverBase {
|
|
|
25438
25438
|
return result;
|
|
25439
25439
|
}
|
|
25440
25440
|
|
|
25441
|
-
@FieldResolver(() => [
|
|
25442
|
-
async
|
|
25443
|
-
this.CheckUserReadPermissions('
|
|
25441
|
+
@FieldResolver(() => [DataContextItem_])
|
|
25442
|
+
async DataContextItems_DataContextIDArray(@Root() datacontext_: DataContext_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25443
|
+
this.CheckUserReadPermissions('Data Context Items', userPayload);
|
|
25444
25444
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25445
25445
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
25446
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25446
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDataContextItems] WHERE [DataContextID]='${datacontext_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Data Context Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
25447
25447
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
25448
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
25448
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Data Context Items', rows);
|
|
25449
25449
|
return result;
|
|
25450
25450
|
}
|
|
25451
25451
|
|
|
25452
|
-
@FieldResolver(() => [
|
|
25453
|
-
async
|
|
25454
|
-
this.CheckUserReadPermissions('
|
|
25452
|
+
@FieldResolver(() => [Report_])
|
|
25453
|
+
async Reports_DataContextIDArray(@Root() datacontext_: DataContext_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25454
|
+
this.CheckUserReadPermissions('Reports', userPayload);
|
|
25455
25455
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25456
25456
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
25457
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25457
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwReports] WHERE [DataContextID]='${datacontext_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
25458
25458
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
25459
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
25459
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Reports', rows);
|
|
25460
25460
|
return result;
|
|
25461
25461
|
}
|
|
25462
25462
|
|
|
@@ -25757,12 +25757,12 @@ export class DashboardCategory_ {
|
|
|
25757
25757
|
@MaxLength(200)
|
|
25758
25758
|
User: string;
|
|
25759
25759
|
|
|
25760
|
-
@Field(() => [DashboardCategory_])
|
|
25761
|
-
DashboardCategories_ParentIDArray: DashboardCategory_[]; // Link to DashboardCategories
|
|
25762
|
-
|
|
25763
25760
|
@Field(() => [Dashboard_])
|
|
25764
25761
|
Dashboards_CategoryIDArray: Dashboard_[]; // Link to Dashboards
|
|
25765
25762
|
|
|
25763
|
+
@Field(() => [DashboardCategory_])
|
|
25764
|
+
DashboardCategories_ParentIDArray: DashboardCategory_[]; // Link to DashboardCategories
|
|
25765
|
+
|
|
25766
25766
|
}
|
|
25767
25767
|
|
|
25768
25768
|
//****************************************************************************
|
|
@@ -25869,25 +25869,25 @@ export class DashboardCategoryResolver extends ResolverBase {
|
|
|
25869
25869
|
return result;
|
|
25870
25870
|
}
|
|
25871
25871
|
|
|
25872
|
-
@FieldResolver(() => [
|
|
25873
|
-
async
|
|
25874
|
-
this.CheckUserReadPermissions('
|
|
25872
|
+
@FieldResolver(() => [Dashboard_])
|
|
25873
|
+
async Dashboards_CategoryIDArray(@Root() dashboardcategory_: DashboardCategory_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25874
|
+
this.CheckUserReadPermissions('Dashboards', userPayload);
|
|
25875
25875
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25876
25876
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
25877
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25877
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboards] WHERE [CategoryID]='${dashboardcategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboards', userPayload, EntityPermissionType.Read, 'AND');
|
|
25878
25878
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
25879
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
25879
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboards', rows);
|
|
25880
25880
|
return result;
|
|
25881
25881
|
}
|
|
25882
25882
|
|
|
25883
|
-
@FieldResolver(() => [
|
|
25884
|
-
async
|
|
25885
|
-
this.CheckUserReadPermissions('
|
|
25883
|
+
@FieldResolver(() => [DashboardCategory_])
|
|
25884
|
+
async DashboardCategories_ParentIDArray(@Root() dashboardcategory_: DashboardCategory_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
25885
|
+
this.CheckUserReadPermissions('Dashboard Categories', userPayload);
|
|
25886
25886
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
25887
25887
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
25888
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
25888
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwDashboardCategories] WHERE [ParentID]='${dashboardcategory_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Dashboard Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
25889
25889
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
25890
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
25890
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Dashboard Categories', rows);
|
|
25891
25891
|
return result;
|
|
25892
25892
|
}
|
|
25893
25893
|
|
|
@@ -29311,12 +29311,12 @@ export class Action_ {
|
|
|
29311
29311
|
@Field(() => [ActionLibrary_])
|
|
29312
29312
|
ActionLibraries_ActionIDArray: ActionLibrary_[]; // Link to ActionLibraries
|
|
29313
29313
|
|
|
29314
|
-
@Field(() => [ScheduledAction_])
|
|
29315
|
-
ScheduledActions_ActionIDArray: ScheduledAction_[]; // Link to ScheduledActions
|
|
29316
|
-
|
|
29317
29314
|
@Field(() => [ActionResultCode_])
|
|
29318
29315
|
ActionResultCodes_ActionIDArray: ActionResultCode_[]; // Link to ActionResultCodes
|
|
29319
29316
|
|
|
29317
|
+
@Field(() => [ScheduledAction_])
|
|
29318
|
+
ScheduledActions_ActionIDArray: ScheduledAction_[]; // Link to ScheduledActions
|
|
29319
|
+
|
|
29320
29320
|
@Field(() => [AIAgentAction_])
|
|
29321
29321
|
AIAgentActions_ActionIDArray: AIAgentAction_[]; // Link to AIAgentActions
|
|
29322
29322
|
|
|
@@ -29556,25 +29556,25 @@ export class ActionResolver extends ResolverBase {
|
|
|
29556
29556
|
return result;
|
|
29557
29557
|
}
|
|
29558
29558
|
|
|
29559
|
-
@FieldResolver(() => [
|
|
29560
|
-
async
|
|
29561
|
-
this.CheckUserReadPermissions('
|
|
29559
|
+
@FieldResolver(() => [ActionResultCode_])
|
|
29560
|
+
async ActionResultCodes_ActionIDArray(@Root() action_: Action_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29561
|
+
this.CheckUserReadPermissions('Action Result Codes', userPayload);
|
|
29562
29562
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29563
29563
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29564
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
29564
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwActionResultCodes] WHERE [ActionID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Action Result Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
29565
29565
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
29566
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
29566
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Action Result Codes', rows);
|
|
29567
29567
|
return result;
|
|
29568
29568
|
}
|
|
29569
29569
|
|
|
29570
|
-
@FieldResolver(() => [
|
|
29571
|
-
async
|
|
29572
|
-
this.CheckUserReadPermissions('
|
|
29570
|
+
@FieldResolver(() => [ScheduledAction_])
|
|
29571
|
+
async ScheduledActions_ActionIDArray(@Root() action_: Action_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
29572
|
+
this.CheckUserReadPermissions('Scheduled Actions', userPayload);
|
|
29573
29573
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
29574
29574
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
29575
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
29575
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwScheduledActions] WHERE [ActionID]='${action_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Scheduled Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
29576
29576
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
29577
|
-
const result = this.ArrayMapFieldNamesToCodeNames('
|
|
29577
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Scheduled Actions', rows);
|
|
29578
29578
|
return result;
|
|
29579
29579
|
}
|
|
29580
29580
|
|
|
@@ -31589,12 +31589,12 @@ export class CommunicationProvider_ {
|
|
|
31589
31589
|
@Field(() => Boolean, {description: `Whether or not the provider supports replying to messages`})
|
|
31590
31590
|
SupportsReplying: boolean;
|
|
31591
31591
|
|
|
31592
|
-
@Field(() => [CommunicationLog_])
|
|
31593
|
-
CommunicationLogs_CommunicationProviderIDArray: CommunicationLog_[]; // Link to CommunicationLogs
|
|
31594
|
-
|
|
31595
31592
|
@Field(() => [CommunicationProviderMessageType_])
|
|
31596
31593
|
CommunicationProviderMessageTypes_CommunicationProviderIDArray: CommunicationProviderMessageType_[]; // Link to CommunicationProviderMessageTypes
|
|
31597
31594
|
|
|
31595
|
+
@Field(() => [CommunicationLog_])
|
|
31596
|
+
CommunicationLogs_CommunicationProviderIDArray: CommunicationLog_[]; // Link to CommunicationLogs
|
|
31597
|
+
|
|
31598
31598
|
}
|
|
31599
31599
|
|
|
31600
31600
|
//****************************************************************************
|
|
@@ -31725,25 +31725,25 @@ export class CommunicationProviderResolver extends ResolverBase {
|
|
|
31725
31725
|
return result;
|
|
31726
31726
|
}
|
|
31727
31727
|
|
|
31728
|
-
@FieldResolver(() => [
|
|
31729
|
-
async
|
|
31730
|
-
this.CheckUserReadPermissions('Communication
|
|
31728
|
+
@FieldResolver(() => [CommunicationProviderMessageType_])
|
|
31729
|
+
async CommunicationProviderMessageTypes_CommunicationProviderIDArray(@Root() communicationprovider_: CommunicationProvider_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31730
|
+
this.CheckUserReadPermissions('Communication Provider Message Types', userPayload);
|
|
31731
31731
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31732
31732
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
31733
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
31733
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCommunicationProviderMessageTypes] WHERE [CommunicationProviderID]='${communicationprovider_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Communication Provider Message Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
31734
31734
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
31735
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Communication
|
|
31735
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Communication Provider Message Types', rows);
|
|
31736
31736
|
return result;
|
|
31737
31737
|
}
|
|
31738
31738
|
|
|
31739
|
-
@FieldResolver(() => [
|
|
31740
|
-
async
|
|
31741
|
-
this.CheckUserReadPermissions('Communication
|
|
31739
|
+
@FieldResolver(() => [CommunicationLog_])
|
|
31740
|
+
async CommunicationLogs_CommunicationProviderIDArray(@Root() communicationprovider_: CommunicationProvider_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
31741
|
+
this.CheckUserReadPermissions('Communication Logs', userPayload);
|
|
31742
31742
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
31743
31743
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
31744
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
31744
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwCommunicationLogs] WHERE [CommunicationProviderID]='${communicationprovider_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Communication Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
31745
31745
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
31746
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Communication
|
|
31746
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Communication Logs', rows);
|
|
31747
31747
|
return result;
|
|
31748
31748
|
}
|
|
31749
31749
|
|
|
@@ -32659,12 +32659,12 @@ export class Template_ {
|
|
|
32659
32659
|
@MaxLength(200)
|
|
32660
32660
|
User: string;
|
|
32661
32661
|
|
|
32662
|
-
@Field(() => [TemplateContent_])
|
|
32663
|
-
TemplateContents_TemplateIDArray: TemplateContent_[]; // Link to TemplateContents
|
|
32664
|
-
|
|
32665
32662
|
@Field(() => [TemplateParam_])
|
|
32666
32663
|
TemplateParams_TemplateIDArray: TemplateParam_[]; // Link to TemplateParams
|
|
32667
32664
|
|
|
32665
|
+
@Field(() => [TemplateContent_])
|
|
32666
|
+
TemplateContents_TemplateIDArray: TemplateContent_[]; // Link to TemplateContents
|
|
32667
|
+
|
|
32668
32668
|
@Field(() => [AIPrompt_])
|
|
32669
32669
|
AIPrompts_TemplateIDArray: AIPrompt_[]; // Link to AIPrompts
|
|
32670
32670
|
|
|
@@ -32801,25 +32801,25 @@ export class TemplateResolver extends ResolverBase {
|
|
|
32801
32801
|
return result;
|
|
32802
32802
|
}
|
|
32803
32803
|
|
|
32804
|
-
@FieldResolver(() => [
|
|
32805
|
-
async
|
|
32806
|
-
this.CheckUserReadPermissions('Template
|
|
32804
|
+
@FieldResolver(() => [TemplateParam_])
|
|
32805
|
+
async TemplateParams_TemplateIDArray(@Root() template_: Template_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32806
|
+
this.CheckUserReadPermissions('Template Params', userPayload);
|
|
32807
32807
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
32808
32808
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
32809
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
32809
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateParams] WHERE [TemplateID]='${template_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Template Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
32810
32810
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
32811
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Template
|
|
32811
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Params', rows);
|
|
32812
32812
|
return result;
|
|
32813
32813
|
}
|
|
32814
32814
|
|
|
32815
|
-
@FieldResolver(() => [
|
|
32816
|
-
async
|
|
32817
|
-
this.CheckUserReadPermissions('Template
|
|
32815
|
+
@FieldResolver(() => [TemplateContent_])
|
|
32816
|
+
async TemplateContents_TemplateIDArray(@Root() template_: Template_, @Ctx() { dataSources, userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
32817
|
+
this.CheckUserReadPermissions('Template Contents', userPayload);
|
|
32818
32818
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
32819
32819
|
const connPool = GetReadOnlyDataSource(dataSources, { allowFallbackToReadWrite: true });
|
|
32820
|
-
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[
|
|
32820
|
+
const sSQL = `SELECT * FROM [${Metadata.Provider.ConfigData.MJCoreSchemaName}].[vwTemplateContents] WHERE [TemplateID]='${template_.ID}' ` + this.getRowLevelSecurityWhereClause(provider, 'Template Contents', userPayload, EntityPermissionType.Read, 'AND');
|
|
32821
32821
|
const rows = await SQLServerDataProvider.ExecuteSQLWithPool(connPool, sSQL, undefined, this.GetUserFromPayload(userPayload));
|
|
32822
|
-
const result = this.ArrayMapFieldNamesToCodeNames('Template
|
|
32822
|
+
const result = this.ArrayMapFieldNamesToCodeNames('Template Contents', rows);
|
|
32823
32823
|
return result;
|
|
32824
32824
|
}
|
|
32825
32825
|
|
|
@@ -40955,6 +40955,52 @@ export class AIPromptRun_ {
|
|
|
40955
40955
|
@MaxLength(16)
|
|
40956
40956
|
RerunFromPromptRunID?: string;
|
|
40957
40957
|
|
|
40958
|
+
@Field({nullable: true, description: `JSON object containing detailed model selection information including all models considered, their scores, and the selection rationale`})
|
|
40959
|
+
ModelSelection?: string;
|
|
40960
|
+
|
|
40961
|
+
@Field({description: `Current execution status of the prompt run. Valid values: Pending, Running, Completed, Failed, Cancelled`})
|
|
40962
|
+
@MaxLength(100)
|
|
40963
|
+
Status: string;
|
|
40964
|
+
|
|
40965
|
+
@Field(() => Boolean, {description: `Indicates whether this prompt run was cancelled before completion`})
|
|
40966
|
+
Cancelled: boolean;
|
|
40967
|
+
|
|
40968
|
+
@Field({nullable: true, description: `Detailed reason for cancellation if the prompt run was cancelled. Could be user_requested, timeout, error, or resource_limit`})
|
|
40969
|
+
CancellationReason?: string;
|
|
40970
|
+
|
|
40971
|
+
@Field(() => Int, {nullable: true, description: `Power rank of the model that was selected for this run. Lower numbers indicate more powerful models`})
|
|
40972
|
+
ModelPowerRank?: number;
|
|
40973
|
+
|
|
40974
|
+
@Field({nullable: true, description: `Strategy used for model selection. Valid values: Default (system default), Specific (specific models configured), ByPower (based on power ranking)`})
|
|
40975
|
+
@MaxLength(100)
|
|
40976
|
+
SelectionStrategy?: string;
|
|
40977
|
+
|
|
40978
|
+
@Field(() => Boolean, {description: `Indicates whether this result was served from cache rather than executing a new model call`})
|
|
40979
|
+
CacheHit: boolean;
|
|
40980
|
+
|
|
40981
|
+
@Field({nullable: true, description: `Unique key used for caching this prompt result, typically a hash of the prompt and parameters`})
|
|
40982
|
+
@MaxLength(1000)
|
|
40983
|
+
CacheKey?: string;
|
|
40984
|
+
|
|
40985
|
+
@Field({nullable: true, description: `ID of the AIPrompt used as a judge to evaluate and rank multiple parallel execution results`})
|
|
40986
|
+
@MaxLength(16)
|
|
40987
|
+
JudgeID?: string;
|
|
40988
|
+
|
|
40989
|
+
@Field(() => Float, {nullable: true, description: `Score assigned by the judge prompt when evaluating multiple results. Higher scores indicate better results`})
|
|
40990
|
+
JudgeScore?: number;
|
|
40991
|
+
|
|
40992
|
+
@Field(() => Boolean, {description: `Indicates whether this result was selected as the best result when multiple models were run in parallel`})
|
|
40993
|
+
WasSelectedResult: boolean;
|
|
40994
|
+
|
|
40995
|
+
@Field(() => Boolean, {description: `Indicates whether streaming was enabled for this prompt execution`})
|
|
40996
|
+
StreamingEnabled: boolean;
|
|
40997
|
+
|
|
40998
|
+
@Field(() => Int, {nullable: true, description: `Time in milliseconds from request initiation to receiving the first token from the model`})
|
|
40999
|
+
FirstTokenTime?: number;
|
|
41000
|
+
|
|
41001
|
+
@Field({nullable: true, description: `Detailed error information in JSON format if the prompt execution failed, including stack traces and error codes`})
|
|
41002
|
+
ErrorDetails?: string;
|
|
41003
|
+
|
|
40958
41004
|
@Field()
|
|
40959
41005
|
@MaxLength(510)
|
|
40960
41006
|
Prompt: string;
|
|
@@ -40979,6 +41025,10 @@ export class AIPromptRun_ {
|
|
|
40979
41025
|
@MaxLength(100)
|
|
40980
41026
|
OriginalModel?: string;
|
|
40981
41027
|
|
|
41028
|
+
@Field({nullable: true})
|
|
41029
|
+
@MaxLength(510)
|
|
41030
|
+
Judge?: string;
|
|
41031
|
+
|
|
40982
41032
|
@Field(() => [AIPromptRun_])
|
|
40983
41033
|
MJ_AIPromptRuns_ParentIDArray: AIPromptRun_[]; // Link to MJ_AIPromptRuns
|
|
40984
41034
|
|
|
@@ -41168,6 +41218,48 @@ export class CreateAIPromptRunInput {
|
|
|
41168
41218
|
|
|
41169
41219
|
@Field({ nullable: true })
|
|
41170
41220
|
RerunFromPromptRunID: string | null;
|
|
41221
|
+
|
|
41222
|
+
@Field({ nullable: true })
|
|
41223
|
+
ModelSelection: string | null;
|
|
41224
|
+
|
|
41225
|
+
@Field({ nullable: true })
|
|
41226
|
+
Status?: string;
|
|
41227
|
+
|
|
41228
|
+
@Field(() => Boolean, { nullable: true })
|
|
41229
|
+
Cancelled?: boolean;
|
|
41230
|
+
|
|
41231
|
+
@Field({ nullable: true })
|
|
41232
|
+
CancellationReason: string | null;
|
|
41233
|
+
|
|
41234
|
+
@Field(() => Int, { nullable: true })
|
|
41235
|
+
ModelPowerRank: number | null;
|
|
41236
|
+
|
|
41237
|
+
@Field({ nullable: true })
|
|
41238
|
+
SelectionStrategy: string | null;
|
|
41239
|
+
|
|
41240
|
+
@Field(() => Boolean, { nullable: true })
|
|
41241
|
+
CacheHit?: boolean;
|
|
41242
|
+
|
|
41243
|
+
@Field({ nullable: true })
|
|
41244
|
+
CacheKey: string | null;
|
|
41245
|
+
|
|
41246
|
+
@Field({ nullable: true })
|
|
41247
|
+
JudgeID: string | null;
|
|
41248
|
+
|
|
41249
|
+
@Field(() => Float, { nullable: true })
|
|
41250
|
+
JudgeScore: number | null;
|
|
41251
|
+
|
|
41252
|
+
@Field(() => Boolean, { nullable: true })
|
|
41253
|
+
WasSelectedResult?: boolean;
|
|
41254
|
+
|
|
41255
|
+
@Field(() => Boolean, { nullable: true })
|
|
41256
|
+
StreamingEnabled?: boolean;
|
|
41257
|
+
|
|
41258
|
+
@Field(() => Int, { nullable: true })
|
|
41259
|
+
FirstTokenTime: number | null;
|
|
41260
|
+
|
|
41261
|
+
@Field({ nullable: true })
|
|
41262
|
+
ErrorDetails: string | null;
|
|
41171
41263
|
}
|
|
41172
41264
|
|
|
41173
41265
|
|
|
@@ -41353,6 +41445,48 @@ export class UpdateAIPromptRunInput {
|
|
|
41353
41445
|
@Field({ nullable: true })
|
|
41354
41446
|
RerunFromPromptRunID?: string | null;
|
|
41355
41447
|
|
|
41448
|
+
@Field({ nullable: true })
|
|
41449
|
+
ModelSelection?: string | null;
|
|
41450
|
+
|
|
41451
|
+
@Field({ nullable: true })
|
|
41452
|
+
Status?: string;
|
|
41453
|
+
|
|
41454
|
+
@Field(() => Boolean, { nullable: true })
|
|
41455
|
+
Cancelled?: boolean;
|
|
41456
|
+
|
|
41457
|
+
@Field({ nullable: true })
|
|
41458
|
+
CancellationReason?: string | null;
|
|
41459
|
+
|
|
41460
|
+
@Field(() => Int, { nullable: true })
|
|
41461
|
+
ModelPowerRank?: number | null;
|
|
41462
|
+
|
|
41463
|
+
@Field({ nullable: true })
|
|
41464
|
+
SelectionStrategy?: string | null;
|
|
41465
|
+
|
|
41466
|
+
@Field(() => Boolean, { nullable: true })
|
|
41467
|
+
CacheHit?: boolean;
|
|
41468
|
+
|
|
41469
|
+
@Field({ nullable: true })
|
|
41470
|
+
CacheKey?: string | null;
|
|
41471
|
+
|
|
41472
|
+
@Field({ nullable: true })
|
|
41473
|
+
JudgeID?: string | null;
|
|
41474
|
+
|
|
41475
|
+
@Field(() => Float, { nullable: true })
|
|
41476
|
+
JudgeScore?: number | null;
|
|
41477
|
+
|
|
41478
|
+
@Field(() => Boolean, { nullable: true })
|
|
41479
|
+
WasSelectedResult?: boolean;
|
|
41480
|
+
|
|
41481
|
+
@Field(() => Boolean, { nullable: true })
|
|
41482
|
+
StreamingEnabled?: boolean;
|
|
41483
|
+
|
|
41484
|
+
@Field(() => Int, { nullable: true })
|
|
41485
|
+
FirstTokenTime?: number | null;
|
|
41486
|
+
|
|
41487
|
+
@Field({ nullable: true })
|
|
41488
|
+
ErrorDetails?: string | null;
|
|
41489
|
+
|
|
41356
41490
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
41357
41491
|
OldValues___?: KeyValuePairInput[];
|
|
41358
41492
|
}
|